CINXE.COM
Teamo - Celebrating Crowd's 10th Birthday - TEAMO
<!doctype html> <!--[if lt IE 7]><html class="no-js ie ie6 lt-ie9 lt-ie8 lt-ie7" lang="en-GB"> <![endif]--> <!--[if IE 7]><html class="no-js ie ie7 lt-ie9 lt-ie8" lang="en-GB"> <![endif]--> <!--[if IE 8]><html class="no-js ie ie8 lt-ie9" lang="en-GB"> <![endif]--> <!--[if gt IE 8]><!--><html lang="en-GB"> <!--<![endif]--> <head> <meta charset="UTF-8" /> <title>Teamo - Celebrating Crowd's 10th Birthday - TEAMO</title> <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> <meta http-equiv="X-UA-Compatible" content="IE=edge"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="theme-color" content="#fe5c01"> <meta name="msapplication-navbutton-color" content="#fe5c01"> <link rel="preload" as='style' type="text/css" class='preload-css' href="https://cloud.typography.com/6318514/7005372/css/fonts.css" /> <meta name='robots' content='index, follow, max-image-preview:large, max-snippet:-1, max-video-preview:-1' /> <style>img:is([sizes="auto" i], [sizes^="auto," i]) { contain-intrinsic-size: 3000px 1500px }</style> <!-- This site is optimized with the Yoast SEO plugin v24.4 - https://yoast.com/wordpress/plugins/seo/ --> <link rel="canonical" href="https://teamo.thisiscrowd.com/" /> <meta property="og:locale" content="en_GB" /> <meta property="og:type" content="website" /> <meta property="og:title" content="Teamo - Celebrating Crowd's 10th Birthday - TEAMO" /> <meta property="og:url" content="https://teamo.thisiscrowd.com/" /> <meta property="og:site_name" content="TEAMO" /> <meta property="article:modified_time" content="2023-03-30T08:08:57+00:00" /> <meta property="og:image" content="https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/teamo_favicon.jpg" /> <meta property="og:image:width" content="512" /> <meta property="og:image:height" content="512" /> <meta property="og:image:type" content="image/jpeg" /> <meta name="twitter:card" content="summary_large_image" /> <script type="application/ld+json" class="yoast-schema-graph">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://teamo.thisiscrowd.com/","url":"https://teamo.thisiscrowd.com/","name":"Teamo - Celebrating Crowd's 10th Birthday - TEAMO","isPartOf":{"@id":"https://teamo.thisiscrowd.com/#website"},"about":{"@id":"https://teamo.thisiscrowd.com/#organization"},"primaryImageOfPage":{"@id":"https://teamo.thisiscrowd.com/#primaryimage"},"image":{"@id":"https://teamo.thisiscrowd.com/#primaryimage"},"thumbnailUrl":"https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/teamo_favicon.jpg","datePublished":"2023-02-02T10:30:31+00:00","dateModified":"2023-03-30T08:08:57+00:00","breadcrumb":{"@id":"https://teamo.thisiscrowd.com/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https://teamo.thisiscrowd.com/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https://teamo.thisiscrowd.com/#primaryimage","url":"https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/teamo_favicon.jpg","contentUrl":"https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/teamo_favicon.jpg","width":512,"height":512,"caption":"Teamo - Celebrating Crowd's 10th Birthday"},{"@type":"BreadcrumbList","@id":"https://teamo.thisiscrowd.com/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home"}]},{"@type":"WebSite","@id":"https://teamo.thisiscrowd.com/#website","url":"https://teamo.thisiscrowd.com/","name":"TEAMO","description":"Introducing TEAMO: Your personalised gift for Crowd's 10th Birthday Celebration","publisher":{"@id":"https://teamo.thisiscrowd.com/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://teamo.thisiscrowd.com/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https://teamo.thisiscrowd.com/#organization","name":"TEAMO","url":"https://teamo.thisiscrowd.com/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https://teamo.thisiscrowd.com/#/schema/logo/image/","url":"https://teamo.thisiscrowd.com/wp-content/uploads/2023/02/Group-7.svg","contentUrl":"https://teamo.thisiscrowd.com/wp-content/uploads/2023/02/Group-7.svg","width":203,"height":36,"caption":"TEAMO"},"image":{"@id":"https://teamo.thisiscrowd.com/#/schema/logo/image/"}}]}</script> <!-- / Yoast SEO plugin. --> <style id='https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/dist/styles/home.css-inline-css'> @charset "UTF-8"; .wrapper { z-index: 1; } article { min-height: 100vh; display: flex; flex-flow: column wrap; justify-content: center; align-items: center; overflow: hidden; } .hero { text-align: center; min-height: 100svh; max-width: 100vw; overflow: hidden; display: grid; place-items: center; position: relative; } .hero h1 { font-size: 20rem; -webkit-text-fill-color: transparent; -webkit-text-stroke: 0.015em; margin: 0; position: relative; } .hero .hero-teamo { position: absolute; height: 100%; width: auto; aspect-ratio: 1/1; z-index: 0; filter: blur(7.5px); opacity: 0.1; } .fade-reveal { text-align: center; max-width: 800px; margin: 0 auto; font-size: 1.4em; font-weight: 700; padding: 0 1em; line-height: 1.3; } .fade-reveal span { opacity: 0.1; will-change: opacity; } @media (min-width: 1025px) { .pin-spacer { margin: 0 auto !important; } } .wireframe { display: flex; flex-flow: row wrap; align-items: center; justify-content: initial; max-width: 100%; position: relative; } .wireframe h2 { max-width: 550px; } .wireframe p { max-width: 640px; margin-left: 5.5em; } .wireframe h2, .wireframe p { will-change: opacity, transform; } .wireframe > div { margin-left: 9rem; place-self: center flex-start; position: relative; z-index: 1; } .wireframe figure { grid-area: 1/1; place-self: center flex-end; width: 50%; max-width: 100%; aspect-ratio: 1/1; position: absolute; right: -20%; z-index: 0; opacity: 0.8; } .phone { display: flex; flex-flow: row wrap; align-items: center; justify-content: center; max-width: 100%; width: 100%; margin: 0 auto; } .phone h2 { max-width: 550px; line-height: 1.3; } .phone p { max-width: 425px; margin-left: 5.5em; line-height: 1.3; } .phone > div { grid-area: 1/1; place-self: center flex-end; } .phone figure { grid-area: 1/1; place-self: center flex-start; max-width: 750px; width: 100%; aspect-ratio: 1/1; } .egg { margin: 5rem auto; display: grid; grid-template-columns: 100%; overflow: hidden; } .egg > div { position: relative; z-index: 1; } .egg div, .egg figure { grid-area: 1/1; place-self: center center; } .egg figure { height: 45vmax; aspect-ratio: 1/1; z-index: 0; pointer-events: none; overflow: hidden; transform-origin: center; position: relative; } .egg figure img { position: absolute; inset: 0; width: 100%; height: 100%; -o-object-fit: contain; object-fit: contain; -o-object-position: center; object-position: center; } .model { display: flex; flex-flow: row wrap; align-items: center; max-width: 100%; position: relative; z-index: 1; } .model h2 { max-width: 550px; } .model p { max-width: 640px; margin-left: 5.5em; } .model div { grid-area: 1/1; place-self: center flex-end; margin-left: var(--min-gutter); } .model figure { grid-area: 1/1; place-self: center flex-end; max-width: 750px; width: 100%; aspect-ratio: 1/1; } .welcome { background-color: var(--orange); aspect-ratio: 1440/910; color: #1a1a1a; position: relative; display: grid; place-items: center; justify-content: initial; position: relative; z-index: 1; overflow: hidden; max-width: 100%; } .welcome figure { height: calc(100vh - 4em); width: 100%; max-width: 100vw; cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>🔄</text></svg>") 16 0, auto; } .welcome .langs { position: absolute; inset: -0.8em 0; overflow: hidden; display: flex; flex-flow: column; font-size: 3.2rem; } .welcome .langs p { font-weight: 700; opacity: 0.1; width: -moz-max-content; width: max-content; margin: 0; animation: rowOdd 100s linear infinite forwards; will-change: transform; } .welcome .langs p span:nth-child(even) { -webkit-text-fill-color: transparent; -webkit-text-stroke: 2px; } .welcome .langs p:nth-child(even) { animation: rowEven 100s linear infinite forwards; text-align: right; align-self: flex-end; } .welcome .langs p:nth-child(4n-2) { transform: translateX(10%); } .welcome .langs p:nth-child(4n-1) { transform: translateX(-20%); } .welcome .langs p:nth-child(4n) { transform: translateX(20%); } @keyframes rowOdd { to { transform: translateX(-50%); } } @keyframes rowEven { to { transform: translateX(50%); } } .video { width: 100%; margin: 0 auto; position: relative; } .video crowd-video { width: 100%; max-width: 1440px; margin: 0 auto; display: block; transition-property: transform; transform: scale(0.7); opacity: 0.7; } .video h2 { align-self: flex-start; margin-left: calc((100vw - 1080px) / 2); } .nft-list { display: grid; grid-template-columns: 100%; place-items: center; text-transform: uppercase; text-align: center; } .nft-list figure, .nft-list figcaption { grid-area: 1/1; } .nft-list h2, .nft-list h3 { max-width: 640px; position: relative; padding: 0 0.4ex; } .nft-list h2 { font-size: 2rem; } .nft-list h3 { font-size: 1.4em; text-transform: initial; } .nft-list figure { display: grid; grid-template-columns: repeat(5, 1fr); grid-template-rows: repeat(var(--row-count), 4rem); gap: 0.8rem; margin: 0 -2rem; opacity: 0.25; max-width: 100%; } .nft-list figure div { display: flex; flex-flow: column; gap: 0.8rem; height: 100%; grid-row-end: span 8; } .nft-list figure div:nth-child(1) { grid-row-start: 1; } .nft-list figure div:nth-child(2) { grid-row-start: 2; } .nft-list figure div:nth-child(3) { grid-row-start: 3; } .nft-list figure div:nth-child(4) { grid-row-start: 4; } .nft-list figure div:nth-child(5) { grid-row-start: 5; } .nft-list figure img { height: auto; } body[data-mode=light] .nft-list figure { opacity: 0.1; } @media screen and (max-width: 1200px) { .video h2 { margin: 1em 1rem; text-align: center; } } @media screen and (max-width: 1024px) { article { min-height: 70vh; } .hero h1 { font-size: 10rem; } .wireframe, .phone, .egg, .model { text-align: center; } .wireframe div, .wireframe h2, .wireframe p, .phone div, .phone h2, .phone p, .egg div, .egg h2, .egg p, .model div, .model h2, .model p { margin-inline: auto; } .wireframe figure { position: relative; right: initial; width: 100%; display: none; } .phone figure { width: 100%; max-width: 100%; } .model figure { width: 100%; max-width: 100%; display: none; } } @media screen and (max-width: 650px) { .hero h1 { font-size: 6rem; } .wireframe > div, .model > div, .phone > div { padding: 0 1em; } } .floaters, .teamo-model { position: fixed; left: 0; top: 0; width: 100vw; height: 100vh; pointer-events: none; z-index: 0; } .teamo-model { will-change: filter, opacity; } .floaters { z-index: 1; opacity: 0; will-change: opacity; } .word { display: inline-block; will-change: transform, opacity; transform: translateY(0.5em) skewY(5deg); opacity: 0; } @media (max-width: 1024px) { .word { transform: translateY(0.5em); } } </style> <style id='safe-svg-svg-icon-style-inline-css'> .safe-svg-cover{text-align:center}.safe-svg-cover .safe-svg-inside{display:inline-block;max-width:100%}.safe-svg-cover svg{height:100%;max-height:100%;max-width:100%;width:100%} </style> <style id='classic-theme-styles-inline-css'> /*! This file is auto-generated */ .wp-block-button__link{color:#fff;background-color:#32373c;border-radius:9999px;box-shadow:none;text-decoration:none;padding:calc(.667em + 2px) calc(1.333em + 2px);font-size:1.125em}.wp-block-file__button{background:#32373c;color:#fff;text-decoration:none} </style> <style id='global-styles-inline-css'> :root{--wp--preset--aspect-ratio--square: 1;--wp--preset--aspect-ratio--4-3: 4/3;--wp--preset--aspect-ratio--3-4: 3/4;--wp--preset--aspect-ratio--3-2: 3/2;--wp--preset--aspect-ratio--2-3: 2/3;--wp--preset--aspect-ratio--16-9: 16/9;--wp--preset--aspect-ratio--9-16: 9/16;--wp--preset--color--black: #000000;--wp--preset--color--cyan-bluish-gray: #abb8c3;--wp--preset--color--white: #ffffff;--wp--preset--color--pale-pink: #f78da7;--wp--preset--color--vivid-red: #cf2e2e;--wp--preset--color--luminous-vivid-orange: #ff6900;--wp--preset--color--luminous-vivid-amber: #fcb900;--wp--preset--color--light-green-cyan: #7bdcb5;--wp--preset--color--vivid-green-cyan: #00d084;--wp--preset--color--pale-cyan-blue: #8ed1fc;--wp--preset--color--vivid-cyan-blue: #0693e3;--wp--preset--color--vivid-purple: #9b51e0;--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple: linear-gradient(135deg,rgba(6,147,227,1) 0%,rgb(155,81,224) 100%);--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan: linear-gradient(135deg,rgb(122,220,180) 0%,rgb(0,208,130) 100%);--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange: linear-gradient(135deg,rgba(252,185,0,1) 0%,rgba(255,105,0,1) 100%);--wp--preset--gradient--luminous-vivid-orange-to-vivid-red: linear-gradient(135deg,rgba(255,105,0,1) 0%,rgb(207,46,46) 100%);--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray: linear-gradient(135deg,rgb(238,238,238) 0%,rgb(169,184,195) 100%);--wp--preset--gradient--cool-to-warm-spectrum: linear-gradient(135deg,rgb(74,234,220) 0%,rgb(151,120,209) 20%,rgb(207,42,186) 40%,rgb(238,44,130) 60%,rgb(251,105,98) 80%,rgb(254,248,76) 100%);--wp--preset--gradient--blush-light-purple: linear-gradient(135deg,rgb(255,206,236) 0%,rgb(152,150,240) 100%);--wp--preset--gradient--blush-bordeaux: linear-gradient(135deg,rgb(254,205,165) 0%,rgb(254,45,45) 50%,rgb(107,0,62) 100%);--wp--preset--gradient--luminous-dusk: linear-gradient(135deg,rgb(255,203,112) 0%,rgb(199,81,192) 50%,rgb(65,88,208) 100%);--wp--preset--gradient--pale-ocean: linear-gradient(135deg,rgb(255,245,203) 0%,rgb(182,227,212) 50%,rgb(51,167,181) 100%);--wp--preset--gradient--electric-grass: linear-gradient(135deg,rgb(202,248,128) 0%,rgb(113,206,126) 100%);--wp--preset--gradient--midnight: linear-gradient(135deg,rgb(2,3,129) 0%,rgb(40,116,252) 100%);--wp--preset--font-size--small: 13px;--wp--preset--font-size--medium: 20px;--wp--preset--font-size--large: 36px;--wp--preset--font-size--x-large: 42px;--wp--preset--spacing--20: 0.44rem;--wp--preset--spacing--30: 0.67rem;--wp--preset--spacing--40: 1rem;--wp--preset--spacing--50: 1.5rem;--wp--preset--spacing--60: 2.25rem;--wp--preset--spacing--70: 3.38rem;--wp--preset--spacing--80: 5.06rem;--wp--preset--shadow--natural: 6px 6px 9px rgba(0, 0, 0, 0.2);--wp--preset--shadow--deep: 12px 12px 50px rgba(0, 0, 0, 0.4);--wp--preset--shadow--sharp: 6px 6px 0px rgba(0, 0, 0, 0.2);--wp--preset--shadow--outlined: 6px 6px 0px -3px rgba(255, 255, 255, 1), 6px 6px rgba(0, 0, 0, 1);--wp--preset--shadow--crisp: 6px 6px 0px rgba(0, 0, 0, 1);}:where(.is-layout-flex){gap: 0.5em;}:where(.is-layout-grid){gap: 0.5em;}body .is-layout-flex{display: flex;}.is-layout-flex{flex-wrap: wrap;align-items: center;}.is-layout-flex > :is(*, div){margin: 0;}body .is-layout-grid{display: grid;}.is-layout-grid > :is(*, div){margin: 0;}:where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;}:where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;}.has-black-color{color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-color{color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-color{color: var(--wp--preset--color--white) !important;}.has-pale-pink-color{color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-color{color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-color{color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-color{color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-color{color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-color{color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-color{color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-color{color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-color{color: var(--wp--preset--color--vivid-purple) !important;}.has-black-background-color{background-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-background-color{background-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-background-color{background-color: var(--wp--preset--color--white) !important;}.has-pale-pink-background-color{background-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-background-color{background-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-background-color{background-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-background-color{background-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-background-color{background-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-background-color{background-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-background-color{background-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-background-color{background-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-background-color{background-color: var(--wp--preset--color--vivid-purple) !important;}.has-black-border-color{border-color: var(--wp--preset--color--black) !important;}.has-cyan-bluish-gray-border-color{border-color: var(--wp--preset--color--cyan-bluish-gray) !important;}.has-white-border-color{border-color: var(--wp--preset--color--white) !important;}.has-pale-pink-border-color{border-color: var(--wp--preset--color--pale-pink) !important;}.has-vivid-red-border-color{border-color: var(--wp--preset--color--vivid-red) !important;}.has-luminous-vivid-orange-border-color{border-color: var(--wp--preset--color--luminous-vivid-orange) !important;}.has-luminous-vivid-amber-border-color{border-color: var(--wp--preset--color--luminous-vivid-amber) !important;}.has-light-green-cyan-border-color{border-color: var(--wp--preset--color--light-green-cyan) !important;}.has-vivid-green-cyan-border-color{border-color: var(--wp--preset--color--vivid-green-cyan) !important;}.has-pale-cyan-blue-border-color{border-color: var(--wp--preset--color--pale-cyan-blue) !important;}.has-vivid-cyan-blue-border-color{border-color: var(--wp--preset--color--vivid-cyan-blue) !important;}.has-vivid-purple-border-color{border-color: var(--wp--preset--color--vivid-purple) !important;}.has-vivid-cyan-blue-to-vivid-purple-gradient-background{background: var(--wp--preset--gradient--vivid-cyan-blue-to-vivid-purple) !important;}.has-light-green-cyan-to-vivid-green-cyan-gradient-background{background: var(--wp--preset--gradient--light-green-cyan-to-vivid-green-cyan) !important;}.has-luminous-vivid-amber-to-luminous-vivid-orange-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-amber-to-luminous-vivid-orange) !important;}.has-luminous-vivid-orange-to-vivid-red-gradient-background{background: var(--wp--preset--gradient--luminous-vivid-orange-to-vivid-red) !important;}.has-very-light-gray-to-cyan-bluish-gray-gradient-background{background: var(--wp--preset--gradient--very-light-gray-to-cyan-bluish-gray) !important;}.has-cool-to-warm-spectrum-gradient-background{background: var(--wp--preset--gradient--cool-to-warm-spectrum) !important;}.has-blush-light-purple-gradient-background{background: var(--wp--preset--gradient--blush-light-purple) !important;}.has-blush-bordeaux-gradient-background{background: var(--wp--preset--gradient--blush-bordeaux) !important;}.has-luminous-dusk-gradient-background{background: var(--wp--preset--gradient--luminous-dusk) !important;}.has-pale-ocean-gradient-background{background: var(--wp--preset--gradient--pale-ocean) !important;}.has-electric-grass-gradient-background{background: var(--wp--preset--gradient--electric-grass) !important;}.has-midnight-gradient-background{background: var(--wp--preset--gradient--midnight) !important;}.has-small-font-size{font-size: var(--wp--preset--font-size--small) !important;}.has-medium-font-size{font-size: var(--wp--preset--font-size--medium) !important;}.has-large-font-size{font-size: var(--wp--preset--font-size--large) !important;}.has-x-large-font-size{font-size: var(--wp--preset--font-size--x-large) !important;} :where(.wp-block-post-template.is-layout-flex){gap: 1.25em;}:where(.wp-block-post-template.is-layout-grid){gap: 1.25em;} :where(.wp-block-columns.is-layout-flex){gap: 2em;}:where(.wp-block-columns.is-layout-grid){gap: 2em;} :root :where(.wp-block-pullquote){font-size: 1.5em;line-height: 1.6;} </style> <style id='https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/dist/styles/main.css-inline-css'> @charset "UTF-8"; *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; transition-duration: 0.3s; transition-property: none; transition-delay: 0s; } @media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition-duration: 0s !important; } } picture { display: contents; } picture source { display: none; } img { display: block; max-width: 100%; } button { -webkit-appearance: none; } h1, h2, h3, h4, h5, h6, p { margin: 1em 0; } :root { --min-gutter: clamp(2rem,4.86vw,70px); --max-width: 1920px; --mobile-gutter: 1rem; } :root { --background: #1a1a1a; --foreground: white; --surface: #2d2d2d; --surface-inv: #e1e1e1; --orange: #FE5C01; } @media (prefers-color-scheme: light) { :root { --background: white; --foreground: #1a1a1a; --surface: #e1e1e1; --surface-inv: #2d2d2d; } } body { background-color: var(--background); color: var(--foreground); transition-property: background-color, color; --crowd-switch-track-background-color: var(--foreground); --crowd-switch-track-background-color-active: var(--foreground); --crowd-switch-thumb-background-color: var(--surface); --crowd-video-theme-color: var(--orange); --crowd-video-button-hover-color: var(--orange); --crowd-range-track-border-color: transparent; --crowd-range-thumb-border-color: transparent; --crowd-range-track-background-color: #EDF3F3; --crowd-range-track-border-width: 0px; } body[data-mode=dark] { --background: #1a1a1a; --foreground: white; --surface: #2d2d2d; --surface-inv: #e1e1e1; } body[data-mode=light] { --background: white; --foreground: #1a1a1a; --surface: #e1e1e1; --surface-inv: #2d2d2d; } a { color: inherit; } body { --system: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; font-family: "Gotham SSm A", "Gotham SSm B", var(--system); } html, body { font-size: clamp(16px, 1.38vw, 20px); line-height: 1.3; } h2 { font-size: 2.8rem; } .button { -webkit-appearance: none; display: inline-block; border: none; background-color: var(--orange); color: white; text-align: center; padding: 0.75em 1.25em; min-width: 10em; cursor: pointer; text-decoration: none; border: 1px solid var(--orange); transition-property: background, color; } .button:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; } @media (hover: hover) { .button:hover { color: var(--orange); background-color: transparent; } } .navigation { padding: 3rem var(--min-gutter); display: flex; flex-flow: row wrap; justify-content: space-between; position: relative; z-index: 1; position: fixed; top: 0; width: 100%; max-width: 100vw; } @media (prefers-color-scheme: dark) { .navigation crowd-switch::part(thumb) { background-image: url(); } } footer { position: relative; max-height: 30em; cursor: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='40' height='48' viewport='0 0 100 100' style='fill:black;font-size:24px;'><text y='50%'>👀</text></svg>") 16 0, auto; /*!emojicursor.app*/ overflow: hidden; } footer .frame { margin: 0 auto; width: 1000px; max-width: 100%; transform: translateY(180px); } footer p { position: absolute; bottom: 0; left: 0; width: 100%; display: flex; flex-flow: row wrap; justify-content: space-between; align-items: flex-end; padding-inline: 1em; } @media only screen and (max-width: 768px) { footer p { flex-flow: nowrap; align-items: center; flex-direction: column; text-align: center; } } footer a { cursor: pointer; transition-property: color; } footer a:hover { color: var(--orange); } .chat-frame { position: fixed; bottom: 1em; right: 1em; z-index: 98; display: flex; flex-flow: column; align-items: flex-end; pointer-events: none; } .chat-frame * { pointer-events: all; } .chat-frame h2 { font-size: 1rem; text-align: center; border-bottom: 1px solid #1a1a1a; margin: 0; padding: 1em 0; position: relative; } .chat-frame .toggle { background-color: var(--orange); aspect-ratio: 1/1; font-size: 2rem; border-radius: 50%; padding: 0.5em; display: grid; place-content: center; place-items: center; line-height: 1; border: none; cursor: pointer; } .chat-frame .close { position: absolute; top: 50%; transform: translateY(-50%); right: 2em; cursor: pointer; -webkit-appearance: none; padding: 0; border: none; background: transparent; font-size: 1rem; font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif; } .chat-box { width: 360px; max-width: 90vw; display: flex; flex-flow: column; background-color: white; color: #1a1a1a; border-radius: 2em; will-change: transform, opacity; transform-origin: bottom right; margin-bottom: 1em; border: 1px solid #1a1a1a; } .chat { padding: 0.5em 1em; font-size: 0.7em; } .chat .messages { overflow-y: scroll; max-height: 50vh; min-height: 200px; } .chat .messages > div { pointer-events: none; padding: 0.5em 0.7em; border-radius: 0.5em; background-color: #e1e1e1; width: -moz-fit-content; width: fit-content; margin: 1em 0; max-width: 90%; } .chat .messages > div.system { display: none; } .chat .messages > div.user { margin-left: auto; background-color: var(--orange); color: white; } .chat .messages > div a { color: var(--orange); text-decoration: underline; pointer-events: all; } .chat input { margin: 1em 0; -webkit-appearance: none; border: 1px solid #1a1a1a; font: inherit; padding: 0.5em 0.7em; caret-color: var(--orange); width: 100%; border-radius: 0.5em; } .chat input:focus-visible { outline: none; } .splash { view-transition-name: splash-transition; } .hide-splash .splash { pointer-events: none; background-color: transparent !important; opacity: 0; } body:not(.hide-splash) { overflow: hidden; } </style> <style id='https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/dist/styles/deferred.css-inline-css'> #trackingConsent { position: fixed; bottom: 1em; right: 1em; left: auto; max-width: 25ch; } #trackingConsent::backdrop { background: none; pointer-events: none; display: none; } </style> <style id='/wp-includes/css/dist/block-library/style.min.css-inline-css'> @charset "UTF-8";.wp-block-archives{box-sizing:border-box}.wp-block-archives-dropdown label{display:block}.wp-block-avatar{line-height:0}.wp-block-avatar,.wp-block-avatar img{box-sizing:border-box}.wp-block-avatar.aligncenter{text-align:center}.wp-block-audio{box-sizing:border-box}.wp-block-audio :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-audio audio{min-width:300px;width:100%}.wp-block-button__link{box-sizing:border-box;cursor:pointer;display:inline-block;text-align:center;word-break:break-word}.wp-block-button__link.aligncenter{text-align:center}.wp-block-button__link.alignright{text-align:right}:where(.wp-block-button__link){border-radius:9999px;box-shadow:none;padding:calc(.667em + 2px) calc(1.333em + 2px);text-decoration:none}.wp-block-button[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons>.wp-block-button.has-custom-width{max-width:none}.wp-block-buttons>.wp-block-button.has-custom-width .wp-block-button__link{width:100%}.wp-block-buttons>.wp-block-button.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-buttons>.wp-block-button.wp-block-button__width-25{width:calc(25% - var(--wp--style--block-gap, .5em)*.75)}.wp-block-buttons>.wp-block-button.wp-block-button__width-50{width:calc(50% - var(--wp--style--block-gap, .5em)*.5)}.wp-block-buttons>.wp-block-button.wp-block-button__width-75{width:calc(75% - var(--wp--style--block-gap, .5em)*.25)}.wp-block-buttons>.wp-block-button.wp-block-button__width-100{flex-basis:100%;width:100%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-25{width:25%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-50{width:50%}.wp-block-buttons.is-vertical>.wp-block-button.wp-block-button__width-75{width:75%}.wp-block-button.is-style-squared,.wp-block-button__link.wp-block-button.is-style-squared{border-radius:0}.wp-block-button.no-border-radius,.wp-block-button__link.no-border-radius{border-radius:0!important}:root :where(.wp-block-button .wp-block-button__link.is-style-outline),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link){border:2px solid;padding:.667em 1.333em}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-text-color)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-text-color)){color:currentColor}:root :where(.wp-block-button .wp-block-button__link.is-style-outline:not(.has-background)),:root :where(.wp-block-button.is-style-outline>.wp-block-button__link:not(.has-background)){background-color:initial;background-image:none}.wp-block-buttons.is-vertical{flex-direction:column}.wp-block-buttons.is-vertical>.wp-block-button:last-child{margin-bottom:0}.wp-block-buttons>.wp-block-button{display:inline-block;margin:0}.wp-block-buttons.is-content-justification-left{justify-content:flex-start}.wp-block-buttons.is-content-justification-left.is-vertical{align-items:flex-start}.wp-block-buttons.is-content-justification-center{justify-content:center}.wp-block-buttons.is-content-justification-center.is-vertical{align-items:center}.wp-block-buttons.is-content-justification-right{justify-content:flex-end}.wp-block-buttons.is-content-justification-right.is-vertical{align-items:flex-end}.wp-block-buttons.is-content-justification-space-between{justify-content:space-between}.wp-block-buttons.aligncenter{text-align:center}.wp-block-buttons:not(.is-content-justification-space-between,.is-content-justification-right,.is-content-justification-left,.is-content-justification-center) .wp-block-button.aligncenter{margin-left:auto;margin-right:auto;width:100%}.wp-block-buttons[style*=text-decoration] .wp-block-button,.wp-block-buttons[style*=text-decoration] .wp-block-button__link{text-decoration:inherit}.wp-block-buttons.has-custom-font-size .wp-block-button__link{font-size:inherit}.wp-block-button.aligncenter,.wp-block-calendar{text-align:center}.wp-block-calendar td,.wp-block-calendar th{border:1px solid;padding:.25em}.wp-block-calendar th{font-weight:400}.wp-block-calendar caption{background-color:inherit}.wp-block-calendar table{border-collapse:collapse;width:100%}.wp-block-calendar table:where(:not(.has-text-color)){color:#40464d}.wp-block-calendar table:where(:not(.has-text-color)) td,.wp-block-calendar table:where(:not(.has-text-color)) th{border-color:#ddd}.wp-block-calendar table.has-background th{background-color:inherit}.wp-block-calendar table.has-text-color th{color:inherit}:where(.wp-block-calendar table:not(.has-background) th){background:#ddd}.wp-block-categories{box-sizing:border-box}.wp-block-categories.alignleft{margin-right:2em}.wp-block-categories.alignright{margin-left:2em}.wp-block-categories.wp-block-categories-dropdown.aligncenter{text-align:center}.wp-block-categories .wp-block-categories__label{display:block;width:100%}.wp-block-code{box-sizing:border-box}.wp-block-code code{display:block;font-family:inherit;overflow-wrap:break-word;white-space:pre-wrap}.wp-block-columns{align-items:normal!important;box-sizing:border-box;display:flex;flex-wrap:wrap!important}@media (min-width:782px){.wp-block-columns{flex-wrap:nowrap!important}}.wp-block-columns.are-vertically-aligned-top{align-items:flex-start}.wp-block-columns.are-vertically-aligned-center{align-items:center}.wp-block-columns.are-vertically-aligned-bottom{align-items:flex-end}@media (max-width:781px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:100%!important}}@media (min-width:782px){.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns:not(.is-not-stacked-on-mobile)>.wp-block-column[style*=flex-basis]{flex-grow:0}}.wp-block-columns.is-not-stacked-on-mobile{flex-wrap:nowrap!important}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column{flex-basis:0;flex-grow:1}.wp-block-columns.is-not-stacked-on-mobile>.wp-block-column[style*=flex-basis]{flex-grow:0}:where(.wp-block-columns){margin-bottom:1.75em}:where(.wp-block-columns.has-background){padding:1.25em 2.375em}.wp-block-column{flex-grow:1;min-width:0;overflow-wrap:break-word;word-break:break-word}.wp-block-column.is-vertically-aligned-top{align-self:flex-start}.wp-block-column.is-vertically-aligned-center{align-self:center}.wp-block-column.is-vertically-aligned-bottom{align-self:flex-end}.wp-block-column.is-vertically-aligned-stretch{align-self:stretch}.wp-block-column.is-vertically-aligned-bottom,.wp-block-column.is-vertically-aligned-center,.wp-block-column.is-vertically-aligned-top{width:100%}.wp-block-post-comments{box-sizing:border-box}.wp-block-post-comments .alignleft{float:left}.wp-block-post-comments .alignright{float:right}.wp-block-post-comments .navigation:after{clear:both;content:"";display:table}.wp-block-post-comments .commentlist{clear:both;list-style:none;margin:0;padding:0}.wp-block-post-comments .commentlist .comment{min-height:2.25em;padding-left:3.25em}.wp-block-post-comments .commentlist .comment p{font-size:1em;line-height:1.8;margin:1em 0}.wp-block-post-comments .commentlist .children{list-style:none;margin:0;padding:0}.wp-block-post-comments .comment-author{line-height:1.5}.wp-block-post-comments .comment-author .avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;margin-top:.5em;width:2.5em}.wp-block-post-comments .comment-author cite{font-style:normal}.wp-block-post-comments .comment-meta{font-size:.875em;line-height:1.5}.wp-block-post-comments .comment-meta b{font-weight:400}.wp-block-post-comments .comment-meta .comment-awaiting-moderation{display:block;margin-bottom:1em;margin-top:1em}.wp-block-post-comments .comment-body .commentmetadata{font-size:.875em}.wp-block-post-comments .comment-form-author label,.wp-block-post-comments .comment-form-comment label,.wp-block-post-comments .comment-form-email label,.wp-block-post-comments .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments .comment-form input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments .comment-reply-title{margin-bottom:0}.wp-block-post-comments .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-left:.5em}.wp-block-post-comments .reply{font-size:.875em;margin-bottom:1.4em}.wp-block-post-comments input:not([type=submit]),.wp-block-post-comments textarea{border:1px solid #949494;font-family:inherit;font-size:1em}.wp-block-post-comments input:not([type=submit]):not([type=checkbox]),.wp-block-post-comments textarea{padding:calc(.667em + 2px)}:where(.wp-block-post-comments input[type=submit]){border:none}.wp-block-comments-pagination>.wp-block-comments-pagination-next,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers,.wp-block-comments-pagination>.wp-block-comments-pagination-previous{margin-bottom:.5em;margin-right:.5em}.wp-block-comments-pagination>.wp-block-comments-pagination-next:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-numbers:last-child,.wp-block-comments-pagination>.wp-block-comments-pagination-previous:last-child{margin-right:0}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow{display:inline-block;margin-right:1ch}.wp-block-comments-pagination .wp-block-comments-pagination-previous-arrow:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow{display:inline-block;margin-left:1ch}.wp-block-comments-pagination .wp-block-comments-pagination-next-arrow:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-comments-pagination.aligncenter{justify-content:center}.wp-block-comment-template{box-sizing:border-box;list-style:none;margin-bottom:0;max-width:100%;padding:0}.wp-block-comment-template li{clear:both}.wp-block-comment-template ol{list-style:none;margin-bottom:0;max-width:100%;padding-left:2rem}.wp-block-comment-template.alignleft{float:left}.wp-block-comment-template.aligncenter{margin-left:auto;margin-right:auto;width:-moz-fit-content;width:fit-content}.wp-block-comment-template.alignright{float:right}.wp-block-comment-date{box-sizing:border-box}.comment-awaiting-moderation{display:block;font-size:.875em;line-height:1.5}.wp-block-comment-author-name,.wp-block-comment-content,.wp-block-comment-edit-link,.wp-block-comment-reply-link{box-sizing:border-box}.wp-block-cover,.wp-block-cover-image{align-items:center;background-position:50%;box-sizing:border-box;display:flex;justify-content:center;min-height:430px;overflow:hidden;overflow:clip;padding:1em;position:relative}.wp-block-cover .has-background-dim:not([class*=-background-color]),.wp-block-cover-image .has-background-dim:not([class*=-background-color]),.wp-block-cover-image.has-background-dim:not([class*=-background-color]),.wp-block-cover.has-background-dim:not([class*=-background-color]){background-color:#000}.wp-block-cover .has-background-dim.has-background-gradient,.wp-block-cover-image .has-background-dim.has-background-gradient{background-color:initial}.wp-block-cover-image.has-background-dim:before,.wp-block-cover.has-background-dim:before{background-color:inherit;content:""}.wp-block-cover .wp-block-cover__background,.wp-block-cover .wp-block-cover__gradient-background,.wp-block-cover-image .wp-block-cover__background,.wp-block-cover-image .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim:not(.has-background-gradient):before,.wp-block-cover.has-background-dim:not(.has-background-gradient):before{bottom:0;left:0;opacity:.5;position:absolute;right:0;top:0;z-index:1}.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-10:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-10 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-10:not(.has-background-gradient):before{opacity:.1}.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-20:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-20 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-20:not(.has-background-gradient):before{opacity:.2}.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-30:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-30 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-30:not(.has-background-gradient):before{opacity:.3}.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-40:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-40 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-40:not(.has-background-gradient):before{opacity:.4}.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-50:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-50 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-50:not(.has-background-gradient):before{opacity:.5}.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-60:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-60 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-60:not(.has-background-gradient):before{opacity:.6}.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-70:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-70 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-70:not(.has-background-gradient):before{opacity:.7}.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-80:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-80 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-80:not(.has-background-gradient):before{opacity:.8}.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-90:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-90 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-90:not(.has-background-gradient):before{opacity:.9}.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__background,.wp-block-cover-image.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,.wp-block-cover-image.has-background-dim.has-background-dim-100:not(.has-background-gradient):before,.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__background,.wp-block-cover.has-background-dim.has-background-dim-100 .wp-block-cover__gradient-background,.wp-block-cover.has-background-dim.has-background-dim-100:not(.has-background-gradient):before{opacity:1}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-0,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-0,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-0{opacity:0}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-10,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-10,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-10{opacity:.1}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-20,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-20,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-20{opacity:.2}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-30,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-30,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-30{opacity:.3}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-40,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-40,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-40{opacity:.4}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-50,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-50,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-50{opacity:.5}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-60,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-60,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-60{opacity:.6}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-70,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-70,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-70{opacity:.7}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-80,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-80,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-80{opacity:.8}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-90,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-90,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-90{opacity:.9}.wp-block-cover .wp-block-cover__background.has-background-dim.has-background-dim-100,.wp-block-cover .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100,.wp-block-cover-image .wp-block-cover__background.has-background-dim.has-background-dim-100,.wp-block-cover-image .wp-block-cover__gradient-background.has-background-dim.has-background-dim-100{opacity:1}.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.alignleft,.wp-block-cover.alignright{max-width:420px;width:100%}.wp-block-cover-image.aligncenter,.wp-block-cover-image.alignleft,.wp-block-cover-image.alignright,.wp-block-cover.aligncenter,.wp-block-cover.alignleft,.wp-block-cover.alignright{display:flex}.wp-block-cover .wp-block-cover__inner-container,.wp-block-cover-image .wp-block-cover__inner-container{color:inherit;width:100%;z-index:1}.has-modal-open .wp-block-cover .wp-block-cover__inner-container,.has-modal-open .wp-block-cover-image .wp-block-cover__inner-container{z-index:auto}.wp-block-cover-image.is-position-top-left,.wp-block-cover.is-position-top-left{align-items:flex-start;justify-content:flex-start}.wp-block-cover-image.is-position-top-center,.wp-block-cover.is-position-top-center{align-items:flex-start;justify-content:center}.wp-block-cover-image.is-position-top-right,.wp-block-cover.is-position-top-right{align-items:flex-start;justify-content:flex-end}.wp-block-cover-image.is-position-center-left,.wp-block-cover.is-position-center-left{align-items:center;justify-content:flex-start}.wp-block-cover-image.is-position-center-center,.wp-block-cover.is-position-center-center{align-items:center;justify-content:center}.wp-block-cover-image.is-position-center-right,.wp-block-cover.is-position-center-right{align-items:center;justify-content:flex-end}.wp-block-cover-image.is-position-bottom-left,.wp-block-cover.is-position-bottom-left{align-items:flex-end;justify-content:flex-start}.wp-block-cover-image.is-position-bottom-center,.wp-block-cover.is-position-bottom-center{align-items:flex-end;justify-content:center}.wp-block-cover-image.is-position-bottom-right,.wp-block-cover.is-position-bottom-right{align-items:flex-end;justify-content:flex-end}.wp-block-cover-image.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position .wp-block-cover__inner-container{margin:0}.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-bottom-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-bottom-right .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-center-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-center-right .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-top-left .wp-block-cover__inner-container,.wp-block-cover-image.has-custom-content-position.has-custom-content-position.is-position-top-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-bottom-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-bottom-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-center-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-center-right .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-top-left .wp-block-cover__inner-container,.wp-block-cover.has-custom-content-position.has-custom-content-position.is-position-top-right .wp-block-cover__inner-container{margin:0;width:auto}.wp-block-cover .wp-block-cover__image-background,.wp-block-cover video.wp-block-cover__video-background,.wp-block-cover-image .wp-block-cover__image-background,.wp-block-cover-image video.wp-block-cover__video-background{border:none;bottom:0;box-shadow:none;height:100%;left:0;margin:0;max-height:none;max-width:none;object-fit:cover;outline:none;padding:0;position:absolute;right:0;top:0;width:100%}.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:fixed;background-repeat:no-repeat;background-size:cover}@supports (-webkit-touch-callout:inherit){.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:scroll}}@media (prefers-reduced-motion:reduce){.wp-block-cover-image.has-parallax,.wp-block-cover.has-parallax,.wp-block-cover__image-background.has-parallax,video.wp-block-cover__video-background.has-parallax{background-attachment:scroll}}.wp-block-cover-image.is-repeated,.wp-block-cover.is-repeated,.wp-block-cover__image-background.is-repeated,video.wp-block-cover__video-background.is-repeated{background-repeat:repeat;background-size:auto}.wp-block-cover__image-background,.wp-block-cover__video-background{z-index:0}.wp-block-cover-image-text,.wp-block-cover-image-text a,.wp-block-cover-image-text a:active,.wp-block-cover-image-text a:focus,.wp-block-cover-image-text a:hover,.wp-block-cover-text,.wp-block-cover-text a,.wp-block-cover-text a:active,.wp-block-cover-text a:focus,.wp-block-cover-text a:hover,section.wp-block-cover-image h2,section.wp-block-cover-image h2 a,section.wp-block-cover-image h2 a:active,section.wp-block-cover-image h2 a:focus,section.wp-block-cover-image h2 a:hover{color:#fff}.wp-block-cover-image .wp-block-cover.has-left-content{justify-content:flex-start}.wp-block-cover-image .wp-block-cover.has-right-content{justify-content:flex-end}.wp-block-cover-image.has-left-content .wp-block-cover-image-text,.wp-block-cover.has-left-content .wp-block-cover-text,section.wp-block-cover-image.has-left-content>h2{margin-left:0;text-align:left}.wp-block-cover-image.has-right-content .wp-block-cover-image-text,.wp-block-cover.has-right-content .wp-block-cover-text,section.wp-block-cover-image.has-right-content>h2{margin-right:0;text-align:right}.wp-block-cover .wp-block-cover-text,.wp-block-cover-image .wp-block-cover-image-text,section.wp-block-cover-image>h2{font-size:2em;line-height:1.25;margin-bottom:0;max-width:840px;padding:.44em;text-align:center;z-index:1}:where(.wp-block-cover-image:not(.has-text-color)),:where(.wp-block-cover:not(.has-text-color)){color:#fff}:where(.wp-block-cover-image.is-light:not(.has-text-color)),:where(.wp-block-cover.is-light:not(.has-text-color)){color:#000}:root :where(.wp-block-cover h1:not(.has-text-color)),:root :where(.wp-block-cover h2:not(.has-text-color)),:root :where(.wp-block-cover h3:not(.has-text-color)),:root :where(.wp-block-cover h4:not(.has-text-color)),:root :where(.wp-block-cover h5:not(.has-text-color)),:root :where(.wp-block-cover h6:not(.has-text-color)),:root :where(.wp-block-cover p:not(.has-text-color)){color:inherit}.wp-block-details{box-sizing:border-box}.wp-block-details summary{cursor:pointer}.wp-block-embed.alignleft,.wp-block-embed.alignright,.wp-block[data-align=left]>[data-type="core/embed"],.wp-block[data-align=right]>[data-type="core/embed"]{max-width:360px;width:100%}.wp-block-embed.alignleft .wp-block-embed__wrapper,.wp-block-embed.alignright .wp-block-embed__wrapper,.wp-block[data-align=left]>[data-type="core/embed"] .wp-block-embed__wrapper,.wp-block[data-align=right]>[data-type="core/embed"] .wp-block-embed__wrapper{min-width:280px}.wp-block-cover .wp-block-embed{min-height:240px;min-width:320px}.wp-block-embed{overflow-wrap:break-word}.wp-block-embed :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-embed iframe{max-width:100%}.wp-block-embed__wrapper{position:relative}.wp-embed-responsive .wp-has-aspect-ratio .wp-block-embed__wrapper:before{content:"";display:block;padding-top:50%}.wp-embed-responsive .wp-has-aspect-ratio iframe{bottom:0;height:100%;left:0;position:absolute;right:0;top:0;width:100%}.wp-embed-responsive .wp-embed-aspect-21-9 .wp-block-embed__wrapper:before{padding-top:42.85%}.wp-embed-responsive .wp-embed-aspect-18-9 .wp-block-embed__wrapper:before{padding-top:50%}.wp-embed-responsive .wp-embed-aspect-16-9 .wp-block-embed__wrapper:before{padding-top:56.25%}.wp-embed-responsive .wp-embed-aspect-4-3 .wp-block-embed__wrapper:before{padding-top:75%}.wp-embed-responsive .wp-embed-aspect-1-1 .wp-block-embed__wrapper:before{padding-top:100%}.wp-embed-responsive .wp-embed-aspect-9-16 .wp-block-embed__wrapper:before{padding-top:177.77%}.wp-embed-responsive .wp-embed-aspect-1-2 .wp-block-embed__wrapper:before{padding-top:200%}.wp-block-file{box-sizing:border-box}.wp-block-file:not(.wp-element-button){font-size:.8em}.wp-block-file.aligncenter{text-align:center}.wp-block-file.alignright{text-align:right}.wp-block-file *+.wp-block-file__button{margin-left:.75em}:where(.wp-block-file){margin-bottom:1.5em}.wp-block-file__embed{margin-bottom:1em}:where(.wp-block-file__button){border-radius:2em;display:inline-block;padding:.5em 1em}:where(.wp-block-file__button):is(a):active,:where(.wp-block-file__button):is(a):focus,:where(.wp-block-file__button):is(a):hover,:where(.wp-block-file__button):is(a):visited{box-shadow:none;color:#fff;opacity:.85;text-decoration:none}.wp-block-form-input__label{display:flex;flex-direction:column;gap:.25em;margin-bottom:.5em;width:100%}.wp-block-form-input__label.is-label-inline{align-items:center;flex-direction:row;gap:.5em}.wp-block-form-input__label.is-label-inline .wp-block-form-input__label-content{margin-bottom:.5em}.wp-block-form-input__label:has(input[type=checkbox]){flex-direction:row;width:-moz-fit-content;width:fit-content}.wp-block-form-input__label:has(input[type=checkbox]) .wp-block-form-input__label-content{margin:0}.wp-block-form-input__label:has(.wp-block-form-input__label-content+input[type=checkbox]){flex-direction:row-reverse}.wp-block-form-input__label-content{width:-moz-fit-content;width:fit-content}.wp-block-form-input__input{font-size:1em;margin-bottom:.5em;padding:0 .5em}.wp-block-form-input__input[type=date],.wp-block-form-input__input[type=datetime-local],.wp-block-form-input__input[type=datetime],.wp-block-form-input__input[type=email],.wp-block-form-input__input[type=month],.wp-block-form-input__input[type=number],.wp-block-form-input__input[type=password],.wp-block-form-input__input[type=search],.wp-block-form-input__input[type=tel],.wp-block-form-input__input[type=text],.wp-block-form-input__input[type=time],.wp-block-form-input__input[type=url],.wp-block-form-input__input[type=week]{border:1px solid;line-height:2;min-height:2em}textarea.wp-block-form-input__input{min-height:10em}.blocks-gallery-grid:not(.has-nested-images),.wp-block-gallery:not(.has-nested-images){display:flex;flex-wrap:wrap;list-style-type:none;margin:0;padding:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item{display:flex;flex-direction:column;flex-grow:1;justify-content:center;margin:0 1em 1em 0;position:relative;width:calc(50% - 1em)}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:nth-of-type(2n){margin-right:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figure,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figure,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figure{align-items:flex-end;display:flex;height:100%;justify-content:flex-start;margin:0}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item img{display:block;height:auto;max-width:100%;width:auto}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption{background:linear-gradient(0deg,#000000b3,#0000004d 70%,#0000);bottom:0;box-sizing:border-box;color:#fff;font-size:.8em;margin:0;max-height:100%;overflow:auto;padding:3em .77em .7em;position:absolute;text-align:center;width:100%;z-index:2}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image figcaption img,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image figcaption img,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item figcaption img{display:inline}.blocks-gallery-grid:not(.has-nested-images) figcaption,.wp-block-gallery:not(.has-nested-images) figcaption{flex-grow:1}.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-image img,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item a,.blocks-gallery-grid:not(.has-nested-images).is-cropped .blocks-gallery-item img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-image img,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item a,.wp-block-gallery:not(.has-nested-images).is-cropped .blocks-gallery-item img{flex:1;height:100%;object-fit:cover;width:100%}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item{margin-right:0;width:100%}@media (min-width:600px){.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item{margin-right:1em;width:calc(33.33333% - .66667em)}.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item{margin-right:1em;width:calc(25% - .75em)}.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item{margin-right:1em;width:calc(20% - .8em)}.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item{margin-right:1em;width:calc(16.66667% - .83333em)}.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item{margin-right:1em;width:calc(14.28571% - .85714em)}.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image,.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image,.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item{margin-right:1em;width:calc(12.5% - .875em)}.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.blocks-gallery-grid:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-image:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-1 .blocks-gallery-item:nth-of-type(1n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-image:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-2 .blocks-gallery-item:nth-of-type(2n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-image:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-3 .blocks-gallery-item:nth-of-type(3n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-image:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-4 .blocks-gallery-item:nth-of-type(4n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-image:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-5 .blocks-gallery-item:nth-of-type(5n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-image:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-6 .blocks-gallery-item:nth-of-type(6n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-image:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-7 .blocks-gallery-item:nth-of-type(7n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-image:nth-of-type(8n),.wp-block-gallery:not(.has-nested-images).columns-8 .blocks-gallery-item:nth-of-type(8n){margin-right:0}}.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-image:last-child,.blocks-gallery-grid:not(.has-nested-images) .blocks-gallery-item:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-image:last-child,.wp-block-gallery:not(.has-nested-images) .blocks-gallery-item:last-child{margin-right:0}.blocks-gallery-grid:not(.has-nested-images).alignleft,.blocks-gallery-grid:not(.has-nested-images).alignright,.wp-block-gallery:not(.has-nested-images).alignleft,.wp-block-gallery:not(.has-nested-images).alignright{max-width:420px;width:100%}.blocks-gallery-grid:not(.has-nested-images).aligncenter .blocks-gallery-item figure,.wp-block-gallery:not(.has-nested-images).aligncenter .blocks-gallery-item figure{justify-content:center}.wp-block-gallery:not(.is-cropped) .blocks-gallery-item{align-self:flex-start}figure.wp-block-gallery.has-nested-images{align-items:normal}.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image){margin:0;width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)/2)}.wp-block-gallery.has-nested-images figure.wp-block-image{box-sizing:border-box;display:flex;flex-direction:column;flex-grow:1;justify-content:center;max-width:100%;position:relative}.wp-block-gallery.has-nested-images figure.wp-block-image>a,.wp-block-gallery.has-nested-images figure.wp-block-image>div{flex-direction:column;flex-grow:1;margin:0}.wp-block-gallery.has-nested-images figure.wp-block-image img{display:block;height:auto;max-width:100%!important;width:auto}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{bottom:0;left:0;max-height:100%;position:absolute;right:0}.wp-block-gallery.has-nested-images figure.wp-block-image:has(figcaption):before{-webkit-backdrop-filter:blur(3px);backdrop-filter:blur(3px);content:"";height:100%;-webkit-mask-image:linear-gradient(0deg,#000 20%,#0000);mask-image:linear-gradient(0deg,#000 20%,#0000);max-height:40%}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{background:linear-gradient(0deg,#0006,#0000);box-sizing:border-box;color:#fff;font-size:13px;margin:0;overflow:auto;padding:1em;scrollbar-color:#0000 #0000;scrollbar-gutter:stable both-edges;scrollbar-width:thin;text-align:center;text-shadow:0 0 1.5px #000;will-change:transform}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar{height:12px;width:12px}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-track{background-color:initial}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption::-webkit-scrollbar-thumb{background-clip:padding-box;background-color:initial;border:3px solid #0000;border-radius:8px}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus::-webkit-scrollbar-thumb,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover::-webkit-scrollbar-thumb{background-color:#fffc}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:focus-within,.wp-block-gallery.has-nested-images figure.wp-block-image figcaption:hover{scrollbar-color:#fffc #0000}@media (hover:none){.wp-block-gallery.has-nested-images figure.wp-block-image figcaption{scrollbar-color:#fffc #0000}}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption img{display:inline}.wp-block-gallery.has-nested-images figure.wp-block-image figcaption a{color:inherit}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>a,.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border>div,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>a,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded>div{flex:1 1 auto}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border figcaption,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded figcaption{background:none;color:inherit;flex:initial;margin:0;padding:10px 10px 9px;position:relative;text-shadow:none}.wp-block-gallery.has-nested-images figure.wp-block-image.has-custom-border:before,.wp-block-gallery.has-nested-images figure.wp-block-image.is-style-rounded:before{content:none}.wp-block-gallery.has-nested-images figcaption{flex-basis:100%;flex-grow:1;text-align:center}.wp-block-gallery.has-nested-images:not(.is-cropped) figure.wp-block-image:not(#individual-image){margin-bottom:auto;margin-top:0}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image){align-self:inherit}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image)>div:not(.components-drop-zone){display:flex}.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) a,.wp-block-gallery.has-nested-images.is-cropped figure.wp-block-image:not(#individual-image) img{flex:1 0 0%;height:100%;object-fit:cover;width:100%}.wp-block-gallery.has-nested-images.columns-1 figure.wp-block-image:not(#individual-image){width:100%}@media (min-width:600px){.wp-block-gallery.has-nested-images.columns-3 figure.wp-block-image:not(#individual-image){width:calc(33.33333% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-4 figure.wp-block-image:not(#individual-image){width:calc(25% - var(--wp--style--unstable-gallery-gap, 16px)*.75)}.wp-block-gallery.has-nested-images.columns-5 figure.wp-block-image:not(#individual-image){width:calc(20% - var(--wp--style--unstable-gallery-gap, 16px)*.8)}.wp-block-gallery.has-nested-images.columns-6 figure.wp-block-image:not(#individual-image){width:calc(16.66667% - var(--wp--style--unstable-gallery-gap, 16px)*.83333)}.wp-block-gallery.has-nested-images.columns-7 figure.wp-block-image:not(#individual-image){width:calc(14.28571% - var(--wp--style--unstable-gallery-gap, 16px)*.85714)}.wp-block-gallery.has-nested-images.columns-8 figure.wp-block-image:not(#individual-image){width:calc(12.5% - var(--wp--style--unstable-gallery-gap, 16px)*.875)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image){width:calc(33.33% - var(--wp--style--unstable-gallery-gap, 16px)*.66667)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2),.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:nth-last-child(2)~figure.wp-block-image:not(#individual-image){width:calc(50% - var(--wp--style--unstable-gallery-gap, 16px)*.5)}.wp-block-gallery.has-nested-images.columns-default figure.wp-block-image:not(#individual-image):first-child:last-child{width:100%}}.wp-block-gallery.has-nested-images.alignleft,.wp-block-gallery.has-nested-images.alignright{max-width:420px;width:100%}.wp-block-gallery.has-nested-images.aligncenter{justify-content:center}.wp-block-group{box-sizing:border-box}:where(.wp-block-group.wp-block-group-is-layout-constrained){position:relative}h1.has-background,h2.has-background,h3.has-background,h4.has-background,h5.has-background,h6.has-background{padding:1.25em 2.375em}h1.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h1.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h2.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h2.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h3.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h3.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h4.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h4.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h5.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h5.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]),h6.has-text-align-left[style*=writing-mode]:where([style*=vertical-lr]),h6.has-text-align-right[style*=writing-mode]:where([style*=vertical-rl]){rotate:180deg}.wp-block-image a{display:inline-block}.wp-block-image img{box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom}@media (prefers-reduced-motion:no-preference){.wp-block-image img.hide{visibility:hidden}.wp-block-image img.show{animation:show-content-image .4s}}.wp-block-image[style*=border-radius] img,.wp-block-image[style*=border-radius]>a{border-radius:inherit}.wp-block-image.has-custom-border img{box-sizing:border-box}.wp-block-image.aligncenter{text-align:center}.wp-block-image.alignfull a,.wp-block-image.alignwide a{width:100%}.wp-block-image.alignfull img,.wp-block-image.alignwide img{height:auto;width:100%}.wp-block-image .aligncenter,.wp-block-image .alignleft,.wp-block-image .alignright,.wp-block-image.aligncenter,.wp-block-image.alignleft,.wp-block-image.alignright{display:table}.wp-block-image .aligncenter>figcaption,.wp-block-image .alignleft>figcaption,.wp-block-image .alignright>figcaption,.wp-block-image.aligncenter>figcaption,.wp-block-image.alignleft>figcaption,.wp-block-image.alignright>figcaption{caption-side:bottom;display:table-caption}.wp-block-image .alignleft{float:left;margin:.5em 1em .5em 0}.wp-block-image .alignright{float:right;margin:.5em 0 .5em 1em}.wp-block-image .aligncenter{margin-left:auto;margin-right:auto}.wp-block-image :where(figcaption){margin-bottom:1em;margin-top:.5em}.wp-block-image.is-style-circle-mask img{border-radius:9999px}@supports ((-webkit-mask-image:none) or (mask-image:none)) or (-webkit-mask-image:none){.wp-block-image.is-style-circle-mask img{border-radius:0;-webkit-mask-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');mask-image:url('data:image/svg+xml;utf8,<svg viewBox="0 0 100 100" xmlns="http://www.w3.org/2000/svg"><circle cx="50" cy="50" r="50"/></svg>');mask-mode:alpha;-webkit-mask-position:center;mask-position:center;-webkit-mask-repeat:no-repeat;mask-repeat:no-repeat;-webkit-mask-size:contain;mask-size:contain}}:root :where(.wp-block-image.is-style-rounded img,.wp-block-image .is-style-rounded img){border-radius:9999px}.wp-block-image figure{margin:0}.wp-lightbox-container{display:flex;flex-direction:column;position:relative}.wp-lightbox-container img{cursor:zoom-in}.wp-lightbox-container img:hover+button{opacity:1}.wp-lightbox-container button{align-items:center;-webkit-backdrop-filter:blur(16px) saturate(180%);backdrop-filter:blur(16px) saturate(180%);background-color:#5a5a5a40;border:none;border-radius:4px;cursor:zoom-in;display:flex;height:20px;justify-content:center;opacity:0;padding:0;position:absolute;right:16px;text-align:center;top:16px;transition:opacity .2s ease;width:20px;z-index:100}.wp-lightbox-container button:focus-visible{outline:3px auto #5a5a5a40;outline:3px auto -webkit-focus-ring-color;outline-offset:3px}.wp-lightbox-container button:hover{cursor:pointer;opacity:1}.wp-lightbox-container button:focus{opacity:1}.wp-lightbox-container button:focus,.wp-lightbox-container button:hover,.wp-lightbox-container button:not(:hover):not(:active):not(.has-background){background-color:#5a5a5a40;border:none}.wp-lightbox-overlay{box-sizing:border-box;cursor:zoom-out;height:100vh;left:0;overflow:hidden;position:fixed;top:0;visibility:hidden;width:100%;z-index:100000}.wp-lightbox-overlay .close-button{align-items:center;cursor:pointer;display:flex;justify-content:center;min-height:40px;min-width:40px;padding:0;position:absolute;right:calc(env(safe-area-inset-right) + 16px);top:calc(env(safe-area-inset-top) + 16px);z-index:5000000}.wp-lightbox-overlay .close-button:focus,.wp-lightbox-overlay .close-button:hover,.wp-lightbox-overlay .close-button:not(:hover):not(:active):not(.has-background){background:none;border:none}.wp-lightbox-overlay .lightbox-image-container{height:var(--wp--lightbox-container-height);left:50%;overflow:hidden;position:absolute;top:50%;transform:translate(-50%,-50%);transform-origin:top left;width:var(--wp--lightbox-container-width);z-index:9999999999}.wp-lightbox-overlay .wp-block-image{align-items:center;box-sizing:border-box;display:flex;height:100%;justify-content:center;margin:0;position:relative;transform-origin:0 0;width:100%;z-index:3000000}.wp-lightbox-overlay .wp-block-image img{height:var(--wp--lightbox-image-height);min-height:var(--wp--lightbox-image-height);min-width:var(--wp--lightbox-image-width);width:var(--wp--lightbox-image-width)}.wp-lightbox-overlay .wp-block-image figcaption{display:none}.wp-lightbox-overlay button{background:none;border:none}.wp-lightbox-overlay .scrim{background-color:#fff;height:100%;opacity:.9;position:absolute;width:100%;z-index:2000000}.wp-lightbox-overlay.active{animation:turn-on-visibility .25s both;visibility:visible}.wp-lightbox-overlay.active img{animation:turn-on-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active){animation:turn-off-visibility .35s both}.wp-lightbox-overlay.show-closing-animation:not(.active) img{animation:turn-off-visibility .25s both}@media (prefers-reduced-motion:no-preference){.wp-lightbox-overlay.zoom.active{animation:none;opacity:1;visibility:visible}.wp-lightbox-overlay.zoom.active .lightbox-image-container{animation:lightbox-zoom-in .4s}.wp-lightbox-overlay.zoom.active .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.active .scrim{animation:turn-on-visibility .4s forwards}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active){animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container{animation:lightbox-zoom-out .4s}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .lightbox-image-container img{animation:none}.wp-lightbox-overlay.zoom.show-closing-animation:not(.active) .scrim{animation:turn-off-visibility .4s forwards}}@keyframes show-content-image{0%{visibility:hidden}99%{visibility:hidden}to{visibility:visible}}@keyframes turn-on-visibility{0%{opacity:0}to{opacity:1}}@keyframes turn-off-visibility{0%{opacity:1;visibility:visible}99%{opacity:0;visibility:visible}to{opacity:0;visibility:hidden}}@keyframes lightbox-zoom-in{0%{transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale))}to{transform:translate(-50%,-50%) scale(1)}}@keyframes lightbox-zoom-out{0%{transform:translate(-50%,-50%) scale(1);visibility:visible}99%{visibility:visible}to{transform:translate(calc((-100vw + var(--wp--lightbox-scrollbar-width))/2 + var(--wp--lightbox-initial-left-position)),calc(-50vh + var(--wp--lightbox-initial-top-position))) scale(var(--wp--lightbox-scale));visibility:hidden}}ol.wp-block-latest-comments{box-sizing:border-box;margin-left:0}:where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment)){line-height:1.1}:where(.wp-block-latest-comments:not([style*=line-height] .wp-block-latest-comments__comment-excerpt p)){line-height:1.8}.has-dates :where(.wp-block-latest-comments:not([style*=line-height])),.has-excerpts :where(.wp-block-latest-comments:not([style*=line-height])){line-height:1.5}.wp-block-latest-comments .wp-block-latest-comments{padding-left:0}.wp-block-latest-comments__comment{list-style:none;margin-bottom:1em}.has-avatars .wp-block-latest-comments__comment{list-style:none;min-height:2.25em}.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-excerpt,.has-avatars .wp-block-latest-comments__comment .wp-block-latest-comments__comment-meta{margin-left:3.25em}.wp-block-latest-comments__comment-excerpt p{font-size:.875em;margin:.36em 0 1.4em}.wp-block-latest-comments__comment-date{display:block;font-size:.75em}.wp-block-latest-comments .avatar,.wp-block-latest-comments__comment-avatar{border-radius:1.5em;display:block;float:left;height:2.5em;margin-right:.75em;width:2.5em}.wp-block-latest-comments[class*=-font-size] a,.wp-block-latest-comments[style*=font-size] a{font-size:inherit}.wp-block-latest-posts{box-sizing:border-box}.wp-block-latest-posts.alignleft{margin-right:2em}.wp-block-latest-posts.alignright{margin-left:2em}.wp-block-latest-posts.wp-block-latest-posts__list{list-style:none}.wp-block-latest-posts.wp-block-latest-posts__list li{clear:both;overflow-wrap:break-word}.wp-block-latest-posts.is-grid{display:flex;flex-wrap:wrap}.wp-block-latest-posts.is-grid li{margin:0 1.25em 1.25em 0;width:100%}@media (min-width:600px){.wp-block-latest-posts.columns-2 li{width:calc(50% - .625em)}.wp-block-latest-posts.columns-2 li:nth-child(2n){margin-right:0}.wp-block-latest-posts.columns-3 li{width:calc(33.33333% - .83333em)}.wp-block-latest-posts.columns-3 li:nth-child(3n){margin-right:0}.wp-block-latest-posts.columns-4 li{width:calc(25% - .9375em)}.wp-block-latest-posts.columns-4 li:nth-child(4n){margin-right:0}.wp-block-latest-posts.columns-5 li{width:calc(20% - 1em)}.wp-block-latest-posts.columns-5 li:nth-child(5n){margin-right:0}.wp-block-latest-posts.columns-6 li{width:calc(16.66667% - 1.04167em)}.wp-block-latest-posts.columns-6 li:nth-child(6n){margin-right:0}}:root :where(.wp-block-latest-posts.is-grid){padding:0}:root :where(.wp-block-latest-posts.wp-block-latest-posts__list){padding-left:0}.wp-block-latest-posts__post-author,.wp-block-latest-posts__post-date{display:block;font-size:.8125em}.wp-block-latest-posts__post-excerpt{margin-bottom:1em;margin-top:.5em}.wp-block-latest-posts__featured-image a{display:inline-block}.wp-block-latest-posts__featured-image img{height:auto;max-width:100%;width:auto}.wp-block-latest-posts__featured-image.alignleft{float:left;margin-right:1em}.wp-block-latest-posts__featured-image.alignright{float:right;margin-left:1em}.wp-block-latest-posts__featured-image.aligncenter{margin-bottom:1em;text-align:center}ol,ul{box-sizing:border-box}:root :where(.wp-block-list.has-background){padding:1.25em 2.375em}.wp-block-loginout,.wp-block-media-text{box-sizing:border-box}.wp-block-media-text{ /*!rtl:begin:ignore*/direction:ltr; /*!rtl:end:ignore*/display:grid;grid-template-columns:50% 1fr;grid-template-rows:auto}.wp-block-media-text.has-media-on-the-right{grid-template-columns:1fr 50%}.wp-block-media-text.is-vertically-aligned-top>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-top>.wp-block-media-text__media{align-self:start}.wp-block-media-text.is-vertically-aligned-center>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-center>.wp-block-media-text__media,.wp-block-media-text>.wp-block-media-text__content,.wp-block-media-text>.wp-block-media-text__media{align-self:center}.wp-block-media-text.is-vertically-aligned-bottom>.wp-block-media-text__content,.wp-block-media-text.is-vertically-aligned-bottom>.wp-block-media-text__media{align-self:end}.wp-block-media-text>.wp-block-media-text__media{ /*!rtl:begin:ignore*/grid-column:1;grid-row:1; /*!rtl:end:ignore*/margin:0}.wp-block-media-text>.wp-block-media-text__content{direction:ltr; /*!rtl:begin:ignore*/grid-column:2;grid-row:1; /*!rtl:end:ignore*/padding:0 8%;word-break:break-word}.wp-block-media-text.has-media-on-the-right>.wp-block-media-text__media{ /*!rtl:begin:ignore*/grid-column:2;grid-row:1 /*!rtl:end:ignore*/}.wp-block-media-text.has-media-on-the-right>.wp-block-media-text__content{ /*!rtl:begin:ignore*/grid-column:1;grid-row:1 /*!rtl:end:ignore*/}.wp-block-media-text__media a{display:inline-block}.wp-block-media-text__media img,.wp-block-media-text__media video{height:auto;max-width:unset;vertical-align:middle;width:100%}.wp-block-media-text.is-image-fill>.wp-block-media-text__media{background-size:cover;height:100%;min-height:250px}.wp-block-media-text.is-image-fill>.wp-block-media-text__media>a{display:block;height:100%}.wp-block-media-text.is-image-fill>.wp-block-media-text__media img{height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;clip:rect(0,0,0,0);border:0}.wp-block-media-text.is-image-fill-element>.wp-block-media-text__media{height:100%;min-height:250px;position:relative}.wp-block-media-text.is-image-fill-element>.wp-block-media-text__media>a{display:block;height:100%}.wp-block-media-text.is-image-fill-element>.wp-block-media-text__media img{height:100%;object-fit:cover;position:absolute;width:100%}@media (max-width:600px){.wp-block-media-text.is-stacked-on-mobile{grid-template-columns:100%!important}.wp-block-media-text.is-stacked-on-mobile>.wp-block-media-text__media{grid-column:1;grid-row:1}.wp-block-media-text.is-stacked-on-mobile>.wp-block-media-text__content{grid-column:1;grid-row:2}}.wp-block-navigation{position:relative;--navigation-layout-justification-setting:flex-start;--navigation-layout-direction:row;--navigation-layout-wrap:wrap;--navigation-layout-justify:flex-start;--navigation-layout-align:center}.wp-block-navigation ul{margin-bottom:0;margin-left:0;margin-top:0;padding-left:0}.wp-block-navigation ul,.wp-block-navigation ul li{list-style:none;padding:0}.wp-block-navigation .wp-block-navigation-item{align-items:center;display:flex;position:relative}.wp-block-navigation .wp-block-navigation-item .wp-block-navigation__submenu-container:empty{display:none}.wp-block-navigation .wp-block-navigation-item__content{display:block}.wp-block-navigation .wp-block-navigation-item__content.wp-block-navigation-item__content{color:inherit}.wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content,.wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:active,.wp-block-navigation.has-text-decoration-underline .wp-block-navigation-item__content:focus{text-decoration:underline}.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content,.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:active,.wp-block-navigation.has-text-decoration-line-through .wp-block-navigation-item__content:focus{text-decoration:line-through}.wp-block-navigation :where(a),.wp-block-navigation :where(a:active),.wp-block-navigation :where(a:focus){text-decoration:none}.wp-block-navigation .wp-block-navigation__submenu-icon{align-self:center;background-color:inherit;border:none;color:currentColor;display:inline-block;font-size:inherit;height:.6em;line-height:0;margin-left:.25em;padding:0;width:.6em}.wp-block-navigation .wp-block-navigation__submenu-icon svg{display:inline-block;stroke:currentColor;height:inherit;margin-top:.075em;width:inherit}.wp-block-navigation.is-vertical{--navigation-layout-direction:column;--navigation-layout-justify:initial;--navigation-layout-align:flex-start}.wp-block-navigation.no-wrap{--navigation-layout-wrap:nowrap}.wp-block-navigation.items-justified-center{--navigation-layout-justification-setting:center;--navigation-layout-justify:center}.wp-block-navigation.items-justified-center.is-vertical{--navigation-layout-align:center}.wp-block-navigation.items-justified-right{--navigation-layout-justification-setting:flex-end;--navigation-layout-justify:flex-end}.wp-block-navigation.items-justified-right.is-vertical{--navigation-layout-align:flex-end}.wp-block-navigation.items-justified-space-between{--navigation-layout-justification-setting:space-between;--navigation-layout-justify:space-between}.wp-block-navigation .has-child .wp-block-navigation__submenu-container{align-items:normal;background-color:inherit;color:inherit;display:flex;flex-direction:column;height:0;left:-1px;opacity:0;overflow:hidden;position:absolute;top:100%;transition:opacity .1s linear;visibility:hidden;width:0;z-index:2}.wp-block-navigation .has-child .wp-block-navigation__submenu-container>.wp-block-navigation-item>.wp-block-navigation-item__content{display:flex;flex-grow:1}.wp-block-navigation .has-child .wp-block-navigation__submenu-container>.wp-block-navigation-item>.wp-block-navigation-item__content .wp-block-navigation__submenu-icon{margin-left:auto;margin-right:0}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item__content{margin:0}@media (min-width:782px){.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{left:100%;top:-1px}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container:before{background:#0000;content:"";display:block;height:100%;position:absolute;right:100%;width:.5em}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon{margin-right:.25em}.wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-icon svg{transform:rotate(-90deg)}}.wp-block-navigation .has-child .wp-block-navigation-submenu__toggle[aria-expanded=true]~.wp-block-navigation__submenu-container,.wp-block-navigation .has-child:not(.open-on-click):hover>.wp-block-navigation__submenu-container,.wp-block-navigation .has-child:not(.open-on-click):not(.open-on-hover-click):focus-within>.wp-block-navigation__submenu-container{height:auto;min-width:200px;opacity:1;overflow:visible;visibility:visible;width:auto}.wp-block-navigation.has-background .has-child .wp-block-navigation__submenu-container{left:0;top:100%}@media (min-width:782px){.wp-block-navigation.has-background .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{left:100%;top:0}}.wp-block-navigation-submenu{display:flex;position:relative}.wp-block-navigation-submenu .wp-block-navigation__submenu-icon svg{stroke:currentColor}button.wp-block-navigation-item__content{background-color:initial;border:none;color:currentColor;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-align:left;text-transform:inherit}.wp-block-navigation-submenu__toggle{cursor:pointer}.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle{padding-left:0;padding-right:.85em}.wp-block-navigation-item.open-on-click .wp-block-navigation-submenu__toggle+.wp-block-navigation__submenu-icon{margin-left:-.6em;pointer-events:none}.wp-block-navigation-item.open-on-click button.wp-block-navigation-item__content:not(.wp-block-navigation-submenu__toggle){padding:0}.wp-block-navigation .wp-block-page-list,.wp-block-navigation__container,.wp-block-navigation__responsive-close,.wp-block-navigation__responsive-container,.wp-block-navigation__responsive-container-content,.wp-block-navigation__responsive-dialog{gap:inherit}:where(.wp-block-navigation.has-background .wp-block-navigation-item a:not(.wp-element-button)),:where(.wp-block-navigation.has-background .wp-block-navigation-submenu a:not(.wp-element-button)){padding:.5em 1em}:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-item a:not(.wp-element-button)),:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-submenu a:not(.wp-element-button)),:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-navigation-submenu button.wp-block-navigation-item__content),:where(.wp-block-navigation .wp-block-navigation__submenu-container .wp-block-pages-list__item button.wp-block-navigation-item__content){padding:.5em 1em}.wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-right .wp-block-page-list>.has-child .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between .wp-block-page-list>.has-child:last-child .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between>.wp-block-navigation__container>.has-child:last-child .wp-block-navigation__submenu-container{left:auto;right:0}.wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-right .wp-block-page-list>.has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between .wp-block-page-list>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between>.wp-block-navigation__container>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{left:-1px;right:-1px}@media (min-width:782px){.wp-block-navigation.items-justified-right .wp-block-navigation__container .has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-right .wp-block-page-list>.has-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between .wp-block-page-list>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container,.wp-block-navigation.items-justified-space-between>.wp-block-navigation__container>.has-child:last-child .wp-block-navigation__submenu-container .wp-block-navigation__submenu-container{left:auto;right:100%}}.wp-block-navigation:not(.has-background) .wp-block-navigation__submenu-container{background-color:#fff;border:1px solid #00000026}.wp-block-navigation.has-background .wp-block-navigation__submenu-container{background-color:inherit}.wp-block-navigation:not(.has-text-color) .wp-block-navigation__submenu-container{color:#000}.wp-block-navigation__container{align-items:var(--navigation-layout-align,initial);display:flex;flex-direction:var(--navigation-layout-direction,initial);flex-wrap:var(--navigation-layout-wrap,wrap);justify-content:var(--navigation-layout-justify,initial);list-style:none;margin:0;padding-left:0}.wp-block-navigation__container .is-responsive{display:none}.wp-block-navigation__container:only-child,.wp-block-page-list:only-child{flex-grow:1}@keyframes overlay-menu__fade-in-animation{0%{opacity:0;transform:translateY(.5em)}to{opacity:1;transform:translateY(0)}}.wp-block-navigation__responsive-container{bottom:0;display:none;left:0;position:fixed;right:0;top:0}.wp-block-navigation__responsive-container :where(.wp-block-navigation-item a){color:inherit}.wp-block-navigation__responsive-container .wp-block-navigation__responsive-container-content{align-items:var(--navigation-layout-align,initial);display:flex;flex-direction:var(--navigation-layout-direction,initial);flex-wrap:var(--navigation-layout-wrap,wrap);justify-content:var(--navigation-layout-justify,initial)}.wp-block-navigation__responsive-container:not(.is-menu-open.is-menu-open){background-color:inherit!important;color:inherit!important}.wp-block-navigation__responsive-container.is-menu-open{animation:overlay-menu__fade-in-animation .1s ease-out;animation-fill-mode:forwards;background-color:inherit;display:flex;flex-direction:column;overflow:auto;padding:clamp(1rem,var(--wp--style--root--padding-top),20rem) clamp(1rem,var(--wp--style--root--padding-right),20rem) clamp(1rem,var(--wp--style--root--padding-bottom),20rem) clamp(1rem,var(--wp--style--root--padding-left),20em);z-index:100000}@media (prefers-reduced-motion:reduce){.wp-block-navigation__responsive-container.is-menu-open{animation-delay:0s;animation-duration:1ms}}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content{align-items:var(--navigation-layout-justification-setting,inherit);display:flex;flex-direction:column;flex-wrap:nowrap;overflow:visible;padding-top:calc(2rem + 24px)}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list{justify-content:flex-start}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-icon{display:none}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .has-child .wp-block-navigation__submenu-container{border:none;height:auto;min-width:200px;opacity:1;overflow:initial;padding-left:2rem;padding-right:2rem;position:static;visibility:visible;width:auto}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container{gap:inherit}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__submenu-container{padding-top:var(--wp--style--block-gap,2em)}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item__content{padding:0}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation-item,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__responsive-container-content .wp-block-page-list{align-items:var(--navigation-layout-justification-setting,initial);display:flex;flex-direction:column}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation-item .wp-block-navigation__submenu-container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__container,.wp-block-navigation__responsive-container.is-menu-open .wp-block-page-list{background:#0000!important;color:inherit!important}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{left:auto;right:auto}@media (min-width:600px){.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open){background-color:inherit;display:block;position:relative;width:100%;z-index:auto}.wp-block-navigation__responsive-container:not(.hidden-by-default):not(.is-menu-open) .wp-block-navigation__responsive-container-close{display:none}.wp-block-navigation__responsive-container.is-menu-open .wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container.wp-block-navigation__submenu-container{left:0}}.wp-block-navigation:not(.has-background) .wp-block-navigation__responsive-container.is-menu-open{background-color:#fff}.wp-block-navigation:not(.has-text-color) .wp-block-navigation__responsive-container.is-menu-open{color:#000}.wp-block-navigation__toggle_button_label{font-size:1rem;font-weight:700}.wp-block-navigation__responsive-container-close,.wp-block-navigation__responsive-container-open{background:#0000;border:none;color:currentColor;cursor:pointer;margin:0;padding:0;text-transform:inherit;vertical-align:middle}.wp-block-navigation__responsive-container-close svg,.wp-block-navigation__responsive-container-open svg{fill:currentColor;display:block;height:24px;pointer-events:none;width:24px}.wp-block-navigation__responsive-container-open{display:flex}.wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open.wp-block-navigation__responsive-container-open{font-family:inherit;font-size:inherit;font-weight:inherit}@media (min-width:600px){.wp-block-navigation__responsive-container-open:not(.always-shown){display:none}}.wp-block-navigation__responsive-container-close{position:absolute;right:0;top:0;z-index:2}.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close.wp-block-navigation__responsive-container-close{font-family:inherit;font-size:inherit;font-weight:inherit}.wp-block-navigation__responsive-close{width:100%}.has-modal-open .wp-block-navigation__responsive-close{margin-left:auto;margin-right:auto;max-width:var(--wp--style--global--wide-size,100%)}.wp-block-navigation__responsive-close:focus{outline:none}.is-menu-open .wp-block-navigation__responsive-close,.is-menu-open .wp-block-navigation__responsive-container-content,.is-menu-open .wp-block-navigation__responsive-dialog{box-sizing:border-box}.wp-block-navigation__responsive-dialog{position:relative}.has-modal-open .admin-bar .is-menu-open .wp-block-navigation__responsive-dialog{margin-top:46px}@media (min-width:782px){.has-modal-open .admin-bar .is-menu-open .wp-block-navigation__responsive-dialog{margin-top:32px}}html.has-modal-open{overflow:hidden}.wp-block-navigation .wp-block-navigation-item__label{overflow-wrap:break-word}.wp-block-navigation .wp-block-navigation-item__description{display:none}.link-ui-tools{border-top:1px solid #f0f0f0;padding:8px}.link-ui-block-inserter{padding-top:8px}.link-ui-block-inserter__back{margin-left:8px;text-transform:uppercase}.wp-block-navigation .wp-block-page-list{align-items:var(--navigation-layout-align,initial);background-color:inherit;display:flex;flex-direction:var(--navigation-layout-direction,initial);flex-wrap:var(--navigation-layout-wrap,wrap);justify-content:var(--navigation-layout-justify,initial)}.wp-block-navigation .wp-block-navigation-item{background-color:inherit}.is-small-text{font-size:.875em}.is-regular-text{font-size:1em}.is-large-text{font-size:2.25em}.is-larger-text{font-size:3em}.has-drop-cap:not(:focus):first-letter{float:left;font-size:8.4em;font-style:normal;font-weight:100;line-height:.68;margin:.05em .1em 0 0;text-transform:uppercase}body.rtl .has-drop-cap:not(:focus):first-letter{float:none;margin-left:.1em}p.has-drop-cap.has-background{overflow:hidden}:root :where(p.has-background){padding:1.25em 2.375em}:where(p.has-text-color:not(.has-link-color)) a{color:inherit}p.has-text-align-left[style*="writing-mode:vertical-lr"],p.has-text-align-right[style*="writing-mode:vertical-rl"]{rotate:180deg}.wp-block-post-author{box-sizing:border-box;display:flex;flex-wrap:wrap}.wp-block-post-author__byline{font-size:.5em;margin-bottom:0;margin-top:0;width:100%}.wp-block-post-author__avatar{margin-right:1em}.wp-block-post-author__bio{font-size:.7em;margin-bottom:.7em}.wp-block-post-author__content{flex-basis:0;flex-grow:1}.wp-block-post-author__name{margin:0}.wp-block-post-author-biography{box-sizing:border-box}:where(.wp-block-post-comments-form) input:not([type=submit]),:where(.wp-block-post-comments-form) textarea{border:1px solid #949494;font-family:inherit;font-size:1em}:where(.wp-block-post-comments-form) input:where(:not([type=submit]):not([type=checkbox])),:where(.wp-block-post-comments-form) textarea{padding:calc(.667em + 2px)}.wp-block-post-comments-form{box-sizing:border-box}.wp-block-post-comments-form[style*=font-weight] :where(.comment-reply-title){font-weight:inherit}.wp-block-post-comments-form[style*=font-family] :where(.comment-reply-title){font-family:inherit}.wp-block-post-comments-form[class*=-font-size] :where(.comment-reply-title),.wp-block-post-comments-form[style*=font-size] :where(.comment-reply-title){font-size:inherit}.wp-block-post-comments-form[style*=line-height] :where(.comment-reply-title){line-height:inherit}.wp-block-post-comments-form[style*=font-style] :where(.comment-reply-title){font-style:inherit}.wp-block-post-comments-form[style*=letter-spacing] :where(.comment-reply-title){letter-spacing:inherit}.wp-block-post-comments-form :where(input[type=submit]){box-shadow:none;cursor:pointer;display:inline-block;overflow-wrap:break-word;text-align:center}.wp-block-post-comments-form .comment-form input:not([type=submit]):not([type=checkbox]):not([type=hidden]),.wp-block-post-comments-form .comment-form textarea{box-sizing:border-box;display:block;width:100%}.wp-block-post-comments-form .comment-form-author label,.wp-block-post-comments-form .comment-form-email label,.wp-block-post-comments-form .comment-form-url label{display:block;margin-bottom:.25em}.wp-block-post-comments-form .comment-form-cookies-consent{display:flex;gap:.25em}.wp-block-post-comments-form .comment-form-cookies-consent #wp-comment-cookies-consent{margin-top:.35em}.wp-block-post-comments-form .comment-reply-title{margin-bottom:0}.wp-block-post-comments-form .comment-reply-title :where(small){font-size:var(--wp--preset--font-size--medium,smaller);margin-left:.5em}.wp-block-post-content{display:flow-root}.wp-block-post-date{box-sizing:border-box}:where(.wp-block-post-excerpt){box-sizing:border-box;margin-bottom:var(--wp--style--block-gap);margin-top:var(--wp--style--block-gap)}.wp-block-post-excerpt__excerpt{margin-bottom:0;margin-top:0}.wp-block-post-excerpt__more-text{margin-bottom:0;margin-top:var(--wp--style--block-gap)}.wp-block-post-excerpt__more-link{display:inline-block}.wp-block-post-featured-image{margin-left:0;margin-right:0}.wp-block-post-featured-image a{display:block;height:100%}.wp-block-post-featured-image :where(img){box-sizing:border-box;height:auto;max-width:100%;vertical-align:bottom;width:100%}.wp-block-post-featured-image.alignfull img,.wp-block-post-featured-image.alignwide img{width:100%}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim{background-color:#000;inset:0;position:absolute}.wp-block-post-featured-image{position:relative}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-gradient{background-color:initial}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-0{opacity:0}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-10{opacity:.1}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-20{opacity:.2}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-30{opacity:.3}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-40{opacity:.4}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-50{opacity:.5}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-60{opacity:.6}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-70{opacity:.7}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-80{opacity:.8}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-90{opacity:.9}.wp-block-post-featured-image .wp-block-post-featured-image__overlay.has-background-dim-100{opacity:1}.wp-block-post-featured-image:where(.alignleft,.alignright){width:100%}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous{display:inline-block;margin-right:1ch}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-previous:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next{display:inline-block;margin-left:1ch}.wp-block-post-navigation-link .wp-block-post-navigation-link__arrow-next:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-post-navigation-link.has-text-align-left[style*="writing-mode: vertical-lr"],.wp-block-post-navigation-link.has-text-align-right[style*="writing-mode: vertical-rl"]{rotate:180deg}.wp-block-post-terms{box-sizing:border-box}.wp-block-post-terms .wp-block-post-terms__separator{white-space:pre-wrap}.wp-block-post-time-to-read,.wp-block-post-title{box-sizing:border-box}.wp-block-post-title{word-break:break-word}.wp-block-post-title :where(a){display:inline-block;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit}.wp-block-post-author-name{box-sizing:border-box}.wp-block-preformatted{box-sizing:border-box;white-space:pre-wrap}:where(.wp-block-preformatted.has-background){padding:1.25em 2.375em}.wp-block-pullquote{box-sizing:border-box;margin:0 0 1em;overflow-wrap:break-word;padding:4em 0;text-align:center}.wp-block-pullquote blockquote,.wp-block-pullquote cite,.wp-block-pullquote p{color:inherit}.wp-block-pullquote blockquote{margin:0}.wp-block-pullquote p{margin-top:0}.wp-block-pullquote p:last-child{margin-bottom:0}.wp-block-pullquote.alignleft,.wp-block-pullquote.alignright{max-width:420px}.wp-block-pullquote cite,.wp-block-pullquote footer{position:relative}.wp-block-pullquote .has-text-color a{color:inherit}.wp-block-pullquote.has-text-align-left blockquote{text-align:left}.wp-block-pullquote.has-text-align-right blockquote{text-align:right}.wp-block-pullquote.is-style-solid-color{border:none}.wp-block-pullquote.is-style-solid-color blockquote{margin-left:auto;margin-right:auto;max-width:60%}.wp-block-pullquote.is-style-solid-color blockquote p{font-size:2em;margin-bottom:0;margin-top:0}.wp-block-pullquote.is-style-solid-color blockquote cite{font-style:normal;text-transform:none}.wp-block-pullquote cite{color:inherit}.wp-block-post-template{list-style:none;margin-bottom:0;margin-top:0;max-width:100%;padding:0}.wp-block-post-template.is-flex-container{display:flex;flex-direction:row;flex-wrap:wrap;gap:1.25em}.wp-block-post-template.is-flex-container>li{margin:0;width:100%}@media (min-width:600px){.wp-block-post-template.is-flex-container.is-flex-container.columns-2>li{width:calc(50% - .625em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-3>li{width:calc(33.33333% - .83333em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-4>li{width:calc(25% - .9375em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-5>li{width:calc(20% - 1em)}.wp-block-post-template.is-flex-container.is-flex-container.columns-6>li{width:calc(16.66667% - 1.04167em)}}@media (max-width:600px){.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid.wp-block-post-template-is-layout-grid{grid-template-columns:1fr}}.wp-block-post-template-is-layout-constrained>li>.alignright,.wp-block-post-template-is-layout-flow>li>.alignright{float:right;margin-inline-end:0;margin-inline-start:2em}.wp-block-post-template-is-layout-constrained>li>.alignleft,.wp-block-post-template-is-layout-flow>li>.alignleft{float:left;margin-inline-end:2em;margin-inline-start:0}.wp-block-post-template-is-layout-constrained>li>.aligncenter,.wp-block-post-template-is-layout-flow>li>.aligncenter{margin-inline-end:auto;margin-inline-start:auto}.wp-block-query-pagination.is-content-justification-space-between>.wp-block-query-pagination-next:last-of-type{margin-inline-start:auto}.wp-block-query-pagination.is-content-justification-space-between>.wp-block-query-pagination-previous:first-child{margin-inline-end:auto}.wp-block-query-pagination .wp-block-query-pagination-previous-arrow{display:inline-block;margin-right:1ch}.wp-block-query-pagination .wp-block-query-pagination-previous-arrow:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-query-pagination .wp-block-query-pagination-next-arrow{display:inline-block;margin-left:1ch}.wp-block-query-pagination .wp-block-query-pagination-next-arrow:not(.is-arrow-chevron){transform:scaleX(1)}.wp-block-query-pagination.aligncenter{justify-content:center}.wp-block-query-title,.wp-block-quote{box-sizing:border-box}.wp-block-quote{overflow-wrap:break-word}.wp-block-quote.is-large:where(:not(.is-style-plain)),.wp-block-quote.is-style-large:where(:not(.is-style-plain)){margin-bottom:1em;padding:0 1em}.wp-block-quote.is-large:where(:not(.is-style-plain)) p,.wp-block-quote.is-style-large:where(:not(.is-style-plain)) p{font-size:1.5em;font-style:italic;line-height:1.6}.wp-block-quote.is-large:where(:not(.is-style-plain)) cite,.wp-block-quote.is-large:where(:not(.is-style-plain)) footer,.wp-block-quote.is-style-large:where(:not(.is-style-plain)) cite,.wp-block-quote.is-style-large:where(:not(.is-style-plain)) footer{font-size:1.125em;text-align:right}.wp-block-quote>cite{display:block}.wp-block-read-more{display:block;width:-moz-fit-content;width:fit-content}.wp-block-read-more:where(:not([style*=text-decoration])){text-decoration:none}.wp-block-read-more:where(:not([style*=text-decoration])):active,.wp-block-read-more:where(:not([style*=text-decoration])):focus{text-decoration:none}ul.wp-block-rss{list-style:none;padding:0}ul.wp-block-rss.wp-block-rss{box-sizing:border-box}ul.wp-block-rss.alignleft{margin-right:2em}ul.wp-block-rss.alignright{margin-left:2em}ul.wp-block-rss.is-grid{display:flex;flex-wrap:wrap;list-style:none;padding:0}ul.wp-block-rss.is-grid li{margin:0 1em 1em 0;width:100%}@media (min-width:600px){ul.wp-block-rss.columns-2 li{width:calc(50% - 1em)}ul.wp-block-rss.columns-3 li{width:calc(33.33333% - 1em)}ul.wp-block-rss.columns-4 li{width:calc(25% - 1em)}ul.wp-block-rss.columns-5 li{width:calc(20% - 1em)}ul.wp-block-rss.columns-6 li{width:calc(16.66667% - 1em)}}.wp-block-rss__item-author,.wp-block-rss__item-publish-date{display:block;font-size:.8125em}.wp-block-search__button{margin-left:10px;word-break:normal}.wp-block-search__button.has-icon{line-height:0}.wp-block-search__button svg{height:1.25em;min-height:24px;min-width:24px;width:1.25em;fill:currentColor;vertical-align:text-bottom}:where(.wp-block-search__button){border:1px solid #ccc;padding:6px 10px}.wp-block-search__inside-wrapper{display:flex;flex:auto;flex-wrap:nowrap;max-width:100%}.wp-block-search__label{width:100%}.wp-block-search__input{appearance:none;border:1px solid #949494;flex-grow:1;margin-left:0;margin-right:0;min-width:3rem;padding:8px;text-decoration:unset!important}.wp-block-search.wp-block-search__button-only .wp-block-search__button{flex-shrink:0;margin-left:0;max-width:100%}.wp-block-search.wp-block-search__button-only .wp-block-search__button[aria-expanded=true]{max-width:calc(100% - 100px)}.wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{min-width:0!important;transition-property:width}.wp-block-search.wp-block-search__button-only .wp-block-search__input{flex-basis:100%;transition-duration:.3s}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden,.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__inside-wrapper{overflow:hidden}.wp-block-search.wp-block-search__button-only.wp-block-search__searchfield-hidden .wp-block-search__input{border-left-width:0!important;border-right-width:0!important;flex-basis:0;flex-grow:0;margin:0;min-width:0!important;padding-left:0!important;padding-right:0!important;width:0!important}:where(.wp-block-search__input){font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-transform:inherit}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper){border:1px solid #949494;box-sizing:border-box;padding:4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input{border:none;border-radius:0;padding:0 4px}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) .wp-block-search__input:focus{outline:none}:where(.wp-block-search__button-inside .wp-block-search__inside-wrapper) :where(.wp-block-search__button){padding:4px 8px}.wp-block-search.aligncenter .wp-block-search__inside-wrapper{margin:auto}.wp-block[data-align=right] .wp-block-search.wp-block-search__button-only .wp-block-search__inside-wrapper{float:right}.wp-block-separator{border:none;border-top:2px solid}:root :where(.wp-block-separator.is-style-dots){height:auto;line-height:1;text-align:center}:root :where(.wp-block-separator.is-style-dots):before{color:currentColor;content:"···";font-family:serif;font-size:1.5em;letter-spacing:2em;padding-left:2em}.wp-block-separator.is-style-dots{background:none!important;border:none!important}.wp-block-site-logo{box-sizing:border-box;line-height:0}.wp-block-site-logo a{display:inline-block;line-height:0}.wp-block-site-logo.is-default-size img{height:auto;width:120px}.wp-block-site-logo img{height:auto;max-width:100%}.wp-block-site-logo a,.wp-block-site-logo img{border-radius:inherit}.wp-block-site-logo.aligncenter{margin-left:auto;margin-right:auto;text-align:center}:root :where(.wp-block-site-logo.is-style-rounded){border-radius:9999px}.wp-block-site-tagline,.wp-block-site-title{box-sizing:border-box}.wp-block-site-title :where(a){color:inherit;font-family:inherit;font-size:inherit;font-style:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;text-decoration:inherit}.wp-block-social-links{background:none;box-sizing:border-box;margin-left:0;padding-left:0;padding-right:0;text-indent:0}.wp-block-social-links .wp-social-link a,.wp-block-social-links .wp-social-link a:hover{border-bottom:0;box-shadow:none;text-decoration:none}.wp-block-social-links .wp-social-link svg{height:1em;width:1em}.wp-block-social-links .wp-social-link span:not(.screen-reader-text){font-size:.65em;margin-left:.5em;margin-right:.5em}.wp-block-social-links.has-small-icon-size{font-size:16px}.wp-block-social-links,.wp-block-social-links.has-normal-icon-size{font-size:24px}.wp-block-social-links.has-large-icon-size{font-size:36px}.wp-block-social-links.has-huge-icon-size{font-size:48px}.wp-block-social-links.aligncenter{display:flex;justify-content:center}.wp-block-social-links.alignright{justify-content:flex-end}.wp-block-social-link{border-radius:9999px;display:block;height:auto;transition:transform .1s ease}@media (prefers-reduced-motion:reduce){.wp-block-social-link{transition-delay:0s;transition-duration:0s}}.wp-block-social-link a{align-items:center;display:flex;line-height:0;transition:transform .1s ease}.wp-block-social-link:hover{transform:scale(1.1)}.wp-block-social-links .wp-block-social-link.wp-social-link{display:inline-block;margin:0;padding:0}.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor svg,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:active,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:hover,.wp-block-social-links .wp-block-social-link.wp-social-link .wp-block-social-link-anchor:visited{color:currentColor;fill:currentColor}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link{background-color:#f0f0f0;color:#444}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-amazon{background-color:#f90;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-bandcamp{background-color:#1ea0c3;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-behance{background-color:#0757fe;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-bluesky{background-color:#0a7aff;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-codepen{background-color:#1e1f26;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-deviantart{background-color:#02e49b;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-dribbble{background-color:#e94c89;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-dropbox{background-color:#4280ff;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-etsy{background-color:#f45800;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-facebook{background-color:#0866ff;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-fivehundredpx{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-flickr{background-color:#0461dd;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-foursquare{background-color:#e65678;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-github{background-color:#24292d;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-goodreads{background-color:#eceadd;color:#382110}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-google{background-color:#ea4434;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-gravatar{background-color:#1d4fc4;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-instagram{background-color:#f00075;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-lastfm{background-color:#e21b24;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-linkedin{background-color:#0d66c2;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-mastodon{background-color:#3288d4;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-medium{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-meetup{background-color:#f6405f;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-patreon{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-pinterest{background-color:#e60122;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-pocket{background-color:#ef4155;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-reddit{background-color:#ff4500;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-skype{background-color:#0478d7;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-snapchat{background-color:#fefc00;color:#fff;stroke:#000}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-soundcloud{background-color:#ff5600;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-spotify{background-color:#1bd760;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-telegram{background-color:#2aabee;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-threads{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-tiktok{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-tumblr{background-color:#011835;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-twitch{background-color:#6440a4;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-twitter{background-color:#1da1f2;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-vimeo{background-color:#1eb7ea;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-vk{background-color:#4680c2;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-wordpress{background-color:#3499cd;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-whatsapp{background-color:#25d366;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-x{background-color:#000;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-yelp{background-color:#d32422;color:#fff}:where(.wp-block-social-links:not(.is-style-logos-only)) .wp-social-link-youtube{background-color:red;color:#fff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link{background:none}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link svg{height:1.25em;width:1.25em}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-amazon{color:#f90}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-bandcamp{color:#1ea0c3}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-behance{color:#0757fe}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-bluesky{color:#0a7aff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-codepen{color:#1e1f26}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-deviantart{color:#02e49b}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-dribbble{color:#e94c89}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-dropbox{color:#4280ff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-etsy{color:#f45800}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-facebook{color:#0866ff}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-fivehundredpx{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-flickr{color:#0461dd}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-foursquare{color:#e65678}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-github{color:#24292d}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-goodreads{color:#382110}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-google{color:#ea4434}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-gravatar{color:#1d4fc4}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-instagram{color:#f00075}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-lastfm{color:#e21b24}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-linkedin{color:#0d66c2}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-mastodon{color:#3288d4}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-medium{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-meetup{color:#f6405f}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-patreon{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-pinterest{color:#e60122}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-pocket{color:#ef4155}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-reddit{color:#ff4500}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-skype{color:#0478d7}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-snapchat{color:#fff;stroke:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-soundcloud{color:#ff5600}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-spotify{color:#1bd760}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-telegram{color:#2aabee}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-threads{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-tiktok{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-tumblr{color:#011835}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-twitch{color:#6440a4}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-twitter{color:#1da1f2}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-vimeo{color:#1eb7ea}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-vk{color:#4680c2}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-whatsapp{color:#25d366}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-wordpress{color:#3499cd}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-x{color:#000}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-yelp{color:#d32422}:where(.wp-block-social-links.is-style-logos-only) .wp-social-link-youtube{color:red}.wp-block-social-links.is-style-pill-shape .wp-social-link{width:auto}:root :where(.wp-block-social-links .wp-social-link a){padding:.25em}:root :where(.wp-block-social-links.is-style-logos-only .wp-social-link a){padding:0}:root :where(.wp-block-social-links.is-style-pill-shape .wp-social-link a){padding-left:.66667em;padding-right:.66667em}.wp-block-social-links:not(.has-icon-color):not(.has-icon-background-color) .wp-social-link-snapchat .wp-block-social-link-label{color:#000}.wp-block-spacer{clear:both}.wp-block-tag-cloud{box-sizing:border-box}.wp-block-tag-cloud.aligncenter{justify-content:center;text-align:center}.wp-block-tag-cloud.alignfull{padding-left:1em;padding-right:1em}.wp-block-tag-cloud a{display:inline-block;margin-right:5px}.wp-block-tag-cloud span{display:inline-block;margin-left:5px;text-decoration:none}:root :where(.wp-block-tag-cloud.is-style-outline){display:flex;flex-wrap:wrap;gap:1ch}:root :where(.wp-block-tag-cloud.is-style-outline a){border:1px solid;font-size:unset!important;margin-right:0;padding:1ch 2ch;text-decoration:none!important}.wp-block-table{overflow-x:auto}.wp-block-table table{border-collapse:collapse;width:100%}.wp-block-table thead{border-bottom:3px solid}.wp-block-table tfoot{border-top:3px solid}.wp-block-table td,.wp-block-table th{border:1px solid;padding:.5em}.wp-block-table .has-fixed-layout{table-layout:fixed;width:100%}.wp-block-table .has-fixed-layout td,.wp-block-table .has-fixed-layout th{word-break:break-word}.wp-block-table.aligncenter,.wp-block-table.alignleft,.wp-block-table.alignright{display:table;width:auto}.wp-block-table.aligncenter td,.wp-block-table.aligncenter th,.wp-block-table.alignleft td,.wp-block-table.alignleft th,.wp-block-table.alignright td,.wp-block-table.alignright th{word-break:break-word}.wp-block-table .has-subtle-light-gray-background-color{background-color:#f3f4f5}.wp-block-table .has-subtle-pale-green-background-color{background-color:#e9fbe5}.wp-block-table .has-subtle-pale-blue-background-color{background-color:#e7f5fe}.wp-block-table .has-subtle-pale-pink-background-color{background-color:#fcf0ef}.wp-block-table.is-style-stripes{background-color:initial;border-bottom:1px solid #f0f0f0;border-collapse:inherit;border-spacing:0}.wp-block-table.is-style-stripes tbody tr:nth-child(odd){background-color:#f0f0f0}.wp-block-table.is-style-stripes.has-subtle-light-gray-background-color tbody tr:nth-child(odd){background-color:#f3f4f5}.wp-block-table.is-style-stripes.has-subtle-pale-green-background-color tbody tr:nth-child(odd){background-color:#e9fbe5}.wp-block-table.is-style-stripes.has-subtle-pale-blue-background-color tbody tr:nth-child(odd){background-color:#e7f5fe}.wp-block-table.is-style-stripes.has-subtle-pale-pink-background-color tbody tr:nth-child(odd){background-color:#fcf0ef}.wp-block-table.is-style-stripes td,.wp-block-table.is-style-stripes th{border-color:#0000}.wp-block-table .has-border-color td,.wp-block-table .has-border-color th,.wp-block-table .has-border-color tr,.wp-block-table .has-border-color>*{border-color:inherit}.wp-block-table table[style*=border-top-color] tr:first-child,.wp-block-table table[style*=border-top-color] tr:first-child td,.wp-block-table table[style*=border-top-color] tr:first-child th,.wp-block-table table[style*=border-top-color]>*,.wp-block-table table[style*=border-top-color]>* td,.wp-block-table table[style*=border-top-color]>* th{border-top-color:inherit}.wp-block-table table[style*=border-top-color] tr:not(:first-child){border-top-color:initial}.wp-block-table table[style*=border-right-color] td:last-child,.wp-block-table table[style*=border-right-color] th,.wp-block-table table[style*=border-right-color] tr,.wp-block-table table[style*=border-right-color]>*{border-right-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:last-child,.wp-block-table table[style*=border-bottom-color] tr:last-child td,.wp-block-table table[style*=border-bottom-color] tr:last-child th,.wp-block-table table[style*=border-bottom-color]>*,.wp-block-table table[style*=border-bottom-color]>* td,.wp-block-table table[style*=border-bottom-color]>* th{border-bottom-color:inherit}.wp-block-table table[style*=border-bottom-color] tr:not(:last-child){border-bottom-color:initial}.wp-block-table table[style*=border-left-color] td:first-child,.wp-block-table table[style*=border-left-color] th,.wp-block-table table[style*=border-left-color] tr,.wp-block-table table[style*=border-left-color]>*{border-left-color:inherit}.wp-block-table table[style*=border-style] td,.wp-block-table table[style*=border-style] th,.wp-block-table table[style*=border-style] tr,.wp-block-table table[style*=border-style]>*{border-style:inherit}.wp-block-table table[style*=border-width] td,.wp-block-table table[style*=border-width] th,.wp-block-table table[style*=border-width] tr,.wp-block-table table[style*=border-width]>*{border-style:inherit;border-width:inherit}:root :where(.wp-block-table-of-contents){box-sizing:border-box}:where(.wp-block-term-description){box-sizing:border-box;margin-bottom:var(--wp--style--block-gap);margin-top:var(--wp--style--block-gap)}.wp-block-term-description p{margin-bottom:0;margin-top:0}.wp-block-text-columns,.wp-block-text-columns.aligncenter{display:flex}.wp-block-text-columns .wp-block-column{margin:0 1em;padding:0}.wp-block-text-columns .wp-block-column:first-child{margin-left:0}.wp-block-text-columns .wp-block-column:last-child{margin-right:0}.wp-block-text-columns.columns-2 .wp-block-column{width:50%}.wp-block-text-columns.columns-3 .wp-block-column{width:33.33333%}.wp-block-text-columns.columns-4 .wp-block-column{width:25%}pre.wp-block-verse{overflow:auto;white-space:pre-wrap}:where(pre.wp-block-verse){font-family:inherit}.wp-block-video{box-sizing:border-box}.wp-block-video video{vertical-align:middle;width:100%}@supports (position:sticky){.wp-block-video [poster]{object-fit:cover}}.wp-block-video.aligncenter{text-align:center}.wp-block-video :where(figcaption){margin-bottom:1em;margin-top:.5em}.editor-styles-wrapper,.entry-content{counter-reset:footnotes}a[data-fn].fn{counter-increment:footnotes;display:inline-flex;font-size:smaller;text-decoration:none;text-indent:-9999999px;vertical-align:super}a[data-fn].fn:after{content:"[" counter(footnotes) "]";float:left;text-indent:0}.wp-element-button{cursor:pointer}:root{--wp--preset--font-size--normal:16px;--wp--preset--font-size--huge:42px}:root .has-very-light-gray-background-color{background-color:#eee}:root .has-very-dark-gray-background-color{background-color:#313131}:root .has-very-light-gray-color{color:#eee}:root .has-very-dark-gray-color{color:#313131}:root .has-vivid-green-cyan-to-vivid-cyan-blue-gradient-background{background:linear-gradient(135deg,#00d084,#0693e3)}:root .has-purple-crush-gradient-background{background:linear-gradient(135deg,#34e2e4,#4721fb 50%,#ab1dfe)}:root .has-hazy-dawn-gradient-background{background:linear-gradient(135deg,#faaca8,#dad0ec)}:root .has-subdued-olive-gradient-background{background:linear-gradient(135deg,#fafae1,#67a671)}:root .has-atomic-cream-gradient-background{background:linear-gradient(135deg,#fdd79a,#004a59)}:root .has-nightshade-gradient-background{background:linear-gradient(135deg,#330968,#31cdcf)}:root .has-midnight-gradient-background{background:linear-gradient(135deg,#020381,#2874fc)}.has-regular-font-size{font-size:1em}.has-larger-font-size{font-size:2.625em}.has-normal-font-size{font-size:var(--wp--preset--font-size--normal)}.has-huge-font-size{font-size:var(--wp--preset--font-size--huge)}.has-text-align-center{text-align:center}.has-text-align-left{text-align:left}.has-text-align-right{text-align:right}#end-resizable-editor-section{display:none}.aligncenter{clear:both}.items-justified-left{justify-content:flex-start}.items-justified-center{justify-content:center}.items-justified-right{justify-content:flex-end}.items-justified-space-between{justify-content:space-between}.screen-reader-text{border:0;clip:rect(1px,1px,1px,1px);clip-path:inset(50%);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;word-wrap:normal!important}.screen-reader-text:focus{background-color:#ddd;clip:auto!important;clip-path:none;color:#444;display:block;font-size:1em;height:auto;left:5px;line-height:normal;padding:15px 23px 14px;text-decoration:none;top:5px;width:auto;z-index:100000}html :where(.has-border-color){border-style:solid}html :where([style*=border-top-color]){border-top-style:solid}html :where([style*=border-right-color]){border-right-style:solid}html :where([style*=border-bottom-color]){border-bottom-style:solid}html :where([style*=border-left-color]){border-left-style:solid}html :where([style*=border-width]){border-style:solid}html :where([style*=border-top-width]){border-top-style:solid}html :where([style*=border-right-width]){border-right-style:solid}html :where([style*=border-bottom-width]){border-bottom-style:solid}html :where([style*=border-left-width]){border-left-style:solid}html :where(img[class*=wp-image-]){height:auto;max-width:100%}:where(figure){margin:0 0 1em}html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:var(--wp-admin--admin-bar--height,0px)}@media screen and (max-width:600px){html :where(.is-position-sticky){--wp-admin--admin-bar--position-offset:0px}} </style> <style id='/wp-includes/css/dist/block-library/theme.min.css-inline-css'> .wp-block-audio :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-audio :where(figcaption){color:#ffffffa6}.wp-block-audio{margin:0 0 1em}.wp-block-code{border:1px solid #ccc;border-radius:4px;font-family:Menlo,Consolas,monaco,monospace;padding:.8em 1em}.wp-block-embed :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-embed :where(figcaption){color:#ffffffa6}.wp-block-embed{margin:0 0 1em}.blocks-gallery-caption{color:#555;font-size:13px;text-align:center}.is-dark-theme .blocks-gallery-caption{color:#ffffffa6}:root :where(.wp-block-image figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme :root :where(.wp-block-image figcaption){color:#ffffffa6}.wp-block-image{margin:0 0 1em}.wp-block-pullquote{border-bottom:4px solid;border-top:4px solid;color:currentColor;margin-bottom:1.75em}.wp-block-pullquote cite,.wp-block-pullquote footer,.wp-block-pullquote__citation{color:currentColor;font-size:.8125em;font-style:normal;text-transform:uppercase}.wp-block-quote{border-left:.25em solid;margin:0 0 1.75em;padding-left:1em}.wp-block-quote cite,.wp-block-quote footer{color:currentColor;font-size:.8125em;font-style:normal;position:relative}.wp-block-quote:where(.has-text-align-right){border-left:none;border-right:.25em solid;padding-left:0;padding-right:1em}.wp-block-quote:where(.has-text-align-center){border:none;padding-left:0}.wp-block-quote.is-large,.wp-block-quote.is-style-large,.wp-block-quote:where(.is-style-plain){border:none}.wp-block-search .wp-block-search__label{font-weight:700}.wp-block-search__button{border:1px solid #ccc;padding:.375em .625em}:where(.wp-block-group.has-background){padding:1.25em 2.375em}.wp-block-separator.has-css-opacity{opacity:.4}.wp-block-separator{border:none;border-bottom:2px solid;margin-left:auto;margin-right:auto}.wp-block-separator.has-alpha-channel-opacity{opacity:1}.wp-block-separator:not(.is-style-wide):not(.is-style-dots){width:100px}.wp-block-separator.has-background:not(.is-style-dots){border-bottom:none;height:1px}.wp-block-separator.has-background:not(.is-style-wide):not(.is-style-dots){height:2px}.wp-block-table{margin:0 0 1em}.wp-block-table td,.wp-block-table th{word-break:normal}.wp-block-table :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-table :where(figcaption){color:#ffffffa6}.wp-block-video :where(figcaption){color:#555;font-size:13px;text-align:center}.is-dark-theme .wp-block-video :where(figcaption){color:#ffffffa6}.wp-block-video{margin:0 0 1em}:root :where(.wp-block-template-part.has-background){margin-bottom:0;margin-top:0;padding:1.25em 2.375em} </style> <link rel="icon" href="https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/cropped-teamo_favicon-32x32.jpg" sizes="32x32" /> <link rel="icon" href="https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/cropped-teamo_favicon-192x192.jpg" sizes="192x192" /> <link rel="apple-touch-icon" href="https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/cropped-teamo_favicon-180x180.jpg" /> <meta name="msapplication-TileImage" content="https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/cropped-teamo_favicon-270x270.jpg" /> <!-- Google tag (gtag.js) --> <script async src="https://www.googletagmanager.com/gtag/js?id=G-70WRLSWTJK"></script> <script> window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} gtag('js', new Date()); gtag('config', 'G-70WRLSWTJK'); </script> </head> <body class="home page-template page-template-page-home page-template-page-home-php page page-id-10 wp-custom-logo" data-template="base.twig"> <div class='splash' style=' position: fixed; inset: 0; z-index: 9999999999; background-color: var(--background); transition-property: opacity; transition-duration: 1s; display: grid; place-items: center; backdrop-filter: blur(10px); will-change: background-color,opacity; '> <crowd-spinner style='font-size: 2em;--track-color: var(--background);--indicator-color: var(--orange);'></crowd-spinner> </div> <div class="wrapper text-body" id="smooth-wrapper"> <div id="smooth-content"> <header> <div class='navigation'> <a href='https://teamo.thisiscrowd.com' title='TEAMO Logo'> <img src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/02/Group-7.svg' alt='Teamo - Celebrating Crowd's 10th Birthday' /> </a> <crowd-switch></crowd-switch> </div> </header> <section id="content" role="main"> <article class='hero'> <div class='hero-teamo'></div> <h1>TEAMO</h1> </article> <article class='fade-reveal intro-text'> <p><span class="char">A</span><span class="char">s</span><span class="char"> </span><span class="char">w</span><span class="char">e</span><span class="char"> </span><span class="char">c</span><span class="char">e</span><span class="char">l</span><span class="char">e</span><span class="char">b</span><span class="char">r</span><span class="char">a</span><span class="char">t</span><span class="char">e</span><span class="char"> </span><span class="char">C</span><span class="char">r</span><span class="char">o</span><span class="char">w</span><span class="char">d</span><span class="char">`</span><span class="char">s</span><span class="char"> </span><span class="char">1</span><span class="char">0</span><span class="char">t</span><span class="char">h</span><span class="char"> </span><span class="char">B</span><span class="char">i</span><span class="char">r</span><span class="char">t</span><span class="char">h</span><span class="char">d</span><span class="char">a</span><span class="char">y</span><span class="char"> </span><span class="char">a</span><span class="char">n</span><span class="char">d</span><span class="char"> </span><span class="char">t</span><span class="char">h</span><span class="char">e</span><span class="char"> </span><span class="char">l</span><span class="char">a</span><span class="char">u</span><span class="char">n</span><span class="char">c</span><span class="char">h</span><span class="char"> </span><span class="char">o</span><span class="char">f</span><span class="char"> </span><span class="char">o</span><span class="char">u</span><span class="char">r</span><span class="char"> </span><span class="char">W</span><span class="char">e</span><span class="char">b</span><span class="char">3</span><span class="char"> </span><span class="char">a</span><span class="char">g</span><span class="char">e</span><span class="char">n</span><span class="char">c</span><span class="char">y</span><span class="char">,</span><span class="char"> </span><span class="char">w</span><span class="char">e</span><span class="char">`</span><span class="char">v</span><span class="char">e</span><span class="char"> </span><span class="char">c</span><span class="char">r</span><span class="char">e</span><span class="char">a</span><span class="char">t</span><span class="char">e</span><span class="char">d</span><span class="char"> </span><span class="char">s</span><span class="char">o</span><span class="char">m</span><span class="char">e</span><span class="char">t</span><span class="char">h</span><span class="char">i</span><span class="char">n</span><span class="char">g</span><span class="char"> </span><span class="char">t</span><span class="char">r</span><span class="char">u</span><span class="char">l</span><span class="char">y</span><span class="char"> </span><span class="char">s</span><span class="char">p</span><span class="char">e</span><span class="char">c</span><span class="char">i</span><span class="char">a</span><span class="char">l</span><span class="char"> </span><span class="char">t</span><span class="char">o</span><span class="char"> </span><span class="char">e</span><span class="char">m</span><span class="char">b</span><span class="char">o</span><span class="char">d</span><span class="char">y</span><span class="char"> </span><span class="char">t</span><span class="char">h</span><span class="char">e</span><span class="char"> </span><span class="char">e</span><span class="char">s</span><span class="char">s</span><span class="char">e</span><span class="char">n</span><span class="char">c</span><span class="char">e</span><span class="char"> </span><span class="char">o</span><span class="char">f</span><span class="char"> </span><span class="char">o</span><span class="char">u</span><span class="char">r</span><span class="char"> </span><span class="char">t</span><span class="char">e</span><span class="char">a</span><span class="char">m</span><span class="char">w</span><span class="char">o</span><span class="char">r</span><span class="char">k</span><span class="char">,</span><span class="char"> </span><span class="char">c</span><span class="char">r</span><span class="char">e</span><span class="char">a</span><span class="char">t</span><span class="char">i</span><span class="char">v</span><span class="char">i</span><span class="char">t</span><span class="char">y</span><span class="char">,</span><span class="char"> </span><span class="char">a</span><span class="char">n</span><span class="char">d</span><span class="char"> </span><span class="char">c</span><span class="char">o</span><span class="char">l</span><span class="char">l</span><span class="char">a</span><span class="char">b</span><span class="char">o</span><span class="char">r</span><span class="char">a</span><span class="char">t</span><span class="char">i</span><span class="char">o</span><span class="char">n</span><span class="char">.</span><span class="char"> </span><span class="char">B</span><span class="char">e</span><span class="char">h</span><span class="char">o</span><span class="char">l</span><span class="char">d</span><span class="char">,</span><span class="char"> </span><span class="char">o</span><span class="char">u</span><span class="char">r</span><span class="char"> </span><span class="char">v</span><span class="char">e</span><span class="char">r</span><span class="char">y</span><span class="char"> </span><span class="char">o</span><span class="char">w</span><span class="char">n</span><span class="char"> </span><span class="char">p</span><span class="char">h</span><span class="char">y</span><span class="char">s</span><span class="char">i</span><span class="char">c</span><span class="char">a</span><span class="char">l</span><span class="char"> </span><span class="char">m</span><span class="char">a</span><span class="char">s</span><span class="char">c</span><span class="char">o</span><span class="char">t</span><span class="char">!</span></p> </article> <article class='wireframe'> <div> <h2>The real deal</h2> <p>In a digital world it’s important to remember the power of real connections. So instead of just making Teamo digital, we decided to create a piece that you could physically hold in your hands. Over the past 10 years we’ve made many real connections with clients and colleagues, and we look forward to making more.</p> </div> <figure></figure> </article> <div class='spacer'></div> <article class='phone'> <figure></figure> <div> <h2>10 years ago, we started this journey</h2> <p>Teamo may just be a physical mascot, but they represent the decade of Crowd travelling the world and witnessing incredible projects spring to life. Ten years ago, Crowd came to existence in Bournemouth, and we can’t wait to see what the future holds.</p> </div> </article> <div class='spacer'></div> <article class='egg'> <div class='egg-reveal fade-reveal override'> <p><span class="char">W</span><span class="char">h</span><span class="char">y</span><span class="char"> </span><span class="char">i</span><span class="char">s</span><span class="char"> </span><span class="char">T</span><span class="char">e</span><span class="char">a</span><span class="char">m</span><span class="char">o</span><span class="char"> </span><span class="char">c</span><span class="char">a</span><span class="char">r</span><span class="char">r</span><span class="char">y</span><span class="char">i</span><span class="char">n</span><span class="char">g</span><span class="char"> </span><span class="char">a</span><span class="char"> </span><span class="char">g</span><span class="char">o</span><span class="char">l</span><span class="char">d</span><span class="char">e</span><span class="char">n</span><span class="char"> </span><span class="char">e</span><span class="char">g</span><span class="char">g</span><span class="char">?</span><span class="char"> </span><span class="char">G</span><span class="char">o</span><span class="char">o</span><span class="char">d</span><span class="char"> </span><span class="char">q</span><span class="char">u</span><span class="char">e</span><span class="char">s</span><span class="char">t</span><span class="char">i</span><span class="char">o</span><span class="char">n</span><span class="char">.</span><span class="char"> </span><span class="char">A</span><span class="char">n</span><span class="char">d</span><span class="char"> </span><span class="char">t</span><span class="char">h</span><span class="char">e</span><span class="char"> </span><span class="char">a</span><span class="char">n</span><span class="char">s</span><span class="char">w</span><span class="char">e</span><span class="char">r</span><span class="char"> </span><span class="char">i</span><span class="char">s</span><span class="char"> </span><span class="char">s</span><span class="char">i</span><span class="char">m</span><span class="char">p</span><span class="char">l</span><span class="char">e</span><span class="char"> </span><span class="char">-</span><span class="char"> </span><span class="char">i</span><span class="char">t</span><span class="char">`</span><span class="char">s</span><span class="char"> </span><span class="char">a</span><span class="char"> </span><span class="char">m</span><span class="char">e</span><span class="char">t</span><span class="char">a</span><span class="char">p</span><span class="char">h</span><span class="char">o</span><span class="char">r</span><span class="char"> </span><span class="char">f</span><span class="char">o</span><span class="char">r</span><span class="char"> </span><span class="char">o</span><span class="char">u</span><span class="char">r</span><span class="char"> </span><span class="char">s</span><span class="char">u</span><span class="char">c</span><span class="char">c</span><span class="char">e</span><span class="char">s</span><span class="char">s</span><span class="char">.</span><span class="char"> </span><span class="char">A</span><span class="char">f</span><span class="char">t</span><span class="char">e</span><span class="char">r</span><span class="char"> </span><span class="char">1</span><span class="char">0</span><span class="char"> </span><span class="char">y</span><span class="char">e</span><span class="char">a</span><span class="char">r</span><span class="char">s</span><span class="char"> </span><span class="char">o</span><span class="char">f</span><span class="char"> </span><span class="char">g</span><span class="char">o</span><span class="char">i</span><span class="char">n</span><span class="char">g</span><span class="char"> </span><span class="char">a</span><span class="char">b</span><span class="char">o</span><span class="char">v</span><span class="char">e</span><span class="char"> </span><span class="char">a</span><span class="char">n</span><span class="char">d</span><span class="char"> </span><span class="char">b</span><span class="char">e</span><span class="char">y</span><span class="char">o</span><span class="char">n</span><span class="char">d</span><span class="char"> </span><span class="char">f</span><span class="char">o</span><span class="char">r</span><span class="char"> </span><span class="char">a</span><span class="char">l</span><span class="char">l</span><span class="char"> </span><span class="char">o</span><span class="char">u</span><span class="char">r</span><span class="char"> </span><span class="char">c</span><span class="char">l</span><span class="char">i</span><span class="char">e</span><span class="char">n</span><span class="char">t</span><span class="char">s</span><span class="char">,</span><span class="char"> </span><span class="char">w</span><span class="char">e</span><span class="char">`</span><span class="char">v</span><span class="char">e</span><span class="char"> </span><span class="char">b</span><span class="char">u</span><span class="char">i</span><span class="char">l</span><span class="char">t</span><span class="char"> </span><span class="char">a</span><span class="char"> </span><span class="char">g</span><span class="char">o</span><span class="char">l</span><span class="char">d</span><span class="char">e</span><span class="char">n</span><span class="char"> </span><span class="char">r</span><span class="char">e</span><span class="char">p</span><span class="char">u</span><span class="char">t</span><span class="char">a</span><span class="char">t</span><span class="char">i</span><span class="char">o</span><span class="char">n</span><span class="char"> </span><span class="char">f</span><span class="char">o</span><span class="char">r</span><span class="char"> </span><span class="char">h</span><span class="char">e</span><span class="char">l</span><span class="char">p</span><span class="char">i</span><span class="char">n</span><span class="char">g</span><span class="char"> </span><span class="char">b</span><span class="char">u</span><span class="char">s</span><span class="char">i</span><span class="char">n</span><span class="char">e</span><span class="char">s</span><span class="char">s</span><span class="char">,</span><span class="char"> </span><span class="char">o</span><span class="char">r</span><span class="char">g</span><span class="char">a</span><span class="char">n</span><span class="char">i</span><span class="char">s</span><span class="char">a</span><span class="char">t</span><span class="char">i</span><span class="char">o</span><span class="char">n</span><span class="char">s</span><span class="char"> </span><span class="char">a</span><span class="char">n</span><span class="char">d</span><span class="char"> </span><span class="char">b</span><span class="char">r</span><span class="char">a</span><span class="char">n</span><span class="char">d</span><span class="char">s</span><span class="char"> </span><span class="char">r</span><span class="char">e</span><span class="char">a</span><span class="char">c</span><span class="char">h</span><span class="char"> </span><span class="char">t</span><span class="char">h</span><span class="char">e</span><span class="char">i</span><span class="char">r</span><span class="char"> </span><span class="char">g</span><span class="char">o</span><span class="char">a</span><span class="char">l</span><span class="char">s</span><span class="char">.</span><span class="char"> </span><span class="char">A</span><span class="char">n</span><span class="char">d</span><span class="char"> </span><span class="char">t</span><span class="char">h</span><span class="char">a</span><span class="char">t</span><span class="char"> </span><span class="char">g</span><span class="char">o</span><span class="char">l</span><span class="char">d</span><span class="char">e</span><span class="char">n</span><span class="char"> </span><span class="char">r</span><span class="char">e</span><span class="char">p</span><span class="char">u</span><span class="char">t</span><span class="char">a</span><span class="char">t</span><span class="char">i</span><span class="char">o</span><span class="char">n</span><span class="char"> </span><span class="char">i</span><span class="char">s</span><span class="char"> </span><span class="char">s</span><span class="char">o</span><span class="char">m</span><span class="char">e</span><span class="char">t</span><span class="char">h</span><span class="char">i</span><span class="char">n</span><span class="char">g</span><span class="char"> </span><span class="char">w</span><span class="char">e</span><span class="char">`</span><span class="char">r</span><span class="char">e</span><span class="char"> </span><span class="char">d</span><span class="char">e</span><span class="char">t</span><span class="char">e</span><span class="char">r</span><span class="char">m</span><span class="char">i</span><span class="char">n</span><span class="char">e</span><span class="char">d</span><span class="char"> </span><span class="char">t</span><span class="char">o</span><span class="char"> </span><span class="char">h</span><span class="char">o</span><span class="char">l</span><span class="char">d</span><span class="char"> </span><span class="char">o</span><span class="char">n</span><span class="char">t</span><span class="char">o</span><span class="char"> </span><span class="char">t</span><span class="char">i</span><span class="char">g</span><span class="char">h</span><span class="char">t</span><span class="char">l</span><span class="char">y</span><span class="char">.</span></p> </div> <figure> <img src='https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/dist/images/teamo_Egg.png' alt='egg' /> </figure> </article> <div class='spacer'></div> <article class='model'> <figure></figure> <div> <h2>Loud and proud</h2> <p>Just in case you haven’t noticed the big megaphone head - communication is a huge part of Teamo. Amplifying our clients’ messages is what we do best, and although we’re a global agency that knows many different languages, we still always speak with one voice.</p> </div> </article> <div class='spacer'></div> <article class='welcome'> <div class='langs'> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> <p><span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span> <span>WELCOME TEAMO</span> <span>BIENVENUE TEAMO</span> <span>स्वागत टीमो</span> <span>WILLKOMMEN TEAMO</span> <span>خوش آمدید تیمو</span> <span>BEM-VINDO TEAMO</span> <span>خوش آمدید ٹیمو</span> <span>TEAMO'YA HOŞ GELDİN</span> <span>أهلًا و سهلًا بتيمو</span> <span>WELKOM TEAMO</span> <span>BENVENUTO TEAMO</span> <span>BIENVENIDO TEAMO</span> <span>Добро пожаловать TEAMO</span> <span>Ласкаво просимо до TEAMO</span> <span>സ്വാഗതം ടീമോ</span> <span>欢迎 TEAMO</span></p> </div> <figure></figure> </article> <article class='video'> <h2>THE TEAM <br />BEHIND TEAMO</h2> <crowd-video src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/TEAMO-CROWD_compressed_v2.mp4' poster='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/vlcsnap-2023-03-21-13h53m43s801.png' controls /> </article> <article class='nft-list'> <figure> <div> <picture> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-1400x1910.7407407407-c-default.webp 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-2500x3412.037037037-c-default.webp 2x" /> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-1400x1910.7407407407-c-default.png 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-2500x3412.037037037-c-default.png 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-500x682.40740740741-c-default.webp 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-1000x1364.8148148148-c-default.webp 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-500x682.40740740741-c-default.png 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-1000x1364.8148148148-c-default.png 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-500x682.40740740741-c-default.webp 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-500x682.40740740741-c-default.png 2x" /> <img width='1080' height='1474' class='' id='' loading='lazy' src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-2x2.3648148148148-c-default.png' data-src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/200-1080x1474-c-default.png' alt='Teamo - Celebrating Crowd's 10th Birthday' /> </picture> <picture> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-1400x1910.7407407407-c-default.webp 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-2500x3412.037037037-c-default.webp 2x" /> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-1400x1910.7407407407-c-default.gif 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-2500x3412.037037037-c-default.gif 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-500x682.40740740741-c-default.webp 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-1000x1364.8148148148-c-default.webp 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-500x682.40740740741-c-default.gif 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-1000x1364.8148148148-c-default.gif 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-500x682.40740740741-c-default.webp 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-500x682.40740740741-c-default.gif 2x" /> <img width='1080' height='1474' class='' id='' loading='lazy' src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-2x2.3648148148148-c-default.gif' data-src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/199-1080x1474-c-default.gif' alt='Teamo - Celebrating Crowd's 10th Birthday' /> </picture> </div> <div> <picture> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-1400x1910.7407407407-c-default.webp 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-2500x3412.037037037-c-default.webp 2x" /> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-1400x1910.7407407407-c-default.png 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-2500x3412.037037037-c-default.png 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-500x682.40740740741-c-default.webp 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-1000x1364.8148148148-c-default.webp 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-500x682.40740740741-c-default.png 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-1000x1364.8148148148-c-default.png 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-500x682.40740740741-c-default.webp 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-500x682.40740740741-c-default.png 2x" /> <img width='1080' height='1474' class='' id='' loading='lazy' src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-2x2.3648148148148-c-default.png' data-src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/198-1080x1474-c-default.png' alt='Teamo - Celebrating Crowd's 10th Birthday' /> </picture> <picture> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-1400x1910.7407407407-c-default.webp 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-2500x3412.037037037-c-default.webp 2x" /> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-1400x1910.7407407407-c-default.gif 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-2500x3412.037037037-c-default.gif 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-500x682.40740740741-c-default.webp 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-1000x1364.8148148148-c-default.webp 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-500x682.40740740741-c-default.gif 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-1000x1364.8148148148-c-default.gif 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-500x682.40740740741-c-default.webp 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-500x682.40740740741-c-default.gif 2x" /> <img width='1080' height='1474' class='' id='' loading='lazy' src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-2x2.3648148148148-c-default.gif' data-src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/197-1080x1474-c-default.gif' alt='Teamo - Celebrating Crowd's 10th Birthday' /> </picture> </div> <div> <picture> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-1400x1910.7407407407-c-default.webp 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-2500x3412.037037037-c-default.webp 2x" /> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-1400x1910.7407407407-c-default.gif 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-2500x3412.037037037-c-default.gif 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-500x682.40740740741-c-default.webp 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-1000x1364.8148148148-c-default.webp 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-500x682.40740740741-c-default.gif 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-1000x1364.8148148148-c-default.gif 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-500x682.40740740741-c-default.webp 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-500x682.40740740741-c-default.gif 2x" /> <img width='1080' height='1474' class='' id='' loading='lazy' src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-2x2.3648148148148-c-default.gif' data-src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/196-1080x1474-c-default.gif' alt='Teamo - Celebrating Crowd's 10th Birthday' /> </picture> <picture> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-1400x1910.7407407407-c-default.webp 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-2500x3412.037037037-c-default.webp 2x" /> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-1400x1910.7407407407-c-default.gif 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-2500x3412.037037037-c-default.gif 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-500x682.40740740741-c-default.webp 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-1000x1364.8148148148-c-default.webp 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-500x682.40740740741-c-default.gif 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-1000x1364.8148148148-c-default.gif 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-500x682.40740740741-c-default.webp 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-500x682.40740740741-c-default.gif 2x" /> <img width='1080' height='1474' class='' id='' loading='lazy' src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-2x2.3648148148148-c-default.gif' data-src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/195-1080x1474-c-default.gif' alt='Teamo - Celebrating Crowd's 10th Birthday' /> </picture> </div> <div> <picture> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-1400x1910.7407407407-c-default.webp 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-2500x3412.037037037-c-default.webp 2x" /> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-1400x1910.7407407407-c-default.gif 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-2500x3412.037037037-c-default.gif 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-500x682.40740740741-c-default.webp 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-1000x1364.8148148148-c-default.webp 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-500x682.40740740741-c-default.gif 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-1000x1364.8148148148-c-default.gif 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-500x682.40740740741-c-default.webp 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-500x682.40740740741-c-default.gif 2x" /> <img width='1080' height='1474' class='' id='' loading='lazy' src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-2x2.3648148148148-c-default.gif' data-src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/194-1080x1474-c-default.gif' alt='Teamo - Celebrating Crowd's 10th Birthday' /> </picture> <picture> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-1400x1910.7407407407-c-default.webp 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-2500x3412.037037037-c-default.webp 2x" /> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-1400x1910.7407407407-c-default.gif 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-2500x3412.037037037-c-default.gif 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-500x682.40740740741-c-default.webp 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-1000x1364.8148148148-c-default.webp 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-500x682.40740740741-c-default.gif 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-1000x1364.8148148148-c-default.gif 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-500x682.40740740741-c-default.webp 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-500x682.40740740741-c-default.gif 2x" /> <img width='1080' height='1474' class='' id='' loading='lazy' src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-2x2.3648148148148-c-default.gif' data-src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/193-1080x1474-c-default.gif' alt='Teamo - Celebrating Crowd's 10th Birthday' /> </picture> </div> <div> <picture> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-1400x1910.7407407407-c-default.webp 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-2500x3412.037037037-c-default.webp 2x" /> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-1400x1910.7407407407-c-default.png 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-2500x3412.037037037-c-default.png 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-500x682.40740740741-c-default.webp 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-1000x1364.8148148148-c-default.webp 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-500x682.40740740741-c-default.png 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-1000x1364.8148148148-c-default.png 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-500x682.40740740741-c-default.webp 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-500x682.40740740741-c-default.png 2x" /> <img width='1080' height='1474' class='' id='' loading='lazy' src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-2x2.3648148148148-c-default.png' data-src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/192-1080x1474-c-default.png' alt='Teamo - Celebrating Crowd's 10th Birthday' /> </picture> <picture> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-1400x1910.7407407407-c-default.webp 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-2500x3412.037037037-c-default.webp 2x" /> <source media="screen and (min-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-1400x1910.7407407407-c-default.gif 1000w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-2500x3412.037037037-c-default.gif 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-500x682.40740740741-c-default.webp 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-1000x1364.8148148148-c-default.webp 2x" /> <source media="screen and (max-width:1000px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-500x682.40740740741-c-default.gif 500w, https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-1000x1364.8148148148-c-default.gif 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-500x682.40740740741-c-default.webp 2x" /> <source media="screen and (max-width:500px)" data-srcset=" https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-500x682.40740740741-c-default.gif 2x" /> <img width='1080' height='1474' class='' id='' loading='lazy' src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-2x2.3648148148148-c-default.gif' data-src='https://teamo.thisiscrowd.com/wp-content/uploads/2023/03/191-1080x1474-c-default.gif' alt='Teamo - Celebrating Crowd's 10th Birthday' /> </picture> </div> </figure> <figcaption> <h2>Don’t miss out on your chance to claim your very own Teamo NFT!</h2> <h3>Simply scan the QR code on your figurine and unlock a world of rewards and opportunities.</h3> </figcaption> </article> <article style='text-align:center;min-height: initial;'> <h2>Want to see more of Teamo?</h2> <a class='button' style='margin-bottom: 1em;' href='https://teamo.thisiscrowd.com/gallery'>Gallery</a> <a class='button' href='https://teamo.thisiscrowd.com/nft/'>NFTs</a> </article> </section> <footer> <div class='frame'></div> <p> <span>© 2025 THE CROWD GROUP LIMITED</span> <span>Site by <a href='https://thisiscrowd.com' target='_blank' rel='noopener'>Crowd</a> | <a href='https://crowd-merch.myspreadshop.co.uk' target='_blank'>Get Merch</a></span> </p> </footer> <div class='chat-frame'></div> <script> const frameConsts = { modelUrl: 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/Teamo.glb', rewardModels: [ 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/rewards/1.glb', 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/rewards/2.glb', 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/rewards/3.glb', 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/rewards/4.glb', 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/rewards/5.glb', 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/rewards/6.glb', 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/rewards/7.glb', ], megaphone: 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/Megaphone.glb', egg: 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/Egg.glb', mobile: 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/Mobile.glb', footer: 'https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/includes/models/teamofooter.glb' } </script> <script type='text/javascript'> var crowdAjax = "https://teamo.thisiscrowd.com/wp-admin/admin-ajax.php"; </script> <script id="https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/dist/js/home.js-js-after"> /*! For license information please see home.js.LICENSE.txt */ (()=>{var e,t,n={3748:(e,t,n)=>{"use strict";n.d(t,{iA:()=>d,mI:()=>h});var r=n(7462),i=n(9477),a=n(7294),o=n(8715),s=n(9137),l=n(8198);const c=a.createContext(null),u=(0,s.g)({color:new i.Color,blend:2,alphaTest:.75,opacity:0,map:null},"varying vec2 vUv;\n void main() {\n gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.);\n vUv = uv;\n }","varying vec2 vUv;\n uniform sampler2D map;\n uniform vec3 color;\n uniform float opacity;\n uniform float alphaTest;\n uniform float blend;\n void main() {\n vec4 sampledDiffuseColor = texture2D(map, vUv);\n gl_FragColor = vec4(color * sampledDiffuseColor.r * blend, max(0.0, (1.0 - (sampledDiffuseColor.r + sampledDiffuseColor.g + sampledDiffuseColor.b) / alphaTest)) * opacity);\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n }"),d=a.forwardRef((({children:e,temporal:t,frames:n=40,limit:r=1/0,blend:i=20,scale:s=10,opacity:l=1,alphaTest:d=.75,color:h="black",colorBlend:p=2,resolution:m=1024,toneMapped:g=!0,...v},y)=>{(0,o.e)({SoftShadowMaterial:u});const b=(0,o.z)((e=>e.gl)),_=(0,o.z)((e=>e.scene)),x=(0,o.z)((e=>e.camera)),w=(0,o.z)((e=>e.invalidate)),M=a.useRef(null),S=a.useRef(null),[A]=a.useState((()=>new f(b,_,m)));a.useLayoutEffect((()=>{A.configure(M.current)}),[]);const E=a.useMemo((()=>({lights:new Map,temporal:!!t,frames:Math.max(2,n),blend:Math.max(2,n===1/0?i:n),count:0,getMesh:()=>M.current,reset:()=>{A.clear();const e=M.current.material;e.opacity=0,e.alphaTest=0,E.count=0},update:(e=1)=>{const t=M.current.material;E.temporal?(t.opacity=Math.min(l,t.opacity+l/E.blend),t.alphaTest=Math.min(d,t.alphaTest+d/E.blend)):(t.opacity=l,t.alphaTest=d),S.current.visible=!0,A.prepare();for(let t=0;t<e;t++)E.lights.forEach((e=>e.update())),A.update(x,E.blend);S.current.visible=!1,A.finish()}})),[A,x,_,t,n,i,l,d]);return a.useLayoutEffect((()=>{E.reset(),E.temporal||E.frames===1/0||E.update(E.blend)})),a.useImperativeHandle(y,(()=>E),[E]),(0,o.A)((()=>{(E.temporal||E.frames===1/0)&&E.count<E.frames&&E.count<r&&(w(),E.update(),E.count++)})),a.createElement("group",v,a.createElement("group",{traverse:()=>null,ref:S},a.createElement(c.Provider,{value:E},e)),a.createElement("mesh",{receiveShadow:!0,ref:M,scale:s,rotation:[-Math.PI/2,0,0]},a.createElement("planeGeometry",null),a.createElement("softShadowMaterial",{transparent:!0,depthWrite:!1,toneMapped:g,color:h,blend:p,map:A.progressiveLightMap2.texture})))})),h=a.forwardRef((({castShadow:e=!0,bias:t=.001,mapSize:n=512,size:o=5,near:s=.5,far:l=500,frames:u=1,position:d=[0,0,0],radius:h=1,amount:f=8,intensity:p=1,ambient:m=.5,...g},v)=>{const y=a.useRef(null),b=new i.Vector3(...d).length(),_=a.useContext(c),x=a.useCallback((()=>{let e;if(y.current)for(let t=0;t<y.current.children.length;t++)if(e=y.current.children[t],Math.random()>m)e.position.set(d[0]+i.MathUtils.randFloatSpread(h),d[1]+i.MathUtils.randFloatSpread(h),d[2]+i.MathUtils.randFloatSpread(h));else{let t=Math.acos(2*Math.random()-1)-Math.PI/2,n=2*Math.PI*Math.random();e.position.set(Math.cos(t)*Math.cos(n)*b,Math.abs(Math.cos(t)*Math.sin(n)*b),Math.sin(t)*b)}}),[h,m,b,...d]),w=a.useMemo((()=>({update:x})),[x]);return a.useImperativeHandle(v,(()=>w),[w]),a.useLayoutEffect((()=>{const e=y.current;return _&&_.lights.set(e.uuid,w),()=>{_.lights.delete(e.uuid)}}),[_,w]),a.createElement("group",(0,r.Z)({ref:y},g),Array.from({length:f},((r,i)=>a.createElement("directionalLight",{key:i,castShadow:e,"shadow-bias":t,"shadow-mapSize":[n,n],intensity:p/f},a.createElement("orthographicCamera",{attach:"shadow-camera",args:[-o,o,o,-o,s,l]})))))}));class f{constructor(e,t,n=1024){this.renderer=e,this.res=n,this.scene=t,this.buffer1Active=!1,this.lights=[],this.meshes=[],this.object=null,this.clearColor=new i.Color,this.clearAlpha=0;const r=/(Android|iPad|iPhone|iPod)/g.test(navigator.userAgent)?i.HalfFloatType:i.FloatType;this.progressiveLightMap1=new i.WebGLRenderTarget(this.res,this.res,{type:r}),this.progressiveLightMap2=new i.WebGLRenderTarget(this.res,this.res,{type:r}),this.discardMat=new l.l,this.targetMat=new i.MeshLambertMaterial({fog:!1}),this.previousShadowMap={value:this.progressiveLightMap1.texture},this.averagingWindow={value:100},this.targetMat.onBeforeCompile=e=>{e.vertexShader="varying vec2 vUv;\n"+e.vertexShader.slice(0,-1)+"vUv = uv; gl_Position = vec4((uv - 0.5) * 2.0, 1.0, 1.0); }";const t=e.fragmentShader.indexOf("void main() {");e.fragmentShader="varying vec2 vUv;\n"+e.fragmentShader.slice(0,t)+"uniform sampler2D previousShadowMap;\n\tuniform float averagingWindow;\n"+e.fragmentShader.slice(t-1,-1)+"\nvec3 texelOld = texture2D(previousShadowMap, vUv).rgb;\n gl_FragColor.rgb = mix(texelOld, gl_FragColor.rgb, 1.0/ averagingWindow);\n }",e.uniforms.previousShadowMap=this.previousShadowMap,e.uniforms.averagingWindow=this.averagingWindow}}clear(){this.renderer.getClearColor(this.clearColor),this.clearAlpha=this.renderer.getClearAlpha(),this.renderer.setClearColor("black",1),this.renderer.setRenderTarget(this.progressiveLightMap1),this.renderer.clear(),this.renderer.setRenderTarget(this.progressiveLightMap2),this.renderer.clear(),this.renderer.setRenderTarget(null),this.renderer.setClearColor(this.clearColor,this.clearAlpha),this.lights=[],this.meshes=[],this.scene.traverse((e=>{!function(e){return!!e.geometry}(e)?function(e){return e.isLight}(e)&&this.lights.push({object:e,intensity:e.intensity}):this.meshes.push({object:e,material:e.material})}))}prepare(){this.lights.forEach((e=>e.object.intensity=0)),this.meshes.forEach((e=>e.object.material=this.discardMat))}finish(){this.lights.forEach((e=>e.object.intensity=e.intensity)),this.meshes.forEach((e=>e.object.material=e.material))}configure(e){this.object=e}update(e,t=100){if(!this.object)return;this.averagingWindow.value=t,this.object.material=this.targetMat;const n=this.buffer1Active?this.progressiveLightMap1:this.progressiveLightMap2,r=this.buffer1Active?this.progressiveLightMap2:this.progressiveLightMap1,i=this.scene.background;this.scene.background=null,this.renderer.setRenderTarget(n),this.previousShadowMap.value=r.texture,this.buffer1Active=!this.buffer1Active,this.renderer.render(this.scene,e),this.renderer.setRenderTarget(null),this.scene.background=i}}},3758:(e,t,n)=>{"use strict";n.d(t,{S:()=>a});var r=n(7294),i=n(8715);function a({pixelated:e}){const t=(0,i.z)((e=>e.gl)),n=(0,i.z)((e=>e.internal.active)),a=(0,i.z)((e=>e.performance.current)),o=(0,i.z)((e=>e.viewport.initialDpr)),s=(0,i.z)((e=>e.setDpr));return r.useEffect((()=>{const r=t.domElement;return()=>{n&&s(o),e&&r&&(r.style.imageRendering="auto")}}),[]),r.useEffect((()=>{s(a*o),e&&t.domElement&&(t.domElement.style.imageRendering=1===a?"auto":"pixelated")}),[a]),null}},3520:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var r=n(7294),i=n(8715);function a(){const e=(0,i.z)((e=>e.get)),t=(0,i.z)((e=>e.setEvents)),n=(0,i.z)((e=>e.performance.current));return r.useEffect((()=>{const n=e().events.enabled;return()=>t({enabled:n})}),[]),r.useEffect((()=>t({enabled:1===n})),[n]),null}},2809:(e,t,n)=>{"use strict";n.d(t,{P:()=>a});var r=n(7294),i=n(8715);function a(){const e=(0,i.z)((e=>e.gl));return(0,r.useEffect)((()=>(e.shadowMap.autoUpdate=!1,e.shadowMap.needsUpdate=!0,()=>{e.shadowMap.autoUpdate=e.shadowMap.needsUpdate=!0})),[e.shadowMap]),null}},7210:(e,t,n)=>{"use strict";n.d(t,{B:()=>c,Y:()=>l});var r=n(7294),i=n(9477),a=n(8715);const o=e=>e&&e.isOrthographicCamera,s=r.createContext(null);function l({children:e,damping:t=6,fit:n,clip:l,observe:c,margin:u=1.2,eps:d=.01,onFit:h}){const f=r.useRef(null),{camera:p,invalidate:m,size:g,controls:v}=(0,a.z)(),y=v,b=r.useRef(h);function _(e,t){return Math.abs(e.x-t.x)<d&&Math.abs(e.y-t.y)<d&&Math.abs(e.z-t.z)<d}function x(e,t,n,r){e.x=i.MathUtils.damp(e.x,t.x,n,r),e.y=i.MathUtils.damp(e.y,t.y,n,r),e.z=i.MathUtils.damp(e.z,t.z,n,r)}b.current=h;const[w]=r.useState((()=>({animating:!1,focus:new i.Vector3,camera:new i.Vector3,zoom:1}))),[M]=r.useState((()=>({focus:new i.Vector3,camera:new i.Vector3,zoom:1}))),[S]=r.useState((()=>new i.Box3)),A=r.useMemo((()=>{function e(){const e=S.getSize(new i.Vector3),t=S.getCenter(new i.Vector3),n=Math.max(e.x,e.y,e.z),r=o(p)?4*n:n/(2*Math.atan(Math.PI*p.fov/360)),a=o(p)?4*n:r/p.aspect,s=u*Math.max(r,a);return{box:S,size:e,center:t,distance:s}}return{getSize:e,refresh(t){if((n=t)&&n.isBox3)S.copy(t);else{const e=t||f.current;e.updateWorldMatrix(!0,!0),S.setFromObject(e)}var n;if(S.isEmpty()){const e=p.position.length()||10;S.setFromCenterAndSize(new i.Vector3,new i.Vector3(e,e,e))}if("OrthographicTrackballControls"===(null==y?void 0:y.constructor.name)){const{distance:t}=e(),n=p.position.clone().sub(y.target).normalize().multiplyScalar(t),r=y.target.clone().add(n);p.position.copy(r)}return this},clip(){const{distance:t}=e();return y&&(y.maxDistance=10*t),p.near=t/100,p.far=100*t,p.updateProjectionMatrix(),y&&y.update(),m(),this},to({position:n,target:r}){w.camera.copy(p.position);const{center:i}=e();return M.camera.set(...n),r?M.focus.set(...r):M.focus.copy(i),t?w.animating=!0:p.position.set(...n),this},fit(){w.camera.copy(p.position),y&&w.focus.copy(y.target);const{center:n,distance:r}=e(),a=n.clone().sub(p.position).normalize().multiplyScalar(r);if(M.camera.copy(n).sub(a),M.focus.copy(n),o(p)){w.zoom=p.zoom;let e=0,r=0;const a=[new i.Vector3(S.min.x,S.min.y,S.min.z),new i.Vector3(S.min.x,S.max.y,S.min.z),new i.Vector3(S.min.x,S.min.y,S.max.z),new i.Vector3(S.min.x,S.max.y,S.max.z),new i.Vector3(S.max.x,S.max.y,S.max.z),new i.Vector3(S.max.x,S.max.y,S.min.z),new i.Vector3(S.max.x,S.min.y,S.max.z),new i.Vector3(S.max.x,S.min.y,S.min.z)];n.applyMatrix4(p.matrixWorldInverse);for(const t of a)t.applyMatrix4(p.matrixWorldInverse),e=Math.max(e,Math.abs(t.y-n.y)),r=Math.max(r,Math.abs(t.x-n.x));e*=2,r*=2;const o=(p.top-p.bottom)/e,s=(p.right-p.left)/r;M.zoom=Math.min(o,s)/u,t||(p.zoom=M.zoom,p.updateProjectionMatrix())}return t?w.animating=!0:(p.position.copy(M.camera),p.lookAt(M.focus),y&&(y.target.copy(M.focus),y.update())),b.current&&b.current(this.getSize()),m(),this}}}),[S,p,y,u,t,m]);r.useLayoutEffect((()=>{if(y){const e=()=>w.animating=!1;return y.addEventListener("start",e),()=>y.removeEventListener("start",e)}}),[y]);const E=r.useRef(0);return r.useLayoutEffect((()=>{(c||0==E.current++)&&(A.refresh(),n&&A.fit(),l&&A.clip())}),[g,l,n,c,p,y]),(0,a.A)(((e,n)=>{if(w.animating){if(x(w.focus,M.focus,t,n),x(w.camera,M.camera,t,n),w.zoom=i.MathUtils.damp(w.zoom,M.zoom,t,n),p.position.copy(w.camera),o(p)&&(p.zoom=w.zoom,p.updateProjectionMatrix()),y?(y.target.copy(w.focus),y.update()):p.lookAt(w.focus),m(),o(p)&&!(Math.abs(w.zoom-M.zoom)<d))return;if(!o(p)&&!_(w.camera,M.camera))return;if(y&&!_(w.focus,M.focus))return;w.animating=!1}})),r.createElement("group",{ref:f},r.createElement(s.Provider,{value:A},e))}function c(){return r.useContext(s)}},9e3:(e,t,n)=>{"use strict";n.d(t,{M:()=>o});var r=n(7462),i=n(9477),a=n(7294);const o=a.forwardRef((function({children:e,disable:t,disableX:n,disableY:o,disableZ:s,left:l,right:c,top:u,bottom:d,front:h,back:f,onCentered:p,precise:m=!0,cacheKey:g=0,...v},y){const b=a.useRef(null),_=a.useRef(null),x=a.useRef(null);return a.useLayoutEffect((()=>{_.current.matrixWorld.identity();const e=(new i.Box3).setFromObject(x.current,m),r=new i.Vector3,a=new i.Sphere,g=e.max.x-e.min.x,v=e.max.y-e.min.y,y=e.max.z-e.min.z;e.getCenter(r),e.getBoundingSphere(a);const w=u?v/2:d?-v/2:0,M=l?-g/2:c?g/2:0,S=h?y/2:f?-y/2:0;_.current.position.set(t||n?0:-r.x+M,t||o?0:-r.y+w,t||s?0:-r.z+S),void 0!==p&&p({parent:b.current.parent,container:b.current,width:g,height:v,depth:y,boundingBox:e,boundingSphere:a,center:r,verticalAlignment:w,horizontalAlignment:M,depthAlignment:S})}),[g,p,u,l,h,t,n,o,s,m,c,d,f]),a.useImperativeHandle(y,(()=>b.current),[]),a.createElement("group",(0,r.Z)({ref:b},v),a.createElement("group",{ref:_},a.createElement("group",{ref:x},e)))}))},8274:(e,t,n)=>{"use strict";n.d(t,{j:()=>c});var r=n(7462),i=n(7294),a=n(9477),o=n(8715),s=n(8466),l=n(7312);const c=i.forwardRef((({scale:e=10,frames:t=1/0,opacity:n=1,width:c=1,height:u=1,blur:d=1,far:h=10,resolution:f=512,smooth:p=!0,color:m="#000000",depthWrite:g=!1,renderOrder:v,...y},b)=>{const _=i.useRef(null),x=(0,o.z)((e=>e.scene)),w=(0,o.z)((e=>e.gl)),M=i.useRef(null);c*=Array.isArray(e)?e[0]:e||1,u*=Array.isArray(e)?e[1]:e||1;const[S,A,E,C,T,R,B]=i.useMemo((()=>{const e=new a.WebGLRenderTarget(f,f),t=new a.WebGLRenderTarget(f,f);t.texture.generateMipmaps=e.texture.generateMipmaps=!1;const n=new a.PlaneGeometry(c,u).rotateX(Math.PI/2),r=new a.Mesh(n),i=new a.MeshDepthMaterial;i.depthTest=i.depthWrite=!1,i.onBeforeCompile=e=>{e.uniforms={...e.uniforms,ucolor:{value:new a.Color(m)}},e.fragmentShader=e.fragmentShader.replace("void main() {","uniform vec3 ucolor;\n void main() {\n "),e.fragmentShader=e.fragmentShader.replace("vec4( vec3( 1.0 - fragCoordZ ), opacity );","vec4( ucolor * fragCoordZ * 2.0, ( 1.0 - fragCoordZ ) * 1.0 );")};const o=new a.ShaderMaterial(s.P),d=new a.ShaderMaterial(l.Z);return d.depthTest=o.depthTest=!1,[e,n,i,r,o,d,t]}),[f,c,u,e,m]),P=e=>{C.visible=!0,C.material=T,T.uniforms.tDiffuse.value=S.texture,T.uniforms.h.value=1*e/256,w.setRenderTarget(B),w.render(C,M.current),C.material=R,R.uniforms.tDiffuse.value=B.texture,R.uniforms.v.value=1*e/256,w.setRenderTarget(S),w.render(C,M.current),C.visible=!1};let k,I,L=0;return(0,o.A)((()=>{M.current&&(t===1/0||L<t)&&(L++,k=x.background,I=x.overrideMaterial,_.current.visible=!1,x.background=null,x.overrideMaterial=E,w.setRenderTarget(S),w.render(x,M.current),P(d),p&&P(.4*d),w.setRenderTarget(null),_.current.visible=!0,x.overrideMaterial=I,x.background=k)})),i.useImperativeHandle(b,(()=>_.current),[]),i.createElement("group",(0,r.Z)({"rotation-x":Math.PI/2},y,{ref:_}),i.createElement("mesh",{renderOrder:v,geometry:A,scale:[1,-1,1],rotation:[-Math.PI/2,0,0]},i.createElement("meshBasicMaterial",{transparent:!0,map:S.texture,opacity:n,depthWrite:g})),i.createElement("orthographicCamera",{ref:M,args:[-c/2,c/2,u/2,-u/2,0,h]}))}))},6255:(e,t,n)=>{"use strict";n.d(t,{qA:()=>p});var r=n(7462),i=n(7294),a=n(8715),o=n(9477),s=n(5052),l=n(1938);function c(e,t,n,r,i=0){const a=(e=>{return(t=e).current&&t.current.isScene?e.current:e;var t})(t||n),o=a.background,s=a.environment,l=a.backgroundBlurriness||0;return"only"!==e&&(a.environment=r),e&&(a.background=r),e&&void 0!==a.backgroundBlurriness&&(a.backgroundBlurriness=i),()=>{"only"!==e&&(a.environment=s),e&&(a.background=o),e&&void 0!==a.backgroundBlurriness&&(a.backgroundBlurriness=l)}}function u({scene:e,background:t=!1,blur:n,map:r}){const o=(0,a.z)((e=>e.scene));return i.useLayoutEffect((()=>{if(r)return c(t,e,o,r,n)}),[o,e,r,t,n]),null}function d({background:e=!1,scene:t,blur:n,...r}){const o=(0,l.O)(r),s=(0,a.z)((e=>e.scene));return i.useLayoutEffect((()=>c(e,t,s,o,n)),[o,e,t,s,n]),null}function h({children:e,near:t=1,far:n=1e3,resolution:r=256,frames:s=1,map:l,background:h=!1,blur:f,scene:p,files:m,path:g,preset:v,extensions:y}){const b=(0,a.z)((e=>e.gl)),_=(0,a.z)((e=>e.scene)),x=i.useRef(null),[w]=i.useState((()=>new o.Scene)),M=i.useMemo((()=>{const e=new o.WebGLCubeRenderTarget(r);return e.texture.type=o.HalfFloatType,e}),[r]);i.useLayoutEffect((()=>(1===s&&x.current.update(b,w),c(h,p,_,M.texture,f))),[e,w,M.texture,p,_,h,s,b]);let S=1;return(0,a.A)((()=>{(s===1/0||S<s)&&(x.current.update(b,w),S++)})),i.createElement(i.Fragment,null,(0,a.g)(i.createElement(i.Fragment,null,e,i.createElement("cubeCamera",{ref:x,args:[t,n,M]}),m||v?i.createElement(d,{background:!0,files:m,preset:v,path:g,extensions:y}):l?i.createElement(u,{background:!0,map:l,extensions:y}):null),w))}function f(e){var t,n,o,c;const d=(0,l.O)(e),h=e.map||d;i.useMemo((()=>(0,a.e)({GroundProjectedEnvImpl:s.e})),[]);const f=i.useMemo((()=>[h]),[h]),p=null==(t=e.ground)?void 0:t.height,m=null==(n=e.ground)?void 0:n.radius,g=null!==(o=null==(c=e.ground)?void 0:c.scale)&&void 0!==o?o:1e3;return i.createElement(i.Fragment,null,i.createElement(u,(0,r.Z)({},e,{map:h})),i.createElement("groundProjectedEnvImpl",{args:f,scale:g,height:p,radius:m}))}function p(e){return e.ground?i.createElement(f,e):e.map?i.createElement(u,e):e.children?i.createElement(h,e):i.createElement(d,e)}},533:(e,t,n)=>{"use strict";n.d(t,{A:()=>o});var r=n(7294),i=n(8715);const a=(0,r.createContext)(null);function o({iterations:e=10,ms:t=250,threshold:n=.75,step:o=.1,factor:s=.5,flipflops:l=1/0,bounds:c=(e=>e>100?[60,100]:[40,60]),onIncline:u,onDecline:d,onChange:h,onFallback:f,children:p}){const m=Math.pow(10,0),[g,v]=(0,r.useState)((()=>({fps:0,index:0,factor:s,flipped:0,refreshrate:0,fallback:!1,frames:[],averages:[],subscriptions:new Map,subscribe:e=>{const t=Symbol();return g.subscriptions.set(t,e.current),()=>{g.subscriptions.delete(t)}}})));let y=0;return(0,i.A)((()=>{const{frames:r,averages:i}=g;if(!g.fallback&&i.length<e){r.push(performance.now());const a=r[r.length-1]-r[0];if(a>=t){if(g.fps=Math.round(r.length/a*1e3*m)/m,g.refreshrate=Math.max(g.refreshrate,g.fps),i[g.index++%e]=g.fps,i.length===e){const[t,r]=c(g.refreshrate),a=i.filter((e=>e>=r)),s=i.filter((e=>e<t));a.length>e*n&&(g.factor=Math.min(1,g.factor+o),g.flipped++,u&&u(g),g.subscriptions.forEach((e=>e.onIncline&&e.onIncline(g)))),s.length>e*n&&(g.factor=Math.max(0,g.factor-o),g.flipped++,d&&d(g),g.subscriptions.forEach((e=>e.onDecline&&e.onDecline(g)))),y!==g.factor&&(y=g.factor,h&&h(g),g.subscriptions.forEach((e=>e.onChange&&e.onChange(g)))),g.flipped>l&&!g.fallback&&(g.fallback=!0,f&&f(g),g.subscriptions.forEach((e=>e.onFallback&&e.onFallback(g)))),g.averages=[]}g.frames=[]}}})),r.createElement(a.Provider,{value:g},p)}},587:(e,t,n)=>{"use strict";n.d(t,{q:()=>o});var r=n(9477),i=n(7294),a=n(8715);function o({all:e,scene:t,camera:n}){const o=(0,a.z)((({gl:e})=>e)),s=(0,a.z)((({camera:e})=>e)),l=(0,a.z)((({scene:e})=>e));return i.useLayoutEffect((()=>{const i=[];e&&(t||l).traverse((e=>{!1===e.visible&&(i.push(e),e.visible=!0)})),o.compile(t||l,n||s);const a=new r.WebGLCubeRenderTarget(128);new r.CubeCamera(.01,1e5,a).update(o,t||l),a.dispose(),i.forEach((e=>e.visible=!1))}),[]),null}},5696:(e,t,n)=>{"use strict";n.d(t,{H:()=>h});var r=n(7462),i=n(7294),a=n(6255),o=n(8274),s=n(9e3),l=n(3748),c=n(7210);const u={rembrandt:{main:[1,2,1],fill:[-2,-.5,-2]},portrait:{main:[-1,2,.5],fill:[-1,.5,-1.5]},upfront:{main:[0,2,1],fill:[-1,.5,-1.5]},soft:{main:[-2,4,4],fill:[-1,.5,-1.5]}};function d({radius:e,adjustCamera:t}){const n=(0,c.B)();return i.useEffect((()=>{t&&n.refresh().clip().fit()}),[e,t]),null}function h({children:e,center:t,adjustCamera:n=!0,intensity:h=.5,shadows:f="contact",environment:p="city",preset:m="rembrandt",...g}){var v,y,b,_,x,w,M,S;const A="string"==typeof m?u[m]:m,[{radius:E,height:C},T]=i.useState({radius:0,width:0,height:0,depth:0}),R=null!==(v=null==f?void 0:f.bias)&&void 0!==v?v:-1e-4,B=null!==(y=null==f?void 0:f.normalBias)&&void 0!==y?y:0,P=null!==(b=null==f?void 0:f.size)&&void 0!==b?b:1024,k=null!==(_=null==f?void 0:f.offset)&&void 0!==_?_:0,I="contact"===f||"contact"===(null==f?void 0:f.type),L="accumulative"===f||"accumulative"===(null==f?void 0:f.type),D={..."object"==typeof f?f:{}},O=p?"string"==typeof p?{preset:p}:p:null,F=i.useCallback((e=>{const{width:n,height:r,depth:i,boundingSphere:a}=e;T({radius:a.radius,width:n,height:r,depth:i}),null!=t&&t.onCentered&&t.onCentered(e)}),[]);return i.createElement(i.Fragment,null,i.createElement("ambientLight",{intensity:h/3}),i.createElement("spotLight",{penumbra:1,position:[A.main[0]*E,A.main[1]*E,A.main[2]*E],intensity:2*h,castShadow:!!f,"shadow-bias":R,"shadow-normalBias":B,"shadow-mapSize":P}),i.createElement("pointLight",{position:[A.fill[0]*E,A.fill[1]*E,A.fill[2]*E],intensity:h}),i.createElement(c.Y,(0,r.Z)({fit:!!n,clip:!!n,margin:Number(n),observe:!0},g),i.createElement(d,{radius:E,adjustCamera:n}),i.createElement(s.M,(0,r.Z)({},t,{position:[0,k/2,0],onCentered:F}),e)),i.createElement("group",{position:[0,-C/2-k/2,0]},I&&i.createElement(o.j,(0,r.Z)({scale:4*E,far:E,blur:2},D)),L&&i.createElement(l.iA,(0,r.Z)({temporal:!0,frames:100,alphaTest:.9,toneMapped:!0,scale:4*E},D),i.createElement(l.mI,{amount:null!==(x=D.amount)&&void 0!==x?x:8,radius:null!==(w=D.radius)&&void 0!==w?w:E,ambient:null!==(M=D.ambient)&&void 0!==M?M:.5,intensity:null!==(S=D.intensity)&&void 0!==S?S:1,position:[A.main[0]*E,A.main[1]*E,A.main[2]*E],size:4*E,bias:-R,mapSize:P}))),p&&i.createElement(a.qA,O))}},9137:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(9477);function i(e,t,n,i){const a=class extends r.ShaderMaterial{constructor(a={}){const o=Object.entries(e);super({uniforms:o.reduce(((e,[t,n])=>({...e,...r.UniformsUtils.clone({[t]:{value:n}})})),{}),vertexShader:t,fragmentShader:n}),this.key="",o.forEach((([e])=>Object.defineProperty(this,e,{get:()=>this.uniforms[e].value,set:t=>this.uniforms[e].value=t}))),Object.assign(this,a),i&&i(this)}};return a.key=r.MathUtils.generateUUID(),a}},6493:(e,t,n)=>{"use strict";n.d(t,{xu:()=>s});var r=n(7462),i=n(7294),a=n(9477);function o(e,t){const n=e+"Geometry";return i.forwardRef((({args:e,children:a,...o},s)=>{const l=i.useRef(null);return i.useImperativeHandle(s,(()=>l.current)),i.useLayoutEffect((()=>{null==t||t(l.current)})),i.createElement("mesh",(0,r.Z)({ref:l},o),i.createElement(n,{attach:"geometry",args:e}),a)}))}const s=o("box");o("circle"),o("cone"),o("cylinder"),o("sphere"),o("plane"),o("tube"),o("torus"),o("torusKnot"),o("tetrahedron"),o("ring"),o("polyhedron"),o("icosahedron"),o("octahedron"),o("dodecahedron"),o("extrude"),o("lathe"),o("capsule"),o("shape",(({geometry:e})=>{const t=e.attributes.position,n=(new a.Box3).setFromBufferAttribute(t),r=new a.Vector3;n.getSize(r);const i=[];let o=0,s=0,l=0,c=0;for(let e=0;e<t.count;e++)o=t.getX(e),s=t.getY(e),l=(o-n.min.x)/r.x,c=(s-n.min.y)/r.y,i.push(l,c);e.setAttribute("uv",new a.Float32BufferAttribute(i,2))}))},1938:(e,t,n)=>{"use strict";n.d(t,{O:()=>c});var r=n(8715),i=n(9477),a=n(8197),o=n(2145),s=n(4526);const l=e=>Array.isArray(e);function c({files:e=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"],path:t="",preset:n,encoding:c,extensions:u}={}){var d;let h,f=null,p=!1;if(n){if(!(n in s.n))throw new Error("Preset must be one of: "+Object.keys(s.n).join(", "));e=s.n[n],t="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/"}if(p=l(e),h=l(e)?"cube":e.startsWith("data:application/exr")?"exr":e.startsWith("data:application/hdr")?"hdr":null==(d=e.split(".").pop())?void 0:d.toLowerCase(),f=p?i.CubeTextureLoader:"hdr"===h?a.x:"exr"===h?o.I:null,!f)throw new Error("useEnvironment: Unrecognized file extension: "+e);const m=(0,r.D)(f,p?[e]:e,(e=>{null==e.setPath||e.setPath(t),u&&u(e)})),g=p?m[0]:m;return g.mapping=p?i.CubeReflectionMapping:i.EquirectangularReflectionMapping,"colorSpace"in g?g.colorSpace=(null!=c?c:p)?"srgb":"srgb-linear":g.encoding=(null!=c?c:p)?3001:3e3,g}},6227:(e,t,n)=>{"use strict";n.d(t,{L:()=>c});var r=n(4976),i=n(6295),a=n(7607),o=n(8715);let s=null;function l(e,t,n){return a=>{n&&n(a),e&&(s||(s=new r._),s.setDecoderPath("string"==typeof e?e:"https://www.gstatic.com/draco/versioned/decoders/1.5.5/"),a.setDRACOLoader(s)),t&&a.setMeshoptDecoder("function"==typeof i.z?(0,i.z)():i.z)}}function c(e,t=!0,n=!0,r){return(0,o.D)(a.E,e,l(t,n,r))}c.preload=(e,t=!0,n=!0,r)=>o.D.preload(a.E,e,l(t,n,r)),c.clear=e=>o.D.clear(a.E,e)},4526:(e,t,n)=>{"use strict";n.d(t,{n:()=>r});const r={apartment:"lebombo_1k.hdr",city:"potsdamer_platz_1k.hdr",dawn:"kiara_1_dawn_1k.hdr",forest:"forest_slope_1k.hdr",lobby:"st_fagans_interior_1k.hdr",night:"dikhololo_night_1k.hdr",park:"rooitou_park_1k.hdr",studio:"studio_small_03_1k.hdr",sunset:"venice_sunset_1k.hdr",warehouse:"empty_warehouse_01_1k.hdr"}},8198:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});const r=(0,n(9137).g)({},"void main() { }","void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }")},8715:(e,t,n)=>{"use strict";n.d(t,{A:()=>Z,B:()=>v,D:()=>te,E:()=>y,a:()=>ce,b:()=>m,c:()=>D,d:()=>de,e:()=>F,g:()=>he,i:()=>p,j:()=>oe,l:()=>re,n:()=>W,u:()=>g,z:()=>Q});var r,i,a=n(9477),o=n(7294),s=n(2576),l=n(4671),c=n(6525),u=n.n(c),d=n(5431),h=n(4881);const f=e=>e&&e.isOrthographicCamera,p=e=>e&&e.hasOwnProperty("current"),m="undefined"!=typeof window&&(null!=(r=window.document)&&r.createElement||"ReactNative"===(null==(i=window.navigator)?void 0:i.product))?o.useLayoutEffect:o.useEffect;function g(e){const t=o.useRef(e);return m((()=>{t.current=e}),[e]),t}function v({set:e}){return m((()=>(e(new Promise((()=>null))),()=>e(!1))),[e]),null}class y extends o.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}y.getDerivedStateFromError=()=>({error:!0});const b="__default";function _(e){const t="undefined"!=typeof window?window.devicePixelRatio:1;return Array.isArray(e)?Math.min(Math.max(e[0],t),e[1]):e}const x=e=>{var t;return null==(t=e.__r3f)?void 0:t.root.getState()},w={obj:e=>e===Object(e)&&!w.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,boo:e=>"boolean"==typeof e,und:e=>void 0===e,arr:e=>Array.isArray(e),equ(e,t,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof e!=typeof t||!!e!=!!t)return!1;if(w.str(e)||w.num(e))return e===t;const a=w.obj(e);if(a&&"reference"===r)return e===t;const o=w.arr(e);if(o&&"reference"===n)return e===t;if((o||a)&&e===t)return!0;let s;for(s in e)if(!(s in t))return!1;for(s in i?t:e)if(e[s]!==t[s])return!1;if(w.und(s)){if(o&&0===e.length&&0===t.length)return!0;if(a&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;if(e!==t)return!1}return!0}};function M(e,t){const n=e;return(null!=t&&t.primitive||!n.__r3f)&&(n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...t}),e}function S(e,t){let n=e;if(t.includes("-")){const r=t.split("-"),i=r.pop();return n=r.reduce(((e,t)=>e[t]),e),{target:n,key:i}}return{target:n,key:t}}const A=/-\d+$/;function E(e,t,n){if(w.str(n)){if(A.test(n)){const t=n.replace(A,""),{target:r,key:i}=S(e,t);Array.isArray(r[i])||(r[i]=[])}const{target:r,key:i}=S(e,n);t.__r3f.previousAttach=r[i],r[i]=t}else t.__r3f.previousAttach=n(e,t)}function C(e,t,n){var r,i;if(w.str(n)){const{target:r,key:i}=S(e,n),a=t.__r3f.previousAttach;void 0===a?delete r[i]:r[i]=a}else null==(r=t.__r3f)||null==r.previousAttach||r.previousAttach(e,t);null==(i=t.__r3f)||delete i.previousAttach}function T(e,{children:t,key:n,ref:r,...i},{children:a,key:o,ref:s,...l}={},c=!1){var u;const d=null!=(u=null==e?void 0:e.__r3f)?u:{},h=Object.entries(i),f=[];if(c){const e=Object.keys(l);for(let t=0;t<e.length;t++)i.hasOwnProperty(e[t])||h.unshift([e[t],b+"remove"])}h.forEach((([t,n])=>{var r;if(null!=(r=e.__r3f)&&r.primitive&&"object"===t)return;if(w.equ(n,l[t]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(t))return f.push([t,n,!0,[]]);let a=[];t.includes("-")&&(a=t.split("-")),f.push([t,n,!1,a]);for(const e in i){const n=i[e];e.startsWith(`${t}-`)&&f.push([e,n,!1,e.split("-")])}}));const p={...i};return d.memoizedProps&&d.memoizedProps.args&&(p.args=d.memoizedProps.args),d.memoizedProps&&d.memoizedProps.attach&&(p.attach=d.memoizedProps.attach),{memoized:p,changes:f}}function R(e,t){var n,r,i;const o=null!=(n=e.__r3f)?n:{},s=o.root,l=null!=(r=null==s||null==s.getState?void 0:s.getState())?r:{},{memoized:c,changes:u}=(d=t)&&d.memoized&&d.changes?t:T(e,t);var d;const h=o.eventCount;e.__r3f&&(e.__r3f.memoizedProps=c);for(let t=0;t<u.length;t++){let[n,r,i,s]=u[t],d=e,h=d[n];if(s.length&&(h=s.reduce(((e,t)=>e[t]),e),!h||!h.set)){const[t,...r]=s.reverse();d=r.reverse().reduce(((e,t)=>e[t]),e),n=t}var f;if(r===b+"remove")if(h&&h.constructor)r=new h.constructor(...null!=(f=c.args)?f:[]);else if(d.constructor){var p;const e=new d.constructor(...null!=(p=d.__r3f.memoizedProps.args)?p:[]);r=e[h],e.dispose&&e.dispose()}else r=0;if(i)r?o.handlers[n]=r:delete o.handlers[n],o.eventCount=Object.keys(o.handlers).length;else if(h&&h.set&&(h.copy||h instanceof a.Layers)){if(Array.isArray(r))h.fromArray?h.fromArray(r):h.set(...r);else if(h.copy&&r&&r.constructor&&h.constructor.name===r.constructor.name)h.copy(r);else if(void 0!==r){const e=h instanceof a.Color;!e&&h.setScalar?h.setScalar(r):h instanceof a.Layers&&r instanceof a.Layers?h.mask=r.mask:h.set(r)}}else d[n]=r,!l.linear&&d[n]instanceof a.Texture&&(d[n].encoding=a.sRGBEncoding);B(e)}if(o.parent&&l.internal&&e.raycast&&h!==o.eventCount){const t=l.internal.interaction.indexOf(e);t>-1&&l.internal.interaction.splice(t,1),o.eventCount&&l.internal.interaction.push(e)}return u.length&&null!=(i=e.__r3f)&&i.parent&&P(e),e}function B(e){var t,n;const r=null==(t=e.__r3f)||null==(n=t.root)||null==n.getState?void 0:n.getState();r&&0===r.internal.frames&&r.invalidate()}function P(e){null==e.onUpdate||e.onUpdate(e)}function k(e,t){e.manual||(f(e)?(e.left=t.width/-2,e.right=t.width/2,e.top=t.height/2,e.bottom=t.height/-2):e.aspect=t.width/t.height,e.updateProjectionMatrix(),e.updateMatrixWorld())}function I(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function L(e,t,n,r){const i=n.get(t);i&&(n.delete(t),0===n.size&&(e.delete(r),i.target.releasePointerCapture(r)))}function D(e){function t(e){return e.filter((e=>["Move","Over","Enter","Out","Leave"].some((t=>{var n;return null==(n=e.__r3f)?void 0:n.handlers["onPointer"+t]}))))}function n(t){const{internal:n}=e.getState();for(const e of n.hovered.values())if(!t.length||!t.find((t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId))){const r=e.eventObject.__r3f,i=null==r?void 0:r.handlers;if(n.hovered.delete(I(e)),null!=r&&r.eventCount){const n={...e,intersections:t};null==i.onPointerOut||i.onPointerOut(n),null==i.onPointerLeave||i.onPointerLeave(n)}}}function r(e,t){for(let n=0;n<t.length;n++){const r=t[n].__r3f;null==r||null==r.handlers.onPointerMissed||r.handlers.onPointerMissed(e)}}return{handlePointer:function(i){switch(i){case"onPointerLeave":case"onPointerCancel":return()=>n([]);case"onLostPointerCapture":return t=>{const{internal:r}=e.getState();"pointerId"in t&&r.capturedMap.has(t.pointerId)&&(r.capturedMap.delete(t.pointerId),n([]))}}return function(o){const{onPointerMissed:s,internal:l}=e.getState();l.lastEvent.current=o;const c="onPointerMove"===i,u="onClick"===i||"onContextMenu"===i||"onDoubleClick"===i,d=function(t,n){const r=e.getState(),i=new Set,a=[],o=n?n(r.internal.interaction):r.internal.interaction;for(let e=0;e<o.length;e++){const t=x(o[e]);t&&(t.raycaster.camera=void 0)}r.previousRoot||null==r.events.compute||r.events.compute(t,r);let s=o.flatMap((function(e){const n=x(e);return n&&n.events.enabled&&null!==n.raycaster.camera?(void 0===n.raycaster.camera&&(null==n.events.compute||n.events.compute(t,n,null==(r=n.previousRoot)?void 0:r.getState()),void 0===n.raycaster.camera&&(n.raycaster.camera=null)),n.raycaster.camera?n.raycaster.intersectObject(e,!0):[]):[];var r})).sort(((e,t)=>{const n=x(e.object),r=x(t.object);return n&&r&&r.events.priority-n.events.priority||e.distance-t.distance})).filter((e=>{const t=I(e);return!i.has(t)&&(i.add(t),!0)}));r.events.filter&&(s=r.events.filter(s,r));for(const e of s){let t=e.object;for(;t;){var l;null!=(l=t.__r3f)&&l.eventCount&&a.push({...e,eventObject:t}),t=t.parent}}if("pointerId"in t&&r.internal.capturedMap.has(t.pointerId))for(let e of r.internal.capturedMap.get(t.pointerId).values())i.has(I(e.intersection))||a.push(e.intersection);return a}(o,c?t:void 0),h=u?function(t){const{internal:n}=e.getState(),r=t.offsetX-n.initialClick[0],i=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(r*r+i*i))}(o):0;"onPointerDown"===i&&(l.initialClick=[o.offsetX,o.offsetY],l.initialHits=d.map((e=>e.eventObject))),u&&!d.length&&h<=2&&(r(o,l.interaction),s&&s(o)),c&&n(d),function(t,r,i,o){const s=e.getState();if(t.length){const e={stopped:!1};for(const l of t){const c=x(l.object)||s,{raycaster:u,pointer:d,camera:h,internal:f}=c,p=new a.Vector3(d.x,d.y,0).unproject(h),m=e=>{var t,n;return null!=(t=null==(n=f.capturedMap.get(e))?void 0:n.has(l.eventObject))&&t},g=e=>{const t={intersection:l,target:r.target};f.capturedMap.has(e)?f.capturedMap.get(e).set(l.eventObject,t):f.capturedMap.set(e,new Map([[l.eventObject,t]])),r.target.setPointerCapture(e)},v=e=>{const t=f.capturedMap.get(e);t&&L(f.capturedMap,l.eventObject,t,e)};let y={};for(let e in r){let t=r[e];"function"!=typeof t&&(y[e]=t)}let b={...l,...y,pointer:d,intersections:t,stopped:e.stopped,delta:i,unprojectedPoint:p,ray:u.ray,camera:h,stopPropagation(){const i="pointerId"in r&&f.capturedMap.get(r.pointerId);(!i||i.has(l.eventObject))&&(b.stopped=e.stopped=!0,f.hovered.size&&Array.from(f.hovered.values()).find((e=>e.eventObject===l.eventObject)))&&n([...t.slice(0,t.indexOf(l)),l])},target:{hasPointerCapture:m,setPointerCapture:g,releasePointerCapture:v},currentTarget:{hasPointerCapture:m,setPointerCapture:g,releasePointerCapture:v},nativeEvent:r};if(o(b),!0===e.stopped)break}}}(d,o,h,(function(e){const t=e.eventObject,n=t.__r3f,a=null==n?void 0:n.handlers;if(null!=n&&n.eventCount)if(c){if(a.onPointerOver||a.onPointerEnter||a.onPointerOut||a.onPointerLeave){const t=I(e),n=l.hovered.get(t);n?n.stopped&&e.stopPropagation():(l.hovered.set(t,e),null==a.onPointerOver||a.onPointerOver(e),null==a.onPointerEnter||a.onPointerEnter(e))}null==a.onPointerMove||a.onPointerMove(e)}else{const n=a[i];n?u&&!l.initialHits.includes(t)||(r(o,l.interaction.filter((e=>!l.initialHits.includes(e)))),n(e)):u&&l.initialHits.includes(t)&&r(o,l.interaction.filter((e=>!l.initialHits.includes(e))))}}))}}}}let O={},F=e=>{O={...O,...e}};const N=["set","get","setSize","setFrameloop","setDpr","events","invalidate","advance","size","viewport"],z=e=>!(null==e||!e.render),U=o.createContext(null);let H,G=new Set,V=new Set,j=new Set;const W=e=>function(e,t){const n={callback:e};return t.add(n),()=>{t.delete(n)}}(e,G);function J(e,t){if(e.size)for(const{callback:n}of e.values())n(t)}function X(e,t){switch(e){case"before":return J(G,t);case"after":return J(V,t);case"tail":return J(j,t)}}let K,$;function Y(e,t,n){let r=t.clock.getDelta();for("never"===t.frameloop&&"number"==typeof e&&(r=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),K=t.internal.subscribers,H=0;H<K.length;H++)$=K[H],$.ref.current($.store.getState(),r,n);return!t.internal.priority&&t.gl.render&&t.gl.render(t.scene,t.camera),t.internal.frames=Math.max(0,t.internal.frames-1),"always"===t.frameloop?1:t.internal.frames}function q(){const e=o.useContext(U);if(!e)throw new Error("R3F: Hooks can only be used within the Canvas component!");return e}function Q(e=(e=>e),t){return q()(e,t)}function Z(e,t=0){const n=q(),r=n.getState().internal.subscribe,i=g(e);return m((()=>r(i,t,n)),[t,r,n]),null}function ee(e,t){return function(n,...r){const i=new n;return e&&e(i),Promise.all(r.map((e=>new Promise(((n,r)=>i.load(e,(e=>{e.scene&&Object.assign(e,function(e){const t={nodes:{},materials:{}};return e&&e.traverse((e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material)})),t}(e.scene)),n(e)}),t,(t=>r(new Error(`Could not load ${e}: ${t.message})`)))))))))}}function te(e,t,n,r){const i=Array.isArray(t)?t:[t],a=(0,h.Rq)(ee(n,r),[e,...i],{equal:w.equ});return Array.isArray(t)?a:a[0]}te.preload=function(e,t,n){const r=Array.isArray(t)?t:[t];return(0,h.MA)(ee(n),[e,...r])},te.clear=function(e,t){const n=Array.isArray(t)?t:[t];return(0,h.ZH)([e,...n])};const ne=new Map,{invalidate:re,advance:ie}=function(e){let t,n,r,i=!1;function a(o){n=requestAnimationFrame(a),i=!0,t=0,X("before",o);for(const n of e.values()){var s;r=n.store.getState(),!r.internal.active||!("always"===r.frameloop||r.internal.frames>0)||null!=(s=r.gl.xr)&&s.isPresenting||(t+=Y(o,r))}if(X("after",o),0===t)return X("tail",o),i=!1,cancelAnimationFrame(n)}return{loop:a,invalidate:function t(n,r=1){var o;if(!n)return e.forEach((e=>t(e.store.getState())),r);null!=(o=n.gl.xr)&&o.isPresenting||!n.internal.active||"never"===n.frameloop||(n.internal.frames=Math.min(60,n.internal.frames+r),i||(i=!0,requestAnimationFrame(a)))},advance:function(t,n=!0,r,i){if(n&&X("before",t),r)Y(t,r,i);else for(const n of e.values())Y(t,n.store.getState());n&&X("after",t)}}}(ne),{reconciler:ae,applyProps:oe}=function(e,t){function n(e,{args:t=[],attach:n,...r},i){let o,s=`${e[0].toUpperCase()}${e.slice(1)}`;if("primitive"===e){if(void 0===r.object)throw new Error("R3F: Primitives without 'object' are invalid!");o=M(r.object,{type:e,root:i,attach:n,primitive:!0})}else{const r=O[s];if(!r)throw new Error(`R3F: ${s} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(t))throw new Error("R3F: The args prop must be an array!");o=M(new r(...t),{type:e,root:i,attach:n,memoizedProps:{args:t}})}return void 0===o.__r3f.attach&&(o instanceof a.BufferGeometry?o.__r3f.attach="geometry":o instanceof a.Material&&(o.__r3f.attach="material")),"inject"!==s&&R(o,r),o}function r(e,t){let n=!1;var r,i;t&&(null!=(r=t.__r3f)&&r.attach?E(e,t,t.__r3f.attach):t.isObject3D&&e.isObject3D&&(e.add(t),n=!0),n||null==(i=e.__r3f)||i.objects.push(t),t.__r3f||M(t,{}),t.__r3f.parent=e,P(t),B(t))}function i(e,t,n){let r=!1;if(t){var i,a;if(null!=(i=t.__r3f)&&i.attach)E(e,t,t.__r3f.attach);else if(t.isObject3D&&e.isObject3D){t.parent=e,t.dispatchEvent({type:"added"});const i=e.children.filter((e=>e!==t)),a=i.indexOf(n);e.children=[...i.slice(0,a),t,...i.slice(a)],r=!0}r||null==(a=e.__r3f)||a.objects.push(t),t.__r3f||M(t,{}),t.__r3f.parent=e,P(t),B(t)}}function o(e,t,n=!1){e&&[...e].forEach((e=>l(t,e,n)))}function l(e,t,n){if(t){var r,i,a;if(t.__r3f&&(t.__r3f.parent=null),null!=(r=e.__r3f)&&r.objects&&(e.__r3f.objects=e.__r3f.objects.filter((e=>e!==t))),null!=(i=t.__r3f)&&i.attach)C(e,t,t.__r3f.attach);else if(t.isObject3D&&e.isObject3D){var s;e.remove(t),null!=(s=t.__r3f)&&s.root&&function(e,t){const{internal:n}=e.getState();n.interaction=n.interaction.filter((e=>e!==t)),n.initialHits=n.initialHits.filter((e=>e!==t)),n.hovered.forEach(((e,r)=>{e.eventObject!==t&&e.object!==t||n.hovered.delete(r)})),n.capturedMap.forEach(((e,r)=>{L(n.capturedMap,t,e,r)}))}(t.__r3f.root,t)}const c=null==(a=t.__r3f)?void 0:a.primitive,u=void 0===n?null!==t.dispose&&!c:n;var l;c||(o(null==(l=t.__r3f)?void 0:l.objects,t,u),o(t.children,t,u)),t.__r3f&&(delete t.__r3f.root,delete t.__r3f.objects,delete t.__r3f.handlers,delete t.__r3f.memoizedProps,c||delete t.__r3f),u&&t.dispose&&"Scene"!==t.type&&(0,d.unstable_scheduleCallback)(d.unstable_IdlePriority,(()=>{try{t.dispose()}catch(e){}})),B(e)}}const c=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:u()({createInstance:n,removeChild:l,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(e,t)=>{if(!t)return;const n=e.getState().scene;n.__r3f&&(n.__r3f.root=e,r(n,t))},removeChildFromContainer:(e,t)=>{t&&l(e.getState().scene,t)},insertInContainerBefore:(e,t,n)=>{if(!t||!n)return;const r=e.getState().scene;r.__r3f&&i(r,t,n)},getRootHostContext:()=>null,getChildHostContext:e=>e,finalizeInitialChildren(e){var t;const n=null!=(t=null==e?void 0:e.__r3f)?t:{};return Boolean(n.handlers)},prepareUpdate(e,t,n,r){if(e.__r3f.primitive&&r.object&&r.object!==e)return[!0];{const{args:t=[],children:i,...a}=r,{args:o=[],children:s,...l}=n;if(!Array.isArray(t))throw new Error("R3F: the args prop must be an array!");if(t.some(((e,t)=>e!==o[t])))return[!0];const c=T(e,a,l,!0);return c.changes.length?[!1,c]:null}},commitUpdate(e,[t,i],a,o,s,c){t?function(e,t,i,a){var o;const s=null==(o=e.__r3f)?void 0:o.parent;if(!s)return;const c=n(t,i,e.__r3f.root);if(e.children){for(const t of e.children)t.__r3f&&r(c,t);e.children=e.children.filter((e=>!e.__r3f))}e.__r3f.objects.forEach((e=>r(c,e))),e.__r3f.objects=[],e.__r3f.autoRemovedBeforeAppend||l(s,e),c.parent&&(c.__r3f.autoRemovedBeforeAppend=!0),r(s,c),c.raycast&&c.__r3f.eventCount&&c.__r3f.root.getState().internal.interaction.push(c),[a,a.alternate].forEach((e=>{null!==e&&(e.stateNode=c,e.ref&&("function"==typeof e.ref?e.ref(c):e.ref.current=c))}))}(e,a,s,c):R(e,i)},commitMount(e,t,n,r){var i;const a=null!=(i=e.__r3f)?i:{};e.raycast&&a.handlers&&a.eventCount&&e.__r3f.root.getState().internal.interaction.push(e)},getPublicInstance:e=>e,prepareForCommit:()=>null,preparePortalMount:e=>M(e.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(e){var t;const{attach:n,parent:r}=null!=(t=e.__r3f)?t:{};n&&r&&C(r,e,n),e.isObject3D&&(e.visible=!1),B(e)},unhideInstance(e,t){var n;const{attach:r,parent:i}=null!=(n=e.__r3f)?n:{};r&&i&&E(i,e,r),(e.isObject3D&&null==t.visible||t.visible)&&(e.visible=!0),B(e)},createTextInstance:c,hideTextInstance:c,unhideTextInstance:c,getCurrentEventPriority:()=>t?t():s.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:"undefined"!=typeof performance&&w.fun(performance.now)?performance.now:w.fun(Date.now)?Date.now:()=>0,scheduleTimeout:w.fun(setTimeout)?setTimeout:void 0,cancelTimeout:w.fun(clearTimeout)?clearTimeout:void 0}),applyProps:R}}(0,(function(){var e;const t="undefined"!=typeof self&&self||"undefined"!=typeof window&&window;if(!t)return s.DefaultEventPriority;switch(null==(e=t.event)?void 0:e.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return s.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return s.ContinuousEventPriority;default:return s.DefaultEventPriority}})),se={objects:"shallow",strict:!1},le=(e,t)=>{const n="function"==typeof e?e(t):e;return z(n)?n:new a.WebGLRenderer({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0,...e})};function ce(e){const t=ne.get(e),n=null==t?void 0:t.fiber,r=null==t?void 0:t.store;t&&console.warn("R3F.createRoot should only be called once!");const i="function"==typeof reportError?reportError:console.error,c=r||((e,t)=>{const n=(0,l.Z)(((n,r)=>{const i=new a.Vector3,s=new a.Vector3,l=new a.Vector3;function c(e=r().camera,t=s,n=r().size){const{width:o,height:c,top:u,left:d}=n,h=o/c;t instanceof a.Vector3?l.copy(t):l.set(...t);const p=e.getWorldPosition(i).distanceTo(l);if(f(e))return{width:o/e.zoom,height:c/e.zoom,top:u,left:d,factor:1,distance:p,aspect:h};{const t=e.fov*Math.PI/180,n=2*Math.tan(t/2)*p,r=n*(o/c);return{width:r,height:n,top:u,left:d,factor:o/r,distance:p,aspect:h}}}let u;const d=e=>n((t=>({performance:{...t.performance,current:e}}))),h=new a.Vector2,p={set:n,get:r,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,invalidate:(t=1)=>e(r(),t),advance:(e,n)=>t(e,n,r()),legacy:!1,linear:!1,flat:!1,scene:M(new a.Scene),controls:null,clock:new a.Clock,pointer:h,mouse:h,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const e=r();u&&clearTimeout(u),e.performance.current!==e.performance.min&&d(e.performance.min),u=setTimeout((()=>d(r().performance.max)),e.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:c},setEvents:e=>n((t=>({...t,events:{...t.events,...e}}))),setSize:(e,t,i,a,o)=>{const l=r().camera,u={width:e,height:t,top:a||0,left:o||0,updateStyle:i};n((e=>({size:u,viewport:{...e.viewport,...c(l,s,u)}})))},setDpr:e=>n((t=>{const n=_(e);return{viewport:{...t.viewport,dpr:n,initialDpr:t.viewport.initialDpr||n}}})),setFrameloop:(e="always")=>{const t=r().clock;t.stop(),t.elapsedTime=0,"never"!==e&&(t.start(),t.elapsedTime=0),n((()=>({frameloop:e})))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:o.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(e,t,n)=>{const i=r().internal;return i.priority=i.priority+(t>0?1:0),i.subscribers.push({ref:e,priority:t,store:n}),i.subscribers=i.subscribers.sort(((e,t)=>e.priority-t.priority)),()=>{const n=r().internal;null!=n&&n.subscribers&&(n.priority=n.priority-(t>0?1:0),n.subscribers=n.subscribers.filter((t=>t.ref!==e)))}}}};return p})),r=n.getState();let i=r.size,s=r.viewport.dpr,c=r.camera;return n.subscribe((()=>{const{camera:e,size:t,viewport:r,gl:a,set:o}=n.getState();t===i&&r.dpr===s||(i=t,s=r.dpr,k(e,t),a.setPixelRatio(r.dpr),a.setSize(t.width,t.height,t.updateStyle)),e!==c&&(c=e,o((t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}}))))})),n.subscribe((t=>e(t))),n})(re,ie),u=n||ae.createContainer(c,s.ConcurrentRoot,null,!1,null,"",i,null);let d;t||ne.set(e,{fiber:u,store:c});let h=!1;return{configure(t={}){let{gl:n,size:r,events:i,onCreated:o,shadows:s=!1,linear:l=!1,flat:u=!1,legacy:f=!1,orthographic:p=!1,frameloop:m="always",dpr:g=[1,2],performance:v,raycaster:y,camera:b,onPointerMissed:x}=t,M=c.getState(),S=M.gl;M.gl||M.set({gl:S=le(n,e)});let A=M.raycaster;A||M.set({raycaster:A=new a.Raycaster});const{params:E,...C}=y||{};if(w.equ(C,A,se)||oe(A,{...C}),w.equ(E,A.params,se)||oe(A,{params:{...A.params,...E}}),!M.camera){const e=b instanceof a.Camera,t=e?b:p?new a.OrthographicCamera(0,0,0,0,.1,1e3):new a.PerspectiveCamera(75,0,.1,1e3);e||(t.position.z=5,b&&oe(t,b),null!=b&&b.rotation||t.lookAt(0,0,0)),M.set({camera:t})}if(!M.xr){const e=(e,t)=>{const n=c.getState();"never"!==n.frameloop&&ie(e,!0,n,t)},t=()=>{const t=c.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||re(t)},n={connect(){const e=c.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){const e=c.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};S.xr&&n.connect(),M.set({xr:n})}if(S.shadowMap){const e=S.shadowMap.enabled,t=S.shadowMap.type;if(S.shadowMap.enabled=!!s,w.boo(s))S.shadowMap.type=a.PCFSoftShadowMap;else if(w.str(s)){var T;const e={basic:a.BasicShadowMap,percentage:a.PCFShadowMap,soft:a.PCFSoftShadowMap,variance:a.VSMShadowMap};S.shadowMap.type=null!=(T=e[s])?T:a.PCFSoftShadowMap}else w.obj(s)&&Object.assign(S.shadowMap,s);e===S.shadowMap.enabled&&t===S.shadowMap.type||(S.shadowMap.needsUpdate=!0)}!function(e,t,n){const r=n.pop(),i=n.reduce(((e,t)=>e[t]),e);i[r]=t}(a,f,["ColorManagement","legacyMode"]);const R=l?a.LinearEncoding:a.sRGBEncoding,B=u?a.NoToneMapping:a.ACESFilmicToneMapping;S.outputEncoding!==R&&(S.outputEncoding=R),S.toneMapping!==B&&(S.toneMapping=B),M.legacy!==f&&M.set((()=>({legacy:f}))),M.linear!==l&&M.set((()=>({linear:l}))),M.flat!==u&&M.set((()=>({flat:u}))),!n||w.fun(n)||z(n)||w.equ(n,S,se)||oe(S,n),i&&!M.events.handlers&&M.set({events:i(c)}),g&&M.viewport.dpr!==_(g)&&M.setDpr(g);const P=function(e,t){if(t)return t;if(e instanceof HTMLCanvasElement&&e.parentElement){const{width:t,height:n,top:r,left:i}=e.parentElement.getBoundingClientRect();return{width:t,height:n,top:r,left:i}}return{width:0,height:0,top:0,left:0}}(e,r);return w.equ(P,M.size,se)||M.setSize(P.width,P.height,P.updateStyle,P.top,P.left),M.frameloop!==m&&M.setFrameloop(m),M.onPointerMissed||M.set({onPointerMissed:x}),v&&!w.equ(v,M.performance,se)&&M.set((e=>({performance:{...e.performance,...v}}))),d=o,h=!0,this},render(t){return h||this.configure(),ae.updateContainer(o.createElement(ue,{store:c,children:t,onCreated:d,rootElement:e}),u,null,(()=>{})),c},unmount(){de(e)}}}function ue({store:e,children:t,onCreated:n,rootElement:r}){return m((()=>{const t=e.getState();t.set((e=>({internal:{...e.internal,active:!0}}))),n&&n(t),e.getState().events.connected||null==t.events.connect||t.events.connect(r)}),[]),o.createElement(U.Provider,{value:e},t)}function de(e,t){const n=ne.get(e),r=null==n?void 0:n.fiber;if(r){const i=null==n?void 0:n.store.getState();i&&(i.internal.active=!1),ae.updateContainer(null,r,null,(()=>{i&&setTimeout((()=>{try{var n,r,a,o;null==i.events.disconnect||i.events.disconnect(),null==(n=i.gl)||null==(r=n.renderLists)||null==r.dispose||r.dispose(),null==(a=i.gl)||null==a.forceContextLoss||a.forceContextLoss(),null!=(o=i.gl)&&o.xr&&i.xr.disconnect(),function(e){e.dispose&&"Scene"!==e.type&&e.dispose();for(const t in e)null==t.dispose||t.dispose(),delete e[t]}(i),ne.delete(e),t&&t(e)}catch(e){}}),500)}))}}function he(e,t,n){return o.createElement(fe,{key:t.uuid,children:e,container:t,state:n})}function fe({state:e={},children:t,container:n}){const{events:r,size:i,...s}=e,c=q(),[u]=o.useState((()=>new a.Raycaster)),[d]=o.useState((()=>new a.Vector2)),h=o.useCallback(((e,t)=>{const o={...e};let l;if(Object.keys(e).forEach((n=>{(N.includes(n)||e[n]!==t[n])&&delete o[n]})),t&&i){const n=t.camera;l=e.viewport.getCurrentViewport(n,new a.Vector3,i),n!==e.camera&&k(n,i)}return{...o,scene:n,raycaster:u,pointer:d,mouse:d,previousRoot:c,events:{...e.events,...null==t?void 0:t.events,...r},size:{...e.size,...i},viewport:{...e.viewport,...l},...s}}),[e]),[f]=o.useState((()=>{const e=c.getState(),t=(0,l.Z)(((t,a)=>({...e,scene:n,raycaster:u,pointer:d,mouse:d,previousRoot:c,events:{...e.events,...r},size:{...e.size,...i},...s,set:t,get:a,setEvents:e=>t((t=>({...t,events:{...t.events,...e}})))})));return t}));return o.useEffect((()=>{const e=c.subscribe((e=>f.setState((t=>h(e,t)))));return()=>{e(),f.destroy()}}),[]),o.useEffect((()=>{f.setState((e=>h(c.getState(),e)))}),[h]),o.createElement(o.Fragment,null,ae.createPortal(o.createElement(U.Provider,{value:f},t),f,null))}ae.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:o.version}),o.unstable_act},8628:(e,t,n)=>{"use strict";n.d(t,{Xz:()=>h});var r=n(8715),i=n(7462),a=n(7294),o=n(9477),s=n(3460),l=n(3213);n(2576),n(6525),n(5431);const c={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function u(e){const{handlePointer:t}=(0,r.c)(e);return{priority:1,enabled:!0,compute(e,t,n){t.pointer.set(e.offsetX/t.size.width*2-1,-e.offsetY/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(c).reduce(((e,n)=>({...e,[n]:t(n)})),{}),connect:t=>{var n;const{set:r,events:i}=e.getState();null==i.disconnect||i.disconnect(),r((e=>({events:{...e.events,connected:t}}))),Object.entries(null!=(n=i.handlers)?n:[]).forEach((([e,n])=>{const[r,i]=c[e];t.addEventListener(r,n,{passive:i})}))},disconnect:()=>{const{set:t,events:n}=e.getState();var r;n.connected&&(Object.entries(null!=(r=n.handlers)?r:[]).forEach((([e,t])=>{if(n&&n.connected instanceof HTMLElement){const[r]=c[e];n.connected.removeEventListener(r,t)}})),t((e=>({events:{...e.events,connected:void 0}}))))}}}const d=a.forwardRef((function({children:e,fallback:t,resize:n,style:c,gl:d,events:h=u,eventSource:f,eventPrefix:p,shadows:m,linear:g,flat:v,legacy:y,orthographic:b,frameloop:_,dpr:x,performance:w,raycaster:M,camera:S,onPointerMissed:A,onCreated:E,...C},T){a.useMemo((()=>(0,r.e)(o)),[]);const R=(0,l.jn)(),[B,P]=(0,s.Z)({scroll:!0,debounce:{scroll:50,resize:0},...n}),k=a.useRef(null),I=a.useRef(null),[L,D]=a.useState(null);a.useImperativeHandle(T,(()=>k.current));const O=(0,r.u)(A),[F,N]=a.useState(!1),[z,U]=a.useState(!1);if(F)throw F;if(z)throw z;const H=a.useRef(null);P.width>0&&P.height>0&&L&&(H.current||(H.current=(0,r.a)(L)),H.current.configure({gl:d,events:h,shadows:m,linear:g,flat:v,legacy:y,orthographic:b,frameloop:_,dpr:x,performance:w,raycaster:M,camera:S,size:P,onPointerMissed:(...e)=>null==O.current?void 0:O.current(...e),onCreated:e=>{null==e.events.connect||e.events.connect(f?(0,r.i)(f)?f.current:f:I.current),p&&e.setEvents({compute:(e,t)=>{const n=e[p+"X"],r=e[p+"Y"];t.pointer.set(n/t.size.width*2-1,-r/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==E||E(e)}}),H.current.render(a.createElement(R,null,a.createElement(r.E,{set:U},a.createElement(a.Suspense,{fallback:a.createElement(r.B,{set:N})},e))))),(0,r.b)((()=>{D(k.current)}),[]),a.useEffect((()=>{if(L)return()=>(0,r.d)(L)}),[L]);const G=f?"none":"auto";return a.createElement("div",(0,i.Z)({ref:I,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:G,...c}},C),a.createElement("div",{ref:B,style:{width:"100%",height:"100%"}},a.createElement("canvas",{ref:k,style:{display:"block"}},t)))})),h=a.forwardRef((function(e,t){return a.createElement(l.Hn,null,a.createElement(d,(0,i.Z)({},e,{ref:t})))}))},1906:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>a(l,n))c<i&&0>a(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>a(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function x(e){if(g=!1,_(e),!m)if(null!==r(c))m=!0,I(w);else{var t=r(u);null!==t&&L(x,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,y(E),E=-1),p=!0;var a=f;try{for(_(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!R());){var o=h.callback;if("function"==typeof o){h.callback=null,f=h.priorityLevel;var s=o(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(c)&&i(c),_(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&L(x,d.startTime-n),l=!1}return l}finally{h=null,f=a,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var M,S=!1,A=null,E=-1,C=5,T=-1;function R(){return!(t.unstable_now()-T<C)}function B(){if(null!==A){var e=t.unstable_now();T=e;var n=!0;try{n=A(!0,e)}finally{n?M():(S=!1,A=null)}}else S=!1}if("function"==typeof b)M=function(){b(B)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,k=P.port2;P.port1.onmessage=B,M=function(){k.postMessage(null)}}else M=function(){v(B,0)};function I(e){A=e,S||(S=!0,M())}function L(e,n){E=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,I(w))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(u,e),null===r(c)&&e===r(u)&&(g?(y(E),E=-1):g=!0,L(x,a-o))):(e.sortIndex=s,n(c,e),m||p||(m=!0,I(w))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},5431:(e,t,n)=>{"use strict";e.exports=n(1906)},3805:(e,t,n)=>{"use strict";n.d(t,{useDrag:()=>ue,useGesture:()=>de});const r={toVector:(e,t)=>(void 0===e&&(e=t),Array.isArray(e)?e:[e,e]),add:(e,t)=>[e[0]+t[0],e[1]+t[1]],sub:(e,t)=>[e[0]-t[0],e[1]-t[1]],addTo(e,t){e[0]+=t[0],e[1]+=t[1]},subTo(e,t){e[0]-=t[0],e[1]-=t[1]}};function i(e,t,n){return 0===t||Math.abs(t)===1/0?Math.pow(e,5*n):e*t*n/(t+n*e)}function a(e,t,n,r=.15){return 0===r?function(e,t,n){return Math.max(t,Math.min(e,n))}(e,t,n):e<t?-i(t-e,n-t,r)+t:e>n?+i(e-n,n-t,r)+n:e}function o(e,t,n){return(t=function(e){var t=function(e,t){if("object"!=typeof e||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e,"string");return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function s(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function l(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?s(Object(n),!0).forEach((function(t){o(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):s(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const c={pointer:{start:"down",change:"move",end:"up"},mouse:{start:"down",change:"move",end:"up"},touch:{start:"start",change:"move",end:"end"},gesture:{start:"start",change:"change",end:"end"}};function u(e){return e?e[0].toUpperCase()+e.slice(1):""}const d=["enter","leave"];const h=["gotpointercapture","lostpointercapture"];function f(e){let t=e.substring(2).toLowerCase();const n=!!~t.indexOf("passive");n&&(t=t.replace("passive",""));const r=h.includes(t)?"capturecapture":"capture",i=!!~t.indexOf(r);return i&&(t=t.replace("capture","")),{device:t,capture:i,passive:n}}function p(e){return"touches"in e}function m(e){return p(e)?"touch":"pointerType"in e?e.pointerType:"mouse"}function g(e){return p(e)?function(e){return"touchend"===e.type||"touchcancel"===e.type?e.changedTouches:e.targetTouches}(e)[0]:e}function v(e,t){try{const n=t.clientX-e.clientX,r=t.clientY-e.clientY,i=(t.clientX+e.clientX)/2,a=(t.clientY+e.clientY)/2,o=Math.hypot(n,r);return{angle:-180*Math.atan2(n,r)/Math.PI,distance:o,origin:[i,a]}}catch(e){}return null}function y(e,t){const[n,r]=Array.from(e.touches).filter((e=>t.includes(e.identifier)));return v(n,r)}function b(e){const t=g(e);return p(e)?t.identifier:t.pointerId}function _(e){const t=g(e);return[t.clientX,t.clientY]}function x(e){let{deltaX:t,deltaY:n,deltaMode:r}=e;return 1===r?(t*=40,n*=40):2===r&&(t*=800,n*=800),[t,n]}function w(e,...t){return"function"==typeof e?e(...t):e}function M(){}function S(...e){return 0===e.length?M:1===e.length?e[0]:function(){let t;for(const n of e)t=n.apply(this,arguments)||t;return t}}function A(e,t){return Object.assign({},t,e||{})}class E{constructor(e,t,n){this.ctrl=e,this.args=t,this.key=n,this.state||(this.state={},this.computeValues([0,0]),this.computeInitial(),this.init&&this.init(),this.reset())}get state(){return this.ctrl.state[this.key]}set state(e){this.ctrl.state[this.key]=e}get shared(){return this.ctrl.state.shared}get eventStore(){return this.ctrl.gestureEventStores[this.key]}get timeoutStore(){return this.ctrl.gestureTimeoutStores[this.key]}get config(){return this.ctrl.config[this.key]}get sharedConfig(){return this.ctrl.config.shared}get handler(){return this.ctrl.handlers[this.key]}reset(){const{state:e,shared:t,ingKey:n,args:r}=this;t[n]=e._active=e.active=e._blocked=e._force=!1,e._step=[!1,!1],e.intentional=!1,e._movement=[0,0],e._distance=[0,0],e._direction=[0,0],e._delta=[0,0],e._bounds=[[-1/0,1/0],[-1/0,1/0]],e.args=r,e.axis=void 0,e.memo=void 0,e.elapsedTime=e.timeDelta=0,e.direction=[0,0],e.distance=[0,0],e.overflow=[0,0],e._movementBound=[!1,!1],e.velocity=[0,0],e.movement=[0,0],e.delta=[0,0],e.timeStamp=0}start(e){const t=this.state,n=this.config;t._active||(this.reset(),this.computeInitial(),t._active=!0,t.target=e.target,t.currentTarget=e.currentTarget,t.lastOffset=n.from?w(n.from,t):t.offset,t.offset=t.lastOffset,t.startTime=t.timeStamp=e.timeStamp)}computeValues(e){const t=this.state;t._values=e,t.values=this.config.transform(e)}computeInitial(){const e=this.state;e._initial=e._values,e.initial=e.values}compute(e){const{state:t,config:n,shared:i}=this;t.args=this.args;let o=0;if(e&&(t.event=e,n.preventDefault&&e.cancelable&&t.event.preventDefault(),t.type=e.type,i.touches=this.ctrl.pointerIds.size||this.ctrl.touchIds.size,i.locked=!!document.pointerLockElement,Object.assign(i,function(e){const t={};if("buttons"in e&&(t.buttons=e.buttons),"shiftKey"in e){const{shiftKey:n,altKey:r,metaKey:i,ctrlKey:a}=e;Object.assign(t,{shiftKey:n,altKey:r,metaKey:i,ctrlKey:a})}return t}(e)),i.down=i.pressed=i.buttons%2==1||i.touches>0,o=e.timeStamp-t.timeStamp,t.timeStamp=e.timeStamp,t.elapsedTime=t.timeStamp-t.startTime),t._active){const e=t._delta.map(Math.abs);r.addTo(t._distance,e)}this.axisIntent&&this.axisIntent(e);const[s,l]=t._movement,[c,u]=n.threshold,{_step:d,values:h}=t;if(n.hasCustomTransform?(!1===d[0]&&(d[0]=Math.abs(s)>=c&&h[0]),!1===d[1]&&(d[1]=Math.abs(l)>=u&&h[1])):(!1===d[0]&&(d[0]=Math.abs(s)>=c&&Math.sign(s)*c),!1===d[1]&&(d[1]=Math.abs(l)>=u&&Math.sign(l)*u)),t.intentional=!1!==d[0]||!1!==d[1],!t.intentional)return;const f=[0,0];if(n.hasCustomTransform){const[e,t]=h;f[0]=!1!==d[0]?e-d[0]:0,f[1]=!1!==d[1]?t-d[1]:0}else f[0]=!1!==d[0]?s-d[0]:0,f[1]=!1!==d[1]?l-d[1]:0;this.restrictToAxis&&!t._blocked&&this.restrictToAxis(f);const p=t.offset,m=t._active&&!t._blocked||t.active;m&&(t.first=t._active&&!t.active,t.last=!t._active&&t.active,t.active=i[this.ingKey]=t._active,e&&(t.first&&("bounds"in n&&(t._bounds=w(n.bounds,t)),this.setup&&this.setup()),t.movement=f,this.computeOffset()));const[g,v]=t.offset,[[y,b],[_,x]]=t._bounds;t.overflow=[g<y?-1:g>b?1:0,v<_?-1:v>x?1:0],t._movementBound[0]=!!t.overflow[0]&&(!1===t._movementBound[0]?t._movement[0]:t._movementBound[0]),t._movementBound[1]=!!t.overflow[1]&&(!1===t._movementBound[1]?t._movement[1]:t._movementBound[1]);const M=t._active&&n.rubberband||[0,0];if(t.offset=function(e,[t,n],[r,i]){const[[o,s],[l,c]]=e;return[a(t,o,s,r),a(n,l,c,i)]}(t._bounds,t.offset,M),t.delta=r.sub(t.offset,p),this.computeMovement(),m&&(!t.last||o>32)){t.delta=r.sub(t.offset,p);const e=t.delta.map(Math.abs);r.addTo(t.distance,e),t.direction=t.delta.map(Math.sign),t._direction=t._delta.map(Math.sign),!t.first&&o>0&&(t.velocity=[e[0]/o,e[1]/o],t.timeDelta=o)}}emit(){const e=this.state,t=this.shared,n=this.config;if(e._active||this.clean(),(e._blocked||!e.intentional)&&!e._force&&!n.triggerAllEvents)return;const r=this.handler(l(l(l({},t),e),{},{[this.aliasKey]:e.values}));void 0!==r&&(e.memo=r)}clean(){this.eventStore.clean(),this.timeoutStore.clean()}}class C extends E{constructor(...e){super(...e),o(this,"aliasKey","xy")}reset(){super.reset(),this.state.axis=void 0}init(){this.state.offset=[0,0],this.state.lastOffset=[0,0]}computeOffset(){this.state.offset=r.add(this.state.lastOffset,this.state.movement)}computeMovement(){this.state.movement=r.sub(this.state.offset,this.state.lastOffset)}axisIntent(e){const t=this.state,n=this.config;if(!t.axis&&e){const r="object"==typeof n.axisThreshold?n.axisThreshold[m(e)]:n.axisThreshold;t.axis=function([e,t],n){const r=Math.abs(e),i=Math.abs(t);return r>i&&r>n?"x":i>r&&i>n?"y":void 0}(t._movement,r)}t._blocked=(n.lockDirection||!!n.axis)&&!t.axis||!!n.axis&&n.axis!==t.axis}restrictToAxis(e){if(this.config.axis||this.config.lockDirection)switch(this.state.axis){case"x":e[1]=0;break;case"y":e[0]=0}}}const T=e=>e,R={enabled:(e=!0)=>e,eventOptions:(e,t,n)=>l(l({},n.shared.eventOptions),e),preventDefault:(e=!1)=>e,triggerAllEvents:(e=!1)=>e,rubberband(e=0){switch(e){case!0:return[.15,.15];case!1:return[0,0];default:return r.toVector(e)}},from:e=>"function"==typeof e?e:null!=e?r.toVector(e):void 0,transform(e,t,n){const r=e||n.shared.transform;return this.hasCustomTransform=!!r,r||T},threshold:e=>r.toVector(e,0)},B=l(l({},R),{},{axis(e,t,{axis:n}){if(this.lockDirection="lock"===n,!this.lockDirection)return n},axisThreshold:(e=0)=>e,bounds(e={}){if("function"==typeof e)return t=>B.bounds(e(t));if("current"in e)return()=>e.current;if("function"==typeof HTMLElement&&e instanceof HTMLElement)return e;const{left:t=-1/0,right:n=1/0,top:r=-1/0,bottom:i=1/0}=e;return[[t,n],[r,i]]}}),P={ArrowRight:(e,t=1)=>[e*t,0],ArrowLeft:(e,t=1)=>[-1*e*t,0],ArrowUp:(e,t=1)=>[0,-1*e*t],ArrowDown:(e,t=1)=>[0,e*t]},k="undefined"!=typeof window&&window.document&&window.document.createElement;function I(){return k&&"ontouchstart"in window||k&&window.navigator.maxTouchPoints>1}const L={isBrowser:k,gesture:function(){try{return"constructor"in GestureEvent}catch(e){return!1}}(),touch:I(),touchscreen:I(),pointer:k&&"onpointerdown"in window,pointerLock:k&&"exitPointerLock"in window.document},D={mouse:0,touch:0,pen:8},O=l(l({},B),{},{device(e,t,{pointer:{touch:n=!1,lock:r=!1,mouse:i=!1}={}}){return this.pointerLock=r&&L.pointerLock,L.touch&&n?"touch":this.pointerLock?"mouse":L.pointer&&!i?"pointer":L.touch?"touch":"mouse"},preventScrollAxis(e,t,{preventScroll:n}){if(this.preventScrollDelay="number"==typeof n?n:n||void 0===n&&e?250:void 0,L.touchscreen&&!1!==n)return e||(void 0!==n?"y":void 0)},pointerCapture(e,t,{pointer:{capture:n=!0,buttons:r=1,keys:i=!0}={}}){return this.pointerButtons=r,this.keys=i,!this.pointerLock&&"pointer"===this.device&&n},threshold(e,t,{filterTaps:n=!1,tapsThreshold:i=3,axis:a}){const o=r.toVector(e,n?i:a?1:0);return this.filterTaps=n,this.tapsThreshold=i,o},swipe({velocity:e=.5,distance:t=50,duration:n=250}={}){return{velocity:this.transform(r.toVector(e)),distance:this.transform(r.toVector(t)),duration:n}},delay(e=0){switch(e){case!0:return 180;case!1:return 0;default:return e}},axisThreshold:e=>e?l(l({},D),e):D,keyboardDisplacement:(e=10)=>e});function F(e){const[t,n]=e.overflow,[r,i]=e._delta,[a,o]=e._direction;(t<0&&r>0&&a<0||t>0&&r<0&&a>0)&&(e._movement[0]=e._movementBound[0]),(n<0&&i>0&&o<0||n>0&&i<0&&o>0)&&(e._movement[1]=e._movementBound[1])}const N=l(l({},R),{},{device(e,t,{shared:n,pointer:{touch:r=!1}={}}){if(n.target&&!L.touch&&L.gesture)return"gesture";if(L.touch&&r)return"touch";if(L.touchscreen){if(L.pointer)return"pointer";if(L.touch)return"touch"}},bounds(e,t,{scaleBounds:n={},angleBounds:r={}}){const i=e=>{const t=A(w(n,e),{min:-1/0,max:1/0});return[t.min,t.max]},a=e=>{const t=A(w(r,e),{min:-1/0,max:1/0});return[t.min,t.max]};return"function"!=typeof n&&"function"!=typeof r?[i(),a()]:e=>[i(e),a(e)]},threshold(e,t,n){return this.lockDirection="lock"===n.axis,r.toVector(e,this.lockDirection?[.1,3]:0)},modifierKey:e=>void 0===e?"ctrlKey":e,pinchOnWheel:(e=!0)=>e}),z=l(l({},B),{},{mouseOnly:(e=!0)=>e}),U=B,H=B,G=l(l({},B),{},{mouseOnly:(e=!0)=>e}),V=new Map,j=new Map;function W(e){V.set(e.key,e.engine),j.set(e.key,e.resolver)}const J={key:"drag",engine:class extends C{constructor(...e){super(...e),o(this,"ingKey","dragging")}reset(){super.reset();const e=this.state;e._pointerId=void 0,e._pointerActive=!1,e._keyboardActive=!1,e._preventScroll=!1,e._delayed=!1,e.swipe=[0,0],e.tap=!1,e.canceled=!1,e.cancel=this.cancel.bind(this)}setup(){const e=this.state;if(e._bounds instanceof HTMLElement){const t=e._bounds.getBoundingClientRect(),n=e.currentTarget.getBoundingClientRect(),r={left:t.left-n.left+e.offset[0],right:t.right-n.right+e.offset[0],top:t.top-n.top+e.offset[1],bottom:t.bottom-n.bottom+e.offset[1]};e._bounds=B.bounds(r)}}cancel(){const e=this.state;e.canceled||(e.canceled=!0,e._active=!1,setTimeout((()=>{this.compute(),this.emit()}),0))}setActive(){this.state._active=this.state._pointerActive||this.state._keyboardActive}clean(){this.pointerClean(),this.state._pointerActive=!1,this.state._keyboardActive=!1,super.clean()}pointerDown(e){const t=this.config,n=this.state;if(null!=e.buttons&&(Array.isArray(t.pointerButtons)?!t.pointerButtons.includes(e.buttons):-1!==t.pointerButtons&&t.pointerButtons!==e.buttons))return;const r=this.ctrl.setEventIds(e);t.pointerCapture&&e.target.setPointerCapture(e.pointerId),r&&r.size>1&&n._pointerActive||(this.start(e),this.setupPointer(e),n._pointerId=b(e),n._pointerActive=!0,this.computeValues(_(e)),this.computeInitial(),t.preventScrollAxis&&"mouse"!==m(e)?(n._active=!1,this.setupScrollPrevention(e)):t.delay>0?(this.setupDelayTrigger(e),t.triggerAllEvents&&(this.compute(e),this.emit())):this.startPointerDrag(e))}startPointerDrag(e){const t=this.state;t._active=!0,t._preventScroll=!0,t._delayed=!1,this.compute(e),this.emit()}pointerMove(e){const t=this.state,n=this.config;if(!t._pointerActive)return;const i=b(e);if(void 0!==t._pointerId&&i!==t._pointerId)return;const a=_(e);return document.pointerLockElement===e.target?t._delta=[e.movementX,e.movementY]:(t._delta=r.sub(a,t._values),this.computeValues(a)),r.addTo(t._movement,t._delta),this.compute(e),t._delayed&&t.intentional?(this.timeoutStore.remove("dragDelay"),t.active=!1,void this.startPointerDrag(e)):n.preventScrollAxis&&!t._preventScroll?t.axis?t.axis===n.preventScrollAxis||"xy"===n.preventScrollAxis?(t._active=!1,void this.clean()):(this.timeoutStore.remove("startPointerDrag"),void this.startPointerDrag(e)):void 0:void this.emit()}pointerUp(e){this.ctrl.setEventIds(e);try{this.config.pointerCapture&&e.target.hasPointerCapture(e.pointerId)&&e.target.releasePointerCapture(e.pointerId)}catch(e){}const t=this.state,n=this.config;if(!t._active||!t._pointerActive)return;const r=b(e);if(void 0!==t._pointerId&&r!==t._pointerId)return;this.state._pointerActive=!1,this.setActive(),this.compute(e);const[i,a]=t._distance;if(t.tap=i<=n.tapsThreshold&&a<=n.tapsThreshold,t.tap&&n.filterTaps)t._force=!0;else{const[e,r]=t._delta,[i,a]=t._movement,[o,s]=n.swipe.velocity,[l,c]=n.swipe.distance,u=n.swipe.duration;if(t.elapsedTime<u){const n=Math.abs(e/t.timeDelta),u=Math.abs(r/t.timeDelta);n>o&&Math.abs(i)>l&&(t.swipe[0]=Math.sign(e)),u>s&&Math.abs(a)>c&&(t.swipe[1]=Math.sign(r))}}this.emit()}pointerClick(e){!this.state.tap&&e.detail>0&&(e.preventDefault(),e.stopPropagation())}setupPointer(e){const t=this.config,n=t.device;t.pointerLock&&e.currentTarget.requestPointerLock(),t.pointerCapture||(this.eventStore.add(this.sharedConfig.window,n,"change",this.pointerMove.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"end",this.pointerUp.bind(this)),this.eventStore.add(this.sharedConfig.window,n,"cancel",this.pointerUp.bind(this)))}pointerClean(){this.config.pointerLock&&document.pointerLockElement===this.state.currentTarget&&document.exitPointerLock()}preventScroll(e){this.state._preventScroll&&e.cancelable&&e.preventDefault()}setupScrollPrevention(e){this.state._preventScroll=!1,function(e){"persist"in e&&"function"==typeof e.persist&&e.persist()}(e);const t=this.eventStore.add(this.sharedConfig.window,"touch","change",this.preventScroll.bind(this),{passive:!1});this.eventStore.add(this.sharedConfig.window,"touch","end",t),this.eventStore.add(this.sharedConfig.window,"touch","cancel",t),this.timeoutStore.add("startPointerDrag",this.startPointerDrag.bind(this),this.config.preventScrollDelay,e)}setupDelayTrigger(e){this.state._delayed=!0,this.timeoutStore.add("dragDelay",(()=>{this.state._step=[0,0],this.startPointerDrag(e)}),this.config.delay)}keyDown(e){const t=P[e.key];if(t){const n=this.state,i=e.shiftKey?10:e.altKey?.1:1;this.start(e),n._delta=t(this.config.keyboardDisplacement,i),n._keyboardActive=!0,r.addTo(n._movement,n._delta),this.compute(e),this.emit()}}keyUp(e){e.key in P&&(this.state._keyboardActive=!1,this.setActive(),this.compute(e),this.emit())}bind(e){const t=this.config.device;e(t,"start",this.pointerDown.bind(this)),this.config.pointerCapture&&(e(t,"change",this.pointerMove.bind(this)),e(t,"end",this.pointerUp.bind(this)),e(t,"cancel",this.pointerUp.bind(this)),e("lostPointerCapture","",this.pointerUp.bind(this))),this.config.keys&&(e("key","down",this.keyDown.bind(this)),e("key","up",this.keyUp.bind(this))),this.config.filterTaps&&e("click","",this.pointerClick.bind(this),{capture:!0,passive:!1})}},resolver:O},X={key:"hover",engine:class extends C{constructor(...e){super(...e),o(this,"ingKey","hovering")}enter(e){this.config.mouseOnly&&"mouse"!==e.pointerType||(this.start(e),this.computeValues(_(e)),this.compute(e),this.emit())}leave(e){if(this.config.mouseOnly&&"mouse"!==e.pointerType)return;const t=this.state;if(!t._active)return;t._active=!1;const n=_(e);t._movement=t._delta=r.sub(n,t._values),this.computeValues(n),this.compute(e),t.delta=t.movement,this.emit()}bind(e){e("pointer","enter",this.enter.bind(this)),e("pointer","leave",this.leave.bind(this))}},resolver:G},K={key:"move",engine:class extends C{constructor(...e){super(...e),o(this,"ingKey","moving")}move(e){this.config.mouseOnly&&"mouse"!==e.pointerType||(this.state._active?this.moveChange(e):this.moveStart(e),this.timeoutStore.add("moveEnd",this.moveEnd.bind(this)))}moveStart(e){this.start(e),this.computeValues(_(e)),this.compute(e),this.computeInitial(),this.emit()}moveChange(e){if(!this.state._active)return;const t=_(e),n=this.state;n._delta=r.sub(t,n._values),r.addTo(n._movement,n._delta),this.computeValues(t),this.compute(e),this.emit()}moveEnd(e){this.state._active&&(this.state._active=!1,this.compute(e),this.emit())}bind(e){e("pointer","change",this.move.bind(this)),e("pointer","leave",this.moveEnd.bind(this))}},resolver:z},$={key:"pinch",engine:class extends E{constructor(...e){super(...e),o(this,"ingKey","pinching"),o(this,"aliasKey","da")}init(){this.state.offset=[1,0],this.state.lastOffset=[1,0],this.state._pointerEvents=new Map}reset(){super.reset();const e=this.state;e._touchIds=[],e.canceled=!1,e.cancel=this.cancel.bind(this),e.turns=0}computeOffset(){const{type:e,movement:t,lastOffset:n}=this.state;this.state.offset="wheel"===e?r.add(t,n):[(1+t[0])*n[0],t[1]+n[1]]}computeMovement(){const{offset:e,lastOffset:t}=this.state;this.state.movement=[e[0]/t[0],e[1]-t[1]]}axisIntent(){const e=this.state,[t,n]=e._movement;if(!e.axis){const r=30*Math.abs(t)-Math.abs(n);r<0?e.axis="angle":r>0&&(e.axis="scale")}}restrictToAxis(e){this.config.lockDirection&&("scale"===this.state.axis?e[1]=0:"angle"===this.state.axis&&(e[0]=0))}cancel(){const e=this.state;e.canceled||setTimeout((()=>{e.canceled=!0,e._active=!1,this.compute(),this.emit()}),0)}touchStart(e){this.ctrl.setEventIds(e);const t=this.state,n=this.ctrl.touchIds;if(t._active&&t._touchIds.every((e=>n.has(e))))return;if(n.size<2)return;this.start(e),t._touchIds=Array.from(n).slice(0,2);const r=y(e,t._touchIds);r&&this.pinchStart(e,r)}pointerStart(e){if(null!=e.buttons&&e.buttons%2!=1)return;this.ctrl.setEventIds(e),e.target.setPointerCapture(e.pointerId);const t=this.state,n=t._pointerEvents,r=this.ctrl.pointerIds;if(t._active&&Array.from(n.keys()).every((e=>r.has(e))))return;if(n.size<2&&n.set(e.pointerId,e),t._pointerEvents.size<2)return;this.start(e);const i=v(...Array.from(n.values()));i&&this.pinchStart(e,i)}pinchStart(e,t){this.state.origin=t.origin,this.computeValues([t.distance,t.angle]),this.computeInitial(),this.compute(e),this.emit()}touchMove(e){if(!this.state._active)return;const t=y(e,this.state._touchIds);t&&this.pinchMove(e,t)}pointerMove(e){const t=this.state._pointerEvents;if(t.has(e.pointerId)&&t.set(e.pointerId,e),!this.state._active)return;const n=v(...Array.from(t.values()));n&&this.pinchMove(e,n)}pinchMove(e,t){const n=this.state,r=n._values[1],i=t.angle-r;let a=0;Math.abs(i)>270&&(a+=Math.sign(i)),this.computeValues([t.distance,t.angle-360*a]),n.origin=t.origin,n.turns=a,n._movement=[n._values[0]/n._initial[0]-1,n._values[1]-n._initial[1]],this.compute(e),this.emit()}touchEnd(e){this.ctrl.setEventIds(e),this.state._active&&this.state._touchIds.some((e=>!this.ctrl.touchIds.has(e)))&&(this.state._active=!1,this.compute(e),this.emit())}pointerEnd(e){const t=this.state;this.ctrl.setEventIds(e);try{e.target.releasePointerCapture(e.pointerId)}catch(e){}t._pointerEvents.has(e.pointerId)&&t._pointerEvents.delete(e.pointerId),t._active&&t._pointerEvents.size<2&&(t._active=!1,this.compute(e),this.emit())}gestureStart(e){e.cancelable&&e.preventDefault();const t=this.state;t._active||(this.start(e),this.computeValues([e.scale,e.rotation]),t.origin=[e.clientX,e.clientY],this.compute(e),this.emit())}gestureMove(e){if(e.cancelable&&e.preventDefault(),!this.state._active)return;const t=this.state;this.computeValues([e.scale,e.rotation]),t.origin=[e.clientX,e.clientY];const n=t._movement;t._movement=[e.scale-1,e.rotation],t._delta=r.sub(t._movement,n),this.compute(e),this.emit()}gestureEnd(e){this.state._active&&(this.state._active=!1,this.compute(e),this.emit())}wheel(e){const t=this.config.modifierKey;t&&!e[t]||(this.state._active?this.wheelChange(e):this.wheelStart(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this)))}wheelStart(e){this.start(e),this.wheelChange(e)}wheelChange(e){"uv"in e||e.cancelable&&e.preventDefault();const t=this.state;t._delta=[-x(e)[1]/100*t.offset[0],0],r.addTo(t._movement,t._delta),F(t),this.state.origin=[e.clientX,e.clientY],this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){const t=this.config.device;t&&(e(t,"start",this[t+"Start"].bind(this)),e(t,"change",this[t+"Move"].bind(this)),e(t,"end",this[t+"End"].bind(this)),e(t,"cancel",this[t+"End"].bind(this)),e("lostPointerCapture","",this[t+"End"].bind(this))),this.config.pinchOnWheel&&e("wheel","",this.wheel.bind(this),{passive:!1})}},resolver:N},Y={key:"scroll",engine:class extends C{constructor(...e){super(...e),o(this,"ingKey","scrolling")}scroll(e){this.state._active||this.start(e),this.scrollChange(e),this.timeoutStore.add("scrollEnd",this.scrollEnd.bind(this))}scrollChange(e){e.cancelable&&e.preventDefault();const t=this.state,n=function(e){var t,n;const{scrollX:r,scrollY:i,scrollLeft:a,scrollTop:o}=e.currentTarget;return[null!==(t=null!=r?r:a)&&void 0!==t?t:0,null!==(n=null!=i?i:o)&&void 0!==n?n:0]}(e);t._delta=r.sub(n,t._values),r.addTo(t._movement,t._delta),this.computeValues(n),this.compute(e),this.emit()}scrollEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("scroll","",this.scroll.bind(this))}},resolver:U},q={key:"wheel",engine:class extends C{constructor(...e){super(...e),o(this,"ingKey","wheeling")}wheel(e){this.state._active||this.start(e),this.wheelChange(e),this.timeoutStore.add("wheelEnd",this.wheelEnd.bind(this))}wheelChange(e){const t=this.state;t._delta=x(e),r.addTo(t._movement,t._delta),F(t),this.compute(e),this.emit()}wheelEnd(){this.state._active&&(this.state._active=!1,this.compute(),this.emit())}bind(e){e("wheel","",this.wheel.bind(this))}},resolver:H};var Q=n(7294);const Z={target(e){if(e)return()=>"current"in e?e.current:e},enabled:(e=!0)=>e,window:(e=(L.isBrowser?window:void 0))=>e,eventOptions:({passive:e=!0,capture:t=!1}={})=>({passive:e,capture:t}),transform:e=>e},ee=["target","eventOptions","window","enabled","transform"];function te(e={},t){const n={};for(const[r,i]of Object.entries(t))switch(typeof i){case"function":n[r]=i.call(n,e[r],r,e);break;case"object":n[r]=te(e[r],i);break;case"boolean":i&&(n[r]=e[r])}return n}class ne{constructor(e,t){o(this,"_listeners",new Set),this._ctrl=e,this._gestureKey=t}add(e,t,n,r,i){const a=this._listeners,o=function(e,t=""){const n=c[e];return e+(n&&n[t]||t)}(t,n),s=l(l({},this._gestureKey?this._ctrl.config[this._gestureKey].eventOptions:{}),i);e.addEventListener(o,r,s);const u=()=>{e.removeEventListener(o,r,s),a.delete(u)};return a.add(u),u}clean(){this._listeners.forEach((e=>e())),this._listeners.clear()}}class re{constructor(){o(this,"_timeouts",new Map)}add(e,t,n=140,...r){this.remove(e),this._timeouts.set(e,window.setTimeout(t,n,...r))}remove(e){const t=this._timeouts.get(e);t&&window.clearTimeout(t)}clean(){this._timeouts.forEach((e=>{window.clearTimeout(e)})),this._timeouts.clear()}}class ie{constructor(e){var t,n;o(this,"gestures",new Set),o(this,"_targetEventStore",new ne(this)),o(this,"gestureEventStores",{}),o(this,"gestureTimeoutStores",{}),o(this,"handlers",{}),o(this,"config",{}),o(this,"pointerIds",new Set),o(this,"touchIds",new Set),o(this,"state",{shared:{shiftKey:!1,metaKey:!1,ctrlKey:!1,altKey:!1}}),t=this,(n=e).drag&&ae(t,"drag"),n.wheel&&ae(t,"wheel"),n.scroll&&ae(t,"scroll"),n.move&&ae(t,"move"),n.pinch&&ae(t,"pinch"),n.hover&&ae(t,"hover")}setEventIds(e){return p(e)?(this.touchIds=new Set(function(e){return function(e){return Array.from(e.touches).filter((t=>{var n,r;return t.target===e.currentTarget||(null===(n=e.currentTarget)||void 0===n||null===(r=n.contains)||void 0===r?void 0:r.call(n,t.target))}))}(e).map((e=>e.identifier))}(e)),this.touchIds):"pointerId"in e?("pointerup"===e.type||"pointercancel"===e.type?this.pointerIds.delete(e.pointerId):"pointerdown"===e.type&&this.pointerIds.add(e.pointerId),this.pointerIds):void 0}applyHandlers(e,t){this.handlers=e,this.nativeHandlers=t}applyConfig(e,t){this.config=function(e,t,n={}){const r=e,{target:i,eventOptions:a,window:o,enabled:s,transform:c}=r,u=function(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}(r,ee);if(n.shared=te({target:i,eventOptions:a,window:o,enabled:s,transform:c},Z),t){const e=j.get(t);n[t]=te(l({shared:n.shared},u),e)}else for(const e in u){const t=j.get(e);t&&(n[e]=te(l({shared:n.shared},u[e]),t))}return n}(e,t,this.config)}clean(){this._targetEventStore.clean();for(const e of this.gestures)this.gestureEventStores[e].clean(),this.gestureTimeoutStores[e].clean()}effect(){return this.config.shared.target&&this.bind(),()=>this._targetEventStore.clean()}bind(...e){const t=this.config.shared,n={};let r;if(!t.target||(r=t.target(),r)){if(t.enabled){for(const t of this.gestures){const i=this.config[t],a=oe(n,i.eventOptions,!!r);i.enabled&&new(V.get(t))(this,e,t).bind(a)}const i=oe(n,t.eventOptions,!!r);for(const t in this.nativeHandlers)i(t,"",(n=>this.nativeHandlers[t](l(l({},this.state.shared),{},{event:n,args:e}))),void 0,!0)}for(const e in n)n[e]=S(...n[e]);if(!r)return n;for(const e in n){const{device:t,capture:i,passive:a}=f(e);this._targetEventStore.add(r,t,"",n[e],{capture:i,passive:a})}}}}function ae(e,t){e.gestures.add(t),e.gestureEventStores[t]=new ne(e,t),e.gestureTimeoutStores[t]=new re}const oe=(e,t,n)=>(r,i,a,o={},s=!1)=>{var l,h;const f=null!==(l=o.capture)&&void 0!==l?l:t.capture,p=null!==(h=o.passive)&&void 0!==h?h:t.passive;let m=s?r:function(e,t="",n=!1){const r=c[e],i=r&&r[t]||t;return"on"+u(e)+u(i)+(function(e=!1,t){return e&&!d.includes(t)}(n,i)?"Capture":"")}(r,i,f);n&&p&&(m+="Passive"),e[m]=e[m]||[],e[m].push(a)},se=/^on(Drag|Wheel|Scroll|Move|Pinch|Hover)/;function le(e,t,n,r,i,a){if(!e.has(n))return;if(!V.has(r))return;const o=n+"Start",s=n+"End";i[r]=e=>{let r;return e.first&&o in t&&t[o](e),n in t&&(r=t[n](e)),e.last&&s in t&&t[s](e),r},a[r]=a[r]||{}}function ce(e,t={},n,r){const i=Q.useMemo((()=>new ie(e)),[]);if(i.applyHandlers(e,r),i.applyConfig(t,n),Q.useEffect(i.effect.bind(i)),Q.useEffect((()=>i.clean.bind(i)),[]),void 0===t.target)return i.bind.bind(i)}function ue(e,t){return W(J),ce({drag:e},t||{},"drag")}function de(e,t){const n=([J,$,Y,q,K,X].forEach(W),function(e,t){const{handlers:n,nativeHandlers:r,config:i}=function(e,t){const[n,r,i]=function(e){const t={},n={},r=new Set;for(let i in e)se.test(i)?(r.add(RegExp.lastMatch),n[i]=e[i]):t[i]=e[i];return[n,t,r]}(e),a={};return le(i,n,"onDrag","drag",a,t),le(i,n,"onWheel","wheel",a,t),le(i,n,"onScroll","scroll",a,t),le(i,n,"onPinch","pinch",a,t),le(i,n,"onMove","move",a,t),le(i,n,"onHover","hover",a,t),{handlers:a,config:t,nativeHandlers:r}}(e,t||{});return ce(n,i,void 0,r)});return n(e,t||{})}},1052:e=>{"use strict";e.exports=function(e,t){if(null==e)throw new TypeError("expected first argument to be an object.");if(void 0===t||"undefined"==typeof Symbol)return e;if("function"!=typeof Object.getOwnPropertySymbols)return e;for(var n=Object.prototype.propertyIsEnumerable,r=Object(e),i=arguments.length,a=0;++a<i;)for(var o=Object(arguments[a]),s=Object.getOwnPropertySymbols(o),l=0;l<s.length;l++){var c=s[l];n.call(o,c)&&(r[c]=o[c])}return r}},8363:(e,t)=>{"use strict";t.Z=function(e,t){if(e&&t){var n=Array.isArray(t)?t:t.split(","),r=e.name||"",i=(e.type||"").toLowerCase(),a=i.replace(/\/.*$/,"");return n.some((function(e){var t=e.trim().toLowerCase();return"."===t.charAt(0)?r.toLowerCase().endsWith(t):t.endsWith("/*")?a===t.replace(/\/.*$/,""):i===t}))}return!0}},296:e=>{function t(e,t,n){var r,i,a,o,s;function l(){var c=Date.now()-o;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(s=e.apply(a,i),a=i=null))}null==t&&(t=100);var c=function(){a=this,i=arguments,o=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(s=e.apply(a,i),a=i=null),s};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(s=e.apply(a,i),a=i=null,clearTimeout(r),r=null)},c}t.debounce=t,e.exports=t},6919:(e,t,n)=>{"use strict";var r=n(6104),i=n(1052);function a(e,t){for(var n in t)c(t,n)&&(e[n]=t[n])}function o(e){return e&&"string"==typeof e}function s(e){var t={};for(var n in e)t[n]=e[n];return t}function l(e){return e&&"object"==typeof e||r(e)}function c(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=Object.assign||function(e){if(null==e)throw new TypeError("Cannot convert undefined or null to object");l(e)||(e={});for(var t=1;t<arguments.length;t++){var n=arguments[t];o(n)&&(n=s(n)),l(n)&&(a(e,n),i(e,n))}return e}},6104:(e,t,n)=>{"use strict";var r=n(5299);e.exports=function(e){return r(e)||"function"==typeof e||Array.isArray(e)}},3778:(e,t,n)=>{"use strict";n.d(t,{HT:()=>T});var r=Uint8Array,i=Uint16Array,a=Uint32Array,o=new r([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,0,0,0]),s=new r([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,0,0]),l=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),c=function(e,t){for(var n=new i(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var o=new a(n[30]);for(r=1;r<30;++r)for(var s=n[r];s<n[r+1];++s)o[s]=s-n[r]<<5|r;return[n,o]},u=c(o,2),d=u[0],h=u[1];d[28]=258,h[258]=28;for(var f=c(s,0),p=f[0],m=(f[1],new i(32768)),g=0;g<32768;++g){var v=(43690&g)>>>1|(21845&g)<<1;v=(61680&(v=(52428&v)>>>2|(13107&v)<<2))>>>4|(3855&v)<<4,m[g]=((65280&v)>>>8|(255&v)<<8)>>>1}var y=function(e,t,n){for(var r=e.length,a=0,o=new i(t);a<r;++a)++o[e[a]-1];var s,l=new i(t);for(a=0;a<t;++a)l[a]=l[a-1]+o[a-1]<<1;if(n){s=new i(1<<t);var c=15-t;for(a=0;a<r;++a)if(e[a])for(var u=a<<4|e[a],d=t-e[a],h=l[e[a]-1]++<<d,f=h|(1<<d)-1;h<=f;++h)s[m[h]>>>c]=u}else for(s=new i(r),a=0;a<r;++a)e[a]&&(s[a]=m[l[e[a]-1]++]>>>15-e[a]);return s},b=new r(288);for(g=0;g<144;++g)b[g]=8;for(g=144;g<256;++g)b[g]=9;for(g=256;g<280;++g)b[g]=7;for(g=280;g<288;++g)b[g]=8;var _=new r(32);for(g=0;g<32;++g)_[g]=5;var x=y(b,9,1),w=y(_,5,1),M=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},S=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},A=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},E=function(e,t,n){var c=e.length;if(!c||n&&!n.l&&c<5)return t||new r(0);var u=!t||n,h=!n||n.i;n||(n={}),t||(t=new r(3*c));var f,m=function(e){var n=t.length;if(e>n){var i=new r(Math.max(2*n,e));i.set(t),t=i}},g=n.f||0,v=n.p||0,b=n.b||0,_=n.l,E=n.d,C=n.m,T=n.n,R=8*c;do{if(!_){n.f=g=S(e,v,1);var B=S(e,v+1,3);if(v+=3,!B){var P=e[(f=v,(G=(f/8|0)+(7&f&&1)+4)-4)]|e[G-3]<<8,k=G+P;if(k>c){if(h)throw"unexpected EOF";break}u&&m(b+P),t.set(e.subarray(G,k),b),n.b=b+=P,n.p=v=8*k;continue}if(1==B)_=x,E=w,C=9,T=5;else{if(2!=B)throw"invalid block type";var I=S(e,v,31)+257,L=S(e,v+10,15)+4,D=I+S(e,v+5,31)+1;v+=14;for(var O=new r(D),F=new r(19),N=0;N<L;++N)F[l[N]]=S(e,v+3*N,7);v+=3*L;var z=M(F),U=(1<<z)-1,H=y(F,z,1);for(N=0;N<D;){var G,V=H[S(e,v,U)];if(v+=15&V,(G=V>>>4)<16)O[N++]=G;else{var j=0,W=0;for(16==G?(W=3+S(e,v,3),v+=2,j=O[N-1]):17==G?(W=3+S(e,v,7),v+=3):18==G&&(W=11+S(e,v,127),v+=7);W--;)O[N++]=j}}var J=O.subarray(0,I),X=O.subarray(I);C=M(J),T=M(X),_=y(J,C,1),E=y(X,T,1)}if(v>R){if(h)throw"unexpected EOF";break}}u&&m(b+131072);for(var K=(1<<C)-1,$=(1<<T)-1,Y=v;;Y=v){var q=(j=_[A(e,v)&K])>>>4;if((v+=15&j)>R){if(h)throw"unexpected EOF";break}if(!j)throw"invalid length/literal";if(q<256)t[b++]=q;else{if(256==q){Y=v,_=null;break}var Q=q-254;if(q>264){var Z=o[N=q-257];Q=S(e,v,(1<<Z)-1)+d[N],v+=Z}var ee=E[A(e,v)&$],te=ee>>>4;if(!ee)throw"invalid distance";if(v+=15&ee,X=p[te],te>3&&(Z=s[te],X+=A(e,v)&(1<<Z)-1,v+=Z),v>R){if(h)throw"unexpected EOF";break}u&&m(b+131072);for(var ne=b+Q;b<ne;b+=4)t[b]=t[b-X],t[b+1]=t[b+1-X],t[b+2]=t[b+2-X],t[b+3]=t[b+3-X];b=ne}}n.l=_,n.p=Y,n.b=b,_&&(g=1,n.m=C,n.d=E,n.n=T)}while(!g);return b==t.length?t:function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var o=new(e instanceof i?i:e instanceof a?a:r)(n-t);return o.set(e.subarray(t,n)),o}(t,0,b)},C=new r(0);function T(e,t){return E((function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"}(e),e.subarray(2,-4)),t)}var R="undefined"!=typeof TextDecoder&&new TextDecoder;try{R.decode(C,{stream:!0})}catch(e){}},2561:e=>{"use strict";e.exports=function(e,t,n){for(var r in e)if(!1===t.call(n,e[r],r,e))break}},3200:e=>{function t(e){return e?Array.isArray(e)?e.join("."):e:""}e.exports=function(e,n,r,i,a){if(null===(o=e)||"object"!=typeof o&&"function"!=typeof o||!n)return e;var o;if(n=t(n),r&&(n+="."+t(r)),i&&(n+="."+t(i)),a&&(n+="."+t(a)),n in e)return e[n];for(var s=n.split("."),l=s.length,c=-1;e&&++c<l;){for(var u=s[c];"\\"===u[u.length-1];)u=u.slice(0,-1)+"."+s[++c];e=e[u]}return e}},9975:(e,t,n)=>{"use strict";n.d(t,{_Z:()=>Se});var r,i,a,o,s,l,c,u,d=n(5317),h={},f=180/Math.PI,p=Math.PI/180,m=Math.atan2,g=/([A-Z])/g,v=/(left|right|width|margin|padding|x)/i,y=/[\s,\(]\S/,b={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},_=function(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},x=function(e,t){return t.set(t.t,t.p,1===e?t.e:Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},w=function(e,t){return t.set(t.t,t.p,e?Math.round(1e4*(t.s+t.c*e))/1e4+t.u:t.b,t)},M=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},S=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},A=function(e,t){return t.set(t.t,t.p,1!==e?t.b:t.e,t)},E=function(e,t,n){return e.style[t]=n},C=function(e,t,n){return e.style.setProperty(t,n)},T=function(e,t,n){return e._gsap[t]=n},R=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},B=function(e,t,n,r,i){var a=e._gsap;a.scaleX=a.scaleY=n,a.renderTransform(i,a)},P=function(e,t,n,r,i){var a=e._gsap;a[t]=n,a.renderTransform(i,a)},k="transform",I=k+"Origin",L=function(e,t){var n=this,r=this.target,i=r.style;if(e in h){if(this.tfm=this.tfm||{},"transform"!==e&&(~(e=b[e]||e).indexOf(",")?e.split(",").forEach((function(e){return n.tfm[e]=Q(r,e)})):this.tfm[e]=r._gsap.x?r._gsap[e]:Q(r,e)),this.props.indexOf(k)>=0)return;r._gsap.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(I,t,"")),e=k}(i||t)&&this.props.push(e,t,i[e])},D=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},O=function(){var e,t,n=this.props,r=this.target,i=r.style,a=r._gsap;for(e=0;e<n.length;e+=3)n[e+1]?r[n[e]]=n[e+2]:n[e+2]?i[n[e]]=n[e+2]:i.removeProperty(n[e].replace(g,"-$1").toLowerCase());if(this.tfm){for(t in this.tfm)a[t]=this.tfm[t];a.svg&&(a.renderTransform(),r.setAttribute("data-svg-origin",this.svgo||"")),!(e=c())||e.isStart||i[k]||(D(i),a.uncache=1)}},F=function(e,t){var n={target:e,props:[],revert:O,save:L};return t&&t.split(",").forEach((function(e){return n.save(e)})),n},N=function(e,t){var n=i.createElementNS?i.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):i.createElement(e);return n.style?n:i.createElement(e)},z=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(g,"-$1").toLowerCase())||i.getPropertyValue(n)||!r&&e(t,H(n)||n,1)||""},U="O,Moz,ms,Ms,Webkit".split(","),H=function(e,t,n){var r=(t||s).style,i=5;if(e in r&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(U[i]+e in r););return i<0?null:(3===i?"ms":i>=0?U[i]:"")+e},G=function(){"undefined"!=typeof window&&window.document&&(r=window,i=r.document,a=i.documentElement,s=N("div")||{style:{}},N("div"),k=H(k),I=k+"Origin",s.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",u=!!H("perspective"),c=d.p8.core.reverting,o=1)},V=function e(t){var n,r=N("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,o=this.nextSibling,s=this.style.cssText;if(a.appendChild(r),r.appendChild(this),this.style.display="block",t)try{n=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=e}catch(e){}else this._gsapBBox&&(n=this._gsapBBox());return i&&(o?i.insertBefore(this,o):i.appendChild(this)),a.removeChild(r),this.style.cssText=s,n},j=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},W=function(e){var t;try{t=e.getBBox()}catch(n){t=V.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===V||(t=V.call(e,!0)),!t||t.width||t.x||t.y?t:{x:+j(e,["x","cx","x1"])||0,y:+j(e,["y","cy","y1"])||0,width:0,height:0}},J=function(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!W(e))},X=function(e,t){if(t){var n=e.style;t in h&&t!==I&&(t=k),n.removeProperty?("ms"!==t.substr(0,2)&&"webkit"!==t.substr(0,6)||(t="-"+t),n.removeProperty(t.replace(g,"-$1").toLowerCase())):n.removeAttribute(t)}},K=function(e,t,n,r,i,a){var o=new d.Fo(e._pt,t,n,0,1,a?A:S);return e._pt=o,o.b=r,o.e=i,e._props.push(n),o},$={deg:1,rad:1,turn:1},Y={grid:1,flex:1},q=function e(t,n,r,a){var o,l,c,u,f=parseFloat(r)||0,p=(r+"").trim().substr((f+"").length)||"px",m=s.style,g=v.test(n),y="svg"===t.tagName.toLowerCase(),b=(y?"client":"offset")+(g?"Width":"Height"),_=100,x="px"===a,w="%"===a;return a===p||!f||$[a]||$[p]?f:("px"!==p&&!x&&(f=e(t,n,r,"px")),u=t.getCTM&&J(t),!w&&"%"!==p||!h[n]&&!~n.indexOf("adius")?(m[g?"width":"height"]=_+(x?p:a),l=~n.indexOf("adius")||"em"===a&&t.appendChild&&!y?t:t.parentNode,u&&(l=(t.ownerSVGElement||{}).parentNode),l&&l!==i&&l.appendChild||(l=i.body),(c=l._gsap)&&w&&c.width&&g&&c.time===d.xr.time&&!c.uncache?(0,d.Pr)(f/c.width*_):((w||"%"===p)&&!Y[z(l,"display")]&&(m.position=z(t,"position")),l===t&&(m.position="static"),l.appendChild(s),o=s[b],l.removeChild(s),m.position="absolute",g&&w&&((c=(0,d.DY)(l)).time=d.xr.time,c.width=l[b]),(0,d.Pr)(x?o*f/_:o&&f?_/o*f:0))):(o=u?t.getBBox()[g?"width":"height"]:t[b],(0,d.Pr)(w?f/o*_:f/100*o)))},Q=function(e,t,n,r){var i;return o||G(),t in b&&"transform"!==t&&~(t=b[t]).indexOf(",")&&(t=t.split(",")[0]),h[t]&&"transform"!==t?(i=ce(e,r),i="transformOrigin"!==t?i[t]:i.svg?i.origin:ue(z(e,I))+" "+i.zOrigin+"px"):(!(i=e.style[t])||"auto"===i||r||~(i+"").indexOf("calc("))&&(i=ne[t]&&ne[t](e,t,n)||z(e,t)||(0,d.Ok)(e,t)||("opacity"===t?1:0)),n&&!~(i+"").trim().indexOf(" ")?q(e,t,i,n)+n:i},Z=function(e,t,n,r){if(!n||"none"===n){var i=H(t,e,1),a=i&&z(e,i,1);a&&a!==n?(t=i,n=a):"borderColor"===t&&(n=z(e,"borderTopColor"))}var o,s,l,c,u,h,f,p,m,g,v,y=new d.Fo(this._pt,e.style,t,0,1,d.Ks),b=0,_=0;if(y.b=n,y.e=r,n+="","auto"==(r+="")&&(e.style[t]=r,r=z(e,t)||r,e.style[t]=n),o=[n,r],(0,d.kr)(o),r=o[1],l=(n=o[0]).match(d.d4)||[],(r.match(d.d4)||[]).length){for(;s=d.d4.exec(r);)f=s[0],m=r.substring(b,s.index),u?u=(u+1)%5:"rgba("!==m.substr(-5)&&"hsla("!==m.substr(-5)||(u=1),f!==(h=l[_++]||"")&&(c=parseFloat(h)||0,v=h.substr((c+"").length),"="===f.charAt(1)&&(f=(0,d.cy)(c,f)+v),p=parseFloat(f),g=f.substr((p+"").length),b=d.d4.lastIndex-g.length,g||(g=g||d.Fc.units[t]||v,b===r.length&&(r+=g,y.e+=g)),v!==g&&(c=q(e,t,h,g)||0),y._pt={_next:y._pt,p:m||1===_?m:",",s:c,c:p-c,m:u&&u<4||"zIndex"===t?Math.round:0});y.c=b<r.length?r.substring(b,r.length):""}else y.r="display"===t&&"none"===r?A:S;return d.bQ.test(r)&&(y.e=0),this._pt=y,y},ee={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},te=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n,r,i,a=t.t,o=a.style,s=t.u,l=a._gsap;if("all"===s||!0===s)o.cssText="",r=1;else for(i=(s=s.split(",")).length;--i>-1;)n=s[i],h[n]&&(r=1,n="transformOrigin"===n?I:k),X(a,n);r&&(X(a,k),l&&(l.svg&&a.removeAttribute("transform"),ce(a,1),l.uncache=1,D(o)))}},ne={clearProps:function(e,t,n,r,i){if("isFromStart"!==i.data){var a=e._pt=new d.Fo(e._pt,t,n,0,0,te);return a.u=r,a.pr=-10,a.tween=i,e._props.push(n),1}}},re=[1,0,0,1,0,0],ie={},ae=function(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},oe=function(e){var t=z(e,k);return ae(t)?re:t.substr(7).match(d.SI).map(d.Pr)},se=function(e,t){var n,r,i,o,s=e._gsap||(0,d.DY)(e),l=e.style,c=oe(e);return s.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(c=[(i=e.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?re:c:(c!==re||e.offsetParent||e===a||s.svg||(i=l.display,l.display="block",(n=e.parentNode)&&e.offsetParent||(o=1,r=e.nextElementSibling,a.appendChild(e)),c=oe(e),i?l.display=i:X(e,"display"),o&&(r?n.insertBefore(e,r):n?n.appendChild(e):a.removeChild(e))),t&&c.length>6?[c[0],c[1],c[4],c[5],c[12],c[13]]:c)},le=function(e,t,n,r,i,a){var o,s,l,c=e._gsap,u=i||se(e,!0),d=c.xOrigin||0,h=c.yOrigin||0,f=c.xOffset||0,p=c.yOffset||0,m=u[0],g=u[1],v=u[2],y=u[3],b=u[4],_=u[5],x=t.split(" "),w=parseFloat(x[0])||0,M=parseFloat(x[1])||0;n?u!==re&&(s=m*y-g*v)&&(l=w*(-g/s)+M*(m/s)-(m*_-g*b)/s,w=w*(y/s)+M*(-v/s)+(v*_-y*b)/s,M=l):(w=(o=W(e)).x+(~x[0].indexOf("%")?w/100*o.width:w),M=o.y+(~(x[1]||x[0]).indexOf("%")?M/100*o.height:M)),r||!1!==r&&c.smooth?(b=w-d,_=M-h,c.xOffset=f+(b*m+_*v)-b,c.yOffset=p+(b*g+_*y)-_):c.xOffset=c.yOffset=0,c.xOrigin=w,c.yOrigin=M,c.smooth=!!r,c.origin=t,c.originIsAbsolute=!!n,e.style[I]="0px 0px",a&&(K(a,c,"xOrigin",d,w),K(a,c,"yOrigin",h,M),K(a,c,"xOffset",f,c.xOffset),K(a,c,"yOffset",p,c.yOffset)),e.setAttribute("data-svg-origin",w+" "+M)},ce=function(e,t){var n=e._gsap||new d.l1(e);if("x"in n&&!t&&!n.uncache)return n;var r,i,a,o,s,l,c,h,g,v,y,b,_,x,w,M,S,A,E,C,T,R,B,P,L,D,O,F,N,U,H,G,V=e.style,j=n.scaleX<0,W="px",X="deg",K=getComputedStyle(e),$=z(e,I)||"0";return r=i=a=l=c=h=g=v=y=0,o=s=1,n.svg=!(!e.getCTM||!J(e)),K.translate&&("none"===K.translate&&"none"===K.scale&&"none"===K.rotate||(V[k]=("none"!==K.translate?"translate3d("+(K.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==K.rotate?"rotate("+K.rotate+") ":"")+("none"!==K.scale?"scale("+K.scale.split(" ").join(",")+") ":"")+("none"!==K[k]?K[k]:"")),V.scale=V.rotate=V.translate="none"),x=se(e,n.svg),n.svg&&(n.uncache?(L=e.getBBox(),$=n.xOrigin-L.x+"px "+(n.yOrigin-L.y)+"px",P=""):P=!t&&e.getAttribute("data-svg-origin"),le(e,P||$,!!P||n.originIsAbsolute,!1!==n.smooth,x)),b=n.xOrigin||0,_=n.yOrigin||0,x!==re&&(A=x[0],E=x[1],C=x[2],T=x[3],r=R=x[4],i=B=x[5],6===x.length?(o=Math.sqrt(A*A+E*E),s=Math.sqrt(T*T+C*C),l=A||E?m(E,A)*f:0,(g=C||T?m(C,T)*f+l:0)&&(s*=Math.abs(Math.cos(g*p))),n.svg&&(r-=b-(b*A+_*C),i-=_-(b*E+_*T))):(G=x[6],U=x[7],O=x[8],F=x[9],N=x[10],H=x[11],r=x[12],i=x[13],a=x[14],c=(w=m(G,N))*f,w&&(P=R*(M=Math.cos(-w))+O*(S=Math.sin(-w)),L=B*M+F*S,D=G*M+N*S,O=R*-S+O*M,F=B*-S+F*M,N=G*-S+N*M,H=U*-S+H*M,R=P,B=L,G=D),h=(w=m(-C,N))*f,w&&(M=Math.cos(-w),H=T*(S=Math.sin(-w))+H*M,A=P=A*M-O*S,E=L=E*M-F*S,C=D=C*M-N*S),l=(w=m(E,A))*f,w&&(P=A*(M=Math.cos(w))+E*(S=Math.sin(w)),L=R*M+B*S,E=E*M-A*S,B=B*M-R*S,A=P,R=L),c&&Math.abs(c)+Math.abs(l)>359.9&&(c=l=0,h=180-h),o=(0,d.Pr)(Math.sqrt(A*A+E*E+C*C)),s=(0,d.Pr)(Math.sqrt(B*B+G*G)),w=m(R,B),g=Math.abs(w)>2e-4?w*f:0,y=H?1/(H<0?-H:H):0),n.svg&&(P=e.getAttribute("transform"),n.forceCSS=e.setAttribute("transform","")||!ae(z(e,k)),P&&e.setAttribute("transform",P))),Math.abs(g)>90&&Math.abs(g)<270&&(j?(o*=-1,g+=l<=0?180:-180,l+=l<=0?180:-180):(s*=-1,g+=g<=0?180:-180)),t=t||n.uncache,n.x=r-((n.xPercent=r&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-r)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+W,n.y=i-((n.yPercent=i&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-i)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+W,n.z=a+W,n.scaleX=(0,d.Pr)(o),n.scaleY=(0,d.Pr)(s),n.rotation=(0,d.Pr)(l)+X,n.rotationX=(0,d.Pr)(c)+X,n.rotationY=(0,d.Pr)(h)+X,n.skewX=g+X,n.skewY=v+X,n.transformPerspective=y+W,(n.zOrigin=parseFloat($.split(" ")[2])||0)&&(V[I]=ue($)),n.xOffset=n.yOffset=0,n.force3D=d.Fc.force3D,n.renderTransform=n.svg?ve:u?ge:he,n.uncache=0,n},ue=function(e){return(e=e.split(" "))[0]+" "+e[1]},de=function(e,t,n){var r=(0,d.Wy)(t);return(0,d.Pr)(parseFloat(t)+parseFloat(q(e,"x",n+"px",r)))+r},he=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,ge(e,t)},fe="0deg",pe="0px",me=") ",ge=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,o=n.y,s=n.z,l=n.rotation,c=n.rotationY,u=n.rotationX,d=n.skewX,h=n.skewY,f=n.scaleX,m=n.scaleY,g=n.transformPerspective,v=n.force3D,y=n.target,b=n.zOrigin,_="",x="auto"===v&&e&&1!==e||!0===v;if(b&&(u!==fe||c!==fe)){var w,M=parseFloat(c)*p,S=Math.sin(M),A=Math.cos(M);M=parseFloat(u)*p,w=Math.cos(M),a=de(y,a,S*w*-b),o=de(y,o,-Math.sin(M)*-b),s=de(y,s,A*w*-b+b)}g!==pe&&(_+="perspective("+g+me),(r||i)&&(_+="translate("+r+"%, "+i+"%) "),(x||a!==pe||o!==pe||s!==pe)&&(_+=s!==pe||x?"translate3d("+a+", "+o+", "+s+") ":"translate("+a+", "+o+me),l!==fe&&(_+="rotate("+l+me),c!==fe&&(_+="rotateY("+c+me),u!==fe&&(_+="rotateX("+u+me),d===fe&&h===fe||(_+="skew("+d+", "+h+me),1===f&&1===m||(_+="scale("+f+", "+m+me),y.style[k]=_||"translate(0, 0)"},ve=function(e,t){var n,r,i,a,o,s=t||this,l=s.xPercent,c=s.yPercent,u=s.x,h=s.y,f=s.rotation,m=s.skewX,g=s.skewY,v=s.scaleX,y=s.scaleY,b=s.target,_=s.xOrigin,x=s.yOrigin,w=s.xOffset,M=s.yOffset,S=s.forceCSS,A=parseFloat(u),E=parseFloat(h);f=parseFloat(f),m=parseFloat(m),(g=parseFloat(g))&&(m+=g=parseFloat(g),f+=g),f||m?(f*=p,m*=p,n=Math.cos(f)*v,r=Math.sin(f)*v,i=Math.sin(f-m)*-y,a=Math.cos(f-m)*y,m&&(g*=p,o=Math.tan(m-g),i*=o=Math.sqrt(1+o*o),a*=o,g&&(o=Math.tan(g),n*=o=Math.sqrt(1+o*o),r*=o)),n=(0,d.Pr)(n),r=(0,d.Pr)(r),i=(0,d.Pr)(i),a=(0,d.Pr)(a)):(n=v,a=y,r=i=0),(A&&!~(u+"").indexOf("px")||E&&!~(h+"").indexOf("px"))&&(A=q(b,"x",u,"px"),E=q(b,"y",h,"px")),(_||x||w||M)&&(A=(0,d.Pr)(A+_-(_*n+x*i)+w),E=(0,d.Pr)(E+x-(_*r+x*a)+M)),(l||c)&&(o=b.getBBox(),A=(0,d.Pr)(A+l/100*o.width),E=(0,d.Pr)(E+c/100*o.height)),o="matrix("+n+","+r+","+i+","+a+","+A+","+E+")",b.setAttribute("transform",o),S&&(b.style[k]=o)},ye=function(e,t,n,r,i){var a,o,s=360,l=(0,d.r9)(i),c=parseFloat(i)*(l&&~i.indexOf("rad")?f:1)-r,u=r+c+"deg";return l&&("short"===(a=i.split("_")[1])&&(c%=s)!=c%180&&(c+=c<0?s:-360),"cw"===a&&c<0?c=(c+36e9)%s-~~(c/s)*s:"ccw"===a&&c>0&&(c=(c-36e9)%s-~~(c/s)*s)),e._pt=o=new d.Fo(e._pt,t,n,r,c,x),o.e=u,o.u="deg",e._props.push(n),o},be=function(e,t){for(var n in t)e[n]=t[n];return e},_e=function(e,t,n){var r,i,a,o,s,l,c,u=be({},n._gsap),f=n.style;for(i in u.svg?(a=n.getAttribute("transform"),n.setAttribute("transform",""),f[k]=t,r=ce(n,1),X(n,k),n.setAttribute("transform",a)):(a=getComputedStyle(n)[k],f[k]=t,r=ce(n,1),f[k]=a),h)(a=u[i])!==(o=r[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(s=(0,d.Wy)(a)!==(c=(0,d.Wy)(o))?q(n,i,a,c):parseFloat(a),l=parseFloat(o),e._pt=new d.Fo(e._pt,r,i,s,l-s,_),e._pt.u=c||0,e._props.push(i));be(r,u)};(0,d.fS)("padding,margin,Width,Radius",(function(e,t){var n="Top",r="Right",i="Bottom",a="Left",o=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map((function(n){return t<2?e+n:"border"+n+e}));ne[t>1?"border"+e:e]=function(e,t,n,r,i){var a,s;if(arguments.length<4)return a=o.map((function(t){return Q(e,t,n)})),5===(s=a.join(" ")).split(a[0]).length?a[0]:s;a=(r+"").split(" "),s={},o.forEach((function(e,t){return s[e]=a[t]=a[t]||a[(t-1)/2|0]})),e.init(t,s,i)}}));var xe,we,Me,Se={name:"css",register:G,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,i){var a,s,l,c,u,f,p,m,g,v,x,S,A,E,C,T,R,B,P,L,D=this._props,O=e.style,N=n.vars.startAt;for(p in o||G(),this.styles=this.styles||F(e),T=this.styles.props,this.tween=n,t)if("autoRound"!==p&&(s=t[p],!d.$i[p]||!(0,d.if)(p,t,n,r,e,i)))if(u=typeof s,f=ne[p],"function"===u&&(u=typeof(s=s.call(n,r,e,i))),"string"===u&&~s.indexOf("random(")&&(s=(0,d.UI)(s)),f)f(this,e,p,s,n)&&(C=1);else if("--"===p.substr(0,2))a=(getComputedStyle(e).getPropertyValue(p)+"").trim(),s+="",d.GN.lastIndex=0,d.GN.test(a)||(m=(0,d.Wy)(a),g=(0,d.Wy)(s)),g?m!==g&&(a=q(e,p,a,g)+g):m&&(s+=m),this.add(O,"setProperty",a,s,r,i,0,0,p),D.push(p),T.push(p,0,O[p]);else if("undefined"!==u){if(N&&p in N?(a="function"==typeof N[p]?N[p].call(n,r,e,i):N[p],(0,d.r9)(a)&&~a.indexOf("random(")&&(a=(0,d.UI)(a)),(0,d.Wy)(a+"")||(a+=d.Fc.units[p]||(0,d.Wy)(Q(e,p))||""),"="===(a+"").charAt(1)&&(a=Q(e,p))):a=Q(e,p),c=parseFloat(a),(v="string"===u&&"="===s.charAt(1)&&s.substr(0,2))&&(s=s.substr(2)),l=parseFloat(s),p in b&&("autoAlpha"===p&&(1===c&&"hidden"===Q(e,"visibility")&&l&&(c=0),T.push("visibility",0,O.visibility),K(this,O,"visibility",c?"inherit":"hidden",l?"inherit":"hidden",!l)),"scale"!==p&&"transform"!==p&&~(p=b[p]).indexOf(",")&&(p=p.split(",")[0])),x=p in h)if(this.styles.save(p),S||((A=e._gsap).renderTransform&&!t.parseTransform||ce(e,t.parseTransform),E=!1!==t.smoothOrigin&&A.smooth,(S=this._pt=new d.Fo(this._pt,O,k,0,1,A.renderTransform,A,0,-1)).dep=1),"scale"===p)this._pt=new d.Fo(this._pt,A,"scaleY",A.scaleY,(v?(0,d.cy)(A.scaleY,v+l):l)-A.scaleY||0,_),this._pt.u=0,D.push("scaleY",p),p+="X";else{if("transformOrigin"===p){T.push(I,0,O[I]),B=void 0,P=void 0,L=void 0,P=(B=(R=s).split(" "))[0],L=B[1]||"50%","top"!==P&&"bottom"!==P&&"left"!==L&&"right"!==L||(R=P,P=L,L=R),B[0]=ee[P]||P,B[1]=ee[L]||L,s=B.join(" "),A.svg?le(e,s,0,E,0,this):((g=parseFloat(s.split(" ")[2])||0)!==A.zOrigin&&K(this,A,"zOrigin",A.zOrigin,g),K(this,O,p,ue(a),ue(s)));continue}if("svgOrigin"===p){le(e,s,1,E,0,this);continue}if(p in ie){ye(this,A,p,c,v?(0,d.cy)(c,v+s):s);continue}if("smoothOrigin"===p){K(this,A,"smooth",A.smooth,s);continue}if("force3D"===p){A[p]=s;continue}if("transform"===p){_e(this,s,e);continue}}else p in O||(p=H(p)||p);if(x||(l||0===l)&&(c||0===c)&&!y.test(s)&&p in O)l||(l=0),(m=(a+"").substr((c+"").length))!==(g=(0,d.Wy)(s)||(p in d.Fc.units?d.Fc.units[p]:m))&&(c=q(e,p,a,g)),this._pt=new d.Fo(this._pt,x?A:O,p,c,(v?(0,d.cy)(c,v+l):l)-c,x||"px"!==g&&"zIndex"!==p||!1===t.autoRound?_:M),this._pt.u=g||0,m!==g&&"%"!==g&&(this._pt.b=a,this._pt.r=w);else if(p in O)Z.call(this,e,p,a,v?v+s:s);else if(p in e)this.add(e,p,a||e[p],v?v+s:s,r,i);else if("parseTransform"!==p){(0,d.lC)(p,s);continue}x||(p in O?T.push(p,0,O[p]):T.push(p,1,a||e[p])),D.push(p)}C&&(0,d.JV)(this)},render:function(e,t){if(t.tween._time||!c())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:Q,aliases:b,getSetter:function(e,t,n){var r=b[t];return r&&r.indexOf(",")<0&&(t=r),t in h&&t!==I&&(e._gsap.x||Q(e,"x"))?n&&l===n?"scale"===t?R:T:(l=n||{})&&("scale"===t?B:P):e.style&&!(0,d.m2)(e.style[t])?E:~t.indexOf("-")?C:(0,d.S5)(e,t)},core:{_removeProperty:X,_getMatrix:se}};d.p8.utils.checkPrefix=H,d.p8.core.getStyleSaver=F,xe="x,y,z,scale,scaleX,scaleY,xPercent,yPercent",we="rotation,rotationX,rotationY,skewX,skewY",Me=(0,d.fS)(xe+","+we+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(e){h[e]=1})),(0,d.fS)(we,(function(e){d.Fc.units[e]="deg",ie[e]=1})),b[Me[13]]=xe+","+we,(0,d.fS)("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(e){var t=e.split(":");b[t[1]]=Me[t[0]]})),(0,d.fS)("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(e){d.Fc.units[e]="px"})),d.p8.registerPlugin(Se)},8361:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,{KM:()=>x,Ki:()=>S,QR:()=>L,Qj:()=>z,ZV:()=>k,iz:()=>B,r1:()=>P,xJ:()=>_,y4:()=>I});var i,a,o,s,l,c,u,d,h,f,p,m,g,v=function(){return i||"undefined"!=typeof window&&(i=window.gsap)&&i.registerPlugin&&i},y=1,b=[],_=[],x=[],w=Date.now,M=function(e,t){return t},S=function(e,t){return~x.indexOf(e)&&x[x.indexOf(e)+1][t]},A=function(e){return!!~f.indexOf(e)},E=function(e,t,n,r,i){return e.addEventListener(t,n,{passive:!r,capture:!!i})},C=function(e,t,n,r){return e.removeEventListener(t,n,!!r)},T=function(){return p&&p.isPressed||_.cache++},R=function(e,t){var n=function n(r){if(r||0===r){y&&(o.history.scrollRestoration="manual");var i=p&&p.isPressed;r=n.v=Math.round(r)||(p&&p.iOS?1:0),e(r),n.cacheID=_.cache,i&&M("ss",r)}else(t||_.cache!==n.cacheID||M("ref"))&&(n.cacheID=_.cache,n.v=e());return n.v+n.offset};return n.offset=0,e&&n},B={s:"scrollLeft",p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:R((function(e){return arguments.length?o.scrollTo(e,P.sc()):o.pageXOffset||s.scrollLeft||l.scrollLeft||c.scrollLeft||0}))},P={s:"scrollTop",p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:B,sc:R((function(e){return arguments.length?o.scrollTo(B.sc(),e):o.pageYOffset||s.scrollTop||l.scrollTop||c.scrollTop||0}))},k=function(e){return i.utils.toArray(e)[0]||("string"==typeof e&&!1!==i.config().nullTargetWarn?console.warn("Element not found:",e):null)},I=function(e,t){var n=t.s,r=t.sc;A(e)&&(e=s.scrollingElement||l);var a=_.indexOf(e),o=r===P.sc?1:2;!~a&&(a=_.push(e)-1),_[a+o]||e.addEventListener("scroll",T);var c=_[a+o],u=c||(_[a+o]=R(S(e,n),!0)||(A(e)?r:R((function(t){return arguments.length?e[n]=t:e[n]}))));return u.target=e,c||(u.smooth="smooth"===i.getProperty(e,"scrollBehavior")),u},L=function(e,t,n){var r=e,i=e,a=w(),o=a,s=t||50,l=Math.max(500,3*s),c=function(e,t){var l=w();t||l-a>s?(i=r,r=e,o=a,a=l):n?r+=e:r=i+(e-i)/(l-o)*(a-o)};return{update:c,reset:function(){i=r=n?0:r,o=a=0},getVelocity:function(e){var t=o,s=i,u=w();return(e||0===e)&&e!==r&&c(e),a===o||u-o>l?0:(r+(n?s:-s))/((n?u:a)-t)*1e3}}},D=function(e,t){return t&&!e._gsapAllow&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},O=function(e){var t=Math.max.apply(Math,e),n=Math.min.apply(Math,e);return Math.abs(t)>=Math.abs(n)?t:n},F=function(){var e,t,n,r;(h=i.core.globals().ScrollTrigger)&&h.core&&(e=h.core,t=e.bridge||{},n=e._scrollers,r=e._proxies,n.push.apply(n,_),r.push.apply(r,x),_=n,x=r,M=function(e,n){return t[e](n)})},N=function(e){return(i=e||v())&&"undefined"!=typeof document&&document.body&&(o=window,s=document,l=s.documentElement,c=s.body,f=[o,s,l,c],i.utils.clamp,g=i.core.context||function(){},d="onpointerenter"in c?"pointer":"mouse",u=z.isTouch=o.matchMedia&&o.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in o||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,m=z.eventTypes=("ontouchstart"in l?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in l?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout((function(){return y=0}),500),F(),a=1),a};B.op=P,_.cache=0;var z=function(){function e(e){this.init(e)}var t,n;return e.prototype.init=function(e){a||N(i)||console.warn("Please gsap.registerPlugin(Observer)"),h||F();var t=e.tolerance,n=e.dragMinimum,r=e.type,f=e.target,v=e.lineHeight,y=e.debounce,_=e.preventDefault,x=e.onStop,M=e.onStopDelay,S=e.ignore,R=e.wheelSpeed,z=e.event,U=e.onDragStart,H=e.onDragEnd,G=e.onDrag,V=e.onPress,j=e.onRelease,W=e.onRight,J=e.onLeft,X=e.onUp,K=e.onDown,$=e.onChangeX,Y=e.onChangeY,q=e.onChange,Q=e.onToggleX,Z=e.onToggleY,ee=e.onHover,te=e.onHoverEnd,ne=e.onMove,re=e.ignoreCheck,ie=e.isNormalizer,ae=e.onGestureStart,oe=e.onGestureEnd,se=e.onWheel,le=e.onEnable,ce=e.onDisable,ue=e.onClick,de=e.scrollSpeed,he=e.capture,fe=e.allowClicks,pe=e.lockAxis,me=e.onLockAxis;this.target=f=k(f)||l,this.vars=e,S&&(S=i.utils.toArray(S)),t=t||1e-9,n=n||0,R=R||1,de=de||1,r=r||"wheel,touch,pointer",y=!1!==y,v||(v=parseFloat(o.getComputedStyle(c).lineHeight)||22);var ge,ve,ye,be,_e,xe,we,Me=this,Se=0,Ae=0,Ee=I(f,B),Ce=I(f,P),Te=Ee(),Re=Ce(),Be=~r.indexOf("touch")&&!~r.indexOf("pointer")&&"pointerdown"===m[0],Pe=A(f),ke=f.ownerDocument||s,Ie=[0,0,0],Le=[0,0,0],De=0,Oe=function(){return De=w()},Fe=function(e,t){return(Me.event=e)&&S&&~S.indexOf(e.target)||t&&Be&&"touch"!==e.pointerType||re&&re(e,t)},Ne=function(){var e=Me.deltaX=O(Ie),n=Me.deltaY=O(Le),r=Math.abs(e)>=t,i=Math.abs(n)>=t;q&&(r||i)&&q(Me,e,n,Ie,Le),r&&(W&&Me.deltaX>0&&W(Me),J&&Me.deltaX<0&&J(Me),$&&$(Me),Q&&Me.deltaX<0!=Se<0&&Q(Me),Se=Me.deltaX,Ie[0]=Ie[1]=Ie[2]=0),i&&(K&&Me.deltaY>0&&K(Me),X&&Me.deltaY<0&&X(Me),Y&&Y(Me),Z&&Me.deltaY<0!=Ae<0&&Z(Me),Ae=Me.deltaY,Le[0]=Le[1]=Le[2]=0),(be||ye)&&(ne&&ne(Me),ye&&(G(Me),ye=!1),be=!1),xe&&!(xe=!1)&&me&&me(Me),_e&&(se(Me),_e=!1),ge=0},ze=function(e,t,n){Ie[n]+=e,Le[n]+=t,Me._vx.update(e),Me._vy.update(t),y?ge||(ge=requestAnimationFrame(Ne)):Ne()},Ue=function(e,t){pe&&!we&&(Me.axis=we=Math.abs(e)>Math.abs(t)?"x":"y",xe=!0),"y"!==we&&(Ie[2]+=e,Me._vx.update(e,!0)),"x"!==we&&(Le[2]+=t,Me._vy.update(t,!0)),y?ge||(ge=requestAnimationFrame(Ne)):Ne()},He=function(e){if(!Fe(e,1)){var t=(e=D(e,_)).clientX,r=e.clientY,i=t-Me.x,a=r-Me.y,o=Me.isDragging;Me.x=t,Me.y=r,(o||Math.abs(Me.startX-t)>=n||Math.abs(Me.startY-r)>=n)&&(G&&(ye=!0),o||(Me.isDragging=!0),Ue(i,a),o||U&&U(Me))}},Ge=Me.onPress=function(e){Fe(e,1)||(Me.axis=we=null,ve.pause(),Me.isPressed=!0,e=D(e),Se=Ae=0,Me.startX=Me.x=e.clientX,Me.startY=Me.y=e.clientY,Me._vx.reset(),Me._vy.reset(),E(ie?f:ke,m[1],He,_,!0),Me.deltaX=Me.deltaY=0,V&&V(Me))},Ve=function(e){if(!Fe(e,1)){C(ie?f:ke,m[1],He,!0);var t=!isNaN(Me.y-Me.startY),n=Me.isDragging&&(Math.abs(Me.x-Me.startX)>3||Math.abs(Me.y-Me.startY)>3),r=D(e);!n&&t&&(Me._vx.reset(),Me._vy.reset(),_&&fe&&i.delayedCall(.08,(function(){if(w()-De>300&&!e.defaultPrevented)if(e.target.click)e.target.click();else if(ke.createEvent){var t=ke.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,o,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(t)}}))),Me.isDragging=Me.isGesturing=Me.isPressed=!1,x&&!ie&&ve.restart(!0),H&&n&&H(Me),j&&j(Me,n)}},je=function(e){return e.touches&&e.touches.length>1&&(Me.isGesturing=!0)&&ae(e,Me.isDragging)},We=function(){return(Me.isGesturing=!1)||oe(Me)},Je=function(e){if(!Fe(e)){var t=Ee(),n=Ce();ze((t-Te)*de,(n-Re)*de,1),Te=t,Re=n,x&&ve.restart(!0)}},Xe=function(e){if(!Fe(e)){e=D(e,_),se&&(_e=!0);var t=(1===e.deltaMode?v:2===e.deltaMode?o.innerHeight:1)*R;ze(e.deltaX*t,e.deltaY*t,0),x&&!ie&&ve.restart(!0)}},Ke=function(e){if(!Fe(e)){var t=e.clientX,n=e.clientY,r=t-Me.x,i=n-Me.y;Me.x=t,Me.y=n,be=!0,(r||i)&&Ue(r,i)}},$e=function(e){Me.event=e,ee(Me)},Ye=function(e){Me.event=e,te(Me)},qe=function(e){return Fe(e)||D(e,_)&&ue(Me)};ve=Me._dc=i.delayedCall(M||.25,(function(){Me._vx.reset(),Me._vy.reset(),ve.pause(),x&&x(Me)})).pause(),Me.deltaX=Me.deltaY=0,Me._vx=L(0,50,!0),Me._vy=L(0,50,!0),Me.scrollX=Ee,Me.scrollY=Ce,Me.isDragging=Me.isGesturing=Me.isPressed=!1,g(this),Me.enable=function(e){return Me.isEnabled||(E(Pe?ke:f,"scroll",T),r.indexOf("scroll")>=0&&E(Pe?ke:f,"scroll",Je,_,he),r.indexOf("wheel")>=0&&E(f,"wheel",Xe,_,he),(r.indexOf("touch")>=0&&u||r.indexOf("pointer")>=0)&&(E(f,m[0],Ge,_,he),E(ke,m[2],Ve),E(ke,m[3],Ve),fe&&E(f,"click",Oe,!1,!0),ue&&E(f,"click",qe),ae&&E(ke,"gesturestart",je),oe&&E(ke,"gestureend",We),ee&&E(f,d+"enter",$e),te&&E(f,d+"leave",Ye),ne&&E(f,d+"move",Ke)),Me.isEnabled=!0,e&&e.type&&Ge(e),le&&le(Me)),Me},Me.disable=function(){Me.isEnabled&&(b.filter((function(e){return e!==Me&&A(e.target)})).length||C(Pe?ke:f,"scroll",T),Me.isPressed&&(Me._vx.reset(),Me._vy.reset(),C(ie?f:ke,m[1],He,!0)),C(Pe?ke:f,"scroll",Je,he),C(f,"wheel",Xe,he),C(f,m[0],Ge,he),C(ke,m[2],Ve),C(ke,m[3],Ve),C(f,"click",Oe,!0),C(f,"click",qe),C(ke,"gesturestart",je),C(ke,"gestureend",We),C(f,d+"enter",$e),C(f,d+"leave",Ye),C(f,d+"move",Ke),Me.isEnabled=Me.isPressed=Me.isDragging=!1,ce&&ce(Me))},Me.kill=Me.revert=function(){Me.disable();var e=b.indexOf(Me);e>=0&&b.splice(e,1),p===Me&&(p=0)},b.push(Me),ie&&A(f)&&(p=Me),Me.enable(z)},t=e,(n=[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}])&&r(t.prototype,n),e}();z.version="3.11.4",z.create=function(e){return new z(e)},z.register=N,z.getAll=function(){return b.slice()},z.getById=function(e){return b.filter((function(t){return t.vars.id===e}))[0]},v()&&i.registerPlugin(z)},7082:(e,t,n)=>{"use strict";n.d(t,{i:()=>ot});var r,i,a,o,s,l,c,u,d,h,f,p,m,g,v,y,b,_,x,w,M,S,A,E,C,T,R,B,P,k,I,L,D,O,F=n(8361),N=1,z=Date.now,U=z(),H=0,G=0,V=function(){return g=1},j=function(){return g=0},W=function(e){return e},J=function(e){return Math.round(1e5*e)/1e5||0},X=function(){return"undefined"!=typeof window},K=function(){return r||X()&&(r=window.gsap)&&r.registerPlugin&&r},$=function(e){return!!~c.indexOf(e)},Y=function(e){return(0,F.Ki)(e,"getBoundingClientRect")||($(e)?function(){return tt.width=a.innerWidth,tt.height=a.innerHeight,tt}:function(){return ge(e)})},q=function(e,t){var n=t.s,r=t.d2,i=t.d,o=t.a;return(n="scroll"+r)&&(o=(0,F.Ki)(e,n))?o()-Y(e)()[i]:$(e)?(s[n]||l[n])-(a["inner"+r]||s["client"+r]||l["client"+r]):e[n]-e["offset"+r]},Q=function(e,t){for(var n=0;n<x.length;n+=3)(!t||~t.indexOf(x[n+1]))&&e(x[n],x[n+1],x[n+2])},Z=function(e){return"string"==typeof e},ee=function(e){return"function"==typeof e},te=function(e){return"number"==typeof e},ne=function(e){return"object"==typeof e},re=function(e,t,n){return e&&e.progress(t?0:1)&&n&&e.pause()},ie=function(e,t){if(e.enabled){var n=t(e);n&&n.totalTime&&(e.callbackAnimation=n)}},ae=Math.abs,oe="right",se="bottom",le="width",ce="height",ue="padding",de="margin",he="Width",fe="px",pe=function(e){return a.getComputedStyle(e)},me=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},ge=function(e,t){var n=t&&"matrix(1, 0, 0, 1, 0, 0)"!==pe(e)[v]&&r.to(e,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),i=e.getBoundingClientRect();return n&&n.progress(0).kill(),i},ve=function(e,t){var n=t.d2;return e["offset"+n]||e["client"+n]||0},ye=function(e){var t,n=[],r=e.labels,i=e.duration();for(t in r)n.push(r[t]/i);return n},be=function(e){var t=r.utils.snap(e),n=Array.isArray(e)&&e.slice(0).sort((function(e,t){return e-t}));return n?function(e,r,i){var a;if(void 0===i&&(i=.001),!r)return t(e);if(r>0){for(e-=i,a=0;a<n.length;a++)if(n[a]>=e)return n[a];return n[a-1]}for(a=n.length,e+=i;a--;)if(n[a]<=e)return n[a];return n[0]}:function(n,r,i){void 0===i&&(i=.001);var a=t(n);return!r||Math.abs(a-n)<i||a-n<0==r<0?a:t(r<0?n-e:n+e)}},_e=function(e,t,n,r){return n.split(",").forEach((function(n){return e(t,n,r)}))},xe=function(e,t,n,r,i){return e.addEventListener(t,n,{passive:!r,capture:!!i})},we=function(e,t,n,r){return e.removeEventListener(t,n,!!r)},Me=function(e,t,n){return n&&n.wheelHandler&&e(t,"wheel",n)},Se={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},Ae={toggleActions:"play",anticipatePin:0},Ee={top:0,left:0,center:.5,bottom:1,right:1},Ce=function(e,t){if(Z(e)){var n=e.indexOf("="),r=~n?+(e.charAt(n-1)+1)*parseFloat(e.substr(n+1)):0;~n&&(e.indexOf("%")>n&&(r*=t/100),e=e.substr(0,n-1)),e=r+(e in Ee?Ee[e]*t:~e.indexOf("%")?parseFloat(e)*t/100:parseFloat(e)||0)}return e},Te=function(e,t,n,r,i,a,s,c){var u=i.startColor,d=i.endColor,h=i.fontSize,f=i.indent,p=i.fontWeight,m=o.createElement("div"),g=$(n)||"fixed"===(0,F.Ki)(n,"pinType"),v=-1!==e.indexOf("scroller"),y=g?l:n,b=-1!==e.indexOf("start"),_=b?u:d,x="border-color:"+_+";font-size:"+h+";color:"+_+";font-weight:"+p+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return x+="position:"+((v||c)&&g?"fixed;":"absolute;"),(v||c||!g)&&(x+=(r===F.r1?oe:se)+":"+(a+parseFloat(f))+"px;"),s&&(x+="box-sizing:border-box;text-align:left;width:"+s.offsetWidth+"px;"),m._isStart=b,m.setAttribute("class","gsap-marker-"+e+(t?" marker-"+t:"")),m.style.cssText=x,m.innerText=t||0===t?e+"-"+t:e,y.children[0]?y.insertBefore(m,y.children[0]):y.appendChild(m),m._offset=m["offset"+r.op.d2],Re(m,0,r,b),m},Re=function(e,t,n,i){var a={display:"block"},o=n[i?"os2":"p2"],s=n[i?"p2":"os2"];e._isFlipped=i,a[n.a+"Percent"]=i?-100:0,a[n.a]=i?"1px":0,a["border"+o+he]=1,a["border"+s+he]=0,a[n.p]=t+"px",r.set(e,a)},Be=[],Pe={},ke=function(){return z()-H>34&&(I||(I=requestAnimationFrame(Ke)))},Ie=function(){(!A||!A.isPressed||A.startX>l.clientWidth)&&(F.xJ.cache++,A?I||(I=requestAnimationFrame(Ke)):Ke(),H||ze("scrollStart"),H=z())},Le=function(){T=a.innerWidth,C=a.innerHeight},De=function(){F.xJ.cache++,!m&&!S&&!o.fullscreenElement&&!o.webkitFullscreenElement&&(!E||T!==a.innerWidth||Math.abs(a.innerHeight-C)>.25*a.innerHeight)&&u.restart(!0)},Oe={},Fe=[],Ne=function e(){return we(ot,"scrollEnd",e)||We(!0)},ze=function(e){return Oe[e]&&Oe[e].map((function(e){return e()}))||Fe},Ue=[],He=function(e){for(var t=0;t<Ue.length;t+=5)(!e||Ue[t+4]&&Ue[t+4].query===e)&&(Ue[t].style.cssText=Ue[t+1],Ue[t].getBBox&&Ue[t].setAttribute("transform",Ue[t+2]||""),Ue[t+3].uncache=1)},Ge=function(e,t){var n;for(y=0;y<Be.length;y++)!(n=Be[y])||t&&n._ctx!==t||(e?n.kill(1):n.revert(!0,!0));t&&He(t),t||ze("revert")},Ve=function(e,t){F.xJ.cache++,(t||!L)&&F.xJ.forEach((function(e){return ee(e)&&e.cacheID++&&(e.rec=0)})),Z(e)&&(a.history.scrollRestoration=P=e)},je=0,We=function(e,t){if(!H||e){L=ot.isRefreshing=!0,F.xJ.forEach((function(e){return ee(e)&&e.cacheID++&&(e.rec=e())}));var n=ze("refreshInit");w&&ot.sort(),t||Ge(),F.xJ.forEach((function(e){ee(e)&&(e.smooth&&(e.target.style.scrollBehavior="auto"),e(0))})),Be.slice(0).forEach((function(e){return e.refresh()})),Be.forEach((function(e,t){if(e._subPinOffset&&e.pin){var n=e.vars.horizontal?"offsetWidth":"offsetHeight",r=e.pin[n];e.revert(!0,1),e.adjustPinSpacing(e.pin[n]-r),e.revert(!1,1)}})),Be.forEach((function(e){return"max"===e.vars.end&&e.setPositions(e.start,Math.max(e.start+1,q(e.scroller,e._dir)))})),n.forEach((function(e){return e&&e.render&&e.render(-1)})),F.xJ.forEach((function(e){ee(e)&&(e.smooth&&requestAnimationFrame((function(){return e.target.style.scrollBehavior="smooth"})),e.rec&&e(e.rec))})),Ve(P,1),u.pause(),je++,Ke(2),Be.forEach((function(e){return ee(e.vars.onRefresh)&&e.vars.onRefresh(e)})),L=ot.isRefreshing=!1,ze("refresh")}else xe(ot,"scrollEnd",Ne)},Je=0,Xe=1,Ke=function(e){if(!L||2===e){ot.isUpdating=!0,O&&O.update(0);var t=Be.length,n=z(),r=n-U>=50,i=t&&Be[0].scroll();if(Xe=Je>i?-1:1,Je=i,r&&(H&&!g&&n-H>200&&(H=0,ze("scrollEnd")),f=U,U=n),Xe<0){for(y=t;y-- >0;)Be[y]&&Be[y].update(0,r);Xe=1}else for(y=0;y<t;y++)Be[y]&&Be[y].update(0,r);ot.isUpdating=!1}I=0},$e=["left","top",se,oe,"marginBottom","marginRight","marginTop","marginLeft","display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],Ye=$e.concat([le,ce,"boxSizing","maxWidth","maxHeight","position",de,ue,"paddingTop","paddingRight","paddingBottom","paddingLeft"]),qe=function(e,t,n,r){if(!e._gsap.swappedIn){for(var i,a=$e.length,o=t.style,s=e.style;a--;)o[i=$e[a]]=n[i];o.position="absolute"===n.position?"absolute":"relative","inline"===n.display&&(o.display="inline-block"),s.bottom=s.right="auto",o.flexBasis=n.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o.width=ve(e,F.iz)+fe,o.height=ve(e,F.r1)+fe,o.padding=s.margin=s.top=s.left="0",Ze(r),s.width=s.maxWidth=n.width,s.height=s.maxHeight=n.height,s.padding=n.padding,e.parentNode!==t&&(e.parentNode.insertBefore(t,e),t.appendChild(e)),e._gsap.swappedIn=!0}},Qe=/([A-Z])/g,Ze=function(e){if(e){var t,n,i=e.t.style,a=e.length,o=0;for((e.t._gsap||r.core.getCache(e.t)).uncache=1;o<a;o+=2)n=e[o+1],t=e[o],n?i[t]=n:i[t]&&i.removeProperty(t.replace(Qe,"-$1").toLowerCase())}},et=function(e){for(var t=Ye.length,n=e.style,r=[],i=0;i<t;i++)r.push(Ye[i],n[Ye[i]]);return r.t=e,r},tt={left:0,top:0},nt=function(e,t,n,r,i,a,o,c,u,d,h,f,p){ee(e)&&(e=e(c)),Z(e)&&"max"===e.substr(0,3)&&(e=f+("="===e.charAt(4)?Ce("0"+e.substr(3),n):0));var m,g,v,y=p?p.time():0;if(p&&p.seek(0),te(e))o&&Re(o,n,r,!0);else{ee(t)&&(t=t(c));var b,_,x,w,M=(e||"0").split(" ");v=(0,F.ZV)(t)||l,(b=ge(v)||{})&&(b.left||b.top)||"none"!==pe(v).display||(w=v.style.display,v.style.display="block",b=ge(v),w?v.style.display=w:v.style.removeProperty("display")),_=Ce(M[0],b[r.d]),x=Ce(M[1]||"0",n),e=b[r.p]-u[r.p]-d+_+i-x,o&&Re(o,x,r,n-x<20||o._isStart&&x>20),n-=n-x}if(a){var S=e+n,A=a._isStart;m="scroll"+r.d2,Re(a,S,r,A&&S>20||!A&&(h?Math.max(l[m],s[m]):a.parentNode[m])<=S+1),h&&(u=ge(o),h&&(a.style[r.op.p]=u[r.op.p]-r.op.m-a._offset+fe))}return p&&v&&(m=ge(v),p.seek(f),g=ge(v),p._caScrollDist=m[r.p]-g[r.p],e=e/p._caScrollDist*f),p&&p.seek(y),p?e:Math.round(e)},rt=/(webkit|moz|length|cssText|inset)/i,it=function(e,t,n,i){if(e.parentNode!==t){var a,o,s=e.style;if(t===l){for(a in e._stOrig=s.cssText,o=pe(e))+a||rt.test(a)||!o[a]||"string"!=typeof s[a]||"0"===a||(s[a]=o[a]);s.top=n,s.left=i}else s.cssText=e._stOrig;r.core.getCache(e).uncache=1,t.appendChild(e)}},at=function(e,t){var n,i,a=(0,F.y4)(e,t),o="_scroll"+t.p2,s=function t(s,l,c,u,d){var h=t.tween,f=l.onComplete,p={};return c=c||a(),d=u&&d||0,u=u||s-c,h&&h.kill(),n=Math.round(c),l[o]=s,l.modifiers=p,p[o]=function(e){return(e=Math.round(a()))!==n&&e!==i&&Math.abs(e-n)>3&&Math.abs(e-i)>3?(h.kill(),t.tween=0):e=c+u*h.ratio+d*h.ratio*h.ratio,i=n,n=Math.round(e)},l.onUpdate=function(){F.xJ.cache++,Ke()},l.onComplete=function(){t.tween=0,f&&f.call(h)},h=t.tween=r.to(e,l)};return e[o]=a,a.wheelHandler=function(){return s.tween&&s.tween.kill()&&(s.tween=0)},xe(e,"wheel",a.wheelHandler),s},ot=function(){function e(t,n){i||e.register(r)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),this.init(t,n)}return e.prototype.init=function(t,n){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),G){var i,c,u,p,v,b,_,x,S,A,E,C,T,R,P,I,U,V,j,X,K,Q,oe,se,le,ce,_e,Me,Ee,Re,ke,Le,Oe,Fe,ze,Ue,He,Ge,Ve,Je,Ke,$e,Ye=t=me(Z(t)||te(t)||t.nodeType?{trigger:t}:t,Ae),Qe=Ye.onUpdate,rt=Ye.toggleClass,ot=Ye.id,st=Ye.onToggle,lt=Ye.onRefresh,ct=Ye.scrub,ut=Ye.trigger,dt=Ye.pin,ht=Ye.pinSpacing,ft=Ye.invalidateOnRefresh,pt=Ye.anticipatePin,mt=Ye.onScrubComplete,gt=Ye.onSnapComplete,vt=Ye.once,yt=Ye.snap,bt=Ye.pinReparent,_t=Ye.pinSpacer,xt=Ye.containerAnimation,wt=Ye.fastScrollEnd,Mt=Ye.preventOverlaps,St=t.horizontal||t.containerAnimation&&!1!==t.horizontal?F.iz:F.r1,At=!ct&&0!==ct,Et=(0,F.ZV)(t.scroller||a),Ct=r.core.getCache(Et),Tt=$(Et),Rt="fixed"===("pinType"in t?t.pinType:(0,F.Ki)(Et,"pinType")||Tt&&"fixed"),Bt=[t.onEnter,t.onLeave,t.onEnterBack,t.onLeaveBack],Pt=At&&t.toggleActions.split(" "),kt="markers"in t?t.markers:Ae.markers,It=Tt?0:parseFloat(pe(Et)["border"+St.p2+he])||0,Lt=this,Dt=t.onRefreshInit&&function(){return t.onRefreshInit(Lt)},Ot=function(e,t,n){var r=n.d,i=n.d2,o=n.a;return(o=(0,F.Ki)(e,"getBoundingClientRect"))?function(){return o()[r]}:function(){return(t?a["inner"+i]:e["client"+i])||0}}(Et,Tt,St),Ft=function(e,t){return!t||~F.KM.indexOf(e)?Y(e):function(){return tt}}(Et,Tt),Nt=0,zt=0,Ut=(0,F.y4)(Et,St);if(B(Lt),Lt._dir=St,pt*=45,Lt.scroller=Et,Lt.scroll=xt?xt.time.bind(xt):Ut,p=Ut(),Lt.vars=t,n=n||t.animation,"refreshPriority"in t&&(w=1,-9999===t.refreshPriority&&(O=Lt)),Ct.tweenScroll=Ct.tweenScroll||{top:at(Et,F.r1),left:at(Et,F.iz)},Lt.tweenTo=i=Ct.tweenScroll[St.p],Lt.scrubDuration=function(e){(Le=te(e)&&e)?ke?ke.duration(e):ke=r.to(n,{ease:"expo",totalProgress:"+=0.001",duration:Le,paused:!0,onComplete:function(){return mt&&mt(Lt)}}):(ke&&ke.progress(1).kill(),ke=0)},n&&(n.vars.lazy=!1,n._initted||!1!==n.vars.immediateRender&&!1!==t.immediateRender&&n.duration()&&n.render(0,!0,!0),Lt.animation=n.pause(),n.scrollTrigger=Lt,Lt.scrubDuration(ct),Ee=0,ot||(ot=n.vars.id)),Be.push(Lt),yt&&(ne(yt)&&!yt.push||(yt={snapTo:yt}),"scrollBehavior"in l.style&&r.set(Tt?[l,s]:Et,{scrollBehavior:"auto"}),F.xJ.forEach((function(e){return ee(e)&&e.target===(Tt?o.scrollingElement||s:Et)&&(e.smooth=!1)})),u=ee(yt.snapTo)?yt.snapTo:"labels"===yt.snapTo?function(e){return function(t){return r.utils.snap(ye(e),t)}}(n):"labelsDirectional"===yt.snapTo?(Je=n,function(e,t){return be(ye(Je))(e,t.direction)}):!1!==yt.directional?function(e,t){return be(yt.snapTo)(e,z()-zt<500?0:t.direction)}:r.utils.snap(yt.snapTo),Oe=yt.duration||{min:.1,max:2},Oe=ne(Oe)?h(Oe.min,Oe.max):h(Oe,Oe),Fe=r.delayedCall(yt.delay||Le/2||.1,(function(){var e=Ut(),t=z()-zt<500,a=i.tween;if(!(t||Math.abs(Lt.getVelocity())<10)||a||g||Nt===e)Lt.isActive&&Nt!==e&&Fe.restart(!0);else{var o=(e-b)/T,s=n&&!At?n.totalProgress():o,l=t?0:(s-Re)/(z()-f)*1e3||0,c=r.utils.clamp(-o,1-o,ae(l/2)*l/.185),d=o+(!1===yt.inertia?0:c),p=h(0,1,u(d,Lt)),m=Math.round(b+p*T),v=yt,y=v.onStart,x=v.onInterrupt,w=v.onComplete;if(e<=_&&e>=b&&m!==e){if(a&&!a._initted&&a.data<=ae(m-e))return;!1===yt.inertia&&(c=p-o),i(m,{duration:Oe(ae(.185*Math.max(ae(d-s),ae(p-s))/l/.05||0)),ease:yt.ease||"power3",data:ae(m-e),onInterrupt:function(){return Fe.restart(!0)&&x&&x(Lt)},onComplete:function(){Lt.update(),Nt=Ut(),Ee=Re=n&&!At?n.totalProgress():Lt.progress,gt&>(Lt),w&&w(Lt)}},e,c*T,m-e-c*T),y&&y(Lt,i.tween)}}})).pause()),ot&&(Pe[ot]=Lt),(Ve=(ut=Lt.trigger=(0,F.ZV)(ut||dt))&&ut._gsap&&ut._gsap.stRevert)&&(Ve=Ve(Lt)),dt=!0===dt?ut:(0,F.ZV)(dt),Z(rt)&&(rt={targets:ut,className:rt}),dt&&(!1===ht||ht===de||(ht=!(!ht&&dt.parentNode&&dt.parentNode.style&&"flex"===pe(dt.parentNode).display)&&ue),Lt.pin=dt,(c=r.core.getCache(dt)).spacer?R=c.pinState:(_t&&((_t=(0,F.ZV)(_t))&&!_t.nodeType&&(_t=_t.current||_t.nativeElement),c.spacerIsNative=!!_t,_t&&(c.spacerState=et(_t))),c.spacer=U=_t||o.createElement("div"),U.classList.add("pin-spacer"),ot&&U.classList.add("pin-spacer-"+ot),c.pinState=R=et(dt)),!1!==t.force3D&&r.set(dt,{force3D:!0}),Lt.spacer=U=c.spacer,Me=pe(dt),oe=Me[ht+St.os2],j=r.getProperty(dt),X=r.quickSetter(dt,St.a,fe),qe(dt,U,Me),I=et(dt)),kt){C=ne(kt)?me(kt,Se):Se,A=Te("scroller-start",ot,Et,St,C,0),E=Te("scroller-end",ot,Et,St,C,0,A),V=A["offset"+St.op.d2];var Ht=(0,F.ZV)((0,F.Ki)(Et,"content")||Et);x=this.markerStart=Te("start",ot,Ht,St,C,V,0,xt),S=this.markerEnd=Te("end",ot,Ht,St,C,V,0,xt),xt&&(Ge=r.quickSetter([x,S],St.a,fe)),Rt||F.KM.length&&!0===(0,F.Ki)(Et,"fixedMarkers")||($e=pe(Ke=Tt?l:Et).position,Ke.style.position="absolute"===$e||"fixed"===$e?$e:"relative",r.set([A,E],{force3D:!0}),le=r.quickSetter(A,St.a,fe),_e=r.quickSetter(E,St.a,fe))}if(xt){var Gt=xt.vars.onUpdate,Vt=xt.vars.onUpdateParams;xt.eventCallback("onUpdate",(function(){Lt.update(0,0,1),Gt&&Gt.apply(Vt||[])}))}Lt.previous=function(){return Be[Be.indexOf(Lt)-1]},Lt.next=function(){return Be[Be.indexOf(Lt)+1]},Lt.revert=function(e,t){if(!t)return Lt.kill(!0);var r=!1!==e||!Lt.enabled,i=m;r!==Lt.isReverted&&(r&&(Ue=Math.max(Ut(),Lt.scroll.rec||0),ze=Lt.progress,He=n&&n.progress()),x&&[x,S,A,E].forEach((function(e){return e.style.display=r?"none":"block"})),r&&(m=1,Lt.update(r)),!dt||bt&&Lt.isActive||(r?function(e,t,n){Ze(n);var r=e._gsap;if(r.spacerIsNative)Ze(r.spacerState);else if(e._gsap.swappedIn){var i=t.parentNode;i&&(i.insertBefore(e,t),i.removeChild(t))}e._gsap.swappedIn=!1}(dt,U,R):qe(dt,U,pe(dt),se)),r||Lt.update(r),m=i,Lt.isReverted=r)},Lt.refresh=function(a,c){if(!m&&Lt.enabled||c)if(dt&&a&&H)xe(e,"scrollEnd",Ne);else{!L&&Dt&&Dt(Lt),m=1,zt=z(),i.tween&&(i.tween.kill(),i.tween=0),ke&&ke.pause(),ft&&n&&n.revert({kill:!1}).invalidate(),Lt.isReverted||Lt.revert(!0,!0),Lt._subPinOffset=!1;for(var u,d,h,f,g,y,w,C,B,k,D,O=Ot(),N=Ft(),G=xt?xt.duration():q(Et,St),V=0,W=0,J=t.end,X=t.endTrigger||ut,$=t.start||(0!==t.start&&ut?dt?"0 0":"0 100%":0),Y=Lt.pinnedContainer=t.pinnedContainer&&(0,F.ZV)(t.pinnedContainer),ne=ut&&Math.max(0,Be.indexOf(Lt))||0,re=ne;re--;)(y=Be[re]).end||y.refresh(0,1)||(m=1),!(w=y.pin)||w!==ut&&w!==dt||y.isReverted||(k||(k=[]),k.unshift(y),y.revert(!0,!0)),y!==Be[re]&&(ne--,re--);for(ee($)&&($=$(Lt)),b=nt($,ut,O,St,Ut(),x,A,Lt,N,It,Rt,G,xt)||(dt?-.001:0),ee(J)&&(J=J(Lt)),Z(J)&&!J.indexOf("+=")&&(~J.indexOf(" ")?J=(Z($)?$.split(" ")[0]:"")+J:(V=Ce(J.substr(2),O),J=Z($)?$:b+V,X=ut)),_=Math.max(b,nt(J||(X?"100% 0":G),X,O,St,Ut()+V,S,E,Lt,N,It,Rt,G,xt))||-.001,T=_-b||(b-=.01)&&.001,V=0,re=ne;re--;)(w=(y=Be[re]).pin)&&y.start-y._pinPush<=b&&!xt&&y.end>0&&(u=y.end-y.start,(w===ut&&y.start-y._pinPush<b||w===Y)&&!te($)&&(V+=u*(1-y.progress)),w===dt&&(W+=u));if(b+=V,_+=V,Lt._pinPush=W,x&&V&&((u={})[St.a]="+="+V,Y&&(u[St.p]="-="+Ut()),r.set([x,S],u)),dt)u=pe(dt),f=St===F.r1,h=Ut(),K=parseFloat(j(St.a))+W,!G&&_>1&&((D={style:D=(Tt?o.scrollingElement||s:Et).style,value:D["overflow"+St.a.toUpperCase()]})["overflow"+St.a.toUpperCase()]="scroll"),qe(dt,U,u),I=et(dt),d=ge(dt,!0),C=Rt&&(0,F.y4)(Et,f?F.iz:F.r1)(),ht&&((se=[ht+St.os2,T+W+fe]).t=U,(re=ht===ue?ve(dt,St)+T+W:0)&&se.push(St.d,re+fe),Ze(se),Y&&Be.forEach((function(e){e.pin===Y&&!1!==e.vars.pinSpacing&&(e._subPinOffset=!0)})),Rt&&Ut(Ue)),Rt&&((g={top:d.top+(f?h-b:C)+fe,left:d.left+(f?C:h-b)+fe,boxSizing:"border-box",position:"fixed"}).width=g.maxWidth=Math.ceil(d.width)+fe,g.height=g.maxHeight=Math.ceil(d.height)+fe,g.margin=g.marginTop=g.marginRight=g.marginBottom=g.marginLeft="0",g.padding=u.padding,g.paddingTop=u.paddingTop,g.paddingRight=u.paddingRight,g.paddingBottom=u.paddingBottom,g.paddingLeft=u.paddingLeft,P=function(e,t,n){for(var r,i=[],a=e.length,o=n?8:0;o<a;o+=2)r=e[o],i.push(r,r in t?t[r]:e[o+1]);return i.t=e.t,i}(R,g,bt),L&&Ut(0)),n?(B=n._initted,M(1),n.render(n.duration(),!0,!0),Q=j(St.a)-K+T+W,ce=Math.abs(T-Q)>1,Rt&&ce&&P.splice(P.length-2,2),n.render(0,!0,!0),B||n.invalidate(!0),n.parent||n.totalTime(n.totalTime()),M(0)):Q=T,D&&(D.value?D.style["overflow"+St.a.toUpperCase()]=D.value:D.style.removeProperty("overflow-"+St.a));else if(ut&&Ut()&&!xt)for(d=ut.parentNode;d&&d!==l;)d._pinOffset&&(b-=d._pinOffset,_-=d._pinOffset),d=d.parentNode;k&&k.forEach((function(e){return e.revert(!1,!0)})),Lt.start=b,Lt.end=_,p=v=L?Ue:Ut(),xt||L||(p<Ue&&Ut(Ue),Lt.scroll.rec=0),Lt.revert(!1,!0),Fe&&(Nt=-1,Lt.isActive&&Ut(b+T*ze),Fe.restart(!0)),m=0,n&&At&&(n._initted||He)&&n.progress()!==He&&n.progress(He,!0).render(n.time(),!0,!0),(ze!==Lt.progress||xt)&&(n&&!At&&n.totalProgress(ze,!0),Lt.progress=(p-b)/T===ze?0:ze),dt&&ht&&(U._pinOffset=Math.round(Lt.progress*Q)),lt&&!L&<(Lt)}},Lt.getVelocity=function(){return(Ut()-v)/(z()-f)*1e3||0},Lt.endAnimation=function(){re(Lt.callbackAnimation),n&&(ke?ke.progress(1):n.paused()?At||re(n,Lt.direction<0,1):re(n,n.reversed()))},Lt.labelToScroll=function(e){return n&&n.labels&&(b||Lt.refresh()||b)+n.labels[e]/n.duration()*T||0},Lt.getTrailing=function(e){var t=Be.indexOf(Lt),n=Lt.direction>0?Be.slice(0,t).reverse():Be.slice(t+1);return(Z(e)?n.filter((function(t){return t.vars.preventOverlaps===e})):n).filter((function(e){return Lt.direction>0?e.end<=b:e.start>=_}))},Lt.update=function(e,t,r){if(!xt||r||e){var a,o,s,c,u,h,g,y=L?Ue:Lt.scroll(),x=e?0:(y-b)/T,w=x<0?0:x>1?1:x||0,M=Lt.progress;if(t&&(v=p,p=xt?Ut():y,yt&&(Re=Ee,Ee=n&&!At?n.totalProgress():w)),pt&&!w&&dt&&!m&&!N&&H&&b<y+(y-v)/(z()-f)*pt&&(w=1e-4),w!==M&&Lt.enabled){if(c=(u=(a=Lt.isActive=!!w&&w<1)!=(!!M&&M<1))||!!w!=!!M,Lt.direction=w>M?1:-1,Lt.progress=w,c&&!m&&(o=w&&!M?0:1===w?1:1===M?2:3,At&&(s=!u&&"none"!==Pt[o+1]&&Pt[o+1]||Pt[o],g=n&&("complete"===s||"reset"===s||s in n))),Mt&&(u||g)&&(g||ct||!n)&&(ee(Mt)?Mt(Lt):Lt.getTrailing(Mt).forEach((function(e){return e.endAnimation()}))),At||(!ke||m||N?n&&n.totalProgress(w,!!m):(ke._dp._time-ke._start!==ke._time&&ke.render(ke._dp._time-ke._start),ke.resetTo?ke.resetTo("totalProgress",w,n._tTime/n._tDur):(ke.vars.totalProgress=w,ke.invalidate().restart()))),dt)if(e&&ht&&(U.style[ht+St.os2]=oe),Rt){if(c){if(h=!e&&w>M&&_+1>y&&y+1>=q(Et,St),bt)if(e||!a&&!h)it(dt,U);else{var S=ge(dt,!0),E=y-b;it(dt,l,S.top+(St===F.r1?E:0)+fe,S.left+(St===F.r1?0:E)+fe)}Ze(a||h?P:I),ce&&w<1&&a||X(K+(1!==w||h?0:Q))}}else X(J(K+Q*w));yt&&!i.tween&&!m&&!N&&Fe.restart(!0),rt&&(u||vt&&w&&(w<1||!k))&&d(rt.targets).forEach((function(e){return e.classList[a||vt?"add":"remove"](rt.className)})),Qe&&!At&&!e&&Qe(Lt),c&&!m?(At&&(g&&("complete"===s?n.pause().totalProgress(1):"reset"===s?n.restart(!0).pause():"restart"===s?n.restart(!0):n[s]()),Qe&&Qe(Lt)),!u&&k||(st&&u&&ie(Lt,st),Bt[o]&&ie(Lt,Bt[o]),vt&&(1===w?Lt.kill(!1,1):Bt[o]=0),u||Bt[o=1===w?1:3]&&ie(Lt,Bt[o])),wt&&!a&&Math.abs(Lt.getVelocity())>(te(wt)?wt:2500)&&(re(Lt.callbackAnimation),ke?ke.progress(1):re(n,"reverse"===s?1:!w,1))):At&&Qe&&!m&&Qe(Lt)}if(_e){var C=xt?y/xt.duration()*(xt._caScrollDist||0):y;le(C+(A._isFlipped?1:0)),_e(C)}Ge&&Ge(-y/xt.duration()*(xt._caScrollDist||0))}},Lt.enable=function(t,n){Lt.enabled||(Lt.enabled=!0,xe(Et,"resize",De),xe(Tt?o:Et,"scroll",Ie),Dt&&xe(e,"refreshInit",Dt),!1!==t&&(Lt.progress=ze=0,p=v=Nt=Ut()),!1!==n&&Lt.refresh())},Lt.getTween=function(e){return e&&i?i.tween:ke},Lt.setPositions=function(e,t){dt&&(K+=e-b,Q+=t-e-T,ht===ue&&Lt.adjustPinSpacing(t-e-T)),Lt.start=b=e,Lt.end=_=t,T=t-e,Lt.update()},Lt.adjustPinSpacing=function(e){if(se){var t=se.indexOf(St.d)+1;se[t]=parseFloat(se[t])+e+fe,se[1]=parseFloat(se[1])+e+fe,Ze(se)}},Lt.disable=function(t,n){if(Lt.enabled&&(!1!==t&&Lt.revert(!0,!0),Lt.enabled=Lt.isActive=!1,n||ke&&ke.pause(),Ue=0,c&&(c.uncache=1),Dt&&we(e,"refreshInit",Dt),Fe&&(Fe.pause(),i.tween&&i.tween.kill()&&(i.tween=0)),!Tt)){for(var r=Be.length;r--;)if(Be[r].scroller===Et&&Be[r]!==Lt)return;we(Et,"resize",De),we(Et,"scroll",Ie)}},Lt.kill=function(e,r){Lt.disable(e,r),ke&&!r&&ke.kill(),ot&&delete Pe[ot];var i=Be.indexOf(Lt);i>=0&&Be.splice(i,1),i===y&&Xe>0&&y--,i=0,Be.forEach((function(e){return e.scroller===Lt.scroller&&(i=1)})),i||L||(Lt.scroll.rec=0),n&&(n.scrollTrigger=null,e&&n.revert({kill:!1}),r||n.kill()),x&&[x,S,A,E].forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),O===Lt&&(O=0),dt&&(c&&(c.uncache=1),i=0,Be.forEach((function(e){return e.pin===dt&&i++})),i||(c.spacer=0)),t.onKill&&t.onKill(Lt)},Lt.enable(!1,!1),Ve&&Ve(Lt),n&&n.add&&!T?r.delayedCall(.01,(function(){return b||_||Lt.refresh()}))&&(T=.01)&&(b=_=0):Lt.refresh(),dt&&function(){if(D!==je){var e=D=je;requestAnimationFrame((function(){return e===je&&We(!0)}))}}()}else this.update=this.refresh=this.kill=W},e.register=function(t){return i||(r=t||K(),X()&&window.document&&e.enable(),i=G),i},e.defaults=function(e){if(e)for(var t in e)Ae[t]=e[t];return Ae},e.disable=function(e,t){G=0,Be.forEach((function(n){return n[t?"kill":"disable"](e)})),we(a,"wheel",Ie),we(o,"scroll",Ie),clearInterval(p),we(o,"touchcancel",W),we(l,"touchstart",W),_e(we,o,"pointerdown,touchstart,mousedown",V),_e(we,o,"pointerup,touchend,mouseup",j),u.kill(),Q(we);for(var n=0;n<F.xJ.length;n+=3)Me(we,F.xJ[n],F.xJ[n+1]),Me(we,F.xJ[n],F.xJ[n+2])},e.enable=function(){if(a=window,o=document,s=o.documentElement,l=o.body,r&&(d=r.utils.toArray,h=r.utils.clamp,B=r.core.context||W,M=r.core.suppressOverwrites||W,P=a.history.scrollRestoration||"auto",r.core.globals("ScrollTrigger",e),l)){G=1,F.Qj.register(r),e.isTouch=F.Qj.isTouch,R=F.Qj.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),xe(a,"wheel",Ie),c=[a,o,s,l],r.matchMedia?(e.matchMedia=function(e){var t,n=r.matchMedia();for(t in e)n.add(t,e[t]);return n},r.addEventListener("matchMediaInit",(function(){return Ge()})),r.addEventListener("matchMediaRevert",(function(){return He()})),r.addEventListener("matchMedia",(function(){We(0,1),ze("matchMedia")})),r.matchMedia("(orientation: portrait)",(function(){return Le(),Le}))):console.warn("Requires GSAP 3.11.0 or later"),Le(),xe(o,"scroll",Ie);var t,n,f=l.style,m=f.borderTopStyle,g=r.core.Animation.prototype;for(g.revert||Object.defineProperty(g,"revert",{value:function(){return this.time(-.01,!0)}}),f.borderTopStyle="solid",t=ge(l),F.r1.m=Math.round(t.top+F.r1.sc())||0,F.iz.m=Math.round(t.left+F.iz.sc())||0,m?f.borderTopStyle=m:f.removeProperty("border-top-style"),p=setInterval(ke,250),r.delayedCall(.5,(function(){return N=0})),xe(o,"touchcancel",W),xe(l,"touchstart",W),_e(xe,o,"pointerdown,touchstart,mousedown",V),_e(xe,o,"pointerup,touchend,mouseup",j),v=r.utils.checkPrefix("transform"),Ye.push(v),i=z(),u=r.delayedCall(.2,We).pause(),x=[o,"visibilitychange",function(){var e=a.innerWidth,t=a.innerHeight;o.hidden?(b=e,_=t):b===e&&_===t||De()},o,"DOMContentLoaded",We,a,"load",We,a,"resize",De],Q(xe),Be.forEach((function(e){return e.enable(0,1)})),n=0;n<F.xJ.length;n+=3)Me(we,F.xJ[n],F.xJ[n+1]),Me(we,F.xJ[n],F.xJ[n+2])}},e.config=function(t){"limitCallbacks"in t&&(k=!!t.limitCallbacks);var n=t.syncInterval;n&&clearInterval(p)||(p=n)&&setInterval(ke,n),"ignoreMobileResize"in t&&(E=1===e.isTouch&&t.ignoreMobileResize),"autoRefreshEvents"in t&&(Q(we)||Q(xe,t.autoRefreshEvents||"none"),S=-1===(t.autoRefreshEvents+"").indexOf("resize"))},e.scrollerProxy=function(e,t){var n=(0,F.ZV)(e),r=F.xJ.indexOf(n),i=$(n);~r&&F.xJ.splice(r,i?6:2),t&&(i?F.KM.unshift(a,t,l,t,s,t):F.KM.unshift(n,t))},e.clearMatchMedia=function(e){Be.forEach((function(t){return t._ctx&&t._ctx.query===e&&t._ctx.kill(!0,!0)}))},e.isInViewport=function(e,t,n){var r=(Z(e)?(0,F.ZV)(e):e).getBoundingClientRect(),i=r[n?le:ce]*t||0;return n?r.right-i>0&&r.left+i<a.innerWidth:r.bottom-i>0&&r.top+i<a.innerHeight},e.positionInViewport=function(e,t,n){Z(e)&&(e=(0,F.ZV)(e));var r=e.getBoundingClientRect(),i=r[n?le:ce],o=null==t?i/2:t in Ee?Ee[t]*i:~t.indexOf("%")?parseFloat(t)*i/100:parseFloat(t)||0;return n?(r.left+o)/a.innerWidth:(r.top+o)/a.innerHeight},e.killAll=function(e){if(Be.slice(0).forEach((function(e){return"ScrollSmoother"!==e.vars.id&&e.kill()})),!0!==e){var t=Oe.killAll||[];Oe={},t.forEach((function(e){return e()}))}},e}();ot.version="3.11.4",ot.saveStyles=function(e){return e?d(e).forEach((function(e){if(e&&e.style){var t=Ue.indexOf(e);t>=0&&Ue.splice(t,5),Ue.push(e,e.style.cssText,e.getBBox&&e.getAttribute("transform"),r.core.getCache(e),B())}})):Ue},ot.revert=function(e,t){return Ge(!e,t)},ot.create=function(e,t){return new ot(e,t)},ot.refresh=function(e){return e?De():(i||ot.register())&&We(!0)},ot.update=function(e){return++F.xJ.cache&&Ke(!0===e?2:0)},ot.clearScrollMemory=Ve,ot.maxScroll=function(e,t){return q(e,t?F.iz:F.r1)},ot.getScrollFunc=function(e,t){return(0,F.y4)((0,F.ZV)(e),t?F.iz:F.r1)},ot.getById=function(e){return Pe[e]},ot.getAll=function(){return Be.filter((function(e){return"ScrollSmoother"!==e.vars.id}))},ot.isScrolling=function(){return!!H},ot.snapDirectional=be,ot.addEventListener=function(e,t){var n=Oe[e]||(Oe[e]=[]);~n.indexOf(t)||n.push(t)},ot.removeEventListener=function(e,t){var n=Oe[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},ot.batch=function(e,t){var n,i=[],a={},o=t.interval||.016,s=t.batchMax||1e9,l=function(e,t){var n=[],i=[],a=r.delayedCall(o,(function(){t(n,i),n=[],i=[]})).pause();return function(e){n.length||a.restart(!0),n.push(e.trigger),i.push(e),s<=n.length&&a.progress(1)}};for(n in t)a[n]="on"===n.substr(0,2)&&ee(t[n])&&"onRefreshInit"!==n?l(0,t[n]):t[n];return ee(s)&&(s=s(),xe(ot,"refresh",(function(){return s=t.batchMax()}))),d(e).forEach((function(e){var t={};for(n in a)t[n]=a[n];t.trigger=e,i.push(ot.create(t))})),i};var st,lt=function(e,t,n,r){return t>r?e(r):t<0&&e(0),n>r?(r-t)/(n-t):n<0?t/(t-n):1},ct=function e(t,n){!0===n?t.style.removeProperty("touch-action"):t.style.touchAction=!0===n?"auto":n?"pan-"+n+(F.Qj.isTouch?" pinch-zoom":""):"none",t===s&&e(l,n)},ut={auto:1,scroll:1},dt=function(e){var t,n=e.event,i=e.target,a=e.axis,o=(n.changedTouches?n.changedTouches[0]:n).target,s=o._gsap||r.core.getCache(o),c=z();if(!s._isScrollT||c-s._isScrollT>2e3){for(;o&&o!==l&&(o.scrollHeight<=o.clientHeight&&o.scrollWidth<=o.clientWidth||!ut[(t=pe(o)).overflowY]&&!ut[t.overflowX]);)o=o.parentNode;s._isScroll=o&&o!==i&&!$(o)&&(ut[(t=pe(o)).overflowY]||ut[t.overflowX]),s._isScrollT=c}(s._isScroll||"x"===a)&&(n.stopPropagation(),n._gsapAllow=!0)},ht=function(e,t,n,r){return F.Qj.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:t,onWheel:r=r&&dt,onPress:r,onDrag:r,onScroll:r,onEnable:function(){return n&&xe(o,F.Qj.eventTypes[0],pt,!1,!0)},onDisable:function(){return we(o,F.Qj.eventTypes[0],pt,!0)}})},ft=/(input|label|select|textarea)/i,pt=function(e){var t=ft.test(e.target.tagName);(t||st)&&(e._gsapAllow=!0,st=t)};ot.sort=function(e){return Be.sort(e||function(e,t){return-1e6*(e.vars.refreshPriority||0)+e.start-(t.start+-1e6*(t.vars.refreshPriority||0))})},ot.observe=function(e){return new F.Qj(e)},ot.normalizeScroll=function(e){if(void 0===e)return A;if(!0===e&&A)return A.enable();if(!1===e)return A&&A.kill();var t=e instanceof F.Qj?e:function(e){ne(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||(e.type="wheel,touch"),e.debounce=!!e.debounce,e.id=e.id||"normalizer";var t,n,i,o,l,c,u,d,f=e,p=f.normalizeScrollX,m=f.momentum,g=f.allowNestedScroll,v=(0,F.ZV)(e.target)||s,y=r.core.globals().ScrollSmoother,b=y&&y.get(),_=R&&(e.content&&(0,F.ZV)(e.content)||b&&!1!==e.content&&!b.smooth()&&b.content()),x=(0,F.y4)(v,F.r1),w=(0,F.y4)(v,F.iz),M=1,S=(F.Qj.isTouch&&a.visualViewport?a.visualViewport.scale*a.visualViewport.width:a.outerWidth)/a.innerWidth,A=0,E=ee(m)?function(){return m(t)}:function(){return m||2.8},C=ht(v,e.type,!0,g),T=function(){return o=!1},B=W,P=W,k=function(){n=q(v,F.r1),P=h(R?1:0,n),p&&(B=h(0,q(v,F.iz))),i=je},I=function(){_._gsap.y=J(parseFloat(_._gsap.y)+x.offset)+"px",_.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(_._gsap.y)+", 0, 1)",x.offset=x.cacheID=0},L=function(){k(),l.isActive()&&l.vars.scrollY>n&&(x()>n?l.progress(1)&&x(n):l.resetTo("scrollY",n))};return _&&r.set(_,{y:"+=0"}),e.ignoreCheck=function(e){return R&&"touchmove"===e.type&&function(){if(o){requestAnimationFrame(T);var e=J(t.deltaY/2),n=P(x.v-e);if(_&&n!==x.v+x.offset){x.offset=n-x.v;var r=J((parseFloat(_&&_._gsap.y)||0)-x.offset);_.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+r+", 0, 1)",_._gsap.y=r+"px",x.cacheID=F.xJ.cache,Ke()}return!0}x.offset&&I(),o=!0}()||M>1.05&&"touchstart"!==e.type||t.isGesturing||e.touches&&e.touches.length>1},e.onPress=function(){var e=M;M=J((a.visualViewport&&a.visualViewport.scale||1)/S),l.pause(),e!==M&&ct(v,M>1.01||!p&&"x"),c=w(),u=x(),k(),i=je},e.onRelease=e.onGestureStart=function(e,t){if(x.offset&&I(),t){F.xJ.cache++;var i,a,o=E();p&&(a=(i=w())+.05*o*-e.velocityX/.227,o*=lt(w,i,a,q(v,F.iz)),l.vars.scrollX=B(a)),a=(i=x())+.05*o*-e.velocityY/.227,o*=lt(x,i,a,q(v,F.r1)),l.vars.scrollY=P(a),l.invalidate().duration(o).play(.01),(R&&l.vars.scrollY>=n||i>=n-1)&&r.to({},{onUpdate:L,duration:o})}else d.restart(!0)},e.onWheel=function(){l._ts&&l.pause(),z()-A>1e3&&(i=0,A=z())},e.onChange=function(e,t,n,r,a){if(je!==i&&k(),t&&p&&w(B(r[2]===t?c+(e.startX-e.x):w()+t-r[1])),n){x.offset&&I();var o=a[2]===n,s=o?u+e.startY-e.y:x()+n-a[1],l=P(s);o&&s!==l&&(u+=l-s),x(l)}(n||t)&&Ke()},e.onEnable=function(){ct(v,!p&&"x"),ot.addEventListener("refresh",L),xe(a,"resize",L),x.smooth&&(x.target.style.scrollBehavior="auto",x.smooth=w.smooth=!1),C.enable()},e.onDisable=function(){ct(v,!0),we(a,"resize",L),ot.removeEventListener("refresh",L),C.kill()},e.lockAxis=!1!==e.lockAxis,(t=new F.Qj(e)).iOS=R,R&&!x()&&x(1),R&&r.ticker.add(W),d=t._dc,l=r.to(t,{ease:"power4",paused:!0,scrollX:p?"+=0.1":"+=0",scrollY:"+=0.1",onComplete:d.vars.onComplete}),t}(e);return A&&A.target===t.target&&A.kill(),$(t.target)&&(A=t),t},ot.core={_getVelocityProp:F.QR,_inputObserver:ht,_scrollers:F.xJ,_proxies:F.KM,bridge:{ss:function(){H||ze("scrollStart"),H=z()},ref:function(){return m}}},K()&&r.registerPlugin(ot)},5317:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,{$i:()=>ae,DY:()=>de,Fc:()=>b,Fo:()=>dn,GN:()=>xt,JV:()=>un,Ks:()=>an,Ok:()=>he,Pr:()=>pe,S5:()=>tn,SI:()=>U,UI:()=>ct,Wy:()=>Qe,bQ:()=>V,cy:()=>ge,d4:()=>H,fS:()=>fe,if:()=>jt,kr:()=>Mt,l1:()=>Ft,lC:()=>$,m2:()=>k,p8:()=>Mn,r9:()=>R,xr:()=>St});var a,o,s,l,c,u,d,h,f,p,m,g,v,y,b={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_={duration:.5,overwrite:!1,delay:0},x=1e8,w=1e-8,M=2*Math.PI,S=M/4,A=0,E=Math.sqrt,C=Math.cos,T=Math.sin,R=function(e){return"string"==typeof e},B=function(e){return"function"==typeof e},P=function(e){return"number"==typeof e},k=function(e){return void 0===e},I=function(e){return"object"==typeof e},L=function(e){return!1!==e},D=function(){return"undefined"!=typeof window},O=function(e){return B(e)||R(e)},F="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},N=Array.isArray,z=/(?:-?\.?\d|\.)+/gi,U=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,H=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,G=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,V=/[+-]=-?[.\d]+/,j=/[^,'"\[\]\s]+/gi,W=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,J={},X={},K=function(e){return(X=Me(e,J))&&Mn},$=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Y=function(e,t){return!t&&console.warn(e)},q=function(e,t){return e&&(J[e]=t)&&X&&(X[e]=t)||J},Q=function(){return 0},Z={suppressEvents:!0,isStart:!0,kill:!1},ee={suppressEvents:!0,kill:!1},te={suppressEvents:!0},ne={},re=[],ie={},ae={},oe={},se=30,le=[],ce="",ue=function(e){var t,n,r=e[0];if(I(r)||B(r)||(e=[e]),!(t=(r._gsap||{}).harness)){for(n=le.length;n--&&!le[n].targetTest(r););t=le[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new Ft(e[n],t)))||e.splice(n,1);return e},de=function(e){return e._gsap||ue(tt(e))[0]._gsap},he=function(e,t,n){return(n=e[t])&&B(n)?e[t]():k(n)&&e.getAttribute&&e.getAttribute(t)||n},fe=function(e,t){return(e=e.split(",")).forEach(t)||e},pe=function(e){return Math.round(1e5*e)/1e5||0},me=function(e){return Math.round(1e7*e)/1e7||0},ge=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),"+"===n?e+r:"-"===n?e-r:"*"===n?e*r:e/r},ve=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++r<n;);return r<n},ye=function(){var e,t,n=re.length,r=re.slice(0);for(ie={},re.length=0,e=0;e<n;e++)(t=r[e])&&t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0)._lazy=0)},be=function(e,t,n,r){re.length&&!o&&ye(),e.render(t,n,r||o&&t<0&&(e._initted||e._startAt)),re.length&&!o&&ye()},_e=function(e){var t=parseFloat(e);return(t||0===t)&&(e+"").match(j).length<2?t:R(e)?e.trim():e},xe=function(e){return e},we=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},Me=function(e,t){for(var n in t)e[n]=t[n];return e},Se=function e(t,n){for(var r in n)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=I(n[r])?e(t[r]||(t[r]={}),n[r]):n[r]);return t},Ae=function(e,t){var n,r={};for(n in e)n in t||(r[n]=e[n]);return r},Ee=function(e){var t,n=e.parent||l,r=e.keyframes?(t=N(e.keyframes),function(e,n){for(var r in n)r in e||"duration"===r&&t||"ease"===r||(e[r]=n[r])}):we;if(L(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},Ce=function(e,t,n,r,i){void 0===n&&(n="_first"),void 0===r&&(r="_last");var a,o=e[r];if(i)for(a=t[i];o&&o[i]>a;)o=o._prev;return o?(t._next=o._next,o._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=o,t.parent=t._dp=e,t},Te=function(e,t,n,r){void 0===n&&(n="_first"),void 0===r&&(r="_last");var i=t._prev,a=t._next;i?i._next=a:e[n]===t&&(e[n]=a),a?a._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},Re=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove(e),e._act=0},Be=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},Pe=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},ke=function(e,t,n,r){return e._startAt&&(o?e._startAt.revert(ee):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},Ie=function e(t){return!t||t._ts&&e(t.parent)},Le=function(e){return e._repeat?De(e._tTime,e=e.duration()+e._rDelay)*e:0},De=function(e,t){var n=Math.floor(e/=t);return e&&n===e?n-1:n},Oe=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Fe=function(e){return e._end=me(e._start+(e._tDur/Math.abs(e._ts||e._rts||w)||0))},Ne=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=me(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Fe(e),n._dirty||Be(n,e)),e},ze=function(e,t){var n;if((t._time||t._initted&&!t._dur)&&(n=Oe(e.rawTime(),t),(!t._dur||qe(0,t.totalDuration(),n)-t._tTime>w)&&t.render(n,!0)),Be(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-1e-8}},Ue=function(e,t,n,r){return t.parent&&Re(t),t._start=me((P(n)?n:n||e!==l?Ke(e,n,t):e._time)+t._delay),t._end=me(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Ce(e,t,"_first","_last",e._sort?"_start":0),je(t)||(e._recent=t),r||ze(e,t),e._ts<0&&Ne(e,e._tTime),e},He=function(e,t){return(J.ScrollTrigger||$("scrollTrigger",t))&&J.ScrollTrigger.create(t,e)},Ge=function(e,t,n,r,i){return Wt(e,t,i),e._initted?!n&&e._pt&&!o&&(e._dur&&!1!==e.vars.lazy||!e._dur&&e.vars.lazy)&&f!==St.frame?(re.push(e),e._lazy=[i,r],1):void 0:1},Ve=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},je=function(e){var t=e.data;return"isFromStart"===t||"isStart"===t},We=function(e,t,n,r){var i=e._repeat,a=me(t)||0,o=e._tTime/e._tDur;return o&&!r&&(e._time*=a/e._dur),e._dur=a,e._tDur=i?i<0?1e10:me(a*(i+1)+e._rDelay*i):a,o>0&&!r&&Ne(e,e._tTime=e._tDur*o),e.parent&&Fe(e),n||Be(e.parent,e),e},Je=function(e){return e instanceof zt?Be(e):We(e,e._dur)},Xe={_start:0,endTime:Q,totalDuration:Q},Ke=function e(t,n,r){var i,a,o,s=t.labels,l=t._recent||Xe,c=t.duration()>=x?l.endTime(!1):t._dur;return R(n)&&(isNaN(n)||n in s)?(a=n.charAt(0),o="%"===n.substr(-1),i=n.indexOf("="),"<"===a||">"===a?(i>=0&&(n=n.replace(/=/,"")),("<"===a?l._start:l.endTime(l._repeat>=0))+(parseFloat(n.substr(1))||0)*(o?(i<0?l:r).totalDuration()/100:1)):i<0?(n in s||(s[n]=c),s[n]):(a=parseFloat(n.charAt(i-1)+n.substr(i+1)),o&&r&&(a=a/100*(N(r)?r[0]:r).totalDuration()),i>1?e(t,n.substr(0,i-1),r)+a:c+a)):null==n?c:+n},$e=function(e,t,n){var r,i,a=P(t[1]),o=(a?2:1)+(e<2?0:1),s=t[o];if(a&&(s.duration=t[1]),s.parent=n,e){for(r=s,i=n;i&&!("immediateRender"in r);)r=i.vars.defaults||{},i=L(i.vars.inherit)&&i.parent;s.immediateRender=L(r.immediateRender),e<2?s.runBackwards=1:s.startAt=t[o-1]}return new Yt(t[0],s,t[o+1])},Ye=function(e,t){return e||0===e?t(e):t},qe=function(e,t,n){return n<e?e:n>t?t:n},Qe=function(e,t){return R(e)&&(t=W.exec(e))?t[1]:""},Ze=[].slice,et=function(e,t){return e&&I(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&I(e[0]))&&!e.nodeType&&e!==c},tt=function(e,t,n){return s&&!t&&s.selector?s.selector(e):!R(e)||n||!u&&At()?N(e)?function(e,t,n){return void 0===n&&(n=[]),e.forEach((function(e){var r;return R(e)&&!t||et(e,1)?(r=n).push.apply(r,tt(e)):n.push(e)}))||n}(e,n):et(e)?Ze.call(e,0):e?[e]:[]:Ze.call((t||d).querySelectorAll(e),0)},nt=function(e){return e=tt(e)[0]||Y("Invalid scope")||{},function(t){var n=e.current||e.nativeElement||e;return tt(t,n.querySelectorAll?n:n===e?Y("Invalid scope")||d.createElement("div"):e)}},rt=function(e){return e.sort((function(){return.5-Math.random()}))},it=function(e){if(B(e))return e;var t=I(e)?e:{each:e},n=kt(t.ease),r=t.from||0,i=parseFloat(t.base)||0,a={},o=r>0&&r<1,s=isNaN(r)||o,l=t.axis,c=r,u=r;return R(r)?c=u={center:.5,edges:.5,end:1}[r]||0:!o&&s&&(c=r[0],u=r[1]),function(e,o,d){var h,f,p,m,g,v,y,b,_,w=(d||t).length,M=a[w];if(!M){if(!(_="auto"===t.grid?0:(t.grid||[1,x])[1])){for(y=-x;y<(y=d[_++].getBoundingClientRect().left)&&_<w;);_--}for(M=a[w]=[],h=s?Math.min(_,w)*c-.5:r%_,f=_===x?0:s?w*u/_-.5:r/_|0,y=0,b=x,v=0;v<w;v++)p=v%_-h,m=f-(v/_|0),M[v]=g=l?Math.abs("y"===l?m:p):E(p*p+m*m),g>y&&(y=g),g<b&&(b=g);"random"===r&&rt(M),M.max=y-b,M.min=b,M.v=w=(parseFloat(t.amount)||parseFloat(t.each)*(_>w?w-1:l?"y"===l?w/_:_:Math.max(_,w/_))||0)*("edges"===r?-1:1),M.b=w<0?i-w:i,M.u=Qe(t.amount||t.each)||0,n=n&&w<0?Bt(n):n}return w=(M[e]-M.min)/M.max||0,me(M.b+(n?n(w):w)*M.v)+M.u}},at=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(n){var r=me(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(P(n)?0:Qe(n))}},ot=function(e,t){var n,r,i=N(e);return!i&&I(e)&&(n=i=e.radius||x,e.values?(e=tt(e.values),(r=!P(e[0]))&&(n*=n)):e=at(e.increment)),Ye(t,i?B(e)?function(t){return r=e(t),Math.abs(r-t)<=n?r:t}:function(t){for(var i,a,o=parseFloat(r?t.x:t),s=parseFloat(r?t.y:0),l=x,c=0,u=e.length;u--;)(i=r?(i=e[u].x-o)*i+(a=e[u].y-s)*a:Math.abs(e[u]-o))<l&&(l=i,c=u);return c=!n||l<=n?e[c]:t,r||c===t||P(t)?c:c+Qe(t)}:at(e))},st=function(e,t,n,r){return Ye(N(e)?!t:!0===n?!!(n=0):!r,(function(){return N(e)?e[~~(Math.random()*e.length)]:(n=n||1e-5)&&(r=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+.99*n))/n)*n*r)/r}))},lt=function(e,t,n){return Ye(n,(function(n){return e[~~t(n)]}))},ct=function(e){for(var t,n,r,i,a=0,o="";~(t=e.indexOf("random(",a));)r=e.indexOf(")",t),i="["===e.charAt(t+7),n=e.substr(t+7,r-t-7).match(i?j:z),o+=e.substr(a,t-a)+st(i?n:+n[0],i?0:+n[1],+n[2]||1e-5),a=r+1;return o+e.substr(a,e.length-a)},ut=function(e,t,n,r,i){var a=t-e,o=r-n;return Ye(i,(function(t){return n+((t-e)/a*o||0)}))},dt=function(e,t,n){var r,i,a,o=e.labels,s=x;for(r in o)(i=o[r]-t)<0==!!n&&i&&s>(i=Math.abs(i))&&(a=r,s=i);return a},ht=function(e,t,n){var r,i,a,o=e.vars,l=o[t],c=s,u=e._ctx;if(l)return r=o[t+"Params"],i=o.callbackScope||e,n&&re.length&&ye(),u&&(s=u),a=r?l.apply(i,r):l.call(i),s=c,a},ft=function(e){return Re(e),e.scrollTrigger&&e.scrollTrigger.kill(!!o),e.progress()<1&&ht(e,"onInterrupt"),e},pt=function(e){var t=(e=!e.name&&e.default||e).name,n=B(e),r=t&&!n&&e.init?function(){this._props=[]}:e,i={init:Q,render:on,add:Vt,kill:ln,modifier:sn,rawVars:0},a={targetTest:0,get:0,getSetter:tn,aliases:{},register:0};if(At(),e!==r){if(ae[t])return;we(r,we(Ae(e,i),a)),Me(r.prototype,Me(i,Ae(e,a))),ae[r.prop=t]=r,e.targetTest&&(le.push(r),ne[t]=1),t=("css"===t?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}q(t,r),e.register&&e.register(Mn,r,dn)},mt=255,gt={aqua:[0,mt,mt],lime:[0,mt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,mt],navy:[0,0,128],white:[mt,mt,mt],olive:[128,128,0],yellow:[mt,mt,0],orange:[mt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[mt,0,0],pink:[mt,192,203],cyan:[0,mt,mt],transparent:[mt,mt,mt,0]},vt=function(e,t,n){return(6*(e+=e<0?1:e>1?-1:0)<1?t+(n-t)*e*6:e<.5?n:3*e<2?t+(n-t)*(2/3-e)*6:t)*mt+.5|0},yt=function(e,t,n){var r,i,a,o,s,l,c,u,d,h,f=e?P(e)?[e>>16,e>>8&mt,e&mt]:0:gt.black;if(!f){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),gt[e])f=gt[e];else if("#"===e.charAt(0)){if(e.length<6&&(r=e.charAt(1),i=e.charAt(2),a=e.charAt(3),e="#"+r+r+i+i+a+a+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(f=parseInt(e.substr(1,6),16))>>16,f>>8&mt,f&mt,parseInt(e.substr(7),16)/255];f=[(e=parseInt(e.substr(1),16))>>16,e>>8&mt,e&mt]}else if("hsl"===e.substr(0,3))if(f=h=e.match(z),t){if(~e.indexOf("="))return f=e.match(U),n&&f.length<4&&(f[3]=1),f}else o=+f[0]%360/360,s=+f[1]/100,r=2*(l=+f[2]/100)-(i=l<=.5?l*(s+1):l+s-l*s),f.length>3&&(f[3]*=1),f[0]=vt(o+1/3,r,i),f[1]=vt(o,r,i),f[2]=vt(o-1/3,r,i);else f=e.match(z)||gt.transparent;f=f.map(Number)}return t&&!h&&(r=f[0]/mt,i=f[1]/mt,a=f[2]/mt,l=((c=Math.max(r,i,a))+(u=Math.min(r,i,a)))/2,c===u?o=s=0:(d=c-u,s=l>.5?d/(2-c-u):d/(c+u),o=c===r?(i-a)/d+(i<a?6:0):c===i?(a-r)/d+2:(r-i)/d+4,o*=60),f[0]=~~(o+.5),f[1]=~~(100*s+.5),f[2]=~~(100*l+.5)),n&&f.length<4&&(f[3]=1),f},bt=function(e){var t=[],n=[],r=-1;return e.split(xt).forEach((function(e){var i=e.match(H)||[];t.push.apply(t,i),n.push(r+=i.length+1)})),t.c=n,t},_t=function(e,t,n){var r,i,a,o,s="",l=(e+s).match(xt),c=t?"hsla(":"rgba(",u=0;if(!l)return e;if(l=l.map((function(e){return(e=yt(e,t,1))&&c+(t?e[0]+","+e[1]+"%,"+e[2]+"%,"+e[3]:e.join(","))+")"})),n&&(a=bt(e),(r=n.c).join(s)!==a.c.join(s)))for(o=(i=e.replace(xt,"1").split(H)).length-1;u<o;u++)s+=i[u]+(~r.indexOf(u)?l.shift()||c+"0,0,0,0)":(a.length?a:l.length?l:n).shift());if(!i)for(o=(i=e.split(xt)).length-1;u<o;u++)s+=i[u]+l[u];return s+i[o]},xt=function(){var e,t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(e in gt)t+="|"+e+"\\b";return new RegExp(t+")","gi")}(),wt=/hsl[a]?\(/,Mt=function(e){var t,n=e.join(" ");if(xt.lastIndex=0,xt.test(n))return t=wt.test(n),e[1]=_t(e[1],t),e[0]=_t(e[0],t,bt(e[1])),!0},St=function(){var e,t,n,r,i,a,o=Date.now,s=500,l=33,f=o(),p=f,g=1e3/240,v=g,y=[],b=function n(c){var u,d,h,m,b=o()-p,_=!0===c;if(b>s&&(f+=b-l),((u=(h=(p+=b)-f)-v)>0||_)&&(m=++r.frame,i=h-1e3*r.time,r.time=h/=1e3,v+=u+(u>=g?4:g-u),d=1),_||(e=t(n)),d)for(a=0;a<y.length;a++)y[a](h,i,m,c)};return r={time:0,frame:0,tick:function(){b(!0)},deltaRatio:function(e){return i/(1e3/(e||60))},wake:function(){h&&(!u&&D()&&(c=u=window,d=c.document||{},J.gsap=Mn,(c.gsapVersions||(c.gsapVersions=[])).push(Mn.version),K(X||c.GreenSockGlobals||!c.gsap&&c||{}),n=c.requestAnimationFrame),e&&r.sleep(),t=n||function(e){return setTimeout(e,v-1e3*r.time+1|0)},m=1,b(2))},sleep:function(){(n?c.cancelAnimationFrame:clearTimeout)(e),m=0,t=Q},lagSmoothing:function(e,t){s=e||1/0,l=Math.min(t||33,s)},fps:function(e){g=1e3/(e||240),v=1e3*r.time+g},add:function(e,t,n){var i=t?function(t,n,a,o){e(t,n,a,o),r.remove(i)}:e;return r.remove(e),y[n?"unshift":"push"](i),At(),i},remove:function(e,t){~(t=y.indexOf(e))&&y.splice(t,1)&&a>=t&&a--},_listeners:y}}(),At=function(){return!m&&St.wake()},Et={},Ct=/^[\d.\-M][\d.\-,\s]/,Tt=/["']/g,Rt=function(e){for(var t,n,r,i={},a=e.substr(1,e.length-3).split(":"),o=a[0],s=1,l=a.length;s<l;s++)n=a[s],t=s!==l-1?n.lastIndexOf(","):n.length,r=n.substr(0,t),i[o]=isNaN(r)?r.replace(Tt,"").trim():+r,o=n.substr(t+1).trim();return i},Bt=function(e){return function(t){return 1-e(1-t)}},Pt=function e(t,n){for(var r,i=t._first;i;)i instanceof zt?e(i,n):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===n||(i.timeline?e(i.timeline,n):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=n)),i=i._next},kt=function(e,t){return e&&(B(e)?e:Et[e]||function(e){var t,n,r,i,a=(e+"").split("("),o=Et[a[0]];return o&&a.length>1&&o.config?o.config.apply(null,~e.indexOf("{")?[Rt(a[1])]:(t=e,n=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",n),t.substring(n,~i&&i<r?t.indexOf(")",r+1):r)).split(",").map(_e)):Et._CE&&Ct.test(e)?Et._CE("",e):o}(e))||t},It=function(e,t,n,r){void 0===n&&(n=function(e){return 1-t(1-e)}),void 0===r&&(r=function(e){return e<.5?t(2*e)/2:1-t(2*(1-e))/2});var i,a={easeIn:t,easeOut:n,easeInOut:r};return fe(e,(function(e){for(var t in Et[e]=J[e]=a,Et[i=e.toLowerCase()]=n,a)Et[i+("easeIn"===t?".in":"easeOut"===t?".out":".inOut")]=Et[e+"."+t]=a[t]})),a},Lt=function(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}},Dt=function e(t,n,r){var i=n>=1?n:1,a=(r||(t?.3:.45))/(n<1?n:1),o=a/M*(Math.asin(1/i)||0),s=function(e){return 1===e?1:i*Math.pow(2,-10*e)*T((e-o)*a)+1},l="out"===t?s:"in"===t?function(e){return 1-s(1-e)}:Lt(s);return a=M/a,l.config=function(n,r){return e(t,n,r)},l},Ot=function e(t,n){void 0===n&&(n=1.70158);var r=function(e){return e?--e*e*((n+1)*e+n)+1:0},i="out"===t?r:"in"===t?function(e){return 1-r(1-e)}:Lt(r);return i.config=function(n){return e(t,n)},i};fe("Linear,Quad,Cubic,Quart,Quint,Strong",(function(e,t){var n=t<5?t+1:t;It(e+",Power"+(n-1),t?function(e){return Math.pow(e,n)}:function(e){return e},(function(e){return 1-Math.pow(1-e,n)}),(function(e){return e<.5?Math.pow(2*e,n)/2:1-Math.pow(2*(1-e),n)/2}))})),Et.Linear.easeNone=Et.none=Et.Linear.easeIn,It("Elastic",Dt("in"),Dt("out"),Dt()),g=7.5625,v=2.75,It("Bounce",(function(e){return 1-y(1-e)}),y=function(e){return e<.36363636363636365?g*e*e:e<.7272727272727273?g*Math.pow(e-1.5/v,2)+.75:e<.9090909090909092?g*(e-=2.25/v)*e+.9375:g*Math.pow(e-2.625/v,2)+.984375}),It("Expo",(function(e){return e?Math.pow(2,10*(e-1)):0})),It("Circ",(function(e){return-(E(1-e*e)-1)})),It("Sine",(function(e){return 1===e?1:1-C(e*S)})),It("Back",Ot("in"),Ot("out"),Ot()),Et.SteppedEase=Et.steps=J.SteppedEase={config:function(e,t){void 0===e&&(e=1);var n=1/e,r=e+(t?0:1),i=t?1:0;return function(e){return((r*qe(0,.99999999,e)|0)+i)*n}}},_.ease=Et["quad.out"],fe("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(e){return ce+=e+","+e+"Params,"}));var Ft=function(e,t){this.id=A++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:he,this.set=t?t.getSetter:tn},Nt=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,We(this,+e.duration,1,1),this.data=e.data,s&&(this._ctx=s,s.data.push(this)),m||St.wake()}var t=e.prototype;return t.delay=function(e){return e||0===e?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,We(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(At(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(Ne(this,e),!n._dp||n.parent||ze(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&Ue(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===w||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),be(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+Le(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?e:1-e)+Le(this),t):this.duration()?Math.min(1,this._time/this._dur):this.ratio},t.iteration=function(e,t){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*n,t):this._repeat?De(this._tTime,n)+1:1},t.timeScale=function(e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===e)return this;var t=this.parent&&this._ts?Oe(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||-1e-8===e?0:this._rts,this.totalTime(qe(-this._delay,this._tDur,t),!0),Fe(this),Pe(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(At(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==w&&(this._tTime-=w)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=e;var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&Ue(t,this,e-this._delay),this}return this._start},t.endTime=function(e){return this._start+(L(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Oe(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){void 0===e&&(e=te);var t=o;return o=e,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),"nested"!==this.data&&!1!==e.kill&&this.kill(),o=t,this},t.globalTime=function(e){for(var t=this,n=arguments.length?e:t.rawTime();t;)n=t._start+n/(t._ts||1),t=t._dp;return!this.parent&&this._sat?this._sat.vars.immediateRender?-1:this._sat.globalTime(e):n},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,Je(this)):-2===this._repeat?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,Je(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(Ke(this,e),L(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,L(t))},t.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-1e-8:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},t.isActive=function(){var e,t=this.parent||this._dp,n=this._start;return!(t&&!(this._ts&&this._initted&&t.isActive()&&(e=t.rawTime(!0))>=n&&e<this.endTime(!0)-w))},t.eventCallback=function(e,t,n){var r=this.vars;return arguments.length>1?(t?(r[e]=t,n&&(r[e+"Params"]=n),"onUpdate"===e&&(this._onUpdate=t)):delete r[e],this):r[e]},t.then=function(e){var t=this;return new Promise((function(n){var r=B(e)?e:xe,i=function(){var e=t.then;t.then=null,B(r)&&(r=r(t))&&(r.then||r===t)&&(t.then=e),n(r),t.then=e};t._initted&&1===t.totalProgress()&&t._ts>=0||!t._tTime&&t._ts<0?i():t._prom=i}))},t.kill=function(){ft(this)},e}();we(Nt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var zt=function(e){function t(t,n){var i;return void 0===t&&(t={}),(i=e.call(this,t)||this).labels={},i.smoothChildTiming=!!t.smoothChildTiming,i.autoRemoveChildren=!!t.autoRemoveChildren,i._sort=L(t.sortChildren),l&&Ue(t.parent||l,r(i),n),t.reversed&&i.reverse(),t.paused&&i.paused(!0),t.scrollTrigger&&He(r(i),t.scrollTrigger),i}i(t,e);var n=t.prototype;return n.to=function(e,t,n){return $e(0,arguments,this),this},n.from=function(e,t,n){return $e(1,arguments,this),this},n.fromTo=function(e,t,n,r){return $e(2,arguments,this),this},n.set=function(e,t,n){return t.duration=0,t.parent=this,Ee(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new Yt(e,t,Ke(this,n),1),this},n.call=function(e,t,n){return Ue(this,Yt.delayedCall(0,e,t),n)},n.staggerTo=function(e,t,n,r,i,a,o){return n.duration=t,n.stagger=n.stagger||r,n.onComplete=a,n.onCompleteParams=o,n.parent=this,new Yt(e,n,Ke(this,i)),this},n.staggerFrom=function(e,t,n,r,i,a,o){return n.runBackwards=1,Ee(n).immediateRender=L(n.immediateRender),this.staggerTo(e,t,n,r,i,a,o)},n.staggerFromTo=function(e,t,n,r,i,a,o,s){return r.startAt=n,Ee(r).immediateRender=L(r.immediateRender),this.staggerTo(e,t,r,i,a,o,s)},n.render=function(e,t,n){var r,i,a,s,c,u,d,h,f,p,m,g,v=this._time,y=this._dirty?this.totalDuration():this._tDur,b=this._dur,_=e<=0?0:me(e),x=this._zTime<0!=e<0&&(this._initted||!b);if(this!==l&&_>y&&e>=0&&(_=y),_!==this._tTime||n||x){if(v!==this._time&&b&&(_+=this._time-v,e+=this._time-v),r=_,f=this._start,u=!(h=this._ts),x&&(b||(v=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(m=this._yoyo,c=b+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(100*c+e,t,n);if(r=me(_%c),_===y?(s=this._repeat,r=b):((s=~~(_/c))&&s===_/c&&(r=b,s--),r>b&&(r=b)),p=De(this._tTime,c),!v&&this._tTime&&p!==s&&(p=s),m&&1&s&&(r=b-r,g=1),s!==p&&!this._lock){var M=m&&1&p,S=M===(m&&1&s);if(s<p&&(M=!M),v=M?0:b,this._lock=1,this.render(v||(g?0:me(s*c)),t,!b)._lock=0,this._tTime=_,!t&&this.parent&&ht(this,"onRepeat"),this.vars.repeatRefresh&&!g&&(this.invalidate()._lock=1),v&&v!==this._time||u!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(b=this._dur,y=this._tDur,S&&(this._lock=2,v=M?b:-1e-4,this.render(v,!0),this.vars.repeatRefresh&&!g&&this.invalidate()),this._lock=0,!this._ts&&!u)return this;Pt(this,g)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(d=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if("isPause"===r.data&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if("isPause"===r.data&&r._start<t)return r;r=r._prev}}(this,me(v),me(r)),d&&(_-=r-(r=d._start))),this._tTime=_,this._time=r,this._act=!h,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,v=0),!v&&r&&!t&&(ht(this,"onStart"),this._tTime!==_))return this;if(r>=v&&e>=0)for(i=this._first;i;){if(a=i._next,(i._act||r>=i._start)&&i._ts&&d!==i){if(i.parent!==this)return this.render(e,t,n);if(i.render(i._ts>0?(r-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(r-i._start)*i._ts,t,n),r!==this._time||!this._ts&&!u){d=0,a&&(_+=this._zTime=-1e-8);break}}i=a}else{i=this._last;for(var A=e<0?e:r;i;){if(a=i._prev,(i._act||A<=i._end)&&i._ts&&d!==i){if(i.parent!==this)return this.render(e,t,n);if(i.render(i._ts>0?(A-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(A-i._start)*i._ts,t,n||o&&(i._initted||i._startAt)),r!==this._time||!this._ts&&!u){d=0,a&&(_+=this._zTime=A?-1e-8:w);break}}i=a}}if(d&&!t&&(this.pause(),d.render(r>=v?0:-1e-8)._zTime=r>=v?1:-1,this._ts))return this._start=f,Fe(this),this.render(e,t,n);this._onUpdate&&!t&&ht(this,"onUpdate",!0),(_===y&&this._tTime>=this.totalDuration()||!_&&v)&&(f!==this._start&&Math.abs(h)===Math.abs(this._ts)||this._lock||((e||!b)&&(_===y&&this._ts>0||!_&&this._ts<0)&&Re(this,1),t||e<0&&!v||!_&&!v&&y||(ht(this,_===y&&e>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(_<y&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(e,t){var n=this;if(P(t)||(t=Ke(this,t,e)),!(e instanceof Nt)){if(N(e))return e.forEach((function(e){return n.add(e,t)})),this;if(R(e))return this.addLabel(e,t);if(!B(e))return this;e=Yt.delayedCall(0,e)}return this!==e?Ue(this,e,t):this},n.getChildren=function(e,t,n,r){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=-x);for(var i=[],a=this._first;a;)a._start>=r&&(a instanceof Yt?t&&i.push(a):(n&&i.push(a),e&&i.push.apply(i,a.getChildren(!0,t,n)))),a=a._next;return i},n.getById=function(e){for(var t=this.getChildren(1,1,1),n=t.length;n--;)if(t[n].vars.id===e)return t[n]},n.remove=function(e){return R(e)?this.removeLabel(e):B(e)?this.killTweensOf(e):(Te(this,e),e===this._recent&&(this._recent=this._last),Be(this))},n.totalTime=function(t,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=me(St.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,n),this._forcing=0,this):this._tTime},n.addLabel=function(e,t){return this.labels[e]=Ke(this,t),this},n.removeLabel=function(e){return delete this.labels[e],this},n.addPause=function(e,t,n){var r=Yt.delayedCall(0,t||Q,n);return r.data="isPause",this._hasPause=1,Ue(this,r,Ke(this,e))},n.removePause=function(e){var t=this._first;for(e=Ke(this,e);t;)t._start===e&&"isPause"===t.data&&Re(t),t=t._next},n.killTweensOf=function(e,t,n){for(var r=this.getTweensOf(e,n),i=r.length;i--;)Ut!==r[i]&&r[i].kill(e,t);return this},n.getTweensOf=function(e,t){for(var n,r=[],i=tt(e),a=this._first,o=P(t);a;)a instanceof Yt?ve(a._targets,i)&&(o?(!Ut||a._initted&&a._ts)&&a.globalTime(0)<=t&&a.globalTime(a.totalDuration())>t:!t||a.isActive())&&r.push(a):(n=a.getTweensOf(i,t)).length&&r.push.apply(r,n),a=a._next;return r},n.tweenTo=function(e,t){t=t||{};var n,r=this,i=Ke(r,e),a=t,o=a.startAt,s=a.onStart,l=a.onStartParams,c=a.immediateRender,u=Yt.to(r,we({ease:t.ease||"none",lazy:!1,immediateRender:!1,time:i,overwrite:"auto",duration:t.duration||Math.abs((i-(o&&"time"in o?o.time:r._time))/r.timeScale())||w,onStart:function(){if(r.pause(),!n){var e=t.duration||Math.abs((i-(o&&"time"in o?o.time:r._time))/r.timeScale());u._dur!==e&&We(u,e,0,1).render(u._time,!0,!0),n=1}s&&s.apply(u,l||[])}},t));return c?u.render(0):u},n.tweenFromTo=function(e,t,n){return this.tweenTo(t,we({startAt:{time:Ke(this,e)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(e){return void 0===e&&(e=this._time),dt(this,Ke(this,e))},n.previousLabel=function(e){return void 0===e&&(e=this._time),dt(this,Ke(this,e),1)},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+w)},n.shiftChildren=function(e,t,n){void 0===n&&(n=0);for(var r,i=this._first,a=this.labels;i;)i._start>=n&&(i._start+=e,i._end+=e),i=i._next;if(t)for(r in a)a[r]>=n&&(a[r]+=e);return Be(this)},n.invalidate=function(t){var n=this._first;for(this._lock=0;n;)n.invalidate(t),n=n._next;return e.prototype.invalidate.call(this,t)},n.clear=function(e){void 0===e&&(e=!0);for(var t,n=this._first;n;)t=n._next,this.remove(n),n=t;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),Be(this)},n.totalDuration=function(e){var t,n,r,i=0,a=this,o=a._last,s=x;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-e:e));if(a._dirty){for(r=a.parent;o;)t=o._prev,o._dirty&&o.totalDuration(),(n=o._start)>s&&a._sort&&o._ts&&!a._lock?(a._lock=1,Ue(a,o,n-o._delay,1)._lock=0):s=n,n<0&&o._ts&&(i-=n,(!r&&!a._dp||r&&r.smoothChildTiming)&&(a._start+=n/a._ts,a._time-=n,a._tTime-=n),a.shiftChildren(-n,!1,-Infinity),s=0),o._end>i&&o._ts&&(i=o._end),o=t;We(a,a===l&&a._time>i?a._time:i,1,1),a._dirty=0}return a._tDur},t.updateRoot=function(e){if(l._ts&&(be(l,Oe(e,l)),f=St.frame),St.frame>=se){se+=b.autoSleep||120;var t=l._first;if((!t||!t._ts)&&b.autoSleep&&St._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||St.sleep()}}},t}(Nt);we(zt.prototype,{_lock:0,_hasPause:0,_forcing:0});var Ut,Ht,Gt=function(e,t,n,r,i,a,o){var s,l,c,u,d,h,f,p,m=new dn(this._pt,e,t,0,1,an,null,i),g=0,v=0;for(m.b=n,m.e=r,n+="",(f=~(r+="").indexOf("random("))&&(r=ct(r)),a&&(a(p=[n,r],e,t),n=p[0],r=p[1]),l=n.match(G)||[];s=G.exec(r);)u=s[0],d=r.substring(g,s.index),c?c=(c+1)%5:"rgba("===d.substr(-5)&&(c=1),u!==l[v++]&&(h=parseFloat(l[v-1])||0,m._pt={_next:m._pt,p:d||1===v?d:",",s:h,c:"="===u.charAt(1)?ge(h,u)-h:parseFloat(u)-h,m:c&&c<4?Math.round:0},g=G.lastIndex);return m.c=g<r.length?r.substring(g,r.length):"",m.fp=o,(V.test(r)||f)&&(m.e=0),this._pt=m,m},Vt=function(e,t,n,r,i,a,o,s,l,c){B(r)&&(r=r(i||0,e,a));var u,d=e[t],h="get"!==n?n:B(d)?l?e[t.indexOf("set")||!B(e["get"+t.substr(3)])?t:"get"+t.substr(3)](l):e[t]():d,f=B(d)?l?Zt:Qt:qt;if(R(r)&&(~r.indexOf("random(")&&(r=ct(r)),"="===r.charAt(1)&&((u=ge(h,r)+(Qe(h)||0))||0===u)&&(r=u)),!c||h!==r||Ht)return isNaN(h*r)||""===r?(!d&&!(t in e)&&$(t,r),Gt.call(this,e,t,h,r,f,s||b.stringFilter,l)):(u=new dn(this._pt,e,t,+h||0,r-(h||0),"boolean"==typeof d?rn:nn,0,f),l&&(u.fp=l),o&&u.modifier(o,this,e),this._pt=u)},jt=function(e,t,n,r,i,a){var o,s,l,c;if(ae[e]&&!1!==(o=new ae[e]).init(i,o.rawVars?t[e]:function(e,t,n,r,i){if(B(e)&&(e=Xt(e,i,t,n,r)),!I(e)||e.style&&e.nodeType||N(e)||F(e))return R(e)?Xt(e,i,t,n,r):e;var a,o={};for(a in e)o[a]=Xt(e[a],i,t,n,r);return o}(t[e],r,i,a,n),n,r,a)&&(n._pt=s=new dn(n._pt,i,e,0,1,o.render,o,0,o.priority),n!==p))for(l=n._ptLookup[n._targets.indexOf(i)],c=o._props.length;c--;)l[o._props[c]]=s;return o},Wt=function e(t,n,r){var i,s,c,u,d,h,f,p,m,g,v,y,b,M=t.vars,S=M.ease,A=M.startAt,E=M.immediateRender,C=M.lazy,T=M.onUpdate,R=M.onUpdateParams,B=M.callbackScope,P=M.runBackwards,k=M.yoyoEase,I=M.keyframes,D=M.autoRevert,O=t._dur,F=t._startAt,N=t._targets,z=t.parent,U=z&&"nested"===z.data?z.vars.targets:N,H="auto"===t._overwrite&&!a,G=t.timeline;if(G&&(!I||!S)&&(S="none"),t._ease=kt(S,_.ease),t._yEase=k?Bt(kt(!0===k?S:k,_.ease)):0,k&&t._yoyo&&!t._repeat&&(k=t._yEase,t._yEase=t._ease,t._ease=k),t._from=!G&&!!M.runBackwards,!G||I&&!M.stagger){if(y=(p=N[0]?de(N[0]).harness:0)&&M[p.prop],i=Ae(M,ne),F&&(F._zTime<0&&F.progress(1),n<0&&P&&E&&!D?F.render(-1,!0):F.revert(P&&O?ee:Z),F._lazy=0),A){if(Re(t._startAt=Yt.set(N,we({data:"isStart",overwrite:!1,parent:z,immediateRender:!0,lazy:!F&&L(C),startAt:null,delay:0,onUpdate:T,onUpdateParams:R,callbackScope:B,stagger:0},A))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(o||!E&&!D)&&t._startAt.revert(ee),E&&O&&n<=0&&r<=0)return void(n&&(t._zTime=n))}else if(P&&O&&!F)if(n&&(E=!1),c=we({overwrite:!1,data:"isFromStart",lazy:E&&!F&&L(C),immediateRender:E,stagger:0,parent:z},i),y&&(c[p.prop]=y),Re(t._startAt=Yt.set(N,c)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(o?t._startAt.revert(ee):t._startAt.render(-1,!0)),t._zTime=n,E){if(!n)return}else e(t._startAt,w,w);for(t._pt=t._ptCache=0,C=O&&L(C)||C&&!O,s=0;s<N.length;s++){if(f=(d=N[s])._gsap||ue(N)[s]._gsap,t._ptLookup[s]=g={},ie[f.id]&&re.length&&ye(),v=U===N?s:U.indexOf(d),p&&!1!==(m=new p).init(d,y||i,t,v,U)&&(t._pt=u=new dn(t._pt,d,m.name,0,1,m.render,m,0,m.priority),m._props.forEach((function(e){g[e]=u})),m.priority&&(h=1)),!p||y)for(c in i)ae[c]&&(m=jt(c,i,t,v,d,U))?m.priority&&(h=1):g[c]=u=Vt.call(t,d,c,"get",i[c],v,U,0,M.stringFilter);t._op&&t._op[s]&&t.kill(d,t._op[s]),H&&t._pt&&(Ut=t,l.killTweensOf(d,g,t.globalTime(n)),b=!t.parent,Ut=0),t._pt&&C&&(ie[f.id]=1)}h&&un(t),t._onInit&&t._onInit(t)}t._onUpdate=T,t._initted=(!t._op||t._pt)&&!b,I&&n<=0&&G.render(x,!0,!0)},Jt=function(e,t,n,r){var i,a,o=t.ease||r||"power1.inOut";if(N(t))a=n[e]||(n[e]=[]),t.forEach((function(e,n){return a.push({t:n/(t.length-1)*100,v:e,e:o})}));else for(i in t)a=n[i]||(n[i]=[]),"ease"===i||a.push({t:parseFloat(e),v:t[i],e:o})},Xt=function(e,t,n,r,i){return B(e)?e.call(t,n,r,i):R(e)&&~e.indexOf("random(")?ct(e):e},Kt=ce+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",$t={};fe(Kt+",id,stagger,delay,duration,paused,scrollTrigger",(function(e){return $t[e]=1}));var Yt=function(e){function t(t,n,i,o){var s;"number"==typeof n&&(i.duration=n,n=i,i=null);var c,u,d,h,f,p,m,g,v=(s=e.call(this,o?n:Ee(n))||this).vars,y=v.duration,_=v.delay,x=v.immediateRender,w=v.stagger,M=v.overwrite,S=v.keyframes,A=v.defaults,E=v.scrollTrigger,C=v.yoyoEase,T=n.parent||l,R=(N(t)||F(t)?P(t[0]):"length"in n)?[t]:tt(t);if(s._targets=R.length?ue(R):Y("GSAP target "+t+" not found. https://greensock.com",!b.nullTargetWarn)||[],s._ptLookup=[],s._overwrite=M,S||w||O(y)||O(_)){if(n=s.vars,(c=s.timeline=new zt({data:"nested",defaults:A||{},targets:T&&"nested"===T.data?T.vars.targets:R})).kill(),c.parent=c._dp=r(s),c._start=0,w||O(y)||O(_)){if(h=R.length,m=w&&it(w),I(w))for(f in w)~Kt.indexOf(f)&&(g||(g={}),g[f]=w[f]);for(u=0;u<h;u++)(d=Ae(n,$t)).stagger=0,C&&(d.yoyoEase=C),g&&Me(d,g),p=R[u],d.duration=+Xt(y,r(s),u,p,R),d.delay=(+Xt(_,r(s),u,p,R)||0)-s._delay,!w&&1===h&&d.delay&&(s._delay=_=d.delay,s._start+=_,d.delay=0),c.to(p,d,m?m(u,p,R):0),c._ease=Et.none;c.duration()?y=_=0:s.timeline=0}else if(S){Ee(we(c.vars.defaults,{ease:"none"})),c._ease=kt(S.ease||n.ease||"none");var B,k,D,z=0;if(N(S))S.forEach((function(e){return c.to(R,e,">")})),c.duration();else{for(f in d={},S)"ease"===f||"easeEach"===f||Jt(f,S[f],d,S.easeEach);for(f in d)for(B=d[f].sort((function(e,t){return e.t-t.t})),z=0,u=0;u<B.length;u++)(D={ease:(k=B[u]).e,duration:(k.t-(u?B[u-1].t:0))/100*y})[f]=k.v,c.to(R,D,z),z+=D.duration;c.duration()<y&&c.to({},{duration:y-c.duration()})}}y||s.duration(y=c.duration())}else s.timeline=0;return!0!==M||a||(Ut=r(s),l.killTweensOf(R),Ut=0),Ue(T,r(s),i),n.reversed&&s.reverse(),n.paused&&s.paused(!0),(x||!y&&!S&&s._start===me(T._time)&&L(x)&&Ie(r(s))&&"nested"!==T.data)&&(s._tTime=-1e-8,s.render(Math.max(0,-_)||0)),E&&He(r(s),E),s}i(t,e);var n=t.prototype;return n.render=function(e,t,n){var r,i,a,s,l,c,u,d,h,f=this._time,p=this._tDur,m=this._dur,g=e<0,v=e>p-w&&!g?p:e<w?0:e;if(m){if(v!==this._tTime||!e||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==g){if(r=v,d=this.timeline,this._repeat){if(s=m+this._rDelay,this._repeat<-1&&g)return this.totalTime(100*s+e,t,n);if(r=me(v%s),v===p?(a=this._repeat,r=m):((a=~~(v/s))&&a===v/s&&(r=m,a--),r>m&&(r=m)),(c=this._yoyo&&1&a)&&(h=this._yEase,r=m-r),l=De(this._tTime,s),r===f&&!n&&this._initted)return this._tTime=v,this;a!==l&&(d&&this._yEase&&Pt(d,c),!this.vars.repeatRefresh||c||this._lock||(this._lock=n=1,this.render(me(s*a),!0).invalidate()._lock=0))}if(!this._initted){if(Ge(this,g?e:r,n,t,v))return this._tTime=0,this;if(f!==this._time)return this;if(m!==this._dur)return this.render(e,t,n)}if(this._tTime=v,this._time=r,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=u=(h||this._ease)(r/m),this._from&&(this.ratio=u=1-u),r&&!f&&!t&&(ht(this,"onStart"),this._tTime!==v))return this;for(i=this._pt;i;)i.r(u,i.d),i=i._next;d&&d.render(e<0?e:!r&&c?-1e-8:d._dur*d._ease(r/this._dur),t,n)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(g&&ke(this,e,0,n),ht(this,"onUpdate")),this._repeat&&a!==l&&this.vars.onRepeat&&!t&&this.parent&&ht(this,"onRepeat"),v!==this._tDur&&v||this._tTime!==v||(g&&!this._onUpdate&&ke(this,e,0,!0),(e||!m)&&(v===this._tDur&&this._ts>0||!v&&this._ts<0)&&Re(this,1),t||g&&!f||!(v||f||c)||(ht(this,v===p?"onComplete":"onReverseComplete",!0),this._prom&&!(v<p&&this.timeScale()>0)&&this._prom()))}}else!function(e,t,n,r){var i,a,s,l=e.ratio,c=t<0||!t&&(!e._start&&Ve(e)&&(e._initted||!je(e))||(e._ts<0||e._dp._ts<0)&&!je(e))?0:1,u=e._rDelay,d=0;if(u&&e._repeat&&(d=qe(0,e._tDur,t),a=De(d,u),e._yoyo&&1&a&&(c=1-c),a!==De(e._tTime,u)&&(l=1-c,e.vars.repeatRefresh&&e._initted&&e.invalidate())),c!==l||o||r||e._zTime===w||!t&&e._zTime){if(!e._initted&&Ge(e,t,r,n,d))return;for(s=e._zTime,e._zTime=t||(n?w:0),n||(n=t&&!s),e.ratio=c,e._from&&(c=1-c),e._time=0,e._tTime=d,i=e._pt;i;)i.r(c,i.d),i=i._next;t<0&&ke(e,t,0,!0),e._onUpdate&&!n&&ht(e,"onUpdate"),d&&e._repeat&&!n&&e.parent&&ht(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===c&&(c&&Re(e,1),n||o||(ht(e,c?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)}(this,e,t,n);return this},n.targets=function(){return this._targets},n.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},n.resetTo=function(e,t,n,r){m||St.wake(),this._ts||this.play();var i=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Wt(this,i),function(e,t,n,r,i,a,o){var s,l,c,u,d=(e._pt&&e._ptCache||(e._ptCache={}))[t];if(!d)for(d=e._ptCache[t]=[],c=e._ptLookup,u=e._targets.length;u--;){if((s=c[u][t])&&s.d&&s.d._pt)for(s=s.d._pt;s&&s.p!==t&&s.fp!==t;)s=s._next;if(!s)return Ht=1,e.vars[t]="+=0",Wt(e,o),Ht=0,1;d.push(s)}for(u=d.length;u--;)(s=(l=d[u])._pt||l).s=!r&&0!==r||i?s.s+(r||0)+a*s.c:r,s.c=n-s.s,l.e&&(l.e=pe(n)+Qe(l.e)),l.b&&(l.b=s.s+Qe(l.b))}(this,e,t,n,r,this._ease(i/this._dur),i)?this.resetTo(e,t,n,r):(Ne(this,0),this.parent||Ce(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(e,t){if(void 0===t&&(t="all"),!(e||t&&"all"!==t))return this._lazy=this._pt=0,this.parent?ft(this):this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,Ut&&!0!==Ut.vars.overwrite)._first||ft(this),this.parent&&n!==this.timeline.totalDuration()&&We(this,this._dur*this.timeline._tDur/n,0,1),this}var r,i,a,o,s,l,c,u=this._targets,d=e?tt(e):u,h=this._ptLookup,f=this._pt;if((!t||"all"===t)&&function(e,t){for(var n=e.length,r=n===t.length;r&&n--&&e[n]===t[n];);return n<0}(u,d))return"all"===t&&(this._pt=0),ft(this);for(r=this._op=this._op||[],"all"!==t&&(R(t)&&(s={},fe(t,(function(e){return s[e]=1})),t=s),t=function(e,t){var n,r,i,a,o=e[0]?de(e[0]).harness:0,s=o&&o.aliases;if(!s)return t;for(r in n=Me({},t),s)if(r in n)for(i=(a=s[r].split(",")).length;i--;)n[a[i]]=n[r];return n}(u,t)),c=u.length;c--;)if(~d.indexOf(u[c]))for(s in i=h[c],"all"===t?(r[c]=t,o=i,a={}):(a=r[c]=r[c]||{},o=t),o)(l=i&&i[s])&&("kill"in l.d&&!0!==l.d.kill(s)||Te(this,l,"_pt"),delete i[s]),"all"!==a&&(a[s]=1);return this._initted&&!this._pt&&f&&ft(this),this},t.to=function(e,n){return new t(e,n,arguments[2])},t.from=function(e,t){return $e(1,arguments)},t.delayedCall=function(e,n,r,i){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},t.fromTo=function(e,t,n){return $e(2,arguments)},t.set=function(e,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(e,n)},t.killTweensOf=function(e,t,n){return l.killTweensOf(e,t,n)},t}(Nt);we(Yt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),fe("staggerTo,staggerFrom,staggerFromTo",(function(e){Yt[e]=function(){var t=new zt,n=Ze.call(arguments,0);return n.splice("staggerFromTo"===e?5:4,0,0),t[e].apply(t,n)}}));var qt=function(e,t,n){return e[t]=n},Qt=function(e,t,n){return e[t](n)},Zt=function(e,t,n,r){return e[t](r.fp,n)},en=function(e,t,n){return e.setAttribute(t,n)},tn=function(e,t){return B(e[t])?Qt:k(e[t])&&e.setAttribute?en:qt},nn=function(e,t){return t.set(t.t,t.p,Math.round(1e6*(t.s+t.c*e))/1e6,t)},rn=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},an=function(e,t){var n=t._pt,r="";if(!e&&t.b)r=t.b;else if(1===e&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round(1e4*(n.s+n.c*e))/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},on=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},sn=function(e,t,n,r){for(var i,a=this._pt;a;)i=a._next,a.p===r&&a.modifier(e,t,n),a=i},ln=function(e){for(var t,n,r=this._pt;r;)n=r._next,r.p===e&&!r.op||r.op===e?Te(this,r,"_pt"):r.dep||(t=1),r=n;return!t},cn=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},un=function(e){for(var t,n,r,i,a=e._pt;a;){for(t=a._next,n=r;n&&n.pr>a.pr;)n=n._next;(a._prev=n?n._prev:i)?a._prev._next=a:r=a,(a._next=n)?n._prev=a:i=a,a=t}e._pt=r},dn=function(){function e(e,t,n,r,i,a,o,s,l){this.t=t,this.s=r,this.c=i,this.p=n,this.r=a||nn,this.d=o||this,this.set=s||qt,this.pr=l||0,this._next=e,e&&(e._prev=this)}return e.prototype.modifier=function(e,t,n){this.mSet=this.mSet||this.set,this.set=cn,this.m=e,this.mt=n,this.tween=t},e}();fe(ce+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(e){return ne[e]=1})),J.TweenMax=J.TweenLite=Yt,J.TimelineLite=J.TimelineMax=zt,l=new zt({sortChildren:!1,defaults:_,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),b.stringFilter=Mt;var hn=[],fn={},pn=[],mn=0,gn=function(e){return(fn[e]||pn).map((function(e){return e()}))},vn=function(){var e=Date.now(),t=[];e-mn>2&&(gn("matchMediaInit"),hn.forEach((function(e){var n,r,i,a,o=e.queries,s=e.conditions;for(r in o)(n=c.matchMedia(o[r]).matches)&&(i=1),n!==s[r]&&(s[r]=n,a=1);a&&(e.revert(),i&&t.push(e))})),gn("matchMediaRevert"),t.forEach((function(e){return e.onMatch(e)})),mn=e,gn("matchMedia"))},yn=function(){function e(e,t){this.selector=t&&nt(t),this.data=[],this._r=[],this.isReverted=!1,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,n){B(e)&&(n=t,t=e,e=B);var r=this,i=function(){var e,i=s,a=r.selector;return i&&i!==r&&i.data.push(r),n&&(r.selector=nt(n)),s=r,e=t.apply(r,arguments),B(e)&&r._r.push(e),s=i,r.selector=a,r.isReverted=!1,e};return r.last=i,e===B?i(r):e?r[e]=i:i},t.ignore=function(e){var t=s;s=null,e(this),s=t},t.getTweens=function(){var t=[];return this.data.forEach((function(n){return n instanceof e?t.push.apply(t,n.getTweens()):n instanceof Yt&&!(n.parent&&"nested"===n.parent.data)&&t.push(n)})),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var n=this;if(e){var r=this.getTweens();this.data.forEach((function(e){"isFlip"===e.data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(e){return r.splice(r.indexOf(e),1)})))})),r.map((function(e){return{g:e.globalTime(0),t:e}})).sort((function(e,t){return t.g-e.g||-1})).forEach((function(t){return t.t.revert(e)})),this.data.forEach((function(t){return!(t instanceof Nt)&&t.revert&&t.revert(e)})),this._r.forEach((function(t){return t(e,n)})),this.isReverted=!0}else this.data.forEach((function(e){return e.kill&&e.kill()}));if(this.clear(),t){var i=hn.indexOf(this);~i&&hn.splice(i,1)}},t.revert=function(e){this.kill(e||{})},e}(),bn=function(){function e(e){this.contexts=[],this.scope=e}var t=e.prototype;return t.add=function(e,t,n){I(e)||(e={matches:e});var r,i,a,o=new yn(0,n||this.scope),s=o.conditions={};for(i in this.contexts.push(o),t=o.add("onMatch",t),o.queries=e,e)"all"===i?a=1:(r=c.matchMedia(e[i]))&&(hn.indexOf(o)<0&&hn.push(o),(s[i]=r.matches)&&(a=1),r.addListener?r.addListener(vn):r.addEventListener("change",vn));return a&&t(o),this},t.revert=function(e){this.kill(e||{})},t.kill=function(e){this.contexts.forEach((function(t){return t.kill(e,!0)}))},e}(),_n={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach((function(e){return pt(e)}))},timeline:function(e){return new zt(e)},getTweensOf:function(e,t){return l.getTweensOf(e,t)},getProperty:function(e,t,n,r){R(e)&&(e=tt(e)[0]);var i=de(e||{}).get,a=n?xe:_e;return"native"===n&&(n=""),e?t?a((ae[t]&&ae[t].get||i)(e,t,n,r)):function(t,n,r){return a((ae[t]&&ae[t].get||i)(e,t,n,r))}:e},quickSetter:function(e,t,n){if((e=tt(e)).length>1){var r=e.map((function(e){return Mn.quickSetter(e,t,n)})),i=r.length;return function(e){for(var t=i;t--;)r[t](e)}}e=e[0]||{};var a=ae[t],o=de(e),s=o.harness&&(o.harness.aliases||{})[t]||t,l=a?function(t){var r=new a;p._pt=0,r.init(e,n?t+n:t,p,0,[e]),r.render(1,r),p._pt&&on(1,p)}:o.set(e,s);return a?l:function(t){return l(e,s,n?t+n:t,o,1)}},quickTo:function(e,t,n){var r,i=Mn.to(e,Me(((r={})[t]="+=0.1",r.paused=!0,r),n||{})),a=function(e,n,r){return i.resetTo(t,e,n,r)};return a.tween=i,a},isTweening:function(e){return l.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=kt(e.ease,_.ease)),Se(_,e||{})},config:function(e){return Se(b,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,i=e.defaults,a=e.extendTimeline;(r||"").split(",").forEach((function(e){return e&&!ae[e]&&!J[e]&&Y(t+" effect requires "+e+" plugin.")})),oe[t]=function(e,t,r){return n(tt(e),we(t||{},i),r)},a&&(zt.prototype[t]=function(e,n,r){return this.add(oe[t](e,I(n)?n:(r=n)&&{},this),r)})},registerEase:function(e,t){Et[e]=kt(t)},parseEase:function(e,t){return arguments.length?kt(e,t):Et},getById:function(e){return l.getById(e)},exportRoot:function(e,t){void 0===e&&(e={});var n,r,i=new zt(e);for(i.smoothChildTiming=L(e.smoothChildTiming),l.remove(i),i._dp=0,i._time=i._tTime=l._time,n=l._first;n;)r=n._next,!t&&!n._dur&&n instanceof Yt&&n.vars.onComplete===n._targets[0]||Ue(i,n,n._start-n._delay),n=r;return Ue(l,i,0),i},context:function(e,t){return e?new yn(e,t):s},matchMedia:function(e){return new bn(e)},matchMediaRefresh:function(){return hn.forEach((function(e){var t,n,r=e.conditions;for(n in r)r[n]&&(r[n]=!1,t=1);t&&e.revert()}))||vn()},addEventListener:function(e,t){var n=fn[e]||(fn[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=fn[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:function e(t,n,r){var i=n-t;return N(t)?lt(t,e(0,t.length),n):Ye(r,(function(e){return(i+(e-t)%i)%i+t}))},wrapYoyo:function e(t,n,r){var i=n-t,a=2*i;return N(t)?lt(t,e(0,t.length-1),n):Ye(r,(function(e){return t+((e=(a+(e-t)%a)%a||0)>i?a-e:e)}))},distribute:it,random:st,snap:ot,normalize:function(e,t,n){return ut(e,t,0,1,n)},getUnit:Qe,clamp:function(e,t,n){return Ye(n,(function(n){return qe(e,t,n)}))},splitColor:yt,toArray:tt,selector:nt,mapRange:ut,pipe:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(e,t){return t(e)}),e)}},unitize:function(e,t){return function(n){return e(parseFloat(n))+(t||Qe(n))}},interpolate:function e(t,n,r,i){var a=isNaN(t+n)?0:function(e){return(1-e)*t+e*n};if(!a){var o,s,l,c,u,d=R(t),h={};if(!0===r&&(i=1)&&(r=null),d)t={p:t},n={p:n};else if(N(t)&&!N(n)){for(l=[],c=t.length,u=c-2,s=1;s<c;s++)l.push(e(t[s-1],t[s]));c--,a=function(e){e*=c;var t=Math.min(u,~~e);return l[t](e-t)},r=n}else i||(t=Me(N(t)?[]:{},t));if(!l){for(o in n)Vt.call(h,t,o,"get",n[o]);a=function(e){return on(e,h)||(d?t.p:t)}}}return Ye(r,a)},shuffle:rt},install:K,effects:oe,ticker:St,updateRoot:zt.updateRoot,plugins:ae,globalTimeline:l,core:{PropTween:dn,globals:q,Tween:Yt,Timeline:zt,Animation:Nt,getCache:de,_removeLinkedListItem:Te,reverting:function(){return o},context:function(e){return e&&s&&(s.data.push(e),e._ctx=s),s},suppressOverwrites:function(e){return a=e}}};fe("to,from,fromTo,delayedCall,set,killTweensOf",(function(e){return _n[e]=Yt[e]})),St.add(zt.updateRoot),p=_n.to({},{duration:0});var xn=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},wn=function(e,t){return{name:e,rawVars:1,init:function(e,n,r){r._onInit=function(e){var r,i;if(R(n)&&(r={},fe(n,(function(e){return r[e]=1})),n=r),t){for(i in r={},n)r[i]=t(n[i]);n=r}!function(e,t){var n,r,i,a=e._targets;for(n in t)for(r=a.length;r--;)(i=e._ptLookup[r][n])&&(i=i.d)&&(i._pt&&(i=xn(i,n)),i&&i.modifier&&i.modifier(t[n],e,a[r],n))}(e,n)}}}},Mn=_n.registerPlugin({name:"attr",init:function(e,t,n,r,i){var a,o,s;for(a in this.tween=n,t)s=e.getAttribute(a)||"",(o=this.add(e,"setAttribute",(s||0)+"",t[a],r,i,0,0,a)).op=a,o.b=s,this._props.push(a)},render:function(e,t){for(var n=t._pt;n;)o?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:"endArray",init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},wn("roundProps",at),wn("modifiers"),wn("snap",ot))||_n;Yt.version=zt.version=Mn.version="3.11.4",h=1,D()&&At(),Et.Power0,Et.Power1,Et.Power2,Et.Power3,Et.Power4,Et.Linear,Et.Quad,Et.Cubic,Et.Quart,Et.Quint,Et.Strong,Et.Elastic,Et.Back,Et.SteppedEase,Et.Bounce,Et.Sine,Et.Expo,Et.Circ},2642:(e,t,n)=>{"use strict";n.d(t,{p8:()=>a});var r=n(5317),i=n(9975),a=r.p8.registerPlugin(i._Z)||r.p8;a.core.Tween},1833:e=>{"use strict";e.exports=function(e){return null!=e&&("object"==typeof e||"function"==typeof e)}},5299:(e,t,n)=>{"use strict";var r=n(7798);function i(e){return!0===r(e)&&"[object Object]"===Object.prototype.toString.call(e)}e.exports=function(e){var t,n;return!1!==i(e)&&"function"==typeof(t=e.constructor)&&!1!==i(n=t.prototype)&&!1!==n.hasOwnProperty("isPrototypeOf")}},7798:e=>{"use strict";e.exports=function(e){return null!=e&&"object"==typeof e&&!1===Array.isArray(e)}},4529:(e,t,n)=>{"use strict";var r=n(4705),i=n(9386),a=n(3200),o=n(1086);e.exports=function(e,t,n){if(!r(e))throw new TypeError("expected an object");if("string"!=typeof t||null==n)return i.apply(null,arguments);if("string"==typeof n)return o(e,t,n),e;var s=a(e,t);return r(n)&&r(s)&&(n=i({},s,n)),o(e,t,n),e}},4705:(e,t,n)=>{"use strict";var r=n(5299);e.exports=function(e){return r(e)||"function"==typeof e||Array.isArray(e)}},9386:(e,t,n)=>{"use strict";var r=n(1953),i=n(2561);function a(e,t){for(var n=arguments.length,r=0;++r<n;){var a=arguments[r];s(a)&&i(a,o,e)}return e}function o(e,t){if(function(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e}(t)){var n=this[t];s(e)&&s(n)?a(n,e):this[t]=e}}function s(e){return r(e)&&!Array.isArray(e)}e.exports=a},1953:(e,t,n)=>{"use strict";var r=n(5299);e.exports=function(e){return r(e)||"function"==typeof e||Array.isArray(e)}},2703:(e,t,n)=>{"use strict";var r=n(414);function i(){}function a(){}a.resetWarningCache=i,e.exports=function(){function e(e,t,n,i,a,o){if(o!==r){var s=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function t(){return e}e.isRequired=e;var n={array:e,bigint:e,bool:e,func:e,number:e,object:e,string:e,symbol:e,any:e,arrayOf:t,element:e,elementType:e,instanceOf:t,node:e,objectOf:t,oneOf:t,oneOfType:t,shape:t,exact:t,checkPropTypes:a,resetWarningCache:i};return n.PropTypes=n,n}},5697:(e,t,n)=>{e.exports=n(2703)()},414:e=>{"use strict";e.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},4448:(e,t,n)=>{"use strict";var r=n(7294),i=n(3840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=new Set,s={};function l(e,t){c(e,t),c(e+"Capture",t)}function c(e,t){for(s[e]=t,e=0;e<t.length;e++)o.add(t[e])}var u=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),d=Object.prototype.hasOwnProperty,h=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e,t,n,r,i,a,o){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=o}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function b(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!d.call(p,e)||!d.call(f,e)&&(h.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var _=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,x=Symbol.for("react.element"),w=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),E=Symbol.for("react.provider"),C=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),B=Symbol.for("react.suspense_list"),P=Symbol.for("react.memo"),k=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var I=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var L=Symbol.iterator;function D(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=L&&e[L]||e["@@iterator"])?e:null}var O,F=Object.assign;function N(e){if(void 0===O)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);O=t&&t[1]||""}return"\n"+O+e}var z=!1;function U(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var l="\n"+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=o&&0<=s);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?N(e):""}function H(e){switch(e.tag){case 5:return N(e.type);case 16:return N("Lazy");case 13:return N("Suspense");case 19:return N("SuspenseList");case 0:case 2:case 15:return U(e.type,!1);case 11:return U(e.type.render,!1);case 1:return U(e.type,!0);default:return""}}function G(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case M:return"Fragment";case w:return"Portal";case A:return"Profiler";case S:return"StrictMode";case R:return"Suspense";case B:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case C:return(e.displayName||"Context")+".Consumer";case E:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case P:return null!==(t=e.displayName||null)?t:G(e.type)||"Memo";case k:t=e._payload,e=e._init;try{return G(e(t))}catch(e){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return G(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function j(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function W(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function J(e){e._valueTracker||(e._valueTracker=function(e){var t=W(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=W(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function K(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function $(e,t){var n=t.checked;return F({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function Y(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=j(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function q(e,t){null!=(t=t.checked)&&b(e,"checked",t,!1)}function Q(e,t){q(e,t);var n=j(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,j(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function Z(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&K(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+j(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return F({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:j(n)}}function ae(e,t){var n=j(t.value),r=j(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function oe(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function se(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?se(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ce,ue,de=(ue=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ce=ce||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ce.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ue(e,t)}))}:ue);function he(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ve=F({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function be(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var _e=null;function xe(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,Me=null,Se=null;function Ae(e){if(e=gi(e)){if("function"!=typeof we)throw Error(a(280));var t=e.stateNode;t&&(t=yi(t),we(e.stateNode,e.type,t))}}function Ee(e){Me?Se?Se.push(e):Se=[e]:Me=e}function Ce(){if(Me){var e=Me,t=Se;if(Se=Me=null,Ae(e),t)for(e=0;e<t.length;e++)Ae(t[e])}}function Te(e,t){return e(t)}function Re(){}var Be=!1;function Pe(e,t,n){if(Be)return e(t,n);Be=!0;try{return Te(e,t,n)}finally{Be=!1,(null!==Me||null!==Se)&&(Re(),Ce())}}function ke(e,t){var n=e.stateNode;if(null===n)return null;var r=yi(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var Ie=!1;if(u)try{var Le={};Object.defineProperty(Le,"passive",{get:function(){Ie=!0}}),window.addEventListener("test",Le,Le),window.removeEventListener("test",Le,Le)}catch(ue){Ie=!1}function De(e,t,n,r,i,a,o,s,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Oe=!1,Fe=null,Ne=!1,ze=null,Ue={onError:function(e){Oe=!0,Fe=e}};function He(e,t,n,r,i,a,o,s,l){Oe=!1,Fe=null,De.apply(Ue,arguments)}function Ge(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function je(e){if(Ge(e)!==e)throw Error(a(188))}function We(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=Ge(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var o=i.alternate;if(null===o){if(null!==(r=i.return)){n=r;continue}break}if(i.child===o.child){for(o=i.child;o;){if(o===n)return je(i),e;if(o===r)return je(i),t;o=o.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=o;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=o;break}if(l===r){s=!0,r=i,n=o;break}l=l.sibling}if(!s){for(l=o.child;l;){if(l===n){s=!0,n=o,r=i;break}if(l===r){s=!0,r=o,n=i;break}l=l.sibling}if(!s)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?Je(e):null}function Je(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Je(e);if(null!==t)return t;e=e.sibling}return null}var Xe=i.unstable_scheduleCallback,Ke=i.unstable_cancelCallback,$e=i.unstable_shouldYield,Ye=i.unstable_requestPaint,qe=i.unstable_now,Qe=i.unstable_getCurrentPriorityLevel,Ze=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,at=null,ot=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(st(e)/lt|0)|0},st=Math.log,lt=Math.LN2,ct=64,ut=4194304;function dt(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function ht(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=dt(s):0!=(a&=o)&&(r=dt(a))}else 0!=(o=n&~i)?r=dt(o):0!==a&&(r=dt(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!=(4194240&a)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-ot(t)),r|=e[n],t&=~i;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ct;return 0==(4194240&(ct<<=1))&&(ct=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-ot(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-ot(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var bt=0;function _t(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var xt,wt,Mt,St,At,Et=!1,Ct=[],Tt=null,Rt=null,Bt=null,Pt=new Map,kt=new Map,It=[],Lt="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function Dt(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Rt=null;break;case"mouseover":case"mouseout":Bt=null;break;case"pointerover":case"pointerout":Pt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":kt.delete(t.pointerId)}}function Ot(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&null!==(t=gi(t))&&wt(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Ft(e){var t=mi(e.target);if(null!==t){var n=Ge(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void At(e.priority,(function(){Mt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=$t(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=gi(n))&&wt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);_e=r,n.target.dispatchEvent(r),_e=null,t.shift()}return!0}function zt(e,t,n){Nt(e)&&n.delete(t)}function Ut(){Et=!1,null!==Tt&&Nt(Tt)&&(Tt=null),null!==Rt&&Nt(Rt)&&(Rt=null),null!==Bt&&Nt(Bt)&&(Bt=null),Pt.forEach(zt),kt.forEach(zt)}function Ht(e,t){e.blockedOn===t&&(e.blockedOn=null,Et||(Et=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ut)))}function Gt(e){function t(t){return Ht(t,e)}if(0<Ct.length){Ht(Ct[0],e);for(var n=1;n<Ct.length;n++){var r=Ct[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tt&&Ht(Tt,e),null!==Rt&&Ht(Rt,e),null!==Bt&&Ht(Bt,e),Pt.forEach(t),kt.forEach(t),n=0;n<It.length;n++)(r=It[n]).blockedOn===e&&(r.blockedOn=null);for(;0<It.length&&null===(n=It[0]).blockedOn;)Ft(n),null===n.blockedOn&&It.shift()}var Vt=_.ReactCurrentBatchConfig,jt=!0;function Wt(e,t,n,r){var i=bt,a=Vt.transition;Vt.transition=null;try{bt=1,Xt(e,t,n,r)}finally{bt=i,Vt.transition=a}}function Jt(e,t,n,r){var i=bt,a=Vt.transition;Vt.transition=null;try{bt=4,Xt(e,t,n,r)}finally{bt=i,Vt.transition=a}}function Xt(e,t,n,r){if(jt){var i=$t(e,t,n,r);if(null===i)Hr(e,t,r,Kt,n),Dt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Tt=Ot(Tt,e,t,n,r,i),!0;case"dragenter":return Rt=Ot(Rt,e,t,n,r,i),!0;case"mouseover":return Bt=Ot(Bt,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Pt.set(a,Ot(Pt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,kt.set(a,Ot(kt.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Dt(e,r),4&t&&-1<Lt.indexOf(e)){for(;null!==i;){var a=gi(i);if(null!==a&&xt(a),null===(a=$t(e,t,n,r))&&Hr(e,t,r,Kt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Hr(e,t,r,null,n)}}var Kt=null;function $t(e,t,n,r){if(Kt=null,null!==(e=mi(e=xe(r))))if(null===(t=Ge(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Kt=e,null}function Yt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Qe()){case Ze:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var qt=null,Qt=null,Zt=null;function en(){if(Zt)return Zt;var e,t,n=Qt,r=n.length,i="value"in qt?qt.value:qt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var o=r-e;for(t=1;t<=o&&n[r-t]===i[a-t];t++);return Zt=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var o in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(o)&&(t=e[o],this[o]=t?t(i):i[o]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return F(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var on,sn,ln,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=an(cn),dn=F({},cn,{view:0,detail:0}),hn=an(dn),fn=F({},dn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:Sn,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(on=e.screenX-ln.screenX,sn=e.screenY-ln.screenY):sn=on=0,ln=e),on)},movementY:function(e){return"movementY"in e?e.movementY:sn}}),pn=an(fn),mn=an(F({},fn,{dataTransfer:0})),gn=an(F({},dn,{relatedTarget:0})),vn=an(F({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=an(F({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}})),bn=an(F({},cn,{data:0})),_n={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},xn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},wn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Mn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=wn[e])&&!!t[e]}function Sn(){return Mn}var An=an(F({},dn,{key:function(e){if(e.key){var t=_n[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?xn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:Sn,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}})),En=an(F({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Cn=an(F({},dn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:Sn})),Tn=an(F({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=an(F({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0})),Bn=[9,13,27,32],Pn=u&&"CompositionEvent"in window,kn=null;u&&"documentMode"in document&&(kn=document.documentMode);var In=u&&"TextEvent"in window&&!kn,Ln=u&&(!Pn||kn&&8<kn&&11>=kn),Dn=String.fromCharCode(32),On=!1;function Fn(e,t){switch(e){case"keyup":return-1!==Bn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Nn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var zn=!1,Un={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Hn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Un[e.type]:"textarea"===t}function Gn(e,t,n,r){Ee(r),0<(t=Vr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Vn=null,jn=null;function Wn(e){Dr(e,0)}function Jn(e){if(X(vi(e)))return e}function Xn(e,t){if("change"===e)return t}var Kn=!1;if(u){var $n;if(u){var Yn="oninput"in document;if(!Yn){var qn=document.createElement("div");qn.setAttribute("oninput","return;"),Yn="function"==typeof qn.oninput}$n=Yn}else $n=!1;Kn=$n&&(!document.documentMode||9<document.documentMode)}function Qn(){Vn&&(Vn.detachEvent("onpropertychange",Zn),jn=Vn=null)}function Zn(e){if("value"===e.propertyName&&Jn(jn)){var t=[];Gn(t,jn,e,xe(e)),Pe(Wn,t)}}function er(e,t,n){"focusin"===e?(Qn(),jn=n,(Vn=t).attachEvent("onpropertychange",Zn)):"focusout"===e&&Qn()}function tr(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Jn(jn)}function nr(e,t){if("click"===e)return Jn(t)}function rr(e,t){if("input"===e||"change"===e)return Jn(t)}var ir="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function ar(e,t){if(ir(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!d.call(t,i)||!ir(e[i],t[i]))return!1}return!0}function or(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function sr(e,t){var n,r=or(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=or(r)}}function lr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?lr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function cr(){for(var e=window,t=K();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=K((e=t.contentWindow).document)}return t}function ur(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function dr(e){var t=cr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&lr(n.ownerDocument.documentElement,n)){if(null!==r&&ur(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=sr(n,a);var o=sr(n,r);i&&o&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var hr=u&&"documentMode"in document&&11>=document.documentMode,fr=null,pr=null,mr=null,gr=!1;function vr(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;gr||null==fr||fr!==K(r)||(r="selectionStart"in(r=fr)&&ur(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},mr&&ar(mr,r)||(mr=r,0<(r=Vr(pr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=fr)))}function yr(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var br={animationend:yr("Animation","AnimationEnd"),animationiteration:yr("Animation","AnimationIteration"),animationstart:yr("Animation","AnimationStart"),transitionend:yr("Transition","TransitionEnd")},_r={},xr={};function wr(e){if(_r[e])return _r[e];if(!br[e])return e;var t,n=br[e];for(t in n)if(n.hasOwnProperty(t)&&t in xr)return _r[e]=n[t];return e}u&&(xr=document.createElement("div").style,"AnimationEvent"in window||(delete br.animationend.animation,delete br.animationiteration.animation,delete br.animationstart.animation),"TransitionEvent"in window||delete br.transitionend.transition);var Mr=wr("animationend"),Sr=wr("animationiteration"),Ar=wr("animationstart"),Er=wr("transitionend"),Cr=new Map,Tr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Rr(e,t){Cr.set(e,t),l(t,[e])}for(var Br=0;Br<Tr.length;Br++){var Pr=Tr[Br];Rr(Pr.toLowerCase(),"on"+(Pr[0].toUpperCase()+Pr.slice(1)))}Rr(Mr,"onAnimationEnd"),Rr(Sr,"onAnimationIteration"),Rr(Ar,"onAnimationStart"),Rr("dblclick","onDoubleClick"),Rr("focusin","onFocus"),Rr("focusout","onBlur"),Rr(Er,"onTransitionEnd"),c("onMouseEnter",["mouseout","mouseover"]),c("onMouseLeave",["mouseout","mouseover"]),c("onPointerEnter",["pointerout","pointerover"]),c("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Ir=new Set("cancel close invalid load scroll toggle".split(" ").concat(kr));function Lr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,o,s,l,c){if(He.apply(this,arguments),Oe){if(!Oe)throw Error(a(198));var u=Fe;Oe=!1,Fe=null,Ne||(Ne=!0,ze=u)}}(r,t,void 0,e),e.currentTarget=null}function Dr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var o=r.length-1;0<=o;o--){var s=r[o],l=s.instance,c=s.currentTarget;if(s=s.listener,l!==a&&i.isPropagationStopped())break e;Lr(i,s,c),a=l}else for(o=0;o<r.length;o++){if(l=(s=r[o]).instance,c=s.currentTarget,s=s.listener,l!==a&&i.isPropagationStopped())break e;Lr(i,s,c),a=l}}}if(Ne)throw e=ze,Ne=!1,ze=null,e}function Or(e,t){var n=t[hi];void 0===n&&(n=t[hi]=new Set);var r=e+"__bubble";n.has(r)||(Ur(t,e,2,!1),n.add(r))}function Fr(e,t,n){var r=0;t&&(r|=4),Ur(n,e,r,t)}var Nr="_reactListening"+Math.random().toString(36).slice(2);function zr(e){if(!e[Nr]){e[Nr]=!0,o.forEach((function(t){"selectionchange"!==t&&(Ir.has(t)||Fr(t,!1,e),Fr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Nr]||(t[Nr]=!0,Fr("selectionchange",!1,t))}}function Ur(e,t,n,r){switch(Yt(t)){case 1:var i=Wt;break;case 4:i=Jt;break;default:i=Xt}n=i.bind(null,t,n,e),i=void 0,!Ie||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Hr(e,t,n,r,i){var a=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var o=r.tag;if(3===o||4===o){var s=r.stateNode.containerInfo;if(s===i||8===s.nodeType&&s.parentNode===i)break;if(4===o)for(o=r.return;null!==o;){var l=o.tag;if((3===l||4===l)&&((l=o.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;o=o.return}for(;null!==s;){if(null===(o=mi(s)))return;if(5===(l=o.tag)||6===l){r=a=o;continue e}s=s.parentNode}}r=r.return}Pe((function(){var r=a,i=xe(n),o=[];e:{var s=Cr.get(e);if(void 0!==s){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=An;break;case"focusin":c="focus",l=gn;break;case"focusout":c="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Cn;break;case Mr:case Sr:case Ar:l=vn;break;case Er:l=Tn;break;case"scroll":l=hn;break;case"wheel":l=Rn;break;case"copy":case"cut":case"paste":l=yn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=En}var u=0!=(4&t),d=!u&&"scroll"===e,h=u?null!==s?s+"Capture":null:s;u=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==h&&null!=(m=ke(p,h))&&u.push(Gr(p,m,f))),d)break;p=p.return}0<u.length&&(s=new l(s,c,null,n,i),o.push({event:s,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(s="mouseover"===e||"pointerover"===e)||n===_e||!(c=n.relatedTarget||n.fromElement)||!mi(c)&&!c[di])&&(l||s)&&(s=i.window===i?i:(s=i.ownerDocument)?s.defaultView||s.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?mi(c):null)&&(c!==(d=Ge(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=pn,m="onMouseLeave",h="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(u=En,m="onPointerLeave",h="onPointerEnter",p="pointer"),d=null==l?s:vi(l),f=null==c?s:vi(c),(s=new u(m,p+"leave",l,n,i)).target=d,s.relatedTarget=f,m=null,mi(i)===r&&((u=new u(h,p+"enter",c,n,i)).target=f,u.relatedTarget=d,m=u),d=m,l&&c)e:{for(h=c,p=0,f=u=l;f;f=jr(f))p++;for(f=0,m=h;m;m=jr(m))f++;for(;0<p-f;)u=jr(u),p--;for(;0<f-p;)h=jr(h),f--;for(;p--;){if(u===h||null!==h&&u===h.alternate)break e;u=jr(u),h=jr(h)}u=null}else u=null;null!==l&&Wr(o,s,l,u,!1),null!==c&&null!==d&&Wr(o,d,c,u,!0)}if("select"===(l=(s=r?vi(r):window).nodeName&&s.nodeName.toLowerCase())||"input"===l&&"file"===s.type)var g=Xn;else if(Hn(s))if(Kn)g=rr;else{g=tr;var v=er}else(l=s.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===s.type||"radio"===s.type)&&(g=nr);switch(g&&(g=g(e,r))?Gn(o,g,n,i):(v&&v(e,s,r),"focusout"===e&&(v=s._wrapperState)&&v.controlled&&"number"===s.type&&ee(s,"number",s.value)),v=r?vi(r):window,e){case"focusin":(Hn(v)||"true"===v.contentEditable)&&(fr=v,pr=r,mr=null);break;case"focusout":mr=pr=fr=null;break;case"mousedown":gr=!0;break;case"contextmenu":case"mouseup":case"dragend":gr=!1,vr(o,n,i);break;case"selectionchange":if(hr)break;case"keydown":case"keyup":vr(o,n,i)}var y;if(Pn)e:{switch(e){case"compositionstart":var b="onCompositionStart";break e;case"compositionend":b="onCompositionEnd";break e;case"compositionupdate":b="onCompositionUpdate";break e}b=void 0}else zn?Fn(e,n)&&(b="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(b="onCompositionStart");b&&(Ln&&"ko"!==n.locale&&(zn||"onCompositionStart"!==b?"onCompositionEnd"===b&&zn&&(y=en()):(Qt="value"in(qt=i)?qt.value:qt.textContent,zn=!0)),0<(v=Vr(r,b)).length&&(b=new bn(b,e,null,n,i),o.push({event:b,listeners:v}),(y||null!==(y=Nn(n)))&&(b.data=y))),(y=In?function(e,t){switch(e){case"compositionend":return Nn(t);case"keypress":return 32!==t.which?null:(On=!0,Dn);case"textInput":return(e=t.data)===Dn&&On?null:e;default:return null}}(e,n):function(e,t){if(zn)return"compositionend"===e||!Pn&&Fn(e,t)?(e=en(),Zt=Qt=qt=null,zn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return Ln&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Vr(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),o.push({event:i,listeners:r}),i.data=y)}Dr(o,t)}))}function Gr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Vr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=ke(e,n))&&r.unshift(Gr(e,a,i)),null!=(a=ke(e,t))&&r.push(Gr(e,a,i))),e=e.return}return r}function jr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Wr(e,t,n,r,i){for(var a=t._reactName,o=[];null!==n&&n!==r;){var s=n,l=s.alternate,c=s.stateNode;if(null!==l&&l===r)break;5===s.tag&&null!==c&&(s=c,i?null!=(l=ke(n,a))&&o.unshift(Gr(n,l,s)):i||null!=(l=ke(n,a))&&o.push(Gr(n,l,s))),n=n.return}0!==o.length&&e.push({event:t,listeners:o})}var Jr=/\r\n?/g,Xr=/\u0000|\uFFFD/g;function Kr(e){return("string"==typeof e?e:""+e).replace(Jr,"\n").replace(Xr,"")}function $r(e,t,n){if(t=Kr(t),Kr(e)!==t&&n)throw Error(a(425))}function Yr(){}var qr=null,Qr=null;function Zr(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ei="function"==typeof setTimeout?setTimeout:void 0,ti="function"==typeof clearTimeout?clearTimeout:void 0,ni="function"==typeof Promise?Promise:void 0,ri="function"==typeof queueMicrotask?queueMicrotask:void 0!==ni?function(e){return ni.resolve(null).then(e).catch(ii)}:ei;function ii(e){setTimeout((function(){throw e}))}function ai(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Gt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Gt(t)}function oi(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function si(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var li=Math.random().toString(36).slice(2),ci="__reactFiber$"+li,ui="__reactProps$"+li,di="__reactContainer$"+li,hi="__reactEvents$"+li,fi="__reactListeners$"+li,pi="__reactHandles$"+li;function mi(e){var t=e[ci];if(t)return t;for(var n=e.parentNode;n;){if(t=n[di]||n[ci]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=si(e);null!==e;){if(n=e[ci])return n;e=si(e)}return t}n=(e=n).parentNode}return null}function gi(e){return!(e=e[ci]||e[di])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function vi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function yi(e){return e[ui]||null}var bi=[],_i=-1;function xi(e){return{current:e}}function wi(e){0>_i||(e.current=bi[_i],bi[_i]=null,_i--)}function Mi(e,t){_i++,bi[_i]=e.current,e.current=t}var Si={},Ai=xi(Si),Ei=xi(!1),Ci=Si;function Ti(e,t){var n=e.type.contextTypes;if(!n)return Si;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Ri(e){return null!=e.childContextTypes}function Bi(){wi(Ei),wi(Ai)}function Pi(e,t,n){if(Ai.current!==Si)throw Error(a(168));Mi(Ai,t),Mi(Ei,n)}function ki(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,V(e)||"Unknown",i));return F({},n,r)}function Ii(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Si,Ci=Ai.current,Mi(Ai,e),Mi(Ei,Ei.current),!0}function Li(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=ki(e,t,Ci),r.__reactInternalMemoizedMergedChildContext=e,wi(Ei),wi(Ai),Mi(Ai,e)):wi(Ei),Mi(Ei,n)}var Di=null,Oi=!1,Fi=!1;function Ni(e){null===Di?Di=[e]:Di.push(e)}function zi(){if(!Fi&&null!==Di){Fi=!0;var e=0,t=bt;try{var n=Di;for(bt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Di=null,Oi=!1}catch(t){throw null!==Di&&(Di=Di.slice(e+1)),Xe(Ze,zi),t}finally{bt=t,Fi=!1}}return null}var Ui=[],Hi=0,Gi=null,Vi=0,ji=[],Wi=0,Ji=null,Xi=1,Ki="";function $i(e,t){Ui[Hi++]=Vi,Ui[Hi++]=Gi,Gi=e,Vi=t}function Yi(e,t,n){ji[Wi++]=Xi,ji[Wi++]=Ki,ji[Wi++]=Ji,Ji=e;var r=Xi;e=Ki;var i=32-ot(r)-1;r&=~(1<<i),n+=1;var a=32-ot(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,Xi=1<<32-ot(t)+i|n<<i|r,Ki=a+e}else Xi=1<<a|n<<i|r,Ki=e}function qi(e){null!==e.return&&($i(e,1),Yi(e,1,0))}function Qi(e){for(;e===Gi;)Gi=Ui[--Hi],Ui[Hi]=null,Vi=Ui[--Hi],Ui[Hi]=null;for(;e===Ji;)Ji=ji[--Wi],ji[Wi]=null,Ki=ji[--Wi],ji[Wi]=null,Xi=ji[--Wi],ji[Wi]=null}var Zi=null,ea=null,ta=!1,na=null;function ra(e,t){var n=Tc(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function ia(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,Zi=e,ea=oi(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,Zi=e,ea=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ji?{id:Xi,overflow:Ki}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Tc(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Zi=e,ea=null,!0);default:return!1}}function aa(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function oa(e){if(ta){var t=ea;if(t){var n=t;if(!ia(e,t)){if(aa(e))throw Error(a(418));t=oi(n.nextSibling);var r=Zi;t&&ia(e,t)?ra(r,n):(e.flags=-4097&e.flags|2,ta=!1,Zi=e)}}else{if(aa(e))throw Error(a(418));e.flags=-4097&e.flags|2,ta=!1,Zi=e}}}function sa(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Zi=e}function la(e){if(e!==Zi)return!1;if(!ta)return sa(e),ta=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!Zr(e.type,e.memoizedProps)),t&&(t=ea)){if(aa(e))throw ca(),Error(a(418));for(;t;)ra(e,t),t=oi(t.nextSibling)}if(sa(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ea=oi(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ea=null}}else ea=Zi?oi(e.stateNode.nextSibling):null;return!0}function ca(){for(var e=ea;e;)e=oi(e.nextSibling)}function ua(){ea=Zi=null,ta=!1}function da(e){null===na?na=[e]:na.push(e)}var ha=_.ReactCurrentBatchConfig;function fa(e,t){if(e&&e.defaultProps){for(var n in t=F({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var pa=xi(null),ma=null,ga=null,va=null;function ya(){va=ga=ma=null}function ba(e){var t=pa.current;wi(pa),e._currentValue=t}function _a(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function xa(e,t){ma=e,va=ga=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(vs=!0),e.firstContext=null)}function wa(e){var t=e._currentValue;if(va!==e)if(e={context:e,memoizedValue:t,next:null},null===ga){if(null===ma)throw Error(a(308));ga=e,ma.dependencies={lanes:0,firstContext:e}}else ga=ga.next=e;return t}var Ma=null;function Sa(e){null===Ma?Ma=[e]:Ma.push(e)}function Aa(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Sa(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ea(e,r)}function Ea(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Ca=!1;function Ta(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function Ra(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Ba(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Pa(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Al)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ea(e,n)}return null===(i=r.interleaved)?(t.next=t,Sa(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ea(e,n)}function ka(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Ia(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function La(e,t,n,r){var i=e.updateQueue;Ca=!1;var a=i.firstBaseUpdate,o=i.lastBaseUpdate,s=i.shared.pending;if(null!==s){i.shared.pending=null;var l=s,c=l.next;l.next=null,null===o?a=c:o.next=c,o=l;var u=e.alternate;null!==u&&(s=(u=u.updateQueue).lastBaseUpdate)!==o&&(null===s?u.firstBaseUpdate=c:s.next=c,u.lastBaseUpdate=l)}if(null!==a){var d=i.baseState;for(o=0,u=c=l=null,s=a;;){var h=s.lane,f=s.eventTime;if((r&h)===h){null!==u&&(u=u.next={eventTime:f,lane:0,tag:s.tag,payload:s.payload,callback:s.callback,next:null});e:{var p=e,m=s;switch(h=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){d=p.call(f,d,h);break e}d=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(h="function"==typeof(p=m.payload)?p.call(f,d,h):p))break e;d=F({},d,h);break e;case 2:Ca=!0}}null!==s.callback&&0!==s.lane&&(e.flags|=64,null===(h=i.effects)?i.effects=[s]:h.push(s))}else f={eventTime:f,lane:h,tag:s.tag,payload:s.payload,callback:s.callback,next:null},null===u?(c=u=f,l=d):u=u.next=f,o|=h;if(null===(s=s.next)){if(null===(s=i.shared.pending))break;s=(h=s).next,h.next=null,i.lastBaseUpdate=h,i.shared.pending=null}}if(null===u&&(l=d),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);Il|=o,e.lanes=o,e.memoizedState=d}}function Da(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var Oa=(new r.Component).refs;function Fa(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:F({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Na={isMounted:function(e){return!!(e=e._reactInternals)&&Ge(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ql(),i=Ql(e),a=Ba(r,i);a.payload=t,null!=n&&(a.callback=n),null!==(t=Pa(e,a,i))&&(Zl(t,e,i,r),ka(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ql(),i=Ql(e),a=Ba(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Pa(e,a,i))&&(Zl(t,e,i,r),ka(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ql(),r=Ql(e),i=Ba(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Pa(e,i,r))&&(Zl(t,e,r,n),ka(t,e,r))}};function za(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!(t.prototype&&t.prototype.isPureReactComponent&&ar(n,r)&&ar(i,a))}function Ua(e,t,n){var r=!1,i=Si,a=t.contextType;return"object"==typeof a&&null!==a?a=wa(a):(i=Ri(t)?Ci:Ai.current,a=(r=null!=(r=t.contextTypes))?Ti(e,i):Si),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Na,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Ha(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Na.enqueueReplaceState(t,t.state,null)}function Ga(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=Oa,Ta(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=wa(a):(a=Ri(t)?Ci:Ai.current,i.context=Ti(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Fa(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Na.enqueueReplaceState(i,i.state,null),La(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Va(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,o=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===o?t.ref:(t=function(e){var t=i.refs;t===Oa&&(t=i.refs={}),null===e?delete t[o]:t[o]=e},t._stringRef=o,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function ja(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Wa(e){return(0,e._init)(e._payload)}function Ja(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Bc(e,t)).index=0,e.sibling=null,e}function o(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Lc(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function c(e,t,n,r){var a=n.type;return a===M?d(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===k&&Wa(a)===t.type)?((r=i(t,n.props)).ref=Va(e,t,n),r.return=e,r):((r=Pc(n.type,n.key,n.props,null,e.mode,r)).ref=Va(e,t,n),r.return=e,r)}function u(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Dc(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function d(e,t,n,r,a){return null===t||7!==t.tag?((t=kc(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Lc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case x:return(n=Pc(t.type,t.key,t.props,null,e.mode,n)).ref=Va(e,null,t),n.return=e,n;case w:return(t=Dc(t,e.mode,n)).return=e,t;case k:return h(e,(0,t._init)(t._payload),n)}if(te(t)||D(t))return(t=kc(t,e.mode,n,null)).return=e,t;ja(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case x:return n.key===i?c(e,t,n,r):null;case w:return n.key===i?u(e,t,n,r):null;case k:return f(e,t,(i=n._init)(n._payload),r)}if(te(n)||D(n))return null!==i?null:d(e,t,n,r,null);ja(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case x:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case w:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case k:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||D(r))return d(t,e=e.get(n)||null,r,i,null);ja(t,r)}return null}function m(i,a,s,l){for(var c=null,u=null,d=a,m=a=0,g=null;null!==d&&m<s.length;m++){d.index>m?(g=d,d=null):g=d.sibling;var v=f(i,d,s[m],l);if(null===v){null===d&&(d=g);break}e&&d&&null===v.alternate&&t(i,d),a=o(v,a,m),null===u?c=v:u.sibling=v,u=v,d=g}if(m===s.length)return n(i,d),ta&&$i(i,m),c;if(null===d){for(;m<s.length;m++)null!==(d=h(i,s[m],l))&&(a=o(d,a,m),null===u?c=d:u.sibling=d,u=d);return ta&&$i(i,m),c}for(d=r(i,d);m<s.length;m++)null!==(g=p(d,i,m,s[m],l))&&(e&&null!==g.alternate&&d.delete(null===g.key?m:g.key),a=o(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&d.forEach((function(e){return t(i,e)})),ta&&$i(i,m),c}function g(i,s,l,c){var u=D(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var d=u=null,m=s,g=s=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var b=f(i,m,y.value,c);if(null===b){null===m&&(m=v);break}e&&m&&null===b.alternate&&t(i,m),s=o(b,s,g),null===d?u=b:d.sibling=b,d=b,m=v}if(y.done)return n(i,m),ta&&$i(i,g),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=h(i,y.value,c))&&(s=o(y,s,g),null===d?u=y:d.sibling=y,d=y);return ta&&$i(i,g),u}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=p(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),s=o(y,s,g),null===d?u=y:d.sibling=y,d=y);return e&&m.forEach((function(e){return t(i,e)})),ta&&$i(i,g),u}return function e(r,a,o,l){if("object"==typeof o&&null!==o&&o.type===M&&null===o.key&&(o=o.props.children),"object"==typeof o&&null!==o){switch(o.$$typeof){case x:e:{for(var c=o.key,u=a;null!==u;){if(u.key===c){if((c=o.type)===M){if(7===u.tag){n(r,u.sibling),(a=i(u,o.props.children)).return=r,r=a;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===k&&Wa(c)===u.type){n(r,u.sibling),(a=i(u,o.props)).ref=Va(r,u,o),a.return=r,r=a;break e}n(r,u);break}t(r,u),u=u.sibling}o.type===M?((a=kc(o.props.children,r.mode,l,o.key)).return=r,r=a):((l=Pc(o.type,o.key,o.props,null,r.mode,l)).ref=Va(r,a,o),l.return=r,r=l)}return s(r);case w:e:{for(u=o.key;null!==a;){if(a.key===u){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Dc(o,r.mode,l)).return=r,r=a}return s(r);case k:return e(r,a,(u=o._init)(o._payload),l)}if(te(o))return m(r,a,o,l);if(D(o))return g(r,a,o,l);ja(r,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=Lc(o,r.mode,l)).return=r,r=a),s(r)):n(r,a)}}var Xa=Ja(!0),Ka=Ja(!1),$a={},Ya=xi($a),qa=xi($a),Qa=xi($a);function Za(e){if(e===$a)throw Error(a(174));return e}function eo(e,t){switch(Mi(Qa,t),Mi(qa,e),Mi(Ya,$a),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}wi(Ya),Mi(Ya,t)}function to(){wi(Ya),wi(qa),wi(Qa)}function no(e){Za(Qa.current);var t=Za(Ya.current),n=le(t,e.type);t!==n&&(Mi(qa,e),Mi(Ya,n))}function ro(e){qa.current===e&&(wi(Ya),wi(qa))}var io=xi(0);function ao(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var oo=[];function so(){for(var e=0;e<oo.length;e++)oo[e]._workInProgressVersionPrimary=null;oo.length=0}var lo=_.ReactCurrentDispatcher,co=_.ReactCurrentBatchConfig,uo=0,ho=null,fo=null,po=null,mo=!1,go=!1,vo=0,yo=0;function bo(){throw Error(a(321))}function _o(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!ir(e[n],t[n]))return!1;return!0}function xo(e,t,n,r,i,o){if(uo=o,ho=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,lo.current=null===e||null===e.memoizedState?is:as,e=n(r,i),go){o=0;do{if(go=!1,vo=0,25<=o)throw Error(a(301));o+=1,po=fo=null,t.updateQueue=null,lo.current=os,e=n(r,i)}while(go)}if(lo.current=rs,t=null!==fo&&null!==fo.next,uo=0,po=fo=ho=null,mo=!1,t)throw Error(a(300));return e}function wo(){var e=0!==vo;return vo=0,e}function Mo(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===po?ho.memoizedState=po=e:po=po.next=e,po}function So(){if(null===fo){var e=ho.alternate;e=null!==e?e.memoizedState:null}else e=fo.next;var t=null===po?ho.memoizedState:po.next;if(null!==t)po=t,fo=e;else{if(null===e)throw Error(a(310));e={memoizedState:(fo=e).memoizedState,baseState:fo.baseState,baseQueue:fo.baseQueue,queue:fo.queue,next:null},null===po?ho.memoizedState=po=e:po=po.next=e}return po}function Ao(e,t){return"function"==typeof t?t(e):t}function Eo(e){var t=So(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=fo,i=r.baseQueue,o=n.pending;if(null!==o){if(null!==i){var s=i.next;i.next=o.next,o.next=s}r.baseQueue=i=o,n.pending=null}if(null!==i){o=i.next,r=r.baseState;var l=s=null,c=null,u=o;do{var d=u.lane;if((uo&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,ho.lanes|=d,Il|=d}u=u.next}while(null!==u&&u!==o);null===c?s=r:c.next=l,ir(r,t.memoizedState)||(vs=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{o=i.lane,ho.lanes|=o,Il|=o,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Co(e){var t=So(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,o=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{o=e(o,s.action),s=s.next}while(s!==i);ir(o,t.memoizedState)||(vs=!0),t.memoizedState=o,null===t.baseQueue&&(t.baseState=o),n.lastRenderedState=o}return[o,r]}function To(){}function Ro(e,t){var n=ho,r=So(),i=t(),o=!ir(r.memoizedState,i);if(o&&(r.memoizedState=i,vs=!0),r=r.queue,Ho(ko.bind(null,n,r,e),[e]),r.getSnapshot!==t||o||null!==po&&1&po.memoizedState.tag){if(n.flags|=2048,Oo(9,Po.bind(null,n,r,i,t),void 0,null),null===El)throw Error(a(349));0!=(30&uo)||Bo(n,t,i)}return i}function Bo(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ho.updateQueue)?(t={lastEffect:null,stores:null},ho.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Po(e,t,n,r){t.value=n,t.getSnapshot=r,Io(t)&&Lo(e)}function ko(e,t,n){return n((function(){Io(t)&&Lo(e)}))}function Io(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!ir(e,n)}catch(e){return!0}}function Lo(e){var t=Ea(e,1);null!==t&&Zl(t,e,1,-1)}function Do(e){var t=Mo();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ao,lastRenderedState:e},t.queue=e,e=e.dispatch=Zo.bind(null,ho,e),[t.memoizedState,e]}function Oo(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ho.updateQueue)?(t={lastEffect:null,stores:null},ho.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Fo(){return So().memoizedState}function No(e,t,n,r){var i=Mo();ho.flags|=e,i.memoizedState=Oo(1|t,n,void 0,void 0===r?null:r)}function zo(e,t,n,r){var i=So();r=void 0===r?null:r;var a=void 0;if(null!==fo){var o=fo.memoizedState;if(a=o.destroy,null!==r&&_o(r,o.deps))return void(i.memoizedState=Oo(t,n,a,r))}ho.flags|=e,i.memoizedState=Oo(1|t,n,a,r)}function Uo(e,t){return No(8390656,8,e,t)}function Ho(e,t){return zo(2048,8,e,t)}function Go(e,t){return zo(4,2,e,t)}function Vo(e,t){return zo(4,4,e,t)}function jo(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Wo(e,t,n){return n=null!=n?n.concat([e]):null,zo(4,4,jo.bind(null,t,e),n)}function Jo(){}function Xo(e,t){var n=So();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_o(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function Ko(e,t){var n=So();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&_o(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function $o(e,t,n){return 0==(21&uo)?(e.baseState&&(e.baseState=!1,vs=!0),e.memoizedState=n):(ir(n,t)||(n=mt(),ho.lanes|=n,Il|=n,e.baseState=!0),t)}function Yo(e,t){var n=bt;bt=0!==n&&4>n?n:4,e(!0);var r=co.transition;co.transition={};try{e(!1),t()}finally{bt=n,co.transition=r}}function qo(){return So().memoizedState}function Qo(e,t,n){var r=Ql(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},es(e)?ts(t,n):null!==(n=Aa(e,t,n,r))&&(Zl(n,e,r,ql()),ns(n,t,r))}function Zo(e,t,n){var r=Ql(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(es(e))ts(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,ir(s,o)){var l=t.interleaved;return null===l?(i.next=i,Sa(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Aa(e,t,i,r))&&(Zl(n,e,r,i=ql()),ns(n,t,r))}}function es(e){var t=e.alternate;return e===ho||null!==t&&t===ho}function ts(e,t){go=mo=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function ns(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var rs={readContext:wa,useCallback:bo,useContext:bo,useEffect:bo,useImperativeHandle:bo,useInsertionEffect:bo,useLayoutEffect:bo,useMemo:bo,useReducer:bo,useRef:bo,useState:bo,useDebugValue:bo,useDeferredValue:bo,useTransition:bo,useMutableSource:bo,useSyncExternalStore:bo,useId:bo,unstable_isNewReconciler:!1},is={readContext:wa,useCallback:function(e,t){return Mo().memoizedState=[e,void 0===t?null:t],e},useContext:wa,useEffect:Uo,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,No(4194308,4,jo.bind(null,t,e),n)},useLayoutEffect:function(e,t){return No(4194308,4,e,t)},useInsertionEffect:function(e,t){return No(4,2,e,t)},useMemo:function(e,t){var n=Mo();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Mo();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=Qo.bind(null,ho,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Mo().memoizedState=e},useState:Do,useDebugValue:Jo,useDeferredValue:function(e){return Mo().memoizedState=e},useTransition:function(){var e=Do(!1),t=e[0];return e=Yo.bind(null,e[1]),Mo().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ho,i=Mo();if(ta){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===El)throw Error(a(349));0!=(30&uo)||Bo(r,t,n)}i.memoizedState=n;var o={value:n,getSnapshot:t};return i.queue=o,Uo(ko.bind(null,r,o,e),[e]),r.flags|=2048,Oo(9,Po.bind(null,r,o,n,t),void 0,null),n},useId:function(){var e=Mo(),t=El.identifierPrefix;if(ta){var n=Ki;t=":"+t+"R"+(n=(Xi&~(1<<32-ot(Xi)-1)).toString(32)+n),0<(n=vo++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=yo++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},as={readContext:wa,useCallback:Xo,useContext:wa,useEffect:Ho,useImperativeHandle:Wo,useInsertionEffect:Go,useLayoutEffect:Vo,useMemo:Ko,useReducer:Eo,useRef:Fo,useState:function(){return Eo(Ao)},useDebugValue:Jo,useDeferredValue:function(e){return $o(So(),fo.memoizedState,e)},useTransition:function(){return[Eo(Ao)[0],So().memoizedState]},useMutableSource:To,useSyncExternalStore:Ro,useId:qo,unstable_isNewReconciler:!1},os={readContext:wa,useCallback:Xo,useContext:wa,useEffect:Ho,useImperativeHandle:Wo,useInsertionEffect:Go,useLayoutEffect:Vo,useMemo:Ko,useReducer:Co,useRef:Fo,useState:function(){return Co(Ao)},useDebugValue:Jo,useDeferredValue:function(e){var t=So();return null===fo?t.memoizedState=e:$o(t,fo.memoizedState,e)},useTransition:function(){return[Co(Ao)[0],So().memoizedState]},useMutableSource:To,useSyncExternalStore:Ro,useId:qo,unstable_isNewReconciler:!1};function ss(e,t){try{var n="",r=t;do{n+=H(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function ls(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function cs(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var us="function"==typeof WeakMap?WeakMap:Map;function ds(e,t,n){(n=Ba(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Hl||(Hl=!0,Gl=r),cs(0,t)},n}function hs(e,t,n){(n=Ba(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){cs(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){cs(0,t),"function"!=typeof r&&(null===Vl?Vl=new Set([this]):Vl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function fs(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new us;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=wc.bind(null,e,t,n),t.then(e,e))}function ps(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function ms(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Ba(-1,1)).tag=2,Pa(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var gs=_.ReactCurrentOwner,vs=!1;function ys(e,t,n,r){t.child=null===e?Ka(t,null,n,r):Xa(t,e.child,n,r)}function bs(e,t,n,r,i){n=n.render;var a=t.ref;return xa(t,i),r=xo(e,t,n,r,a,i),n=wo(),null===e||vs?(ta&&n&&qi(t),t.flags|=1,ys(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hs(e,t,i))}function _s(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Rc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Pc(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,xs(e,t,a,r,i))}if(a=e.child,0==(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:ar)(o,r)&&e.ref===t.ref)return Hs(e,t,i)}return t.flags|=1,(e=Bc(a,r)).ref=t.ref,e.return=t,t.child=e}function xs(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(ar(a,r)&&e.ref===t.ref){if(vs=!1,t.pendingProps=r=a,0==(e.lanes&i))return t.lanes=e.lanes,Hs(e,t,i);0!=(131072&e.flags)&&(vs=!0)}}return Ss(e,t,n,r,i)}function ws(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Mi(Bl,Rl),Rl|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Mi(Bl,Rl),Rl|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Mi(Bl,Rl),Rl|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Mi(Bl,Rl),Rl|=r;return ys(e,t,i,n),t.child}function Ms(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Ss(e,t,n,r,i){var a=Ri(n)?Ci:Ai.current;return a=Ti(t,a),xa(t,i),n=xo(e,t,n,r,a,i),r=wo(),null===e||vs?(ta&&r&&qi(t),t.flags|=1,ys(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Hs(e,t,i))}function As(e,t,n,r,i){if(Ri(n)){var a=!0;Ii(t)}else a=!1;if(xa(t,i),null===t.stateNode)Us(e,t),Ua(t,n,r),Ga(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=n.contextType;c="object"==typeof c&&null!==c?wa(c):Ti(t,c=Ri(n)?Ci:Ai.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||l!==c)&&Ha(t,o,r,c),Ca=!1;var h=t.memoizedState;o.state=h,La(t,r,o,i),l=t.memoizedState,s!==r||h!==l||Ei.current||Ca?("function"==typeof u&&(Fa(t,n,u,r),l=t.memoizedState),(s=Ca||za(t,n,s,r,h,l,c))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,Ra(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:fa(t.type,s),o.props=c,d=t.pendingProps,h=o.context,l="object"==typeof(l=n.contextType)&&null!==l?wa(l):Ti(t,l=Ri(n)?Ci:Ai.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==d||h!==l)&&Ha(t,o,r,l),Ca=!1,h=t.memoizedState,o.state=h,La(t,r,o,i);var p=t.memoizedState;s!==d||h!==p||Ei.current||Ca?("function"==typeof f&&(Fa(t,n,f,r),p=t.memoizedState),(c=Ca||za(t,n,c,r,h,p,l)||!1)?(u||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=c):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Es(e,t,n,r,a,i)}function Es(e,t,n,r,i,a){Ms(e,t);var o=0!=(128&t.flags);if(!r&&!o)return i&&Li(t,n,!1),Hs(e,t,a);r=t.stateNode,gs.current=t;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=Xa(t,e.child,null,a),t.child=Xa(t,null,s,a)):ys(e,t,s,a),t.memoizedState=r.state,i&&Li(t,n,!0),t.child}function Cs(e){var t=e.stateNode;t.pendingContext?Pi(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Pi(0,t.context,!1),eo(e,t.containerInfo)}function Ts(e,t,n,r,i){return ua(),da(i),t.flags|=256,ys(e,t,n,r),t.child}var Rs,Bs,Ps,ks={dehydrated:null,treeContext:null,retryLane:0};function Is(e){return{baseLanes:e,cachePool:null,transitions:null}}function Ls(e,t,n){var r,i=t.pendingProps,o=io.current,s=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&o)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(o|=1),Mi(io,1&o),null===e)return oa(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,s?(i=t.mode,s=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=l):s=Ic(l,i,0,null),e=kc(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=Is(n),t.memoizedState=ks,e):Ds(t,l));if(null!==(o=e.memoizedState)&&null!==(r=o.dehydrated))return function(e,t,n,r,i,o,s){if(n)return 256&t.flags?(t.flags&=-257,Os(e,t,s,r=ls(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=r.fallback,i=t.mode,r=Ic({mode:"visible",children:r.children},i,0,null),(o=kc(o,i,s,null)).flags|=2,r.return=t,o.return=t,r.sibling=o,t.child=r,0!=(1&t.mode)&&Xa(t,e.child,null,s),t.child.memoizedState=Is(s),t.memoizedState=ks,o);if(0==(1&t.mode))return Os(e,t,s,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,Os(e,t,s,r=ls(o=Error(a(419)),r,void 0))}if(l=0!=(s&e.childLanes),vs||l){if(null!==(r=El)){switch(s&-s){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|s))?0:i)&&i!==o.retryLane&&(o.retryLane=i,Ea(e,i),Zl(r,e,i,-1))}return hc(),Os(e,t,s,r=ls(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Sc.bind(null,e),i._reactRetry=t,null):(e=o.treeContext,ea=oi(i.nextSibling),Zi=t,ta=!0,na=null,null!==e&&(ji[Wi++]=Xi,ji[Wi++]=Ki,ji[Wi++]=Ji,Xi=e.id,Ki=e.overflow,Ji=t),(t=Ds(t,r.children)).flags|=4096,t)}(e,t,l,i,r,o,n);if(s){s=i.fallback,l=t.mode,r=(o=e.child).sibling;var c={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==o?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Bc(o,c)).subtreeFlags=14680064&o.subtreeFlags,null!==r?s=Bc(r,s):(s=kc(s,l,n,null)).flags|=2,s.return=t,i.return=t,i.sibling=s,t.child=i,i=s,s=t.child,l=null===(l=e.child.memoizedState)?Is(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},s.memoizedState=l,s.childLanes=e.childLanes&~n,t.memoizedState=ks,i}return e=(s=e.child).sibling,i=Bc(s,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function Ds(e,t){return(t=Ic({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Os(e,t,n,r){return null!==r&&da(r),Xa(t,e.child,null,n),(e=Ds(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Fs(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),_a(e.return,t,n)}function Ns(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function zs(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(ys(e,t,r.children,n),0!=(2&(r=io.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Fs(e,n,t);else if(19===e.tag)Fs(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Mi(io,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ao(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Ns(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ao(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Ns(t,!0,n,null,a);break;case"together":Ns(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Us(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Hs(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Il|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Bc(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Bc(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function Gs(e,t){if(!ta)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Vs(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function js(e,t,n){var r=t.pendingProps;switch(Qi(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Vs(t),null;case 1:case 17:return Ri(t.type)&&Bi(),Vs(t),null;case 3:return r=t.stateNode,to(),wi(Ei),wi(Ai),so(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(la(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==na&&(rc(na),na=null))),Vs(t),null;case 5:ro(t);var i=Za(Qa.current);if(n=t.type,null!==e&&null!=t.stateNode)Bs(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Vs(t),null}if(e=Za(Ya.current),la(t)){r=t.stateNode,n=t.type;var o=t.memoizedProps;switch(r[ci]=t,r[ui]=o,e=0!=(1&t.mode),n){case"dialog":Or("cancel",r),Or("close",r);break;case"iframe":case"object":case"embed":Or("load",r);break;case"video":case"audio":for(i=0;i<kr.length;i++)Or(kr[i],r);break;case"source":Or("error",r);break;case"img":case"image":case"link":Or("error",r),Or("load",r);break;case"details":Or("toggle",r);break;case"input":Y(r,o),Or("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!o.multiple},Or("invalid",r);break;case"textarea":ie(r,o),Or("invalid",r)}for(var l in ye(n,o),i=null,o)if(o.hasOwnProperty(l)){var c=o[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==o.suppressHydrationWarning&&$r(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==o.suppressHydrationWarning&&$r(r.textContent,c,e),i=["children",""+c]):s.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&Or("scroll",r)}switch(n){case"input":J(r),Z(r,o,!0);break;case"textarea":J(r),oe(r);break;case"select":case"option":break;default:"function"==typeof o.onClick&&(r.onclick=Yr)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=se(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[ci]=t,e[ui]=r,Rs(e,t),t.stateNode=e;e:{switch(l=be(n,r),n){case"dialog":Or("cancel",e),Or("close",e),i=r;break;case"iframe":case"object":case"embed":Or("load",e),i=r;break;case"video":case"audio":for(i=0;i<kr.length;i++)Or(kr[i],e);i=r;break;case"source":Or("error",e),i=r;break;case"img":case"image":case"link":Or("error",e),Or("load",e),i=r;break;case"details":Or("toggle",e),i=r;break;case"input":Y(e,r),i=$(e,r),Or("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=F({},r,{value:void 0}),Or("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),Or("invalid",e)}for(o in ye(n,i),c=i)if(c.hasOwnProperty(o)){var u=c[o];"style"===o?ge(e,u):"dangerouslySetInnerHTML"===o?null!=(u=u?u.__html:void 0)&&de(e,u):"children"===o?"string"==typeof u?("textarea"!==n||""!==u)&&he(e,u):"number"==typeof u&&he(e,""+u):"suppressContentEditableWarning"!==o&&"suppressHydrationWarning"!==o&&"autoFocus"!==o&&(s.hasOwnProperty(o)?null!=u&&"onScroll"===o&&Or("scroll",e):null!=u&&b(e,o,u,l))}switch(n){case"input":J(e),Z(e,r,!1);break;case"textarea":J(e),oe(e);break;case"option":null!=r.value&&e.setAttribute("value",""+j(r.value));break;case"select":e.multiple=!!r.multiple,null!=(o=r.value)?ne(e,!!r.multiple,o,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=Yr)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Vs(t),null;case 6:if(e&&null!=t.stateNode)Ps(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(n=Za(Qa.current),Za(Ya.current),la(t)){if(r=t.stateNode,n=t.memoizedProps,r[ci]=t,(o=r.nodeValue!==n)&&null!==(e=Zi))switch(e.tag){case 3:$r(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&$r(r.nodeValue,n,0!=(1&e.mode))}o&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[ci]=t,t.stateNode=r}return Vs(t),null;case 13:if(wi(io),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ta&&null!==ea&&0!=(1&t.mode)&&0==(128&t.flags))ca(),ua(),t.flags|=98560,o=!1;else if(o=la(t),null!==r&&null!==r.dehydrated){if(null===e){if(!o)throw Error(a(318));if(!(o=null!==(o=t.memoizedState)?o.dehydrated:null))throw Error(a(317));o[ci]=t}else ua(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Vs(t),o=!1}else null!==na&&(rc(na),na=null),o=!0;if(!o)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&io.current)?0===Pl&&(Pl=3):hc())),null!==t.updateQueue&&(t.flags|=4),Vs(t),null);case 4:return to(),null===e&&zr(t.stateNode.containerInfo),Vs(t),null;case 10:return ba(t.type._context),Vs(t),null;case 19:if(wi(io),null===(o=t.memoizedState))return Vs(t),null;if(r=0!=(128&t.flags),null===(l=o.rendering))if(r)Gs(o,!1);else{if(0!==Pl||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ao(e))){for(t.flags|=128,Gs(o,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(o=n).flags&=14680066,null===(l=o.alternate)?(o.childLanes=0,o.lanes=e,o.child=null,o.subtreeFlags=0,o.memoizedProps=null,o.memoizedState=null,o.updateQueue=null,o.dependencies=null,o.stateNode=null):(o.childLanes=l.childLanes,o.lanes=l.lanes,o.child=l.child,o.subtreeFlags=0,o.deletions=null,o.memoizedProps=l.memoizedProps,o.memoizedState=l.memoizedState,o.updateQueue=l.updateQueue,o.type=l.type,e=l.dependencies,o.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Mi(io,1&io.current|2),t.child}e=e.sibling}null!==o.tail&&qe()>zl&&(t.flags|=128,r=!0,Gs(o,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ao(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),Gs(o,!0),null===o.tail&&"hidden"===o.tailMode&&!l.alternate&&!ta)return Vs(t),null}else 2*qe()-o.renderingStartTime>zl&&1073741824!==n&&(t.flags|=128,r=!0,Gs(o,!1),t.lanes=4194304);o.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=o.last)?n.sibling=l:t.child=l,o.last=l)}return null!==o.tail?(t=o.tail,o.rendering=t,o.tail=t.sibling,o.renderingStartTime=qe(),t.sibling=null,n=io.current,Mi(io,r?1&n|2:1&n),t):(Vs(t),null);case 22:case 23:return lc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Rl)&&(Vs(t),6&t.subtreeFlags&&(t.flags|=8192)):Vs(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Ws(e,t){switch(Qi(t),t.tag){case 1:return Ri(t.type)&&Bi(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return to(),wi(Ei),wi(Ai),so(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ro(t),null;case 13:if(wi(io),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));ua()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return wi(io),null;case 4:return to(),null;case 10:return ba(t.type._context),null;case 22:case 23:return lc(),null;default:return null}}Rs=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Bs=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,Za(Ya.current);var a,o=null;switch(n){case"input":i=$(e,i),r=$(e,r),o=[];break;case"select":i=F({},i,{value:void 0}),r=F({},r,{value:void 0}),o=[];break;case"textarea":i=re(e,i),r=re(e,r),o=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=Yr)}for(u in ye(n,r),n=null,i)if(!r.hasOwnProperty(u)&&i.hasOwnProperty(u)&&null!=i[u])if("style"===u){var l=i[u];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==u&&"children"!==u&&"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&"autoFocus"!==u&&(s.hasOwnProperty(u)?o||(o=[]):(o=o||[]).push(u,null));for(u in r){var c=r[u];if(l=null!=i?i[u]:void 0,r.hasOwnProperty(u)&&c!==l&&(null!=c||null!=l))if("style"===u)if(l){for(a in l)!l.hasOwnProperty(a)||c&&c.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in c)c.hasOwnProperty(a)&&l[a]!==c[a]&&(n||(n={}),n[a]=c[a])}else n||(o||(o=[]),o.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(o=o||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(o=o||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(s.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&Or("scroll",e),o||l===c||(o=[])):(o=o||[]).push(u,c))}n&&(o=o||[]).push("style",n);var u=o;(t.updateQueue=u)&&(t.flags|=4)}},Ps=function(e,t,n,r){n!==r&&(t.flags|=4)};var Js=!1,Xs=!1,Ks="function"==typeof WeakSet?WeakSet:Set,$s=null;function Ys(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){xc(e,t,n)}else n.current=null}function qs(e,t,n){try{n()}catch(n){xc(e,t,n)}}var Qs=!1;function Zs(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&qs(t,n,a)}i=i.next}while(i!==r)}}function el(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function tl(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function nl(e){var t=e.alternate;null!==t&&(e.alternate=null,nl(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[ci],delete t[ui],delete t[hi],delete t[fi],delete t[pi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function rl(e){return 5===e.tag||3===e.tag||4===e.tag}function il(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||rl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function al(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=Yr));else if(4!==r&&null!==(e=e.child))for(al(e,t,n),e=e.sibling;null!==e;)al(e,t,n),e=e.sibling}function ol(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ol(e,t,n),e=e.sibling;null!==e;)ol(e,t,n),e=e.sibling}var sl=null,ll=!1;function cl(e,t,n){for(n=n.child;null!==n;)ul(e,t,n),n=n.sibling}function ul(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:Xs||Ys(n,t);case 6:var r=sl,i=ll;sl=null,cl(e,t,n),ll=i,null!==(sl=r)&&(ll?(e=sl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):sl.removeChild(n.stateNode));break;case 18:null!==sl&&(ll?(e=sl,n=n.stateNode,8===e.nodeType?ai(e.parentNode,n):1===e.nodeType&&ai(e,n),Gt(e)):ai(sl,n.stateNode));break;case 4:r=sl,i=ll,sl=n.stateNode.containerInfo,ll=!0,cl(e,t,n),sl=r,ll=i;break;case 0:case 11:case 14:case 15:if(!Xs&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var a=i,o=a.destroy;a=a.tag,void 0!==o&&(0!=(2&a)||0!=(4&a))&&qs(n,t,o),i=i.next}while(i!==r)}cl(e,t,n);break;case 1:if(!Xs&&(Ys(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){xc(n,t,e)}cl(e,t,n);break;case 21:cl(e,t,n);break;case 22:1&n.mode?(Xs=(r=Xs)||null!==n.memoizedState,cl(e,t,n),Xs=r):cl(e,t,n);break;default:cl(e,t,n)}}function dl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Ks),t.forEach((function(t){var r=Ac.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function hl(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var o=e,s=t,l=s;e:for(;null!==l;){switch(l.tag){case 5:sl=l.stateNode,ll=!1;break e;case 3:case 4:sl=l.stateNode.containerInfo,ll=!0;break e}l=l.return}if(null===sl)throw Error(a(160));ul(o,s,i),sl=null,ll=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){xc(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)fl(t,e),t=t.sibling}function fl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(hl(t,e),pl(e),4&r){try{Zs(3,e,e.return),el(3,e)}catch(t){xc(e,e.return,t)}try{Zs(5,e,e.return)}catch(t){xc(e,e.return,t)}}break;case 1:hl(t,e),pl(e),512&r&&null!==n&&Ys(n,n.return);break;case 5:if(hl(t,e),pl(e),512&r&&null!==n&&Ys(n,n.return),32&e.flags){var i=e.stateNode;try{he(i,"")}catch(t){xc(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var o=e.memoizedProps,s=null!==n?n.memoizedProps:o,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===o.type&&null!=o.name&&q(i,o),be(l,s);var u=be(l,o);for(s=0;s<c.length;s+=2){var d=c[s],h=c[s+1];"style"===d?ge(i,h):"dangerouslySetInnerHTML"===d?de(i,h):"children"===d?he(i,h):b(i,d,h,u)}switch(l){case"input":Q(i,o);break;case"textarea":ae(i,o);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!o.multiple;var p=o.value;null!=p?ne(i,!!o.multiple,p,!1):f!==!!o.multiple&&(null!=o.defaultValue?ne(i,!!o.multiple,o.defaultValue,!0):ne(i,!!o.multiple,o.multiple?[]:"",!1))}i[ui]=o}catch(t){xc(e,e.return,t)}}break;case 6:if(hl(t,e),pl(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,o=e.memoizedProps;try{i.nodeValue=o}catch(t){xc(e,e.return,t)}}break;case 3:if(hl(t,e),pl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Gt(t.containerInfo)}catch(t){xc(e,e.return,t)}break;case 4:default:hl(t,e),pl(e);break;case 13:hl(t,e),pl(e),8192&(i=e.child).flags&&(o=null!==i.memoizedState,i.stateNode.isHidden=o,!o||null!==i.alternate&&null!==i.alternate.memoizedState||(Nl=qe())),4&r&&dl(e);break;case 22:if(d=null!==n&&null!==n.memoizedState,1&e.mode?(Xs=(u=Xs)||d,hl(t,e),Xs=u):hl(t,e),pl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!d&&0!=(1&e.mode))for($s=e,d=e.child;null!==d;){for(h=$s=d;null!==$s;){switch(p=(f=$s).child,f.tag){case 0:case 11:case 14:case 15:Zs(4,f,f.return);break;case 1:Ys(f,f.return);var m=f.stateNode;if("function"==typeof m.componentWillUnmount){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){xc(r,n,e)}}break;case 5:Ys(f,f.return);break;case 22:if(null!==f.memoizedState){yl(h);continue}}null!==p?(p.return=f,$s=p):yl(h)}d=d.sibling}e:for(d=null,h=e;;){if(5===h.tag){if(null===d){d=h;try{i=h.stateNode,u?"function"==typeof(o=i.style).setProperty?o.setProperty("display","none","important"):o.display="none":(l=h.stateNode,s=null!=(c=h.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",s))}catch(t){xc(e,e.return,t)}}}else if(6===h.tag){if(null===d)try{h.stateNode.nodeValue=u?"":h.memoizedProps}catch(t){xc(e,e.return,t)}}else if((22!==h.tag&&23!==h.tag||null===h.memoizedState||h===e)&&null!==h.child){h.child.return=h,h=h.child;continue}if(h===e)break e;for(;null===h.sibling;){if(null===h.return||h.return===e)break e;d===h&&(d=null),h=h.return}d===h&&(d=null),h.sibling.return=h.return,h=h.sibling}}break;case 19:hl(t,e),pl(e),4&r&&dl(e);case 21:}}function pl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(rl(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(he(i,""),r.flags&=-33),ol(e,il(e),i);break;case 3:case 4:var o=r.stateNode.containerInfo;al(e,il(e),o);break;default:throw Error(a(161))}}catch(t){xc(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function ml(e,t,n){$s=e,gl(e,t,n)}function gl(e,t,n){for(var r=0!=(1&e.mode);null!==$s;){var i=$s,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||Js;if(!o){var s=i.alternate,l=null!==s&&null!==s.memoizedState||Xs;s=Js;var c=Xs;if(Js=o,(Xs=l)&&!c)for($s=i;null!==$s;)l=(o=$s).child,22===o.tag&&null!==o.memoizedState?bl(i):null!==l?(l.return=o,$s=l):bl(i);for(;null!==a;)$s=a,gl(a,t,n),a=a.sibling;$s=i,Js=s,Xs=c}vl(e)}else 0!=(8772&i.subtreeFlags)&&null!==a?(a.return=i,$s=a):vl(e)}}function vl(e){for(;null!==$s;){var t=$s;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:Xs||el(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!Xs)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:fa(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var o=t.updateQueue;null!==o&&Da(t,o,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Da(t,s,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var c=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":c.autoFocus&&n.focus();break;case"img":c.src&&(n.src=c.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var u=t.alternate;if(null!==u){var d=u.memoizedState;if(null!==d){var h=d.dehydrated;null!==h&&Gt(h)}}}break;default:throw Error(a(163))}Xs||512&t.flags&&tl(t)}catch(e){xc(t,t.return,e)}}if(t===e){$s=null;break}if(null!==(n=t.sibling)){n.return=t.return,$s=n;break}$s=t.return}}function yl(e){for(;null!==$s;){var t=$s;if(t===e){$s=null;break}var n=t.sibling;if(null!==n){n.return=t.return,$s=n;break}$s=t.return}}function bl(e){for(;null!==$s;){var t=$s;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{el(4,t)}catch(e){xc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){xc(t,i,e)}}var a=t.return;try{tl(t)}catch(e){xc(t,a,e)}break;case 5:var o=t.return;try{tl(t)}catch(e){xc(t,o,e)}}}catch(e){xc(t,t.return,e)}if(t===e){$s=null;break}var s=t.sibling;if(null!==s){s.return=t.return,$s=s;break}$s=t.return}}var _l,xl=Math.ceil,wl=_.ReactCurrentDispatcher,Ml=_.ReactCurrentOwner,Sl=_.ReactCurrentBatchConfig,Al=0,El=null,Cl=null,Tl=0,Rl=0,Bl=xi(0),Pl=0,kl=null,Il=0,Ll=0,Dl=0,Ol=null,Fl=null,Nl=0,zl=1/0,Ul=null,Hl=!1,Gl=null,Vl=null,jl=!1,Wl=null,Jl=0,Xl=0,Kl=null,$l=-1,Yl=0;function ql(){return 0!=(6&Al)?qe():-1!==$l?$l:$l=qe()}function Ql(e){return 0==(1&e.mode)?1:0!=(2&Al)&&0!==Tl?Tl&-Tl:null!==ha.transition?(0===Yl&&(Yl=mt()),Yl):0!==(e=bt)?e:e=void 0===(e=window.event)?16:Yt(e.type)}function Zl(e,t,n,r){if(50<Xl)throw Xl=0,Kl=null,Error(a(185));vt(e,n,r),0!=(2&Al)&&e===El||(e===El&&(0==(2&Al)&&(Ll|=n),4===Pl&&ic(e,Tl)),ec(e,r),1===n&&0===Al&&0==(1&t.mode)&&(zl=qe()+500,Oi&&zi()))}function ec(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-ot(a),s=1<<o,l=i[o];-1===l?0!=(s&n)&&0==(s&r)||(i[o]=ft(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=ht(e,e===El?Tl:0);if(0===r)null!==n&&Ke(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ke(n),1===t)0===e.tag?function(e){Oi=!0,Ni(e)}(ac.bind(null,e)):Ni(ac.bind(null,e)),ri((function(){0==(6&Al)&&zi()})),n=null;else{switch(_t(r)){case 1:n=Ze;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Ec(n,tc.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function tc(e,t){if($l=-1,Yl=0,0!=(6&Al))throw Error(a(327));var n=e.callbackNode;if(bc()&&e.callbackNode!==n)return null;var r=ht(e,e===El?Tl:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=fc(e,r);else{t=r;var i=Al;Al|=2;var o=dc();for(El===e&&Tl===t||(Ul=null,zl=qe()+500,cc(e,t));;)try{mc();break}catch(t){uc(e,t)}ya(),wl.current=o,Al=i,null!==Cl?t=0:(El=null,Tl=0,t=Pl)}if(0!==t){if(2===t&&0!==(i=pt(e))&&(r=i,t=nc(e,i)),1===t)throw n=kl,cc(e,0),ic(e,r),ec(e,qe()),n;if(6===t)ic(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!ir(a(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=fc(e,r))&&0!==(o=pt(e))&&(r=o,t=nc(e,o)),1===t))throw n=kl,cc(e,0),ic(e,r),ec(e,qe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:yc(e,Fl,Ul);break;case 3:if(ic(e,r),(130023424&r)===r&&10<(t=Nl+500-qe())){if(0!==ht(e,0))break;if(((i=e.suspendedLanes)&r)!==r){ql(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ei(yc.bind(null,e,Fl,Ul),t);break}yc(e,Fl,Ul);break;case 4:if(ic(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-ot(r);o=1<<s,(s=t[s])>i&&(i=s),r&=~o}if(r=i,10<(r=(120>(r=qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*xl(r/1960))-r)){e.timeoutHandle=ei(yc.bind(null,e,Fl,Ul),r);break}yc(e,Fl,Ul);break;default:throw Error(a(329))}}}return ec(e,qe()),e.callbackNode===n?tc.bind(null,e):null}function nc(e,t){var n=Ol;return e.current.memoizedState.isDehydrated&&(cc(e,t).flags|=256),2!==(e=fc(e,t))&&(t=Fl,Fl=n,null!==t&&rc(t)),e}function rc(e){null===Fl?Fl=e:Fl.push.apply(Fl,e)}function ic(e,t){for(t&=~Dl,t&=~Ll,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-ot(t),r=1<<n;e[n]=-1,t&=~r}}function ac(e){if(0!=(6&Al))throw Error(a(327));bc();var t=ht(e,0);if(0==(1&t))return ec(e,qe()),null;var n=fc(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=nc(e,r))}if(1===n)throw n=kl,cc(e,0),ic(e,t),ec(e,qe()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,yc(e,Fl,Ul),ec(e,qe()),null}function oc(e,t){var n=Al;Al|=1;try{return e(t)}finally{0===(Al=n)&&(zl=qe()+500,Oi&&zi())}}function sc(e){null!==Wl&&0===Wl.tag&&0==(6&Al)&&bc();var t=Al;Al|=1;var n=Sl.transition,r=bt;try{if(Sl.transition=null,bt=1,e)return e()}finally{bt=r,Sl.transition=n,0==(6&(Al=t))&&zi()}}function lc(){Rl=Bl.current,wi(Bl)}function cc(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ti(n)),null!==Cl)for(n=Cl.return;null!==n;){var r=n;switch(Qi(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Bi();break;case 3:to(),wi(Ei),wi(Ai),so();break;case 5:ro(r);break;case 4:to();break;case 13:case 19:wi(io);break;case 10:ba(r.type._context);break;case 22:case 23:lc()}n=n.return}if(El=e,Cl=e=Bc(e.current,null),Tl=Rl=t,Pl=0,kl=null,Dl=Ll=Il=0,Fl=Ol=null,null!==Ma){for(t=0;t<Ma.length;t++)if(null!==(r=(n=Ma[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}Ma=null}return e}function uc(e,t){for(;;){var n=Cl;try{if(ya(),lo.current=rs,mo){for(var r=ho.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}mo=!1}if(uo=0,po=fo=ho=null,go=!1,vo=0,Ml.current=null,null===n||null===n.return){Pl=1,kl=t,Cl=null;break}e:{var o=e,s=n.return,l=n,c=t;if(t=Tl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(0==(1&d.mode)&&(0===h||11===h||15===h)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=ps(s);if(null!==p){p.flags&=-257,ms(p,s,l,0,t),1&p.mode&&fs(o,u,t),c=u;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0==(1&t)){fs(o,u,t),hc();break e}c=Error(a(426))}else if(ta&&1&l.mode){var v=ps(s);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),ms(v,s,l,0,t),da(ss(c,l));break e}}o=c=ss(c,l),4!==Pl&&(Pl=2),null===Ol?Ol=[o]:Ol.push(o),o=s;do{switch(o.tag){case 3:o.flags|=65536,t&=-t,o.lanes|=t,Ia(o,ds(0,c,t));break e;case 1:l=c;var y=o.type,b=o.stateNode;if(0==(128&o.flags)&&("function"==typeof y.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===Vl||!Vl.has(b)))){o.flags|=65536,t&=-t,o.lanes|=t,Ia(o,hs(o,l,t));break e}}o=o.return}while(null!==o)}vc(n)}catch(e){t=e,Cl===n&&null!==n&&(Cl=n=n.return);continue}break}}function dc(){var e=wl.current;return wl.current=rs,null===e?rs:e}function hc(){0!==Pl&&3!==Pl&&2!==Pl||(Pl=4),null===El||0==(268435455&Il)&&0==(268435455&Ll)||ic(El,Tl)}function fc(e,t){var n=Al;Al|=2;var r=dc();for(El===e&&Tl===t||(Ul=null,cc(e,t));;)try{pc();break}catch(t){uc(e,t)}if(ya(),Al=n,wl.current=r,null!==Cl)throw Error(a(261));return El=null,Tl=0,Pl}function pc(){for(;null!==Cl;)gc(Cl)}function mc(){for(;null!==Cl&&!$e();)gc(Cl)}function gc(e){var t=_l(e.alternate,e,Rl);e.memoizedProps=e.pendingProps,null===t?vc(e):Cl=t,Ml.current=null}function vc(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=js(n,t,Rl)))return void(Cl=n)}else{if(null!==(n=Ws(n,t)))return n.flags&=32767,void(Cl=n);if(null===e)return Pl=6,void(Cl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Cl=t);Cl=t=e}while(null!==t);0===Pl&&(Pl=5)}function yc(e,t,n){var r=bt,i=Sl.transition;try{Sl.transition=null,bt=1,function(e,t,n,r){do{bc()}while(null!==Wl);if(0!=(6&Al))throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var o=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-ot(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,o),e===El&&(Cl=El=null,Tl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||jl||(jl=!0,Ec(tt,(function(){return bc(),null}))),o=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||o){o=Sl.transition,Sl.transition=null;var s=bt;bt=1;var l=Al;Al|=4,Ml.current=null,function(e,t){if(qr=jt,ur(e=cr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,o=r.focusNode;r=r.focusOffset;try{n.nodeType,o.nodeType}catch(e){n=null;break e}var s=0,l=-1,c=-1,u=0,d=0,h=e,f=null;t:for(;;){for(var p;h!==n||0!==i&&3!==h.nodeType||(l=s+i),h!==o||0!==r&&3!==h.nodeType||(c=s+r),3===h.nodeType&&(s+=h.nodeValue.length),null!==(p=h.firstChild);)f=h,h=p;for(;;){if(h===e)break t;if(f===n&&++u===i&&(l=s),f===o&&++d===r&&(c=s),null!==(p=h.nextSibling))break;f=(h=f).parentNode}h=p}n=-1===l||-1===c?null:{start:l,end:c}}else n=null}n=n||{start:0,end:0}}else n=null;for(Qr={focusedElem:e,selectionRange:n},jt=!1,$s=t;null!==$s;)if(e=(t=$s).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,$s=e;else for(;null!==$s;){t=$s;try{var m=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,b=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:fa(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=b}break;case 3:var _=t.stateNode.containerInfo;1===_.nodeType?_.textContent="":9===_.nodeType&&_.documentElement&&_.removeChild(_.documentElement);break;default:throw Error(a(163))}}catch(e){xc(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,$s=e;break}$s=t.return}m=Qs,Qs=!1}(e,n),fl(n,e),dr(Qr),jt=!!qr,Qr=qr=null,e.current=n,ml(n,e,i),Ye(),Al=l,bt=s,Sl.transition=o}else e.current=n;if(jl&&(jl=!1,Wl=e,Jl=i),0===(o=e.pendingLanes)&&(Vl=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),ec(e,qe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Hl)throw Hl=!1,e=Gl,Gl=null,e;0!=(1&Jl)&&0!==e.tag&&bc(),0!=(1&(o=e.pendingLanes))?e===Kl?Xl++:(Xl=0,Kl=e):Xl=0,zi()}(e,t,n,r)}finally{Sl.transition=i,bt=r}return null}function bc(){if(null!==Wl){var e=_t(Jl),t=Sl.transition,n=bt;try{if(Sl.transition=null,bt=16>e?16:e,null===Wl)var r=!1;else{if(e=Wl,Wl=null,Jl=0,0!=(6&Al))throw Error(a(331));var i=Al;for(Al|=4,$s=e.current;null!==$s;){var o=$s,s=o.child;if(0!=(16&$s.flags)){var l=o.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for($s=u;null!==$s;){var d=$s;switch(d.tag){case 0:case 11:case 15:Zs(8,d,o)}var h=d.child;if(null!==h)h.return=d,$s=h;else for(;null!==$s;){var f=(d=$s).sibling,p=d.return;if(nl(d),d===u){$s=null;break}if(null!==f){f.return=p,$s=f;break}$s=p}}}var m=o.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}$s=o}}if(0!=(2064&o.subtreeFlags)&&null!==s)s.return=o,$s=s;else e:for(;null!==$s;){if(0!=(2048&(o=$s).flags))switch(o.tag){case 0:case 11:case 15:Zs(9,o,o.return)}var y=o.sibling;if(null!==y){y.return=o.return,$s=y;break e}$s=o.return}}var b=e.current;for($s=b;null!==$s;){var _=(s=$s).child;if(0!=(2064&s.subtreeFlags)&&null!==_)_.return=s,$s=_;else e:for(s=b;null!==$s;){if(0!=(2048&(l=$s).flags))try{switch(l.tag){case 0:case 11:case 15:el(9,l)}}catch(e){xc(l,l.return,e)}if(l===s){$s=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,$s=x;break e}$s=l.return}}if(Al=i,zi(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{bt=n,Sl.transition=t}}return!1}function _c(e,t,n){e=Pa(e,t=ds(0,t=ss(n,t),1),1),t=ql(),null!==e&&(vt(e,1,t),ec(e,t))}function xc(e,t,n){if(3===e.tag)_c(e,e,n);else for(;null!==t;){if(3===t.tag){_c(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Vl||!Vl.has(r))){t=Pa(t,e=hs(t,e=ss(n,e),1),1),e=ql(),null!==t&&(vt(t,1,e),ec(t,e));break}}t=t.return}}function wc(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ql(),e.pingedLanes|=e.suspendedLanes&n,El===e&&(Tl&n)===n&&(4===Pl||3===Pl&&(130023424&Tl)===Tl&&500>qe()-Nl?cc(e,0):Dl|=n),ec(e,t)}function Mc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ut,0==(130023424&(ut<<=1))&&(ut=4194304)));var n=ql();null!==(e=Ea(e,t))&&(vt(e,t,n),ec(e,n))}function Sc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Mc(e,n)}function Ac(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Mc(e,n)}function Ec(e,t){return Xe(e,t)}function Cc(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Tc(e,t,n,r){return new Cc(e,t,n,r)}function Rc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Bc(e,t){var n=e.alternate;return null===n?((n=Tc(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Pc(e,t,n,r,i,o){var s=2;if(r=e,"function"==typeof e)Rc(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case M:return kc(n.children,i,o,t);case S:s=8,i|=8;break;case A:return(e=Tc(12,n,t,2|i)).elementType=A,e.lanes=o,e;case R:return(e=Tc(13,n,t,i)).elementType=R,e.lanes=o,e;case B:return(e=Tc(19,n,t,i)).elementType=B,e.lanes=o,e;case I:return Ic(n,i,o,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case E:s=10;break e;case C:s=9;break e;case T:s=11;break e;case P:s=14;break e;case k:s=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Tc(s,n,t,i)).elementType=e,t.type=r,t.lanes=o,t}function kc(e,t,n,r){return(e=Tc(7,e,r,t)).lanes=n,e}function Ic(e,t,n,r){return(e=Tc(22,e,r,t)).elementType=I,e.lanes=n,e.stateNode={isHidden:!1},e}function Lc(e,t,n){return(e=Tc(6,e,null,t)).lanes=n,e}function Dc(e,t,n){return(t=Tc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Oc(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Fc(e,t,n,r,i,a,o,s,l){return e=new Oc(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Tc(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ta(a),e}function Nc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function zc(e){if(!e)return Si;e:{if(Ge(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Ri(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Ri(n))return ki(e,n,t)}return t}function Uc(e,t,n,r,i,a,o,s,l){return(e=Fc(n,r,!0,e,0,a,0,s,l)).context=zc(null),n=e.current,(a=Ba(r=ql(),i=Ql(n))).callback=null!=t?t:null,Pa(n,a,i),e.current.lanes=i,vt(e,i,r),ec(e,r),e}function Hc(e,t,n,r){var i=t.current,a=ql(),o=Ql(i);return n=zc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ba(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Pa(i,t,o))&&(Zl(e,i,o,a),ka(e,i,o)),o}function Gc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Vc(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function jc(e,t){Vc(e,t),(e=e.alternate)&&Vc(e,t)}_l=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ei.current)vs=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return vs=!1,function(e,t,n){switch(t.tag){case 3:Cs(t),ua();break;case 5:no(t);break;case 1:Ri(t.type)&&Ii(t);break;case 4:eo(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Mi(pa,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Mi(io,1&io.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Ls(e,t,n):(Mi(io,1&io.current),null!==(e=Hs(e,t,n))?e.sibling:null);Mi(io,1&io.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return zs(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Mi(io,io.current),r)break;return null;case 22:case 23:return t.lanes=0,ws(e,t,n)}return Hs(e,t,n)}(e,t,n);vs=0!=(131072&e.flags)}else vs=!1,ta&&0!=(1048576&t.flags)&&Yi(t,Vi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Us(e,t),e=t.pendingProps;var i=Ti(t,Ai.current);xa(t,n),i=xo(null,t,r,e,i,n);var o=wo();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Ri(r)?(o=!0,Ii(t)):o=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ta(t),i.updater=Na,t.stateNode=i,i._reactInternals=t,Ga(t,r,e,n),t=Es(null,t,r,!0,o,n)):(t.tag=0,ta&&o&&qi(t),ys(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Us(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Rc(e)?1:0;if(null!=e){if((e=e.$$typeof)===T)return 11;if(e===P)return 14}return 2}(r),e=fa(r,e),i){case 0:t=Ss(null,t,r,e,n);break e;case 1:t=As(null,t,r,e,n);break e;case 11:t=bs(null,t,r,e,n);break e;case 14:t=_s(null,t,r,fa(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Ss(e,t,r,i=t.elementType===r?i:fa(r,i),n);case 1:return r=t.type,i=t.pendingProps,As(e,t,r,i=t.elementType===r?i:fa(r,i),n);case 3:e:{if(Cs(t),null===e)throw Error(a(387));r=t.pendingProps,i=(o=t.memoizedState).element,Ra(e,t),La(t,r,null,n);var s=t.memoizedState;if(r=s.element,o.isDehydrated){if(o={element:r,isDehydrated:!1,cache:s.cache,pendingSuspenseBoundaries:s.pendingSuspenseBoundaries,transitions:s.transitions},t.updateQueue.baseState=o,t.memoizedState=o,256&t.flags){t=Ts(e,t,r,n,i=ss(Error(a(423)),t));break e}if(r!==i){t=Ts(e,t,r,n,i=ss(Error(a(424)),t));break e}for(ea=oi(t.stateNode.containerInfo.firstChild),Zi=t,ta=!0,na=null,n=Ka(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(ua(),r===i){t=Hs(e,t,n);break e}ys(e,t,r,n)}t=t.child}return t;case 5:return no(t),null===e&&oa(t),r=t.type,i=t.pendingProps,o=null!==e?e.memoizedProps:null,s=i.children,Zr(r,i)?s=null:null!==o&&Zr(r,o)&&(t.flags|=32),Ms(e,t),ys(e,t,s,n),t.child;case 6:return null===e&&oa(t),null;case 13:return Ls(e,t,n);case 4:return eo(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=Xa(t,null,r,n):ys(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,bs(e,t,r,i=t.elementType===r?i:fa(r,i),n);case 7:return ys(e,t,t.pendingProps,n),t.child;case 8:case 12:return ys(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,o=t.memoizedProps,s=i.value,Mi(pa,r._currentValue),r._currentValue=s,null!==o)if(ir(o.value,s)){if(o.children===i.children&&!Ei.current){t=Hs(e,t,n);break e}}else for(null!==(o=t.child)&&(o.return=t);null!==o;){var l=o.dependencies;if(null!==l){s=o.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===o.tag){(c=Ba(-1,n&-n)).tag=2;var u=o.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}o.lanes|=n,null!==(c=o.alternate)&&(c.lanes|=n),_a(o.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===o.tag)s=o.type===t.type?null:o.child;else if(18===o.tag){if(null===(s=o.return))throw Error(a(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),_a(s,n,t),s=o.sibling}else s=o.child;if(null!==s)s.return=o;else for(s=o;null!==s;){if(s===t){s=null;break}if(null!==(o=s.sibling)){o.return=s.return,s=o;break}s=s.return}o=s}ys(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,xa(t,n),r=r(i=wa(i)),t.flags|=1,ys(e,t,r,n),t.child;case 14:return i=fa(r=t.type,t.pendingProps),_s(e,t,r,i=fa(r.type,i),n);case 15:return xs(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:fa(r,i),Us(e,t),t.tag=1,Ri(r)?(e=!0,Ii(t)):e=!1,xa(t,n),Ua(t,r,i),Ga(t,r,i,n),Es(null,t,r,!0,e,n);case 19:return zs(e,t,n);case 22:return ws(e,t,n)}throw Error(a(156,t.tag))};var Wc="function"==typeof reportError?reportError:function(e){console.error(e)};function Jc(e){this._internalRoot=e}function Xc(e){this._internalRoot=e}function Kc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function $c(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function Yc(){}function qc(e,t,n,r,i){var a=n._reactRootContainer;if(a){var o=a;if("function"==typeof i){var s=i;i=function(){var e=Gc(o);s.call(e)}}Hc(t,o,e,i)}else o=function(e,t,n,r,i){if(i){if("function"==typeof r){var a=r;r=function(){var e=Gc(o);a.call(e)}}var o=Uc(t,r,e,0,null,!1,0,"",Yc);return e._reactRootContainer=o,e[di]=o.current,zr(8===e.nodeType?e.parentNode:e),sc(),o}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var s=r;r=function(){var e=Gc(l);s.call(e)}}var l=Fc(e,0,!1,null,0,!1,0,"",Yc);return e._reactRootContainer=l,e[di]=l.current,zr(8===e.nodeType?e.parentNode:e),sc((function(){Hc(t,l,n,r)})),l}(n,t,e,i,r);return Gc(o)}Xc.prototype.render=Jc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Hc(e,t,null,null)},Xc.prototype.unmount=Jc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;sc((function(){Hc(null,e,null,null)})),t[di]=null}},Xc.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<It.length&&0!==t&&t<It[n].priority;n++);It.splice(n,0,e),0===n&&Ft(e)}},xt=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=dt(t.pendingLanes);0!==n&&(yt(t,1|n),ec(t,qe()),0==(6&Al)&&(zl=qe()+500,zi()))}break;case 13:sc((function(){var t=Ea(e,1);if(null!==t){var n=ql();Zl(t,e,1,n)}})),jc(e,1)}},wt=function(e){if(13===e.tag){var t=Ea(e,134217728);null!==t&&Zl(t,e,134217728,ql()),jc(e,134217728)}},Mt=function(e){if(13===e.tag){var t=Ql(e),n=Ea(e,t);null!==n&&Zl(n,e,t,ql()),jc(e,t)}},St=function(){return bt},At=function(e,t){var n=bt;try{return bt=e,t()}finally{bt=n}},we=function(e,t,n){switch(t){case"input":if(Q(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=yi(r);if(!i)throw Error(a(90));X(r),Q(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=oc,Re=sc;var Qc={usingClientEntryPoint:!1,Events:[gi,vi,yi,Ee,Ce,oc]},Zc={findFiberByHostInstance:mi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},eu={bundleType:Zc.bundleType,version:Zc.version,rendererPackageName:Zc.rendererPackageName,rendererConfig:Zc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:_.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=We(e))?null:e.stateNode},findFiberByHostInstance:Zc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var tu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!tu.isDisabled&&tu.supportsFiber)try{it=tu.inject(eu),at=tu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=Qc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Kc(t))throw Error(a(200));return Nc(e,t,null,n)},t.createRoot=function(e,t){if(!Kc(e))throw Error(a(299));var n=!1,r="",i=Wc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Fc(e,1,!1,null,0,n,0,r,i),e[di]=t.current,zr(8===e.nodeType?e.parentNode:e),new Jc(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return null===(e=We(t))?null:e.stateNode},t.flushSync=function(e){return sc(e)},t.hydrate=function(e,t,n){if(!$c(t))throw Error(a(200));return qc(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Kc(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,o="",s=Wc;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(o=n.identifierPrefix),void 0!==n.onRecoverableError&&(s=n.onRecoverableError)),t=Uc(t,null,e,1,null!=n?n:null,i,0,o,s),e[di]=t.current,zr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new Xc(t)},t.render=function(e,t,n){if(!$c(t))throw Error(a(200));return qc(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!$c(e))throw Error(a(40));return!!e._reactRootContainer&&(sc((function(){qc(null,null,e,!1,(function(){e._reactRootContainer=null,e[di]=null}))})),!0)},t.unstable_batchedUpdates=oc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!$c(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return qc(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},745:(e,t,n)=>{"use strict";var r=n(3935);t.s=r.createRoot,r.hydrateRoot},3935:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(4448)},5878:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r=function(e){return function(t){e.forEach((function(e){"function"==typeof e?e(t):null!=e&&(e.current=t)}))}}},6511:(e,t)=>{"use strict";t.ConcurrentRoot=1,t.ContinuousEventPriority=4,t.DefaultEventPriority=16,t.DiscreteEventPriority=1},7287:(e,t,n)=>{e.exports=function(e){var t={},r=n(7294),i=n(373),a=Object.assign;function o(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),d=Symbol.for("react.strict_mode"),h=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),b=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var _=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var x=Symbol.iterator;function w(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=x&&e[x]||e["@@iterator"])?e:null}function M(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case u:return"Fragment";case c:return"Portal";case h:return"Profiler";case d:return"StrictMode";case g:return"Suspense";case v:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case p:return(e.displayName||"Context")+".Consumer";case f:return(e._context.displayName||"Context")+".Provider";case m:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case y:return null!==(t=e.displayName||null)?t:M(e.type)||"Memo";case b:t=e._payload,e=e._init;try{return M(e(t))}catch(e){}}return null}function S(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return M(t);case 8:return t===d?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function A(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function E(e){if(A(e)!==e)throw Error(o(188))}function C(e){var t=e.alternate;if(!t){if(null===(t=A(e)))throw Error(o(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return E(i),e;if(a===r)return E(i),t;a=a.sibling}throw Error(o(188))}if(n.return!==r.return)n=i,r=a;else{for(var s=!1,l=i.child;l;){if(l===n){s=!0,n=i,r=a;break}if(l===r){s=!0,r=i,n=a;break}l=l.sibling}if(!s){for(l=a.child;l;){if(l===n){s=!0,n=a,r=i;break}if(l===r){s=!0,r=a,n=i;break}l=l.sibling}if(!s)throw Error(o(189))}}if(n.alternate!==r)throw Error(o(190))}if(3!==n.tag)throw Error(o(188));return n.stateNode.current===n?e:t}function T(e){return null!==(e=C(e))?R(e):null}function R(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=R(e);if(null!==t)return t;e=e.sibling}return null}function B(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){if(4!==e.tag){var t=B(e);if(null!==t)return t}e=e.sibling}return null}var P,k=Array.isArray,I=e.getPublicInstance,L=e.getRootHostContext,D=e.getChildHostContext,O=e.prepareForCommit,F=e.resetAfterCommit,N=e.createInstance,z=e.appendInitialChild,U=e.finalizeInitialChildren,H=e.prepareUpdate,G=e.shouldSetTextContent,V=e.createTextInstance,j=e.scheduleTimeout,W=e.cancelTimeout,J=e.noTimeout,X=e.isPrimaryRenderer,K=e.supportsMutation,$=e.supportsPersistence,Y=e.supportsHydration,q=e.getInstanceFromNode,Q=e.preparePortalMount,Z=e.getCurrentEventPriority,ee=e.detachDeletedInstance,te=e.supportsMicrotasks,ne=e.scheduleMicrotask,re=e.supportsTestSelectors,ie=e.findFiberRoot,ae=e.getBoundingRect,oe=e.getTextContent,se=e.isHiddenSubtree,le=e.matchAccessibilityRole,ce=e.setFocusIfFocusable,ue=e.setupIntersectionObserver,de=e.appendChild,he=e.appendChildToContainer,fe=e.commitTextUpdate,pe=e.commitMount,me=e.commitUpdate,ge=e.insertBefore,ve=e.insertInContainerBefore,ye=e.removeChild,be=e.removeChildFromContainer,_e=e.resetTextContent,xe=e.hideInstance,we=e.hideTextInstance,Me=e.unhideInstance,Se=e.unhideTextInstance,Ae=e.clearContainer,Ee=e.cloneInstance,Ce=e.createContainerChildSet,Te=e.appendChildToContainerChildSet,Re=e.finalizeContainerChildren,Be=e.replaceContainerChildren,Pe=e.cloneHiddenInstance,ke=e.cloneHiddenTextInstance,Ie=e.canHydrateInstance,Le=e.canHydrateTextInstance,De=e.canHydrateSuspenseInstance,Oe=e.isSuspenseInstancePending,Fe=e.isSuspenseInstanceFallback,Ne=e.registerSuspenseInstanceRetry,ze=e.getNextHydratableSibling,Ue=e.getFirstHydratableChild,He=e.getFirstHydratableChildWithinContainer,Ge=e.getFirstHydratableChildWithinSuspenseInstance,Ve=e.hydrateInstance,je=e.hydrateTextInstance,We=e.hydrateSuspenseInstance,Je=e.getNextHydratableInstanceAfterSuspenseInstance,Xe=e.commitHydratedContainer,Ke=e.commitHydratedSuspenseInstance,$e=e.clearSuspenseBoundary,Ye=e.clearSuspenseBoundaryFromContainer,qe=e.shouldDeleteUnhydratedTailInstances,Qe=e.didNotMatchHydratedContainerTextInstance,Ze=e.didNotMatchHydratedTextInstance;function et(e){if(void 0===P)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);P=t&&t[1]||""}return"\n"+P+e}var tt=!1;function nt(e,t){if(!e||tt)return"";tt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),a=r.stack.split("\n"),o=i.length-1,s=a.length-1;1<=o&&0<=s&&i[o]!==a[s];)s--;for(;1<=o&&0<=s;o--,s--)if(i[o]!==a[s]){if(1!==o||1!==s)do{if(o--,0>--s||i[o]!==a[s]){var l="\n"+i[o].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=o&&0<=s);break}}}finally{tt=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?et(e):""}var rt=Object.prototype.hasOwnProperty,it=[],at=-1;function ot(e){return{current:e}}function st(e){0>at||(e.current=it[at],it[at]=null,at--)}function lt(e,t){at++,it[at]=e.current,e.current=t}var ct={},ut=ot(ct),dt=ot(!1),ht=ct;function ft(e,t){var n=e.type.contextTypes;if(!n)return ct;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function pt(e){return null!=e.childContextTypes}function mt(){st(dt),st(ut)}function gt(e,t,n){if(ut.current!==ct)throw Error(o(168));lt(ut,t),lt(dt,n)}function vt(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(o(108,S(e)||"Unknown",i));return a({},n,r)}function yt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ct,ht=ut.current,lt(ut,e),lt(dt,dt.current),!0}function bt(e,t,n){var r=e.stateNode;if(!r)throw Error(o(169));n?(e=vt(e,t,ht),r.__reactInternalMemoizedMergedChildContext=e,st(dt),st(ut),lt(ut,e)):st(dt),lt(dt,n)}var _t=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(xt(e)/wt|0)|0},xt=Math.log,wt=Math.LN2,Mt=64,St=4194304;function At(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Et(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,o=268435455&n;if(0!==o){var s=o&~i;0!==s?r=At(s):0!=(a&=o)&&(r=At(a))}else 0!=(o=n&~i)?r=At(o):0!==a&&(r=At(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!=(4194240&a)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-_t(t)),r|=e[n],t&=~i;return r}function Ct(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Tt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Rt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Bt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-_t(t)]=n}function Pt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-_t(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var kt=0;function It(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var Lt=i.unstable_scheduleCallback,Dt=i.unstable_cancelCallback,Ot=i.unstable_shouldYield,Ft=i.unstable_requestPaint,Nt=i.unstable_now,zt=i.unstable_ImmediatePriority,Ut=i.unstable_UserBlockingPriority,Ht=i.unstable_NormalPriority,Gt=i.unstable_IdlePriority,Vt=null,jt=null,Wt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Jt=null,Xt=!1,Kt=!1;function $t(e){null===Jt?Jt=[e]:Jt.push(e)}function Yt(){if(!Kt&&null!==Jt){Kt=!0;var e=0,t=kt;try{var n=Jt;for(kt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Jt=null,Xt=!1}catch(t){throw null!==Jt&&(Jt=Jt.slice(e+1)),Lt(zt,Yt),t}finally{kt=t,Kt=!1}}return null}var qt=s.ReactCurrentBatchConfig;function Qt(e,t){if(Wt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!rt.call(t,i)||!Wt(e[i],t[i]))return!1}return!0}function Zt(e){switch(e.tag){case 5:return et(e.type);case 16:return et("Lazy");case 13:return et("Suspense");case 19:return et("SuspenseList");case 0:case 2:case 15:return nt(e.type,!1);case 11:return nt(e.type.render,!1);case 1:return nt(e.type,!0);default:return""}}function en(e,t){if(e&&e.defaultProps){for(var n in t=a({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var tn=ot(null),nn=null,rn=null,an=null;function on(){an=rn=nn=null}function sn(e,t,n){X?(lt(tn,t._currentValue),t._currentValue=n):(lt(tn,t._currentValue2),t._currentValue2=n)}function ln(e){var t=tn.current;st(tn),X?e._currentValue=t:e._currentValue2=t}function cn(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function un(e,t){nn=e,an=rn=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Oi=!0),e.firstContext=null)}function dn(e){var t=X?e._currentValue:e._currentValue2;if(an!==e)if(e={context:e,memoizedValue:t,next:null},null===rn){if(null===nn)throw Error(o(308));rn=e,nn.dependencies={lanes:0,firstContext:e}}else rn=rn.next=e;return t}var hn=null,fn=!1;function pn(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mn(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function gn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function vn(e,t){var n=e.updateQueue;null!==n&&(n=n.shared,null!==Ka&&0!=(1&e.mode)&&0==(2&Xa)?(null===(e=n.interleaved)?(t.next=t,null===hn?hn=[n]:hn.push(n)):(t.next=e.next,e.next=t),n.interleaved=t):(null===(e=n.pending)?t.next=t:(t.next=e.next,e.next=t),n.pending=t))}function yn(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Pt(e,n)}}function bn(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var o={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=o:a=a.next=o,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function _n(e,t,n,r){var i=e.updateQueue;fn=!1;var o=i.firstBaseUpdate,s=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var c=l,u=c.next;c.next=null,null===s?o=u:s.next=u,s=c;var d=e.alternate;null!==d&&(l=(d=d.updateQueue).lastBaseUpdate)!==s&&(null===l?d.firstBaseUpdate=u:l.next=u,d.lastBaseUpdate=c)}if(null!==o){var h=i.baseState;for(s=0,d=u=c=null,l=o;;){var f=l.lane,p=l.eventTime;if((r&f)===f){null!==d&&(d=d.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,g=l;switch(f=t,p=n,g.tag){case 1:if("function"==typeof(m=g.payload)){h=m.call(p,h,f);break e}h=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(f="function"==typeof(m=g.payload)?m.call(p,h,f):m))break e;h=a({},h,f);break e;case 2:fn=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===d?(u=d=p,c=h):d=d.next=p,s|=f;if(null===(l=l.next)){if(null===(l=i.shared.pending))break;l=(f=l).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===d&&(c=h),i.baseState=c,i.firstBaseUpdate=u,i.lastBaseUpdate=d,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===o&&(i.shared.lanes=0);to|=s,e.lanes=s,e.memoizedState=h}}function xn(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(o(191,i));i.call(r)}}}var wn=(new r.Component).refs;function Mn(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:a({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Sn={isMounted:function(e){return!!(e=e._reactInternals)&&A(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=xo(),i=wo(e),a=gn(r,i);a.payload=t,null!=n&&(a.callback=n),vn(e,a),null!==(t=Mo(e,i,r))&&yn(t,e,i)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=xo(),i=wo(e),a=gn(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),vn(e,a),null!==(t=Mo(e,i,r))&&yn(t,e,i)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=xo(),r=wo(e),i=gn(n,r);i.tag=2,null!=t&&(i.callback=t),vn(e,i),null!==(t=Mo(e,r,n))&&yn(t,e,r)}};function An(e,t,n,r,i,a,o){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,o):!(t.prototype&&t.prototype.isPureReactComponent&&Qt(n,r)&&Qt(i,a))}function En(e,t,n){var r=!1,i=ct,a=t.contextType;return"object"==typeof a&&null!==a?a=dn(a):(i=pt(t)?ht:ut.current,a=(r=null!=(r=t.contextTypes))?ft(e,i):ct),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Sn,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Cn(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Sn.enqueueReplaceState(t,t.state,null)}function Tn(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=wn,pn(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=dn(a):(a=pt(t)?ht:ut.current,i.context=ft(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Mn(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Sn.enqueueReplaceState(i,i.state,null),_n(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}var Rn=[],Bn=0,Pn=null,kn=0,In=[],Ln=0,Dn=null,On=1,Fn="";function Nn(e,t){Rn[Bn++]=kn,Rn[Bn++]=Pn,Pn=e,kn=t}function zn(e,t,n){In[Ln++]=On,In[Ln++]=Fn,In[Ln++]=Dn,Dn=e;var r=On;e=Fn;var i=32-_t(r)-1;r&=~(1<<i),n+=1;var a=32-_t(t)+i;if(30<a){var o=i-i%5;a=(r&(1<<o)-1).toString(32),r>>=o,i-=o,On=1<<32-_t(t)+i|n<<i|r,Fn=a+e}else On=1<<a|n<<i|r,Fn=e}function Un(e){null!==e.return&&(Nn(e,1),zn(e,1,0))}function Hn(e){for(;e===Pn;)Pn=Rn[--Bn],Rn[Bn]=null,kn=Rn[--Bn],Rn[Bn]=null;for(;e===Dn;)Dn=In[--Ln],In[Ln]=null,Fn=In[--Ln],In[Ln]=null,On=In[--Ln],In[Ln]=null}var Gn=null,Vn=null,jn=!1,Wn=!1,Jn=null;function Xn(e,t){var n=Qo(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Kn(e,t){switch(e.tag){case 5:return null!==(t=Ie(t,e.type,e.pendingProps))&&(e.stateNode=t,Gn=e,Vn=Ue(t),!0);case 6:return null!==(t=Le(t,e.pendingProps))&&(e.stateNode=t,Gn=e,Vn=null,!0);case 13:if(null!==(t=De(t))){var n=null!==Dn?{id:On,overflow:Fn}:null;return e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Qo(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Gn=e,Vn=null,!0}return!1;default:return!1}}function $n(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function Yn(e){if(jn){var t=Vn;if(t){var n=t;if(!Kn(e,t)){if($n(e))throw Error(o(418));t=ze(n);var r=Gn;t&&Kn(e,t)?Xn(r,n):(e.flags=-4097&e.flags|2,jn=!1,Gn=e)}}else{if($n(e))throw Error(o(418));e.flags=-4097&e.flags|2,jn=!1,Gn=e}}}function qn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Gn=e}function Qn(e){if(!Y||e!==Gn)return!1;if(!jn)return qn(e),jn=!0,!1;if(3!==e.tag&&(5!==e.tag||qe(e.type)&&!G(e.type,e.memoizedProps))){var t=Vn;if(t){if($n(e)){for(e=Vn;e;)e=ze(e);throw Error(o(418))}for(;t;)Xn(e,t),t=ze(t)}}if(qn(e),13===e.tag){if(!Y)throw Error(o(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(o(317));Vn=Je(e)}else Vn=Gn?ze(e.stateNode):null;return!0}function Zn(){Y&&(Vn=Gn=null,Wn=jn=!1)}function er(e){null===Jn?Jn=[e]:Jn.push(e)}function tr(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(o(309));var r=n.stateNode}if(!r)throw Error(o(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;t===wn&&(t=i.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(o(284));if(!n._owner)throw Error(o(290,e))}return e}function nr(e,t){throw e=Object.prototype.toString.call(t),Error(o(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function rr(e){return(0,e._init)(e._payload)}function ir(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=es(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function s(t){return e&&null===t.alternate&&(t.flags|=2),t}function d(e,t,n,r){return null===t||6!==t.tag?((t=is(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function h(e,t,n,r){var a=n.type;return a===u?p(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===b&&rr(a)===t.type)?((r=i(t,n.props)).ref=tr(e,t,n),r.return=e,r):((r=ts(n.type,n.key,n.props,null,e.mode,r)).ref=tr(e,t,n),r.return=e,r)}function f(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=as(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function p(e,t,n,r,a){return null===t||7!==t.tag?((t=ns(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function m(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=is(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case l:return(n=ts(t.type,t.key,t.props,null,e.mode,n)).ref=tr(e,null,t),n.return=e,n;case c:return(t=as(t,e.mode,n)).return=e,t;case b:return m(e,(0,t._init)(t._payload),n)}if(k(t)||w(t))return(t=ns(t,e.mode,n,null)).return=e,t;nr(e,t)}return null}function g(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:d(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case l:return n.key===i?h(e,t,n,r):null;case c:return n.key===i?f(e,t,n,r):null;case b:return g(e,t,(i=n._init)(n._payload),r)}if(k(n)||w(n))return null!==i?null:p(e,t,n,r,null);nr(e,n)}return null}function v(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return d(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case l:return h(t,e=e.get(null===r.key?n:r.key)||null,r,i);case c:return f(t,e=e.get(null===r.key?n:r.key)||null,r,i);case b:return v(e,t,n,(0,r._init)(r._payload),i)}if(k(r)||w(r))return p(t,e=e.get(n)||null,r,i,null);nr(t,r)}return null}function y(i,o,s,l){for(var c=null,u=null,d=o,h=o=0,f=null;null!==d&&h<s.length;h++){d.index>h?(f=d,d=null):f=d.sibling;var p=g(i,d,s[h],l);if(null===p){null===d&&(d=f);break}e&&d&&null===p.alternate&&t(i,d),o=a(p,o,h),null===u?c=p:u.sibling=p,u=p,d=f}if(h===s.length)return n(i,d),jn&&Nn(i,h),c;if(null===d){for(;h<s.length;h++)null!==(d=m(i,s[h],l))&&(o=a(d,o,h),null===u?c=d:u.sibling=d,u=d);return jn&&Nn(i,h),c}for(d=r(i,d);h<s.length;h++)null!==(f=v(d,i,h,s[h],l))&&(e&&null!==f.alternate&&d.delete(null===f.key?h:f.key),o=a(f,o,h),null===u?c=f:u.sibling=f,u=f);return e&&d.forEach((function(e){return t(i,e)})),jn&&Nn(i,h),c}function _(i,s,l,c){var u=w(l);if("function"!=typeof u)throw Error(o(150));if(null==(l=u.call(l)))throw Error(o(151));for(var d=u=null,h=s,f=s=0,p=null,y=l.next();null!==h&&!y.done;f++,y=l.next()){h.index>f?(p=h,h=null):p=h.sibling;var b=g(i,h,y.value,c);if(null===b){null===h&&(h=p);break}e&&h&&null===b.alternate&&t(i,h),s=a(b,s,f),null===d?u=b:d.sibling=b,d=b,h=p}if(y.done)return n(i,h),jn&&Nn(i,f),u;if(null===h){for(;!y.done;f++,y=l.next())null!==(y=m(i,y.value,c))&&(s=a(y,s,f),null===d?u=y:d.sibling=y,d=y);return jn&&Nn(i,f),u}for(h=r(i,h);!y.done;f++,y=l.next())null!==(y=v(h,i,f,y.value,c))&&(e&&null!==y.alternate&&h.delete(null===y.key?f:y.key),s=a(y,s,f),null===d?u=y:d.sibling=y,d=y);return e&&h.forEach((function(e){return t(i,e)})),jn&&Nn(i,f),u}return function e(r,a,o,d){if("object"==typeof o&&null!==o&&o.type===u&&null===o.key&&(o=o.props.children),"object"==typeof o&&null!==o){switch(o.$$typeof){case l:e:{for(var h=o.key,f=a;null!==f;){if(f.key===h){if((h=o.type)===u){if(7===f.tag){n(r,f.sibling),(a=i(f,o.props.children)).return=r,r=a;break e}}else if(f.elementType===h||"object"==typeof h&&null!==h&&h.$$typeof===b&&rr(h)===f.type){n(r,f.sibling),(a=i(f,o.props)).ref=tr(r,f,o),a.return=r,r=a;break e}n(r,f);break}t(r,f),f=f.sibling}o.type===u?((a=ns(o.props.children,r.mode,d,o.key)).return=r,r=a):((d=ts(o.type,o.key,o.props,null,r.mode,d)).ref=tr(r,a,o),d.return=r,r=d)}return s(r);case c:e:{for(f=o.key;null!==a;){if(a.key===f){if(4===a.tag&&a.stateNode.containerInfo===o.containerInfo&&a.stateNode.implementation===o.implementation){n(r,a.sibling),(a=i(a,o.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=as(o,r.mode,d)).return=r,r=a}return s(r);case b:return e(r,a,(f=o._init)(o._payload),d)}if(k(o))return y(r,a,o,d);if(w(o))return _(r,a,o,d);nr(r,o)}return"string"==typeof o&&""!==o||"number"==typeof o?(o=""+o,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,o)).return=r,r=a):(n(r,a),(a=is(o,r.mode,d)).return=r,r=a),s(r)):n(r,a)}}var ar=ir(!0),or=ir(!1),sr={},lr=ot(sr),cr=ot(sr),ur=ot(sr);function dr(e){if(e===sr)throw Error(o(174));return e}function hr(e,t){lt(ur,t),lt(cr,e),lt(lr,sr),e=L(t),st(lr),lt(lr,e)}function fr(){st(lr),st(cr),st(ur)}function pr(e){var t=dr(ur.current),n=dr(lr.current);n!==(t=D(n,e.type,t))&&(lt(cr,e),lt(lr,t))}function mr(e){cr.current===e&&(st(lr),st(cr))}var gr=ot(0);function vr(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Oe(n)||Fe(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yr=[];function br(){for(var e=0;e<yr.length;e++){var t=yr[e];X?t._workInProgressVersionPrimary=null:t._workInProgressVersionSecondary=null}yr.length=0}var _r=s.ReactCurrentDispatcher,xr=s.ReactCurrentBatchConfig,wr=0,Mr=null,Sr=null,Ar=null,Er=!1,Cr=!1,Tr=0,Rr=0;function Br(){throw Error(o(321))}function Pr(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!Wt(e[n],t[n]))return!1;return!0}function kr(e,t,n,r,i,a){if(wr=a,Mr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_r.current=null===e||null===e.memoizedState?pi:mi,e=n(r,i),Cr){a=0;do{if(Cr=!1,Tr=0,25<=a)throw Error(o(301));a+=1,Ar=Sr=null,t.updateQueue=null,_r.current=gi,e=n(r,i)}while(Cr)}if(_r.current=fi,t=null!==Sr&&null!==Sr.next,wr=0,Ar=Sr=Mr=null,Er=!1,t)throw Error(o(300));return e}function Ir(){var e=0!==Tr;return Tr=0,e}function Lr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ar?Mr.memoizedState=Ar=e:Ar=Ar.next=e,Ar}function Dr(){if(null===Sr){var e=Mr.alternate;e=null!==e?e.memoizedState:null}else e=Sr.next;var t=null===Ar?Mr.memoizedState:Ar.next;if(null!==t)Ar=t,Sr=e;else{if(null===e)throw Error(o(310));e={memoizedState:(Sr=e).memoizedState,baseState:Sr.baseState,baseQueue:Sr.baseQueue,queue:Sr.queue,next:null},null===Ar?Mr.memoizedState=Ar=e:Ar=Ar.next=e}return Ar}function Or(e,t){return"function"==typeof t?t(e):t}function Fr(e){var t=Dr(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=Sr,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var s=i.next;i.next=a.next,a.next=s}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=s=null,c=null,u=a;do{var d=u.lane;if((wr&d)===d)null!==c&&(c=c.next={lane:0,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null}),r=u.hasEagerState?u.eagerState:e(r,u.action);else{var h={lane:d,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=h,s=r):c=c.next=h,Mr.lanes|=d,to|=d}u=u.next}while(null!==u&&u!==a);null===c?s=r:c.next=l,Wt(r,t.memoizedState)||(Oi=!0),t.memoizedState=r,t.baseState=s,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,Mr.lanes|=a,to|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Nr(e){var t=Dr(),n=t.queue;if(null===n)throw Error(o(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var s=i=i.next;do{a=e(a,s.action),s=s.next}while(s!==i);Wt(a,t.memoizedState)||(Oi=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function zr(){}function Ur(e,t){var n=Mr,r=Dr(),i=t(),a=!Wt(r.memoizedState,i);if(a&&(r.memoizedState=i,Oi=!0),r=r.queue,qr(Vr.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==Ar&&1&Ar.memoizedState.tag){if(n.flags|=2048,Jr(9,Gr.bind(null,n,r,i,t),void 0,null),null===Ka)throw Error(o(349));0!=(30&wr)||Hr(n,t,i)}return i}function Hr(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Mr.updateQueue)?(t={lastEffect:null,stores:null},Mr.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Gr(e,t,n,r){t.value=n,t.getSnapshot=r,jr(t)&&Mo(e,1,-1)}function Vr(e,t,n){return n((function(){jr(t)&&Mo(e,1,-1)}))}function jr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!Wt(e,n)}catch(e){return!0}}function Wr(e){var t=Lr();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Or,lastRenderedState:e},t.queue=e,e=e.dispatch=li.bind(null,Mr,e),[t.memoizedState,e]}function Jr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Mr.updateQueue)?(t={lastEffect:null,stores:null},Mr.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Xr(){return Dr().memoizedState}function Kr(e,t,n,r){var i=Lr();Mr.flags|=e,i.memoizedState=Jr(1|t,n,void 0,void 0===r?null:r)}function $r(e,t,n,r){var i=Dr();r=void 0===r?null:r;var a=void 0;if(null!==Sr){var o=Sr.memoizedState;if(a=o.destroy,null!==r&&Pr(r,o.deps))return void(i.memoizedState=Jr(t,n,a,r))}Mr.flags|=e,i.memoizedState=Jr(1|t,n,a,r)}function Yr(e,t){return Kr(8390656,8,e,t)}function qr(e,t){return $r(2048,8,e,t)}function Qr(e,t){return $r(4,2,e,t)}function Zr(e,t){return $r(4,4,e,t)}function ei(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ti(e,t,n){return n=null!=n?n.concat([e]):null,$r(4,4,ei.bind(null,t,e),n)}function ni(){}function ri(e,t){var n=Dr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Pr(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ii(e,t){var n=Dr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Pr(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ai(e,t){var n=kt;kt=0!==n&&4>n?n:4,e(!0);var r=xr.transition;xr.transition={};try{e(!1),t()}finally{kt=n,xr.transition=r}}function oi(){return Dr().memoizedState}function si(e,t,n){var r=wo(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ci(e)?ui(t,n):(di(e,t,n),null!==(e=Mo(e,r,n=xo()))&&hi(e,t,r))}function li(e,t,n){var r=wo(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ci(e))ui(t,i);else{di(e,t,i);var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var o=t.lastRenderedState,s=a(o,n);if(i.hasEagerState=!0,i.eagerState=s,Wt(s,o))return}catch(e){}null!==(e=Mo(e,r,n=xo()))&&hi(e,t,r)}}function ci(e){var t=e.alternate;return e===Mr||null!==t&&t===Mr}function ui(e,t){Cr=Er=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function di(e,t,n){null!==Ka&&0!=(1&e.mode)&&0==(2&Xa)?(null===(e=t.interleaved)?(n.next=n,null===hn?hn=[t]:hn.push(t)):(n.next=e.next,e.next=n),t.interleaved=n):(null===(e=t.pending)?n.next=n:(n.next=e.next,e.next=n),t.pending=n)}function hi(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Pt(e,n)}}var fi={readContext:dn,useCallback:Br,useContext:Br,useEffect:Br,useImperativeHandle:Br,useInsertionEffect:Br,useLayoutEffect:Br,useMemo:Br,useReducer:Br,useRef:Br,useState:Br,useDebugValue:Br,useDeferredValue:Br,useTransition:Br,useMutableSource:Br,useSyncExternalStore:Br,useId:Br,unstable_isNewReconciler:!1},pi={readContext:dn,useCallback:function(e,t){return Lr().memoizedState=[e,void 0===t?null:t],e},useContext:dn,useEffect:Yr,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Kr(4194308,4,ei.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Kr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Kr(4,2,e,t)},useMemo:function(e,t){var n=Lr();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Lr();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=si.bind(null,Mr,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Lr().memoizedState=e},useState:Wr,useDebugValue:ni,useDeferredValue:function(e){var t=Wr(e),n=t[0],r=t[1];return Yr((function(){var t=xr.transition;xr.transition={};try{r(e)}finally{xr.transition=t}}),[e]),n},useTransition:function(){var e=Wr(!1),t=e[0];return e=ai.bind(null,e[1]),Lr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Mr,i=Lr();if(jn){if(void 0===n)throw Error(o(407));n=n()}else{if(n=t(),null===Ka)throw Error(o(349));0!=(30&wr)||Hr(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,Yr(Vr.bind(null,r,a,e),[e]),r.flags|=2048,Jr(9,Gr.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Lr(),t=Ka.identifierPrefix;if(jn){var n=Fn;t=":"+t+"R"+(n=(On&~(1<<32-_t(On)-1)).toString(32)+n),0<(n=Tr++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Rr++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},mi={readContext:dn,useCallback:ri,useContext:dn,useEffect:qr,useImperativeHandle:ti,useInsertionEffect:Qr,useLayoutEffect:Zr,useMemo:ii,useReducer:Fr,useRef:Xr,useState:function(){return Fr(Or)},useDebugValue:ni,useDeferredValue:function(e){var t=Fr(Or),n=t[0],r=t[1];return qr((function(){var t=xr.transition;xr.transition={};try{r(e)}finally{xr.transition=t}}),[e]),n},useTransition:function(){return[Fr(Or)[0],Dr().memoizedState]},useMutableSource:zr,useSyncExternalStore:Ur,useId:oi,unstable_isNewReconciler:!1},gi={readContext:dn,useCallback:ri,useContext:dn,useEffect:qr,useImperativeHandle:ti,useInsertionEffect:Qr,useLayoutEffect:Zr,useMemo:ii,useReducer:Nr,useRef:Xr,useState:function(){return Nr(Or)},useDebugValue:ni,useDeferredValue:function(e){var t=Nr(Or),n=t[0],r=t[1];return qr((function(){var t=xr.transition;xr.transition={};try{r(e)}finally{xr.transition=t}}),[e]),n},useTransition:function(){return[Nr(Or)[0],Dr().memoizedState]},useMutableSource:zr,useSyncExternalStore:Ur,useId:oi,unstable_isNewReconciler:!1};function vi(e,t){try{var n="",r=t;do{n+=Zt(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function yi(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var bi,_i,xi,wi,Mi="function"==typeof WeakMap?WeakMap:Map;function Si(e,t,n){(n=gn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){uo||(uo=!0,ho=r),yi(0,t)},n}function Ai(e,t,n){(n=gn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){yi(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){yi(0,t),"function"!=typeof r&&(null===fo?fo=new Set([this]):fo.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Ei(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Mi;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Jo.bind(null,e,t,n),t.then(e,e))}function Ci(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Ti(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=gn(-1,1)).tag=2,vn(n,t))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}function Ri(e){e.flags|=4}function Bi(e,t){if(null!==e&&e.child===t.child)return!0;if(0!=(16&t.flags))return!1;for(e=t.child;null!==e;){if(0!=(12854&e.flags)||0!=(12854&e.subtreeFlags))return!1;e=e.sibling}return!0}if(K)bi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)z(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},_i=function(){},xi=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var a=t.stateNode,o=dr(lr.current);n=H(a,n,e,r,i,o),(t.updateQueue=n)&&Ri(t)}},wi=function(e,t,n,r){n!==r&&Ri(t)};else if($){bi=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=Pe(a,i.type,i.memoizedProps,i)),z(e,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=ke(a,i.memoizedProps,i)),z(e,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),bi(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var Pi=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=Pe(a,i.type,i.memoizedProps,i)),Te(e,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=ke(a,i.memoizedProps,i)),Te(e,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),Pi(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};_i=function(e,t){var n=t.stateNode;if(!Bi(e,t)){e=n.containerInfo;var r=Ce(e);Pi(r,t,!1,!1),n.pendingChildren=r,Ri(t),Re(e,r)}},xi=function(e,t,n,r,i){var a=e.stateNode,o=e.memoizedProps;if((e=Bi(e,t))&&o===r)t.stateNode=a;else{var s=t.stateNode,l=dr(lr.current),c=null;o!==r&&(c=H(s,n,o,r,i,l)),e&&null===c?t.stateNode=a:(a=Ee(a,c,n,o,r,t,e,s),U(a,n,r,i,l)&&Ri(t),t.stateNode=a,e?Ri(t):bi(a,t,!1,!1))}},wi=function(e,t,n,r){n!==r?(e=dr(ur.current),n=dr(lr.current),t.stateNode=V(r,e,n,t),Ri(t)):t.stateNode=e.stateNode}}else _i=function(){},xi=function(){},wi=function(){};function ki(e,t){if(!jn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Ii(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Li(e,t,n){var r=t.pendingProps;switch(Hn(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Ii(t),null;case 1:case 17:return pt(t.type)&&mt(),Ii(t),null;case 3:return r=t.stateNode,fr(),st(dt),st(ut),br(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Qn(t)?Ri(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==Jn&&(To(Jn),Jn=null))),_i(e,t),Ii(t),null;case 5:mr(t),n=dr(ur.current);var i=t.type;if(null!==e&&null!=t.stateNode)xi(e,t,i,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(o(166));return Ii(t),null}if(e=dr(lr.current),Qn(t)){if(!Y)throw Error(o(175));e=Ve(t.stateNode,t.type,t.memoizedProps,n,e,t,!Wn),t.updateQueue=e,null!==e&&Ri(t)}else{var a=N(i,r,n,e,t);bi(a,t,!1,!1),t.stateNode=a,U(a,i,r,n,e)&&Ri(t)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Ii(t),null;case 6:if(e&&null!=t.stateNode)wi(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(o(166));if(e=dr(ur.current),n=dr(lr.current),Qn(t)){if(!Y)throw Error(o(176));if(e=t.stateNode,r=t.memoizedProps,(n=je(e,r,t,!Wn))&&null!==(i=Gn))switch(a=0!=(1&i.mode),i.tag){case 3:Qe(i.stateNode.containerInfo,e,r,a);break;case 5:Ze(i.type,i.memoizedProps,i.stateNode,e,r,a)}n&&Ri(t)}else t.stateNode=V(r,e,n,t)}return Ii(t),null;case 13:if(st(gr),r=t.memoizedState,jn&&null!==Vn&&0!=(1&t.mode)&&0==(128&t.flags)){for(e=Vn;e;)e=ze(e);return Zn(),t.flags|=98560,t}if(null!==r&&null!==r.dehydrated){if(r=Qn(t),null===e){if(!r)throw Error(o(318));if(!Y)throw Error(o(344));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(o(317));We(e,t)}else Zn(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;return Ii(t),null}return null!==Jn&&(To(Jn),Jn=null),0!=(128&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?Qn(t):n=null!==e.memoizedState,r&&!n&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&gr.current)?0===Za&&(Za=3):Oo())),null!==t.updateQueue&&(t.flags|=4),Ii(t),null);case 4:return fr(),_i(e,t),null===e&&Q(t.stateNode.containerInfo),Ii(t),null;case 10:return ln(t.type._context),Ii(t),null;case 19:if(st(gr),null===(i=t.memoizedState))return Ii(t),null;if(r=0!=(128&t.flags),null===(a=i.rendering))if(r)ki(i,!1);else{if(0!==Za||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=vr(e))){for(t.flags|=128,ki(i,!1),null!==(e=a.updateQueue)&&(t.updateQueue=e,t.flags|=4),t.subtreeFlags=0,e=n,r=t.child;null!==r;)i=e,(n=r).flags&=14680066,null===(a=n.alternate)?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,i=a.dependencies,n.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext}),r=r.sibling;return lt(gr,1&gr.current|2),t.child}e=e.sibling}null!==i.tail&&Nt()>so&&(t.flags|=128,r=!0,ki(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=vr(a))){if(t.flags|=128,r=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),ki(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!jn)return Ii(t),null}else 2*Nt()-i.renderingStartTime>so&&1073741824!==n&&(t.flags|=128,r=!0,ki(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=i.last)?e.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Nt(),t.sibling=null,e=gr.current,lt(gr,r?1&e|2:1&e),t):(Ii(t),null);case 22:case 23:return ko(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&qa)&&(Ii(t),K&&6&t.subtreeFlags&&(t.flags|=8192)):Ii(t),null;case 24:case 25:return null}throw Error(o(156,t.tag))}var Di=s.ReactCurrentOwner,Oi=!1;function Fi(e,t,n,r){t.child=null===e?or(t,null,n,r):ar(t,e.child,n,r)}function Ni(e,t,n,r,i){n=n.render;var a=t.ref;return un(t,i),r=kr(e,t,n,r,a,i),n=Ir(),null===e||Oi?(jn&&n&&Un(t),t.flags|=1,Fi(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ia(e,t,i))}function zi(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Zo(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=ts(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ui(e,t,a,r,i))}if(a=e.child,0==(e.lanes&i)){var o=a.memoizedProps;if((n=null!==(n=n.compare)?n:Qt)(o,r)&&e.ref===t.ref)return ia(e,t,i)}return t.flags|=1,(e=es(a,r)).ref=t.ref,e.return=t,t.child=e}function Ui(e,t,n,r,i){if(null!==e&&Qt(e.memoizedProps,r)&&e.ref===t.ref){if(Oi=!1,0==(e.lanes&i))return t.lanes=e.lanes,ia(e,t,i);0!=(131072&e.flags)&&(Oi=!0)}return Vi(e,t,n,r,i)}function Hi(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null},lt(Qa,qa),qa|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null},t.updateQueue=null,lt(Qa,qa),qa|=e,null;t.memoizedState={baseLanes:0,cachePool:null},r=null!==a?a.baseLanes:n,lt(Qa,qa),qa|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,lt(Qa,qa),qa|=r;return Fi(e,t,i,n),t.child}function Gi(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Vi(e,t,n,r,i){var a=pt(n)?ht:ut.current;return a=ft(t,a),un(t,i),n=kr(e,t,n,r,a,i),r=Ir(),null===e||Oi?(jn&&r&&Un(t),t.flags|=1,Fi(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ia(e,t,i))}function ji(e,t,n,r,i){if(pt(n)){var a=!0;yt(t)}else a=!1;if(un(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),En(t,n,r),Tn(t,n,r,i),r=!0;else if(null===e){var o=t.stateNode,s=t.memoizedProps;o.props=s;var l=o.context,c=n.contextType;c="object"==typeof c&&null!==c?dn(c):ft(t,c=pt(n)?ht:ut.current);var u=n.getDerivedStateFromProps,d="function"==typeof u||"function"==typeof o.getSnapshotBeforeUpdate;d||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==r||l!==c)&&Cn(t,o,r,c),fn=!1;var h=t.memoizedState;o.state=h,_n(t,r,o,i),l=t.memoizedState,s!==r||h!==l||dt.current||fn?("function"==typeof u&&(Mn(t,n,u,r),l=t.memoizedState),(s=fn||An(t,n,s,r,h,l,c))?(d||"function"!=typeof o.UNSAFE_componentWillMount&&"function"!=typeof o.componentWillMount||("function"==typeof o.componentWillMount&&o.componentWillMount(),"function"==typeof o.UNSAFE_componentWillMount&&o.UNSAFE_componentWillMount()),"function"==typeof o.componentDidMount&&(t.flags|=4194308)):("function"==typeof o.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),o.props=r,o.state=l,o.context=c,r=s):("function"==typeof o.componentDidMount&&(t.flags|=4194308),r=!1)}else{o=t.stateNode,mn(e,t),s=t.memoizedProps,c=t.type===t.elementType?s:en(t.type,s),o.props=c,d=t.pendingProps,h=o.context,l="object"==typeof(l=n.contextType)&&null!==l?dn(l):ft(t,l=pt(n)?ht:ut.current);var f=n.getDerivedStateFromProps;(u="function"==typeof f||"function"==typeof o.getSnapshotBeforeUpdate)||"function"!=typeof o.UNSAFE_componentWillReceiveProps&&"function"!=typeof o.componentWillReceiveProps||(s!==d||h!==l)&&Cn(t,o,r,l),fn=!1,h=t.memoizedState,o.state=h,_n(t,r,o,i);var p=t.memoizedState;s!==d||h!==p||dt.current||fn?("function"==typeof f&&(Mn(t,n,f,r),p=t.memoizedState),(c=fn||An(t,n,c,r,h,p,l)||!1)?(u||"function"!=typeof o.UNSAFE_componentWillUpdate&&"function"!=typeof o.componentWillUpdate||("function"==typeof o.componentWillUpdate&&o.componentWillUpdate(r,p,l),"function"==typeof o.UNSAFE_componentWillUpdate&&o.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof o.componentDidUpdate&&(t.flags|=4),"function"==typeof o.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),o.props=r,o.state=p,o.context=l,r=c):("function"!=typeof o.componentDidUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=4),"function"!=typeof o.getSnapshotBeforeUpdate||s===e.memoizedProps&&h===e.memoizedState||(t.flags|=1024),r=!1)}return Wi(e,t,n,r,a,i)}function Wi(e,t,n,r,i,a){Gi(e,t);var o=0!=(128&t.flags);if(!r&&!o)return i&&bt(t,n,!1),ia(e,t,a);r=t.stateNode,Di.current=t;var s=o&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&o?(t.child=ar(t,e.child,null,a),t.child=ar(t,null,s,a)):Fi(e,t,s,a),t.memoizedState=r.state,i&&bt(t,n,!0),t.child}function Ji(e){var t=e.stateNode;t.pendingContext?gt(0,t.pendingContext,t.pendingContext!==t.context):t.context&>(0,t.context,!1),hr(e,t.containerInfo)}function Xi(e,t,n,r,i){return Zn(),er(i),t.flags|=256,Fi(e,t,n,r),t.child}var Ki={dehydrated:null,treeContext:null,retryLane:0};function $i(e){return{baseLanes:e,cachePool:null}}function Yi(e,t,n){var r,i=t.pendingProps,a=gr.current,s=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(s=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),lt(gr,1&a),null===e)return Yn(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:Fe(e)?t.lanes=8:t.lanes=1073741824,null):(a=i.children,e=i.fallback,s?(i=t.mode,s=t.child,a={mode:"hidden",children:a},0==(1&i)&&null!==s?(s.childLanes=0,s.pendingProps=a):s=rs(a,i,0,null),e=ns(e,i,n,null),s.return=t,e.return=t,s.sibling=e,t.child=s,t.child.memoizedState=$i(n),t.memoizedState=Ki,e):qi(t,a));if(null!==(a=e.memoizedState)){if(null!==(r=a.dehydrated)){if(l)return 256&t.flags?(t.flags&=-257,ea(e,t,n,Error(o(422)))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=i.fallback,a=t.mode,i=rs({mode:"visible",children:i.children},a,0,null),(s=ns(s,a,n,null)).flags|=2,i.return=t,s.return=t,i.sibling=s,t.child=i,0!=(1&t.mode)&&ar(t,e.child,null,n),t.child.memoizedState=$i(n),t.memoizedState=Ki,s);if(0==(1&t.mode))t=ea(e,t,n,null);else if(Fe(r))t=ea(e,t,n,Error(o(419)));else if(i=0!=(n&e.childLanes),Oi||i){if(null!==(i=Ka)){switch(n&-n){case 4:s=2;break;case 16:s=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:s=32;break;case 536870912:s=268435456;break;default:s=0}0!==(i=0!=(s&(i.suspendedLanes|n))?0:s)&&i!==a.retryLane&&(a.retryLane=i,Mo(e,i,-1))}Oo(),t=ea(e,t,n,Error(o(421)))}else Oe(r)?(t.flags|=128,t.child=e.child,t=Ko.bind(null,e),Ne(r,t),t=null):(n=a.treeContext,Y&&(Vn=Ge(r),Gn=t,jn=!0,Jn=null,Wn=!1,null!==n&&(In[Ln++]=On,In[Ln++]=Fn,In[Ln++]=Dn,On=n.id,Fn=n.overflow,Dn=t)),(t=qi(t,t.pendingProps.children)).flags|=4096);return t}return s?(i=Zi(e,t,i.children,i.fallback,n),s=t.child,a=e.child.memoizedState,s.memoizedState=null===a?$i(n):{baseLanes:a.baseLanes|n,cachePool:null},s.childLanes=e.childLanes&~n,t.memoizedState=Ki,i):(n=Qi(e,t,i.children,n),t.memoizedState=null,n)}return s?(i=Zi(e,t,i.children,i.fallback,n),s=t.child,a=e.child.memoizedState,s.memoizedState=null===a?$i(n):{baseLanes:a.baseLanes|n,cachePool:null},s.childLanes=e.childLanes&~n,t.memoizedState=Ki,i):(n=Qi(e,t,i.children,n),t.memoizedState=null,n)}function qi(e,t){return(t=rs({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Qi(e,t,n,r){var i=e.child;return e=i.sibling,n=es(i,{mode:"visible",children:n}),0==(1&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n}function Zi(e,t,n,r,i){var a=t.mode,o=(e=e.child).sibling,s={mode:"hidden",children:n};return 0==(1&a)&&t.child!==e?((n=t.child).childLanes=0,n.pendingProps=s,t.deletions=null):(n=es(e,s)).subtreeFlags=14680064&e.subtreeFlags,null!==o?r=es(o,r):(r=ns(r,a,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ea(e,t,n,r){return null!==r&&er(r),ar(t,e.child,null,n),(e=qi(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function ta(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),cn(e.return,t,n)}function na(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function ra(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Fi(e,t,r.children,n),0!=(2&(r=gr.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ta(e,n,t);else if(19===e.tag)ta(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(lt(gr,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===vr(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),na(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===vr(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}na(t,!0,n,null,a);break;case"together":na(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ia(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),to|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(o(153));if(null!==t.child){for(n=es(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=es(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function aa(e,t){switch(Hn(t),t.tag){case 1:return pt(t.type)&&mt(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return fr(),st(dt),st(ut),br(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return mr(t),null;case 13:if(st(gr),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(o(340));Zn()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return st(gr),null;case 4:return fr(),null;case 10:return ln(t.type._context),null;case 22:case 23:return ko(),null;default:return null}}var oa=!1,sa=!1,la="function"==typeof WeakSet?WeakSet:Set,ca=null;function ua(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Wo(e,t,n)}else n.current=null}function da(e,t,n){try{n()}catch(n){Wo(e,t,n)}}var ha=!1;function fa(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&da(t,n,a)}i=i.next}while(i!==r)}}function pa(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ma(e){var t=e.ref;if(null!==t){var n=e.stateNode;e=5===e.tag?I(n):n,"function"==typeof t?t(e):t.current=e}}function ga(e,t,n){if(jt&&"function"==typeof jt.onCommitFiberUnmount)try{jt.onCommitFiberUnmount(Vt,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e=e.next;do{var i=r,a=i.destroy;i=i.tag,void 0!==a&&(0!=(2&i)||0!=(4&i))&&da(t,n,a),r=r.next}while(r!==e)}break;case 1:if(ua(t,n),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Wo(t,n,e)}break;case 5:ua(t,n);break;case 4:K?Sa(e,t,n):$&&$&&(t=t.stateNode.containerInfo,n=Ce(t),Be(t,n))}}function va(e,t,n){for(var r=t;;)if(ga(e,r,n),null===r.child||K&&4===r.tag){if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}else r.child.return=r,r=r.child}function ya(e){var t=e.alternate;null!==t&&(e.alternate=null,ya(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&ee(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function ba(e){return 5===e.tag||3===e.tag||4===e.tag}function _a(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||ba(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function xa(e){if(K){e:{for(var t=e.return;null!==t;){if(ba(t))break e;t=t.return}throw Error(o(160))}var n=t;switch(n.tag){case 5:t=n.stateNode,32&n.flags&&(_e(t),n.flags&=-33),Ma(e,n=_a(e),t);break;case 3:case 4:t=n.stateNode.containerInfo,wa(e,n=_a(e),t);break;default:throw Error(o(161))}}}function wa(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ve(n,e,t):he(n,e);else if(4!==r&&null!==(e=e.child))for(wa(e,t,n),e=e.sibling;null!==e;)wa(e,t,n),e=e.sibling}function Ma(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ge(n,e,t):de(n,e);else if(4!==r&&null!==(e=e.child))for(Ma(e,t,n),e=e.sibling;null!==e;)Ma(e,t,n),e=e.sibling}function Sa(e,t,n){for(var r,i,a=t,s=!1;;){if(!s){s=a.return;e:for(;;){if(null===s)throw Error(o(160));switch(r=s.stateNode,s.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}s=s.return}s=!0}if(5===a.tag||6===a.tag)va(e,a,n),i?be(r,a.stateNode):ye(r,a.stateNode);else if(18===a.tag)i?Ye(r,a.stateNode):$e(r,a.stateNode);else if(4===a.tag){if(null!==a.child){r=a.stateNode.containerInfo,i=!0,a.child.return=a,a=a.child;continue}}else if(ga(e,a,n),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(s=!1)}a.sibling.return=a.return,a=a.sibling}}function Aa(e,t){if(K){switch(t.tag){case 0:case 11:case 14:case 15:return fa(3,t,t.return),pa(3,t),void fa(5,t,t.return);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&me(n,a,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(o(162));return n=t.memoizedProps,void fe(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(Y&&null!==e&&e.memoizedState.isDehydrated&&Xe(t.stateNode.containerInfo));case 13:case 19:return void Ea(t)}throw Error(o(163))}switch(t.tag){case 0:case 11:case 14:case 15:return fa(3,t,t.return),pa(3,t),void fa(5,t,t.return);case 12:case 22:case 23:return;case 13:case 19:return void Ea(t);case 3:Y&&null!==e&&e.memoizedState.isDehydrated&&Xe(t.stateNode.containerInfo)}e:if($){switch(t.tag){case 1:case 5:case 6:break e;case 3:case 4:t=t.stateNode,Be(t.containerInfo,t.pendingChildren);break e}throw Error(o(163))}}function Ea(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new la),t.forEach((function(t){var r=$o.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Ca(e,t,n){ca=e,Ta(e,t,n)}function Ta(e,t,n){for(var r=0!=(1&e.mode);null!==ca;){var i=ca,a=i.child;if(22===i.tag&&r){var o=null!==i.memoizedState||oa;if(!o){var s=i.alternate,l=null!==s&&null!==s.memoizedState||sa;s=oa;var c=sa;if(oa=o,(sa=l)&&!c)for(ca=i;null!==ca;)l=(o=ca).child,22===o.tag&&null!==o.memoizedState?Pa(i):null!==l?(l.return=o,ca=l):Pa(i);for(;null!==a;)ca=a,Ta(a,t,n),a=a.sibling;ca=i,oa=s,sa=c}Ra(e)}else 0!=(8772&i.subtreeFlags)&&null!==a?(a.return=i,ca=a):Ra(e)}}function Ra(e){for(;null!==ca;){var t=ca;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:sa||pa(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!sa)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:en(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&xn(t,a,r);break;case 3:var s=t.updateQueue;if(null!==s){if(n=null,null!==t.child)switch(t.child.tag){case 5:n=I(t.child.stateNode);break;case 1:n=t.child.stateNode}xn(t,s,n)}break;case 5:var l=t.stateNode;null===n&&4&t.flags&&pe(l,t.type,t.memoizedProps,t);break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:break;case 13:if(Y&&null===t.memoizedState){var c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var d=u.dehydrated;null!==d&&Ke(d)}}}break;default:throw Error(o(163))}sa||512&t.flags&&ma(t)}catch(e){Wo(t,t.return,e)}}if(t===e){ca=null;break}if(null!==(n=t.sibling)){n.return=t.return,ca=n;break}ca=t.return}}function Ba(e){for(;null!==ca;){var t=ca;if(t===e){ca=null;break}var n=t.sibling;if(null!==n){n.return=t.return,ca=n;break}ca=t.return}}function Pa(e){for(;null!==ca;){var t=ca;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{pa(4,t)}catch(e){Wo(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Wo(t,i,e)}}var a=t.return;try{ma(t)}catch(e){Wo(t,a,e)}break;case 5:var o=t.return;try{ma(t)}catch(e){Wo(t,o,e)}}}catch(e){Wo(t,t.return,e)}if(t===e){ca=null;break}var s=t.sibling;if(null!==s){s.return=t.return,ca=s;break}ca=t.return}}var ka=0,Ia=1,La=2,Da=3,Oa=4;if("function"==typeof Symbol&&Symbol.for){var Fa=Symbol.for;ka=Fa("selector.component"),Ia=Fa("selector.has_pseudo_class"),La=Fa("selector.role"),Da=Fa("selector.test_id"),Oa=Fa("selector.text")}function Na(e){var t=q(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(o(364));return t}if(null===(e=ie(e)))throw Error(o(362));return e.stateNode.current}function za(e,t){switch(t.$$typeof){case ka:if(e.type===t.value)return!0;break;case Ia:e:{t=t.value,e=[e,0];for(var n=0;n<e.length;){var r=e[n++],i=e[n++],a=t[i];if(5!==r.tag||!se(r)){for(;null!=a&&za(r,a);)a=t[++i];if(i===t.length){t=!0;break e}for(r=r.child;null!==r;)e.push(r,i),r=r.sibling}}t=!1}return t;case La:if(5===e.tag&&le(e.stateNode,t.value))return!0;break;case Oa:if((5===e.tag||6===e.tag)&&null!==(e=oe(e))&&0<=e.indexOf(t.value))return!0;break;case Da:if(5===e.tag&&"string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase())return!0;break;default:throw Error(o(365))}return!1}function Ua(e){switch(e.$$typeof){case ka:return"<"+(M(e.value)||"Unknown")+">";case Ia:return":has("+(Ua(e)||"")+")";case La:return'[role="'+e.value+'"]';case Oa:return'"'+e.value+'"';case Da:return'[data-testname="'+e.value+'"]';default:throw Error(o(365))}}function Ha(e,t){var n=[];e=[e,0];for(var r=0;r<e.length;){var i=e[r++],a=e[r++],o=t[a];if(5!==i.tag||!se(i)){for(;null!=o&&za(i,o);)o=t[++a];if(a===t.length)n.push(i);else for(i=i.child;null!==i;)e.push(i,a),i=i.sibling}}return n}function Ga(e,t){if(!re)throw Error(o(363));e=Ha(e=Na(e),t),t=[],e=Array.from(e);for(var n=0;n<e.length;){var r=e[n++];if(5===r.tag)se(r)||t.push(r.stateNode);else for(r=r.child;null!==r;)e.push(r),r=r.sibling}return t}var Va=Math.ceil,ja=s.ReactCurrentDispatcher,Wa=s.ReactCurrentOwner,Ja=s.ReactCurrentBatchConfig,Xa=0,Ka=null,$a=null,Ya=0,qa=0,Qa=ot(0),Za=0,eo=null,to=0,no=0,ro=0,io=null,ao=null,oo=0,so=1/0;function lo(){so=Nt()+500}var co,uo=!1,ho=null,fo=null,po=!1,mo=null,go=0,vo=0,yo=null,bo=-1,_o=0;function xo(){return 0!=(6&Xa)?Nt():-1!==bo?bo:bo=Nt()}function wo(e){return 0==(1&e.mode)?1:0!=(2&Xa)&&0!==Ya?Ya&-Ya:null!==qt.transition?(0===_o&&(e=Mt,0==(4194240&(Mt<<=1))&&(Mt=64),_o=e),_o):0!==(e=kt)?e:Z()}function Mo(e,t,n){if(50<vo)throw vo=0,yo=null,Error(o(185));var r=So(e,t);return null===r?null:(Bt(r,t,n),0!=(2&Xa)&&r===Ka||(r===Ka&&(0==(2&Xa)&&(no|=t),4===Za&&Ro(r,Ya)),Ao(r,n),1===t&&0===Xa&&0==(1&e.mode)&&(lo(),Xt&&Yt())),r)}function So(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function Ao(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var o=31-_t(a),s=1<<o,l=i[o];-1===l?0!=(s&n)&&0==(s&r)||(i[o]=Ct(s,t)):l<=t&&(e.expiredLanes|=s),a&=~s}}(e,t);var r=Et(e,e===Ka?Ya:0);if(0===r)null!==n&&Dt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Dt(n),1===t)0===e.tag?function(e){Xt=!0,$t(e)}(Bo.bind(null,e)):$t(Bo.bind(null,e)),te?ne((function(){0===Xa&&Yt()})):Lt(zt,Yt),n=null;else{switch(It(r)){case 1:n=zt;break;case 4:n=Ut;break;case 16:default:n=Ht;break;case 536870912:n=Gt}n=Yo(n,Eo.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Eo(e,t){if(bo=-1,_o=0,0!=(6&Xa))throw Error(o(327));var n=e.callbackNode;if(Vo()&&e.callbackNode!==n)return null;var r=Et(e,e===Ka?Ya:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=Fo(e,r);else{t=r;var i=Xa;Xa|=2;var a=Do();for(Ka===e&&Ya===t||(lo(),Io(e,t));;)try{zo();break}catch(t){Lo(e,t)}on(),ja.current=a,Xa=i,null!==$a?t=0:(Ka=null,Ya=0,t=Za)}if(0!==t){if(2===t&&0!==(i=Tt(e))&&(r=i,t=Co(e,i)),1===t)throw n=eo,Io(e,0),Ro(e,r),Ao(e,Nt()),n;if(6===t)Ro(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!Wt(a(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=Fo(e,r))&&0!==(a=Tt(e))&&(r=a,t=Co(e,a)),1===t))throw n=eo,Io(e,0),Ro(e,r),Ao(e,Nt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(o(345));case 2:case 5:Go(e,ao);break;case 3:if(Ro(e,r),(130023424&r)===r&&10<(t=oo+500-Nt())){if(0!==Et(e,0))break;if(((i=e.suspendedLanes)&r)!==r){xo(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=j(Go.bind(null,e,ao),t);break}Go(e,ao);break;case 4:if(Ro(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var s=31-_t(r);a=1<<s,(s=t[s])>i&&(i=s),r&=~a}if(r=i,10<(r=(120>(r=Nt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Va(r/1960))-r)){e.timeoutHandle=j(Go.bind(null,e,ao),r);break}Go(e,ao);break;default:throw Error(o(329))}}}return Ao(e,Nt()),e.callbackNode===n?Eo.bind(null,e):null}function Co(e,t){var n=io;return e.current.memoizedState.isDehydrated&&(Io(e,t).flags|=256),2!==(e=Fo(e,t))&&(t=ao,ao=n,null!==t&&To(t)),e}function To(e){null===ao?ao=e:ao.push.apply(ao,e)}function Ro(e,t){for(t&=~ro,t&=~no,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-_t(t),r=1<<n;e[n]=-1,t&=~r}}function Bo(e){if(0!=(6&Xa))throw Error(o(327));Vo();var t=Et(e,0);if(0==(1&t))return Ao(e,Nt()),null;var n=Fo(e,t);if(0!==e.tag&&2===n){var r=Tt(e);0!==r&&(t=r,n=Co(e,r))}if(1===n)throw n=eo,Io(e,0),Ro(e,t),Ao(e,Nt()),n;if(6===n)throw Error(o(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Go(e,ao),Ao(e,Nt()),null}function Po(e){null!==mo&&0===mo.tag&&0==(6&Xa)&&Vo();var t=Xa;Xa|=1;var n=Ja.transition,r=kt;try{if(Ja.transition=null,kt=1,e)return e()}finally{kt=r,Ja.transition=n,0==(6&(Xa=t))&&Yt()}}function ko(){qa=Qa.current,st(Qa)}function Io(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==J&&(e.timeoutHandle=J,W(n)),null!==$a)for(n=$a.return;null!==n;){var r=n;switch(Hn(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&mt();break;case 3:fr(),st(dt),st(ut),br();break;case 5:mr(r);break;case 4:fr();break;case 13:case 19:st(gr);break;case 10:ln(r.type._context);break;case 22:case 23:ko()}n=n.return}if(Ka=e,$a=e=es(e.current,null),Ya=qa=t,Za=0,eo=null,ro=no=to=0,ao=io=null,null!==hn){for(t=0;t<hn.length;t++)if(null!==(r=(n=hn[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var o=a.next;a.next=i,r.next=o}n.pending=r}hn=null}return e}function Lo(e,t){for(;;){var n=$a;try{if(on(),_r.current=fi,Er){for(var r=Mr.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}Er=!1}if(wr=0,Ar=Sr=Mr=null,Cr=!1,Tr=0,Wa.current=null,null===n||null===n.return){Za=1,eo=t,$a=null;break}e:{var a=e,s=n.return,l=n,c=t;if(t=Ya,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,d=l,h=d.tag;if(0==(1&d.mode)&&(0===h||11===h||15===h)){var f=d.alternate;f?(d.updateQueue=f.updateQueue,d.memoizedState=f.memoizedState,d.lanes=f.lanes):(d.updateQueue=null,d.memoizedState=null)}var p=Ci(s);if(null!==p){p.flags&=-257,Ti(p,s,l,0,t),1&p.mode&&Ei(a,u,t),c=u;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0==(1&t)){Ei(a,u,t),Oo();break e}c=Error(o(426))}else if(jn&&1&l.mode){var v=Ci(s);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),Ti(v,s,l,0,t),er(c);break e}}a=c,4!==Za&&(Za=2),null===io?io=[a]:io.push(a),c=vi(c,l),l=s;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t,bn(l,Si(0,c,t));break e;case 1:a=c;var y=l.type,b=l.stateNode;if(0==(128&l.flags)&&("function"==typeof y.getDerivedStateFromError||null!==b&&"function"==typeof b.componentDidCatch&&(null===fo||!fo.has(b)))){l.flags|=65536,t&=-t,l.lanes|=t,bn(l,Ai(l,a,t));break e}}l=l.return}while(null!==l)}Ho(n)}catch(e){t=e,$a===n&&null!==n&&($a=n=n.return);continue}break}}function Do(){var e=ja.current;return ja.current=fi,null===e?fi:e}function Oo(){0!==Za&&3!==Za&&2!==Za||(Za=4),null===Ka||0==(268435455&to)&&0==(268435455&no)||Ro(Ka,Ya)}function Fo(e,t){var n=Xa;Xa|=2;var r=Do();for(Ka===e&&Ya===t||Io(e,t);;)try{No();break}catch(t){Lo(e,t)}if(on(),Xa=n,ja.current=r,null!==$a)throw Error(o(261));return Ka=null,Ya=0,Za}function No(){for(;null!==$a;)Uo($a)}function zo(){for(;null!==$a&&!Ot();)Uo($a)}function Uo(e){var t=co(e.alternate,e,qa);e.memoizedProps=e.pendingProps,null===t?Ho(e):$a=t,Wa.current=null}function Ho(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Li(n,t,qa)))return void($a=n)}else{if(null!==(n=aa(n,t)))return n.flags&=32767,void($a=n);if(null===e)return Za=6,void($a=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void($a=t);$a=t=e}while(null!==t);0===Za&&(Za=5)}function Go(e,t){var n=kt,r=Ja.transition;try{Ja.transition=null,kt=1,function(e,t,n){do{Vo()}while(null!==mo);if(0!=(6&Xa))throw Error(o(327));var r=e.finishedWork,i=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(o(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-_t(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,a),e===Ka&&($a=Ka=null,Ya=0),0==(2064&r.subtreeFlags)&&0==(2064&r.flags)||po||(po=!0,Yo(Ht,(function(){return Vo(),null}))),a=0!=(15990&r.flags),0!=(15990&r.subtreeFlags)||a){a=Ja.transition,Ja.transition=null;var s=kt;kt=1;var l=Xa;Xa|=4,Wa.current=null,function(e,t){for(O(e.containerInfo),ca=t;null!==ca;)if(t=(e=ca).child,0!=(1028&e.subtreeFlags)&&null!==t)t.return=e,ca=t;else for(;null!==ca;){e=ca;try{var n=e.alternate;if(0!=(1024&e.flags))switch(e.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==n){var r=n.memoizedProps,i=n.memoizedState,a=e.stateNode,s=a.getSnapshotBeforeUpdate(e.elementType===e.type?r:en(e.type,r),i);a.__reactInternalSnapshotBeforeUpdate=s}break;case 3:K&&Ae(e.stateNode.containerInfo);break;default:throw Error(o(163))}}catch(t){Wo(e,e.return,t)}if(null!==(t=e.sibling)){t.return=e.return,ca=t;break}ca=e.return}n=ha,ha=!1}(e,r),function(e,t){for(ca=t;null!==ca;){var n=(t=ca).deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e;K?Sa(a,i,t):va(a,i,t);var o=i.alternate;null!==o&&(o.return=null),i.return=null}catch(e){Wo(i,t,e)}}if(n=t.child,0!=(12854&t.subtreeFlags)&&null!==n)n.return=t,ca=n;else for(;null!==ca;){t=ca;try{var s=t.flags;if(32&s&&K&&_e(t.stateNode),512&s){var l=t.alternate;if(null!==l){var c=l.ref;null!==c&&("function"==typeof c?c(null):c.current=null)}}if(8192&s)switch(t.tag){case 13:if(null!==t.memoizedState){var u=t.alternate;null!==u&&null!==u.memoizedState||(oo=Nt())}break;case 22:var d=null!==t.memoizedState,h=t.alternate,f=null!==h&&null!==h.memoizedState;if(n=t,K)e:if(r=n,i=d,a=null,K)for(var p=r;;){if(5===p.tag){if(null===a){a=p;var m=p.stateNode;i?xe(m):Me(p.stateNode,p.memoizedProps)}}else if(6===p.tag){if(null===a){var g=p.stateNode;i?we(g):Se(g,p.memoizedProps)}}else if((22!==p.tag&&23!==p.tag||null===p.memoizedState||p===r)&&null!==p.child){p.child.return=p,p=p.child;continue}if(p===r)break;for(;null===p.sibling;){if(null===p.return||p.return===r)break e;a===p&&(a=null),p=p.return}a===p&&(a=null),p.sibling.return=p.return,p=p.sibling}if(d&&!f&&0!=(1&n.mode)){ca=n;for(var v=n.child;null!==v;){for(n=ca=v;null!==ca;){var y=(r=ca).child;switch(r.tag){case 0:case 11:case 14:case 15:fa(4,r,r.return);break;case 1:ua(r,r.return);var b=r.stateNode;if("function"==typeof b.componentWillUnmount){var _=r.return;try{b.props=r.memoizedProps,b.state=r.memoizedState,b.componentWillUnmount()}catch(e){Wo(r,_,e)}}break;case 5:ua(r,r.return);break;case 22:if(null!==r.memoizedState){Ba(n);continue}}null!==y?(y.return=r,ca=y):Ba(n)}v=v.sibling}}}switch(4102&s){case 2:xa(t),t.flags&=-3;break;case 6:xa(t),t.flags&=-3,Aa(t.alternate,t);break;case 4096:t.flags&=-4097;break;case 4100:t.flags&=-4097,Aa(t.alternate,t);break;case 4:Aa(t.alternate,t)}}catch(e){Wo(t,t.return,e)}if(null!==(n=t.sibling)){n.return=t.return,ca=n;break}ca=t.return}}}(e,r),F(e.containerInfo),e.current=r,Ca(r,e,i),Ft(),Xa=l,kt=s,Ja.transition=a}else e.current=r;if(po&&(po=!1,mo=e,go=i),0===(a=e.pendingLanes)&&(fo=null),function(e){if(jt&&"function"==typeof jt.onCommitFiberRoot)try{jt.onCommitFiberRoot(Vt,e,void 0,128==(128&e.current.flags))}catch(e){}}(r.stateNode),Ao(e,Nt()),null!==t)for(n=e.onRecoverableError,r=0;r<t.length;r++)n(t[r]);if(uo)throw uo=!1,e=ho,ho=null,e;0!=(1&go)&&0!==e.tag&&Vo(),0!=(1&(a=e.pendingLanes))?e===yo?vo++:(vo=0,yo=e):vo=0,Yt()}(e,t,n)}finally{Ja.transition=r,kt=n}return null}function Vo(){if(null!==mo){var e=It(go),t=Ja.transition,n=kt;try{if(Ja.transition=null,kt=16>e?16:e,null===mo)var r=!1;else{if(e=mo,mo=null,go=0,0!=(6&Xa))throw Error(o(331));var i=Xa;for(Xa|=4,ca=e.current;null!==ca;){var a=ca,s=a.child;if(0!=(16&ca.flags)){var l=a.deletions;if(null!==l){for(var c=0;c<l.length;c++){var u=l[c];for(ca=u;null!==ca;){var d=ca;switch(d.tag){case 0:case 11:case 15:fa(8,d,a)}var h=d.child;if(null!==h)h.return=d,ca=h;else for(;null!==ca;){var f=(d=ca).sibling,p=d.return;if(ya(d),d===u){ca=null;break}if(null!==f){f.return=p,ca=f;break}ca=p}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}ca=a}}if(0!=(2064&a.subtreeFlags)&&null!==s)s.return=a,ca=s;else e:for(;null!==ca;){if(0!=(2048&(a=ca).flags))switch(a.tag){case 0:case 11:case 15:fa(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,ca=y;break e}ca=a.return}}var b=e.current;for(ca=b;null!==ca;){var _=(s=ca).child;if(0!=(2064&s.subtreeFlags)&&null!==_)_.return=s,ca=_;else e:for(s=b;null!==ca;){if(0!=(2048&(l=ca).flags))try{switch(l.tag){case 0:case 11:case 15:pa(9,l)}}catch(e){Wo(l,l.return,e)}if(l===s){ca=null;break e}var x=l.sibling;if(null!==x){x.return=l.return,ca=x;break e}ca=l.return}}if(Xa=i,Yt(),jt&&"function"==typeof jt.onPostCommitFiberRoot)try{jt.onPostCommitFiberRoot(Vt,e)}catch(e){}r=!0}return r}finally{kt=n,Ja.transition=t}}return!1}function jo(e,t,n){vn(e,t=Si(0,t=vi(n,t),1)),t=xo(),null!==(e=So(e,1))&&(Bt(e,1,t),Ao(e,t))}function Wo(e,t,n){if(3===e.tag)jo(e,e,n);else for(;null!==t;){if(3===t.tag){jo(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===fo||!fo.has(r))){vn(t,e=Ai(t,e=vi(n,e),1)),e=xo(),null!==(t=So(t,1))&&(Bt(t,1,e),Ao(t,e));break}}t=t.return}}function Jo(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=xo(),e.pingedLanes|=e.suspendedLanes&n,Ka===e&&(Ya&n)===n&&(4===Za||3===Za&&(130023424&Ya)===Ya&&500>Nt()-oo?Io(e,0):ro|=n),Ao(e,t)}function Xo(e,t){0===t&&(0==(1&e.mode)?t=1:(t=St,0==(130023424&(St<<=1))&&(St=4194304)));var n=xo();null!==(e=So(e,t))&&(Bt(e,t,n),Ao(e,n))}function Ko(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Xo(e,n)}function $o(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(o(314))}null!==r&&r.delete(t),Xo(e,n)}function Yo(e,t){return Lt(e,t)}function qo(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qo(e,t,n,r){return new qo(e,t,n,r)}function Zo(e){return!(!(e=e.prototype)||!e.isReactComponent)}function es(e,t){var n=e.alternate;return null===n?((n=Qo(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function ts(e,t,n,r,i,a){var s=2;if(r=e,"function"==typeof e)Zo(e)&&(s=1);else if("string"==typeof e)s=5;else e:switch(e){case u:return ns(n.children,i,a,t);case d:s=8,i|=8;break;case h:return(e=Qo(12,n,t,2|i)).elementType=h,e.lanes=a,e;case g:return(e=Qo(13,n,t,i)).elementType=g,e.lanes=a,e;case v:return(e=Qo(19,n,t,i)).elementType=v,e.lanes=a,e;case _:return rs(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case f:s=10;break e;case p:s=9;break e;case m:s=11;break e;case y:s=14;break e;case b:s=16,r=null;break e}throw Error(o(130,null==e?e:typeof e,""))}return(t=Qo(s,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function ns(e,t,n,r){return(e=Qo(7,e,r,t)).lanes=n,e}function rs(e,t,n,r){return(e=Qo(22,e,r,t)).elementType=_,e.lanes=n,e.stateNode={},e}function is(e,t,n){return(e=Qo(6,e,null,t)).lanes=n,e}function as(e,t,n){return(t=Qo(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function os(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=J,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Rt(0),this.expirationTimes=Rt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Rt(0),this.identifierPrefix=r,this.onRecoverableError=i,Y&&(this.mutableSourceEagerHydrationData=null)}function ss(e,t,n,r,i,a,o,s,l){return e=new os(e,t,n,s,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Qo(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null},pn(a),e}function ls(e){if(!e)return ct;e:{if(A(e=e._reactInternals)!==e||1!==e.tag)throw Error(o(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(o(171))}if(1===e.tag){var n=e.type;if(pt(n))return vt(e,n,t)}return t}function cs(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(o(188));throw e=Object.keys(e).join(","),Error(o(268,e))}return null===(e=T(t))?null:e.stateNode}function us(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function ds(e,t){us(e,t),(e=e.alternate)&&us(e,t)}function hs(e){return null===(e=T(e))?null:e.stateNode}function fs(){return null}return co=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||dt.current)Oi=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return Oi=!1,function(e,t,n){switch(t.tag){case 3:Ji(t),Zn();break;case 5:pr(t);break;case 1:pt(t.type)&&yt(t);break;case 4:hr(t,t.stateNode.containerInfo);break;case 10:sn(0,t.type._context,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(lt(gr,1&gr.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Yi(e,t,n):(lt(gr,1&gr.current),null!==(e=ia(e,t,n))?e.sibling:null);lt(gr,1&gr.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return ra(e,t,n);t.flags|=128}var i=t.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),lt(gr,gr.current),r)break;return null;case 22:case 23:return t.lanes=0,Hi(e,t,n)}return ia(e,t,n)}(e,t,n);Oi=0!=(131072&e.flags)}else Oi=!1,jn&&0!=(1048576&t.flags)&&zn(t,kn,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps;var i=ft(t,ut.current);un(t,n),i=kr(null,t,r,e,i,n);var a=Ir();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pt(r)?(a=!0,yt(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,pn(t),i.updater=Sn,t.stateNode=i,i._reactInternals=t,Tn(t,r,e,n),t=Wi(null,t,r,!0,a,n)):(t.tag=0,jn&&a&&Un(t),Fi(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Zo(e)?1:0;if(null!=e){if((e=e.$$typeof)===m)return 11;if(e===y)return 14}return 2}(r),e=en(r,e),i){case 0:t=Vi(null,t,r,e,n);break e;case 1:t=ji(null,t,r,e,n);break e;case 11:t=Ni(null,t,r,e,n);break e;case 14:t=zi(null,t,r,en(r.type,e),n);break e}throw Error(o(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Vi(e,t,r,i=t.elementType===r?i:en(r,i),n);case 1:return r=t.type,i=t.pendingProps,ji(e,t,r,i=t.elementType===r?i:en(r,i),n);case 3:e:{if(Ji(t),null===e)throw Error(o(387));r=t.pendingProps,i=(a=t.memoizedState).element,mn(e,t),_n(t,r,null,n);var s=t.memoizedState;if(r=s.element,Y&&a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:s.cache,transitions:s.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Xi(e,t,r,n,i=Error(o(423)));break e}if(r!==i){t=Xi(e,t,r,n,i=Error(o(424)));break e}for(Y&&(Vn=He(t.stateNode.containerInfo),Gn=t,jn=!0,Jn=null,Wn=!1),n=or(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(Zn(),r===i){t=ia(e,t,n);break e}Fi(e,t,r,n)}t=t.child}return t;case 5:return pr(t),null===e&&Yn(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,s=i.children,G(r,i)?s=null:null!==a&&G(r,a)&&(t.flags|=32),Gi(e,t),Fi(e,t,s,n),t.child;case 6:return null===e&&Yn(t),null;case 13:return Yi(e,t,n);case 4:return hr(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ar(t,null,r,n):Fi(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ni(e,t,r,i=t.elementType===r?i:en(r,i),n);case 7:return Fi(e,t,t.pendingProps,n),t.child;case 8:case 12:return Fi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,sn(0,r,s=i.value),null!==a)if(Wt(a.value,s)){if(a.children===i.children&&!dt.current){t=ia(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){s=a.child;for(var c=l.firstContext;null!==c;){if(c.context===r){if(1===a.tag){(c=gn(-1,n&-n)).tag=2;var u=a.updateQueue;if(null!==u){var d=(u=u.shared).pending;null===d?c.next=c:(c.next=d.next,d.next=c),u.pending=c}}a.lanes|=n,null!==(c=a.alternate)&&(c.lanes|=n),cn(a.return,n,t),l.lanes|=n;break}c=c.next}}else if(10===a.tag)s=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(s=a.return))throw Error(o(341));s.lanes|=n,null!==(l=s.alternate)&&(l.lanes|=n),cn(s,n,t),s=a.sibling}else s=a.child;if(null!==s)s.return=a;else for(s=a;null!==s;){if(s===t){s=null;break}if(null!==(a=s.sibling)){a.return=s.return,s=a;break}s=s.return}a=s}Fi(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,un(t,n),r=r(i=dn(i)),t.flags|=1,Fi(e,t,r,n),t.child;case 14:return i=en(r=t.type,t.pendingProps),zi(e,t,r,i=en(r.type,i),n);case 15:return Ui(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:en(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,pt(r)?(e=!0,yt(t)):e=!1,un(t,n),En(t,r,i),Tn(t,r,i,n),Wi(null,t,r,!0,e,n);case 19:return ra(e,t,n);case 22:return Hi(e,t,n)}throw Error(o(156,t.tag))},t.attemptContinuousHydration=function(e){13===e.tag&&(Mo(e,134217728,xo()),ds(e,134217728))},t.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=xo(),n=wo(e);Mo(e,n,t),ds(e,n)}},t.attemptSynchronousHydration=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=At(t.pendingLanes);0!==n&&(Pt(t,1|n),Ao(t,Nt()),0==(6&Xa)&&(lo(),Yt()))}break;case 13:var r=xo();Po((function(){return Mo(e,1,r)})),ds(e,1)}},t.batchedUpdates=function(e,t){var n=Xa;Xa|=1;try{return e(t)}finally{0===(Xa=n)&&(lo(),Xt&&Yt())}},t.createComponentSelector=function(e){return{$$typeof:ka,value:e}},t.createContainer=function(e,t,n,r,i,a,o){return ss(e,t,!1,null,0,r,0,a,o)},t.createHasPseudoClassSelector=function(e){return{$$typeof:Ia,value:e}},t.createHydrationContainer=function(e,t,n,r,i,a,o,s,l){return(e=ss(n,r,!0,e,0,a,0,s,l)).context=ls(null),n=e.current,(a=gn(r=xo(),i=wo(n))).callback=null!=t?t:null,vn(n,a),e.current.lanes=i,Bt(e,i,r),Ao(e,r),e},t.createPortal=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:c,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},t.createRoleSelector=function(e){return{$$typeof:La,value:e}},t.createTestNameSelector=function(e){return{$$typeof:Da,value:e}},t.createTextSelector=function(e){return{$$typeof:Oa,value:e}},t.deferredUpdates=function(e){var t=kt,n=Ja.transition;try{return Ja.transition=null,kt=16,e()}finally{kt=t,Ja.transition=n}},t.discreteUpdates=function(e,t,n,r,i){var a=kt,o=Ja.transition;try{return Ja.transition=null,kt=1,e(t,n,r,i)}finally{kt=a,Ja.transition=o,0===Xa&&lo()}},t.findAllNodes=Ga,t.findBoundingRects=function(e,t){if(!re)throw Error(o(363));t=Ga(e,t),e=[];for(var n=0;n<t.length;n++)e.push(ae(t[n]));for(t=e.length-1;0<t;t--)for(var r=(n=e[t]).x,i=r+n.width,a=n.y,s=a+n.height,l=t-1;0<=l;l--)if(t!==l){var c=e[l],u=c.x,d=u+c.width,h=c.y,f=h+c.height;if(r>=u&&a>=h&&i<=d&&s<=f){e.splice(t,1);break}if(!(r!==u||n.width!==c.width||f<a||h>s)){h>a&&(c.height+=h-a,c.y=a),f<s&&(c.height=s-h),e.splice(t,1);break}if(!(a!==h||n.height!==c.height||d<r||u>i)){u>r&&(c.width+=u-r,c.x=r),d<i&&(c.width=i-u),e.splice(t,1);break}}return e},t.findHostInstance=cs,t.findHostInstanceWithNoPortals=function(e){return null===(e=null!==(e=C(e))?B(e):null)?null:e.stateNode},t.findHostInstanceWithWarning=function(e){return cs(e)},t.flushControlled=function(e){var t=Xa;Xa|=1;var n=Ja.transition,r=kt;try{Ja.transition=null,kt=1,e()}finally{kt=r,Ja.transition=n,0===(Xa=t)&&(lo(),Yt())}},t.flushPassiveEffects=Vo,t.flushSync=Po,t.focusWithin=function(e,t){if(!re)throw Error(o(363));for(t=Ha(e=Na(e),t),t=Array.from(t),e=0;e<t.length;){var n=t[e++];if(!se(n)){if(5===n.tag&&ce(n.stateNode))return!0;for(n=n.child;null!==n;)t.push(n),n=n.sibling}}return!1},t.getCurrentUpdatePriority=function(){return kt},t.getFindAllNodesFailureDescription=function(e,t){if(!re)throw Error(o(363));var n=0,r=[];e=[Na(e),0];for(var i=0;i<e.length;){var a=e[i++],s=e[i++],l=t[s];if((5!==a.tag||!se(a))&&(za(a,l)&&(r.push(Ua(l)),++s>n&&(n=s)),s<t.length))for(a=a.child;null!==a;)e.push(a,s),a=a.sibling}if(n<t.length){for(e=[];n<t.length;n++)e.push(Ua(t[n]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},t.getPublicRootInstance=function(e){return(e=e.current).child?5===e.child.tag?I(e.child.stateNode):e.child.stateNode:null},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:s.ReactCurrentDispatcher,findHostInstanceByFiber:hs,findFiberByHostInstance:e.findFiberByHostInstance||fs,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{Vt=t.inject(e),jt=t}catch(e){}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!re)throw Error(o(363));e=Ga(e,t);var i=ue(e,n,r).disconnect;return{disconnect:function(){i()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=kt;try{return kt=e,t()}finally{kt=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var i=t.current,a=xo(),o=wo(i);return n=ls(n),null===t.context?t.context=n:t.pendingContext=n,(t=gn(a,o)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),vn(i,t),null!==(e=Mo(i,o,a))&&yn(e,i,o),o},t}},2576:(e,t,n)=>{"use strict";e.exports=n(6511)},6525:(e,t,n)=>{"use strict";e.exports=n(7287)},2546:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>a(l,n))c<i&&0>a(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>a(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function x(e){if(g=!1,_(e),!m)if(null!==r(c))m=!0,I(w);else{var t=r(u);null!==t&&L(x,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,y(E),E=-1),p=!0;var a=f;try{for(_(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!R());){var o=h.callback;if("function"==typeof o){h.callback=null,f=h.priorityLevel;var s=o(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(c)&&i(c),_(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&L(x,d.startTime-n),l=!1}return l}finally{h=null,f=a,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var M,S=!1,A=null,E=-1,C=5,T=-1;function R(){return!(t.unstable_now()-T<C)}function B(){if(null!==A){var e=t.unstable_now();T=e;var n=!0;try{n=A(!0,e)}finally{n?M():(S=!1,A=null)}}else S=!1}if("function"==typeof b)M=function(){b(B)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,k=P.port2;P.port1.onmessage=B,M=function(){k.postMessage(null)}}else M=function(){v(B,0)};function I(e){A=e,S||(S=!0,M())}function L(e,n){E=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,I(w))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(u,e),null===r(c)&&e===r(u)&&(g?(y(E),E=-1):g=!0,L(x,a-o))):(e.sortIndex=s,n(c,e),m||p||(m=!0,I(w))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},373:(e,t,n)=>{"use strict";e.exports=n(2546)},3460:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(7294),i=n(296),a=n.n(i);function o(e){let{debounce:t,scroll:n,polyfill:i,offsetSize:o}=void 0===e?{debounce:0,scroll:!1,offsetSize:!1}:e;const l=i||("undefined"==typeof window?class{}:window.ResizeObserver);if(!l)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[u,d]=(0,r.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),h=(0,r.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:u}),f=t?"number"==typeof t?t:t.scroll:null,p=t?"number"==typeof t?t:t.resize:null,m=(0,r.useRef)(!1);(0,r.useEffect)((()=>(m.current=!0,()=>{m.current=!1})));const[g,v,y]=(0,r.useMemo)((()=>{const e=()=>{if(!h.current.element)return;const{left:e,top:t,width:n,height:r,bottom:i,right:a,x:s,y:l}=h.current.element.getBoundingClientRect(),u={left:e,top:t,width:n,height:r,bottom:i,right:a,x:s,y:l};h.current.element instanceof HTMLElement&&o&&(u.height=h.current.element.offsetHeight,u.width=h.current.element.offsetWidth),Object.freeze(u),m.current&&!c(h.current.lastBounds,u)&&d(h.current.lastBounds=u)};return[e,p?a()(e,p):e,f?a()(e,f):e]}),[d,o,f,p]);function b(){h.current.scrollContainers&&(h.current.scrollContainers.forEach((e=>e.removeEventListener("scroll",y,!0))),h.current.scrollContainers=null),h.current.resizeObserver&&(h.current.resizeObserver.disconnect(),h.current.resizeObserver=null)}function _(){h.current.element&&(h.current.resizeObserver=new l(y),h.current.resizeObserver.observe(h.current.element),n&&h.current.scrollContainers&&h.current.scrollContainers.forEach((e=>e.addEventListener("scroll",y,{capture:!0,passive:!0}))))}var x,w,M;return w=y,M=Boolean(n),(0,r.useEffect)((()=>{if(M){const e=w;return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",e,!0)}}}),[w,M]),x=v,(0,r.useEffect)((()=>{const e=x;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[x]),(0,r.useEffect)((()=>{b(),_()}),[n,y,v]),(0,r.useEffect)((()=>b),[]),[e=>{e&&e!==h.current.element&&(b(),h.current.element=e,h.current.scrollContainers=s(e),_())},u,g]}function s(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some((e=>"auto"===e||"scroll"===e))&&t.push(e),[...t,...s(e.parentElement)]}const l=["x","y","top","bottom","left","right","width","height"],c=(e,t)=>l.every((n=>e[n]===t[n]))},2408:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),o=Symbol.for("react.profiler"),s=Symbol.for("react.provider"),l=Symbol.for("react.context"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),d=Symbol.for("react.memo"),h=Symbol.for("react.lazy"),f=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function y(){}function b(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var _=b.prototype=new y;_.constructor=b,m(_,v.prototype),_.isPureReactComponent=!0;var x=Array.isArray,w=Object.prototype.hasOwnProperty,M={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,r){var i,a={},o=null,s=null;if(null!=t)for(i in void 0!==t.ref&&(s=t.ref),void 0!==t.key&&(o=""+t.key),t)w.call(t,i)&&!S.hasOwnProperty(i)&&(a[i]=t[i]);var l=arguments.length-2;if(1===l)a.children=r;else if(1<l){for(var c=Array(l),u=0;u<l;u++)c[u]=arguments[u+2];a.children=c}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===a[i]&&(a[i]=l[i]);return{$$typeof:n,type:e,key:o,ref:s,props:a,_owner:M.current}}function E(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var C=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function R(e,t,i,a,o){var s=typeof e;"undefined"!==s&&"boolean"!==s||(e=null);var l=!1;if(null===e)l=!0;else switch(s){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return o=o(l=e),e=""===a?"."+T(l,0):a,x(o)?(i="",null!=e&&(i=e.replace(C,"$&/")+"/"),R(o,t,i,"",(function(e){return e}))):null!=o&&(E(o)&&(o=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(o,i+(!o.key||l&&l.key===o.key?"":(""+o.key).replace(C,"$&/")+"/")+e)),t.push(o)),1;if(l=0,a=""===a?".":a+":",x(e))for(var c=0;c<e.length;c++){var u=a+T(s=e[c],c);l+=R(s,t,i,u,o)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(s=e.next()).done;)l+=R(s=s.value,t,i,u=a+T(s,c++),o);else if("object"===s)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function B(e,t,n){if(null==e)return e;var r=[],i=0;return R(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function P(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var k={current:null},I={transition:null},L={ReactCurrentDispatcher:k,ReactCurrentBatchConfig:I,ReactCurrentOwner:M};t.Children={map:B,forEach:function(e,t,n){B(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return B(e,(function(){t++})),t},toArray:function(e){return B(e,(function(e){return e}))||[]},only:function(e){if(!E(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=i,t.Profiler=o,t.PureComponent=b,t.StrictMode=a,t.Suspense=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=L,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=m({},e.props),a=e.key,o=e.ref,s=e._owner;if(null!=t){if(void 0!==t.ref&&(o=t.ref,s=M.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(c in t)w.call(t,c)&&!S.hasOwnProperty(c)&&(i[c]=void 0===t[c]&&void 0!==l?l[c]:t[c])}var c=arguments.length-2;if(1===c)i.children=r;else if(1<c){l=Array(c);for(var u=0;u<c;u++)l[u]=arguments[u+2];i.children=l}return{$$typeof:n,type:e.type,key:a,ref:o,props:i,_owner:s}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:s,_context:e},e.Consumer=e},t.createElement=A,t.createFactory=function(e){var t=A.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:c,render:e}},t.isValidElement=E,t.lazy=function(e){return{$$typeof:h,_payload:{_status:-1,_result:e},_init:P}},t.memo=function(e,t){return{$$typeof:d,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=I.transition;I.transition={};try{e()}finally{I.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return k.current.useCallback(e,t)},t.useContext=function(e){return k.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return k.current.useDeferredValue(e)},t.useEffect=function(e,t){return k.current.useEffect(e,t)},t.useId=function(){return k.current.useId()},t.useImperativeHandle=function(e,t,n){return k.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return k.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return k.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return k.current.useMemo(e,t)},t.useReducer=function(e,t,n){return k.current.useReducer(e,t,n)},t.useRef=function(e){return k.current.useRef(e)},t.useState=function(e){return k.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return k.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return k.current.useTransition()},t.version="18.2.0"},7294:(e,t,n)=>{"use strict";e.exports=n(2408)},53:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,o=i>>>1;r<o;){var s=2*(r+1)-1,l=e[s],c=s+1,u=e[c];if(0>a(l,n))c<i&&0>a(u,l)?(e[r]=u,e[c]=n,r=c):(e[r]=l,e[s]=n,r=s);else{if(!(c<i&&0>a(u,n)))break e;e[r]=u,e[c]=n,r=c}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var o=performance;t.unstable_now=function(){return o.now()}}else{var s=Date,l=s.now();t.unstable_now=function(){return s.now()-l}}var c=[],u=[],d=1,h=null,f=3,p=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,b="undefined"!=typeof setImmediate?setImmediate:null;function _(e){for(var t=r(u);null!==t;){if(null===t.callback)i(u);else{if(!(t.startTime<=e))break;i(u),t.sortIndex=t.expirationTime,n(c,t)}t=r(u)}}function x(e){if(g=!1,_(e),!m)if(null!==r(c))m=!0,I(w);else{var t=r(u);null!==t&&L(x,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,y(E),E=-1),p=!0;var a=f;try{for(_(n),h=r(c);null!==h&&(!(h.expirationTime>n)||e&&!R());){var o=h.callback;if("function"==typeof o){h.callback=null,f=h.priorityLevel;var s=o(h.expirationTime<=n);n=t.unstable_now(),"function"==typeof s?h.callback=s:h===r(c)&&i(c),_(n)}else i(c);h=r(c)}if(null!==h)var l=!0;else{var d=r(u);null!==d&&L(x,d.startTime-n),l=!1}return l}finally{h=null,f=a,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var M,S=!1,A=null,E=-1,C=5,T=-1;function R(){return!(t.unstable_now()-T<C)}function B(){if(null!==A){var e=t.unstable_now();T=e;var n=!0;try{n=A(!0,e)}finally{n?M():(S=!1,A=null)}}else S=!1}if("function"==typeof b)M=function(){b(B)};else if("undefined"!=typeof MessageChannel){var P=new MessageChannel,k=P.port2;P.port1.onmessage=B,M=function(){k.postMessage(null)}}else M=function(){v(B,0)};function I(e){A=e,S||(S=!0,M())}function L(e,n){E=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,I(w))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):C=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,a){var o=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?o+a:o,e){case 1:var s=-1;break;case 2:s=250;break;case 5:s=1073741823;break;case 4:s=1e4;break;default:s=5e3}return e={id:d++,callback:i,priorityLevel:e,startTime:a,expirationTime:s=a+s,sortIndex:-1},a>o?(e.sortIndex=a,n(u,e),null===r(c)&&e===r(u)&&(g?(y(E),E=-1):g=!0,L(x,a-o))):(e.sortIndex=s,n(c,e),m||p||(m=!0,I(w))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},3840:(e,t,n)=>{"use strict";e.exports=n(53)},1086:(e,t,n)=>{"use strict";var r=n(7853),i=n(3216),a=n(5299),o=n(1833);function s(e){return"__proto__"!==e&&"constructor"!==e&&"prototype"!==e}e.exports=function(e,t,n){if(!o(e))return e;if(Array.isArray(t)&&(t=[].concat.apply([],t).join(".")),"string"!=typeof t)return e;for(var l=r(t,{sep:".",brackets:!0}).filter(s),c=l.length,u=-1,d=e;++u<c;){var h=l[u];u===c-1?a(d[h])&&a(n)?d[h]=i({},d[h],n):d[h]=n:(o(d[h])||(d[h]={}),d=d[h])}return e}},3216:(e,t,n)=>{"use strict";var r=n(1833);function i(e,t){for(var n in t)a(t,n)&&(e[n]=t[n])}function a(e,t){return Object.prototype.hasOwnProperty.call(e,t)}e.exports=function(e){r(e)||(e={});for(var t=arguments.length,n=1;n<t;n++){var a=arguments[n];r(a)&&i(e,a)}return e}},7853:(e,t,n)=>{"use strict";var r=n(6919);function i(e,t,n,r){var a=e.indexOf(t,n);return"\\"===e.charAt(a-1)?i(e,t,a+1):a}function a(e,t){return!0===t.keepDoubleQuotes&&'"'===e||!0===t.keepSingleQuotes&&"'"===e||t.keepQuotes}function o(e,t,n){return"function"==typeof e.keepEscaping?e.keepEscaping(t,n):!0===e.keepEscaping||"\\"===t[n+1]}e.exports=function(e,t,n){if("string"!=typeof e)throw new TypeError("expected a string");"function"==typeof t&&(n=t,t=null),"string"==typeof t&&(t={sep:t});var s,l=r({sep:"."},t),c=l.quotes||['"',"'","`"];!0===l.brackets?s={"<":">","(":")","[":"]","{":"}"}:l.brackets&&(s=l.brackets);var u,d=[],h=[],f=[""],p=l.sep,m=e.length,g=-1;function v(){if(s&&h.length)return s[h[h.length-1]]}for(;++g<m;){var y=e[g],b=e[g+1],_={val:y,idx:g,arr:f,str:e};if(d.push(_),"\\"!==y){if(s&&s[y]){h.push(y);var x=v(),w=g+1;if(-1!==e.indexOf(x,w+1))for(;h.length&&w<m;){var M=e[++w];if("\\"!==M)if(-1===c.indexOf(M)){if(x=v(),h.length&&-1===e.indexOf(x,w+1))break;s[M]?h.push(M):x===M&&h.pop()}else w=i(e,M,w+1);else M++}if(-1===(u=w)){f[f.length-1]+=y;continue}y=e.slice(g,u+1),_.val=y,_.idx=g=u}if(-1!==c.indexOf(y)){if(-1===(u=i(e,y,g+1))){f[f.length-1]+=y;continue}y=!0===a(y,l)?e.slice(g,u+1):e.slice(g+1,u),_.val=y,_.idx=g=u}"function"==typeof n&&(n(_,d),y=_.val,g=_.idx),_.val!==p||!1===_.split?f[f.length-1]+=_.val:f.push("")}else _.val=!0===o(l,e,g)?y+b:b,_.escaped=!0,"function"==typeof n&&n(_),f[f.length-1]+=_.val,g++}return f}},4881:(e,t,n)=>{"use strict";function r(e,t,n=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;const r=e.length;if(t.length!==r)return!1;for(let i=0;i<r;i++)if(!n(e[i],t[i]))return!1;return!0}n.d(t,{MA:()=>s,Rq:()=>o,ZH:()=>l});const i=[];function a(e,t,n=!1,a={}){for(const e of i)if(r(t,e.keys,e.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(e,"error"))throw e.error;if(Object.prototype.hasOwnProperty.call(e,"response"))return e.response;if(!n)throw e.promise}const o={keys:t,equal:a.equal,promise:e(...t).then((e=>o.response=e)).then((()=>{a.lifespan&&a.lifespan>0&&setTimeout((()=>{const e=i.indexOf(o);-1!==e&&i.splice(e,1)}),a.lifespan)})).catch((e=>o.error=e))};if(i.push(o),!n)throw o.promise}const o=(e,t,n)=>a(e,t,!1,n),s=(e,t,n)=>{a(e,t,!0,n)},l=e=>{if(void 0===e||0===e.length)i.splice(0,i.length);else{const t=i.find((t=>r(e,t.keys,t.equal)));if(t){const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}}},6295:(e,t,n)=>{"use strict";let r;n.d(t,{z:()=>i});const i=()=>{if(r)return r;const e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if("object"!=typeof WebAssembly)return{supported:!1};let n,i="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB";WebAssembly.validate(e)&&(i="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");const a=WebAssembly.instantiate(function(e){const n=new Uint8Array(e.length);for(let t=0;t<e.length;++t){const r=e.charCodeAt(t);n[t]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let r=0;for(let i=0;i<e.length;++i)n[r++]=n[i]<60?t[n[i]]:64*(n[i]-60)+n[++i];return n.buffer.slice(0,r)}(i),{}).then((e=>{n=e.instance,n.exports.__wasm_call_ctors()}));function o(e,t,r,i,a,o){const s=n.exports.sbrk,l=r+3&-4,c=s(l*i),u=s(a.length),d=new Uint8Array(n.exports.memory.buffer);d.set(a,u);const h=e(c,r,i,u,a.length);if(0===h&&o&&o(c,l,i),t.set(d.subarray(c,c+r*i)),s(c-s(0)),0!==h)throw new Error(`Malformed buffer data: ${h}`)}const s={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},l={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return r={ready:a,supported:!0,decodeVertexBuffer(e,t,r,i,a){o(n.exports.meshopt_decodeVertexBuffer,e,t,r,i,n.exports[s[a]])},decodeIndexBuffer(e,t,r,i){o(n.exports.meshopt_decodeIndexBuffer,e,t,r,i)},decodeIndexSequence(e,t,r,i){o(n.exports.meshopt_decodeIndexSequence,e,t,r,i)},decodeGltfBuffer(e,t,r,i,a,c){o(n.exports[l[a]],e,t,r,i,n.exports[s[c]])}},r}},4976:(e,t,n)=>{"use strict";n.d(t,{_:()=>a});var r=n(9477);const i=new WeakMap;class a extends r.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,i){const a=new r.FileLoader(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(e=>{const n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(i)}),n,i)}decodeDracoFile(e,t,n,r){const i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)}decodeGeometry(e,t){for(const e in t.attributeTypes){const n=t.attributeTypes[e];void 0!==n.BYTES_PER_ELEMENT&&(t.attributeTypes[e]=n.name)}const n=JSON.stringify(t);if(i.has(e)){const t=i.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const a=this.workerNextTaskID++,o=e.byteLength,s=this._getWorker(a,o).then((n=>(r=n,new Promise(((n,i)=>{r._callbacks[a]={resolve:n,reject:i},r.postMessage({type:"decode",id:a,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return s.catch((()=>!0)).then((()=>{r&&a&&this._releaseTask(r,a)})),i.set(e,{key:n,promise:s}),s}_createGeometry(e){const t=new r.BufferGeometry;e.index&&t.setIndex(new r.BufferAttribute(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const i=e.attributes[n],a=i.name,o=i.array,s=i.itemSize;t.setAttribute(a,new r.BufferAttribute(o,s))}return t}_loadLibrary(e,t){const n=new r.FileLoader(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise(((t,r)=>{n.load(e,t,void 0,r)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{const n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const r=o.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))})),this.decoderPending}_getWorker(e,t){return this._initDecoder().then((()=>{if(this.workerPool.length<this.workerLimit){const e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:"init",decoderConfig:this.decoderConfig}),e.onmessage=function(t){const n=t.data;switch(n.type){case"decode":e._callbacks[n.id].resolve(n);break;case"error":e._callbacks[n.id].reject(n);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+n.type+'"')}},this.workerPool.push(e)}else this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1}));const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}function o(){let e,t;function n(e,t,n,r,i,a){const o=a.num_components(),s=n.num_points()*o,l=s*i.BYTES_PER_ELEMENT,c=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,i),u=e._malloc(l);t.GetAttributeDataArrayForAllPoints(n,a,c,l,u);const d=new i(e.HEAPF32.buffer,u,s).slice();return e._free(u),{name:r,array:d,itemSize:o}}onmessage=function(r){const i=r.data;switch(i.type){case"init":e=i.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":const r=i.buffer,a=i.taskConfig;t.then((e=>{const t=e.draco,o=new t.Decoder,s=new t.DecoderBuffer;s.Init(new Int8Array(r),r.byteLength);try{const e=function(e,t,r,i){const a=i.attributeIDs,o=i.attributeTypes;let s,l;const c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)s=new e.Mesh,l=t.DecodeBufferToMesh(r,s);else{if(c!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");s=new e.PointCloud,l=t.DecodeBufferToPointCloud(r,s)}if(!l.ok()||0===s.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const u={index:null,attributes:[]};for(const r in a){const l=self[o[r]];let c,d;if(i.useUniqueIDs)d=a[r],c=t.GetAttributeByUniqueId(s,d);else{if(d=t.GetAttributeId(s,e[a[r]]),-1===d)continue;c=t.GetAttribute(s,d)}u.attributes.push(n(e,t,s,r,l,c))}return c===e.TRIANGULAR_MESH&&(u.index=function(e,t,n){const r=3*n.num_faces(),i=4*r,a=e._malloc(i);t.GetTrianglesUInt32Array(n,i,a);const o=new Uint32Array(e.HEAPF32.buffer,a,r).slice();return e._free(a),{array:o,itemSize:1}}(e,t,s)),e.destroy(s),u}(t,o,s,a),r=e.attributes.map((e=>e.array.buffer));e.index&&r.push(e.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:e},r)}catch(e){console.error(e),self.postMessage({type:"error",id:i.id,error:e.message})}finally{t.destroy(s),t.destroy(o)}}))}}}},2145:(e,t,n)=>{"use strict";n.d(t,{I:()=>o});var r=n(9477),i=n(3778);const a="colorSpace"in new r.Texture;class o extends r.DataTextureLoader{constructor(e){super(e),this.type=r.HalfFloatType}parse(e){const t=65536,n=14,o=65537,s=Math.pow(2.7182818,2.2),l={l:0,c:0,lc:0};function c(e,t,n,r,i){for(;n<e;)t=t<<8|U(r,i),n+=8;n-=e,l.l=t>>n&(1<<e)-1,l.c=t,l.lc=n}const u=new Array(59);function d(e){return 63&e}function h(e){return e>>6}const f={c:0,lc:0};function p(e,t,n,r){e=e<<8|U(n,r),t+=8,f.c=e,f.lc=t}const m={c:0,lc:0};function g(e,t,n,r,i,a,o,s,l,c){if(e==t){r<8&&(p(n,r,i,o),n=f.c,r=f.lc);var u=n>>(r-=8);if(u=new Uint8Array([u])[0],l.value+u>c)return!1;for(var d=s[l.value-1];u-- >0;)s[l.value++]=d}else{if(!(l.value<c))return!1;s[l.value++]=e}m.c=n,m.lc=r}function v(e){return 65535&e}function y(e){var t=v(e);return t>32767?t-65536:t}const b={a:0,b:0};function _(e,t){var n=y(e),r=y(t),i=n+(1&r)+(r>>1),a=i,o=i-r;b.a=a,b.b=o}function x(e,t){var n=v(e),r=v(t),i=n-(r>>1)&65535,a=r+i-32768&65535;b.a=a,b.b=i}function w(e,t,n,r,i,a,o){for(var s,l=o<16384,c=n>i?i:n,u=1;u<=c;)u<<=1;for(s=u>>=1,u>>=1;u>=1;){for(var d,h,f,p,m=0,g=m+a*(i-s),v=a*u,y=a*s,w=r*u,M=r*s;m<=g;m+=y){for(var S=m,A=m+r*(n-s);S<=A;S+=M){var E=S+w,C=(T=S+v)+w;l?(_(e[S+t],e[T+t]),d=b.a,f=b.b,_(e[E+t],e[C+t]),h=b.a,p=b.b,_(d,h),e[S+t]=b.a,e[E+t]=b.b,_(f,p),e[T+t]=b.a,e[C+t]=b.b):(x(e[S+t],e[T+t]),d=b.a,f=b.b,x(e[E+t],e[C+t]),h=b.a,p=b.b,x(d,h),e[S+t]=b.a,e[E+t]=b.b,x(f,p),e[T+t]=b.a,e[C+t]=b.b)}if(n&u){var T=S+v;l?_(e[S+t],e[T+t]):x(e[S+t],e[T+t]),d=b.a,e[T+t]=b.b,e[S+t]=d}}if(i&u)for(S=m,A=m+r*(n-s);S<=A;S+=M)E=S+w,l?_(e[S+t],e[E+t]):x(e[S+t],e[E+t]),d=b.a,e[E+t]=b.b,e[S+t]=d;s=u,u>>=1}return m}function M(e,t,r,i,a,s){var v=r.value,y=z(t,r),b=z(t,r);r.value+=4;var _=z(t,r);if(r.value+=4,y<0||y>=o||b<0||b>=o)throw"Something wrong with HUF_ENCSIZE";var x=new Array(o),w=new Array(16384);if(function(e){for(var t=0;t<16384;t++)e[t]={},e[t].len=0,e[t].lit=0,e[t].p=null}(w),function(e,t,n,r,i,a,s){for(var d=n,h=0,f=0;i<=a;i++){if(d.value-n.value>r)return!1;c(6,h,f,e,d);var p=l.l;if(h=l.c,f=l.lc,s[i]=p,63==p){if(d.value-n.value>r)throw"Something wrong with hufUnpackEncTable";c(8,h,f,e,d);var m=l.l+6;if(h=l.c,f=l.lc,i+m>a+1)throw"Something wrong with hufUnpackEncTable";for(;m--;)s[i++]=0;i--}else if(p>=59){if(i+(m=p-59+2)>a+1)throw"Something wrong with hufUnpackEncTable";for(;m--;)s[i++]=0;i--}}!function(e){for(var t=0;t<=58;++t)u[t]=0;for(t=0;t<o;++t)u[e[t]]+=1;var n=0;for(t=58;t>0;--t){var r=n+u[t]>>1;u[t]=n,n=r}for(t=0;t<o;++t){var i=e[t];i>0&&(e[t]=i|u[i]++<<6)}}(s)}(e,0,r,i-(r.value-v),y,b,x),_>8*(i-(r.value-v)))throw"Something wrong with hufUncompress";!function(e,t,r,i){for(;t<=r;t++){var a=h(e[t]),o=d(e[t]);if(a>>o)throw"Invalid table entry";if(o>n){if((u=i[a>>o-n]).len)throw"Invalid table entry";if(u.lit++,u.p){var s=u.p;u.p=new Array(u.lit);for(var l=0;l<u.lit-1;++l)u.p[l]=s[l]}else u.p=new Array(1);u.p[u.lit-1]=t}else if(o){var c=0;for(l=1<<n-o;l>0;l--){var u;if((u=i[(a<<n-o)+c]).len||u.p)throw"Invalid table entry";u.len=o,u.lit=t,c++}}}}(x,y,b,w),function(e,t,r,i,a,o,s,l,c,u){for(var v=0,y=0,b=l,_=Math.trunc(a.value+(o+7)/8);a.value<_;)for(p(v,y,r,a),v=f.c,y=f.lc;y>=n;)if((S=t[v>>y-n&16383]).len)y-=S.len,g(S.lit,s,v,y,r,0,a,c,u,b),v=m.c,y=m.lc;else{if(!S.p)throw"hufDecode issues";var x;for(x=0;x<S.lit;x++){for(var w=d(e[S.p[x]]);y<w&&a.value<_;)p(v,y,r,a),v=f.c,y=f.lc;if(y>=w&&h(e[S.p[x]])==(v>>y-w&(1<<w)-1)){y-=w,g(S.p[x],s,v,y,r,0,a,c,u,b),v=m.c,y=m.lc;break}}if(x==S.lit)throw"hufDecode issues"}var M=8-o&7;for(v>>=M,y-=M;y>0;){var S;if(!(S=t[v<<n-y&16383]).len)throw"hufDecode issues";y-=S.len,g(S.lit,s,v,y,r,0,a,c,u,b),v=m.c,y=m.lc}}(x,w,e,0,r,_,b,s,a,{value:0})}function S(e){for(var t=1;t<e.length;t++){var n=e[t-1]+e[t]-128;e[t]=n}}function A(e,t){for(var n=0,r=Math.floor((e.length+1)/2),i=0,a=e.length-1;!(i>a||(t[i++]=e[n++],i>a));)t[i++]=e[r++]}function E(e){for(var t=e.byteLength,n=new Array,r=0,i=new DataView(e);t>0;){var a=i.getInt8(r++);if(a<0){t-=1+(s=-a);for(var o=0;o<s;o++)n.push(i.getUint8(r++))}else{var s=a;t-=2;var l=i.getUint8(r++);for(o=0;o<s+1;o++)n.push(l)}}return n}function C(e,t,n){for(var r,i=1;i<64;)65280==(r=t[e.value])?i=64:r>>8==255?i+=255&r:(n[i]=r,i++),e.value++}function T(e){const t=.5*Math.cos(.7853975),n=.5*Math.cos(3.14159/16),r=.5*Math.cos(3.14159/8),i=.5*Math.cos(3*3.14159/16),a=.5*Math.cos(.981746875),o=.5*Math.cos(3*3.14159/8),s=.5*Math.cos(1.374445625);for(var l=new Array(4),c=new Array(4),u=new Array(4),d=new Array(4),h=0;h<8;++h){var f=8*h;l[0]=r*e[f+2],l[1]=o*e[f+2],l[2]=r*e[f+6],l[3]=o*e[f+6],c[0]=n*e[f+1]+i*e[f+3]+a*e[f+5]+s*e[f+7],c[1]=i*e[f+1]-s*e[f+3]-n*e[f+5]-a*e[f+7],c[2]=a*e[f+1]-n*e[f+3]+s*e[f+5]+i*e[f+7],c[3]=s*e[f+1]-a*e[f+3]+i*e[f+5]-n*e[f+7],u[0]=t*(e[f+0]+e[f+4]),u[3]=t*(e[f+0]-e[f+4]),u[1]=l[0]+l[3],u[2]=l[1]-l[2],d[0]=u[0]+u[1],d[1]=u[3]+u[2],d[2]=u[3]-u[2],d[3]=u[0]-u[1],e[f+0]=d[0]+c[0],e[f+1]=d[1]+c[1],e[f+2]=d[2]+c[2],e[f+3]=d[3]+c[3],e[f+4]=d[3]-c[3],e[f+5]=d[2]-c[2],e[f+6]=d[1]-c[1],e[f+7]=d[0]-c[0]}for(var p=0;p<8;++p)l[0]=r*e[16+p],l[1]=o*e[16+p],l[2]=r*e[48+p],l[3]=o*e[48+p],c[0]=n*e[8+p]+i*e[24+p]+a*e[40+p]+s*e[56+p],c[1]=i*e[8+p]-s*e[24+p]-n*e[40+p]-a*e[56+p],c[2]=a*e[8+p]-n*e[24+p]+s*e[40+p]+i*e[56+p],c[3]=s*e[8+p]-a*e[24+p]+i*e[40+p]-n*e[56+p],u[0]=t*(e[p]+e[32+p]),u[3]=t*(e[p]-e[32+p]),u[1]=l[0]+l[3],u[2]=l[1]-l[2],d[0]=u[0]+u[1],d[1]=u[3]+u[2],d[2]=u[3]-u[2],d[3]=u[0]-u[1],e[0+p]=d[0]+c[0],e[8+p]=d[1]+c[1],e[16+p]=d[2]+c[2],e[24+p]=d[3]+c[3],e[32+p]=d[3]-c[3],e[40+p]=d[2]-c[2],e[48+p]=d[1]-c[1],e[56+p]=d[0]-c[0]}function R(e){for(var t=0;t<64;++t){var n=e[0][t],r=e[1][t],i=e[2][t];e[0][t]=n+1.5747*i,e[1][t]=n-.1873*r-.4682*i,e[2][t]=n+1.8556*r}}function B(e,t,n){for(var i=0;i<64;++i)t[n+i]=r.DataUtils.toHalfFloat((a=e[i])<=1?Math.sign(a)*Math.pow(Math.abs(a),2.2):Math.sign(a)*Math.pow(s,Math.abs(a)-1));var a}function P(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function k(e){var t=e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size),n=new Uint8Array(E(t)),r=new Uint8Array(n.length);return S(n),A(n,r),new DataView(r.buffer)}function I(e){var t=e.array.slice(e.offset.value,e.offset.value+e.size),n=(0,i.HT)(t),r=new Uint8Array(n.length);return S(n),A(n,r),new DataView(r.buffer)}function L(e){for(var n=e.viewer,r={value:e.offset.value},i=new Uint16Array(e.width*e.scanlineBlockSize*(e.channels*e.type)),a=new Uint8Array(8192),o=0,s=new Array(e.channels),l=0;l<e.channels;l++)s[l]={},s[l].start=o,s[l].end=s[l].start,s[l].nx=e.width,s[l].ny=e.lines,s[l].size=e.type,o+=s[l].nx*s[l].ny*s[l].size;var c=J(n,r),u=J(n,r);if(u>=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(c<=u)for(l=0;l<u-c+1;l++)a[l+c]=H(n,r);var d=new Uint16Array(t),h=function(e,n){for(var r=0,i=0;i<t;++i)(0==i||e[i>>3]&1<<(7&i))&&(n[r++]=i);for(var a=r-1;r<t;)n[r++]=0;return a}(a,d),f=z(n,r);for(M(e.array,n,r,f,i,o),l=0;l<e.channels;++l)for(var p=s[l],m=0;m<s[l].size;++m)w(i,p.start+m,p.nx,p.size,p.ny,p.nx*p.size,h);!function(e,t,n){for(var r=0;r<n;++r)t[r]=e[t[r]]}(d,i,o);for(var g=0,v=new Uint8Array(i.buffer.byteLength),y=0;y<e.lines;y++)for(var b=0;b<e.channels;b++){var _=(p=s[b]).nx*p.size,x=new Uint8Array(i.buffer,2*p.end,2*_);v.set(x,g),g+=2*_,p.end+=_}return new DataView(v.buffer)}function D(e){var t=e.array.slice(e.offset.value,e.offset.value+e.size),n=(0,i.HT)(t);const r=e.lines*e.channels*e.width,a=1==e.type?new Uint16Array(r):new Uint32Array(r);let o=0,s=0;const l=new Array(4);for(let t=0;t<e.lines;t++)for(let t=0;t<e.channels;t++){let t=0;switch(e.type){case 1:l[0]=o,l[1]=l[0]+e.width,o=l[1]+e.width;for(let r=0;r<e.width;++r)t+=n[l[0]++]<<8|n[l[1]++],a[s]=t,s++;break;case 2:l[0]=o,l[1]=l[0]+e.width,l[2]=l[1]+e.width,o=l[2]+e.width;for(let r=0;r<e.width;++r)t+=n[l[0]++]<<24|n[l[1]++]<<16|n[l[2]++]<<8,a[s]=t,s++}}return new DataView(a.buffer)}function O(e){var t=e.viewer,n={value:e.offset.value},r=new Uint8Array(e.width*e.lines*(e.channels*e.type*2)),a={version:G(t,n),unknownUncompressedSize:G(t,n),unknownCompressedSize:G(t,n),acCompressedSize:G(t,n),dcCompressedSize:G(t,n),rleCompressedSize:G(t,n),rleUncompressedSize:G(t,n),rleRawSize:G(t,n),totalAcUncompressedCount:G(t,n),totalDcUncompressedCount:G(t,n),acCompression:G(t,n)};if(a.version<2)throw"EXRLoader.parse: "+Q.compression+" version "+a.version+" is unsupported";for(var o=new Array,s=J(t,n)-2;s>0;){var l=F(t.buffer,n),c=H(t,n),u=c>>2&3,d=new Int8Array([(c>>4)-1])[0],h=H(t,n);o.push({name:l,index:d,type:h,compression:u}),s-=l.length+3}for(var f=Q.channels,p=new Array(e.channels),m=0;m<e.channels;++m){var g=p[m]={},v=f[m];g.name=v.name,g.compression=0,g.decoded=!1,g.type=v.pixelType,g.pLinear=v.pLinear,g.width=e.width,g.height=e.lines}for(var y={idx:new Array(3)},b=0;b<e.channels;++b)for(g=p[b],m=0;m<o.length;++m){var _=o[m];g.name==_.name&&(g.compression=_.compression,_.index>=0&&(y.idx[_.index]=b),g.offset=b)}if(a.acCompressedSize>0)switch(a.acCompression){case 0:var x=new Uint16Array(a.totalAcUncompressedCount);M(e.array,t,n,a.acCompressedSize,x,a.totalAcUncompressedCount);break;case 1:var w=e.array.slice(n.value,n.value+a.totalAcUncompressedCount),S=(0,i.HT)(w);x=new Uint16Array(S.buffer),n.value+=a.totalAcUncompressedCount}if(a.dcCompressedSize>0){var A={array:e.array,offset:n,size:a.dcCompressedSize},P=new Uint16Array(I(A).buffer);n.value+=a.dcCompressedSize}if(a.rleRawSize>0){w=e.array.slice(n.value,n.value+a.rleCompressedSize);var k=E((S=(0,i.HT)(w)).buffer);n.value+=a.rleCompressedSize}var L=0,D=new Array(p.length);for(m=0;m<D.length;++m)D[m]=new Array;for(var O=0;O<e.lines;++O)for(var N=0;N<p.length;++N)D[N].push(L),L+=p[N].width*e.type*2;for(function(e,t,n,r,i,a){var o,s,l=new DataView(a.buffer),c=n[e.idx[0]].width,u=n[e.idx[0]].height,d=Math.floor(c/8),h=Math.ceil(c/8),f=Math.ceil(u/8),p=c-8*(h-1),m=u-8*(f-1),g={value:0},v=new Array(3),y=new Array(3),b=new Array(3),_=new Array(3),x=new Array(3);for(let n=0;n<3;++n)x[n]=t[e.idx[n]],v[n]=n<1?0:v[n-1]+h*f,y[n]=new Float32Array(64),b[n]=new Uint16Array(64),_[n]=new Uint16Array(64*h);for(let t=0;t<f;++t){var w=8;t==f-1&&(w=m);var M=8;for(let e=0;e<h;++e){e==h-1&&(M=p);for(let e=0;e<3;++e)b[e].fill(0),b[e][0]=i[v[e]++],C(g,r,b[e]),o=b[e],(s=y[e])[0]=W(o[0]),s[1]=W(o[1]),s[2]=W(o[5]),s[3]=W(o[6]),s[4]=W(o[14]),s[5]=W(o[15]),s[6]=W(o[27]),s[7]=W(o[28]),s[8]=W(o[2]),s[9]=W(o[4]),s[10]=W(o[7]),s[11]=W(o[13]),s[12]=W(o[16]),s[13]=W(o[26]),s[14]=W(o[29]),s[15]=W(o[42]),s[16]=W(o[3]),s[17]=W(o[8]),s[18]=W(o[12]),s[19]=W(o[17]),s[20]=W(o[25]),s[21]=W(o[30]),s[22]=W(o[41]),s[23]=W(o[43]),s[24]=W(o[9]),s[25]=W(o[11]),s[26]=W(o[18]),s[27]=W(o[24]),s[28]=W(o[31]),s[29]=W(o[40]),s[30]=W(o[44]),s[31]=W(o[53]),s[32]=W(o[10]),s[33]=W(o[19]),s[34]=W(o[23]),s[35]=W(o[32]),s[36]=W(o[39]),s[37]=W(o[45]),s[38]=W(o[52]),s[39]=W(o[54]),s[40]=W(o[20]),s[41]=W(o[22]),s[42]=W(o[33]),s[43]=W(o[38]),s[44]=W(o[46]),s[45]=W(o[51]),s[46]=W(o[55]),s[47]=W(o[60]),s[48]=W(o[21]),s[49]=W(o[34]),s[50]=W(o[37]),s[51]=W(o[47]),s[52]=W(o[50]),s[53]=W(o[56]),s[54]=W(o[59]),s[55]=W(o[61]),s[56]=W(o[35]),s[57]=W(o[36]),s[58]=W(o[48]),s[59]=W(o[49]),s[60]=W(o[57]),s[61]=W(o[58]),s[62]=W(o[62]),s[63]=W(o[63]),T(y[e]);R(y);for(let t=0;t<3;++t)B(y[t],_[t],64*e)}let a=0;for(let r=0;r<3;++r){const i=n[e.idx[r]].type;for(let e=8*t;e<8*t+w;++e){a=x[r][e];for(let t=0;t<d;++t){const n=64*t+8*(7&e);l.setUint16(a+0*i,_[r][n+0],!0),l.setUint16(a+2*i,_[r][n+1],!0),l.setUint16(a+4*i,_[r][n+2],!0),l.setUint16(a+6*i,_[r][n+3],!0),l.setUint16(a+8*i,_[r][n+4],!0),l.setUint16(a+10*i,_[r][n+5],!0),l.setUint16(a+12*i,_[r][n+6],!0),l.setUint16(a+14*i,_[r][n+7],!0),a+=16*i}}if(d!=h)for(let e=8*t;e<8*t+w;++e){const t=x[r][e]+8*d*2*i,n=64*d+8*(7&e);for(let e=0;e<M;++e)l.setUint16(t+2*e*i,_[r][n+e],!0)}}}for(var S=new Uint16Array(c),A=(l=new DataView(a.buffer),0);A<3;++A){n[e.idx[A]].decoded=!0;var E=n[e.idx[A]].type;if(2==n[A].type)for(var P=0;P<u;++P){const e=x[A][P];for(var k=0;k<c;++k)S[k]=l.getUint16(e+2*k*E,!0);for(k=0;k<c;++k)l.setFloat32(e+2*k*E,W(S[k]),!0)}}}(y,D,p,x,P,r),m=0;m<p.length;++m)if(!(g=p[m]).decoded){if(2!==g.compression)throw"EXRLoader.parse: unsupported channel compression";var z=0,U=0;for(O=0;O<e.lines;++O){for(var V=D[m][z],j=0;j<g.width;++j){for(var X=0;X<2*g.type;++X)r[V++]=k[U+X*g.width*g.height];U++}z++}}return new DataView(r.buffer)}function F(e,t){for(var n=new Uint8Array(e),r=0;0!=n[t.value+r];)r+=1;var i=(new TextDecoder).decode(n.slice(t.value,t.value+r));return t.value=t.value+r+1,i}function N(e,t){var n=e.getInt32(t.value,!0);return t.value=t.value+4,n}function z(e,t){var n=e.getUint32(t.value,!0);return t.value=t.value+4,n}function U(e,t){var n=e[t.value];return t.value=t.value+1,n}function H(e,t){var n=e.getUint8(t.value);return t.value=t.value+1,n}const G=function(e,t){let n;return n="getBigInt64"in DataView.prototype?Number(e.getBigInt64(t.value,!0)):e.getUint32(t.value+4,!0)+Number(e.getUint32(t.value,!0)<<32),t.value+=8,n};function V(e,t){var n=e.getFloat32(t.value,!0);return t.value+=4,n}function j(e,t){return r.DataUtils.toHalfFloat(V(e,t))}function W(e){var t=(31744&e)>>10,n=1023&e;return(e>>15?-1:1)*(t?31===t?n?NaN:1/0:Math.pow(2,t-15)*(1+n/1024):n/1024*6103515625e-14)}function J(e,t){var n=e.getUint16(t.value,!0);return t.value+=2,n}function X(e,t){return W(J(e,t))}function K(e,t,n,r,i){return"string"===r||"stringvector"===r||"iccProfile"===r?function(e,t,n){var r=(new TextDecoder).decode(new Uint8Array(e).slice(t.value,t.value+n));return t.value=t.value+n,r}(t,n,i):"chlist"===r?function(e,t,n,r){for(var i=n.value,a=[];n.value<i+r-1;){var o=F(t,n),s=N(e,n),l=H(e,n);n.value+=3;var c=N(e,n),u=N(e,n);a.push({name:o,pixelType:s,pLinear:l,xSampling:c,ySampling:u})}return n.value+=1,a}(e,t,n,i):"chromaticities"===r?function(e,t){return{redX:V(e,t),redY:V(e,t),greenX:V(e,t),greenY:V(e,t),blueX:V(e,t),blueY:V(e,t),whiteX:V(e,t),whiteY:V(e,t)}}(e,n):"compression"===r?function(e,t){return["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"][H(e,t)]}(e,n):"box2i"===r?function(e,t){return{xMin:z(e,t),yMin:z(e,t),xMax:z(e,t),yMax:z(e,t)}}(e,n):"lineOrder"===r?function(e,t){return["INCREASING_Y"][H(e,t)]}(e,n):"float"===r?V(e,n):"v2f"===r?function(e,t){return[V(e,t),V(e,t)]}(e,n):"v3f"===r?function(e,t){return[V(e,t),V(e,t),V(e,t)]}(e,n):"int"===r?N(e,n):"rational"===r?function(e,t){return[N(e,t),z(e,t)]}(e,n):"timecode"===r?function(e,t){return[z(e,t),z(e,t)]}(e,n):"preview"===r?(n.value+=i,"skipped"):void(n.value+=i)}const $=new DataView(e),Y=new Uint8Array(e),q={value:0},Q=function(e,t,n){const r={};if(20000630!=e.getUint32(0,!0))throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";r.version=e.getUint8(4);const i=e.getUint8(5);r.spec={singleTile:!!(2&i),longName:!!(4&i),deepFormat:!!(8&i),multiPart:!!(16&i)},n.value=8;for(var a=!0;a;){var o=F(t,n);if(0==o)a=!1;else{var s=F(t,n),l=K(e,t,n,s,z(e,n));void 0===l?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${s}'.`):r[o]=l}}if(0!=i)throw console.error("EXRHeader:",r),"THREE.EXRLoader: provided file is currently unsupported.";return r}($,e,q),Z=function(e,t,n,i,o){const s={size:0,viewer:t,array:n,offset:i,width:e.dataWindow.xMax-e.dataWindow.xMin+1,height:e.dataWindow.yMax-e.dataWindow.yMin+1,channels:e.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:e.channels[0].pixelType,uncompress:null,getter:null,format:null,[a?"colorSpace":"encoding"]:null};switch(e.compression){case"NO_COMPRESSION":s.lines=1,s.uncompress=P;break;case"RLE_COMPRESSION":s.lines=1,s.uncompress=k;break;case"ZIPS_COMPRESSION":s.lines=1,s.uncompress=I;break;case"ZIP_COMPRESSION":s.lines=16,s.uncompress=I;break;case"PIZ_COMPRESSION":s.lines=32,s.uncompress=L;break;case"PXR24_COMPRESSION":s.lines=16,s.uncompress=D;break;case"DWAA_COMPRESSION":s.lines=32,s.uncompress=O;break;case"DWAB_COMPRESSION":s.lines=256,s.uncompress=O;break;default:throw"EXRLoader.parse: "+e.compression+" is unsupported"}if(s.scanlineBlockSize=s.lines,1==s.type)switch(o){case r.FloatType:s.getter=X,s.inputSize=2;break;case r.HalfFloatType:s.getter=J,s.inputSize=2}else{if(2!=s.type)throw"EXRLoader.parse: unsupported pixelType "+s.type+" for "+e.compression+".";switch(o){case r.FloatType:s.getter=V,s.inputSize=4;break;case r.HalfFloatType:s.getter=j,s.inputSize=4}}s.blockCount=(e.dataWindow.yMax+1)/s.scanlineBlockSize;for(var l=0;l<s.blockCount;l++)G(t,i);s.outputChannels=3==s.channels?4:s.channels;const c=s.width*s.height*s.outputChannels;switch(o){case r.FloatType:s.byteArray=new Float32Array(c),s.channels<s.outputChannels&&s.byteArray.fill(1,0,c);break;case r.HalfFloatType:s.byteArray=new Uint16Array(c),s.channels<s.outputChannels&&s.byteArray.fill(15360,0,c);break;default:console.error("THREE.EXRLoader: unsupported type: ",o)}return s.bytesPerLine=s.width*s.inputSize*s.channels,4==s.outputChannels?s.format=r.RGBAFormat:s.format=r.RedFormat,a?s.colorSpace="srgb-linear":s.encoding=3e3,s}(Q,$,Y,q,this.type),ee={value:0},te={R:0,G:1,B:2,A:3,Y:0};for(let e=0;e<Z.height/Z.scanlineBlockSize;e++){const t=z($,q);Z.size=z($,q),Z.lines=t+Z.scanlineBlockSize>Z.height?Z.height-t:Z.scanlineBlockSize;const n=Z.size<Z.lines*Z.bytesPerLine?Z.uncompress(Z):P(Z);q.value+=Z.size;for(let t=0;t<Z.scanlineBlockSize;t++){const r=t+e*Z.scanlineBlockSize;if(r>=Z.height)break;for(let e=0;e<Z.channels;e++){const i=te[Q.channels[e].name];for(let a=0;a<Z.width;a++){ee.value=(t*(Z.channels*Z.width)+e*Z.width+a)*Z.inputSize;const o=(Z.height-1-r)*(Z.width*Z.outputChannels)+a*Z.outputChannels+i;Z.byteArray[o]=Z.getter(n,ee)}}}}return{header:Q,width:Z.width,height:Z.height,data:Z.byteArray,format:Z.format,[a?"colorSpace":"encoding"]:Z[a?"colorSpace":"encoding"],type:this.type}}setDataType(e){return this.type=e,this}load(e,t,n,i){return super.load(e,(function(e,n){a?e.colorSpace=n.colorSpace:e.encoding=n.encoding,e.minFilter=r.LinearFilter,e.magFilter=r.LinearFilter,e.generateMipmaps=!1,e.flipY=!1,t&&t(e,n)}),n,i)}}},7607:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var r=n(9477),i=n(8667);class a extends r.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new d(e)})),this.register((function(e){return new b(e)})),this.register((function(e){return new _(e)})),this.register((function(e){return new x(e)})),this.register((function(e){return new f(e)})),this.register((function(e){return new p(e)})),this.register((function(e){return new m(e)})),this.register((function(e){return new g(e)})),this.register((function(e){return new u(e)})),this.register((function(e){return new v(e)})),this.register((function(e){return new h(e)})),this.register((function(e){return new y(e)})),this.register((function(e){return new l(e)})),this.register((function(e){return new w(e)})),this.register((function(e){return new M(e)}))}load(e,t,n,i){const a=this;let o;o=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:r.LoaderUtils.extractUrlBase(e),this.manager.itemStart(e);const s=function(t){i?i(t):console.error(t),a.manager.itemError(e),a.manager.itemEnd(e)},l=new r.FileLoader(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,(function(n){try{a.parse(n,o,(function(n){t(n),a.manager.itemEnd(e)}),s)}catch(e){s(e)}}),n,s)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let a;const o={},l={};if("string"==typeof e)a=JSON.parse(e);else if(e instanceof ArrayBuffer)if(r.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4)))===S){try{o[s.KHR_BINARY_GLTF]=new A(e)}catch(e){return void(i&&i(e))}a=JSON.parse(o[s.KHR_BINARY_GLTF].content)}else a=JSON.parse(r.LoaderUtils.decodeText(new Uint8Array(e)));else a=e;if(void 0===a.asset||a.asset.version[0]<2)return void(i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const u=new X(a,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){const t=this.pluginCallbacks[e](u);l[t.name]=t,o[t.name]=!0}if(a.extensionsUsed)for(let e=0;e<a.extensionsUsed.length;++e){const t=a.extensionsUsed[e],n=a.extensionsRequired||[];switch(t){case s.KHR_MATERIALS_UNLIT:o[t]=new c;break;case s.KHR_DRACO_MESH_COMPRESSION:o[t]=new E(a,this.dracoLoader);break;case s.KHR_TEXTURE_TRANSFORM:o[t]=new C;break;case s.KHR_MESH_QUANTIZATION:o[t]=new T;break;default:n.indexOf(t)>=0&&void 0===l[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}u.setExtensions(o),u.setPlugins(l),u.parse(n,i)}parseAsync(e,t){const n=this;return new Promise((function(r,i){n.parse(e,t,r,i)}))}}function o(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const s={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class l{constructor(e){this.parser=e,this.name=s.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n];r.extensions&&r.extensions[this.name]&&void 0!==r.extensions[this.name].light&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let i=t.cache.get(n);if(i)return i;const a=t.json,o=((a.extensions&&a.extensions[this.name]||{}).lights||[])[e];let s;const l=new r.Color(16777215);void 0!==o.color&&l.fromArray(o.color);const c=void 0!==o.range?o.range:0;switch(o.type){case"directional":s=new r.DirectionalLight(l),s.target.position.set(0,0,-1),s.add(s.target);break;case"point":s=new r.PointLight(l),s.distance=c;break;case"spot":s=new r.SpotLight(l),s.distance=c,o.spot=o.spot||{},o.spot.innerConeAngle=void 0!==o.spot.innerConeAngle?o.spot.innerConeAngle:0,o.spot.outerConeAngle=void 0!==o.spot.outerConeAngle?o.spot.outerConeAngle:Math.PI/4,s.angle=o.spot.outerConeAngle,s.penumbra=1-o.spot.innerConeAngle/o.spot.outerConeAngle,s.target.position.set(0,0,-1),s.add(s.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+o.type)}return s.position.set(0,0,0),s.decay=2,H(s,o),void 0!==o.intensity&&(s.intensity=o.intensity),s.name=t.createUniqueName(o.name||"light_"+e),i=Promise.resolve(s),t.cache.add(n,i),i}getDependency(e,t){if("light"===e)return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,r=n.json.nodes[e],i=(r.extensions&&r.extensions[this.name]||{}).light;return void 0===i?null:this._loadLight(i).then((function(e){return n._getNodeRef(t.cache,i,e)}))}}class c{constructor(){this.name=s.KHR_MATERIALS_UNLIT}getMaterialType(){return r.MeshBasicMaterial}extendParams(e,t,n){const i=[];e.color=new r.Color(1,1,1),e.opacity=1;const a=t.pbrMetallicRoughness;if(a){if(Array.isArray(a.baseColorFactor)){const t=a.baseColorFactor;e.color.fromArray(t),e.opacity=t[3]}void 0!==a.baseColorTexture&&i.push(n.assignTexture(e,"map",a.baseColorTexture,3001))}return Promise.all(i)}}class u{constructor(e){this.parser=e,this.name=s.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name].emissiveStrength;return void 0!==r&&(t.emissiveIntensity=r),Promise.resolve()}}class d{constructor(e){this.parser=e,this.name=s.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],o=i.extensions[this.name];if(void 0!==o.clearcoatFactor&&(t.clearcoat=o.clearcoatFactor),void 0!==o.clearcoatTexture&&a.push(n.assignTexture(t,"clearcoatMap",o.clearcoatTexture)),void 0!==o.clearcoatRoughnessFactor&&(t.clearcoatRoughness=o.clearcoatRoughnessFactor),void 0!==o.clearcoatRoughnessTexture&&a.push(n.assignTexture(t,"clearcoatRoughnessMap",o.clearcoatRoughnessTexture)),void 0!==o.clearcoatNormalTexture&&(a.push(n.assignTexture(t,"clearcoatNormalMap",o.clearcoatNormalTexture)),void 0!==o.clearcoatNormalTexture.scale)){const e=o.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new r.Vector2(e,e)}return Promise.all(a)}}class h{constructor(e){this.parser=e,this.name=s.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];return void 0!==a.iridescenceFactor&&(t.iridescence=a.iridescenceFactor),void 0!==a.iridescenceTexture&&i.push(n.assignTexture(t,"iridescenceMap",a.iridescenceTexture)),void 0!==a.iridescenceIor&&(t.iridescenceIOR=a.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==a.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=a.iridescenceThicknessMinimum),void 0!==a.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=a.iridescenceThicknessMaximum),void 0!==a.iridescenceThicknessTexture&&i.push(n.assignTexture(t,"iridescenceThicknessMap",a.iridescenceThicknessTexture)),Promise.all(i)}}class f{constructor(e){this.parser=e,this.name=s.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[];t.sheenColor=new r.Color(0,0,0),t.sheenRoughness=0,t.sheen=1;const o=i.extensions[this.name];return void 0!==o.sheenColorFactor&&t.sheenColor.fromArray(o.sheenColorFactor),void 0!==o.sheenRoughnessFactor&&(t.sheenRoughness=o.sheenRoughnessFactor),void 0!==o.sheenColorTexture&&a.push(n.assignTexture(t,"sheenColorMap",o.sheenColorTexture,3001)),void 0!==o.sheenRoughnessTexture&&a.push(n.assignTexture(t,"sheenRoughnessMap",o.sheenRoughnessTexture)),Promise.all(a)}}class p{constructor(e){this.parser=e,this.name=s.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];return void 0!==a.transmissionFactor&&(t.transmission=a.transmissionFactor),void 0!==a.transmissionTexture&&i.push(n.assignTexture(t,"transmissionMap",a.transmissionTexture)),Promise.all(i)}}class m{constructor(e){this.parser=e,this.name=s.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],o=i.extensions[this.name];t.thickness=void 0!==o.thicknessFactor?o.thicknessFactor:0,void 0!==o.thicknessTexture&&a.push(n.assignTexture(t,"thicknessMap",o.thicknessTexture)),t.attenuationDistance=o.attenuationDistance||1/0;const s=o.attenuationColor||[1,1,1];return t.attenuationColor=new r.Color(s[0],s[1],s[2]),Promise.all(a)}}class g{constructor(e){this.parser=e,this.name=s.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name];return t.ior=void 0!==r.ior?r.ior:1.5,Promise.resolve()}}class v{constructor(e){this.parser=e,this.name=s.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],o=i.extensions[this.name];t.specularIntensity=void 0!==o.specularFactor?o.specularFactor:1,void 0!==o.specularTexture&&a.push(n.assignTexture(t,"specularIntensityMap",o.specularTexture));const s=o.specularColorFactor||[1,1,1];return t.specularColor=new r.Color(s[0],s[1],s[2]),void 0!==o.specularColorTexture&&a.push(n.assignTexture(t,"specularColorMap",o.specularColorTexture,3001)),Promise.all(a)}}class y{constructor(e){this.parser=e,this.name=s.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];return void 0!==a.anisotropyStrength&&(t.anisotropy=a.anisotropyStrength),void 0!==a.anisotropyRotation&&(t.anisotropyRotation=a.anisotropyRotation),void 0!==a.anisotropyTexture&&i.push(n.assignTexture(t,"anisotropyMap",a.anisotropyTexture)),Promise.all(i)}}class b{constructor(e){this.parser=e,this.name=s.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const i=r.extensions[this.name],a=t.options.ktx2Loader;if(!a){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,a)}}class _{constructor(e){this.parser=e,this.name=s.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const a=i.extensions[t],o=r.images[a.source];let s=n.textureLoader;if(o.uri){const e=n.options.manager.getHandler(o.uri);null!==e&&(s=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,a.source,s);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class x{constructor(e){this.parser=e,this.name=s.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const a=i.extensions[t],o=r.images[a.source];let s=n.textureLoader;if(o.uri){const e=n.options.manager.getHandler(o.uri);null!==e&&(s=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,a.source,s);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class w{constructor(e){this.name=s.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const e=n.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then((function(t){const n=e.byteOffset||0,r=e.byteLength||0,a=e.count,o=e.byteStride,s=new Uint8Array(t,n,r);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(a,o,s,e.mode,e.filter).then((function(e){return e.buffer})):i.ready.then((function(){const t=new ArrayBuffer(a*o);return i.decodeGltfBuffer(new Uint8Array(t),a,o,s,e.mode,e.filter),t}))}))}return null}}class M{constructor(e){this.name=s.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||void 0===n.mesh)return null;const i=t.meshes[n.mesh];for(const e of i.primitives)if(e.mode!==k.TRIANGLES&&e.mode!==k.TRIANGLE_STRIP&&e.mode!==k.TRIANGLE_FAN&&void 0!==e.mode)return null;const a=n.extensions[this.name].attributes,o=[],s={};for(const e in a)o.push(this.parser.getDependency("accessor",a[e]).then((t=>(s[e]=t,s[e]))));return o.length<1?null:(o.push(this.parser.createNodeMesh(e)),Promise.all(o).then((e=>{const t=e.pop(),n=t.isGroup?t.children:[t],i=e[0].count,a=[];for(const e of n){const t=new r.Matrix4,n=new r.Vector3,o=new r.Quaternion,l=new r.Vector3(1,1,1),c=new r.InstancedMesh(e.geometry,e.material,i);for(let e=0;e<i;e++)s.TRANSLATION&&n.fromBufferAttribute(s.TRANSLATION,e),s.ROTATION&&o.fromBufferAttribute(s.ROTATION,e),s.SCALE&&l.fromBufferAttribute(s.SCALE,e),c.setMatrixAt(e,t.compose(n,o,l));for(const t in s)"TRANSLATION"!==t&&"ROTATION"!==t&&"SCALE"!==t&&e.geometry.setAttribute(t,s[t]);r.Object3D.prototype.copy.call(c,e),this.parser.assignFinalMaterial(c),a.push(c)}return t.isGroup?(t.clear(),t.add(...a),t):a[0]})))}}const S="glTF";class A{constructor(e){this.name=s.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12);if(this.header={magic:r.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==S)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-12,i=new DataView(e,12);let a=0;for(;a<n;){const t=i.getUint32(a,!0);a+=4;const n=i.getUint32(a,!0);if(a+=4,1313821514===n){const n=new Uint8Array(e,12+a,t);this.content=r.LoaderUtils.decodeText(n)}else if(5130562===n){const n=12+a;this.body=e.slice(n,n+t)}a+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class E{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=s.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,a=e.extensions[this.name].attributes,o={},s={},l={};for(const e in a){const t=F[e]||e.toLowerCase();o[t]=a[e]}for(const t in e.attributes){const r=F[t]||t.toLowerCase();if(void 0!==a[t]){const i=n.accessors[e.attributes[t]],a=I[i.componentType];l[r]=a.name,s[r]=!0===i.normalized}}return t.getDependency("bufferView",i).then((function(e){return new Promise((function(t){r.decodeDracoFile(e,(function(e){for(const t in e.attributes){const n=e.attributes[t],r=s[t];void 0!==r&&(n.normalized=r)}t(e)}),o,l)}))}))}}class C{constructor(){this.name=s.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return void 0!==t.texCoord&&t.texCoord!==e.channel||void 0!==t.offset||void 0!==t.rotation||void 0!==t.scale?(e=e.clone(),void 0!==t.texCoord&&(e.channel=t.texCoord),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0,e):e}}class T{constructor(){this.name=s.KHR_MESH_QUANTIZATION}}class R extends r.Interpolant{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r;for(let e=0;e!==r;e++)t[e]=n[i+e];return t}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=2*o,l=3*o,c=r-t,u=(n-t)/c,d=u*u,h=d*u,f=e*l,p=f-l,m=-2*h+3*d,g=h-d,v=1-m,y=g-d+u;for(let e=0;e!==o;e++){const t=a[p+e+o],n=a[p+e+s]*c,r=a[f+e+o],l=a[f+e]*c;i[e]=v*t+y*n+m*r+g*l}return i}}const B=new r.Quaternion;class P extends R{interpolate_(e,t,n,r){const i=super.interpolate_(e,t,n,r);return B.fromArray(i).normalize().toArray(i),i}}const k={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},I={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},L={9728:r.NearestFilter,9729:r.LinearFilter,9984:r.NearestMipmapNearestFilter,9985:r.LinearMipmapNearestFilter,9986:r.NearestMipmapLinearFilter,9987:r.LinearMipmapLinearFilter},D={33071:r.ClampToEdgeWrapping,33648:r.MirroredRepeatWrapping,10497:r.RepeatWrapping},O={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},F={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...r.REVISION.replace(/\D+/g,"")>=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},N={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},z={CUBICSPLINE:void 0,LINEAR:r.InterpolateLinear,STEP:r.InterpolateDiscrete};function U(e,t,n){for(const r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function H(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function G(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){const n=t.extras.targetNames;if(e.morphTargetInfluences.length===n.length){e.morphTargetDictionary={};for(let t=0,r=n.length;t<r;t++)e.morphTargetDictionary[n[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function V(e){let t;const n=e.extensions&&e.extensions[s.KHR_DRACO_MESH_COMPRESSION];if(t=n?"draco:"+n.bufferView+":"+n.indices+":"+j(n.attributes):e.indices+":"+j(e.attributes)+":"+e.mode,void 0!==e.targets)for(let n=0,r=e.targets.length;n<r;n++)t+=":"+j(e.targets[n]);return t}function j(e){let t="";const n=Object.keys(e).sort();for(let r=0,i=n.length;r<i;r++)t+=n[r]+":"+e[n[r]]+";";return t}function W(e){switch(e){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}const J=new r.Matrix4;class X{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new o,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,i=!1,a=-1;"undefined"!=typeof navigator&&(n=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),i=navigator.userAgent.indexOf("Firefox")>-1,a=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||n||i&&a<98?this.textureLoader=new r.TextureLoader(this.options.manager):this.textureLoader=new r.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new r.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])})).then((function(t){const a={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};U(i,a,r),H(a,r),Promise.all(n._invokeAll((function(e){return e.afterRoot&&e.afterRoot(a)}))).then((function(){e(a)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n].joints;for(let t=0,n=r.length;t<n;t++)e[r[t]].isBone=!0}for(let t=0,r=e.length;t<r;t++){const r=e[t];void 0!==r.mesh&&(this._addNodeRef(this.meshCache,r.mesh),void 0!==r.skin&&(n[r.mesh].isSkinnedMesh=!0)),void 0!==r.camera&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const r=n.clone(),i=(e,t)=>{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[n,r]of e.children.entries())i(r,t.children[n])};return i(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i&&n.push(i)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne((function(e){return e.loadNode&&e.loadNode(t)}));break;case"mesh":r=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":r=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne((function(e){return e.loadAnimation&&e.loadAnimation(t)}));break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne((function(n){return n!=this&&n.getDependency&&n.getDependency(e,t)})),!r)throw new Error("Unknown type: "+e)}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(r.map((function(t,r){return n.getDependency(e,r)}))),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[s.KHR_BINARY_GLTF].body);const i=this.options;return new Promise((function(e,a){n.load(r.LoaderUtils.resolveURL(t.uri,i.path),e,void 0,(function(){a(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){const n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)}))}loadAccessor(e){const t=this,n=this.json,i=this.json.accessors[e];if(void 0===i.bufferView&&void 0===i.sparse){const e=O[i.type],t=I[i.componentType],n=!0===i.normalized,a=new t(i.count*e);return Promise.resolve(new r.BufferAttribute(a,e,n))}const a=[];return void 0!==i.bufferView?a.push(this.getDependency("bufferView",i.bufferView)):a.push(null),void 0!==i.sparse&&(a.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),a.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(a).then((function(e){const a=e[0],o=O[i.type],s=I[i.componentType],l=s.BYTES_PER_ELEMENT,c=l*o,u=i.byteOffset||0,d=void 0!==i.bufferView?n.bufferViews[i.bufferView].byteStride:void 0,h=!0===i.normalized;let f,p;if(d&&d!==c){const e=Math.floor(u/d),n="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+e+":"+i.count;let c=t.cache.get(n);c||(f=new s(a,e*d,i.count*d/l),c=new r.InterleavedBuffer(f,d/l),t.cache.add(n,c)),p=new r.InterleavedBufferAttribute(c,o,u%d/l,h)}else f=null===a?new s(i.count*o):new s(a,u,i.count*o),p=new r.BufferAttribute(f,o,h);if(void 0!==i.sparse){const t=O.SCALAR,n=I[i.sparse.indices.componentType],l=i.sparse.indices.byteOffset||0,c=i.sparse.values.byteOffset||0,u=new n(e[1],l,i.sparse.count*t),d=new s(e[2],c,i.sparse.count*o);null!==a&&(p=new r.BufferAttribute(p.array.slice(),p.itemSize,p.normalized));for(let e=0,t=u.length;e<t;e++){const t=u[e];if(p.setX(t,d[e*o]),o>=2&&p.setY(t,d[e*o+1]),o>=3&&p.setZ(t,d[e*o+2]),o>=4&&p.setW(t,d[e*o+3]),o>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return p}))}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,i=t.images[r];let a=this.textureLoader;if(i.uri){const e=n.manager.getHandler(i.uri);null!==e&&(a=e)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,t,n){const i=this,a=this.json,o=a.textures[e],s=a.images[t],l=(s.uri||s.bufferView)+":"+o.sampler;if(this.textureCache[l])return this.textureCache[l];const c=this.loadImageSource(t,n).then((function(t){t.flipY=!1,t.name=o.name||s.name||"",""===t.name&&"string"==typeof s.uri&&!1===s.uri.startsWith("data:image/")&&(t.name=s.uri);const n=(a.samplers||{})[o.sampler]||{};return t.magFilter=L[n.magFilter]||r.LinearFilter,t.minFilter=L[n.minFilter]||r.LinearMipmapLinearFilter,t.wrapS=D[n.wrapS]||r.RepeatWrapping,t.wrapT=D[n.wrapT]||r.RepeatWrapping,i.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[l]=c,c}loadImageSource(e,t){const n=this.json,i=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const a=n.images[e],o=self.URL||self.webkitURL;let s=a.uri||"",l=!1;if(void 0!==a.bufferView)s=this.getDependency("bufferView",a.bufferView).then((function(e){l=!0;const t=new Blob([e],{type:a.mimeType});return s=o.createObjectURL(t),s}));else if(void 0===a.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const c=Promise.resolve(s).then((function(e){return new Promise((function(n,a){let o=n;!0===t.isImageBitmapLoader&&(o=function(e){const t=new r.Texture(e);t.needsUpdate=!0,n(t)}),t.load(r.LoaderUtils.resolveURL(e,i.path),o,void 0,a)}))})).then((function(e){var t;return!0===l&&o.revokeObjectURL(s),e.userData.mimeType=a.mimeType||((t=a.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",s),e}));return this.sourceCache[e]=c,c}assignTexture(e,t,n,r){const i=this;return this.getDependency("texture",n.index).then((function(a){if(!a)return null;if(void 0!==n.texCoord&&n.texCoord>0&&((a=a.clone()).channel=n.texCoord),i.extensions[s.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[s.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=i.associations.get(a);a=i.extensions[s.KHR_TEXTURE_TRANSFORM].extendTexture(a,e),i.associations.set(a,t)}}return void 0!==r&&("colorSpace"in a?a.colorSpace=3001===r?"srgb":"srgb-linear":a.encoding=r),e[t]=a,a}))}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const i=void 0===t.attributes.tangent,a=void 0!==t.attributes.color,o=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new r.PointsMaterial,r.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e="LineBasicMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new r.LineBasicMaterial,r.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,this.cache.add(e,t)),n=t}if(i||a||o){let e="ClonedMaterial:"+n.uuid+":";i&&(e+="derivative-tangents:"),a&&(e+="vertex-colors:"),o&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),a&&(t.vertexColors=!0),o&&(t.flatShading=!0),i&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}e.material=n}getMaterialType(){return r.MeshStandardMaterial}loadMaterial(e){const t=this,n=this.json,i=this.extensions,a=n.materials[e];let o;const l={},c=[];if((a.extensions||{})[s.KHR_MATERIALS_UNLIT]){const e=i[s.KHR_MATERIALS_UNLIT];o=e.getMaterialType(),c.push(e.extendParams(l,a,t))}else{const n=a.pbrMetallicRoughness||{};if(l.color=new r.Color(1,1,1),l.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;l.color.fromArray(e),l.opacity=e[3]}void 0!==n.baseColorTexture&&c.push(t.assignTexture(l,"map",n.baseColorTexture,3001)),l.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,l.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(c.push(t.assignTexture(l,"metalnessMap",n.metallicRoughnessTexture)),c.push(t.assignTexture(l,"roughnessMap",n.metallicRoughnessTexture))),o=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),c.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,l)}))))}!0===a.doubleSided&&(l.side=r.DoubleSide);const u=a.alphaMode||"OPAQUE";if("BLEND"===u?(l.transparent=!0,l.depthWrite=!1):(l.transparent=!1,"MASK"===u&&(l.alphaTest=void 0!==a.alphaCutoff?a.alphaCutoff:.5)),void 0!==a.normalTexture&&o!==r.MeshBasicMaterial&&(c.push(t.assignTexture(l,"normalMap",a.normalTexture)),l.normalScale=new r.Vector2(1,1),void 0!==a.normalTexture.scale)){const e=a.normalTexture.scale;l.normalScale.set(e,e)}return void 0!==a.occlusionTexture&&o!==r.MeshBasicMaterial&&(c.push(t.assignTexture(l,"aoMap",a.occlusionTexture)),void 0!==a.occlusionTexture.strength&&(l.aoMapIntensity=a.occlusionTexture.strength)),void 0!==a.emissiveFactor&&o!==r.MeshBasicMaterial&&(l.emissive=(new r.Color).fromArray(a.emissiveFactor)),void 0!==a.emissiveTexture&&o!==r.MeshBasicMaterial&&c.push(t.assignTexture(l,"emissiveMap",a.emissiveTexture,3001)),Promise.all(c).then((function(){const n=new o(l);return a.name&&(n.name=a.name),H(n,a),t.associations.set(n,{materials:e}),a.extensions&&U(i,n,a),n}))}createUniqueName(e){const t=r.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,i=this.primitiveCache;function a(e){return n[s.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return K(n,e,t)}))}const o=[];for(let n=0,l=e.length;n<l;n++){const l=e[n],c=V(l),u=i[c];if(u)o.push(u.promise);else{let e;e=l.extensions&&l.extensions[s.KHR_DRACO_MESH_COMPRESSION]?a(l):K(new r.BufferGeometry,l,t),i[c]={primitive:l,promise:e},o.push(e)}}return Promise.all(o)}loadMesh(e){const t=this,n=this.json,a=this.extensions,o=n.meshes[e],s=o.primitives,l=[];for(let e=0,t=s.length;e<t;e++){const t=void 0===s[e].material?(void 0===(c=this.cache).DefaultMaterial&&(c.DefaultMaterial=new r.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:r.FrontSide})),c.DefaultMaterial):this.getDependency("material",s[e].material);l.push(t)}var c;return l.push(t.loadGeometries(s)),Promise.all(l).then((function(n){const l=n.slice(0,n.length-1),c=n[n.length-1],u=[];for(let n=0,d=c.length;n<d;n++){const d=c[n],h=s[n];let f;const p=l[n];if(h.mode===k.TRIANGLES||h.mode===k.TRIANGLE_STRIP||h.mode===k.TRIANGLE_FAN||void 0===h.mode)f=!0===o.isSkinnedMesh?new r.SkinnedMesh(d,p):new r.Mesh(d,p),!0===f.isSkinnedMesh&&f.normalizeSkinWeights(),h.mode===k.TRIANGLE_STRIP?f.geometry=(0,i.Vs)(f.geometry,r.TriangleStripDrawMode):h.mode===k.TRIANGLE_FAN&&(f.geometry=(0,i.Vs)(f.geometry,r.TriangleFanDrawMode));else if(h.mode===k.LINES)f=new r.LineSegments(d,p);else if(h.mode===k.LINE_STRIP)f=new r.Line(d,p);else if(h.mode===k.LINE_LOOP)f=new r.LineLoop(d,p);else{if(h.mode!==k.POINTS)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+h.mode);f=new r.Points(d,p)}Object.keys(f.geometry.morphAttributes).length>0&&G(f,o),f.name=t.createUniqueName(o.name||"mesh_"+e),H(f,o),h.extensions&&U(a,f,h),t.assignFinalMaterial(f),u.push(f)}for(let n=0,r=u.length;n<r;n++)t.associations.set(u[n],{meshes:e,primitives:n});if(1===u.length)return o.extensions&&U(a,u[0],o),u[0];const d=new r.Group;o.extensions&&U(a,d,o),t.associations.set(d,{meshes:e});for(let e=0,t=u.length;e<t;e++)d.add(u[e]);return d}))}loadCamera(e){let t;const n=this.json.cameras[e],i=n[n.type];if(i)return"perspective"===n.type?t=new r.PerspectiveCamera(r.MathUtils.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):"orthographic"===n.type&&(t=new r.OrthographicCamera(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),H(t,n),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){const t=this.json.skins[e],n=[];for(let e=0,r=t.joints.length;e<r;e++)n.push(this._loadNodeShallow(t.joints[e]));return void 0!==t.inverseBindMatrices?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then((function(e){const n=e.pop(),i=e,a=[],o=[];for(let e=0,s=i.length;e<s;e++){const s=i[e];if(s){a.push(s);const t=new r.Matrix4;null!==n&&t.fromArray(n.array,16*e),o.push(t)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[e])}return new r.Skeleton(a,o)}))}loadAnimation(e){const t=this.json.animations[e],n=t.name?t.name:"animation_"+e,i=[],a=[],o=[],s=[],l=[];for(let e=0,n=t.channels.length;e<n;e++){const n=t.channels[e],r=t.samplers[n.sampler],c=n.target,u=c.node,d=void 0!==t.parameters?t.parameters[r.input]:r.input,h=void 0!==t.parameters?t.parameters[r.output]:r.output;void 0!==c.node&&(i.push(this.getDependency("node",u)),a.push(this.getDependency("accessor",d)),o.push(this.getDependency("accessor",h)),s.push(r),l.push(c))}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(o),Promise.all(s),Promise.all(l)]).then((function(e){const t=e[0],i=e[1],a=e[2],o=e[3],s=e[4],l=[];for(let e=0,n=t.length;e<n;e++){const n=t[e],c=i[e],u=a[e],d=o[e],h=s[e];if(void 0===n)continue;let f;switch(n.updateMatrix(),N[h.path]){case N.weights:f=r.NumberKeyframeTrack;break;case N.rotation:f=r.QuaternionKeyframeTrack;break;default:f=r.VectorKeyframeTrack}const p=n.name?n.name:n.uuid,m=void 0!==d.interpolation?z[d.interpolation]:r.InterpolateLinear,g=[];N[h.path]===N.weights?n.traverse((function(e){e.morphTargetInfluences&&g.push(e.name?e.name:e.uuid)})):g.push(p);let v=u.array;if(u.normalized){const e=W(v.constructor),t=new Float32Array(v.length);for(let n=0,r=v.length;n<r;n++)t[n]=v[n]*e;v=t}for(let e=0,t=g.length;e<t;e++){const t=new f(g[e]+"."+N[h.path],c.array,v,m);"CUBICSPLINE"===d.interpolation&&(t.createInterpolant=function(e){return new(this instanceof r.QuaternionKeyframeTrack?P:R)(this.times,this.values,this.getValueSize()/3,e)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(t)}}return new r.AnimationClip(n,void 0,l)}))}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return void 0===r.mesh?null:n.getDependency("mesh",r.mesh).then((function(e){const t=n._getNodeRef(n.meshCache,r.mesh,e);return void 0!==r.weights&&t.traverse((function(e){if(e.isMesh)for(let t=0,n=r.weights.length;t<n;t++)e.morphTargetInfluences[t]=r.weights[t]})),t}))}loadNode(e){const t=this,n=this.json.nodes[e],r=t._loadNodeShallow(e),i=[],a=n.children||[];for(let e=0,n=a.length;e<n;e++)i.push(t.getDependency("node",a[e]));const o=void 0===n.skin?Promise.resolve(null):t.getDependency("skin",n.skin);return Promise.all([r,Promise.all(i),o]).then((function(e){const t=e[0],n=e[1],r=e[2];null!==r&&t.traverse((function(e){e.isSkinnedMesh&&e.bind(r,J)}));for(let e=0,r=n.length;e<r;e++)t.add(n[e]);return t}))}_loadNodeShallow(e){const t=this.json,n=this.extensions,i=this;if(void 0!==this.nodeCache[e])return this.nodeCache[e];const a=t.nodes[e],o=a.name?i.createUniqueName(a.name):"",s=[],l=i._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));return l&&s.push(l),void 0!==a.camera&&s.push(i.getDependency("camera",a.camera).then((function(e){return i._getNodeRef(i.cameraCache,a.camera,e)}))),i._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){s.push(e)})),this.nodeCache[e]=Promise.all(s).then((function(t){let s;if(s=!0===a.isBone?new r.Bone:t.length>1?new r.Group:1===t.length?t[0]:new r.Object3D,s!==t[0])for(let e=0,n=t.length;e<n;e++)s.add(t[e]);if(a.name&&(s.userData.name=a.name,s.name=o),H(s,a),a.extensions&&U(n,s,a),void 0!==a.matrix){const e=new r.Matrix4;e.fromArray(a.matrix),s.applyMatrix4(e)}else void 0!==a.translation&&s.position.fromArray(a.translation),void 0!==a.rotation&&s.quaternion.fromArray(a.rotation),void 0!==a.scale&&s.scale.fromArray(a.scale);return i.associations.has(s)||i.associations.set(s,{}),i.associations.get(s).nodes=e,s})),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],i=this,a=new r.Group;n.name&&(a.name=i.createUniqueName(n.name)),H(a,n),n.extensions&&U(t,a,n);const o=n.nodes||[],s=[];for(let e=0,t=o.length;e<t;e++)s.push(i.getDependency("node",o[e]));return Promise.all(s).then((function(e){for(let t=0,n=e.length;t<n;t++)a.add(e[t]);return i.associations=(e=>{const t=new Map;for(const[e,n]of i.associations)(e instanceof r.Material||e instanceof r.Texture)&&t.set(e,n);return e.traverse((e=>{const n=i.associations.get(e);null!=n&&t.set(e,n)})),t})(a),a}))}}function K(e,t,n){const i=t.attributes,a=[];function o(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(const t in i){const n=F[t]||t.toLowerCase();n in e.attributes||a.push(o(i[t],n))}if(void 0!==t.indices&&!e.index){const r=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));a.push(r)}return H(e,t),function(e,t,n){const i=t.attributes,a=new r.Box3;if(void 0===i.POSITION)return;{const e=n.json.accessors[i.POSITION],t=e.min,o=e.max;if(void 0===t||void 0===o)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(a.set(new r.Vector3(t[0],t[1],t[2]),new r.Vector3(o[0],o[1],o[2])),e.normalized){const t=W(I[e.componentType]);a.min.multiplyScalar(t),a.max.multiplyScalar(t)}}const o=t.targets;if(void 0!==o){const e=new r.Vector3,t=new r.Vector3;for(let r=0,i=o.length;r<i;r++){const i=o[r];if(void 0!==i.POSITION){const r=n.json.accessors[i.POSITION],a=r.min,o=r.max;if(void 0!==a&&void 0!==o){if(t.setX(Math.max(Math.abs(a[0]),Math.abs(o[0]))),t.setY(Math.max(Math.abs(a[1]),Math.abs(o[1]))),t.setZ(Math.max(Math.abs(a[2]),Math.abs(o[2]))),r.normalized){const e=W(I[r.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}a.expandByVector(e)}e.boundingBox=a;const s=new r.Sphere;a.getCenter(s.center),s.radius=a.min.distanceTo(a.max)/2,e.boundingSphere=s}(e,t,n),Promise.all(a).then((function(){return void 0!==t.targets?function(e,t,n){let r=!1,i=!1,a=!1;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(void 0!==n.POSITION&&(r=!0),void 0!==n.NORMAL&&(i=!0),void 0!==n.COLOR_0&&(a=!0),r&&i&&a)break}if(!r&&!i&&!a)return Promise.resolve(e);const o=[],s=[],l=[];for(let c=0,u=t.length;c<u;c++){const u=t[c];if(r){const t=void 0!==u.POSITION?n.getDependency("accessor",u.POSITION):e.attributes.position;o.push(t)}if(i){const t=void 0!==u.NORMAL?n.getDependency("accessor",u.NORMAL):e.attributes.normal;s.push(t)}if(a){const t=void 0!==u.COLOR_0?n.getDependency("accessor",u.COLOR_0):e.attributes.color;l.push(t)}}return Promise.all([Promise.all(o),Promise.all(s),Promise.all(l)]).then((function(t){const n=t[0],o=t[1],s=t[2];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=o),a&&(e.morphAttributes.color=s),e.morphTargetsRelative=!0,e}))}(e,t.targets,n):e}))}},8197:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});var r=n(9477);class i extends r.DataTextureLoader{constructor(e){super(e),this.type=r.HalfFloatType}parse(e){const t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},n=function(e,t,n){t=t||1024;let r=e.pos,i=-1,a=0,o="",s=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));for(;0>(i=s.indexOf("\n"))&&a<t&&r<e.byteLength;)o+=s,a+=s.length,r+=128,s+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));return-1<i&&(!1!==n&&(e.pos+=a+i+1),o+s.slice(0,i))},i=function(e,t,n,r){const i=e[t+3],a=Math.pow(2,i-128)/255;n[r+0]=e[t+0]*a,n[r+1]=e[t+1]*a,n[r+2]=e[t+2]*a,n[r+3]=1},a=function(e,t,n,i){const a=e[t+3],o=Math.pow(2,a-128)/255;n[i+0]=r.DataUtils.toHalfFloat(Math.min(e[t+0]*o,65504)),n[i+1]=r.DataUtils.toHalfFloat(Math.min(e[t+1]*o,65504)),n[i+2]=r.DataUtils.toHalfFloat(Math.min(e[t+2]*o,65504)),n[i+3]=r.DataUtils.toHalfFloat(1)},o=new Uint8Array(e);o.pos=0;const s=function(e){const r=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,i=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,a=/^\s*FORMAT=(\S+)\s*$/,o=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,s={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let l,c;if(e.pos>=e.byteLength||!(l=n(e)))return t(1,"no header found");if(!(c=l.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(s.valid|=1,s.programtype=c[1],s.string+=l+"\n";l=n(e),!1!==l;)if(s.string+=l+"\n","#"!==l.charAt(0)){if((c=l.match(r))&&(s.gamma=parseFloat(c[1])),(c=l.match(i))&&(s.exposure=parseFloat(c[1])),(c=l.match(a))&&(s.valid|=2,s.format=c[1]),(c=l.match(o))&&(s.valid|=4,s.height=parseInt(c[1],10),s.width=parseInt(c[2],10)),2&s.valid&&4&s.valid)break}else s.comments+=l+"\n";return 2&s.valid?4&s.valid?s:t(3,"missing image size specifier"):t(3,"missing format specifier")}(o);if(-1!==s){const e=s.width,n=s.height,l=function(e,n,r){const i=n;if(i<8||i>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(i!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");const a=new Uint8Array(4*n*r);if(!a.length)return t(4,"unable to allocate buffer space");let o=0,s=0;const l=4*i,c=new Uint8Array(4),u=new Uint8Array(l);let d=r;for(;d>0&&s<e.byteLength;){if(s+4>e.byteLength)return t(1);if(c[0]=e[s++],c[1]=e[s++],c[2]=e[s++],c[3]=e[s++],2!=c[0]||2!=c[1]||(c[2]<<8|c[3])!=i)return t(3,"bad rgbe scanline format");let n,r=0;for(;r<l&&s<e.byteLength;){n=e[s++];const i=n>128;if(i&&(n-=128),0===n||r+n>l)return t(3,"bad scanline data");if(i){const t=e[s++];for(let e=0;e<n;e++)u[r++]=t}else u.set(e.subarray(s,s+n),r),r+=n,s+=n}const h=i;for(let e=0;e<h;e++){let t=0;a[o]=u[e+t],t+=i,a[o+1]=u[e+t],t+=i,a[o+2]=u[e+t],t+=i,a[o+3]=u[e+t],o+=4}d--}return a}(o.subarray(o.pos),e,n);if(-1!==l){let t,o,c;switch(this.type){case r.FloatType:c=l.length/4;const e=new Float32Array(4*c);for(let t=0;t<c;t++)i(l,4*t,e,4*t);t=e,o=r.FloatType;break;case r.HalfFloatType:c=l.length/4;const n=new Uint16Array(4*c);for(let e=0;e<c;e++)a(l,4*e,n,4*e);t=n,o=r.HalfFloatType;break;default:console.error("THREE.RGBELoader: unsupported type: ",this.type)}return{width:e,height:n,data:t,header:s.string,gamma:s.gamma,exposure:s.exposure,type:o}}}return null}setDataType(e){return this.type=e,this}load(e,t,n,i){return super.load(e,(function(e,n){switch(e.type){case r.FloatType:case r.HalfFloatType:"colorSpace"in e?e.colorSpace="srgb-linear":e.encoding=3e3,e.minFilter=r.LinearFilter,e.magFilter=r.LinearFilter,e.generateMipmaps=!1,e.flipY=!0}t&&t(e,n)}),n,i)}}},5052:(e,t,n)=>{"use strict";n.d(t,{e:()=>i});var r=n(9477);class i extends r.Mesh{constructor(e,t){var n,i;const a=(o=e)&&o.isCubeTexture;var o;const s=(null!=(i=a?null==(n=e.image[0])?void 0:n.width:e.image.width)?i:1024)/4,l=Math.floor(Math.log2(s)),c=Math.pow(2,l),u=[a?"#define ENVMAP_TYPE_CUBE":"","#define CUBEUV_TEXEL_WIDTH "+1/(3*Math.max(c,112)),"#define CUBEUV_TEXEL_HEIGHT "+1/(4*c),`#define CUBEUV_MAX_MIP ${l}.0`].join("\n")+"\n #define ENVMAP_TYPE_CUBE_UV\n varying vec3 vWorldPosition;\n uniform float radius;\n uniform float height;\n uniform float angle;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube map;\n #else\n uniform sampler2D map;\n #endif\n // From: https://www.shadertoy.com/view/4tsBD7\n float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) \n {\n float d = dot ( rd, n );\n \n if( d > 0.0 ) { return 1e6; }\n \n vec3 o = ro - c;\n float t = - dot( n, o ) / d;\n vec3 q = o + rd * t;\n \n return ( dot( q, q ) < r * r ) ? t : 1e6;\n }\n // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm\n float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) \n {\n vec3 oc = ro - ce;\n float b = dot( oc, rd );\n float c = dot( oc, oc ) - ra * ra;\n float h = b * b - c;\n \n if( h < 0.0 ) { return -1.0; }\n \n h = sqrt( h );\n \n return - b + h;\n }\n vec3 project() \n {\n vec3 p = normalize( vWorldPosition );\n vec3 camPos = cameraPosition;\n camPos.y -= height;\n float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius );\n if( intersection > 0.0 ) {\n \n vec3 h = vec3( 0.0, - height, 0.0 );\n float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius );\n p = ( camPos + min( intersection, intersection2 ) * p ) / radius;\n } else {\n p = vec3( 0.0, 1.0, 0.0 );\n }\n return p;\n }\n #include <common>\n #include <cube_uv_reflection_fragment>\n void main() \n {\n vec3 projectedWorldPosition = project();\n \n #ifdef ENVMAP_TYPE_CUBE\n vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb;\n #else\n vec3 direction = normalize( projectedWorldPosition );\n vec2 uv = equirectUv( direction );\n vec3 outcolor = texture2D( map, uv ).rgb;\n #endif\n gl_FragColor = vec4( outcolor, 1.0 );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n }\n ",d={map:{value:e},height:{value:(null==t?void 0:t.height)||15},radius:{value:(null==t?void 0:t.radius)||100}};super(new r.IcosahedronGeometry(1,16),new r.ShaderMaterial({uniforms:d,fragmentShader:u,vertexShader:"\n varying vec3 vWorldPosition;\n void main() \n {\n vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) );\n vWorldPosition = worldPosition.xyz;\n \n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n ",side:r.DoubleSide}))}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}}},8466:(e,t,n)=>{"use strict";n.d(t,{P:()=>r});const r={uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:"\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ",fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform float h;\n\n varying vec2 vUv;\n\n void main() {\n\n \tvec4 sum = vec4( 0.0 );\n\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;\n\n \tgl_FragColor = sum;\n\n }\n "}},7312:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:"\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ",fragmentShader:"\n\n uniform sampler2D tDiffuse;\n uniform float v;\n\n varying vec2 vUv;\n\n void main() {\n\n vec4 sum = vec4( 0.0 );\n\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;\n\n gl_FragColor = sum;\n\n }\n "}},8667:(e,t,n)=>{"use strict";n.d(t,{Vs:()=>i});var r=n(9477);function i(e,t){if(t===r.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===r.TriangleFanDrawMode||t===r.TriangleStripDrawMode){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<r.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const i=n.count-2,a=[];if(n)if(t===r.TriangleFanDrawMode)for(let e=1;e<=i;e++)a.push(n.getX(0)),a.push(n.getX(e)),a.push(n.getX(e+1));else for(let e=0;e<i;e++)e%2==0?(a.push(n.getX(e)),a.push(n.getX(e+1)),a.push(n.getX(e+2))):(a.push(n.getX(e+2)),a.push(n.getX(e+1)),a.push(n.getX(e)));a.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const o=e.clone();return o.setIndex(a),o.clearGroups(),o}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e}},4671:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7294);const i="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?r.useEffect:r.useLayoutEffect;function a(e){const t="function"==typeof e?function(e){let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(i!==t){const e=t;t=r?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,a={setState:r,getState:i,subscribe:(e,r,a)=>r||a?((e,r=i,a=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let o=r(t);function s(){const n=r(t);if(!a(o,n)){const t=o;e(o=n,t)}}return n.add(s),()=>n.delete(s)})(e,r,a):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,i,a),a}(e):e,n=(e=t.getState,n=Object.is)=>{const[,a]=(0,r.useReducer)((e=>e+1),0),o=t.getState(),s=(0,r.useRef)(o),l=(0,r.useRef)(e),c=(0,r.useRef)(n),u=(0,r.useRef)(!1),d=(0,r.useRef)();let h;void 0===d.current&&(d.current=e(o));let f=!1;(s.current!==o||l.current!==e||c.current!==n||u.current)&&(h=e(o),f=!n(d.current,h)),i((()=>{f&&(d.current=h),s.current=o,l.current=e,c.current=n,u.current=!1}));const p=(0,r.useRef)(o);i((()=>{const e=()=>{try{const e=t.getState(),n=l.current(e);c.current(d.current,n)||(s.current=e,d.current=n,a())}catch(e){u.current=!0,a()}},n=t.subscribe(e);return t.getState()!==p.current&&e(),n}),[]);const m=f?h:d.current;return(0,r.useDebugValue)(m),m};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const e=[n,t];return{next(){const t=e.length<=0;return{value:e.shift(),done:t}}}},n}},907:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},3878:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{Z:()=>r})},7462:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},1902:(e,t,n)=>{"use strict";function r(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,o,s=[],l=!0,c=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(s.push(r.value),s.length!==t);l=!0);}catch(e){c=!0,i=e}finally{try{if(!l&&null!=n.return&&(o=n.return(),Object(o)!==o))return}finally{if(c)throw i}}return s}}n.d(t,{Z:()=>r})},5267:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:()=>r})},3324:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(3878),i=n(1902),a=n(181),o=n(5267);function s(e,t){return(0,r.Z)(e)||(0,i.Z)(e,t)||(0,a.Z)(e,t)||(0,o.Z)()}},181:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(907);function i(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},3213:(e,t,n)=>{"use strict";n.d(t,{Hn:()=>m,jn:()=>b});var r=n(7294),i=Object.defineProperty,a=Object.defineProperties,o=Object.getOwnPropertyDescriptors,s=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,c=Object.prototype.propertyIsEnumerable,u=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,d=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&u(e,n,t[n]);if(s)for(var n of s(t))c.call(t,n)&&u(e,n,t[n]);return e};function h(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){const e=h(r,t,n);if(e)return e;r=t?null:r.sibling}}function f(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}const p=f(r.createContext(null));class m extends r.Component{render(){return r.createElement(p.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:g,ReactCurrentDispatcher:v}=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(){const e=r.useContext(p);if(!e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=r.useId();return r.useMemo((()=>{var n;return null!=(n=g.current)?n:h(e,!1,(e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}}))}),[e,t])}function b(){var e,t;const n=y(),[i]=r.useState((()=>new Map));i.clear();let s=n;for(;s;){const n=null==(e=s.type)?void 0:e._context;n&&n!==p&&!i.has(n)&&i.set(n,null==(t=v.current)?void 0:t.readContext(f(n))),s=s.return}return r.useMemo((()=>Array.from(i.keys()).reduce(((e,t)=>n=>{return r.createElement(e,null,r.createElement(t.Provider,(s=d({},n),l={value:i.get(t)},a(s,o(l)))));var s,l}),(e=>r.createElement(m,d({},e))))),[i])}},9477:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ACESFilmicToneMapping:()=>te,AddEquation:()=>S,AddOperation:()=>Y,AdditiveAnimationBlendMode:()=>Ct,AdditiveBlending:()=>_,AlphaFormat:()=>Ie,AlwaysDepth:()=>H,AlwaysStencilFunc:()=>tn,AmbientLight:()=>Vd,AmbientLightProbe:()=>oh,AnimationClip:()=>fd,AnimationLoader:()=>wd,AnimationMixer:()=>Dh,AnimationObjectGroup:()=>kh,AnimationUtils:()=>ed,ArcCurve:()=>yc,ArrayCamera:()=>Ks,ArrowHelper:()=>Cf,Audio:()=>yh,AudioAnalyser:()=>Sh,AudioContext:()=>rh,AudioListener:()=>vh,AudioLoader:()=>ih,AxesHelper:()=>Tf,BackSide:()=>m,BasicDepthPacking:()=>It,BasicShadowMap:()=>u,Bone:()=>Dl,BooleanKeyframeTrack:()=>od,Box2:()=>Xh,Box3:()=>dr,Box3Helper:()=>wf,BoxBufferGeometry:()=>Ff,BoxGeometry:()=>oa,BoxHelper:()=>xf,BufferAttribute:()=>Ei,BufferGeometry:()=>ji,BufferGeometryLoader:()=>Yd,ByteType:()=>Me,Cache:()=>md,Camera:()=>ha,CameraHelper:()=>yf,CanvasTexture:()=>mc,CapsuleBufferGeometry:()=>Nf,CapsuleGeometry:()=>zc,CatmullRomCurve3:()=>Sc,CineonToneMapping:()=>ee,CircleBufferGeometry:()=>zf,CircleGeometry:()=>Uc,ClampToEdgeWrapping:()=>ue,Clock:()=>dh,Color:()=>Xn,ColorKeyframeTrack:()=>sd,ColorManagement:()=>Un,CompressedArrayTexture:()=>pc,CompressedTexture:()=>fc,CompressedTextureLoader:()=>Md,ConeBufferGeometry:()=>Uf,ConeGeometry:()=>Gc,CubeCamera:()=>ma,CubeReflectionMapping:()=>ie,CubeRefractionMapping:()=>ae,CubeTexture:()=>ga,CubeTextureLoader:()=>Ad,CubeUVReflectionMapping:()=>le,CubicBezierCurve:()=>Tc,CubicBezierCurve3:()=>Rc,CubicInterpolant:()=>nd,CullFaceBack:()=>s,CullFaceFront:()=>l,CullFaceFrontBack:()=>c,CullFaceNone:()=>o,Curve:()=>gc,CurvePath:()=>Oc,CustomBlending:()=>M,CustomToneMapping:()=>ne,CylinderBufferGeometry:()=>Hf,CylinderGeometry:()=>Hc,Cylindrical:()=>Wh,Data3DTexture:()=>ir,DataArrayTexture:()=>nr,DataTexture:()=>Ol,DataTexture2DArray:()=>Df,DataTexture3D:()=>Of,DataTextureLoader:()=>Ed,DataUtils:()=>kf,DecrementStencilOp:()=>jt,DecrementWrapStencilOp:()=>Jt,DefaultLoadingManager:()=>vd,DepthFormat:()=>Ne,DepthStencilFormat:()=>ze,DepthTexture:()=>Qs,DirectionalLight:()=>Gd,DirectionalLightHelper:()=>mf,DiscreteInterpolant:()=>id,DodecahedronBufferGeometry:()=>Gf,DodecahedronGeometry:()=>jc,DoubleSide:()=>g,DstAlphaFactor:()=>D,DstColorFactor:()=>F,DynamicCopyUsage:()=>un,DynamicDrawUsage:()=>rn,DynamicReadUsage:()=>sn,EdgesGeometry:()=>$c,EllipseCurve:()=>vc,EqualDepth:()=>j,EqualStencilFunc:()=>Yt,EquirectangularReflectionMapping:()=>oe,EquirectangularRefractionMapping:()=>se,Euler:()=>Kr,EventDispatcher:()=>mn,ExtrudeBufferGeometry:()=>Vf,ExtrudeGeometry:()=>Su,FileLoader:()=>xd,Float16BufferAttribute:()=>Li,Float32BufferAttribute:()=>Di,Float64BufferAttribute:()=>Oi,FloatType:()=>Te,Fog:()=>al,FogExp2:()=>il,FramebufferTexture:()=>hc,FrontSide:()=>p,Frustum:()=>Sa,GLBufferAttribute:()=>Uh,GLSL1:()=>hn,GLSL3:()=>fn,GreaterDepth:()=>J,GreaterEqualDepth:()=>W,GreaterEqualStencilFunc:()=>en,GreaterStencilFunc:()=>Qt,GridHelper:()=>uf,Group:()=>$s,HalfFloatType:()=>Re,HemisphereLight:()=>Rd,HemisphereLightHelper:()=>cf,HemisphereLightProbe:()=>ah,IcosahedronBufferGeometry:()=>jf,IcosahedronGeometry:()=>Eu,ImageBitmapLoader:()=>th,ImageLoader:()=>Sd,ImageUtils:()=>$n,ImmediateRenderObject:()=>If,IncrementStencilOp:()=>Vt,IncrementWrapStencilOp:()=>Wt,InstancedBufferAttribute:()=>Ul,InstancedBufferGeometry:()=>$d,InstancedInterleavedBuffer:()=>zh,InstancedMesh:()=>Jl,Int16BufferAttribute:()=>Bi,Int32BufferAttribute:()=>ki,Int8BufferAttribute:()=>Ci,IntType:()=>Ee,InterleavedBuffer:()=>sl,InterleavedBufferAttribute:()=>cl,Interpolant:()=>td,InterpolateDiscrete:()=>_t,InterpolateLinear:()=>xt,InterpolateSmooth:()=>wt,InvertStencilOp:()=>Xt,KeepStencilOp:()=>Ht,KeyframeTrack:()=>ad,LOD:()=>Tl,LatheBufferGeometry:()=>Wf,LatheGeometry:()=>Nc,Layers:()=>$r,LessDepth:()=>G,LessEqualDepth:()=>V,LessEqualStencilFunc:()=>qt,LessStencilFunc:()=>$t,Light:()=>Td,LightProbe:()=>Jd,Line:()=>Zl,Line3:()=>Yh,LineBasicMaterial:()=>Xl,LineCurve:()=>Bc,LineCurve3:()=>Pc,LineDashedMaterial:()=>Xu,LineLoop:()=>rc,LineSegments:()=>nc,LinearEncoding:()=>Pt,LinearFilter:()=>ve,LinearInterpolant:()=>rd,LinearMipMapLinearFilter:()=>xe,LinearMipMapNearestFilter:()=>be,LinearMipmapLinearFilter:()=>_e,LinearMipmapNearestFilter:()=>ye,LinearSRGBColorSpace:()=>zt,LinearToneMapping:()=>Q,Loader:()=>yd,LoaderUtils:()=>Kd,LoadingManager:()=>gd,LoopOnce:()=>vt,LoopPingPong:()=>bt,LoopRepeat:()=>yt,LuminanceAlphaFormat:()=>Fe,LuminanceFormat:()=>Oe,MOUSE:()=>i,Material:()=>wi,MaterialLoader:()=>Xd,MathUtils:()=>Rn,Matrix3:()=>Pn,Matrix4:()=>Nr,MaxEquation:()=>T,Mesh:()=>ia,MeshBasicMaterial:()=>Mi,MeshDepthMaterial:()=>Gs,MeshDistanceMaterial:()=>Vs,MeshLambertMaterial:()=>Wu,MeshMatcapMaterial:()=>Ju,MeshNormalMaterial:()=>ju,MeshPhongMaterial:()=>Gu,MeshPhysicalMaterial:()=>Hu,MeshStandardMaterial:()=>Uu,MeshToonMaterial:()=>Vu,MinEquation:()=>C,MirroredRepeatWrapping:()=>de,MixOperation:()=>$,MultiplyBlending:()=>w,MultiplyOperation:()=>K,NearestFilter:()=>he,NearestMipMapLinearFilter:()=>ge,NearestMipMapNearestFilter:()=>pe,NearestMipmapLinearFilter:()=>me,NearestMipmapNearestFilter:()=>fe,NeverDepth:()=>U,NeverStencilFunc:()=>Kt,NoBlending:()=>y,NoColorSpace:()=>Ft,NoToneMapping:()=>q,NormalAnimationBlendMode:()=>Et,NormalBlending:()=>b,NotEqualDepth:()=>X,NotEqualStencilFunc:()=>Zt,NumberKeyframeTrack:()=>ld,Object3D:()=>ci,ObjectLoader:()=>qd,ObjectSpaceNormalMap:()=>Ot,OctahedronBufferGeometry:()=>Jf,OctahedronGeometry:()=>Cu,OneFactor:()=>B,OneMinusDstAlphaFactor:()=>O,OneMinusDstColorFactor:()=>N,OneMinusSrcAlphaFactor:()=>L,OneMinusSrcColorFactor:()=>k,OrthographicCamera:()=>Na,PCFShadowMap:()=>d,PCFSoftShadowMap:()=>h,PMREMGenerator:()=>Ja,Path:()=>Fc,PerspectiveCamera:()=>fa,Plane:()=>xa,PlaneBufferGeometry:()=>Xf,PlaneGeometry:()=>Ca,PlaneHelper:()=>Mf,PointLight:()=>Ud,PointLightHelper:()=>af,Points:()=>cc,PointsMaterial:()=>ic,PolarGridHelper:()=>df,PolyhedronBufferGeometry:()=>Kf,PolyhedronGeometry:()=>Vc,PositionalAudio:()=>Mh,PropertyBinding:()=>Ph,PropertyMixer:()=>Ah,QuadraticBezierCurve:()=>kc,QuadraticBezierCurve3:()=>Ic,Quaternion:()=>sr,QuaternionKeyframeTrack:()=>ud,QuaternionLinearInterpolant:()=>cd,REVISION:()=>r,RGBADepthPacking:()=>Lt,RGBAFormat:()=>De,RGBAIntegerFormat:()=>je,RGBA_ASTC_10x10_Format:()=>ft,RGBA_ASTC_10x5_Format:()=>ut,RGBA_ASTC_10x6_Format:()=>dt,RGBA_ASTC_10x8_Format:()=>ht,RGBA_ASTC_12x10_Format:()=>pt,RGBA_ASTC_12x12_Format:()=>mt,RGBA_ASTC_4x4_Format:()=>nt,RGBA_ASTC_5x4_Format:()=>rt,RGBA_ASTC_5x5_Format:()=>it,RGBA_ASTC_6x5_Format:()=>at,RGBA_ASTC_6x6_Format:()=>ot,RGBA_ASTC_8x5_Format:()=>st,RGBA_ASTC_8x6_Format:()=>lt,RGBA_ASTC_8x8_Format:()=>ct,RGBA_BPTC_Format:()=>gt,RGBA_ETC2_EAC_Format:()=>tt,RGBA_PVRTC_2BPPV1_Format:()=>Qe,RGBA_PVRTC_4BPPV1_Format:()=>qe,RGBA_S3TC_DXT1_Format:()=>Je,RGBA_S3TC_DXT3_Format:()=>Xe,RGBA_S3TC_DXT5_Format:()=>Ke,RGBFormat:()=>Le,RGB_ETC1_Format:()=>Ze,RGB_ETC2_Format:()=>et,RGB_PVRTC_2BPPV1_Format:()=>Ye,RGB_PVRTC_4BPPV1_Format:()=>$e,RGB_S3TC_DXT1_Format:()=>We,RGFormat:()=>Ge,RGIntegerFormat:()=>Ve,RawShaderMaterial:()=>zu,Ray:()=>Fr,Raycaster:()=>Hh,RectAreaLight:()=>jd,RedFormat:()=>Ue,RedIntegerFormat:()=>He,ReinhardToneMapping:()=>Z,RepeatWrapping:()=>ce,ReplaceStencilOp:()=>Gt,ReverseSubtractEquation:()=>E,RingBufferGeometry:()=>$f,RingGeometry:()=>Tu,SRGBColorSpace:()=>Nt,Scene:()=>ol,ShaderChunk:()=>Ta,ShaderLib:()=>Ba,ShaderMaterial:()=>da,ShadowMaterial:()=>Nu,Shape:()=>Yc,ShapeBufferGeometry:()=>Yf,ShapeGeometry:()=>Ru,ShapePath:()=>Rf,ShapeUtils:()=>xu,ShortType:()=>Se,Skeleton:()=>zl,SkeletonHelper:()=>nf,SkinnedMesh:()=>Ll,Source:()=>Yn,Sphere:()=>Rr,SphereBufferGeometry:()=>qf,SphereGeometry:()=>Bu,Spherical:()=>jh,SphericalHarmonics3:()=>Wd,SplineCurve:()=>Lc,SpotLight:()=>Dd,SpotLightHelper:()=>Qh,Sprite:()=>Sl,SpriteMaterial:()=>ul,SrcAlphaFactor:()=>I,SrcAlphaSaturateFactor:()=>z,SrcColorFactor:()=>P,StaticCopyUsage:()=>cn,StaticDrawUsage:()=>nn,StaticReadUsage:()=>on,StereoCamera:()=>uh,StreamCopyUsage:()=>dn,StreamDrawUsage:()=>an,StreamReadUsage:()=>ln,StringKeyframeTrack:()=>dd,SubtractEquation:()=>A,SubtractiveBlending:()=>x,TOUCH:()=>a,TangentSpaceNormalMap:()=>Dt,TetrahedronBufferGeometry:()=>Qf,TetrahedronGeometry:()=>Pu,Texture:()=>Zn,TextureLoader:()=>Cd,TorusBufferGeometry:()=>Zf,TorusGeometry:()=>ku,TorusKnotBufferGeometry:()=>ep,TorusKnotGeometry:()=>Iu,Triangle:()=>_i,TriangleFanDrawMode:()=>Bt,TriangleStripDrawMode:()=>Rt,TrianglesDrawMode:()=>Tt,TubeBufferGeometry:()=>tp,TubeGeometry:()=>Lu,TwoPassDoubleSide:()=>v,UVMapping:()=>re,Uint16BufferAttribute:()=>Pi,Uint32BufferAttribute:()=>Ii,Uint8BufferAttribute:()=>Ti,Uint8ClampedBufferAttribute:()=>Ri,Uniform:()=>Oh,UniformsGroup:()=>Nh,UniformsLib:()=>Ra,UniformsUtils:()=>ua,UnsignedByteType:()=>we,UnsignedInt248Type:()=>ke,UnsignedIntType:()=>Ce,UnsignedShort4444Type:()=>Be,UnsignedShort5551Type:()=>Pe,UnsignedShortType:()=>Ae,VSMShadowMap:()=>f,Vector2:()=>Bn,Vector3:()=>lr,Vector4:()=>er,VectorKeyframeTrack:()=>hd,VideoTexture:()=>dc,WebGL1Renderer:()=>rl,WebGL3DRenderTarget:()=>ar,WebGLArrayRenderTarget:()=>rr,WebGLCubeRenderTarget:()=>va,WebGLMultipleRenderTargets:()=>or,WebGLMultisampleRenderTarget:()=>Lf,WebGLRenderTarget:()=>tr,WebGLRenderer:()=>nl,WebGLUtils:()=>Xs,WireframeGeometry:()=>Du,WrapAroundEnding:()=>At,ZeroCurvatureEnding:()=>Mt,ZeroFactor:()=>R,ZeroSlopeEnding:()=>St,ZeroStencilOp:()=>Ut,_SRGBAFormat:()=>pn,sRGBEncoding:()=>kt});const r="148",i={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},a={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},o=0,s=1,l=2,c=3,u=0,d=1,h=2,f=3,p=0,m=1,g=2,v=3,y=0,b=1,_=2,x=3,w=4,M=5,S=100,A=101,E=102,C=103,T=104,R=200,B=201,P=202,k=203,I=204,L=205,D=206,O=207,F=208,N=209,z=210,U=0,H=1,G=2,V=3,j=4,W=5,J=6,X=7,K=0,$=1,Y=2,q=0,Q=1,Z=2,ee=3,te=4,ne=5,re=300,ie=301,ae=302,oe=303,se=304,le=306,ce=1e3,ue=1001,de=1002,he=1003,fe=1004,pe=1004,me=1005,ge=1005,ve=1006,ye=1007,be=1007,_e=1008,xe=1008,we=1009,Me=1010,Se=1011,Ae=1012,Ee=1013,Ce=1014,Te=1015,Re=1016,Be=1017,Pe=1018,ke=1020,Ie=1021,Le=1022,De=1023,Oe=1024,Fe=1025,Ne=1026,ze=1027,Ue=1028,He=1029,Ge=1030,Ve=1031,je=1033,We=33776,Je=33777,Xe=33778,Ke=33779,$e=35840,Ye=35841,qe=35842,Qe=35843,Ze=36196,et=37492,tt=37496,nt=37808,rt=37809,it=37810,at=37811,ot=37812,st=37813,lt=37814,ct=37815,ut=37816,dt=37817,ht=37818,ft=37819,pt=37820,mt=37821,gt=36492,vt=2200,yt=2201,bt=2202,_t=2300,xt=2301,wt=2302,Mt=2400,St=2401,At=2402,Et=2500,Ct=2501,Tt=0,Rt=1,Bt=2,Pt=3e3,kt=3001,It=3200,Lt=3201,Dt=0,Ot=1,Ft="",Nt="srgb",zt="srgb-linear",Ut=0,Ht=7680,Gt=7681,Vt=7682,jt=7683,Wt=34055,Jt=34056,Xt=5386,Kt=512,$t=513,Yt=514,qt=515,Qt=516,Zt=517,en=518,tn=519,nn=35044,rn=35048,an=35040,on=35045,sn=35049,ln=35041,cn=35046,un=35050,dn=35042,hn="100",fn="300 es",pn=1035;class mn{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}}const gn=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let vn=1234567;const yn=Math.PI/180,bn=180/Math.PI;function _n(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(gn[255&e]+gn[e>>8&255]+gn[e>>16&255]+gn[e>>24&255]+"-"+gn[255&t]+gn[t>>8&255]+"-"+gn[t>>16&15|64]+gn[t>>24&255]+"-"+gn[63&n|128]+gn[n>>8&255]+"-"+gn[n>>16&255]+gn[n>>24&255]+gn[255&r]+gn[r>>8&255]+gn[r>>16&255]+gn[r>>24&255]).toLowerCase()}function xn(e,t,n){return Math.max(t,Math.min(n,e))}function wn(e,t){return(e%t+t)%t}function Mn(e,t,n){return(1-n)*e+n*t}function Sn(e){return 0==(e&e-1)&&0!==e}function An(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function En(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function Cn(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function Tn(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}var Rn=Object.freeze({__proto__:null,DEG2RAD:yn,RAD2DEG:bn,generateUUID:_n,clamp:xn,euclideanModulo:wn,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:Mn,damp:function(e,t,n,r){return Mn(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(wn(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(vn=e);let t=vn+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*yn},radToDeg:function(e){return e*bn},isPowerOfTwo:Sn,ceilPowerOfTwo:An,floorPowerOfTwo:En,setQuaternionFromProperEuler:function(e,t,n,r,i){const a=Math.cos,o=Math.sin,s=a(n/2),l=o(n/2),c=a((t+r)/2),u=o((t+r)/2),d=a((t-r)/2),h=o((t-r)/2),f=a((r-t)/2),p=o((r-t)/2);switch(i){case"XYX":e.set(s*u,l*d,l*h,s*c);break;case"YZY":e.set(l*h,s*u,l*d,s*c);break;case"ZXZ":e.set(l*d,l*h,s*u,s*c);break;case"XZX":e.set(s*u,l*p,l*f,s*c);break;case"YXY":e.set(l*f,s*u,l*p,s*c);break;case"ZYZ":e.set(l*p,l*f,s*u,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:Tn,denormalize:Cn});class Bn{constructor(e=0,t=0){Bn.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Pn{constructor(){Pn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,n,r,i,a,o,s,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=o,c[3]=t,c[4]=i,c[5]=s,c[6]=n,c[7]=a,c[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[3],s=n[6],l=n[1],c=n[4],u=n[7],d=n[2],h=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],b=r[7],_=r[2],x=r[5],w=r[8];return i[0]=a*p+o*v+s*_,i[3]=a*m+o*y+s*x,i[6]=a*g+o*b+s*w,i[1]=l*p+c*v+u*_,i[4]=l*m+c*y+u*x,i[7]=l*g+c*b+u*w,i[2]=d*p+h*v+f*_,i[5]=d*m+h*y+f*x,i[8]=d*g+h*b+f*w,this}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}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=e[8];return t*a*c-t*o*l-n*i*c+n*o*s+r*i*l-r*a*s}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=c*a-o*l,d=o*s-c*i,h=l*i-a*s,f=t*u+n*d+r*h;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);const p=1/f;return e[0]=u*p,e[1]=(r*l-c*n)*p,e[2]=(o*n-r*a)*p,e[3]=d*p,e[4]=(c*t-r*s)*p,e[5]=(r*i-o*t)*p,e[6]=h*p,e[7]=(n*s-l*t)*p,e[8]=(a*t-n*i)*p,this}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}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,o){const s=Math.cos(i),l=Math.sin(i);return this.set(n*s,n*l,-n*(s*a+l*o)+a+e,-r*l,r*s,-r*(-l*a+s*o)+o+t,0,0,1),this}scale(e,t){return this.premultiply(kn.makeScale(e,t)),this}rotate(e){return this.premultiply(kn.makeRotation(-e)),this}translate(e,t){return this.premultiply(kn.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const kn=new Pn;function In(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const Ln={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Dn(e,t){return new Ln[e](t)}function On(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function Fn(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Nn(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const zn={[Nt]:{[zt]:Fn},[zt]:{[Nt]:Nn}},Un={legacyMode:!0,get workingColorSpace(){return zt},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,n){if(this.legacyMode||t===n||!t||!n)return e;if(zn[t]&&void 0!==zn[t][n]){const r=zn[t][n];return e.r=r(e.r),e.g=r(e.g),e.b=r(e.b),e}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}},Hn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Gn={r:0,g:0,b:0},Vn={h:0,s:0,l:0},jn={h:0,s:0,l:0};function Wn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function Jn(e,t){return t.r=e.r,t.g=e.g,t.b=e.b,t}class Xn{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Nt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,Un.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r=Un.workingColorSpace){return this.r=e,this.g=t,this.b=n,Un.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r=Un.workingColorSpace){if(e=wn(e,1),t=xn(t,0,1),n=xn(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=Wn(i,r,e+1/3),this.g=Wn(i,r,e),this.b=Wn(i,r,e-1/3)}return Un.toWorkingColorSpace(this,r),this}setStyle(e,t=Nt){function n(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const i=r[1],a=r[2];switch(i){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,Un.toWorkingColorSpace(this,t),n(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,Un.toWorkingColorSpace(this,t),n(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){const r=parseFloat(e[1])/360,i=parseFloat(e[2])/100,a=parseFloat(e[3])/100;return n(e[4]),this.setHSL(r,i,a,t)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=r[1],n=e.length;if(3===n)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,Un.toWorkingColorSpace(this,t),this;if(6===n)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,Un.toWorkingColorSpace(this,t),this}return e&&e.length>0?this.setColorName(e,t):this}setColorName(e,t=Nt){const n=Hn[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=Fn(e.r),this.g=Fn(e.g),this.b=Fn(e.b),this}copyLinearToSRGB(e){return this.r=Nn(e.r),this.g=Nn(e.g),this.b=Nn(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Nt){return Un.fromWorkingColorSpace(Jn(this,Gn),e),xn(255*Gn.r,0,255)<<16^xn(255*Gn.g,0,255)<<8^xn(255*Gn.b,0,255)<<0}getHexString(e=Nt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Un.workingColorSpace){Un.fromWorkingColorSpace(Jn(this,Gn),t);const n=Gn.r,r=Gn.g,i=Gn.b,a=Math.max(n,r,i),o=Math.min(n,r,i);let s,l;const c=(o+a)/2;if(o===a)s=0,l=0;else{const e=a-o;switch(l=c<=.5?e/(a+o):e/(2-a-o),a){case n:s=(r-i)/e+(r<i?6:0);break;case r:s=(i-n)/e+2;break;case i:s=(n-r)/e+4}s/=6}return e.h=s,e.s=l,e.l=c,e}getRGB(e,t=Un.workingColorSpace){return Un.fromWorkingColorSpace(Jn(this,Gn),t),e.r=Gn.r,e.g=Gn.g,e.b=Gn.b,e}getStyle(e=Nt){return Un.fromWorkingColorSpace(Jn(this,Gn),e),e!==Nt?`color(${e} ${Gn.r} ${Gn.g} ${Gn.b})`:`rgb(${255*Gn.r|0},${255*Gn.g|0},${255*Gn.b|0})`}offsetHSL(e,t,n){return this.getHSL(Vn),Vn.h+=e,Vn.s+=t,Vn.l+=n,this.setHSL(Vn.h,Vn.s,Vn.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Vn),e.getHSL(jn);const n=Mn(Vn.h,jn.h,t),r=Mn(Vn.s,jn.s,t),i=Mn(Vn.l,jn.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}let Kn;Xn.NAMES=Hn;class $n{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Kn&&(Kn=On("canvas")),Kn.width=e.width,Kn.height=e.height;const n=Kn.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Kn}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=On("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e<i.length;e++)i[e]=255*Fn(i[e]/255);return n.putImageData(r,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*Fn(t[e]/255)):t[e]=Fn(t[e]);return{data:t,width:e.width,height:e.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}class Yn{constructor(e=null){this.isSource=!0,this.uuid=_n(),this.data=e,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},r=this.data;if(null!==r){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t<n;t++)r[t].isDataTexture?e.push(qn(r[t].image)):e.push(qn(r[t]))}else e=qn(r);n.url=e}return t||(e.images[this.uuid]=n),n}}function qn(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?$n.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let Qn=0;class Zn extends mn{constructor(e=Zn.DEFAULT_IMAGE,t=Zn.DEFAULT_MAPPING,n=ue,r=ue,i=ve,a=_e,o=De,s=we,l=Zn.DEFAULT_ANISOTROPY,c=Pt){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Qn++}),this.uuid=_n(),this.name="",this.source=new Yn(e),this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=a,this.anisotropy=l,this.format=o,this.internalFormat=null,this.type=s,this.offset=new Bn(0,0),this.repeat=new Bn(1,1),this.center=new Bn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Pn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=c,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==re)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case ce:e.x=e.x-Math.floor(e.x);break;case ue:e.x=e.x<0?0:1;break;case de:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case ce:e.y=e.y-Math.floor(e.y);break;case ue:e.y=e.y<0?0:1;break;case de:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}}Zn.DEFAULT_IMAGE=null,Zn.DEFAULT_MAPPING=re,Zn.DEFAULT_ANISOTROPY=1;class er{constructor(e=0,t=0,n=0,r=1){er.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const a=.01,o=.1,s=e.elements,l=s[0],c=s[4],u=s[8],d=s[1],h=s[5],f=s[9],p=s[2],m=s[6],g=s[10];if(Math.abs(c-d)<a&&Math.abs(u-p)<a&&Math.abs(f-m)<a){if(Math.abs(c+d)<o&&Math.abs(u+p)<o&&Math.abs(f+m)<o&&Math.abs(l+h+g-3)<o)return this.set(1,0,0,0),this;t=Math.PI;const e=(l+1)/2,s=(h+1)/2,v=(g+1)/2,y=(c+d)/4,b=(u+p)/4,_=(f+m)/4;return e>s&&e>v?e<a?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=y/n,i=b/n):s>v?s<a?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(s),n=y/r,i=_/r):v<a?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(v),n=b/i,r=_/i),this.set(n,r,i,t),this}let v=Math.sqrt((m-f)*(m-f)+(u-p)*(u-p)+(d-c)*(d-c));return Math.abs(v)<.001&&(v=1),this.x=(m-f)/v,this.y=(u-p)/v,this.z=(d-c)/v,this.w=Math.acos((l+h+g-1)/2),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.w=Math.min(this.w,e.w),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.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class tr extends mn{constructor(e=1,t=1,n={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new er(0,0,e,t),this.scissorTest=!1,this.viewport=new er(0,0,e,t);const r={width:e,height:t,depth:1};this.texture=new Zn(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:ve,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null,this.samples=void 0!==n.samples?n.samples:0}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new Yn(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class nr extends Zn{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=he,this.minFilter=he,this.wrapR=ue,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class rr extends tr{constructor(e=1,t=1,n=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new nr(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class ir extends Zn{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=he,this.minFilter=he,this.wrapR=ue,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ar extends tr{constructor(e=1,t=1,n=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new ir(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class or extends tr{constructor(e=1,t=1,n=1,r={}){super(e,t,r),this.isWebGLMultipleRenderTargets=!0;const i=this.texture;this.texture=[];for(let e=0;e<n;e++)this.texture[e]=i.clone(),this.texture[e].isRenderTargetTexture=!0}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.texture.length;r<i;r++)this.texture[r].image.width=e,this.texture[r].image.height=t,this.texture[r].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone(),this.texture[t].isRenderTargetTexture=!0;return this}}class sr{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,o){let s=n[r+0],l=n[r+1],c=n[r+2],u=n[r+3];const d=i[a+0],h=i[a+1],f=i[a+2],p=i[a+3];if(0===o)return e[t+0]=s,e[t+1]=l,e[t+2]=c,void(e[t+3]=u);if(1===o)return e[t+0]=d,e[t+1]=h,e[t+2]=f,void(e[t+3]=p);if(u!==p||s!==d||l!==h||c!==f){let e=1-o;const t=s*d+l*h+c*f+u*p,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),a=Math.atan2(i,t*n);e=Math.sin(e*a)/i,o=Math.sin(o*a)/i}const i=o*n;if(s=s*e+d*i,l=l*e+h*i,c=c*e+f*i,u=u*e+p*i,e===1-o){const e=1/Math.sqrt(s*s+l*l+c*c+u*u);s*=e,l*=e,c*=e,u*=e}}e[t]=s,e[t+1]=l,e[t+2]=c,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){const o=n[r],s=n[r+1],l=n[r+2],c=n[r+3],u=i[a],d=i[a+1],h=i[a+2],f=i[a+3];return e[t]=o*f+c*u+s*h-l*d,e[t+1]=s*f+c*d+l*u-o*h,e[t+2]=l*f+c*h+o*d-s*u,e[t+3]=c*f-o*u-s*d-l*h,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const n=e._x,r=e._y,i=e._z,a=e._order,o=Math.cos,s=Math.sin,l=o(n/2),c=o(r/2),u=o(i/2),d=s(n/2),h=s(r/2),f=s(i/2);switch(a){case"XYZ":this._x=d*c*u+l*h*f,this._y=l*h*u-d*c*f,this._z=l*c*f+d*h*u,this._w=l*c*u-d*h*f;break;case"YXZ":this._x=d*c*u+l*h*f,this._y=l*h*u-d*c*f,this._z=l*c*f-d*h*u,this._w=l*c*u+d*h*f;break;case"ZXY":this._x=d*c*u-l*h*f,this._y=l*h*u+d*c*f,this._z=l*c*f+d*h*u,this._w=l*c*u-d*h*f;break;case"ZYX":this._x=d*c*u-l*h*f,this._y=l*h*u+d*c*f,this._z=l*c*f-d*h*u,this._w=l*c*u+d*h*f;break;case"YZX":this._x=d*c*u+l*h*f,this._y=l*h*u+d*c*f,this._z=l*c*f-d*h*u,this._w=l*c*u-d*h*f;break;case"XZY":this._x=d*c*u-l*h*f,this._y=l*h*u-d*c*f,this._z=l*c*f+d*h*u,this._w=l*c*u+d*h*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],o=t[5],s=t[9],l=t[2],c=t[6],u=t[10],d=n+o+u;if(d>0){const e=.5/Math.sqrt(d+1);this._w=.25/e,this._x=(c-s)*e,this._y=(i-l)*e,this._z=(a-r)*e}else if(n>o&&n>u){const e=2*Math.sqrt(1+n-o-u);this._w=(c-s)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+l)/e}else if(o>u){const e=2*Math.sqrt(1+o-n-u);this._w=(i-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(s+c)/e}else{const e=2*Math.sqrt(1+u-n-o);this._w=(a-r)/e,this._x=(i+l)/e,this._y=(s+c)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(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._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(xn(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}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=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,a=e._w,o=t._x,s=t._y,l=t._z,c=t._w;return this._x=n*c+a*o+r*l-i*s,this._y=r*c+a*s+i*o-n*l,this._z=i*c+a*l+n*s-r*o,this._w=a*c-n*o-r*s-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,a=this._w;let o=a*e._w+n*e._x+r*e._y+i*e._z;if(o<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,o=-o):this.copy(e),o>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;const s=1-o*o;if(s<=Number.EPSILON){const e=1-t;return this._w=e*a+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(s),c=Math.atan2(l,o),u=Math.sin((1-t)*c)/l,d=Math.sin(t*c)/l;return this._w=a*u+this._w*d,this._x=n*u+this._x*d,this._y=r*u+this._y*d,this._z=i*u+this._z*d,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class lr{constructor(e=0,t=0,n=0){lr.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}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}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(ur.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(ur.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,o=e.z,s=e.w,l=s*t+a*r-o*n,c=s*n+o*t-i*r,u=s*r+i*n-a*t,d=-i*t-a*n-o*r;return this.x=l*s+d*-i+c*-o-u*-a,this.y=c*s+d*-a+u*-i-l*-o,this.z=u*s+d*-o+l*-a-c*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}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}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}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,a=t.x,o=t.y,s=t.z;return this.x=r*s-i*o,this.y=i*a-n*s,this.z=n*o-r*a,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return cr.copy(this).projectOnVector(e),this.sub(cr)}reflect(e){return this.sub(cr.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(xn(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const cr=new lr,ur=new sr;class dr{constructor(e=new lr(1/0,1/0,1/0),t=new lr(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,o=-1/0;for(let s=0,l=e.length;s<l;s+=3){const l=e[s],c=e[s+1],u=e[s+2];l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>a&&(a=c),u>o&&(o=u)}return this.min.set(t,n,r),this.max.set(i,a,o),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,o=-1/0;for(let s=0,l=e.count;s<l;s++){const l=e.getX(s),c=e.getY(s),u=e.getZ(s);l<t&&(t=l),c<n&&(n=c),u<r&&(r=u),l>i&&(i=l),c>a&&(a=c),u>o&&(o=u)}return this.min.set(t,n,r),this.max.set(i,a,o),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=fr.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n)if(t&&null!=n.attributes&&void 0!==n.attributes.position){const t=n.attributes.position;for(let n=0,r=t.count;n<r;n++)fr.fromBufferAttribute(t,n).applyMatrix4(e.matrixWorld),this.expandByPoint(fr)}else null===n.boundingBox&&n.computeBoundingBox(),pr.copy(n.boundingBox),pr.applyMatrix4(e.matrixWorld),this.union(pr);const r=e.children;for(let e=0,n=r.length;e<n;e++)this.expandByObject(r[e],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,fr),fr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(xr),wr.subVectors(this.max,xr),mr.subVectors(e.a,xr),gr.subVectors(e.b,xr),vr.subVectors(e.c,xr),yr.subVectors(gr,mr),br.subVectors(vr,gr),_r.subVectors(mr,vr);let t=[0,-yr.z,yr.y,0,-br.z,br.y,0,-_r.z,_r.y,yr.z,0,-yr.x,br.z,0,-br.x,_r.z,0,-_r.x,-yr.y,yr.x,0,-br.y,br.x,0,-_r.y,_r.x,0];return!!Ar(t,mr,gr,vr,wr)&&(t=[1,0,0,0,1,0,0,0,1],!!Ar(t,mr,gr,vr,wr)&&(Mr.crossVectors(yr,br),t=[Mr.x,Mr.y,Mr.z],Ar(t,mr,gr,vr,wr)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return fr.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(fr).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(hr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),hr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),hr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),hr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),hr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),hr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),hr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),hr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(hr)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const hr=[new lr,new lr,new lr,new lr,new lr,new lr,new lr,new lr],fr=new lr,pr=new dr,mr=new lr,gr=new lr,vr=new lr,yr=new lr,br=new lr,_r=new lr,xr=new lr,wr=new lr,Mr=new lr,Sr=new lr;function Ar(e,t,n,r,i){for(let a=0,o=e.length-3;a<=o;a+=3){Sr.fromArray(e,a);const o=i.x*Math.abs(Sr.x)+i.y*Math.abs(Sr.y)+i.z*Math.abs(Sr.z),s=t.dot(Sr),l=n.dot(Sr),c=r.dot(Sr);if(Math.max(-Math.max(s,l,c),Math.min(s,l,c))>o)return!1}return!0}const Er=new dr,Cr=new lr,Tr=new lr;class Rr{constructor(e=new lr,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Er.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;t<i;t++)r=Math.max(r,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Cr.subVectors(e,this.center);const t=Cr.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(Cr,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(Tr.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Cr.copy(e.center).add(Tr)),this.expandByPoint(Cr.copy(e.center).sub(Tr))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Br=new lr,Pr=new lr,kr=new lr,Ir=new lr,Lr=new lr,Dr=new lr,Or=new lr;class Fr{constructor(e=new lr,t=new lr(0,0,-1)){this.origin=e,this.direction=t}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.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Br)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Br.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Br.copy(this.direction).multiplyScalar(t).add(this.origin),Br.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Pr.copy(e).add(t).multiplyScalar(.5),kr.copy(t).sub(e).normalize(),Ir.copy(this.origin).sub(Pr);const i=.5*e.distanceTo(t),a=-this.direction.dot(kr),o=Ir.dot(this.direction),s=-Ir.dot(kr),l=Ir.lengthSq(),c=Math.abs(1-a*a);let u,d,h,f;if(c>0)if(u=a*s-o,d=a*o-s,f=i*c,u>=0)if(d>=-f)if(d<=f){const e=1/c;u*=e,d*=e,h=u*(u+a*d+2*o)+d*(a*u+d+2*s)+l}else d=i,u=Math.max(0,-(a*d+o)),h=-u*u+d*(d+2*s)+l;else d=-i,u=Math.max(0,-(a*d+o)),h=-u*u+d*(d+2*s)+l;else d<=-f?(u=Math.max(0,-(-a*i+o)),d=u>0?-i:Math.min(Math.max(-i,-s),i),h=-u*u+d*(d+2*s)+l):d<=f?(u=0,d=Math.min(Math.max(-i,-s),i),h=d*(d+2*s)+l):(u=Math.max(0,-(a*i+o)),d=u>0?i:Math.min(Math.max(-i,-s),i),h=-u*u+d*(d+2*s)+l);else d=a>0?-i:i,u=Math.max(0,-(a*d+o)),h=-u*u+d*(d+2*s)+l;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(kr).multiplyScalar(d).add(Pr),h}intersectSphere(e,t){Br.subVectors(e.center,this.origin);const n=Br.dot(this.direction),r=Br.dot(Br)-n*n,i=e.radius*e.radius;if(r>i)return null;const a=Math.sqrt(i-r),o=n-a,s=n+a;return o<0&&s<0?null:o<0?this.at(s,t):this.at(o,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,o,s;const l=1/this.direction.x,c=1/this.direction.y,u=1/this.direction.z,d=this.origin;return l>=0?(n=(e.min.x-d.x)*l,r=(e.max.x-d.x)*l):(n=(e.max.x-d.x)*l,r=(e.min.x-d.x)*l),c>=0?(i=(e.min.y-d.y)*c,a=(e.max.y-d.y)*c):(i=(e.max.y-d.y)*c,a=(e.min.y-d.y)*c),n>a||i>r?null:((i>n||isNaN(n))&&(n=i),(a<r||isNaN(r))&&(r=a),u>=0?(o=(e.min.z-d.z)*u,s=(e.max.z-d.z)*u):(o=(e.max.z-d.z)*u,s=(e.min.z-d.z)*u),n>s||o>r?null:((o>n||n!=n)&&(n=o),(s<r||r!=r)&&(r=s),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,Br)}intersectTriangle(e,t,n,r,i){Lr.subVectors(t,e),Dr.subVectors(n,e),Or.crossVectors(Lr,Dr);let a,o=this.direction.dot(Or);if(o>0){if(r)return null;a=1}else{if(!(o<0))return null;a=-1,o=-o}Ir.subVectors(this.origin,e);const s=a*this.direction.dot(Dr.crossVectors(Ir,Dr));if(s<0)return null;const l=a*this.direction.dot(Lr.cross(Ir));if(l<0)return null;if(s+l>o)return null;const c=-a*Ir.dot(Or);return c<0?null:this.at(c/o,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Nr{constructor(){Nr.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,n,r,i,a,o,s,l,c,u,d,h,f,p,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=o,g[13]=s,g[2]=l,g[6]=c,g[10]=u,g[14]=d,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}clone(){return(new Nr).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/zr.setFromMatrixColumn(e,0).length(),i=1/zr.setFromMatrixColumn(e,1).length(),a=1/zr.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),o=Math.sin(n),s=Math.cos(r),l=Math.sin(r),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=a*c,n=a*u,r=o*c,i=o*u;t[0]=s*c,t[4]=-s*u,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-o*s,t[2]=i-e*l,t[6]=r+n*l,t[10]=a*s}else if("YXZ"===e.order){const e=s*c,n=s*u,r=l*c,i=l*u;t[0]=e+i*o,t[4]=r*o-n,t[8]=a*l,t[1]=a*u,t[5]=a*c,t[9]=-o,t[2]=n*o-r,t[6]=i+e*o,t[10]=a*s}else if("ZXY"===e.order){const e=s*c,n=s*u,r=l*c,i=l*u;t[0]=e-i*o,t[4]=-a*u,t[8]=r+n*o,t[1]=n+r*o,t[5]=a*c,t[9]=i-e*o,t[2]=-a*l,t[6]=o,t[10]=a*s}else if("ZYX"===e.order){const e=a*c,n=a*u,r=o*c,i=o*u;t[0]=s*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=s*u,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=o*s,t[10]=a*s}else if("YZX"===e.order){const e=a*s,n=a*l,r=o*s,i=o*l;t[0]=s*c,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=a*c,t[9]=-o*c,t[2]=-l*c,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){const e=a*s,n=a*l,r=o*s,i=o*l;t[0]=s*c,t[4]=-u,t[8]=l*c,t[1]=e*u+i,t[5]=a*c,t[9]=n*u-r,t[2]=r*u-n,t[6]=o*c,t[10]=i*u+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Hr,e,Gr)}lookAt(e,t,n){const r=this.elements;return Wr.subVectors(e,t),0===Wr.lengthSq()&&(Wr.z=1),Wr.normalize(),Vr.crossVectors(n,Wr),0===Vr.lengthSq()&&(1===Math.abs(n.z)?Wr.x+=1e-4:Wr.z+=1e-4,Wr.normalize(),Vr.crossVectors(n,Wr)),Vr.normalize(),jr.crossVectors(Wr,Vr),r[0]=Vr.x,r[4]=jr.x,r[8]=Wr.x,r[1]=Vr.y,r[5]=jr.y,r[9]=Wr.y,r[2]=Vr.z,r[6]=jr.z,r[10]=Wr.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],o=n[4],s=n[8],l=n[12],c=n[1],u=n[5],d=n[9],h=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],b=n[11],_=n[15],x=r[0],w=r[4],M=r[8],S=r[12],A=r[1],E=r[5],C=r[9],T=r[13],R=r[2],B=r[6],P=r[10],k=r[14],I=r[3],L=r[7],D=r[11],O=r[15];return i[0]=a*x+o*A+s*R+l*I,i[4]=a*w+o*E+s*B+l*L,i[8]=a*M+o*C+s*P+l*D,i[12]=a*S+o*T+s*k+l*O,i[1]=c*x+u*A+d*R+h*I,i[5]=c*w+u*E+d*B+h*L,i[9]=c*M+u*C+d*P+h*D,i[13]=c*S+u*T+d*k+h*O,i[2]=f*x+p*A+m*R+g*I,i[6]=f*w+p*E+m*B+g*L,i[10]=f*M+p*C+m*P+g*D,i[14]=f*S+p*T+m*k+g*O,i[3]=v*x+y*A+b*R+_*I,i[7]=v*w+y*E+b*B+_*L,i[11]=v*M+y*C+b*P+_*D,i[15]=v*S+y*T+b*k+_*O,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}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],o=e[5],s=e[9],l=e[13],c=e[2],u=e[6],d=e[10],h=e[14];return e[3]*(+i*s*u-r*l*u-i*o*d+n*l*d+r*o*h-n*s*h)+e[7]*(+t*s*h-t*l*d+i*a*d-r*a*h+r*l*c-i*s*c)+e[11]*(+t*l*u-t*o*h-i*a*u+n*a*h+i*o*c-n*l*c)+e[15]*(-r*o*c-t*s*u+t*o*d+r*a*u-n*a*d+n*s*c)}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,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],o=e[5],s=e[6],l=e[7],c=e[8],u=e[9],d=e[10],h=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=u*m*l-p*d*l+p*s*h-o*m*h-u*s*g+o*d*g,y=f*d*l-c*m*l-f*s*h+a*m*h+c*s*g-a*d*g,b=c*p*l-f*u*l+f*o*h-a*p*h-c*o*g+a*u*g,_=f*u*s-c*p*s-f*o*d+a*p*d+c*o*m-a*u*m,x=t*v+n*y+r*b+i*_;if(0===x)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/x;return e[0]=v*w,e[1]=(p*d*i-u*m*i-p*r*h+n*m*h+u*r*g-n*d*g)*w,e[2]=(o*m*i-p*s*i+p*r*l-n*m*l-o*r*g+n*s*g)*w,e[3]=(u*s*i-o*d*i-u*r*l+n*d*l+o*r*h-n*s*h)*w,e[4]=y*w,e[5]=(c*m*i-f*d*i+f*r*h-t*m*h-c*r*g+t*d*g)*w,e[6]=(f*s*i-a*m*i-f*r*l+t*m*l+a*r*g-t*s*g)*w,e[7]=(a*d*i-c*s*i+c*r*l-t*d*l-a*r*h+t*s*h)*w,e[8]=b*w,e[9]=(f*u*i-c*p*i-f*n*h+t*p*h+c*n*g-t*u*g)*w,e[10]=(a*p*i-f*o*i+f*n*l-t*p*l-a*n*g+t*o*g)*w,e[11]=(c*o*i-a*u*i-c*n*l+t*u*l+a*n*h-t*o*h)*w,e[12]=_*w,e[13]=(c*p*r-f*u*r+f*n*d-t*p*d-c*n*m+t*u*m)*w,e[14]=(f*o*r-a*p*r-f*n*s+t*p*s+a*n*m-t*o*m)*w,e[15]=(a*u*r-c*o*r+c*n*s-t*u*s-a*n*d+t*o*d)*w,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,o=e.y,s=e.z,l=i*a,c=i*o;return this.set(l*a+n,l*o-r*s,l*s+r*o,0,l*o+r*s,c*o+n,c*s-r*a,0,l*s-r*o,c*s+r*a,i*s*s+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,a=t._y,o=t._z,s=t._w,l=i+i,c=a+a,u=o+o,d=i*l,h=i*c,f=i*u,p=a*c,m=a*u,g=o*u,v=s*l,y=s*c,b=s*u,_=n.x,x=n.y,w=n.z;return r[0]=(1-(p+g))*_,r[1]=(h+b)*_,r[2]=(f-y)*_,r[3]=0,r[4]=(h-b)*x,r[5]=(1-(d+g))*x,r[6]=(m+v)*x,r[7]=0,r[8]=(f+y)*w,r[9]=(m-v)*w,r[10]=(1-(d+p))*w,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=zr.set(r[0],r[1],r[2]).length();const a=zr.set(r[4],r[5],r[6]).length(),o=zr.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],Ur.copy(this);const s=1/i,l=1/a,c=1/o;return Ur.elements[0]*=s,Ur.elements[1]*=s,Ur.elements[2]*=s,Ur.elements[4]*=l,Ur.elements[5]*=l,Ur.elements[6]*=l,Ur.elements[8]*=c,Ur.elements[9]*=c,Ur.elements[10]*=c,t.setFromRotationMatrix(Ur),n.x=i,n.y=a,n.z=o,this}makePerspective(e,t,n,r,i,a){const o=this.elements,s=2*i/(t-e),l=2*i/(n-r),c=(t+e)/(t-e),u=(n+r)/(n-r),d=-(a+i)/(a-i),h=-2*a*i/(a-i);return o[0]=s,o[4]=0,o[8]=c,o[12]=0,o[1]=0,o[5]=l,o[9]=u,o[13]=0,o[2]=0,o[6]=0,o[10]=d,o[14]=h,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(e,t,n,r,i,a){const o=this.elements,s=1/(t-e),l=1/(n-r),c=1/(a-i),u=(t+e)*s,d=(n+r)*l,h=(a+i)*c;return o[0]=2*s,o[4]=0,o[8]=0,o[12]=-u,o[1]=0,o[5]=2*l,o[9]=0,o[13]=-d,o[2]=0,o[6]=0,o[10]=-2*c,o[14]=-h,o[3]=0,o[7]=0,o[11]=0,o[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const zr=new lr,Ur=new Nr,Hr=new lr(0,0,0),Gr=new lr(1,1,1),Vr=new lr,jr=new lr,Wr=new lr,Jr=new Nr,Xr=new sr;class Kr{constructor(e=0,t=0,n=0,r=Kr.DefaultOrder){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],a=r[4],o=r[8],s=r[1],l=r[5],c=r[9],u=r[2],d=r[6],h=r[10];switch(t){case"XYZ":this._y=Math.asin(xn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,h),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(d,l),this._z=0);break;case"YXZ":this._x=Math.asin(-xn(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(o,h),this._z=Math.atan2(s,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(xn(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(-u,h),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(s,i));break;case"ZYX":this._y=Math.asin(-xn(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(d,h),this._z=Math.atan2(s,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(xn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(o,h));break;case"XZY":this._z=Math.asin(-xn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(d,l),this._y=Math.atan2(o,i)):(this._x=Math.atan2(-c,h),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Jr.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Jr,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Xr.setFromEuler(this),this.setFromQuaternion(Xr,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}toVector3(){console.error("THREE.Euler: .toVector3() has been removed. Use Vector3.setFromEuler() instead")}}Kr.DefaultOrder="XYZ",Kr.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class $r{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!=(this.mask&e.mask)}isEnabled(e){return 0!=(this.mask&(1<<e|0))}}let Yr=0;const qr=new lr,Qr=new sr,Zr=new Nr,ei=new lr,ti=new lr,ni=new lr,ri=new sr,ii=new lr(1,0,0),ai=new lr(0,1,0),oi=new lr(0,0,1),si={type:"added"},li={type:"removed"};class ci extends mn{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Yr++}),this.uuid=_n(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=ci.DefaultUp.clone();const e=new lr,t=new Kr,n=new sr,r=new lr(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Nr},normalMatrix:{value:new Pn}}),this.matrix=new Nr,this.matrixWorld=new Nr,this.matrixAutoUpdate=ci.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.matrixWorldAutoUpdate=ci.DefaultMatrixWorldAutoUpdate,this.layers=new $r,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Qr.setFromAxisAngle(e,t),this.quaternion.multiply(Qr),this}rotateOnWorldAxis(e,t){return Qr.setFromAxisAngle(e,t),this.quaternion.premultiply(Qr),this}rotateX(e){return this.rotateOnAxis(ii,e)}rotateY(e){return this.rotateOnAxis(ai,e)}rotateZ(e){return this.rotateOnAxis(oi,e)}translateOnAxis(e,t){return qr.copy(e).applyQuaternion(this.quaternion),this.position.add(qr.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(ii,e)}translateY(e){return this.translateOnAxis(ai,e)}translateZ(e){return this.translateOnAxis(oi,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(Zr.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?ei.copy(e):ei.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),ti.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?Zr.lookAt(ti,ei,this.up):Zr.lookAt(ei,ti,this.up),this.quaternion.setFromRotationMatrix(Zr),r&&(Zr.extractRotation(r.matrixWorld),Qr.setFromRotationMatrix(Zr),this.quaternion.premultiply(Qr.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(si)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(li)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(li)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),Zr.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),Zr.multiply(e.parent.matrixWorld)),e.applyMatrix4(Zr),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getObjectsByProperty(e,t){let n=[];this[e]===t&&n.push(this);for(let r=0,i=this.children.length;r<i;r++){const i=this.children[r].getObjectsByProperty(e,t);i.length>0&&(n=n.concat(i))}return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ti,e,ni),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ti,ri,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++){const r=t[n];!0!==r.matrixWorldAutoUpdate&&!0!==e||r.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++){const n=e[t];!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=a(e.geometries),r=a(e.materials),i=a(e.textures),o=a(e.images),s=a(e.shapes),l=a(e.skeletons),c=a(e.animations),u=a(e.nodes);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),o.length>0&&(n.images=o),s.length>0&&(n.shapes=s),l.length>0&&(n.skeletons=l),c.length>0&&(n.animations=c),u.length>0&&(n.nodes=u)}return n.object=r,n;function a(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}ci.DefaultUp=new lr(0,1,0),ci.DefaultMatrixAutoUpdate=!0,ci.DefaultMatrixWorldAutoUpdate=!0;const ui=new lr,di=new lr,hi=new lr,fi=new lr,pi=new lr,mi=new lr,gi=new lr,vi=new lr,yi=new lr,bi=new lr;class _i{constructor(e=new lr,t=new lr,n=new lr){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),ui.subVectors(e,t),r.cross(ui);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){ui.subVectors(r,t),di.subVectors(n,t),hi.subVectors(e,t);const a=ui.dot(ui),o=ui.dot(di),s=ui.dot(hi),l=di.dot(di),c=di.dot(hi),u=a*l-o*o;if(0===u)return i.set(-2,-1,-1);const d=1/u,h=(l*s-o*c)*d,f=(a*c-o*s)*d;return i.set(1-h-f,f,h)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,fi),fi.x>=0&&fi.y>=0&&fi.x+fi.y<=1}static getUV(e,t,n,r,i,a,o,s){return this.getBarycoord(e,t,n,r,fi),s.set(0,0),s.addScaledVector(i,fi.x),s.addScaledVector(a,fi.y),s.addScaledVector(o,fi.z),s}static isFrontFacing(e,t,n,r){return ui.subVectors(n,t),di.subVectors(e,t),ui.cross(di).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ui.subVectors(this.c,this.b),di.subVectors(this.a,this.b),.5*ui.cross(di).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return _i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return _i.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return _i.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return _i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return _i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let a,o;pi.subVectors(r,n),mi.subVectors(i,n),vi.subVectors(e,n);const s=pi.dot(vi),l=mi.dot(vi);if(s<=0&&l<=0)return t.copy(n);yi.subVectors(e,r);const c=pi.dot(yi),u=mi.dot(yi);if(c>=0&&u<=c)return t.copy(r);const d=s*u-c*l;if(d<=0&&s>=0&&c<=0)return a=s/(s-c),t.copy(n).addScaledVector(pi,a);bi.subVectors(e,i);const h=pi.dot(bi),f=mi.dot(bi);if(f>=0&&h<=f)return t.copy(i);const p=h*l-s*f;if(p<=0&&l>=0&&f<=0)return o=l/(l-f),t.copy(n).addScaledVector(mi,o);const m=c*f-h*u;if(m<=0&&u-c>=0&&h-f>=0)return gi.subVectors(i,r),o=(u-c)/(u-c+(h-f)),t.copy(r).addScaledVector(gi,o);const g=1/(m+p+d);return a=p*g,o=d*g,t.copy(n).addScaledVector(pi,a).addScaledVector(mi,o)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let xi=0;class wi extends mn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:xi++}),this.uuid=_n(),this.name="",this.type="Material",this.blending=b,this.side=p,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=I,this.blendDst=L,this.blendEquation=S,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=V,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=tn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Ht,this.stencilZFail=Ht,this.stencilZPass=Ht,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==b&&(n.blending=this.blending),this.side!==p&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}class Mi extends wi{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Xn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=K,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Si=new lr,Ai=new Bn;class Ei{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=nn,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)Ai.fromBufferAttribute(this,t),Ai.applyMatrix3(e),this.setXY(t,Ai.x,Ai.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)Si.fromBufferAttribute(this,t),Si.applyMatrix3(e),this.setXYZ(t,Si.x,Si.y,Si.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Si.fromBufferAttribute(this,t),Si.applyMatrix4(e),this.setXYZ(t,Si.x,Si.y,Si.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Si.fromBufferAttribute(this,t),Si.applyNormalMatrix(e),this.setXYZ(t,Si.x,Si.y,Si.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Si.fromBufferAttribute(this,t),Si.transformDirection(e),this.setXYZ(t,Si.x,Si.y,Si.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=Cn(t,this.array)),t}setX(e,t){return this.normalized&&(t=Tn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Cn(t,this.array)),t}setY(e,t){return this.normalized&&(t=Tn(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=Cn(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Tn(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=Cn(t,this.array)),t}setW(e,t){return this.normalized&&(t=Tn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array),r=Tn(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array),r=Tn(r,this.array),i=Tn(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==nn&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}copyColorsArray(){console.error("THREE.BufferAttribute: copyColorsArray() was removed in r144.")}copyVector2sArray(){console.error("THREE.BufferAttribute: copyVector2sArray() was removed in r144.")}copyVector3sArray(){console.error("THREE.BufferAttribute: copyVector3sArray() was removed in r144.")}copyVector4sArray(){console.error("THREE.BufferAttribute: copyVector4sArray() was removed in r144.")}}class Ci extends Ei{constructor(e,t,n){super(new Int8Array(e),t,n)}}class Ti extends Ei{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class Ri extends Ei{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class Bi extends Ei{constructor(e,t,n){super(new Int16Array(e),t,n)}}class Pi extends Ei{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class ki extends Ei{constructor(e,t,n){super(new Int32Array(e),t,n)}}class Ii extends Ei{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Li extends Ei{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}}class Di extends Ei{constructor(e,t,n){super(new Float32Array(e),t,n)}}class Oi extends Ei{constructor(e,t,n){super(new Float64Array(e),t,n)}}let Fi=0;const Ni=new Nr,zi=new ci,Ui=new lr,Hi=new dr,Gi=new dr,Vi=new lr;class ji extends mn{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Fi++}),this.uuid=_n(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(In(e)?Ii:Pi)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new Pn).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return Ni.makeRotationFromQuaternion(e),this.applyMatrix4(Ni),this}rotateX(e){return Ni.makeRotationX(e),this.applyMatrix4(Ni),this}rotateY(e){return Ni.makeRotationY(e),this.applyMatrix4(Ni),this}rotateZ(e){return Ni.makeRotationZ(e),this.applyMatrix4(Ni),this}translate(e,t,n){return Ni.makeTranslation(e,t,n),this.applyMatrix4(Ni),this}scale(e,t,n){return Ni.makeScale(e,t,n),this.applyMatrix4(Ni),this}lookAt(e){return zi.lookAt(e),zi.updateMatrix(),this.applyMatrix4(zi.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ui).negate(),this.translate(Ui.x,Ui.y,Ui.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new Di(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new dr);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new lr(-1/0,-1/0,-1/0),new lr(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];Hi.setFromBufferAttribute(n),this.morphTargetsRelative?(Vi.addVectors(this.boundingBox.min,Hi.min),this.boundingBox.expandByPoint(Vi),Vi.addVectors(this.boundingBox.max,Hi.max),this.boundingBox.expandByPoint(Vi)):(this.boundingBox.expandByPoint(Hi.min),this.boundingBox.expandByPoint(Hi.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Rr);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new lr,1/0);if(e){const n=this.boundingSphere.center;if(Hi.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];Gi.setFromBufferAttribute(n),this.morphTargetsRelative?(Vi.addVectors(Hi.min,Gi.min),Hi.expandByPoint(Vi),Vi.addVectors(Hi.max,Gi.max),Hi.expandByPoint(Vi)):(Hi.expandByPoint(Gi.min),Hi.expandByPoint(Gi.max))}Hi.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)Vi.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(Vi));if(t)for(let i=0,a=t.length;i<a;i++){const a=t[i],o=this.morphTargetsRelative;for(let t=0,i=a.count;t<i;t++)Vi.fromBufferAttribute(a,t),o&&(Ui.fromBufferAttribute(e,t),Vi.add(Ui)),r=Math.max(r,n.distanceToSquared(Vi))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,r=t.position.array,i=t.normal.array,a=t.uv.array,o=r.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new Ei(new Float32Array(4*o),4));const s=this.getAttribute("tangent").array,l=[],c=[];for(let e=0;e<o;e++)l[e]=new lr,c[e]=new lr;const u=new lr,d=new lr,h=new lr,f=new Bn,p=new Bn,m=new Bn,g=new lr,v=new lr;function y(e,t,n){u.fromArray(r,3*e),d.fromArray(r,3*t),h.fromArray(r,3*n),f.fromArray(a,2*e),p.fromArray(a,2*t),m.fromArray(a,2*n),d.sub(u),h.sub(u),p.sub(f),m.sub(f);const i=1/(p.x*m.y-m.x*p.y);isFinite(i)&&(g.copy(d).multiplyScalar(m.y).addScaledVector(h,-p.y).multiplyScalar(i),v.copy(h).multiplyScalar(p.x).addScaledVector(d,-m.x).multiplyScalar(i),l[e].add(g),l[t].add(g),l[n].add(g),c[e].add(v),c[t].add(v),c[n].add(v))}let b=this.groups;0===b.length&&(b=[{start:0,count:n.length}]);for(let e=0,t=b.length;e<t;++e){const t=b[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)y(n[e+0],n[e+1],n[e+2])}const _=new lr,x=new lr,w=new lr,M=new lr;function S(e){w.fromArray(i,3*e),M.copy(w);const t=l[e];_.copy(t),_.sub(w.multiplyScalar(w.dot(t))).normalize(),x.crossVectors(M,t);const n=x.dot(c[e])<0?-1:1;s[4*e]=_.x,s[4*e+1]=_.y,s[4*e+2]=_.z,s[4*e+3]=n}for(let e=0,t=b.length;e<t;++e){const t=b[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)S(n[e+0]),S(n[e+1]),S(n[e+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new Ei(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new lr,i=new lr,a=new lr,o=new lr,s=new lr,l=new lr,c=new lr,u=new lr;if(e)for(let d=0,h=e.count;d<h;d+=3){const h=e.getX(d+0),f=e.getX(d+1),p=e.getX(d+2);r.fromBufferAttribute(t,h),i.fromBufferAttribute(t,f),a.fromBufferAttribute(t,p),c.subVectors(a,i),u.subVectors(r,i),c.cross(u),o.fromBufferAttribute(n,h),s.fromBufferAttribute(n,f),l.fromBufferAttribute(n,p),o.add(c),s.add(c),l.add(c),n.setXYZ(h,o.x,o.y,o.z),n.setXYZ(f,s.x,s.y,s.z),n.setXYZ(p,l.x,l.y,l.z)}else for(let e=0,o=t.count;e<o;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),c.subVectors(a,i),u.subVectors(r,i),c.cross(u),n.setXYZ(e+0,c.x,c.y,c.z),n.setXYZ(e+1,c.x,c.y,c.z),n.setXYZ(e+2,c.x,c.y,c.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(){return console.error("THREE.BufferGeometry.merge() has been removed. Use THREE.BufferGeometryUtils.mergeBufferGeometries() instead."),this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Vi.fromBufferAttribute(e,t),Vi.normalize(),e.setXYZ(t,Vi.x,Vi.y,Vi.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,a=new n.constructor(t.length*r);let o=0,s=0;for(let i=0,l=t.length;i<l;i++){o=e.isInterleavedBufferAttribute?t[i]*e.data.stride+e.offset:t[i]*r;for(let e=0;e<r;e++)a[s++]=n[o++]}return new Ei(a,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new ji,n=this.index.array,r=this.attributes;for(const i in r){const a=e(r[i],n);t.setAttribute(i,a)}const i=this.morphAttributes;for(const r in i){const a=[],o=i[r];for(let t=0,r=o.length;t<r;t++){const r=e(o[t],n);a.push(r)}t.morphAttributes[r]=a}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let e=0,n=a.length;e<n;e++){const n=a[e];t.addGroup(n.start,n.count,n.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const r=n[t];e.data.attributes[t]=r.toJSON(e.data)}const r={};let i=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t<r;t++){const r=n[t];a.push(r.toJSON(e.data))}a.length>0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const o=this.boundingSphere;return null!==o&&(e.data.boundingSphere={center:o.center.toArray(),radius:o.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const e in r){const n=r[e];this.setAttribute(e,n.clone(t))}const i=e.morphAttributes;for(const e in i){const n=[],r=i[e];for(let e=0,i=r.length;e<i;e++)n.push(r[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let e=0,t=a.length;e<t;e++){const t=a[e];this.addGroup(t.start,t.count,t.materialIndex)}const o=e.boundingBox;null!==o&&(this.boundingBox=o.clone());const s=e.boundingSphere;return null!==s&&(this.boundingSphere=s.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,void 0!==e.parameters&&(this.parameters=Object.assign({},e.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}}const Wi=new Nr,Ji=new Fr,Xi=new Rr,Ki=new lr,$i=new lr,Yi=new lr,qi=new lr,Qi=new lr,Zi=new Bn,ea=new Bn,ta=new Bn,na=new lr,ra=new lr;class ia extends ci{constructor(e=new ji,t=new Mi){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){const n=this.geometry,r=n.attributes.position,i=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(r,e);const o=this.morphTargetInfluences;if(i&&o){Qi.set(0,0,0);for(let n=0,r=i.length;n<r;n++){const r=o[n],s=i[n];0!==r&&(qi.fromBufferAttribute(s,e),a?Qi.addScaledVector(qi,r):Qi.addScaledVector(qi.sub(t),r))}t.add(Qi)}return this.isSkinnedMesh&&this.boneTransform(e,t),t}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),Xi.copy(n.boundingSphere),Xi.applyMatrix4(i),!1===e.ray.intersectsSphere(Xi))return;if(Wi.copy(i).invert(),Ji.copy(e.ray).applyMatrix4(Wi),null!==n.boundingBox&&!1===Ji.intersectsBox(n.boundingBox))return;let a;const o=n.index,s=n.attributes.position,l=n.attributes.uv,c=n.attributes.uv2,u=n.groups,d=n.drawRange;if(null!==o)if(Array.isArray(r))for(let n=0,i=u.length;n<i;n++){const i=u[n],s=r[i.materialIndex];for(let n=Math.max(i.start,d.start),r=Math.min(o.count,Math.min(i.start+i.count,d.start+d.count));n<r;n+=3){const r=o.getX(n),u=o.getX(n+1),d=o.getX(n+2);a=aa(this,s,e,Ji,l,c,r,u,d),a&&(a.faceIndex=Math.floor(n/3),a.face.materialIndex=i.materialIndex,t.push(a))}}else for(let n=Math.max(0,d.start),i=Math.min(o.count,d.start+d.count);n<i;n+=3){const i=o.getX(n),s=o.getX(n+1),u=o.getX(n+2);a=aa(this,r,e,Ji,l,c,i,s,u),a&&(a.faceIndex=Math.floor(n/3),t.push(a))}else if(void 0!==s)if(Array.isArray(r))for(let n=0,i=u.length;n<i;n++){const i=u[n],o=r[i.materialIndex];for(let n=Math.max(i.start,d.start),r=Math.min(s.count,Math.min(i.start+i.count,d.start+d.count));n<r;n+=3)a=aa(this,o,e,Ji,l,c,n,n+1,n+2),a&&(a.faceIndex=Math.floor(n/3),a.face.materialIndex=i.materialIndex,t.push(a))}else for(let n=Math.max(0,d.start),i=Math.min(s.count,d.start+d.count);n<i;n+=3)a=aa(this,r,e,Ji,l,c,n,n+1,n+2),a&&(a.faceIndex=Math.floor(n/3),t.push(a))}}function aa(e,t,n,r,i,a,o,s,l){e.getVertexPosition(o,Ki),e.getVertexPosition(s,$i),e.getVertexPosition(l,Yi);const c=function(e,t,n,r,i,a,o,s){let l;if(l=t.side===m?r.intersectTriangle(o,a,i,!0,s):r.intersectTriangle(i,a,o,t.side===p,s),null===l)return null;ra.copy(s),ra.applyMatrix4(e.matrixWorld);const c=n.ray.origin.distanceTo(ra);return c<n.near||c>n.far?null:{distance:c,point:ra.clone(),object:e}}(e,t,n,r,Ki,$i,Yi,na);if(c){i&&(Zi.fromBufferAttribute(i,o),ea.fromBufferAttribute(i,s),ta.fromBufferAttribute(i,l),c.uv=_i.getUV(na,Ki,$i,Yi,Zi,ea,ta,new Bn)),a&&(Zi.fromBufferAttribute(a,o),ea.fromBufferAttribute(a,s),ta.fromBufferAttribute(a,l),c.uv2=_i.getUV(na,Ki,$i,Yi,Zi,ea,ta,new Bn));const e={a:o,b:s,c:l,normal:new lr,materialIndex:0};_i.getNormal(Ki,$i,Yi,e.normal),c.face=e}return c}class oa extends ji{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};const o=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);const s=[],l=[],c=[],u=[];let d=0,h=0;function f(e,t,n,r,i,a,f,p,m,g,v){const y=a/m,b=f/g,_=a/2,x=f/2,w=p/2,M=m+1,S=g+1;let A=0,E=0;const C=new lr;for(let a=0;a<S;a++){const o=a*b-x;for(let s=0;s<M;s++){const d=s*y-_;C[e]=d*r,C[t]=o*i,C[n]=w,l.push(C.x,C.y,C.z),C[e]=0,C[t]=0,C[n]=p>0?1:-1,c.push(C.x,C.y,C.z),u.push(s/m),u.push(1-a/g),A+=1}}for(let e=0;e<g;e++)for(let t=0;t<m;t++){const n=d+t+M*e,r=d+t+M*(e+1),i=d+(t+1)+M*(e+1),a=d+(t+1)+M*e;s.push(n,r,a),s.push(r,i,a),E+=6}o.addGroup(h,E,v),h+=E,d+=A}f("z","y","x",-1,-1,n,t,e,a,i,0),f("z","y","x",1,-1,n,t,-e,a,i,1),f("x","z","y",1,1,e,n,t,r,a,2),f("x","z","y",1,-1,e,n,-t,r,a,3),f("x","y","z",1,-1,e,t,n,r,i,4),f("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(s),this.setAttribute("position",new Di(l,3)),this.setAttribute("normal",new Di(c,3)),this.setAttribute("uv",new Di(u,2))}static fromJSON(e){return new oa(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function sa(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function la(e){const t={};for(let n=0;n<e.length;n++){const r=sa(e[n]);for(const e in r)t[e]=r[e]}return t}function ca(e){return null===e.getRenderTarget()&&e.outputEncoding===kt?Nt:zt}const ua={clone:sa,merge:la};class da extends wi{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=sa(e.uniforms),this.uniformsGroups=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const n in this.uniforms){const r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:"m4",value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class ha extends ci{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nr,this.projectionMatrix=new Nr,this.projectionMatrixInverse=new Nr}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class fa extends ha{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*bn*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*yn*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*bn*Math.atan(Math.tan(.5*yn*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*yn*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,o=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/o,r*=a.width/e,n*=a.height/o}const o=this.filmOffset;0!==o&&(i+=e*o/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const pa=-90;class ma extends ci{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n;const r=new fa(pa,1,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(1,0,0),this.add(r);const i=new fa(pa,1,e,t);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(-1,0,0),this.add(i);const a=new fa(pa,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(0,1,0),this.add(a);const o=new fa(pa,1,e,t);o.layers=this.layers,o.up.set(0,0,1),o.lookAt(0,-1,0),this.add(o);const s=new fa(pa,1,e,t);s.layers=this.layers,s.up.set(0,1,0),s.lookAt(0,0,1),this.add(s);const l=new fa(pa,1,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,-1),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,a,o,s,l]=this.children,c=e.getRenderTarget(),u=e.toneMapping,d=e.xr.enabled;e.toneMapping=q,e.xr.enabled=!1;const h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,a),e.setRenderTarget(n,3),e.render(t,o),e.setRenderTarget(n,4),e.render(t,s),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(c),e.toneMapping=u,e.xr.enabled=d,n.texture.needsPMREMUpdate=!0}}class ga extends Zn{constructor(e,t,n,r,i,a,o,s,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:ie,n,r,i,a,o,s,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class va extends tr{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new ga(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:ve}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={tEquirect:{value:null}},r="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",a=new oa(5,5,5),o=new da({name:"CubemapFromEquirect",uniforms:sa(n),vertexShader:r,fragmentShader:i,side:m,blending:y});o.uniforms.tEquirect.value=t;const s=new ia(a,o),l=t.minFilter;return t.minFilter===_e&&(t.minFilter=ve),new ma(1,10,this).update(e,s),t.minFilter=l,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}const ya=new lr,ba=new lr,_a=new Pn;class xa{constructor(e=new lr(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=ya.subVectors(n,t).cross(ba.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(ya),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||_a.getNormalMatrix(e),r=this.coplanarPoint(ya).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const wa=new Rr,Ma=new lr;class Sa{constructor(e=new xa,t=new xa,n=new xa,r=new xa,i=new xa,a=new xa){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){const o=this.planes;return o[0].copy(e),o[1].copy(t),o[2].copy(n),o[3].copy(r),o[4].copy(i),o[5].copy(a),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],a=n[2],o=n[3],s=n[4],l=n[5],c=n[6],u=n[7],d=n[8],h=n[9],f=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(o-r,u-s,p-d,y-m).normalize(),t[1].setComponents(o+r,u+s,p+d,y+m).normalize(),t[2].setComponents(o+i,u+l,p+h,y+g).normalize(),t[3].setComponents(o-i,u-l,p-h,y-g).normalize(),t[4].setComponents(o-a,u-c,p-f,y-v).normalize(),t[5].setComponents(o+a,u+c,p+f,y+v).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),wa.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(wa)}intersectsSprite(e){return wa.center.set(0,0,0),wa.radius=.7071067811865476,wa.applyMatrix4(e.matrixWorld),this.intersectsSphere(wa)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)<r)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(Ma.x=r.normal.x>0?e.max.x:e.min.x,Ma.y=r.normal.y>0?e.max.y:e.min.y,Ma.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Ma)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Aa(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Ea(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const a=r.get(t);void 0===a?r.set(t,function(t,r){const i=t.array,a=t.usage,o=e.createBuffer();let s;if(e.bindBuffer(r,o),e.bufferData(r,i,a),t.onUploadCallback(),i instanceof Float32Array)s=5126;else if(i instanceof Uint16Array)if(t.isFloat16BufferAttribute){if(!n)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");s=5131}else s=5123;else if(i instanceof Int16Array)s=5122;else if(i instanceof Uint32Array)s=5125;else if(i instanceof Int32Array)s=5124;else if(i instanceof Int8Array)s=5120;else if(i instanceof Uint8Array)s=5121;else{if(!(i instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+i);s=5121}return{buffer:o,type:s,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):a.version<t.version&&(function(t,r,i){const a=r.array,o=r.updateRange;e.bindBuffer(i,t),-1===o.count?e.bufferSubData(i,0,a):(n?e.bufferSubData(i,o.offset*a.BYTES_PER_ELEMENT,a,o.offset,o.count):e.bufferSubData(i,o.offset*a.BYTES_PER_ELEMENT,a.subarray(o.offset,o.offset+o.count)),o.count=-1),r.onUploadCallback()}(a.buffer,t,i),a.version=t.version)}}}class Ca extends ji{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,a=t/2,o=Math.floor(n),s=Math.floor(r),l=o+1,c=s+1,u=e/o,d=t/s,h=[],f=[],p=[],m=[];for(let e=0;e<c;e++){const t=e*d-a;for(let n=0;n<l;n++){const r=n*u-i;f.push(r,-t,0),p.push(0,0,1),m.push(n/o),m.push(1-e/s)}}for(let e=0;e<s;e++)for(let t=0;t<o;t++){const n=t+l*e,r=t+l*(e+1),i=t+1+l*(e+1),a=t+1+l*e;h.push(n,r,a),h.push(r,i,a)}this.setIndex(h),this.setAttribute("position",new Di(f,3)),this.setAttribute("normal",new Di(p,3)),this.setAttribute("uv",new Di(m,2))}static fromJSON(e){return new Ca(e.width,e.height,e.widthSegments,e.heightSegments)}}const Ta={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\n#ifdef USE_IRIDESCENCE\n\tvec3 BRDF_GGX_Iridescence( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float iridescence, const in vec3 iridescenceFresnel, const in float roughness ) {\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = mix( F_Schlick( f0, f90, dotVH ), iridescenceFresnel, iridescence );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\t return vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat R21 = R12;\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX_Iridescence( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness );\n\t#else\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if defined( USE_SHADOWMAP ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_COORDS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef texture2DLodEXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},Ra={common:{diffuse:{value:new Xn(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Pn},uv2Transform:{value:new Pn},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Bn(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Xn(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Xn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Pn}},sprite:{diffuse:{value:new Xn(16777215)},opacity:{value:1},center:{value:new Bn(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Pn}}},Ba={basic:{uniforms:la([Ra.common,Ra.specularmap,Ra.envmap,Ra.aomap,Ra.lightmap,Ra.fog]),vertexShader:Ta.meshbasic_vert,fragmentShader:Ta.meshbasic_frag},lambert:{uniforms:la([Ra.common,Ra.specularmap,Ra.envmap,Ra.aomap,Ra.lightmap,Ra.emissivemap,Ra.bumpmap,Ra.normalmap,Ra.displacementmap,Ra.fog,Ra.lights,{emissive:{value:new Xn(0)}}]),vertexShader:Ta.meshlambert_vert,fragmentShader:Ta.meshlambert_frag},phong:{uniforms:la([Ra.common,Ra.specularmap,Ra.envmap,Ra.aomap,Ra.lightmap,Ra.emissivemap,Ra.bumpmap,Ra.normalmap,Ra.displacementmap,Ra.fog,Ra.lights,{emissive:{value:new Xn(0)},specular:{value:new Xn(1118481)},shininess:{value:30}}]),vertexShader:Ta.meshphong_vert,fragmentShader:Ta.meshphong_frag},standard:{uniforms:la([Ra.common,Ra.envmap,Ra.aomap,Ra.lightmap,Ra.emissivemap,Ra.bumpmap,Ra.normalmap,Ra.displacementmap,Ra.roughnessmap,Ra.metalnessmap,Ra.fog,Ra.lights,{emissive:{value:new Xn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ta.meshphysical_vert,fragmentShader:Ta.meshphysical_frag},toon:{uniforms:la([Ra.common,Ra.aomap,Ra.lightmap,Ra.emissivemap,Ra.bumpmap,Ra.normalmap,Ra.displacementmap,Ra.gradientmap,Ra.fog,Ra.lights,{emissive:{value:new Xn(0)}}]),vertexShader:Ta.meshtoon_vert,fragmentShader:Ta.meshtoon_frag},matcap:{uniforms:la([Ra.common,Ra.bumpmap,Ra.normalmap,Ra.displacementmap,Ra.fog,{matcap:{value:null}}]),vertexShader:Ta.meshmatcap_vert,fragmentShader:Ta.meshmatcap_frag},points:{uniforms:la([Ra.points,Ra.fog]),vertexShader:Ta.points_vert,fragmentShader:Ta.points_frag},dashed:{uniforms:la([Ra.common,Ra.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ta.linedashed_vert,fragmentShader:Ta.linedashed_frag},depth:{uniforms:la([Ra.common,Ra.displacementmap]),vertexShader:Ta.depth_vert,fragmentShader:Ta.depth_frag},normal:{uniforms:la([Ra.common,Ra.bumpmap,Ra.normalmap,Ra.displacementmap,{opacity:{value:1}}]),vertexShader:Ta.meshnormal_vert,fragmentShader:Ta.meshnormal_frag},sprite:{uniforms:la([Ra.sprite,Ra.fog]),vertexShader:Ta.sprite_vert,fragmentShader:Ta.sprite_frag},background:{uniforms:{uvTransform:{value:new Pn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ta.background_vert,fragmentShader:Ta.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Ta.backgroundCube_vert,fragmentShader:Ta.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ta.cube_vert,fragmentShader:Ta.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ta.equirect_vert,fragmentShader:Ta.equirect_frag},distanceRGBA:{uniforms:la([Ra.common,Ra.displacementmap,{referencePosition:{value:new lr},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ta.distanceRGBA_vert,fragmentShader:Ta.distanceRGBA_frag},shadow:{uniforms:la([Ra.lights,Ra.fog,{color:{value:new Xn(0)},opacity:{value:1}}]),vertexShader:Ta.shadow_vert,fragmentShader:Ta.shadow_frag}};Ba.physical={uniforms:la([Ba.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Bn(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Xn(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Bn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Xn(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Xn(1,1,1)},specularColorMap:{value:null}}]),vertexShader:Ta.meshphysical_vert,fragmentShader:Ta.meshphysical_frag};const Pa={r:0,b:0,g:0};function ka(e,t,n,r,i,a,o){const s=new Xn(0);let l,c,u=!0===a?0:1,d=null,h=0,f=null;function g(t,n){t.getRGB(Pa,ca(e)),r.buffers.color.setClear(Pa.r,Pa.g,Pa.b,n,o)}return{getClearColor:function(){return s},setClearColor:function(e,t=1){s.set(e),u=t,g(s,u)},getClearAlpha:function(){return u},setClearAlpha:function(e){u=e,g(s,u)},render:function(r,a){let o=!1,v=!0===a.isScene?a.background:null;v&&v.isTexture&&(v=(a.backgroundBlurriness>0?n:t).get(v));const y=e.xr,b=y.getSession&&y.getSession();b&&"additive"===b.environmentBlendMode&&(v=null),null===v?g(s,u):v&&v.isColor&&(g(v,1),o=!0),(e.autoClear||o)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),v&&(v.isCubeTexture||v.mapping===le)?(void 0===c&&(c=new ia(new oa(1,1,1),new da({name:"BackgroundCubeMaterial",uniforms:sa(Ba.backgroundCube.uniforms),vertexShader:Ba.backgroundCube.vertexShader,fragmentShader:Ba.backgroundCube.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(c)),c.material.uniforms.envMap.value=v,c.material.uniforms.flipEnvMap.value=v.isCubeTexture&&!1===v.isRenderTargetTexture?-1:1,c.material.uniforms.backgroundBlurriness.value=a.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=a.backgroundIntensity,c.material.toneMapped=v.encoding!==kt,d===v&&h===v.version&&f===e.toneMapping||(c.material.needsUpdate=!0,d=v,h=v.version,f=e.toneMapping),c.layers.enableAll(),r.unshift(c,c.geometry,c.material,0,0,null)):v&&v.isTexture&&(void 0===l&&(l=new ia(new Ca(2,2),new da({name:"BackgroundMaterial",uniforms:sa(Ba.background.uniforms),vertexShader:Ba.background.vertexShader,fragmentShader:Ba.background.fragmentShader,side:p,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=v,l.material.uniforms.backgroundIntensity.value=a.backgroundIntensity,l.material.toneMapped=v.encoding!==kt,!0===v.matrixAutoUpdate&&v.updateMatrix(),l.material.uniforms.uvTransform.value.copy(v.matrix),d===v&&h===v.version&&f===e.toneMapping||(l.material.needsUpdate=!0,d=v,h=v.version,f=e.toneMapping),l.layers.enableAll(),r.unshift(l,l.geometry,l.material,0,0,null))}}}function Ia(e,t,n,r){const i=e.getParameter(34921),a=r.isWebGL2?null:t.get("OES_vertex_array_object"),o=r.isWebGL2||null!==a,s={},l=f(null);let c=l,u=!1;function d(t){return r.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function h(t){return r.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function f(e){const t=[],n=[],r=[];for(let e=0;e<i;e++)t[e]=0,n[e]=0,r[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function p(){const e=c.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function m(e){g(e,0)}function g(n,i){const a=c.newAttributes,o=c.enabledAttributes,s=c.attributeDivisors;a[n]=1,0===o[n]&&(e.enableVertexAttribArray(n),o[n]=1),s[n]!==i&&((r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),s[n]=i)}function v(){const t=c.newAttributes,n=c.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function y(t,n,i,a,o,s){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,a,o,s):e.vertexAttribIPointer(t,n,i,o,s)}function b(){_(),u=!0,c!==l&&(c=l,d(c.object))}function _(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,h,b,_){let x=!1;if(o){const t=function(t,n,i){const o=!0===i.wireframe;let l=s[t.id];void 0===l&&(l={},s[t.id]=l);let c=l[n.id];void 0===c&&(c={},l[n.id]=c);let u=c[o];return void 0===u&&(u=f(r.isWebGL2?e.createVertexArray():a.createVertexArrayOES()),c[o]=u),u}(b,h,l);c!==t&&(c=t,d(c.object)),x=function(e,t,n,r){const i=c.attributes,a=t.attributes;let o=0;const s=n.getAttributes();for(const t in s)if(s[t].location>=0){const n=i[t];let r=a[t];if(void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor)),void 0===n)return!0;if(n.attribute!==r)return!0;if(r&&n.data!==r.data)return!0;o++}return c.attributesNum!==o||c.index!==r}(i,b,h,_),x&&function(e,t,n,r){const i={},a=t.attributes;let o=0;const s=n.getAttributes();for(const t in s)if(s[t].location>=0){let n=a[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));const r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,o++}c.attributes=i,c.attributesNum=o,c.index=r}(i,b,h,_)}else{const e=!0===l.wireframe;c.geometry===b.id&&c.program===h.id&&c.wireframe===e||(c.geometry=b.id,c.program=h.id,c.wireframe=e,x=!0)}null!==_&&n.update(_,34963),(x||u)&&(u=!1,function(i,a,o,s){if(!1===r.isWebGL2&&(i.isInstancedMesh||s.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;p();const l=s.attributes,c=o.getAttributes(),u=a.defaultAttributeValues;for(const t in c){const r=c[t];if(r.location>=0){let a=l[t];if(void 0===a&&("instanceMatrix"===t&&i.instanceMatrix&&(a=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(a=i.instanceColor)),void 0!==a){const t=a.normalized,o=a.itemSize,l=n.get(a);if(void 0===l)continue;const c=l.buffer,u=l.type,d=l.bytesPerElement;if(a.isInterleavedBufferAttribute){const n=a.data,l=n.stride,h=a.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e<r.locationSize;e++)g(r.location+e,n.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===s._maxInstanceCount&&(s._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e<r.locationSize;e++)m(r.location+e);e.bindBuffer(34962,c);for(let e=0;e<r.locationSize;e++)y(r.location+e,o/r.locationSize,u,t,l*d,(h+o/r.locationSize*e)*d)}else{if(a.isInstancedBufferAttribute){for(let e=0;e<r.locationSize;e++)g(r.location+e,a.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===s._maxInstanceCount&&(s._maxInstanceCount=a.meshPerAttribute*a.count)}else for(let e=0;e<r.locationSize;e++)m(r.location+e);e.bindBuffer(34962,c);for(let e=0;e<r.locationSize;e++)y(r.location+e,o/r.locationSize,u,t,o*d,o/r.locationSize*e*d)}}else if(void 0!==u){const n=u[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(r.location,n);break;case 3:e.vertexAttrib3fv(r.location,n);break;case 4:e.vertexAttrib4fv(r.location,n);break;default:e.vertexAttrib1fv(r.location,n)}}}}v()}(i,l,h,b),null!==_&&e.bindBuffer(34963,n.get(_).buffer))},reset:b,resetDefaultState:_,dispose:function(){b();for(const e in s){const t=s[e];for(const e in t){const n=t[e];for(const e in n)h(n[e].object),delete n[e];delete t[e]}delete s[e]}},releaseStatesOfGeometry:function(e){if(void 0===s[e.id])return;const t=s[e.id];for(const e in t){const n=t[e];for(const e in n)h(n[e].object),delete n[e];delete t[e]}delete s[e.id]},releaseStatesOfProgram:function(e){for(const t in s){const n=s[t];if(void 0===n[e.id])continue;const r=n[e.id];for(const e in r)h(r[e].object),delete r[e];delete n[e.id]}},initAttributes:p,enableAttribute:m,disableUnusedAttributes:v}}function La(e,t,n,r){const i=r.isWebGL2;let a;this.setMode=function(e){a=e},this.render=function(t,r){e.drawArrays(a,t,r),n.update(r,a,1)},this.renderInstances=function(r,o,s){if(0===s)return;let l,c;if(i)l=e,c="drawArraysInstanced";else if(l=t.get("ANGLE_instanced_arrays"),c="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[c](a,r,o,s),n.update(o,a,s)}}function Da(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const a="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let o=void 0!==n.precision?n.precision:"highp";const s=i(o);s!==o&&(console.warn("THREE.WebGLRenderer:",o,"not supported, using",s,"instead."),o=s);const l=a||t.has("WEBGL_draw_buffers"),c=!0===n.logarithmicDepthBuffer,u=e.getParameter(34930),d=e.getParameter(35660),h=e.getParameter(3379),f=e.getParameter(34076),p=e.getParameter(34921),m=e.getParameter(36347),g=e.getParameter(36348),v=e.getParameter(36349),y=d>0,b=a||t.has("OES_texture_float");return{isWebGL2:a,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:o,logarithmicDepthBuffer:c,maxTextures:u,maxVertexTextures:d,maxTextureSize:h,maxCubemapSize:f,maxAttributes:p,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:b,floatVertexTextures:y&&b,maxSamples:a?e.getParameter(36183):0}}function Oa(e){const t=this;let n=null,r=0,i=!1,a=!1;const o=new xa,s=new Pn,l={value:null,needsUpdate:!1};function c(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function u(e,n,r,i){const a=null!==e?e.length:0;let c=null;if(0!==a){if(c=l.value,!0!==i||null===c){const t=r+4*a,i=n.matrixWorldInverse;s.getNormalMatrix(i),(null===c||c.length<t)&&(c=new Float32Array(t));for(let t=0,n=r;t!==a;++t,n+=4)o.copy(e[t]).applyMatrix4(i,s),o.normal.toArray(c,n),c[n+3]=o.constant}l.value=c,l.needsUpdate=!0}return t.numPlanes=a,t.numIntersection=0,c}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,a){const o=0!==e.length||t||0!==r||i;return i=t,n=u(e,a,0),r=e.length,o},this.beginShadows=function(){a=!0,u(null)},this.endShadows=function(){a=!1,c()},this.setState=function(t,o,s){const d=t.clippingPlanes,h=t.clipIntersection,f=t.clipShadows,p=e.get(t);if(!i||null===d||0===d.length||a&&!f)a?u(null):c();else{const e=a?0:r,t=4*e;let i=p.clippingState||null;l.value=i,i=u(d,o,t,s);for(let e=0;e!==t;++e)i[e]=n[e];p.clippingState=i,this.numIntersection=h?this.numPlanes:0,this.numPlanes+=e}}}function Fa(e){let t=new WeakMap;function n(e,t){return t===oe?e.mapping=ie:t===se&&(e.mapping=ae),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const a=i.mapping;if(a===oe||a===se){if(t.has(i))return n(t.get(i).texture,i.mapping);{const a=i.image;if(a&&a.height>0){const o=new va(a.height/2);return o.fromEquirectangularTexture(e,i),t.set(i,o),i.addEventListener("dispose",r),n(o.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}class Na extends ha{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,a=n+e,o=r+t,s=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,o-=t*this.view.offsetY,s=o-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,o,s,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const za=[.125,.215,.35,.446,.526,.582],Ua=new Na,Ha=new Xn;let Ga=null;const Va=(1+Math.sqrt(5))/2,ja=1/Va,Wa=[new lr(1,1,1),new lr(-1,1,1),new lr(1,1,-1),new lr(-1,1,-1),new lr(0,Va,ja),new lr(0,Va,-ja),new lr(ja,0,Va),new lr(-ja,0,Va),new lr(Va,ja,0),new lr(-Va,ja,0)];class Ja{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){Ga=this._renderer.getRenderTarget(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=Ya(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=$a(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(Ga),e.scissorTest=!1,Ka(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===ie||e.mapping===ae?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Ga=this._renderer.getRenderTarget();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:ve,minFilter:ve,generateMipmaps:!1,type:Re,format:De,encoding:Pt,depthBuffer:!1},r=Xa(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=Xa(e,t,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function(e){const t=[],n=[],r=[];let i=e;const a=e-4+1+za.length;for(let o=0;o<a;o++){const a=Math.pow(2,i);n.push(a);let s=1/a;o>e-4?s=za[o-e+4-1]:0===o&&(s=0),r.push(s);const l=1/(a-2),c=-l,u=1+l,d=[c,c,u,c,u,u,c,c,u,u,c,u],h=6,f=6,p=3,m=2,g=1,v=new Float32Array(p*f*h),y=new Float32Array(m*f*h),b=new Float32Array(g*f*h);for(let e=0;e<h;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];v.set(r,p*f*e),y.set(d,m*f*e);const i=[e,e,e,e,e,e];b.set(i,g*f*e)}const _=new ji;_.setAttribute("position",new Ei(v,p)),_.setAttribute("uv",new Ei(y,m)),_.setAttribute("faceIndex",new Ei(b,g)),t.push(_),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){const r=new Float32Array(20),i=new lr(0,1,0);return new da({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}(r,e,t)}return r}_compileMaterial(e){const t=new ia(this._lodPlanes[0],e);this._renderer.compile(t,Ua)}_sceneToCubeUV(e,t,n,r){const i=new fa(90,1,t,n),a=[1,-1,1,1,1,1],o=[1,1,1,-1,-1,-1],s=this._renderer,l=s.autoClear,c=s.toneMapping;s.getClearColor(Ha),s.toneMapping=q,s.autoClear=!1;const u=new Mi({name:"PMREM.Background",side:m,depthWrite:!1,depthTest:!1}),d=new ia(new oa,u);let h=!1;const f=e.background;f?f.isColor&&(u.color.copy(f),e.background=null,h=!0):(u.color.copy(Ha),h=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(i.up.set(0,a[t],0),i.lookAt(o[t],0,0)):1===n?(i.up.set(0,0,a[t]),i.lookAt(0,o[t],0)):(i.up.set(0,a[t],0),i.lookAt(0,0,o[t]));const l=this._cubeSize;Ka(r,n*l,t>2?l:0,l,l),s.setRenderTarget(r),h&&s.render(d,i),s.render(e,i)}d.geometry.dispose(),d.material.dispose(),s.toneMapping=c,s.autoClear=l,e.background=f}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===ie||e.mapping===ae;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=Ya()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=$a());const i=r?this._cubemapMaterial:this._equirectMaterial,a=new ia(this._lodPlanes[0],i);i.uniforms.envMap.value=e;const o=this._cubeSize;Ka(t,0,0,3*o,2*o),n.setRenderTarget(t),n.render(a,Ua)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t<this._lodPlanes.length;t++){const n=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),r=Wa[(t-1)%Wa.length];this._blur(e,t-1,t,n,r)}t.autoClear=n}_blur(e,t,n,r,i){const a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,r,"latitudinal",i),this._halfBlur(a,e,n,n,r,"longitudinal",i)}_halfBlur(e,t,n,r,i,a,o){const s=this._renderer,l=this._blurMaterial;"latitudinal"!==a&&"longitudinal"!==a&&console.error("blur direction must be either latitudinal or longitudinal!");const c=new ia(this._lodPlanes[r],l),u=l.uniforms,d=this._sizeLods[n]-1,h=isFinite(i)?Math.PI/(2*d):2*Math.PI/39,f=i/h,p=isFinite(i)?1+Math.floor(3*f):20;p>20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const m=[];let g=0;for(let e=0;e<20;++e){const t=e/f,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:e<p&&(g+=2*n)}for(let e=0;e<m.length;e++)m[e]=m[e]/g;u.envMap.value=e.texture,u.samples.value=p,u.weights.value=m,u.latitudinal.value="latitudinal"===a,o&&(u.poleAxis.value=o);const{_lodMax:v}=this;u.dTheta.value=h,u.mipInt.value=v-n;const y=this._sizeLods[r];Ka(t,3*y*(r>v-4?r-v+4:0),4*(this._cubeSize-y),3*y,2*y),s.setRenderTarget(t),s.render(c,Ua)}}function Xa(e,t,n){const r=new tr(e,t,n);return r.texture.mapping=le,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Ka(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function $a(){return new da({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}function Ya(){return new da({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}function qa(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const a=i.mapping,o=a===oe||a===se,s=a===ie||a===ae;if(o||s){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new Ja(e)),r=o?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const a=i.image;if(o&&a&&a.height>0||s&&a&&function(e){let t=0;for(let n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(a)){null===n&&(n=new Ja(e));const a=o?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,a),i.addEventListener("dispose",r),a.texture}return null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function Qa(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function Za(e,t,n,r){const i={},a=new WeakMap;function o(e){const s=e.target;null!==s.index&&t.remove(s.index);for(const e in s.attributes)t.remove(s.attributes[e]);s.removeEventListener("dispose",o),delete i[s.id];const l=a.get(s);l&&(t.remove(l),a.delete(s)),r.releaseStatesOfGeometry(s),!0===s.isInstancedBufferGeometry&&delete s._maxInstanceCount,n.memory.geometries--}function s(e){const n=[],r=e.index,i=e.attributes.position;let o=0;if(null!==r){const e=r.array;o=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],a=e[t+2];n.push(r,i,i,a,a,r)}}else{const e=i.array;o=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}const s=new(In(n)?Ii:Pi)(n,1);s.version=o;const l=a.get(e);l&&t.remove(l),a.set(e,s)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",o),i[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const e in n)t.update(n[e],34962);const r=e.morphAttributes;for(const e in r){const n=r[e];for(let e=0,r=n.length;e<r;e++)t.update(n[e],34962)}},getWireframeAttribute:function(e){const t=a.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&s(e)}else s(e);return a.get(e)}}}function eo(e,t,n,r){const i=r.isWebGL2;let a,o,s;this.setMode=function(e){a=e},this.setIndex=function(e){o=e.type,s=e.bytesPerElement},this.render=function(t,r){e.drawElements(a,r,o,t*s),n.update(r,a,1)},this.renderInstances=function(r,l,c){if(0===c)return;let u,d;if(i)u=e,d="drawElementsInstanced";else if(u=t.get("ANGLE_instanced_arrays"),d="drawElementsInstancedANGLE",null===u)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[d](a,l,o,r*s,c),n.update(l,a,c)}}function to(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function no(e,t){return e[0]-t[0]}function ro(e,t){return Math.abs(t[1])-Math.abs(e[1])}function io(e,t,n){const r={},i=new Float32Array(8),a=new WeakMap,o=new er,s=[];for(let e=0;e<8;e++)s[e]=[e,0];return{update:function(l,c,u,d){const h=l.morphTargetInfluences;if(!0===t.isWebGL2){const f=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,p=void 0!==f?f.length:0;let m=a.get(c);if(void 0===m||m.count!==p){void 0!==m&&m.texture.dispose();const y=void 0!==c.morphAttributes.position,b=void 0!==c.morphAttributes.normal,_=void 0!==c.morphAttributes.color,x=c.morphAttributes.position||[],w=c.morphAttributes.normal||[],M=c.morphAttributes.color||[];let S=0;!0===y&&(S=1),!0===b&&(S=2),!0===_&&(S=3);let A=c.attributes.position.count*S,E=1;A>t.maxTextureSize&&(E=Math.ceil(A/t.maxTextureSize),A=t.maxTextureSize);const C=new Float32Array(A*E*4*p),T=new nr(C,A,E,p);T.type=Te,T.needsUpdate=!0;const R=4*S;for(let P=0;P<p;P++){const k=x[P],I=w[P],L=M[P],D=A*E*4*P;for(let O=0;O<k.count;O++){const F=O*R;!0===y&&(o.fromBufferAttribute(k,O),C[D+F+0]=o.x,C[D+F+1]=o.y,C[D+F+2]=o.z,C[D+F+3]=0),!0===b&&(o.fromBufferAttribute(I,O),C[D+F+4]=o.x,C[D+F+5]=o.y,C[D+F+6]=o.z,C[D+F+7]=0),!0===_&&(o.fromBufferAttribute(L,O),C[D+F+8]=o.x,C[D+F+9]=o.y,C[D+F+10]=o.z,C[D+F+11]=4===L.itemSize?o.w:1)}}function B(){T.dispose(),a.delete(c),c.removeEventListener("dispose",B)}m={count:p,texture:T,size:new Bn(A,E)},a.set(c,m),c.addEventListener("dispose",B)}let g=0;for(let N=0;N<h.length;N++)g+=h[N];const v=c.morphTargetsRelative?1:1-g;d.getUniforms().setValue(e,"morphTargetBaseInfluence",v),d.getUniforms().setValue(e,"morphTargetInfluences",h),d.getUniforms().setValue(e,"morphTargetsTexture",m.texture,n),d.getUniforms().setValue(e,"morphTargetsTextureSize",m.size)}else{const z=void 0===h?0:h.length;let U=r[c.id];if(void 0===U||U.length!==z){U=[];for(let W=0;W<z;W++)U[W]=[W,0];r[c.id]=U}for(let J=0;J<z;J++){const X=U[J];X[0]=J,X[1]=h[J]}U.sort(ro);for(let K=0;K<8;K++)K<z&&U[K][1]?(s[K][0]=U[K][0],s[K][1]=U[K][1]):(s[K][0]=Number.MAX_SAFE_INTEGER,s[K][1]=0);s.sort(no);const H=c.morphAttributes.position,G=c.morphAttributes.normal;let V=0;for(let $=0;$<8;$++){const Y=s[$],q=Y[0],Q=Y[1];q!==Number.MAX_SAFE_INTEGER&&Q?(H&&c.getAttribute("morphTarget"+$)!==H[q]&&c.setAttribute("morphTarget"+$,H[q]),G&&c.getAttribute("morphNormal"+$)!==G[q]&&c.setAttribute("morphNormal"+$,G[q]),i[$]=Q,V+=Q):(H&&!0===c.hasAttribute("morphTarget"+$)&&c.deleteAttribute("morphTarget"+$),G&&!0===c.hasAttribute("morphNormal"+$)&&c.deleteAttribute("morphNormal"+$),i[$]=0)}const j=c.morphTargetsRelative?1:1-V;d.getUniforms().setValue(e,"morphTargetBaseInfluence",j),d.getUniforms().setValue(e,"morphTargetInfluences",i)}}}}function ao(e,t,n,r){let i=new WeakMap;function a(e){const t=e.target;t.removeEventListener("dispose",a),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const o=r.render.frame,s=e.geometry,l=t.get(e,s);return i.get(l)!==o&&(t.update(l),i.set(l,o)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",a)&&e.addEventListener("dispose",a),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),l},dispose:function(){i=new WeakMap}}}const oo=new Zn,so=new nr,lo=new ir,co=new ga,uo=[],ho=[],fo=new Float32Array(16),po=new Float32Array(9),mo=new Float32Array(4);function go(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let a=uo[i];if(void 0===a&&(a=new Float32Array(i),uo[i]=a),0!==t){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function vo(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function yo(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function bo(e,t){let n=ho[t];void 0===n&&(n=new Int32Array(t),ho[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function _o(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function xo(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(vo(n,t))return;e.uniform2fv(this.addr,t),yo(n,t)}}function wo(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(vo(n,t))return;e.uniform3fv(this.addr,t),yo(n,t)}}function Mo(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(vo(n,t))return;e.uniform4fv(this.addr,t),yo(n,t)}}function So(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(vo(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),yo(n,t)}else{if(vo(n,r))return;mo.set(r),e.uniformMatrix2fv(this.addr,!1,mo),yo(n,r)}}function Ao(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(vo(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),yo(n,t)}else{if(vo(n,r))return;po.set(r),e.uniformMatrix3fv(this.addr,!1,po),yo(n,r)}}function Eo(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(vo(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),yo(n,t)}else{if(vo(n,r))return;fo.set(r),e.uniformMatrix4fv(this.addr,!1,fo),yo(n,r)}}function Co(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function To(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(vo(n,t))return;e.uniform2iv(this.addr,t),yo(n,t)}}function Ro(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(vo(n,t))return;e.uniform3iv(this.addr,t),yo(n,t)}}function Bo(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(vo(n,t))return;e.uniform4iv(this.addr,t),yo(n,t)}}function Po(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function ko(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(vo(n,t))return;e.uniform2uiv(this.addr,t),yo(n,t)}}function Io(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(vo(n,t))return;e.uniform3uiv(this.addr,t),yo(n,t)}}function Lo(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(vo(n,t))return;e.uniform4uiv(this.addr,t),yo(n,t)}}function Do(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2D(t||oo,i)}function Oo(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||lo,i)}function Fo(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(t||co,i)}function No(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||so,i)}function zo(e,t){e.uniform1fv(this.addr,t)}function Uo(e,t){const n=go(t,this.size,2);e.uniform2fv(this.addr,n)}function Ho(e,t){const n=go(t,this.size,3);e.uniform3fv(this.addr,n)}function Go(e,t){const n=go(t,this.size,4);e.uniform4fv(this.addr,n)}function Vo(e,t){const n=go(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function jo(e,t){const n=go(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function Wo(e,t){const n=go(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function Jo(e,t){e.uniform1iv(this.addr,t)}function Xo(e,t){e.uniform2iv(this.addr,t)}function Ko(e,t){e.uniform3iv(this.addr,t)}function $o(e,t){e.uniform4iv(this.addr,t)}function Yo(e,t){e.uniform1uiv(this.addr,t)}function qo(e,t){e.uniform2uiv(this.addr,t)}function Qo(e,t){e.uniform3uiv(this.addr,t)}function Zo(e,t){e.uniform4uiv(this.addr,t)}function es(e,t,n){const r=this.cache,i=t.length,a=bo(n,i);vo(r,a)||(e.uniform1iv(this.addr,a),yo(r,a));for(let e=0;e!==i;++e)n.setTexture2D(t[e]||oo,a[e])}function ts(e,t,n){const r=this.cache,i=t.length,a=bo(n,i);vo(r,a)||(e.uniform1iv(this.addr,a),yo(r,a));for(let e=0;e!==i;++e)n.setTexture3D(t[e]||lo,a[e])}function ns(e,t,n){const r=this.cache,i=t.length,a=bo(n,i);vo(r,a)||(e.uniform1iv(this.addr,a),yo(r,a));for(let e=0;e!==i;++e)n.setTextureCube(t[e]||co,a[e])}function rs(e,t,n){const r=this.cache,i=t.length,a=bo(n,i);vo(r,a)||(e.uniform1iv(this.addr,a),yo(r,a));for(let e=0;e!==i;++e)n.setTexture2DArray(t[e]||so,a[e])}class is{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return _o;case 35664:return xo;case 35665:return wo;case 35666:return Mo;case 35674:return So;case 35675:return Ao;case 35676:return Eo;case 5124:case 35670:return Co;case 35667:case 35671:return To;case 35668:case 35672:return Ro;case 35669:case 35673:return Bo;case 5125:return Po;case 36294:return ko;case 36295:return Io;case 36296:return Lo;case 35678:case 36198:case 36298:case 36306:case 35682:return Do;case 35679:case 36299:case 36307:return Oo;case 35680:case 36300:case 36308:case 36293:return Fo;case 36289:case 36303:case 36311:case 36292:return No}}(t.type)}}class as{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return zo;case 35664:return Uo;case 35665:return Ho;case 35666:return Go;case 35674:return Vo;case 35675:return jo;case 35676:return Wo;case 5124:case 35670:return Jo;case 35667:case 35671:return Xo;case 35668:case 35672:return Ko;case 35669:case 35673:return $o;case 5125:return Yo;case 36294:return qo;case 36295:return Qo;case 36296:return Zo;case 35678:case 36198:case 36298:case 36306:case 35682:return es;case 35679:case 36299:case 36307:return ts;case 35680:case 36300:case 36308:case 36293:return ns;case 36289:case 36303:case 36311:case 36292:return rs}}(t.type)}}class os{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const r=this.seq;for(let i=0,a=r.length;i!==a;++i){const a=r[i];a.setValue(e,t[a.id],n)}}}const ss=/(\w+)(\])?(\[|\.)?/g;function ls(e,t){e.seq.push(t),e.map[t.id]=t}function cs(e,t,n){const r=e.name,i=r.length;for(ss.lastIndex=0;;){const a=ss.exec(r),o=ss.lastIndex;let s=a[1];const l="]"===a[2],c=a[3];if(l&&(s|=0),void 0===c||"["===c&&o+2===i){ls(n,void 0===c?new is(s,e,t):new as(s,e,t));break}{let e=n.map[s];void 0===e&&(e=new os(s),ls(n,e)),n=e}}}class us{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,35718);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);cs(n,e.getUniformLocation(t,n.name),this)}}setValue(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)}setOptional(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)}static upload(e,t,n,r){for(let i=0,a=t.length;i!==a;++i){const a=t[i],o=n[a.id];!1!==o.needsUpdate&&a.setValue(e,o.value,r)}}static seqWithValue(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n}}function ds(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}let hs=0;function fs(e,t,n){const r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();if(r&&""===i)return"";const a=/ERROR: 0:(\d+)/.exec(i);if(a){const r=parseInt(a[1]);return n.toUpperCase()+"\n\n"+i+"\n\n"+function(e,t){const n=e.split("\n"),r=[],i=Math.max(t-6,0),a=Math.min(t+6,n.length);for(let e=i;e<a;e++){const i=e+1;r.push(`${i===t?">":" "} ${i}: ${n[e]}`)}return r.join("\n")}(e.getShaderSource(t),r)}return i}function ps(e,t){const n=function(e){switch(e){case Pt:return["Linear","( value )"];case kt:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function ms(e,t){let n;switch(t){case Q:n="Linear";break;case Z:n="Reinhard";break;case ee:n="OptimizedCineon";break;case te:n="ACESFilmic";break;case ne:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function gs(e){return""!==e}function vs(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function ys(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const bs=/^[ \t]*#include +<([\w\d./]+)>/gm;function _s(e){return e.replace(bs,xs)}function xs(e,t){const n=Ta[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return _s(n)}const ws=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Ms(e){return e.replace(ws,Ss)}function Ss(e,t,n,r){let i="";for(let e=parseInt(t);e<parseInt(n);e++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return i}function As(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Es(e,t,n,r){const i=e.getContext(),a=n.defines;let o=n.vertexShader,s=n.fragmentShader;const l=function(e){let t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===d?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===h?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===f&&(t="SHADOWMAP_TYPE_VSM"),t}(n),c=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case ie:case ae:t="ENVMAP_TYPE_CUBE";break;case le:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),u=function(e){let t="ENVMAP_MODE_REFLECTION";return e.envMap&&e.envMapMode===ae&&(t="ENVMAP_MODE_REFRACTION"),t}(n),p=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case K:t="ENVMAP_BLENDING_MULTIPLY";break;case $:t="ENVMAP_BLENDING_MIX";break;case Y:t="ENVMAP_BLENDING_ADD"}return t}(n),m=function(e){const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,r=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:r,maxMip:n}}(n),g=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUVHeight||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(gs).join("\n")}(n),v=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(a),y=i.createProgram();let b,_,x=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(b=[v].filter(gs).join("\n"),b.length>0&&(b+="\n"),_=[g,v].filter(gs).join("\n"),_.length>0&&(_+="\n")):(b=[As(n),"#define SHADER_NAME "+n.shaderName,v,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(gs).join("\n"),_=[g,As(n),"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.envMap?"#define "+u:"",n.envMap?"#define "+p:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==q?"#define TONE_MAPPING":"",n.toneMapping!==q?Ta.tonemapping_pars_fragment:"",n.toneMapping!==q?ms("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Ta.encodings_pars_fragment,ps("linearToOutputTexel",n.outputEncoding),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(gs).join("\n")),o=_s(o),o=vs(o,n),o=ys(o,n),s=_s(s),s=vs(s,n),s=ys(s,n),o=Ms(o),s=Ms(s),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(x="#version 300 es\n",b=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+b,_=["#define varying in",n.glslVersion===fn?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===fn?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+_);const w=x+_+s,M=ds(i,35633,x+b+o),S=ds(i,35632,w);if(i.attachShader(y,M),i.attachShader(y,S),void 0!==n.index0AttributeName?i.bindAttribLocation(y,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(y,0,"position"),i.linkProgram(y),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(y).trim(),t=i.getShaderInfoLog(M).trim(),n=i.getShaderInfoLog(S).trim();let r=!0,a=!0;if(!1===i.getProgramParameter(y,35714)){r=!1;const t=fs(i,M,"vertex"),n=fs(i,S,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(y,35715)+"\n\nProgram Info Log: "+e+"\n"+t+"\n"+n)}else""!==e?console.warn("THREE.WebGLProgram: Program Info Log:",e):""!==t&&""!==n||(a=!1);a&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:b},fragmentShader:{log:n,prefix:_}})}let A,E;return i.deleteShader(M),i.deleteShader(S),this.getUniforms=function(){return void 0===A&&(A=new us(i,y)),A},this.getAttributes=function(){return void 0===E&&(E=function(e,t){const n={},r=e.getProgramParameter(t,35721);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i),a=r.name;let o=1;35674===r.type&&(o=2),35675===r.type&&(o=3),35676===r.type&&(o=4),n[a]={type:r.type,location:e.getAttribLocation(t,a),locationSize:o}}return n}(i,y)),E},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(y),this.program=void 0},this.name=n.shaderName,this.id=hs++,this.cacheKey=t,this.usedTimes=1,this.program=y,this.vertexShader=M,this.fragmentShader=S,this}let Cs=0;class Ts{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return!1===a.has(r)&&(a.add(r),r.usedTimes++),!1===a.has(i)&&(a.add(i),i.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const e of t)e.usedTimes--,0===e.usedTimes&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return void 0===n&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return void 0===n&&(n=new Rs(e),t.set(e,n)),n}}class Rs{constructor(e){this.id=Cs++,this.code=e,this.usedTimes=0}}function Bs(e,t,n,r,i,a,o){const s=new $r,l=new Ts,c=[],u=i.isWebGL2,d=i.logarithmicDepthBuffer,h=i.vertexTextures;let f=i.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};return{getParameters:function(a,s,c,v,y){const _=v.fog,x=y.geometry,w=a.isMeshStandardMaterial?v.environment:null,M=(a.isMeshStandardMaterial?n:t).get(a.envMap||w),S=M&&M.mapping===le?M.image.height:null,A=p[a.type];null!==a.precision&&(f=i.getMaxPrecision(a.precision),f!==a.precision&&console.warn("THREE.WebGLProgram.getParameters:",a.precision,"not supported, using",f,"instead."));const E=x.morphAttributes.position||x.morphAttributes.normal||x.morphAttributes.color,C=void 0!==E?E.length:0;let T,R,B,P,k=0;if(void 0!==x.morphAttributes.position&&(k=1),void 0!==x.morphAttributes.normal&&(k=2),void 0!==x.morphAttributes.color&&(k=3),A){const e=Ba[A];T=e.vertexShader,R=e.fragmentShader}else T=a.vertexShader,R=a.fragmentShader,l.update(a),B=l.getVertexShaderID(a),P=l.getFragmentShaderID(a);const I=e.getRenderTarget(),L=a.alphaTest>0,D=a.clearcoat>0,O=a.iridescence>0;return{isWebGL2:u,shaderID:A,shaderName:a.type,vertexShader:T,fragmentShader:R,defines:a.defines,customVertexShaderID:B,customFragmentShaderID:P,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:f,instancing:!0===y.isInstancedMesh,instancingColor:!0===y.isInstancedMesh&&null!==y.instanceColor,supportsVertexTextures:h,outputEncoding:null===I?e.outputEncoding:!0===I.isXRRenderTarget?I.texture.encoding:Pt,map:!!a.map,matcap:!!a.matcap,envMap:!!M,envMapMode:M&&M.mapping,envMapCubeUVHeight:S,lightMap:!!a.lightMap,aoMap:!!a.aoMap,emissiveMap:!!a.emissiveMap,bumpMap:!!a.bumpMap,normalMap:!!a.normalMap,objectSpaceNormalMap:a.normalMapType===Ot,tangentSpaceNormalMap:a.normalMapType===Dt,decodeVideoTexture:!!a.map&&!0===a.map.isVideoTexture&&a.map.encoding===kt,clearcoat:D,clearcoatMap:D&&!!a.clearcoatMap,clearcoatRoughnessMap:D&&!!a.clearcoatRoughnessMap,clearcoatNormalMap:D&&!!a.clearcoatNormalMap,iridescence:O,iridescenceMap:O&&!!a.iridescenceMap,iridescenceThicknessMap:O&&!!a.iridescenceThicknessMap,displacementMap:!!a.displacementMap,roughnessMap:!!a.roughnessMap,metalnessMap:!!a.metalnessMap,specularMap:!!a.specularMap,specularIntensityMap:!!a.specularIntensityMap,specularColorMap:!!a.specularColorMap,opaque:!1===a.transparent&&a.blending===b,alphaMap:!!a.alphaMap,alphaTest:L,gradientMap:!!a.gradientMap,sheen:a.sheen>0,sheenColorMap:!!a.sheenColorMap,sheenRoughnessMap:!!a.sheenRoughnessMap,transmission:a.transmission>0,transmissionMap:!!a.transmissionMap,thicknessMap:!!a.thicknessMap,combine:a.combine,vertexTangents:!!a.normalMap&&!!x.attributes.tangent,vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!x.attributes.color&&4===x.attributes.color.itemSize,vertexUvs:!!(a.map||a.bumpMap||a.normalMap||a.specularMap||a.alphaMap||a.emissiveMap||a.roughnessMap||a.metalnessMap||a.clearcoatMap||a.clearcoatRoughnessMap||a.clearcoatNormalMap||a.iridescenceMap||a.iridescenceThicknessMap||a.displacementMap||a.transmissionMap||a.thicknessMap||a.specularIntensityMap||a.specularColorMap||a.sheenColorMap||a.sheenRoughnessMap),uvsVertexOnly:!(a.map||a.bumpMap||a.normalMap||a.specularMap||a.alphaMap||a.emissiveMap||a.roughnessMap||a.metalnessMap||a.clearcoatNormalMap||a.iridescenceMap||a.iridescenceThicknessMap||a.transmission>0||a.transmissionMap||a.thicknessMap||a.specularIntensityMap||a.specularColorMap||a.sheen>0||a.sheenColorMap||a.sheenRoughnessMap||!a.displacementMap),fog:!!_,useFog:!0===a.fog,fogExp2:_&&_.isFogExp2,flatShading:!!a.flatShading,sizeAttenuation:a.sizeAttenuation,logarithmicDepthBuffer:d,skinning:!0===y.isSkinnedMesh,morphTargets:void 0!==x.morphAttributes.position,morphNormals:void 0!==x.morphAttributes.normal,morphColors:void 0!==x.morphAttributes.color,morphTargetsCount:C,morphTextureStride:k,numDirLights:s.directional.length,numPointLights:s.point.length,numSpotLights:s.spot.length,numSpotLightMaps:s.spotLightMap.length,numRectAreaLights:s.rectArea.length,numHemiLights:s.hemi.length,numDirLightShadows:s.directionalShadowMap.length,numPointLightShadows:s.pointShadowMap.length,numSpotLightShadows:s.spotShadowMap.length,numSpotLightShadowsWithMaps:s.numSpotLightShadowsWithMaps,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:a.toneMapped?e.toneMapping:q,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===g,flipSided:a.side===m,useDepthPacking:!!a.depthPacking,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionDerivatives:a.extensions&&a.extensions.derivatives,extensionFragDepth:a.extensions&&a.extensions.fragDepth,extensionDrawBuffers:a.extensions&&a.extensions.drawBuffers,extensionShaderTextureLOD:a.extensions&&a.extensions.shaderTextureLOD,rendererExtensionFragDepth:u||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:u||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:u||r.has("EXT_shader_texture_lod"),customProgramCacheKey:a.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(function(e,t){e.push(t.precision),e.push(t.outputEncoding),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.combine),e.push(t.vertexUvs),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){s.disableAll(),t.isWebGL2&&s.enable(0),t.supportsVertexTextures&&s.enable(1),t.instancing&&s.enable(2),t.instancingColor&&s.enable(3),t.map&&s.enable(4),t.matcap&&s.enable(5),t.envMap&&s.enable(6),t.lightMap&&s.enable(7),t.aoMap&&s.enable(8),t.emissiveMap&&s.enable(9),t.bumpMap&&s.enable(10),t.normalMap&&s.enable(11),t.objectSpaceNormalMap&&s.enable(12),t.tangentSpaceNormalMap&&s.enable(13),t.clearcoat&&s.enable(14),t.clearcoatMap&&s.enable(15),t.clearcoatRoughnessMap&&s.enable(16),t.clearcoatNormalMap&&s.enable(17),t.iridescence&&s.enable(18),t.iridescenceMap&&s.enable(19),t.iridescenceThicknessMap&&s.enable(20),t.displacementMap&&s.enable(21),t.specularMap&&s.enable(22),t.roughnessMap&&s.enable(23),t.metalnessMap&&s.enable(24),t.gradientMap&&s.enable(25),t.alphaMap&&s.enable(26),t.alphaTest&&s.enable(27),t.vertexColors&&s.enable(28),t.vertexAlphas&&s.enable(29),t.vertexUvs&&s.enable(30),t.vertexTangents&&s.enable(31),t.uvsVertexOnly&&s.enable(32),e.push(s.mask),s.disableAll(),t.fog&&s.enable(0),t.useFog&&s.enable(1),t.flatShading&&s.enable(2),t.logarithmicDepthBuffer&&s.enable(3),t.skinning&&s.enable(4),t.morphTargets&&s.enable(5),t.morphNormals&&s.enable(6),t.morphColors&&s.enable(7),t.premultipliedAlpha&&s.enable(8),t.shadowMapEnabled&&s.enable(9),t.physicallyCorrectLights&&s.enable(10),t.doubleSided&&s.enable(11),t.flipSided&&s.enable(12),t.useDepthPacking&&s.enable(13),t.dithering&&s.enable(14),t.specularIntensityMap&&s.enable(15),t.specularColorMap&&s.enable(16),t.transmission&&s.enable(17),t.transmissionMap&&s.enable(18),t.thicknessMap&&s.enable(19),t.sheen&&s.enable(20),t.sheenColorMap&&s.enable(21),t.sheenRoughnessMap&&s.enable(22),t.decodeVideoTexture&&s.enable(23),t.opaque&&s.enable(24),e.push(s.mask)}(n,t),n.push(e.outputEncoding)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=p[e.type];let n;if(t){const e=Ba[t];n=ua.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,t=c.length;e<t;e++){const t=c[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new Es(e,n,t,a),c.push(r)),r},releaseProgram:function(e){if(0==--e.usedTimes){const t=c.indexOf(e);c[t]=c[c.length-1],c.pop(),e.destroy()}},releaseShaderCache:function(e){l.remove(e)},programs:c,dispose:function(){l.dispose()}}}function Ps(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function ks(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Is(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Ls(){const e=[];let t=0;const n=[],r=[],i=[];function a(n,r,i,a,o,s){let l=e[t];return void 0===l?(l={id:n.id,object:n,geometry:r,material:i,groupOrder:a,renderOrder:n.renderOrder,z:o,group:s},e[t]=l):(l.id=n.id,l.object=n,l.geometry=r,l.material=i,l.groupOrder=a,l.renderOrder=n.renderOrder,l.z=o,l.group=s),t++,l}return{opaque:n,transmissive:r,transparent:i,init:function(){t=0,n.length=0,r.length=0,i.length=0},push:function(e,t,o,s,l,c){const u=a(e,t,o,s,l,c);o.transmission>0?r.push(u):!0===o.transparent?i.push(u):n.push(u)},unshift:function(e,t,o,s,l,c){const u=a(e,t,o,s,l,c);o.transmission>0?r.unshift(u):!0===o.transparent?i.unshift(u):n.unshift(u)},finish:function(){for(let n=t,r=e.length;n<r;n++){const t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){n.length>1&&n.sort(e||ks),r.length>1&&r.sort(t||Is),i.length>1&&i.sort(t||Is)}}}function Ds(){let e=new WeakMap;return{get:function(t,n){const r=e.get(t);let i;return void 0===r?(i=new Ls,e.set(t,[i])):n>=r.length?(i=new Ls,r.push(i)):i=r[n],i},dispose:function(){e=new WeakMap}}}function Os(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new lr,color:new Xn};break;case"SpotLight":n={position:new lr,direction:new lr,color:new Xn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new lr,color:new Xn,distance:0,decay:0};break;case"HemisphereLight":n={direction:new lr,skyColor:new Xn,groundColor:new Xn};break;case"RectAreaLight":n={color:new Xn,position:new lr,halfWidth:new lr,halfHeight:new lr}}return e[t.id]=n,n}}}let Fs=0;function Ns(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function zs(e,t){const n=new Os,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Bn};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Bn,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let e=0;e<9;e++)i.probe.push(new lr);const a=new lr,o=new Nr,s=new Nr;return{setup:function(a,o){let s=0,l=0,c=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let u=0,d=0,h=0,f=0,p=0,m=0,g=0,v=0,y=0,b=0;a.sort(Ns);const _=!0!==o?Math.PI:1;for(let e=0,t=a.length;e<t;e++){const t=a[e],o=t.color,x=t.intensity,w=t.distance,M=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)s+=o.r*x*_,l+=o.g*x*_,c+=o.b*x*_;else if(t.isLightProbe)for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],x);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*_),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.directionalShadow[u]=n,i.directionalShadowMap[u]=M,i.directionalShadowMatrix[u]=t.shadow.matrix,m++}i.directional[u]=e,u++}else if(t.isSpotLight){const e=n.get(t);e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(o).multiplyScalar(x*_),e.distance=w,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,i.spot[h]=e;const a=t.shadow;if(t.map&&(i.spotLightMap[y]=t.map,y++,a.updateMatrices(t),t.castShadow&&b++),i.spotLightMatrix[h]=a.matrix,t.castShadow){const e=r.get(t);e.shadowBias=a.bias,e.shadowNormalBias=a.normalBias,e.shadowRadius=a.radius,e.shadowMapSize=a.mapSize,i.spotShadow[h]=e,i.spotShadowMap[h]=M,v++}h++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(o).multiplyScalar(x),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[f]=e,f++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*_),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,i.pointShadow[d]=n,i.pointShadowMap[d]=M,i.pointShadowMatrix[d]=t.shadow.matrix,g++}i.point[d]=e,d++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(x*_),e.groundColor.copy(t.groundColor).multiplyScalar(x*_),i.hemi[p]=e,p++}}f>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=Ra.LTC_FLOAT_1,i.rectAreaLTC2=Ra.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=Ra.LTC_HALF_1,i.rectAreaLTC2=Ra.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=s,i.ambient[1]=l,i.ambient[2]=c;const x=i.hash;x.directionalLength===u&&x.pointLength===d&&x.spotLength===h&&x.rectAreaLength===f&&x.hemiLength===p&&x.numDirectionalShadows===m&&x.numPointShadows===g&&x.numSpotShadows===v&&x.numSpotMaps===y||(i.directional.length=u,i.spot.length=h,i.rectArea.length=f,i.point.length=d,i.hemi.length=p,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotLightMatrix.length=v+y-b,i.spotLightMap.length=y,i.numSpotLightShadowsWithMaps=b,x.directionalLength=u,x.pointLength=d,x.spotLength=h,x.rectAreaLength=f,x.hemiLength=p,x.numDirectionalShadows=m,x.numPointShadows=g,x.numSpotShadows=v,x.numSpotMaps=y,i.version=Fs++)},setupView:function(e,t){let n=0,r=0,l=0,c=0,u=0;const d=t.matrixWorldInverse;for(let t=0,h=e.length;t<h;t++){const h=e[t];if(h.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(h.matrixWorld),a.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(d),n++}else if(h.isSpotLight){const e=i.spot[l];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),e.direction.setFromMatrixPosition(h.matrixWorld),a.setFromMatrixPosition(h.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(d),l++}else if(h.isRectAreaLight){const e=i.rectArea[c];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),s.identity(),o.copy(h.matrixWorld),o.premultiply(d),s.extractRotation(o),e.halfWidth.set(.5*h.width,0,0),e.halfHeight.set(0,.5*h.height,0),e.halfWidth.applyMatrix4(s),e.halfHeight.applyMatrix4(s),c++}else if(h.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(h.matrixWorld),e.position.applyMatrix4(d),r++}else if(h.isHemisphereLight){const e=i.hemi[u];e.direction.setFromMatrixPosition(h.matrixWorld),e.direction.transformDirection(d),u++}}},state:i}}function Us(e,t){const n=new zs(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(e){n.setup(r,e)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function Hs(e,t){let n=new WeakMap;return{get:function(r,i=0){const a=n.get(r);let o;return void 0===a?(o=new Us(e,t),n.set(r,[o])):i>=a.length?(o=new Us(e,t),a.push(o)):o=a[i],o},dispose:function(){n=new WeakMap}}}class Gs extends wi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=It,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Vs extends wi{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new lr,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function js(e,t,n){let r=new Sa;const i=new Bn,a=new Bn,o=new er,s=new Gs({depthPacking:Lt}),l=new Vs,c={},u=n.maxTextureSize,h={0:m,1:p,2:g},v=new da({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Bn},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),b=v.clone();b.defines.HORIZONTAL_PASS=1;const _=new ji;_.setAttribute("position",new Ei(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const x=new ia(_,v),w=this;function M(n,r){const a=t.update(x);v.defines.VSM_SAMPLES!==n.blurSamples&&(v.defines.VSM_SAMPLES=n.blurSamples,b.defines.VSM_SAMPLES=n.blurSamples,v.needsUpdate=!0,b.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new tr(i.x,i.y)),v.uniforms.shadow_pass.value=n.map.texture,v.uniforms.resolution.value=n.mapSize,v.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,a,v,x,null),b.uniforms.shadow_pass.value=n.mapPass.texture,b.uniforms.resolution.value=n.mapSize,b.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,a,b,x,null)}function S(t,n,r,i,a,o){let u=null;const d=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==d)u=d;else if(u=!0===r.isPointLight?l:s,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const e=u.uuid,t=n.uuid;let r=c[e];void 0===r&&(r={},c[e]=r);let i=r[t];void 0===i&&(i=u.clone(),r[t]=i),u=i}return u.visible=n.visible,u.wireframe=n.wireframe,u.side=o===f?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:h[n.side],u.alphaMap=n.alphaMap,u.alphaTest=n.alphaTest,u.map=n.map,u.clipShadows=n.clipShadows,u.clippingPlanes=n.clippingPlanes,u.clipIntersection=n.clipIntersection,u.displacementMap=n.displacementMap,u.displacementScale=n.displacementScale,u.displacementBias=n.displacementBias,u.wireframeLinewidth=n.wireframeLinewidth,u.linewidth=n.linewidth,!0===r.isPointLight&&!0===u.isMeshDistanceMaterial&&(u.referencePosition.setFromMatrixPosition(r.matrixWorld),u.nearDistance=i,u.farDistance=a),u}function A(n,i,a,o,s){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&s===f)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let l=0,c=t.length;l<c;l++){const c=t[l],u=i[c.materialIndex];if(u&&u.visible){const t=S(n,u,o,a.near,a.far,s);e.renderBufferDirect(a,null,r,t,n,c)}}}else if(i.visible){const t=S(n,i,o,a.near,a.far,s);e.renderBufferDirect(a,null,r,t,n,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)A(l[e],i,a,o,s)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=d,this.render=function(t,n,s){if(!1===w.enabled)return;if(!1===w.autoUpdate&&!1===w.needsUpdate)return;if(0===t.length)return;const l=e.getRenderTarget(),c=e.getActiveCubeFace(),d=e.getActiveMipmapLevel(),h=e.state;h.setBlending(y),h.buffers.color.setClear(1,1,1,1),h.buffers.depth.setTest(!0),h.setScissorTest(!1);for(let l=0,c=t.length;l<c;l++){const c=t[l],d=c.shadow;if(void 0===d){console.warn("THREE.WebGLShadowMap:",c,"has no shadow.");continue}if(!1===d.autoUpdate&&!1===d.needsUpdate)continue;i.copy(d.mapSize);const p=d.getFrameExtents();if(i.multiply(p),a.copy(d.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/p.x),i.x=a.x*p.x,d.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/p.y),i.y=a.y*p.y,d.mapSize.y=a.y)),null===d.map){const e=this.type!==f?{minFilter:he,magFilter:he}:{};d.map=new tr(i.x,i.y,e),d.map.texture.name=c.name+".shadowMap",d.camera.updateProjectionMatrix()}e.setRenderTarget(d.map),e.clear();const m=d.getViewportCount();for(let e=0;e<m;e++){const t=d.getViewport(e);o.set(a.x*t.x,a.y*t.y,a.x*t.z,a.y*t.w),h.viewport(o),d.updateMatrices(c,e),r=d.getFrustum(),A(n,s,d.camera,c,this.type)}!0!==d.isPointLightShadow&&this.type===f&&M(d,s),d.needsUpdate=!1}w.needsUpdate=!1,e.setRenderTarget(l,c,d)}}function Ws(e,t,n){const r=n.isWebGL2,i=new function(){let t=!1;const n=new er;let r=null;const i=new er(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,a,o,s){!0===s&&(t*=o,r*=o,a*=o),n.set(t,r,a,o),!1===i.equals(n)&&(e.clearColor(t,r,a,o),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},a=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(e){e?xe(2929):we(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){switch(t){case U:e.depthFunc(512);break;case H:e.depthFunc(519);break;case G:e.depthFunc(513);break;case V:e.depthFunc(515);break;case j:e.depthFunc(514);break;case W:e.depthFunc(518);break;case J:e.depthFunc(516);break;case X:e.depthFunc(517);break;default:e.depthFunc(515)}r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},c=new function(){let t=!1,n=null,r=null,i=null,a=null,o=null,s=null,l=null,c=null;return{setTest:function(e){t||(e?xe(2960):we(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,o){r===t&&i===n&&a===o||(e.stencilFunc(t,n,o),r=t,i=n,a=o)},setOp:function(t,n,r){o===t&&s===n&&l===r||(e.stencilOp(t,n,r),o=t,s=n,l=r)},setLocked:function(e){t=e},setClear:function(t){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,a=null,o=null,s=null,l=null,c=null}}},u=new WeakMap,d=new WeakMap;let h={},f={},p=new WeakMap,v=[],K=null,$=!1,Y=null,q=null,Q=null,Z=null,ee=null,te=null,ne=null,re=!1,ie=null,ae=null,oe=null,se=null,le=null;const ce=e.getParameter(35661);let ue=!1,de=0;const he=e.getParameter(7938);-1!==he.indexOf("WebGL")?(de=parseFloat(/^WebGL (\d)/.exec(he)[1]),ue=de>=1):-1!==he.indexOf("OpenGL ES")&&(de=parseFloat(/^OpenGL ES (\d)/.exec(he)[1]),ue=de>=2);let fe=null,pe={};const me=e.getParameter(3088),ge=e.getParameter(2978),ve=(new er).fromArray(me),ye=(new er).fromArray(ge);function be(t,n,r){const i=new Uint8Array(4),a=e.createTexture();e.bindTexture(t,a),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let t=0;t<r;t++)e.texImage2D(n+t,0,6408,1,1,0,6408,5121,i);return a}const _e={};function xe(t){!0!==h[t]&&(e.enable(t),h[t]=!0)}function we(t){!1!==h[t]&&(e.disable(t),h[t]=!1)}_e[3553]=be(3553,3553,1),_e[34067]=be(34067,34069,6),i.setClear(0,0,0,1),a.setClear(1),c.setClear(0),xe(2929),a.setFunc(V),Ee(!1),Ce(s),xe(2884),Ae(y);const Me={[S]:32774,[A]:32778,[E]:32779};if(r)Me[C]=32775,Me[T]=32776;else{const e=t.get("EXT_blend_minmax");null!==e&&(Me[C]=e.MIN_EXT,Me[T]=e.MAX_EXT)}const Se={[R]:0,[B]:1,[P]:768,[I]:770,[z]:776,[F]:774,[D]:772,[k]:769,[L]:771,[N]:775,[O]:773};function Ae(t,n,r,i,a,o,s,l){if(t!==y){if(!1===$&&(xe(3042),$=!0),t===M)a=a||n,o=o||r,s=s||i,n===q&&a===ee||(e.blendEquationSeparate(Me[n],Me[a]),q=n,ee=a),r===Q&&i===Z&&o===te&&s===ne||(e.blendFuncSeparate(Se[r],Se[i],Se[o],Se[s]),Q=r,Z=i,te=o,ne=s),Y=t,re=!1;else if(t!==Y||l!==re){if(q===S&&ee===S||(e.blendEquation(32774),q=S,ee=S),l)switch(t){case b:e.blendFuncSeparate(1,771,1,771);break;case _:e.blendFunc(1,1);break;case x:e.blendFuncSeparate(0,769,0,1);break;case w:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case b:e.blendFuncSeparate(770,771,1,771);break;case _:e.blendFunc(770,1);break;case x:e.blendFuncSeparate(0,769,0,1);break;case w:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}Q=null,Z=null,te=null,ne=null,Y=t,re=l}}else!0===$&&(we(3042),$=!1)}function Ee(t){ie!==t&&(t?e.frontFace(2304):e.frontFace(2305),ie=t)}function Ce(t){t!==o?(xe(2884),t!==ae&&(t===s?e.cullFace(1029):t===l?e.cullFace(1028):e.cullFace(1032))):we(2884),ae=t}function Te(t,n,r){t?(xe(32823),se===n&&le===r||(e.polygonOffset(n,r),se=n,le=r)):we(32823)}return{buffers:{color:i,depth:a,stencil:c},enable:xe,disable:we,bindFramebuffer:function(t,n){return f[t]!==n&&(e.bindFramebuffer(t,n),f[t]=n,r&&(36009===t&&(f[36160]=n),36160===t&&(f[36009]=n)),!0)},drawBuffers:function(r,i){let a=v,o=!1;if(r)if(a=p.get(i),void 0===a&&(a=[],p.set(i,a)),r.isWebGLMultipleRenderTargets){const e=r.texture;if(a.length!==e.length||36064!==a[0]){for(let t=0,n=e.length;t<n;t++)a[t]=36064+t;a.length=e.length,o=!0}}else 36064!==a[0]&&(a[0]=36064,o=!0);else 1029!==a[0]&&(a[0]=1029,o=!0);o&&(n.isWebGL2?e.drawBuffers(a):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(a))},useProgram:function(t){return K!==t&&(e.useProgram(t),K=t,!0)},setBlending:Ae,setMaterial:function(e,t){e.side===g?we(2884):xe(2884);let n=e.side===m;t&&(n=!n),Ee(n),e.blending===b&&!1===e.transparent?Ae(y):Ae(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),a.setFunc(e.depthFunc),a.setTest(e.depthTest),a.setMask(e.depthWrite),i.setMask(e.colorWrite);const r=e.stencilWrite;c.setTest(r),r&&(c.setMask(e.stencilWriteMask),c.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),c.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),Te(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?xe(32926):we(32926)},setFlipSided:Ee,setCullFace:Ce,setLineWidth:function(t){t!==oe&&(ue&&e.lineWidth(t),oe=t)},setPolygonOffset:Te,setScissorTest:function(e){e?xe(3089):we(3089)},activeTexture:function(t){void 0===t&&(t=33984+ce-1),fe!==t&&(e.activeTexture(t),fe=t)},bindTexture:function(t,n,r){void 0===r&&(r=null===fe?33984+ce-1:fe);let i=pe[r];void 0===i&&(i={type:void 0,texture:void 0},pe[r]=i),i.type===t&&i.texture===n||(fe!==r&&(e.activeTexture(r),fe=r),e.bindTexture(t,n||_e[t]),i.type=t,i.texture=n)},unbindTexture:function(){const t=pe[fe];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexImage3D:function(){try{e.compressedTexImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},updateUBOMapping:function(t,n){let r=d.get(n);void 0===r&&(r=new WeakMap,d.set(n,r));let i=r.get(t);void 0===i&&(i=e.getUniformBlockIndex(n,t.name),r.set(t,i))},uniformBlockBinding:function(t,n){const r=d.get(n).get(t);u.get(n)!==r&&(e.uniformBlockBinding(n,r,t.__bindingPointIndex),u.set(n,r))},texStorage2D:function(){try{e.texStorage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texStorage3D:function(){try{e.texStorage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage2D:function(){try{e.texSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage3D:function(){try{e.texSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage3D:function(){try{e.compressedTexSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===ve.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),ve.copy(t))},viewport:function(t){!1===ye.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),ye.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===r&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),h={},fe=null,pe={},f={},p=new WeakMap,v=[],K=null,$=!1,Y=null,q=null,Q=null,Z=null,ee=null,te=null,ne=null,re=!1,ie=null,ae=null,oe=null,se=null,le=null,ve.set(0,0,e.canvas.width,e.canvas.height),ye.set(0,0,e.canvas.width,e.canvas.height),i.reset(),a.reset(),c.reset()}}}function Js(e,t,n,r,i,a,o){const s=i.isWebGL2,l=i.maxTextures,c=i.maxCubemapSize,u=i.maxTextureSize,d=i.maxSamples,h=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,f="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),p=new WeakMap;let m;const g=new WeakMap;let v=!1;try{v="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function y(e,t){return v?new OffscreenCanvas(e,t):On("canvas")}function b(e,t,n,r){let i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?En:Math.floor,a=r(i*e.width),o=r(i*e.height);void 0===m&&(m=y(a,o));const s=n?y(a,o):m;return s.width=a,s.height=o,s.getContext("2d").drawImage(e,0,0,a,o),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+a+"x"+o+")."),s}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function _(e){return Sn(e.width)&&Sn(e.height)}function x(e,t){return e.generateMipmaps&&t&&e.minFilter!==he&&e.minFilter!==ve}function w(t){e.generateMipmap(t)}function M(n,r,i,a,o=!1){if(!1===s)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=r;return 6403===r&&(5126===i&&(l=33326),5131===i&&(l=33325),5121===i&&(l=33321)),33319===r&&(5126===i&&(l=33328),5131===i&&(l=33327),5121===i&&(l=33323)),6408===r&&(5126===i&&(l=34836),5131===i&&(l=34842),5121===i&&(l=a===kt&&!1===o?35907:32856),32819===i&&(l=32854),32820===i&&(l=32855)),33325!==l&&33326!==l&&33327!==l&&33328!==l&&34842!==l&&34836!==l||t.get("EXT_color_buffer_float"),l}function S(e,t,n){return!0===x(e,n)||e.isFramebufferTexture&&e.minFilter!==he&&e.minFilter!==ve?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function A(e){return e===he||e===fe||e===me?9728:9729}function E(e){const t=e.target;t.removeEventListener("dispose",E),function(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=g.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&T(e),0===Object.keys(i).length&&g.delete(n)}r.remove(e)}(t),t.isVideoTexture&&p.delete(t)}function C(t){const n=t.target;n.removeEventListener("dispose",C),function(t){const n=t.texture,i=r.get(t),a=r.get(n);if(void 0!==a.__webglTexture&&(e.deleteTexture(a.__webglTexture),o.memory.textures--),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(i.__webglFramebuffer[t]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[t]);else{if(e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer)for(let t=0;t<i.__webglColorRenderbuffer.length;t++)i.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(i.__webglColorRenderbuffer[t]);i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer)}if(t.isWebGLMultipleRenderTargets)for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);i.__webglTexture&&(e.deleteTexture(i.__webglTexture),o.memory.textures--),r.remove(n[t])}r.remove(n),r.remove(t)}(n)}function T(t){const n=r.get(t);e.deleteTexture(n.__webglTexture);const i=t.source;delete g.get(i)[n.__cacheKey],o.memory.textures--}let R=0;function B(e,t){const i=r.get(e);if(e.isVideoTexture&&function(e){const t=o.render.frame;p.get(e)!==t&&(p.set(e,t),e.update())}(e),!1===e.isRenderTargetTexture&&e.version>0&&i.__version!==e.version){const n=e.image;if(null===n)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==n.complete)return void D(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(3553,i.__webglTexture,33984+t)}const P={[ce]:10497,[ue]:33071,[de]:33648},k={[he]:9728,[fe]:9984,[me]:9986,[ve]:9729,[ye]:9985,[_e]:9987};function I(n,a,o){if(o?(e.texParameteri(n,10242,P[a.wrapS]),e.texParameteri(n,10243,P[a.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,P[a.wrapR]),e.texParameteri(n,10240,k[a.magFilter]),e.texParameteri(n,10241,k[a.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),a.wrapS===ue&&a.wrapT===ue||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,A(a.magFilter)),e.texParameteri(n,10241,A(a.minFilter)),a.minFilter!==he&&a.minFilter!==ve&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const o=t.get("EXT_texture_filter_anisotropic");if(a.magFilter===he)return;if(a.minFilter!==me&&a.minFilter!==_e)return;if(a.type===Te&&!1===t.has("OES_texture_float_linear"))return;if(!1===s&&a.type===Re&&!1===t.has("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,o.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function L(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",E));const i=n.source;let a=g.get(i);void 0===a&&(a={},g.set(i,a));const s=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.encoding),t.join()}(n);if(s!==t.__cacheKey){void 0===a[s]&&(a[s]={texture:e.createTexture(),usedTimes:0},o.memory.textures++,r=!0),a[s].usedTimes++;const i=a[t.__cacheKey];void 0!==i&&(a[t.__cacheKey].usedTimes--,0===i.usedTimes&&T(n)),t.__cacheKey=s,t.__webglTexture=a[s].texture}return r}function D(t,i,o){let l=3553;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(l=35866),i.isData3DTexture&&(l=32879);const c=L(t,i),d=i.source;n.bindTexture(l,t.__webglTexture,33984+o);const h=r.get(d);if(d.version!==h.__version||!0===c){n.activeTexture(33984+o),e.pixelStorei(37440,i.flipY),e.pixelStorei(37441,i.premultiplyAlpha),e.pixelStorei(3317,i.unpackAlignment),e.pixelStorei(37443,0);const t=function(e){return!s&&(e.wrapS!==ue||e.wrapT!==ue||e.minFilter!==he&&e.minFilter!==ve)}(i)&&!1===_(i.image);let r=b(i.image,t,!1,u);r=H(i,r);const f=_(r)||s,p=a.convert(i.format,i.encoding);let m,g=a.convert(i.type),v=M(i.internalFormat,p,g,i.encoding,i.isVideoTexture);I(l,i,f);const y=i.mipmaps,A=s&&!0!==i.isVideoTexture,E=void 0===h.__version||!0===c,C=S(i,r,f);if(i.isDepthTexture)v=6402,s?v=i.type===Te?36012:i.type===Ce?33190:i.type===ke?35056:33189:i.type===Te&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===Ne&&6402===v&&i.type!==Ae&&i.type!==Ce&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=Ce,g=a.convert(i.type)),i.format===ze&&6402===v&&(v=34041,i.type!==ke&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=ke,g=a.convert(i.type))),E&&(A?n.texStorage2D(3553,1,v,r.width,r.height):n.texImage2D(3553,0,v,r.width,r.height,0,p,g,null));else if(i.isDataTexture)if(y.length>0&&f){A&&E&&n.texStorage2D(3553,C,v,y[0].width,y[0].height);for(let e=0,t=y.length;e<t;e++)m=y[e],A?n.texSubImage2D(3553,e,0,0,m.width,m.height,p,g,m.data):n.texImage2D(3553,e,v,m.width,m.height,0,p,g,m.data);i.generateMipmaps=!1}else A?(E&&n.texStorage2D(3553,C,v,r.width,r.height),n.texSubImage2D(3553,0,0,0,r.width,r.height,p,g,r.data)):n.texImage2D(3553,0,v,r.width,r.height,0,p,g,r.data);else if(i.isCompressedTexture)if(i.isCompressedArrayTexture){A&&E&&n.texStorage3D(35866,C,v,y[0].width,y[0].height,r.depth);for(let e=0,t=y.length;e<t;e++)m=y[e],i.format!==De?null!==p?A?n.compressedTexSubImage3D(35866,e,0,0,0,m.width,m.height,r.depth,p,m.data,0,0):n.compressedTexImage3D(35866,e,v,m.width,m.height,r.depth,0,m.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):A?n.texSubImage3D(35866,e,0,0,0,m.width,m.height,r.depth,p,g,m.data):n.texImage3D(35866,e,v,m.width,m.height,r.depth,0,p,g,m.data)}else{A&&E&&n.texStorage2D(3553,C,v,y[0].width,y[0].height);for(let e=0,t=y.length;e<t;e++)m=y[e],i.format!==De?null!==p?A?n.compressedTexSubImage2D(3553,e,0,0,m.width,m.height,p,m.data):n.compressedTexImage2D(3553,e,v,m.width,m.height,0,m.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):A?n.texSubImage2D(3553,e,0,0,m.width,m.height,p,g,m.data):n.texImage2D(3553,e,v,m.width,m.height,0,p,g,m.data)}else if(i.isDataArrayTexture)A?(E&&n.texStorage3D(35866,C,v,r.width,r.height,r.depth),n.texSubImage3D(35866,0,0,0,0,r.width,r.height,r.depth,p,g,r.data)):n.texImage3D(35866,0,v,r.width,r.height,r.depth,0,p,g,r.data);else if(i.isData3DTexture)A?(E&&n.texStorage3D(32879,C,v,r.width,r.height,r.depth),n.texSubImage3D(32879,0,0,0,0,r.width,r.height,r.depth,p,g,r.data)):n.texImage3D(32879,0,v,r.width,r.height,r.depth,0,p,g,r.data);else if(i.isFramebufferTexture){if(E)if(A)n.texStorage2D(3553,C,v,r.width,r.height);else{let e=r.width,t=r.height;for(let r=0;r<C;r++)n.texImage2D(3553,r,v,e,t,0,p,g,null),e>>=1,t>>=1}}else if(y.length>0&&f){A&&E&&n.texStorage2D(3553,C,v,y[0].width,y[0].height);for(let e=0,t=y.length;e<t;e++)m=y[e],A?n.texSubImage2D(3553,e,0,0,p,g,m):n.texImage2D(3553,e,v,p,g,m);i.generateMipmaps=!1}else A?(E&&n.texStorage2D(3553,C,v,r.width,r.height),n.texSubImage2D(3553,0,0,0,p,g,r)):n.texImage2D(3553,0,v,p,g,r);x(i,f)&&w(l),h.__version=d.version,i.onUpdate&&i.onUpdate(i)}t.__version=i.version}function O(t,i,o,s,l){const c=a.convert(o.format,o.encoding),u=a.convert(o.type),d=M(o.internalFormat,c,u,o.encoding);r.get(i).__hasExternalTextures||(32879===l||35866===l?n.texImage3D(l,0,d,i.width,i.height,i.depth,0,c,u,null):n.texImage2D(l,0,d,i.width,i.height,0,c,u,null)),n.bindFramebuffer(36160,t),U(i)?h.framebufferTexture2DMultisampleEXT(36160,s,l,r.get(o).__webglTexture,0,z(i)):(3553===l||l>=34069&&l<=34074)&&e.framebufferTexture2D(36160,s,l,r.get(o).__webglTexture,0),n.bindFramebuffer(36160,null)}function F(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r||U(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===Te?i=36012:t.type===Ce&&(i=33190));const r=z(n);U(n)?h.renderbufferStorageMultisampleEXT(36161,r,i,n.width,n.height):e.renderbufferStorageMultisample(36161,r,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){const i=z(n);r&&!1===U(n)?e.renderbufferStorageMultisample(36161,i,35056,n.width,n.height):U(n)?h.renderbufferStorageMultisampleEXT(36161,i,35056,n.width,n.height):e.renderbufferStorage(36161,34041,n.width,n.height),e.framebufferRenderbuffer(36160,33306,36161,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let i=0;i<t.length;i++){const o=t[i],s=a.convert(o.format,o.encoding),l=a.convert(o.type),c=M(o.internalFormat,s,l,o.encoding),u=z(n);r&&!1===U(n)?e.renderbufferStorageMultisample(36161,u,c,n.width,n.height):U(n)?h.renderbufferStorageMultisampleEXT(36161,u,c,n.width,n.height):e.renderbufferStorage(36161,c,n.width,n.height)}}e.bindRenderbuffer(36161,null)}function N(t){const i=r.get(t),a=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(a)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),B(i.depthTexture,0);const a=r.get(i.depthTexture).__webglTexture,o=z(i);if(i.depthTexture.format===Ne)U(i)?h.framebufferTexture2DMultisampleEXT(36160,36096,3553,a,0,o):e.framebufferTexture2D(36160,36096,3553,a,0);else{if(i.depthTexture.format!==ze)throw new Error("Unknown depthTexture format");U(i)?h.framebufferTexture2DMultisampleEXT(36160,33306,3553,a,0,o):e.framebufferTexture2D(36160,33306,3553,a,0)}}(i.__webglFramebuffer,t)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),F(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),F(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function z(e){return Math.min(d,e.samples)}function U(e){const n=r.get(e);return s&&e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function H(e,n){const r=e.encoding,i=e.format,a=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===pn||r!==Pt&&(r===kt?!1===s?!0===t.has("EXT_sRGB")&&i===De?(e.format=pn,e.minFilter=ve,e.generateMipmaps=!1):n=$n.sRGBToLinear(n):i===De&&a===we||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",r)),n}this.allocateTextureUnit=function(){const e=R;return e>=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),R+=1,e},this.resetTextureUnits=function(){R=0},this.setTexture2D=B,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?D(i,e,t):n.bindTexture(35866,i.__webglTexture,33984+t)},this.setTexture3D=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?D(i,e,t):n.bindTexture(32879,i.__webglTexture,33984+t)},this.setTextureCube=function(t,i){const o=r.get(t);t.version>0&&o.__version!==t.version?function(t,i,o){if(6!==i.image.length)return;const l=L(t,i),u=i.source;n.bindTexture(34067,t.__webglTexture,33984+o);const d=r.get(u);if(u.version!==d.__version||!0===l){n.activeTexture(33984+o),e.pixelStorei(37440,i.flipY),e.pixelStorei(37441,i.premultiplyAlpha),e.pixelStorei(3317,i.unpackAlignment),e.pixelStorei(37443,0);const t=i.isCompressedTexture||i.image[0].isCompressedTexture,r=i.image[0]&&i.image[0].isDataTexture,h=[];for(let e=0;e<6;e++)h[e]=t||r?r?i.image[e].image:i.image[e]:b(i.image[e],!1,!0,c),h[e]=H(i,h[e]);const f=h[0],p=_(f)||s,m=a.convert(i.format,i.encoding),g=a.convert(i.type),v=M(i.internalFormat,m,g,i.encoding),y=s&&!0!==i.isVideoTexture,A=void 0===d.__version||!0===l;let E,C=S(i,f,p);if(I(34067,i,p),t){y&&A&&n.texStorage2D(34067,C,v,f.width,f.height);for(let e=0;e<6;e++){E=h[e].mipmaps;for(let t=0;t<E.length;t++){const r=E[t];i.format!==De?null!==m?y?n.compressedTexSubImage2D(34069+e,t,0,0,r.width,r.height,m,r.data):n.compressedTexImage2D(34069+e,t,v,r.width,r.height,0,r.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):y?n.texSubImage2D(34069+e,t,0,0,r.width,r.height,m,g,r.data):n.texImage2D(34069+e,t,v,r.width,r.height,0,m,g,r.data)}}}else{E=i.mipmaps,y&&A&&(E.length>0&&C++,n.texStorage2D(34067,C,v,h[0].width,h[0].height));for(let e=0;e<6;e++)if(r){y?n.texSubImage2D(34069+e,0,0,0,h[e].width,h[e].height,m,g,h[e].data):n.texImage2D(34069+e,0,v,h[e].width,h[e].height,0,m,g,h[e].data);for(let t=0;t<E.length;t++){const r=E[t].image[e].image;y?n.texSubImage2D(34069+e,t+1,0,0,r.width,r.height,m,g,r.data):n.texImage2D(34069+e,t+1,v,r.width,r.height,0,m,g,r.data)}}else{y?n.texSubImage2D(34069+e,0,0,0,m,g,h[e]):n.texImage2D(34069+e,0,v,m,g,h[e]);for(let t=0;t<E.length;t++){const r=E[t];y?n.texSubImage2D(34069+e,t+1,0,0,m,g,r.image[e]):n.texImage2D(34069+e,t+1,v,m,g,r.image[e])}}}x(i,p)&&w(34067),d.__version=u.version,i.onUpdate&&i.onUpdate(i)}t.__version=i.version}(o,t,i):n.bindTexture(34067,o.__webglTexture,33984+i)},this.rebindTextures=function(e,t,n){const i=r.get(e);void 0!==t&&O(i.__webglFramebuffer,e,e.texture,36064,3553),void 0!==n&&N(e)},this.setupRenderTarget=function(t){const l=t.texture,c=r.get(t),u=r.get(l);t.addEventListener("dispose",C),!0!==t.isWebGLMultipleRenderTargets&&(void 0===u.__webglTexture&&(u.__webglTexture=e.createTexture()),u.__version=l.version,o.memory.textures++);const d=!0===t.isWebGLCubeRenderTarget,h=!0===t.isWebGLMultipleRenderTargets,f=_(t)||s;if(d){c.__webglFramebuffer=[];for(let t=0;t<6;t++)c.__webglFramebuffer[t]=e.createFramebuffer()}else{if(c.__webglFramebuffer=e.createFramebuffer(),h)if(i.drawBuffers){const n=t.texture;for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),o.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(s&&t.samples>0&&!1===U(t)){const r=h?l:[l];c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=[],n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer);for(let n=0;n<r.length;n++){const i=r[n];c.__webglColorRenderbuffer[n]=e.createRenderbuffer(),e.bindRenderbuffer(36161,c.__webglColorRenderbuffer[n]);const o=a.convert(i.format,i.encoding),s=a.convert(i.type),l=M(i.internalFormat,o,s,i.encoding,!0===t.isXRRenderTarget),u=z(t);e.renderbufferStorageMultisample(36161,u,l,t.width,t.height),e.framebufferRenderbuffer(36160,36064+n,36161,c.__webglColorRenderbuffer[n])}e.bindRenderbuffer(36161,null),t.depthBuffer&&(c.__webglDepthRenderbuffer=e.createRenderbuffer(),F(c.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}}if(d){n.bindTexture(34067,u.__webglTexture),I(34067,l,f);for(let e=0;e<6;e++)O(c.__webglFramebuffer[e],t,l,36064,34069+e);x(l,f)&&w(34067),n.unbindTexture()}else if(h){const e=t.texture;for(let i=0,a=e.length;i<a;i++){const a=e[i],o=r.get(a);n.bindTexture(3553,o.__webglTexture),I(3553,a,f),O(c.__webglFramebuffer,t,a,36064+i,3553),x(a,f)&&w(3553)}n.unbindTexture()}else{let e=3553;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(s?e=t.isWebGL3DRenderTarget?32879:35866:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(e,u.__webglTexture),I(e,l,f),O(c.__webglFramebuffer,t,l,36064,e),x(l,f)&&w(e),n.unbindTexture()}t.depthBuffer&&N(t)},this.updateRenderTargetMipmap=function(e){const t=_(e)||s,i=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let a=0,o=i.length;a<o;a++){const o=i[a];if(x(o,t)){const t=e.isWebGLCubeRenderTarget?34067:3553,i=r.get(o).__webglTexture;n.bindTexture(t,i),w(t),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(s&&t.samples>0&&!1===U(t)){const i=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],a=t.width,o=t.height;let s=16384;const l=[],c=t.stencilBuffer?33306:36096,u=r.get(t),d=!0===t.isWebGLMultipleRenderTargets;if(d)for(let t=0;t<i.length;t++)n.bindFramebuffer(36160,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064+t,36161,null),n.bindFramebuffer(36160,u.__webglFramebuffer),e.framebufferTexture2D(36009,36064+t,3553,null,0);n.bindFramebuffer(36008,u.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,u.__webglFramebuffer);for(let n=0;n<i.length;n++){l.push(36064+n),t.depthBuffer&&l.push(c);const h=void 0!==u.__ignoreDepthValues&&u.__ignoreDepthValues;if(!1===h&&(t.depthBuffer&&(s|=256),t.stencilBuffer&&(s|=1024)),d&&e.framebufferRenderbuffer(36008,36064,36161,u.__webglColorRenderbuffer[n]),!0===h&&(e.invalidateFramebuffer(36008,[c]),e.invalidateFramebuffer(36009,[c])),d){const t=r.get(i[n]).__webglTexture;e.framebufferTexture2D(36009,36064,3553,t,0)}e.blitFramebuffer(0,0,a,o,0,0,a,o,s,9728),f&&e.invalidateFramebuffer(36008,l)}if(n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,null),d)for(let t=0;t<i.length;t++){n.bindFramebuffer(36160,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064+t,36161,u.__webglColorRenderbuffer[t]);const a=r.get(i[t]).__webglTexture;n.bindFramebuffer(36160,u.__webglFramebuffer),e.framebufferTexture2D(36009,36064+t,3553,a,0)}n.bindFramebuffer(36009,u.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=N,this.setupFrameBufferTexture=O,this.useMultisampledRTT=U}function Xs(e,t,n){const r=n.isWebGL2;return{convert:function(n,i=null){let a;if(n===we)return 5121;if(n===Be)return 32819;if(n===Pe)return 32820;if(n===Me)return 5120;if(n===Se)return 5122;if(n===Ae)return 5123;if(n===Ee)return 5124;if(n===Ce)return 5125;if(n===Te)return 5126;if(n===Re)return r?5131:(a=t.get("OES_texture_half_float"),null!==a?a.HALF_FLOAT_OES:null);if(n===Ie)return 6406;if(n===De)return 6408;if(n===Oe)return 6409;if(n===Fe)return 6410;if(n===Ne)return 6402;if(n===ze)return 34041;if(n===Le)return console.warn("THREE.WebGLRenderer: THREE.RGBFormat has been removed. Use THREE.RGBAFormat instead. https://github.com/mrdoob/three.js/pull/23228"),6408;if(n===pn)return a=t.get("EXT_sRGB"),null!==a?a.SRGB_ALPHA_EXT:null;if(n===Ue)return 6403;if(n===He)return 36244;if(n===Ge)return 33319;if(n===Ve)return 33320;if(n===je)return 36249;if(n===We||n===Je||n===Xe||n===Ke)if(i===kt){if(a=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===a)return null;if(n===We)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Je)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Xe)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Ke)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(a=t.get("WEBGL_compressed_texture_s3tc"),null===a)return null;if(n===We)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Je)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Xe)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Ke)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===$e||n===Ye||n===qe||n===Qe){if(a=t.get("WEBGL_compressed_texture_pvrtc"),null===a)return null;if(n===$e)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Ye)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===qe)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Qe)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===Ze)return a=t.get("WEBGL_compressed_texture_etc1"),null!==a?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===et||n===tt){if(a=t.get("WEBGL_compressed_texture_etc"),null===a)return null;if(n===et)return i===kt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(n===tt)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}if(n===nt||n===rt||n===it||n===at||n===ot||n===st||n===lt||n===ct||n===ut||n===dt||n===ht||n===ft||n===pt||n===mt){if(a=t.get("WEBGL_compressed_texture_astc"),null===a)return null;if(n===nt)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===rt)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===it)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===at)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===ot)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===st)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===lt)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ct)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===ut)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===dt)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===ht)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===ft)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===pt)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===mt)return i===kt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===gt){if(a=t.get("EXT_texture_compression_bptc"),null===a)return null;if(n===gt)return i===kt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}return n===ke?r?34042:(a=t.get("WEBGL_depth_texture"),null!==a?a.UNSIGNED_INT_24_8_WEBGL:null):void 0!==e[n]?e[n]:null}}}class Ks extends fa{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class $s extends ci{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Ys={type:"move"};class qs{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new $s,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new $s,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new lr,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new lr),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new $s,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new lr,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new lr),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,a=null;const o=this._targetRay,s=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){a=!0;for(const r of e.hand.values()){const e=t.getJointPose(r,n),i=this._getHandJoint(l,r);null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.jointRadius=e.radius),i.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],o=r.position.distanceTo(i.position),s=.02,c=.005;l.inputState.pinching&&o>s+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&o<=s-c&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==s&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),i.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(i.linearVelocity)):s.hasLinearVelocity=!1,i.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(i.angularVelocity)):s.hasAngularVelocity=!1));null!==o&&(r=t.getPose(e.targetRaySpace,n),null===r&&null!==i&&(r=i),null!==r&&(o.matrix.fromArray(r.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),r.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(r.linearVelocity)):o.hasLinearVelocity=!1,r.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(r.angularVelocity)):o.hasAngularVelocity=!1,this.dispatchEvent(Ys)))}return null!==o&&(o.visible=null!==r),null!==s&&(s.visible=null!==i),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new $s;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Qs extends Zn{constructor(e,t,n,r,i,a,o,s,l,c){if((c=void 0!==c?c:Ne)!==Ne&&c!==ze)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===Ne&&(n=Ce),void 0===n&&c===ze&&(n=ke),super(null,r,i,a,o,s,c,n,l),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==o?o:he,this.minFilter=void 0!==s?s:he,this.flipY=!1,this.generateMipmaps=!1}}class Zs extends mn{constructor(e,t){super();const n=this;let r=null,i=1,a=null,o="local-floor",s=null,l=null,c=null,u=null,d=null,h=null;const f=t.getContextAttributes();let p=null,m=null;const g=[],v=[],y=new Set,b=new Map,_=new fa;_.layers.enable(1),_.viewport=new er;const x=new fa;x.layers.enable(2),x.viewport=new er;const w=[_,x],M=new Ks;M.layers.enable(1),M.layers.enable(2);let S=null,A=null;function E(e){const t=v.indexOf(e.inputSource);if(-1===t)return;const n=g[t];void 0!==n&&n.dispatchEvent({type:e.type,data:e.inputSource})}function C(){r.removeEventListener("select",E),r.removeEventListener("selectstart",E),r.removeEventListener("selectend",E),r.removeEventListener("squeeze",E),r.removeEventListener("squeezestart",E),r.removeEventListener("squeezeend",E),r.removeEventListener("end",C),r.removeEventListener("inputsourceschange",T);for(let e=0;e<g.length;e++){const t=v[e];null!==t&&(v[e]=null,g[e].disconnect(t))}S=null,A=null,e.setRenderTarget(p),d=null,u=null,c=null,r=null,m=null,I.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function T(e){for(let t=0;t<e.removed.length;t++){const n=e.removed[t],r=v.indexOf(n);r>=0&&(v[r]=null,g[r].disconnect(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t];let r=v.indexOf(n);if(-1===r){for(let e=0;e<g.length;e++){if(e>=v.length){v.push(n),r=e;break}if(null===v[e]){v[e]=n,r=e;break}}if(-1===r)break}const i=g[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=g[e];return void 0===t&&(t=new qs,g[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=g[e];return void 0===t&&(t=new qs,g[e]=t),t.getGripSpace()},this.getHand=function(e){let t=g[e];return void 0===t&&(t=new qs,g[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){o=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return s||a},this.setReferenceSpace=function(e){s=e},this.getBaseLayer=function(){return null!==u?u:d},this.getBinding=function(){return c},this.getFrame=function(){return h},this.getSession=function(){return r},this.setSession=async function(l){if(r=l,null!==r){if(p=e.getRenderTarget(),r.addEventListener("select",E),r.addEventListener("selectstart",E),r.addEventListener("selectend",E),r.addEventListener("squeeze",E),r.addEventListener("squeezestart",E),r.addEventListener("squeezeend",E),r.addEventListener("end",C),r.addEventListener("inputsourceschange",T),!0!==f.xrCompatible&&await t.makeXRCompatible(),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==r.renderState.layers||f.antialias,alpha:f.alpha,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:i};d=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:d}),m=new tr(d.framebufferWidth,d.framebufferHeight,{format:De,type:we,encoding:e.outputEncoding,stencilBuffer:f.stencil})}else{let n=null,a=null,o=null;f.depth&&(o=f.stencil?35056:33190,n=f.stencil?ze:Ne,a=f.stencil?ke:Ce);const s={colorFormat:32856,depthFormat:o,scaleFactor:i};c=new XRWebGLBinding(r,t),u=c.createProjectionLayer(s),r.updateRenderState({layers:[u]}),m=new tr(u.textureWidth,u.textureHeight,{format:De,type:we,depthTexture:new Qs(u.textureWidth,u.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:f.stencil,encoding:e.outputEncoding,samples:f.antialias?4:0}),e.properties.get(m).__ignoreDepthValues=u.ignoreDepthValues}m.isXRRenderTarget=!0,this.setFoveation(1),s=null,a=await r.requestReferenceSpace(o),I.setContext(r),I.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const R=new lr,B=new lr;function P(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;M.near=x.near=_.near=e.near,M.far=x.far=_.far=e.far,S===M.near&&A===M.far||(r.updateRenderState({depthNear:M.near,depthFar:M.far}),S=M.near,A=M.far);const t=e.parent,n=M.cameras;P(M,t);for(let e=0;e<n.length;e++)P(n[e],t);M.matrixWorld.decompose(M.position,M.quaternion,M.scale),e.matrix.copy(M.matrix),e.matrix.decompose(e.position,e.quaternion,e.scale);const i=e.children;for(let e=0,t=i.length;e<t;e++)i[e].updateMatrixWorld(!0);2===n.length?function(e,t,n){R.setFromMatrixPosition(t.matrixWorld),B.setFromMatrixPosition(n.matrixWorld);const r=R.distanceTo(B),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,o=i[14]/(i[10]-1),s=i[14]/(i[10]+1),l=(i[9]+1)/i[5],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],d=(a[8]+1)/a[0],h=o*u,f=o*d,p=r/(-u+d),m=p*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=o+p,v=s+p,y=h-m,b=f+(r-m),_=l*s/v*g,x=c*s/v*g;e.projectionMatrix.makePerspective(y,b,_,x,g,v)}(M,_,x):M.projectionMatrix.copy(_.projectionMatrix)},this.getCamera=function(){return M},this.getFoveation=function(){return null!==u?u.fixedFoveation:null!==d?d.fixedFoveation:void 0},this.setFoveation=function(e){null!==u&&(u.fixedFoveation=e),null!==d&&void 0!==d.fixedFoveation&&(d.fixedFoveation=e)},this.getPlanes=function(){return y};let k=null;const I=new Aa;I.setAnimationLoop((function(t,r){if(l=r.getViewerPose(s||a),h=r,null!==l){const t=l.views;null!==d&&(e.setRenderTargetFramebuffer(m,d.framebuffer),e.setRenderTarget(m));let n=!1;t.length!==M.cameras.length&&(M.cameras.length=0,n=!0);for(let r=0;r<t.length;r++){const i=t[r];let a=null;if(null!==d)a=d.getViewport(i);else{const t=c.getViewSubImage(u,i);a=t.viewport,0===r&&(e.setRenderTargetTextures(m,t.colorTexture,u.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(m))}let o=w[r];void 0===o&&(o=new fa,o.layers.enable(r),o.viewport=new er,w[r]=o),o.matrix.fromArray(i.transform.matrix),o.projectionMatrix.fromArray(i.projectionMatrix),o.viewport.set(a.x,a.y,a.width,a.height),0===r&&M.matrix.copy(o.matrix),!0===n&&M.cameras.push(o)}}for(let e=0;e<g.length;e++){const t=v[e],n=g[e];null!==t&&void 0!==n&&n.update(t,r,s||a)}if(k&&k(t,r),r.detectedPlanes){n.dispatchEvent({type:"planesdetected",data:r.detectedPlanes});let e=null;for(const t of y)r.detectedPlanes.has(t)||(null===e&&(e=[]),e.push(t));if(null!==e)for(const t of e)y.delete(t),b.delete(t),n.dispatchEvent({type:"planeremoved",data:t});for(const e of r.detectedPlanes)if(y.has(e)){const t=b.get(e);e.lastChangedTime>t&&(b.set(e,e.lastChangedTime),n.dispatchEvent({type:"planechanged",data:e}))}else y.add(e),b.set(e,r.lastChangedTime),n.dispatchEvent({type:"planeadded",data:e})}h=null})),this.setAnimationLoop=function(e){k=e},this.dispose=function(){}}}function el(e,t){function n(n,r){n.opacity.value=r.opacity,r.color&&n.diffuse.value.copy(r.color),r.emissive&&n.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(n.map.value=r.map),r.alphaMap&&(n.alphaMap.value=r.alphaMap),r.bumpMap&&(n.bumpMap.value=r.bumpMap,n.bumpScale.value=r.bumpScale,r.side===m&&(n.bumpScale.value*=-1)),r.displacementMap&&(n.displacementMap.value=r.displacementMap,n.displacementScale.value=r.displacementScale,n.displacementBias.value=r.displacementBias),r.emissiveMap&&(n.emissiveMap.value=r.emissiveMap),r.normalMap&&(n.normalMap.value=r.normalMap,n.normalScale.value.copy(r.normalScale),r.side===m&&n.normalScale.value.negate()),r.specularMap&&(n.specularMap.value=r.specularMap),r.alphaTest>0&&(n.alphaTest.value=r.alphaTest);const i=t.get(r).envMap;if(i&&(n.envMap.value=i,n.flipEnvMap.value=i.isCubeTexture&&!1===i.isRenderTargetTexture?-1:1,n.reflectivity.value=r.reflectivity,n.ior.value=r.ior,n.refractionRatio.value=r.refractionRatio),r.lightMap){n.lightMap.value=r.lightMap;const t=!0!==e.physicallyCorrectLights?Math.PI:1;n.lightMapIntensity.value=r.lightMapIntensity*t}let a,o;r.aoMap&&(n.aoMap.value=r.aoMap,n.aoMapIntensity.value=r.aoMapIntensity),r.map?a=r.map:r.specularMap?a=r.specularMap:r.displacementMap?a=r.displacementMap:r.normalMap?a=r.normalMap:r.bumpMap?a=r.bumpMap:r.roughnessMap?a=r.roughnessMap:r.metalnessMap?a=r.metalnessMap:r.alphaMap?a=r.alphaMap:r.emissiveMap?a=r.emissiveMap:r.clearcoatMap?a=r.clearcoatMap:r.clearcoatNormalMap?a=r.clearcoatNormalMap:r.clearcoatRoughnessMap?a=r.clearcoatRoughnessMap:r.iridescenceMap?a=r.iridescenceMap:r.iridescenceThicknessMap?a=r.iridescenceThicknessMap:r.specularIntensityMap?a=r.specularIntensityMap:r.specularColorMap?a=r.specularColorMap:r.transmissionMap?a=r.transmissionMap:r.thicknessMap?a=r.thicknessMap:r.sheenColorMap?a=r.sheenColorMap:r.sheenRoughnessMap&&(a=r.sheenRoughnessMap),void 0!==a&&(a.isWebGLRenderTarget&&(a=a.texture),!0===a.matrixAutoUpdate&&a.updateMatrix(),n.uvTransform.value.copy(a.matrix)),r.aoMap?o=r.aoMap:r.lightMap&&(o=r.lightMap),void 0!==o&&(o.isWebGLRenderTarget&&(o=o.texture),!0===o.matrixAutoUpdate&&o.updateMatrix(),n.uv2Transform.value.copy(o.matrix))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,ca(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,r,i,a,o){r.isMeshBasicMaterial||r.isMeshLambertMaterial?n(e,r):r.isMeshToonMaterial?(n(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,r)):r.isMeshPhongMaterial?(n(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,r)):r.isMeshStandardMaterial?(n(e,r),function(e,n){e.roughness.value=n.roughness,e.metalness.value=n.metalness,n.roughnessMap&&(e.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(e.metalnessMap.value=n.metalnessMap),t.get(n).envMap&&(e.envMapIntensity.value=n.envMapIntensity)}(e,r),r.isMeshPhysicalMaterial&&function(e,t,n){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap)),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===m&&e.clearcoatNormalScale.value.negate())),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap)),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=n.texture,e.transmissionSamplerSize.value.set(n.width,n.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}(e,r,o)):r.isMeshMatcapMaterial?(n(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,r)):r.isMeshDepthMaterial?n(e,r):r.isMeshDistanceMaterial?(n(e,r),function(e,t){e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?n(e,r):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){let i;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?i=t.map:t.alphaMap&&(i=t.alphaMap),void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,a):r.isSpriteMaterial?function(e,t){let n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?n=t.map:t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function tl(e,t,n,r){let i={},a={},o=[];const s=n.isWebGL2?e.getParameter(35375):0;function l(e,t,n){const r=e.value;if(void 0===n[t]){if("number"==typeof r)n[t]=r;else{const e=Array.isArray(r)?r:[r],i=[];for(let t=0;t<e.length;t++)i.push(e[t].clone());n[t]=i}return!0}if("number"==typeof r){if(n[t]!==r)return n[t]=r,!0}else{const e=Array.isArray(n[t])?n[t]:[n[t]],i=Array.isArray(r)?r:[r];for(let t=0;t<e.length;t++){const n=e[t];if(!1===n.equals(i[t]))return n.copy(i[t]),!0}}return!1}function c(e){const t={boundary:0,storage:0};return"number"==typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),t}function u(t){const n=t.target;n.removeEventListener("dispose",u);const r=o.indexOf(n.__bindingPointIndex);o.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}return{bind:function(e,t){const n=t.program;r.uniformBlockBinding(e,n)},update:function(n,d){let h=i[n.id];void 0===h&&(function(e){const t=e.uniforms;let n=0;let r=0;for(let e=0,i=t.length;e<i;e++){const i=t[e],a={boundary:0,storage:0},o=Array.isArray(i.value)?i.value:[i.value];for(let e=0,t=o.length;e<t;e++){const t=c(o[e]);a.boundary+=t.boundary,a.storage+=t.storage}if(i.__data=new Float32Array(a.storage/Float32Array.BYTES_PER_ELEMENT),i.__offset=n,e>0){r=n%16;const e=16-r;0!==r&&e-a.boundary<0&&(n+=16-r,i.__offset=n)}n+=a.storage}r=n%16,r>0&&(n+=16-r),e.__size=n,e.__cache={}}(n),h=function(t){const n=function(){for(let e=0;e<s;e++)if(-1===o.indexOf(e))return o.push(e),e;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();t.__bindingPointIndex=n;const r=e.createBuffer(),i=t.__size,a=t.usage;return e.bindBuffer(35345,r),e.bufferData(35345,i,a),e.bindBuffer(35345,null),e.bindBufferBase(35345,n,r),r}(n),i[n.id]=h,n.addEventListener("dispose",u));const f=d.program;r.updateUBOMapping(n,f);const p=t.render.frame;a[n.id]!==p&&(function(t){const n=i[t.id],r=t.uniforms,a=t.__cache;e.bindBuffer(35345,n);for(let t=0,n=r.length;t<n;t++){const n=r[t];if(!0===l(n,t,a)){const t=n.__offset,r=Array.isArray(n.value)?n.value:[n.value];let i=0;for(let a=0;a<r.length;a++){const o=r[a],s=c(o);"number"==typeof o?(n.__data[0]=o,e.bufferSubData(35345,t+i,n.__data)):o.isMatrix3?(n.__data[0]=o.elements[0],n.__data[1]=o.elements[1],n.__data[2]=o.elements[2],n.__data[3]=o.elements[0],n.__data[4]=o.elements[3],n.__data[5]=o.elements[4],n.__data[6]=o.elements[5],n.__data[7]=o.elements[0],n.__data[8]=o.elements[6],n.__data[9]=o.elements[7],n.__data[10]=o.elements[8],n.__data[11]=o.elements[0]):(o.toArray(n.__data,i),i+=s.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(35345,t,n.__data)}}e.bindBuffer(35345,null)}(n),a[n.id]=p)},dispose:function(){for(const t in i)e.deleteBuffer(i[t]);o=[],i={},a={}}}}function nl(e={}){this.isWebGLRenderer=!0;const t=void 0!==e.canvas?e.canvas:function(){const e=On("canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,i=void 0===e.depth||e.depth,a=void 0===e.stencil||e.stencil,o=void 0!==e.antialias&&e.antialias,s=void 0===e.premultipliedAlpha||e.premultipliedAlpha,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,c=void 0!==e.powerPreference?e.powerPreference:"default",u=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let d;d=null!==n?n.getContextAttributes().alpha:void 0!==e.alpha&&e.alpha;let h=null,f=null;const g=[],y=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Pt,this.physicallyCorrectLights=!1,this.toneMapping=q,this.toneMappingExposure=1;const b=this;let _=!1,x=0,w=0,M=null,S=-1,A=null;const E=new er,C=new er;let T=null,R=t.width,B=t.height,P=1,k=null,I=null;const L=new er(0,0,R,B),D=new er(0,0,R,B);let O=!1;const F=new Sa;let N=!1,z=!1,U=null;const H=new Nr,G=new Bn,V=new lr,j={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function W(){return null===M?P:1}let J,X,K,$,Y,Q,Z,ee,te,ne,re,ie,ae,oe,se,le,ce,ue,de,he,fe,pe,me,ge,ve=n;function ye(e,n){for(let r=0;r<e.length;r++){const i=e[r],a=t.getContext(i,n);if(null!==a)return a}return null}try{const e={alpha:!0,depth:i,stencil:a,antialias:o,premultipliedAlpha:s,preserveDrawingBuffer:l,powerPreference:c,failIfMajorPerformanceCaveat:u};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${r}`),t.addEventListener("webglcontextlost",Me,!1),t.addEventListener("webglcontextrestored",Se,!1),t.addEventListener("webglcontextcreationerror",Ae,!1),null===ve){const t=["webgl2","webgl","experimental-webgl"];if(!0===b.isWebGL1Renderer&&t.shift(),ve=ye(t,e),null===ve)throw ye(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ve.getShaderPrecisionFormat&&(ve.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function be(){J=new Qa(ve),X=new Da(ve,J,e),J.init(X),pe=new Xs(ve,J,X),K=new Ws(ve,J,X),$=new to,Y=new Ps,Q=new Js(ve,J,K,Y,X,pe,$),Z=new Fa(b),ee=new qa(b),te=new Ea(ve,X),me=new Ia(ve,J,te,X),ne=new Za(ve,te,$,me),re=new ao(ve,ne,te,$),de=new io(ve,X,Q),le=new Oa(Y),ie=new Bs(b,Z,ee,J,X,me,le),ae=new el(b,Y),oe=new Ds,se=new Hs(J,X),ue=new ka(b,Z,ee,K,re,d,s),ce=new js(b,re,X),ge=new tl(ve,$,X,K),he=new La(ve,J,$,X),fe=new eo(ve,J,$,X),$.programs=ie.programs,b.capabilities=X,b.extensions=J,b.properties=Y,b.renderLists=oe,b.shadowMap=ce,b.state=K,b.info=$}be();const xe=new Zs(b,ve);function Me(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),_=!0}function Se(){console.log("THREE.WebGLRenderer: Context Restored."),_=!1;const e=$.autoReset,t=ce.enabled,n=ce.autoUpdate,r=ce.needsUpdate,i=ce.type;be(),$.autoReset=e,ce.enabled=t,ce.autoUpdate=n,ce.needsUpdate=r,ce.type=i}function Ae(e){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function Ee(e){const t=e.target;t.removeEventListener("dispose",Ee),function(e){(function(e){const t=Y.get(e).programs;void 0!==t&&(t.forEach((function(e){ie.releaseProgram(e)})),e.isShaderMaterial&&ie.releaseShaderCache(e))})(e),Y.remove(e)}(t)}this.xr=xe,this.getContext=function(){return ve},this.getContextAttributes=function(){return ve.getContextAttributes()},this.forceContextLoss=function(){const e=J.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=J.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return P},this.setPixelRatio=function(e){void 0!==e&&(P=e,this.setSize(R,B,!1))},this.getSize=function(e){return e.set(R,B)},this.setSize=function(e,n,r){xe.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(R=e,B=n,t.width=Math.floor(e*P),t.height=Math.floor(n*P),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(R*P,B*P).floor()},this.setDrawingBufferSize=function(e,n,r){R=e,B=n,P=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(E)},this.getViewport=function(e){return e.copy(L)},this.setViewport=function(e,t,n,r){e.isVector4?L.set(e.x,e.y,e.z,e.w):L.set(e,t,n,r),K.viewport(E.copy(L).multiplyScalar(P).floor())},this.getScissor=function(e){return e.copy(D)},this.setScissor=function(e,t,n,r){e.isVector4?D.set(e.x,e.y,e.z,e.w):D.set(e,t,n,r),K.scissor(C.copy(D).multiplyScalar(P).floor())},this.getScissorTest=function(){return O},this.setScissorTest=function(e){K.setScissorTest(O=e)},this.setOpaqueSort=function(e){k=e},this.setTransparentSort=function(e){I=e},this.getClearColor=function(e){return e.copy(ue.getClearColor())},this.setClearColor=function(){ue.setClearColor.apply(ue,arguments)},this.getClearAlpha=function(){return ue.getClearAlpha()},this.setClearAlpha=function(){ue.setClearAlpha.apply(ue,arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;e&&(r|=16384),t&&(r|=256),n&&(r|=1024),ve.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",Me,!1),t.removeEventListener("webglcontextrestored",Se,!1),t.removeEventListener("webglcontextcreationerror",Ae,!1),oe.dispose(),se.dispose(),Y.dispose(),Z.dispose(),ee.dispose(),re.dispose(),me.dispose(),ge.dispose(),ie.dispose(),xe.dispose(),xe.removeEventListener("sessionstart",Be),xe.removeEventListener("sessionend",Pe),U&&(U.dispose(),U=null),ke.stop()},this.renderBufferDirect=function(e,t,n,r,i,a){null===t&&(t=j);const o=i.isMesh&&i.matrixWorld.determinant()<0,s=function(e,t,n,r,i){!0!==t.isScene&&(t=j),Q.resetTextureUnits();const a=t.fog,o=r.isMeshStandardMaterial?t.environment:null,s=null===M?b.outputEncoding:!0===M.isXRRenderTarget?M.texture.encoding:Pt,l=(r.isMeshStandardMaterial?ee:Z).get(r.envMap||o),c=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,u=!!r.normalMap&&!!n.attributes.tangent,d=!!n.morphAttributes.position,h=!!n.morphAttributes.normal,p=!!n.morphAttributes.color,m=r.toneMapped?b.toneMapping:q,g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,v=void 0!==g?g.length:0,y=Y.get(r),_=f.state.lights;if(!0===N&&(!0===z||e!==A)){const t=e===A&&r.id===S;le.setState(r,e,t)}let x=!1;r.version===y.__version?y.needsLights&&y.lightsStateVersion!==_.state.version||y.outputEncoding!==s||i.isInstancedMesh&&!1===y.instancing?x=!0:i.isInstancedMesh||!0!==y.instancing?i.isSkinnedMesh&&!1===y.skinning?x=!0:i.isSkinnedMesh||!0!==y.skinning?y.envMap!==l||!0===r.fog&&y.fog!==a?x=!0:void 0===y.numClippingPlanes||y.numClippingPlanes===le.numPlanes&&y.numIntersection===le.numIntersection?(y.vertexAlphas!==c||y.vertexTangents!==u||y.morphTargets!==d||y.morphNormals!==h||y.morphColors!==p||y.toneMapping!==m||!0===X.isWebGL2&&y.morphTargetsCount!==v)&&(x=!0):x=!0:x=!0:x=!0:(x=!0,y.__version=r.version);let w=y.currentProgram;!0===x&&(w=Ne(r,t,i));let E=!1,C=!1,T=!1;const R=w.getUniforms(),k=y.uniforms;if(K.useProgram(w.program)&&(E=!0,C=!0,T=!0),r.id!==S&&(S=r.id,C=!0),E||A!==e){if(R.setValue(ve,"projectionMatrix",e.projectionMatrix),X.logarithmicDepthBuffer&&R.setValue(ve,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),A!==e&&(A=e,C=!0,T=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshStandardMaterial||r.envMap){const t=R.map.cameraPosition;void 0!==t&&t.setValue(ve,V.setFromMatrixPosition(e.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&R.setValue(ve,"isOrthographic",!0===e.isOrthographicCamera),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.isShadowMaterial||i.isSkinnedMesh)&&R.setValue(ve,"viewMatrix",e.matrixWorldInverse)}if(i.isSkinnedMesh){R.setOptional(ve,i,"bindMatrix"),R.setOptional(ve,i,"bindMatrixInverse");const e=i.skeleton;e&&(X.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),R.setValue(ve,"boneTexture",e.boneTexture,Q),R.setValue(ve,"boneTextureSize",e.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const I=n.morphAttributes;var L,D;if((void 0!==I.position||void 0!==I.normal||void 0!==I.color&&!0===X.isWebGL2)&&de.update(i,n,r,w),(C||y.receiveShadow!==i.receiveShadow)&&(y.receiveShadow=i.receiveShadow,R.setValue(ve,"receiveShadow",i.receiveShadow)),r.isMeshGouraudMaterial&&null!==r.envMap&&(k.envMap.value=l,k.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1),C&&(R.setValue(ve,"toneMappingExposure",b.toneMappingExposure),y.needsLights&&(D=T,(L=k).ambientLightColor.needsUpdate=D,L.lightProbe.needsUpdate=D,L.directionalLights.needsUpdate=D,L.directionalLightShadows.needsUpdate=D,L.pointLights.needsUpdate=D,L.pointLightShadows.needsUpdate=D,L.spotLights.needsUpdate=D,L.spotLightShadows.needsUpdate=D,L.rectAreaLights.needsUpdate=D,L.hemisphereLights.needsUpdate=D),a&&!0===r.fog&&ae.refreshFogUniforms(k,a),ae.refreshMaterialUniforms(k,r,P,B,U),us.upload(ve,y.uniformsList,k,Q)),r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(us.upload(ve,y.uniformsList,k,Q),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&R.setValue(ve,"center",i.center),R.setValue(ve,"modelViewMatrix",i.modelViewMatrix),R.setValue(ve,"normalMatrix",i.normalMatrix),R.setValue(ve,"modelMatrix",i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){const e=r.uniformsGroups;for(let t=0,n=e.length;t<n;t++)if(X.isWebGL2){const n=e[t];ge.update(n,w),ge.bind(n,w)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return w}(e,t,n,r,i);K.setMaterial(r,o);let l=n.index,c=1;!0===r.wireframe&&(l=ne.getWireframeAttribute(n),c=2);const u=n.drawRange,d=n.attributes.position;let h=u.start*c,p=(u.start+u.count)*c;null!==a&&(h=Math.max(h,a.start*c),p=Math.min(p,(a.start+a.count)*c)),null!==l?(h=Math.max(h,0),p=Math.min(p,l.count)):null!=d&&(h=Math.max(h,0),p=Math.min(p,d.count));const m=p-h;if(m<0||m===1/0)return;let g;me.setup(i,r,s,n,l);let v=he;if(null!==l&&(g=te.get(l),v=fe,v.setIndex(g)),i.isMesh)!0===r.wireframe?(K.setLineWidth(r.wireframeLinewidth*W()),v.setMode(1)):v.setMode(4);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),K.setLineWidth(e*W()),i.isLineSegments?v.setMode(1):i.isLineLoop?v.setMode(2):v.setMode(3)}else i.isPoints?v.setMode(0):i.isSprite&&v.setMode(4);if(i.isInstancedMesh)v.renderInstances(h,m,i.count);else if(n.isInstancedBufferGeometry){const e=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,t=Math.min(n.instanceCount,e);v.renderInstances(h,m,t)}else v.render(h,m)},this.compile=function(e,t){function n(e,t,n){!0===e.transparent&&e.side===v?(e.side=m,e.needsUpdate=!0,Ne(e,t,n),e.side=p,e.needsUpdate=!0,Ne(e,t,n),e.side=v):Ne(e,t,n)}f=se.get(e),f.init(),y.push(f),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(f.pushLight(e),e.castShadow&&f.pushShadow(e))})),f.setupLights(b.physicallyCorrectLights),e.traverse((function(t){const r=t.material;if(r)if(Array.isArray(r))for(let i=0;i<r.length;i++)n(r[i],e,t);else n(r,e,t)})),y.pop(),f=null};let Ce=null;function Be(){ke.stop()}function Pe(){ke.start()}const ke=new Aa;function Ie(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)f.pushLight(e),e.castShadow&&f.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||F.intersectsSprite(e)){r&&V.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H);const t=re.update(e),i=e.material;i.visible&&h.push(e,t,i,n,V.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==$.render.frame&&(e.skeleton.update(),e.skeleton.frame=$.render.frame),!e.frustumCulled||F.intersectsObject(e))){r&&V.setFromMatrixPosition(e.matrixWorld).applyMatrix4(H);const t=re.update(e),i=e.material;if(Array.isArray(i)){const r=t.groups;for(let a=0,o=r.length;a<o;a++){const o=r[a],s=i[o.materialIndex];s&&s.visible&&h.push(e,t,s,n,V.z,o)}}else i.visible&&h.push(e,t,i,n,V.z,null)}const i=e.children;for(let e=0,a=i.length;e<a;e++)Ie(i[e],t,n,r)}function Le(e,t,n,r){const i=e.opaque,a=e.transmissive,s=e.transparent;f.setupLightsView(n),a.length>0&&function(e,t,n){const r=X.isWebGL2;null===U&&(U=new tr(1,1,{generateMipmaps:!0,type:J.has("EXT_color_buffer_half_float")?Re:we,minFilter:_e,samples:r&&!0===o?4:0})),b.getDrawingBufferSize(G),r?U.setSize(G.x,G.y):U.setSize(En(G.x),En(G.y));const i=b.getRenderTarget();b.setRenderTarget(U),b.clear();const a=b.toneMapping;b.toneMapping=q,Oe(e,t,n),b.toneMapping=a,Q.updateMultisampleRenderTarget(U),Q.updateRenderTargetMipmap(U),b.setRenderTarget(i)}(i,t,n),r&&K.viewport(E.copy(r)),i.length>0&&Oe(i,t,n),a.length>0&&Oe(a,t,n),s.length>0&&Oe(s,t,n),K.buffers.depth.setTest(!0),K.buffers.depth.setMask(!0),K.buffers.color.setMask(!0),K.setPolygonOffset(!1)}function Oe(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,a=e.length;i<a;i++){const a=e[i],o=a.object,s=a.geometry,l=null===r?a.material:r,c=a.group;o.layers.test(n.layers)&&Fe(o,t,n,s,l,c)}}function Fe(e,t,n,r,i,a){e.onBeforeRender(b,t,n,r,i,a),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(b,t,n,r,e,a),!0===i.transparent&&i.side===v?(i.side=m,i.needsUpdate=!0,b.renderBufferDirect(n,t,r,i,e,a),i.side=p,i.needsUpdate=!0,b.renderBufferDirect(n,t,r,i,e,a),i.side=v):b.renderBufferDirect(n,t,r,i,e,a),e.onAfterRender(b,t,n,r,i,a)}function Ne(e,t,n){!0!==t.isScene&&(t=j);const r=Y.get(e),i=f.state.lights,a=f.state.shadowsArray,o=i.state.version,s=ie.getParameters(e,i.state,a,t,n),l=ie.getProgramCacheKey(s);let c=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=(e.isMeshStandardMaterial?ee:Z).get(e.envMap||r.environment),void 0===c&&(e.addEventListener("dispose",Ee),c=new Map,r.programs=c);let u=c.get(l);if(void 0!==u){if(r.currentProgram===u&&r.lightsStateVersion===o)return ze(e,s),u}else s.uniforms=ie.getUniforms(e),e.onBuild(n,s,b),e.onBeforeCompile(s,b),u=ie.acquireProgram(s,l),c.set(l,u),r.uniforms=s.uniforms;const d=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(d.clippingPlanes=le.uniform),ze(e,s),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=o,r.needsLights&&(d.ambientLightColor.value=i.state.ambient,d.lightProbe.value=i.state.probe,d.directionalLights.value=i.state.directional,d.directionalLightShadows.value=i.state.directionalShadow,d.spotLights.value=i.state.spot,d.spotLightShadows.value=i.state.spotShadow,d.rectAreaLights.value=i.state.rectArea,d.ltc_1.value=i.state.rectAreaLTC1,d.ltc_2.value=i.state.rectAreaLTC2,d.pointLights.value=i.state.point,d.pointLightShadows.value=i.state.pointShadow,d.hemisphereLights.value=i.state.hemi,d.directionalShadowMap.value=i.state.directionalShadowMap,d.directionalShadowMatrix.value=i.state.directionalShadowMatrix,d.spotShadowMap.value=i.state.spotShadowMap,d.spotLightMatrix.value=i.state.spotLightMatrix,d.spotLightMap.value=i.state.spotLightMap,d.pointShadowMap.value=i.state.pointShadowMap,d.pointShadowMatrix.value=i.state.pointShadowMatrix);const h=u.getUniforms(),p=us.seqWithValue(h.seq,d);return r.currentProgram=u,r.uniformsList=p,u}function ze(e,t){const n=Y.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}ke.setAnimationLoop((function(e){Ce&&Ce(e)})),"undefined"!=typeof self&&ke.setContext(self),this.setAnimationLoop=function(e){Ce=e,xe.setAnimationLoop(e),null===e?ke.stop():ke.start()},xe.addEventListener("sessionstart",Be),xe.addEventListener("sessionend",Pe),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===_)return;!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===xe.enabled&&!0===xe.isPresenting&&(!0===xe.cameraAutoUpdate&&xe.updateCamera(t),t=xe.getCamera()),!0===e.isScene&&e.onBeforeRender(b,e,t,M),f=se.get(e,y.length),f.init(),y.push(f),H.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),F.setFromProjectionMatrix(H),z=this.localClippingEnabled,N=le.init(this.clippingPlanes,z,t),h=oe.get(e,g.length),h.init(),g.push(h),Ie(e,t,0,b.sortObjects),h.finish(),!0===b.sortObjects&&h.sort(k,I),!0===N&&le.beginShadows();const n=f.state.shadowsArray;if(ce.render(n,e,t),!0===N&&le.endShadows(),!0===this.info.autoReset&&this.info.reset(),ue.render(h,e),f.setupLights(b.physicallyCorrectLights),t.isArrayCamera){const n=t.cameras;for(let t=0,r=n.length;t<r;t++){const r=n[t];Le(h,e,r,r.viewport)}}else Le(h,e,t);null!==M&&(Q.updateMultisampleRenderTarget(M),Q.updateRenderTargetMipmap(M)),!0===e.isScene&&e.onAfterRender(b,e,t),me.resetDefaultState(),S=-1,A=null,y.pop(),f=y.length>0?y[y.length-1]:null,g.pop(),h=g.length>0?g[g.length-1]:null},this.getActiveCubeFace=function(){return x},this.getActiveMipmapLevel=function(){return w},this.getRenderTarget=function(){return M},this.setRenderTargetTextures=function(e,t,n){Y.get(e.texture).__webglTexture=t,Y.get(e.depthTexture).__webglTexture=n;const r=Y.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===J.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=Y.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){M=e,x=t,w=n;let r=!0,i=null,a=!1,o=!1;if(e){const n=Y.get(e);void 0!==n.__useDefaultFramebuffer?(K.bindFramebuffer(36160,null),r=!1):void 0===n.__webglFramebuffer?Q.setupRenderTarget(e):n.__hasExternalTextures&&Q.rebindTextures(e,Y.get(e.texture).__webglTexture,Y.get(e.depthTexture).__webglTexture);const s=e.texture;(s.isData3DTexture||s.isDataArrayTexture||s.isCompressedArrayTexture)&&(o=!0);const l=Y.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=l[t],a=!0):i=X.isWebGL2&&e.samples>0&&!1===Q.useMultisampledRTT(e)?Y.get(e).__webglMultisampledFramebuffer:l,E.copy(e.viewport),C.copy(e.scissor),T=e.scissorTest}else E.copy(L).multiplyScalar(P).floor(),C.copy(D).multiplyScalar(P).floor(),T=O;if(K.bindFramebuffer(36160,i)&&X.drawBuffers&&r&&K.drawBuffers(e,i),K.viewport(E),K.scissor(C),K.setScissorTest(T),a){const r=Y.get(e.texture);ve.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(o){const r=Y.get(e.texture),i=t||0;ve.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}S=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,o){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let s=Y.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==o&&(s=s[o]),s){K.bindFramebuffer(36160,s);try{const o=e.texture,s=o.format,l=o.type;if(s!==De&&pe.convert(s)!==ve.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===Re&&(J.has("EXT_color_buffer_half_float")||X.isWebGL2&&J.has("EXT_color_buffer_float"));if(!(l===we||pe.convert(l)===ve.getParameter(35738)||l===Te&&(X.isWebGL2||J.has("OES_texture_float")||J.has("WEBGL_color_buffer_float"))||c))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ve.readPixels(t,n,r,i,pe.convert(s),pe.convert(l),a)}finally{const e=null!==M?Y.get(M).__webglFramebuffer:null;K.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),a=Math.floor(t.image.height*r);Q.setTexture2D(t,0),ve.copyTexSubImage2D(3553,n,0,0,e.x,e.y,i,a),K.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,a=t.image.height,o=pe.convert(n.format),s=pe.convert(n.type);Q.setTexture2D(n,0),ve.pixelStorei(37440,n.flipY),ve.pixelStorei(37441,n.premultiplyAlpha),ve.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ve.texSubImage2D(3553,r,e.x,e.y,i,a,o,s,t.image.data):t.isCompressedTexture?ve.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,o,t.mipmaps[0].data):ve.texSubImage2D(3553,r,e.x,e.y,o,s,t.image),0===r&&n.generateMipmaps&&ve.generateMipmap(3553),K.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(b.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const a=e.max.x-e.min.x+1,o=e.max.y-e.min.y+1,s=e.max.z-e.min.z+1,l=pe.convert(r.format),c=pe.convert(r.type);let u;if(r.isData3DTexture)Q.setTexture3D(r,0),u=32879;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Q.setTexture2DArray(r,0),u=35866}ve.pixelStorei(37440,r.flipY),ve.pixelStorei(37441,r.premultiplyAlpha),ve.pixelStorei(3317,r.unpackAlignment);const d=ve.getParameter(3314),h=ve.getParameter(32878),f=ve.getParameter(3316),p=ve.getParameter(3315),m=ve.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ve.pixelStorei(3314,g.width),ve.pixelStorei(32878,g.height),ve.pixelStorei(3316,e.min.x),ve.pixelStorei(3315,e.min.y),ve.pixelStorei(32877,e.min.z),n.isDataTexture||n.isData3DTexture?ve.texSubImage3D(u,i,t.x,t.y,t.z,a,o,s,l,c,g.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ve.compressedTexSubImage3D(u,i,t.x,t.y,t.z,a,o,s,l,g.data)):ve.texSubImage3D(u,i,t.x,t.y,t.z,a,o,s,l,c,g),ve.pixelStorei(3314,d),ve.pixelStorei(32878,h),ve.pixelStorei(3316,f),ve.pixelStorei(3315,p),ve.pixelStorei(32877,m),0===i&&r.generateMipmaps&&ve.generateMipmap(u),K.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?Q.setTextureCube(e,0):e.isData3DTexture?Q.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?Q.setTexture2DArray(e,0):Q.setTexture2D(e,0),K.unbindTexture()},this.resetState=function(){x=0,w=0,M=null,K.reset(),me.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}class rl extends nl{}rl.prototype.isWebGL1Renderer=!0;class il{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Xn(e),this.density=t}clone(){return new il(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class al{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new Xn(e),this.near=t,this.far=n}clone(){return new al(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class ol extends ci{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class sl{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=nn,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=_n()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=_n()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=_n()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const ll=new lr;class cl{constructor(e,t,n,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)ll.fromBufferAttribute(this,t),ll.applyMatrix4(e),this.setXYZ(t,ll.x,ll.y,ll.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)ll.fromBufferAttribute(this,t),ll.applyNormalMatrix(e),this.setXYZ(t,ll.x,ll.y,ll.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)ll.fromBufferAttribute(this,t),ll.transformDirection(e),this.setXYZ(t,ll.x,ll.y,ll.z);return this}setX(e,t){return this.normalized&&(t=Tn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=Cn(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Cn(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Cn(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Cn(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array),r=Tn(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array),r=Tn(r,this.array),i=Tn(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new Ei(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new cl(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class ul extends wi{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Xn(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let dl;const hl=new lr,fl=new lr,pl=new lr,ml=new Bn,gl=new Bn,vl=new Nr,yl=new lr,bl=new lr,_l=new lr,xl=new Bn,wl=new Bn,Ml=new Bn;class Sl extends ci{constructor(e){if(super(),this.isSprite=!0,this.type="Sprite",void 0===dl){dl=new ji;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new sl(e,5);dl.setIndex([0,1,2,0,2,3]),dl.setAttribute("position",new cl(t,3,0,!1)),dl.setAttribute("uv",new cl(t,2,3,!1))}this.geometry=dl,this.material=void 0!==e?e:new ul,this.center=new Bn(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),fl.setFromMatrixScale(this.matrixWorld),vl.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),pl.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&fl.multiplyScalar(-pl.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const a=this.center;Al(yl.set(-.5,-.5,0),pl,a,fl,r,i),Al(bl.set(.5,-.5,0),pl,a,fl,r,i),Al(_l.set(.5,.5,0),pl,a,fl,r,i),xl.set(0,0),wl.set(1,0),Ml.set(1,1);let o=e.ray.intersectTriangle(yl,bl,_l,!1,hl);if(null===o&&(Al(bl.set(-.5,.5,0),pl,a,fl,r,i),wl.set(0,1),o=e.ray.intersectTriangle(yl,_l,bl,!1,hl),null===o))return;const s=e.ray.origin.distanceTo(hl);s<e.near||s>e.far||t.push({distance:s,point:hl.clone(),uv:_i.getUV(hl,yl,bl,_l,xl,wl,Ml,new Bn),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Al(e,t,n,r,i,a){ml.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(gl.x=a*ml.x-i*ml.y,gl.y=i*ml.x+a*ml.y):gl.copy(ml),e.copy(t),e.x+=gl.x,e.y+=gl.y,e.applyMatrix4(vl)}const El=new lr,Cl=new lr;class Tl extends ci{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let e=0,n=t.length;e<n;e++){const n=t[e];this.addLevel(n.object.clone(),n.distance,n.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const r=this.levels;let i;for(i=0;i<r.length&&!(t<r[i].distance);i++);return r.splice(i,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,r;for(n=1,r=t.length;n<r;n++){let r=t[n].distance;if(t[n].object.visible&&(r-=r*t[n].hysteresis),e<r)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){El.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(El);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){El.setFromMatrixPosition(e.matrixWorld),Cl.setFromMatrixPosition(this.matrixWorld);const n=El.distanceTo(Cl)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r<i;r++){let e=t[r].distance;if(t[r].object.visible&&(e-=e*t[r].hysteresis),!(n>=e))break;t[r-1].object.visible=!1,t[r].object.visible=!0}for(this._currentLevel=r-1;r<i;r++)t[r].object.visible=!1}}toJSON(e){const t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let e=0,r=n.length;e<r;e++){const r=n[e];t.object.levels.push({object:r.object.uuid,distance:r.distance,hysteresis:r.hysteresis})}return t}}const Rl=new lr,Bl=new er,Pl=new er,kl=new lr,Il=new Nr;class Ll extends ia{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Nr,this.bindMatrixInverse=new Nr}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new er,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,r=this.geometry;Bl.fromBufferAttribute(r.attributes.skinIndex,e),Pl.fromBufferAttribute(r.attributes.skinWeight,e),Rl.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){const r=Pl.getComponent(e);if(0!==r){const i=Bl.getComponent(e);Il.multiplyMatrices(n.bones[i].matrixWorld,n.boneInverses[i]),t.addScaledVector(kl.copy(Rl).applyMatrix4(Il),r)}}return t.applyMatrix4(this.bindMatrixInverse)}}class Dl extends ci{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Ol extends Zn{constructor(e=null,t=1,n=1,r,i,a,o,s,l=he,c=he,u,d){super(null,a,o,s,l,c,r,i,u,d),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Fl=new Nr,Nl=new Nr;class zl{constructor(e=[],t=[]){this.uuid=_n(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new Nr)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new Nr;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let r=0,i=e.length;r<i;r++){const i=e[r]?e[r].matrixWorld:Nl;Fl.multiplyMatrices(i,t[r]),Fl.toArray(n,16*r)}null!==r&&(r.needsUpdate=!0)}clone(){return new zl(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=An(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new Ol(t,e,e,De,Te);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const r=e.bones[n];let i=t[r];void 0===i&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),i=new Dl),this.bones.push(i),this.boneInverses.push((new Nr).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let r=0,i=t.length;r<i;r++){const i=t[r];e.bones.push(i.uuid);const a=n[r];e.boneInverses.push(a.toArray())}return e}}class Ul extends Ei{constructor(e,t,n,r=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const Hl=new Nr,Gl=new Nr,Vl=[],jl=new Nr,Wl=new ia;class Jl extends ia{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new Ul(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1;for(let e=0;e<n;e++)this.setMatrixAt(e,jl)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(Wl.geometry=this.geometry,Wl.material=this.material,void 0!==Wl.material)for(let i=0;i<r;i++){this.getMatrixAt(i,Hl),Gl.multiplyMatrices(n,Hl),Wl.matrixWorld=Gl,Wl.raycast(e,Vl);for(let e=0,n=Vl.length;e<n;e++){const n=Vl[e];n.instanceId=i,n.object=this,t.push(n)}Vl.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new Ul(new Float32Array(3*this.instanceMatrix.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}class Xl extends wi{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Xn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const Kl=new lr,$l=new lr,Yl=new Nr,ql=new Fr,Ql=new Rr;class Zl extends ci{constructor(e=new ji,t=new Xl){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Kl.fromBufferAttribute(t,e-1),$l.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Kl.distanceTo($l);e.setAttribute("lineDistance",new Di(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Ql.copy(n.boundingSphere),Ql.applyMatrix4(r),Ql.radius+=i,!1===e.ray.intersectsSphere(Ql))return;Yl.copy(r).invert(),ql.copy(e.ray).applyMatrix4(Yl);const o=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=o*o,l=new lr,c=new lr,u=new lr,d=new lr,h=this.isLineSegments?2:1,f=n.index,p=n.attributes.position;if(null!==f)for(let n=Math.max(0,a.start),r=Math.min(f.count,a.start+a.count)-1;n<r;n+=h){const r=f.getX(n),i=f.getX(n+1);if(l.fromBufferAttribute(p,r),c.fromBufferAttribute(p,i),ql.distanceSqToSegment(l,c,d,u)>s)continue;d.applyMatrix4(this.matrixWorld);const a=e.ray.origin.distanceTo(d);a<e.near||a>e.far||t.push({distance:a,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}else for(let n=Math.max(0,a.start),r=Math.min(p.count,a.start+a.count)-1;n<r;n+=h){if(l.fromBufferAttribute(p,n),c.fromBufferAttribute(p,n+1),ql.distanceSqToSegment(l,c,d,u)>s)continue;d.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(d);r<e.near||r>e.far||t.push({distance:r,point:u.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}const ec=new lr,tc=new lr;class nc extends Zl{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)ec.fromBufferAttribute(t,e),tc.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+ec.distanceTo(tc);e.setAttribute("lineDistance",new Di(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class rc extends Zl{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class ic extends wi{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Xn(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const ac=new Nr,oc=new Fr,sc=new Rr,lc=new lr;class cc extends ci{constructor(e=new ji,t=new ic){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),sc.copy(n.boundingSphere),sc.applyMatrix4(r),sc.radius+=i,!1===e.ray.intersectsSphere(sc))return;ac.copy(r).invert(),oc.copy(e.ray).applyMatrix4(ac);const o=i/((this.scale.x+this.scale.y+this.scale.z)/3),s=o*o,l=n.index,c=n.attributes.position;if(null!==l)for(let n=Math.max(0,a.start),i=Math.min(l.count,a.start+a.count);n<i;n++){const i=l.getX(n);lc.fromBufferAttribute(c,i),uc(lc,i,s,r,e,t,this)}else for(let n=Math.max(0,a.start),i=Math.min(c.count,a.start+a.count);n<i;n++)lc.fromBufferAttribute(c,n),uc(lc,n,s,r,e,t,this)}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function uc(e,t,n,r,i,a,o){const s=oc.distanceSqToPoint(e);if(s<n){const n=new lr;oc.closestPointToPoint(e,n),n.applyMatrix4(r);const l=i.ray.origin.distanceTo(n);if(l<i.near||l>i.far)return;a.push({distance:l,distanceToRay:Math.sqrt(s),point:n,index:t,face:null,object:o})}}class dc extends Zn{constructor(e,t,n,r,i,a,o,s,l){super(e,t,n,r,i,a,o,s,l),this.isVideoTexture=!0,this.minFilter=void 0!==a?a:ve,this.magFilter=void 0!==i?i:ve,this.generateMipmaps=!1;const c=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){c.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class hc extends Zn{constructor(e,t,n){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=n,this.magFilter=he,this.minFilter=he,this.generateMipmaps=!1,this.needsUpdate=!0}}class fc extends Zn{constructor(e,t,n,r,i,a,o,s,l,c,u,d){super(null,a,o,s,l,c,r,i,u,d),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class pc extends fc{constructor(e,t,n,r,i,a){super(e,t,n,i,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=ue}}class mc extends Zn{constructor(e,t,n,r,i,a,o,s,l){super(e,t,n,r,i,a,o,s,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class gc{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let a=1;a<=e;a++)n=this.getPoint(a/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let a;a=t||e*n[i-1];let o,s=0,l=i-1;for(;s<=l;)if(r=Math.floor(s+(l-s)/2),o=n[r]-a,o<0)s=r+1;else{if(!(o>0)){l=r;break}l=r-1}if(r=l,n[r]===a)return r/(i-1);const c=n[r];return(r+(a-c)/(n[r+1]-c))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const a=this.getPoint(r),o=this.getPoint(i),s=t||(a.isVector2?new Bn:new lr);return s.copy(o).sub(a).normalize(),s}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new lr,r=[],i=[],a=[],o=new lr,s=new Nr;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new lr)}i[0]=new lr,a[0]=new lr;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),u=Math.abs(r[0].y),d=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),d<=l&&n.set(0,0,1),o.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],o),a[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),o.crossVectors(r[t-1],r[t]),o.length()>Number.EPSILON){o.normalize();const e=Math.acos(xn(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(s.makeRotationAxis(o,e))}a[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(xn(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(o.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(s.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class vc extends gc{constructor(e=0,t=0,n=1,r=1,i=0,a=2*Math.PI,o=!1,s=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=o,this.aRotation=s}getPoint(e,t){const n=t||new Bn,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const a=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=a?0:r),!0!==this.aClockwise||a||(i===r?i=-r:i-=r);const o=this.aStartAngle+e*i;let s=this.aX+this.xRadius*Math.cos(o),l=this.aY+this.yRadius*Math.sin(o);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=s-this.aX,r=l-this.aY;s=n*e-r*t+this.aX,l=n*t+r*e+this.aY}return n.set(s,l)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class yc extends vc{constructor(e,t,n,r,i,a){super(e,t,n,n,r,i,a),this.isArcCurve=!0,this.type="ArcCurve"}}function bc(){let e=0,t=0,n=0,r=0;function i(i,a,o,s){e=i,t=o,n=-3*i+3*a-2*o-s,r=2*i-2*a+o+s}return{initCatmullRom:function(e,t,n,r,a){i(t,n,a*(n-e),a*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,a,o,s){let l=(t-e)/a-(n-e)/(a+o)+(n-t)/o,c=(n-t)/o-(r-t)/(o+s)+(r-n)/s;l*=o,c*=o,i(t,n,l,c)},calc:function(i){const a=i*i;return e+t*i+n*a+r*(a*i)}}}const _c=new lr,xc=new bc,wc=new bc,Mc=new bc;class Sc extends gc{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new lr){const n=t,r=this.points,i=r.length,a=(i-(this.closed?0:1))*e;let o,s,l=Math.floor(a),c=a-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===c&&l===i-1&&(l=i-2,c=1),this.closed||l>0?o=r[(l-1)%i]:(_c.subVectors(r[0],r[1]).add(r[0]),o=_c);const u=r[l%i],d=r[(l+1)%i];if(this.closed||l+2<i?s=r[(l+2)%i]:(_c.subVectors(r[i-1],r[i-2]).add(r[i-1]),s=_c),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(o.distanceToSquared(u),e),n=Math.pow(u.distanceToSquared(d),e),r=Math.pow(d.distanceToSquared(s),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),xc.initNonuniformCatmullRom(o.x,u.x,d.x,s.x,t,n,r),wc.initNonuniformCatmullRom(o.y,u.y,d.y,s.y,t,n,r),Mc.initNonuniformCatmullRom(o.z,u.z,d.z,s.z,t,n,r)}else"catmullrom"===this.curveType&&(xc.initCatmullRom(o.x,u.x,d.x,s.x,this.tension),wc.initCatmullRom(o.y,u.y,d.y,s.y,this.tension),Mc.initCatmullRom(o.z,u.z,d.z,s.z,this.tension));return n.set(xc.calc(c),wc.calc(c),Mc.calc(c)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new lr).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function Ac(e,t,n,r,i){const a=.5*(r-t),o=.5*(i-n),s=e*e;return(2*n-2*r+a+o)*(e*s)+(-3*n+3*r-2*a-o)*s+a*e+n}function Ec(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function Cc(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}class Tc extends gc{constructor(e=new Bn,t=new Bn,n=new Bn,r=new Bn){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Bn){const n=t,r=this.v0,i=this.v1,a=this.v2,o=this.v3;return n.set(Cc(e,r.x,i.x,a.x,o.x),Cc(e,r.y,i.y,a.y,o.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Rc extends gc{constructor(e=new lr,t=new lr,n=new lr,r=new lr){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new lr){const n=t,r=this.v0,i=this.v1,a=this.v2,o=this.v3;return n.set(Cc(e,r.x,i.x,a.x,o.x),Cc(e,r.y,i.y,a.y,o.y),Cc(e,r.z,i.z,a.z,o.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Bc extends gc{constructor(e=new Bn,t=new Bn){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Bn){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new Bn;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Pc extends gc{constructor(e=new lr,t=new lr){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new lr){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class kc extends gc{constructor(e=new Bn,t=new Bn,n=new Bn){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Bn){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(Ec(e,r.x,i.x,a.x),Ec(e,r.y,i.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Ic extends gc{constructor(e=new lr,t=new lr,n=new lr){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new lr){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(Ec(e,r.x,i.x,a.x),Ec(e,r.y,i.y,a.y),Ec(e,r.z,i.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Lc extends gc{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Bn){const n=t,r=this.points,i=(r.length-1)*e,a=Math.floor(i),o=i-a,s=r[0===a?a:a-1],l=r[a],c=r[a>r.length-2?r.length-1:a+1],u=r[a>r.length-3?r.length-1:a+2];return n.set(Ac(o,s.x,l.x,c.x,u.x),Ac(o,s.y,l.y,c.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new Bn).fromArray(n))}return this}}var Dc=Object.freeze({__proto__:null,ArcCurve:yc,CatmullRomCurve3:Sc,CubicBezierCurve:Tc,CubicBezierCurve3:Rc,EllipseCurve:vc,LineCurve:Bc,LineCurve3:Pc,QuadraticBezierCurve:kc,QuadraticBezierCurve3:Ic,SplineCurve:Lc});class Oc extends gc{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Bc(t,e))}getPoint(e,t){const n=e*this.getLength(),r=this.getCurveLengths();let i=0;for(;i<r.length;){if(r[i]>=n){const e=r[i]-n,a=this.curves[i],o=a.getLength(),s=0===o?0:1-e/o;return a.getPointAt(s,t)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const a=i[r],o=a.isEllipseCurve?2*e:a.isLineCurve||a.isLineCurve3?1:a.isSplineCurve?e*a.points.length:e,s=a.getPoints(o);for(let e=0;e<s.length;e++){const r=s[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new Dc[n.type]).fromJSON(n))}return this}}class Fc extends Oc{constructor(e){super(),this.type="Path",this.currentPoint=new Bn,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Bc(this.currentPoint.clone(),new Bn(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new kc(this.currentPoint.clone(),new Bn(e,t),new Bn(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,a){const o=new Tc(this.currentPoint.clone(),new Bn(e,t),new Bn(n,r),new Bn(i,a));return this.curves.push(o),this.currentPoint.set(i,a),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Lc(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,a){const o=this.currentPoint.x,s=this.currentPoint.y;return this.absarc(e+o,t+s,n,r,i,a),this}absarc(e,t,n,r,i,a){return this.absellipse(e,t,n,n,r,i,a),this}ellipse(e,t,n,r,i,a,o,s){const l=this.currentPoint.x,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,a,o,s),this}absellipse(e,t,n,r,i,a,o,s){const l=new vc(e,t,n,r,i,a,o,s);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const c=l.getPoint(1);return this.currentPoint.copy(c),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Nc extends ji{constructor(e=[new Bn(0,-.5),new Bn(.5,0),new Bn(0,.5)],t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=xn(r,0,2*Math.PI);const i=[],a=[],o=[],s=[],l=[],c=1/t,u=new lr,d=new Bn,h=new lr,f=new lr,p=new lr;let m=0,g=0;for(let t=0;t<=e.length-1;t++)switch(t){case 0:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,h.x=1*g,h.y=-m,h.z=0*g,p.copy(h),h.normalize(),s.push(h.x,h.y,h.z);break;case e.length-1:s.push(p.x,p.y,p.z);break;default:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,h.x=1*g,h.y=-m,h.z=0*g,f.copy(h),h.x+=p.x,h.y+=p.y,h.z+=p.z,h.normalize(),s.push(h.x,h.y,h.z),p.copy(f)}for(let i=0;i<=t;i++){const h=n+i*c*r,f=Math.sin(h),p=Math.cos(h);for(let n=0;n<=e.length-1;n++){u.x=e[n].x*f,u.y=e[n].y,u.z=e[n].x*p,a.push(u.x,u.y,u.z),d.x=i/t,d.y=n/(e.length-1),o.push(d.x,d.y);const r=s[3*n+0]*f,c=s[3*n+1],h=s[3*n+0]*p;l.push(r,c,h)}}for(let n=0;n<t;n++)for(let t=0;t<e.length-1;t++){const r=t+n*e.length,a=r,o=r+e.length,s=r+e.length+1,l=r+1;i.push(a,o,l),i.push(s,l,o)}this.setIndex(i),this.setAttribute("position",new Di(a,3)),this.setAttribute("uv",new Di(o,2)),this.setAttribute("normal",new Di(l,3))}static fromJSON(e){return new Nc(e.points,e.segments,e.phiStart,e.phiLength)}}class zc extends Nc{constructor(e=1,t=1,n=4,r=8){const i=new Fc;i.absarc(0,-t/2,e,1.5*Math.PI,0),i.absarc(0,t/2,e,0,.5*Math.PI),super(i.getPoints(n),r),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:r}}static fromJSON(e){return new zc(e.radius,e.length,e.capSegments,e.radialSegments)}}class Uc extends ji{constructor(e=1,t=32,n=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const i=[],a=[],o=[],s=[],l=new lr,c=new Bn;a.push(0,0,0),o.push(0,0,1),s.push(.5,.5);for(let i=0,u=3;i<=t;i++,u+=3){const d=n+i/t*r;l.x=e*Math.cos(d),l.y=e*Math.sin(d),a.push(l.x,l.y,l.z),o.push(0,0,1),c.x=(a[u]/e+1)/2,c.y=(a[u+1]/e+1)/2,s.push(c.x,c.y)}for(let e=1;e<=t;e++)i.push(e,e+1,0);this.setIndex(i),this.setAttribute("position",new Di(a,3)),this.setAttribute("normal",new Di(o,3)),this.setAttribute("uv",new Di(s,2))}static fromJSON(e){return new Uc(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Hc extends ji{constructor(e=1,t=1,n=1,r=32,i=1,a=!1,o=0,s=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:a,thetaStart:o,thetaLength:s};const l=this;r=Math.floor(r),i=Math.floor(i);const c=[],u=[],d=[],h=[];let f=0;const p=[],m=n/2;let g=0;function v(n){const i=f,a=new Bn,p=new lr;let v=0;const y=!0===n?e:t,b=!0===n?1:-1;for(let e=1;e<=r;e++)u.push(0,m*b,0),d.push(0,b,0),h.push(.5,.5),f++;const _=f;for(let e=0;e<=r;e++){const t=e/r*s+o,n=Math.cos(t),i=Math.sin(t);p.x=y*i,p.y=m*b,p.z=y*n,u.push(p.x,p.y,p.z),d.push(0,b,0),a.x=.5*n+.5,a.y=.5*i*b+.5,h.push(a.x,a.y),f++}for(let e=0;e<r;e++){const t=i+e,r=_+e;!0===n?c.push(r,r+1,t):c.push(r+1,r,t),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}!function(){const a=new lr,v=new lr;let y=0;const b=(t-e)/n;for(let l=0;l<=i;l++){const c=[],g=l/i,y=g*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*s+o,l=Math.sin(i),p=Math.cos(i);v.x=y*l,v.y=-g*n+m,v.z=y*p,u.push(v.x,v.y,v.z),a.set(l,b,p).normalize(),d.push(a.x,a.y,a.z),h.push(t,1-g),c.push(f++)}p.push(c)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=p[t][e],r=p[t+1][e],i=p[t+1][e+1],a=p[t][e+1];c.push(n,r,a),c.push(r,i,a),y+=6}l.addGroup(g,y,0),g+=y}(),!1===a&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(c),this.setAttribute("position",new Di(u,3)),this.setAttribute("normal",new Di(d,3)),this.setAttribute("uv",new Di(h,2))}static fromJSON(e){return new Hc(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Gc extends Hc{constructor(e=1,t=1,n=32,r=1,i=!1,a=0,o=2*Math.PI){super(0,e,t,n,r,i,a,o),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:o}}static fromJSON(e){return new Gc(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Vc extends ji{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],a=[];function o(e,t,n,r){const i=r+1,a=[];for(let r=0;r<=i;r++){a[r]=[];const o=e.clone().lerp(n,r/i),s=t.clone().lerp(n,r/i),l=i-r;for(let e=0;e<=l;e++)a[r][e]=0===e&&r===i?o:o.clone().lerp(s,e/l)}for(let e=0;e<i;e++)for(let t=0;t<2*(i-e)-1;t++){const n=Math.floor(t/2);t%2==0?(s(a[e][n+1]),s(a[e+1][n]),s(a[e][n])):(s(a[e][n+1]),s(a[e+1][n+1]),s(a[e+1][n]))}}function s(e){i.push(e.x,e.y,e.z)}function l(t,n){const r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function c(e,t,n,r){r<0&&1===e.x&&(a[t]=e.x-1),0===n.x&&0===n.z&&(a[t]=r/2/Math.PI+.5)}function u(e){return Math.atan2(e.z,-e.x)}!function(e){const n=new lr,r=new lr,i=new lr;for(let a=0;a<t.length;a+=3)l(t[a+0],n),l(t[a+1],r),l(t[a+2],i),o(n,r,i,e)}(r),function(e){const t=new lr;for(let n=0;n<i.length;n+=3)t.x=i[n+0],t.y=i[n+1],t.z=i[n+2],t.normalize().multiplyScalar(e),i[n+0]=t.x,i[n+1]=t.y,i[n+2]=t.z}(n),function(){const e=new lr;for(let n=0;n<i.length;n+=3){e.x=i[n+0],e.y=i[n+1],e.z=i[n+2];const r=u(e)/2/Math.PI+.5,o=(t=e,Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5);a.push(r,1-o)}var t;(function(){const e=new lr,t=new lr,n=new lr,r=new lr,o=new Bn,s=new Bn,l=new Bn;for(let d=0,h=0;d<i.length;d+=9,h+=6){e.set(i[d+0],i[d+1],i[d+2]),t.set(i[d+3],i[d+4],i[d+5]),n.set(i[d+6],i[d+7],i[d+8]),o.set(a[h+0],a[h+1]),s.set(a[h+2],a[h+3]),l.set(a[h+4],a[h+5]),r.copy(e).add(t).add(n).divideScalar(3);const f=u(r);c(o,h+0,e,f),c(s,h+2,t,f),c(l,h+4,n,f)}})(),function(){for(let e=0;e<a.length;e+=6){const t=a[e+0],n=a[e+2],r=a[e+4],i=Math.max(t,n,r),o=Math.min(t,n,r);i>.9&&o<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new Di(i,3)),this.setAttribute("normal",new Di(i.slice(),3)),this.setAttribute("uv",new Di(a,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(e){return new Vc(e.vertices,e.indices,e.radius,e.details)}}class jc extends Vc{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new jc(e.radius,e.detail)}}const Wc=new lr,Jc=new lr,Xc=new lr,Kc=new _i;class $c extends ji{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,r=Math.pow(10,n),i=Math.cos(yn*t),a=e.getIndex(),o=e.getAttribute("position"),s=a?a.count:o.count,l=[0,0,0],c=["a","b","c"],u=new Array(3),d={},h=[];for(let e=0;e<s;e+=3){a?(l[0]=a.getX(e),l[1]=a.getX(e+1),l[2]=a.getX(e+2)):(l[0]=e,l[1]=e+1,l[2]=e+2);const{a:t,b:n,c:s}=Kc;if(t.fromBufferAttribute(o,l[0]),n.fromBufferAttribute(o,l[1]),s.fromBufferAttribute(o,l[2]),Kc.getNormal(Xc),u[0]=`${Math.round(t.x*r)},${Math.round(t.y*r)},${Math.round(t.z*r)}`,u[1]=`${Math.round(n.x*r)},${Math.round(n.y*r)},${Math.round(n.z*r)}`,u[2]=`${Math.round(s.x*r)},${Math.round(s.y*r)},${Math.round(s.z*r)}`,u[0]!==u[1]&&u[1]!==u[2]&&u[2]!==u[0])for(let e=0;e<3;e++){const t=(e+1)%3,n=u[e],r=u[t],a=Kc[c[e]],o=Kc[c[t]],s=`${n}_${r}`,f=`${r}_${n}`;f in d&&d[f]?(Xc.dot(d[f].normal)<=i&&(h.push(a.x,a.y,a.z),h.push(o.x,o.y,o.z)),d[f]=null):s in d||(d[s]={index0:l[e],index1:l[t],normal:Xc.clone()})}}for(const e in d)if(d[e]){const{index0:t,index1:n}=d[e];Wc.fromBufferAttribute(o,t),Jc.fromBufferAttribute(o,n),h.push(Wc.x,Wc.y,Wc.z),h.push(Jc.x,Jc.y,Jc.z)}this.setAttribute("position",new Di(h,3))}}}class Yc extends Fc{constructor(e){super(e),this.uuid=_n(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new Fc).fromJSON(n))}return this}}function qc(e,t,n,r,i){let a,o;if(i===function(e,t,n,r){let i=0;for(let a=t,o=n-r;a<n;a+=r)i+=(e[o]-e[a])*(e[a+1]+e[o+1]),o=a;return i}(e,t,n,r)>0)for(a=t;a<n;a+=r)o=yu(a,e[a],e[a+1],o);else for(a=n-r;a>=t;a-=r)o=yu(a,e[a],e[a+1],o);return o&&hu(o,o.next)&&(bu(o),o=o.next),o}function Qc(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!hu(r,r.next)&&0!==du(r.prev,r,r.next))r=r.next;else{if(bu(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function Zc(e,t,n,r,i,a,o){if(!e)return;!o&&a&&function(e,t,n,r){let i=e;do{0===i.z&&(i.z=su(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,a,o,s,l,c=1;do{for(n=e,e=null,a=null,o=0;n;){for(o++,r=n,s=0,t=0;t<c&&(s++,r=r.nextZ,r);t++);for(l=c;s>0||l>0&&r;)0!==s&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,s--):(i=r,r=r.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,c*=2}while(o>1)}(i)}(e,r,i,a);let s,l,c=e;for(;e.prev!==e.next;)if(s=e.prev,l=e.next,a?tu(e,r,i,a):eu(e))t.push(s.i/n|0),t.push(e.i/n|0),t.push(l.i/n|0),bu(e),e=l.next,c=l.next;else if((e=l)===c){o?1===o?Zc(e=nu(Qc(e),t,n),t,n,r,i,a,2):2===o&&ru(e,t,n,r,i,a):Zc(Qc(e),t,n,r,i,a,1);break}}function eu(e){const t=e.prev,n=e,r=e.next;if(du(t,n,r)>=0)return!1;const i=t.x,a=n.x,o=r.x,s=t.y,l=n.y,c=r.y,u=i<a?i<o?i:o:a<o?a:o,d=s<l?s<c?s:c:l<c?l:c,h=i>a?i>o?i:o:a>o?a:o,f=s>l?s>c?s:c:l>c?l:c;let p=r.next;for(;p!==t;){if(p.x>=u&&p.x<=h&&p.y>=d&&p.y<=f&&cu(i,s,a,l,o,c,p.x,p.y)&&du(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function tu(e,t,n,r){const i=e.prev,a=e,o=e.next;if(du(i,a,o)>=0)return!1;const s=i.x,l=a.x,c=o.x,u=i.y,d=a.y,h=o.y,f=s<l?s<c?s:c:l<c?l:c,p=u<d?u<h?u:h:d<h?d:h,m=s>l?s>c?s:c:l>c?l:c,g=u>d?u>h?u:h:d>h?d:h,v=su(f,p,t,n,r),y=su(m,g,t,n,r);let b=e.prevZ,_=e.nextZ;for(;b&&b.z>=v&&_&&_.z<=y;){if(b.x>=f&&b.x<=m&&b.y>=p&&b.y<=g&&b!==i&&b!==o&&cu(s,u,l,d,c,h,b.x,b.y)&&du(b.prev,b,b.next)>=0)return!1;if(b=b.prevZ,_.x>=f&&_.x<=m&&_.y>=p&&_.y<=g&&_!==i&&_!==o&&cu(s,u,l,d,c,h,_.x,_.y)&&du(_.prev,_,_.next)>=0)return!1;_=_.nextZ}for(;b&&b.z>=v;){if(b.x>=f&&b.x<=m&&b.y>=p&&b.y<=g&&b!==i&&b!==o&&cu(s,u,l,d,c,h,b.x,b.y)&&du(b.prev,b,b.next)>=0)return!1;b=b.prevZ}for(;_&&_.z<=y;){if(_.x>=f&&_.x<=m&&_.y>=p&&_.y<=g&&_!==i&&_!==o&&cu(s,u,l,d,c,h,_.x,_.y)&&du(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function nu(e,t,n){let r=e;do{const i=r.prev,a=r.next.next;!hu(i,a)&&fu(i,r,r.next,a)&&gu(i,a)&&gu(a,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(a.i/n|0),bu(r),bu(r.next),r=e=a),r=r.next}while(r!==e);return Qc(r)}function ru(e,t,n,r,i,a){let o=e;do{let e=o.next.next;for(;e!==o.prev;){if(o.i!==e.i&&uu(o,e)){let s=vu(o,e);return o=Qc(o,o.next),s=Qc(s,s.next),Zc(o,t,n,r,i,a,0),void Zc(s,t,n,r,i,a,0)}e=e.next}o=o.next}while(o!==e)}function iu(e,t){return e.x-t.x}function au(e,t){const n=function(e,t){let n,r=t,i=-1/0;const a=e.x,o=e.y;do{if(o<=r.y&&o>=r.next.y&&r.next.y!==r.y){const e=r.x+(o-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=a&&e>i&&(i=e,n=r.x<r.next.x?r:r.next,e===a))return n}r=r.next}while(r!==t);if(!n)return null;const s=n,l=n.x,c=n.y;let u,d=1/0;r=n;do{a>=r.x&&r.x>=l&&a!==r.x&&cu(o<c?a:i,o,l,c,o<c?i:a,o,r.x,r.y)&&(u=Math.abs(o-r.y)/(a-r.x),gu(r,e)&&(u<d||u===d&&(r.x>n.x||r.x===n.x&&ou(n,r)))&&(n=r,d=u)),r=r.next}while(r!==s);return n}(e,t);if(!n)return t;const r=vu(n,e);return Qc(r,r.next),Qc(n,n.next)}function ou(e,t){return du(e.prev,e,t.prev)<0&&du(t.next,e,e.next)<0}function su(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function lu(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function cu(e,t,n,r,i,a,o,s){return(i-o)*(t-s)>=(e-o)*(a-s)&&(e-o)*(r-s)>=(n-o)*(t-s)&&(n-o)*(a-s)>=(i-o)*(r-s)}function uu(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&fu(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(gu(e,t)&&gu(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(du(e.prev,e,t.prev)||du(e,t.prev,t))||hu(e,t)&&du(e.prev,e,e.next)>0&&du(t.prev,t,t.next)>0)}function du(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function hu(e,t){return e.x===t.x&&e.y===t.y}function fu(e,t,n,r){const i=mu(du(e,t,n)),a=mu(du(e,t,r)),o=mu(du(n,r,e)),s=mu(du(n,r,t));return i!==a&&o!==s||!(0!==i||!pu(e,n,t))||!(0!==a||!pu(e,r,t))||!(0!==o||!pu(n,e,r))||!(0!==s||!pu(n,t,r))}function pu(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function mu(e){return e>0?1:e<0?-1:0}function gu(e,t){return du(e.prev,e,e.next)<0?du(e,t,e.next)>=0&&du(e,e.prev,t)>=0:du(e,t,e.prev)<0||du(e,e.next,t)<0}function vu(e,t){const n=new _u(e.i,e.x,e.y),r=new _u(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function yu(e,t,n,r){const i=new _u(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function bu(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function _u(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class xu{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return xu.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];wu(e),Mu(n,e);let a=e.length;t.forEach(wu);for(let e=0;e<t.length;e++)r.push(a),a+=t[e].length,Mu(n,t[e]);const o=function(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let a=qc(e,0,i,n,!0);const o=[];if(!a||a.next===a.prev)return o;let s,l,c,u,d,h,f;if(r&&(a=function(e,t,n,r){const i=[];let a,o,s,l,c;for(a=0,o=t.length;a<o;a++)s=t[a]*r,l=a<o-1?t[a+1]*r:e.length,c=qc(e,s,l,r,!1),c===c.next&&(c.steiner=!0),i.push(lu(c));for(i.sort(iu),a=0;a<i.length;a++)n=au(i[a],n);return n}(e,t,a,n)),e.length>80*n){s=c=e[0],l=u=e[1];for(let t=n;t<i;t+=n)d=e[t],h=e[t+1],d<s&&(s=d),h<l&&(l=h),d>c&&(c=d),h>u&&(u=h);f=Math.max(c-s,u-l),f=0!==f?32767/f:0}return Zc(a,o,n,s,l,f,0),o}(n,r);for(let e=0;e<o.length;e+=3)i.push(o.slice(e,e+3));return i}}function wu(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Mu(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class Su extends ji{constructor(e=new Yc([new Bn(.5,.5),new Bn(-.5,.5),new Bn(-.5,-.5),new Bn(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let t=0,n=e.length;t<n;t++)a(e[t]);function a(e){const a=[],o=void 0!==t.curveSegments?t.curveSegments:12,s=void 0!==t.steps?t.steps:1,l=void 0!==t.depth?t.depth:1;let c=void 0===t.bevelEnabled||t.bevelEnabled,u=void 0!==t.bevelThickness?t.bevelThickness:.2,d=void 0!==t.bevelSize?t.bevelSize:u-.1,h=void 0!==t.bevelOffset?t.bevelOffset:0,f=void 0!==t.bevelSegments?t.bevelSegments:3;const p=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:Au;let g,v,y,b,_,x=!1;p&&(g=p.getSpacedPoints(s),x=!0,c=!1,v=p.computeFrenetFrames(s,!1),y=new lr,b=new lr,_=new lr),c||(f=0,u=0,d=0,h=0);const w=e.extractPoints(o);let M=w.shape;const S=w.holes;if(!xu.isClockWise(M)){M=M.reverse();for(let e=0,t=S.length;e<t;e++){const t=S[e];xu.isClockWise(t)&&(S[e]=t.reverse())}}const A=xu.triangulateShape(M,S),E=M;for(let e=0,t=S.length;e<t;e++){const t=S[e];M=M.concat(t)}function C(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}const T=M.length,R=A.length;function B(e,t,n){let r,i,a;const o=e.x-t.x,s=e.y-t.y,l=n.x-e.x,c=n.y-e.y,u=o*o+s*s,d=o*c-s*l;if(Math.abs(d)>Number.EPSILON){const d=Math.sqrt(u),h=Math.sqrt(l*l+c*c),f=t.x-s/d,p=t.y+o/d,m=((n.x-c/h-f)*c-(n.y+l/h-p)*l)/(o*c-s*l);r=f+o*m-e.x,i=p+s*m-e.y;const g=r*r+i*i;if(g<=2)return new Bn(r,i);a=Math.sqrt(g/2)}else{let e=!1;o>Number.EPSILON?l>Number.EPSILON&&(e=!0):o<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(s)===Math.sign(c)&&(e=!0),e?(r=-s,i=o,a=Math.sqrt(u)):(r=o,i=s,a=Math.sqrt(u/2))}return new Bn(r/a,i/a)}const P=[];for(let e=0,t=E.length,n=t-1,r=e+1;e<t;e++,n++,r++)n===t&&(n=0),r===t&&(r=0),P[e]=B(E[e],E[n],E[r]);const k=[];let I,L=P.concat();for(let e=0,t=S.length;e<t;e++){const t=S[e];I=[];for(let e=0,n=t.length,r=n-1,i=e+1;e<n;e++,r++,i++)r===n&&(r=0),i===n&&(i=0),I[e]=B(t[e],t[r],t[i]);k.push(I),L=L.concat(I)}for(let e=0;e<f;e++){const t=e/f,n=u*Math.cos(t*Math.PI/2),r=d*Math.sin(t*Math.PI/2)+h;for(let e=0,t=E.length;e<t;e++){const t=C(E[e],P[e],r);F(t.x,t.y,-n)}for(let e=0,t=S.length;e<t;e++){const t=S[e];I=k[e];for(let e=0,i=t.length;e<i;e++){const i=C(t[e],I[e],r);F(i.x,i.y,-n)}}}const D=d+h;for(let e=0;e<T;e++){const t=c?C(M[e],L[e],D):M[e];x?(b.copy(v.normals[0]).multiplyScalar(t.x),y.copy(v.binormals[0]).multiplyScalar(t.y),_.copy(g[0]).add(b).add(y),F(_.x,_.y,_.z)):F(t.x,t.y,0)}for(let e=1;e<=s;e++)for(let t=0;t<T;t++){const n=c?C(M[t],L[t],D):M[t];x?(b.copy(v.normals[e]).multiplyScalar(n.x),y.copy(v.binormals[e]).multiplyScalar(n.y),_.copy(g[e]).add(b).add(y),F(_.x,_.y,_.z)):F(n.x,n.y,l/s*e)}for(let e=f-1;e>=0;e--){const t=e/f,n=u*Math.cos(t*Math.PI/2),r=d*Math.sin(t*Math.PI/2)+h;for(let e=0,t=E.length;e<t;e++){const t=C(E[e],P[e],r);F(t.x,t.y,l+n)}for(let e=0,t=S.length;e<t;e++){const t=S[e];I=k[e];for(let e=0,i=t.length;e<i;e++){const i=C(t[e],I[e],r);x?F(i.x,i.y+g[s-1].y,g[s-1].x+n):F(i.x,i.y,l+n)}}}function O(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=s+2*f;e<n;e++){const n=T*e,a=T*(e+1);z(t+r+n,t+i+n,t+i+a,t+r+a)}}}function F(e,t,n){a.push(e),a.push(t),a.push(n)}function N(e,t,i){U(e),U(t),U(i);const a=r.length/3,o=m.generateTopUV(n,r,a-3,a-2,a-1);H(o[0]),H(o[1]),H(o[2])}function z(e,t,i,a){U(e),U(t),U(a),U(t),U(i),U(a);const o=r.length/3,s=m.generateSideWallUV(n,r,o-6,o-3,o-2,o-1);H(s[0]),H(s[1]),H(s[3]),H(s[1]),H(s[2]),H(s[3])}function U(e){r.push(a[3*e+0]),r.push(a[3*e+1]),r.push(a[3*e+2])}function H(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(c){let e=0,t=T*e;for(let e=0;e<R;e++){const n=A[e];N(n[2]+t,n[1]+t,n[0]+t)}e=s+2*f,t=T*e;for(let e=0;e<R;e++){const n=A[e];N(n[0]+t,n[1]+t,n[2]+t)}}else{for(let e=0;e<R;e++){const t=A[e];N(t[2],t[1],t[0])}for(let e=0;e<R;e++){const t=A[e];N(t[0]+T*s,t[1]+T*s,t[2]+T*s)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;O(E,t),t+=E.length;for(let e=0,n=S.length;e<n;e++){const n=S[e];O(n,t),t+=n.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new Di(r,3)),this.setAttribute("uv",new Di(i,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let t=0,r=e.length;t<r;t++){const r=e[t];n.shapes.push(r.uuid)}else n.shapes.push(e.uuid);return n.options=Object.assign({},t),void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new Dc[r.type]).fromJSON(r)),new Su(n,e.options)}}const Au={generateTopUV:function(e,t,n,r,i){const a=t[3*n],o=t[3*n+1],s=t[3*r],l=t[3*r+1],c=t[3*i],u=t[3*i+1];return[new Bn(a,o),new Bn(s,l),new Bn(c,u)]},generateSideWallUV:function(e,t,n,r,i,a){const o=t[3*n],s=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],d=t[3*r+2],h=t[3*i],f=t[3*i+1],p=t[3*i+2],m=t[3*a],g=t[3*a+1],v=t[3*a+2];return Math.abs(s-u)<Math.abs(o-c)?[new Bn(o,1-l),new Bn(c,1-d),new Bn(h,1-p),new Bn(m,1-v)]:[new Bn(s,1-l),new Bn(u,1-d),new Bn(f,1-p),new Bn(g,1-v)]}};class Eu extends Vc{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Eu(e.radius,e.detail)}}class Cu extends Vc{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Cu(e.radius,e.detail)}}class Tu extends ji{constructor(e=.5,t=1,n=32,r=1,i=0,a=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:a},n=Math.max(3,n);const o=[],s=[],l=[],c=[];let u=e;const d=(t-e)/(r=Math.max(1,r)),h=new lr,f=new Bn;for(let e=0;e<=r;e++){for(let e=0;e<=n;e++){const r=i+e/n*a;h.x=u*Math.cos(r),h.y=u*Math.sin(r),s.push(h.x,h.y,h.z),l.push(0,0,1),f.x=(h.x/t+1)/2,f.y=(h.y/t+1)/2,c.push(f.x,f.y)}u+=d}for(let e=0;e<r;e++){const t=e*(n+1);for(let e=0;e<n;e++){const r=e+t,i=r,a=r+n+1,s=r+n+2,l=r+1;o.push(i,a,l),o.push(a,s,l)}}this.setIndex(o),this.setAttribute("position",new Di(s,3)),this.setAttribute("normal",new Di(l,3)),this.setAttribute("uv",new Di(c,2))}static fromJSON(e){return new Tu(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Ru extends ji{constructor(e=new Yc([new Bn(0,.5),new Bn(-.5,-.5),new Bn(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],a=[];let o=0,s=0;if(!1===Array.isArray(e))l(e);else for(let t=0;t<e.length;t++)l(e[t]),this.addGroup(o,s,t),o+=s,s=0;function l(e){const o=r.length/3,l=e.extractPoints(t);let c=l.shape;const u=l.holes;!1===xu.isClockWise(c)&&(c=c.reverse());for(let e=0,t=u.length;e<t;e++){const t=u[e];!0===xu.isClockWise(t)&&(u[e]=t.reverse())}const d=xu.triangulateShape(c,u);for(let e=0,t=u.length;e<t;e++){const t=u[e];c=c.concat(t)}for(let e=0,t=c.length;e<t;e++){const t=c[e];r.push(t.x,t.y,0),i.push(0,0,1),a.push(t.x,t.y)}for(let e=0,t=d.length;e<t;e++){const t=d[e],r=t[0]+o,i=t[1]+o,a=t[2]+o;n.push(r,i,a),s+=3}}this.setIndex(n),this.setAttribute("position",new Di(r,3)),this.setAttribute("normal",new Di(i,3)),this.setAttribute("uv",new Di(a,2))}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new Ru(n,e.curveSegments)}}class Bu extends ji{constructor(e=1,t=32,n=16,r=0,i=2*Math.PI,a=0,o=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:a,thetaLength:o},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const s=Math.min(a+o,Math.PI);let l=0;const c=[],u=new lr,d=new lr,h=[],f=[],p=[],m=[];for(let h=0;h<=n;h++){const g=[],v=h/n;let y=0;0==h&&0==a?y=.5/t:h==n&&s==Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const s=n/t;u.x=-e*Math.cos(r+s*i)*Math.sin(a+v*o),u.y=e*Math.cos(a+v*o),u.z=e*Math.sin(r+s*i)*Math.sin(a+v*o),f.push(u.x,u.y,u.z),d.copy(u).normalize(),p.push(d.x,d.y,d.z),m.push(s+y,1-v),g.push(l++)}c.push(g)}for(let e=0;e<n;e++)for(let r=0;r<t;r++){const t=c[e][r+1],i=c[e][r],o=c[e+1][r],l=c[e+1][r+1];(0!==e||a>0)&&h.push(t,i,l),(e!==n-1||s<Math.PI)&&h.push(i,o,l)}this.setIndex(h),this.setAttribute("position",new Di(f,3)),this.setAttribute("normal",new Di(p,3)),this.setAttribute("uv",new Di(m,2))}static fromJSON(e){return new Bu(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Pu extends Vc{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Pu(e.radius,e.detail)}}class ku extends ji{constructor(e=1,t=.4,n=12,r=48,i=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},n=Math.floor(n),r=Math.floor(r);const a=[],o=[],s=[],l=[],c=new lr,u=new lr,d=new lr;for(let a=0;a<=n;a++)for(let h=0;h<=r;h++){const f=h/r*i,p=a/n*Math.PI*2;u.x=(e+t*Math.cos(p))*Math.cos(f),u.y=(e+t*Math.cos(p))*Math.sin(f),u.z=t*Math.sin(p),o.push(u.x,u.y,u.z),c.x=e*Math.cos(f),c.y=e*Math.sin(f),d.subVectors(u,c).normalize(),s.push(d.x,d.y,d.z),l.push(h/r),l.push(a/n)}for(let e=1;e<=n;e++)for(let t=1;t<=r;t++){const n=(r+1)*e+t-1,i=(r+1)*(e-1)+t-1,o=(r+1)*(e-1)+t,s=(r+1)*e+t;a.push(n,i,s),a.push(i,o,s)}this.setIndex(a),this.setAttribute("position",new Di(o,3)),this.setAttribute("normal",new Di(s,3)),this.setAttribute("uv",new Di(l,2))}static fromJSON(e){return new ku(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Iu extends ji{constructor(e=1,t=.4,n=64,r=8,i=2,a=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:a},n=Math.floor(n),r=Math.floor(r);const o=[],s=[],l=[],c=[],u=new lr,d=new lr,h=new lr,f=new lr,p=new lr,m=new lr,g=new lr;for(let o=0;o<=n;++o){const y=o/n*i*Math.PI*2;v(y,i,a,e,h),v(y+.01,i,a,e,f),m.subVectors(f,h),g.addVectors(f,h),p.crossVectors(m,g),g.crossVectors(p,m),p.normalize(),g.normalize();for(let e=0;e<=r;++e){const i=e/r*Math.PI*2,a=-t*Math.cos(i),f=t*Math.sin(i);u.x=h.x+(a*g.x+f*p.x),u.y=h.y+(a*g.y+f*p.y),u.z=h.z+(a*g.z+f*p.z),s.push(u.x,u.y,u.z),d.subVectors(u,h).normalize(),l.push(d.x,d.y,d.z),c.push(o/n),c.push(e/r)}}for(let e=1;e<=n;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),a=(r+1)*e+t,s=(r+1)*(e-1)+t;o.push(n,i,s),o.push(i,a,s)}function v(e,t,n,r,i){const a=Math.cos(e),o=Math.sin(e),s=n/t*e,l=Math.cos(s);i.x=r*(2+l)*.5*a,i.y=r*(2+l)*o*.5,i.z=r*Math.sin(s)*.5}this.setIndex(o),this.setAttribute("position",new Di(s,3)),this.setAttribute("normal",new Di(l,3)),this.setAttribute("uv",new Di(c,2))}static fromJSON(e){return new Iu(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class Lu extends ji{constructor(e=new Ic(new lr(-1,-1,0),new lr(-1,1,0),new lr(1,1,0)),t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const a=e.computeFrenetFrames(t,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;const o=new lr,s=new lr,l=new Bn;let c=new lr;const u=[],d=[],h=[],f=[];function p(i){c=e.getPointAt(i/t,c);const l=a.normals[i],h=a.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),a=-Math.cos(t);s.x=a*l.x+i*h.x,s.y=a*l.y+i*h.y,s.z=a*l.z+i*h.z,s.normalize(),d.push(s.x,s.y,s.z),o.x=c.x+n*s.x,o.y=c.y+n*s.y,o.z=c.z+n*s.z,u.push(o.x,o.y,o.z)}}!function(){for(let e=0;e<t;e++)p(e);p(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)l.x=e/t,l.y=n/r,h.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),a=(r+1)*e+t,o=(r+1)*(e-1)+t;f.push(n,i,o),f.push(i,a,o)}}()}(),this.setIndex(f),this.setAttribute("position",new Di(u,3)),this.setAttribute("normal",new Di(d,3)),this.setAttribute("uv",new Di(h,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Lu((new Dc[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class Du extends ji{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],n=new Set,r=new lr,i=new lr;if(null!==e.index){const a=e.attributes.position,o=e.index;let s=e.groups;0===s.length&&(s=[{start:0,count:o.count,materialIndex:0}]);for(let e=0,l=s.length;e<l;++e){const l=s[e],c=l.start;for(let e=c,s=c+l.count;e<s;e+=3)for(let s=0;s<3;s++){const l=o.getX(e+s),c=o.getX(e+(s+1)%3);r.fromBufferAttribute(a,l),i.fromBufferAttribute(a,c),!0===Ou(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}}else{const a=e.attributes.position;for(let e=0,o=a.count/3;e<o;e++)for(let o=0;o<3;o++){const s=3*e+o,l=3*e+(o+1)%3;r.fromBufferAttribute(a,s),i.fromBufferAttribute(a,l),!0===Ou(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}this.setAttribute("position",new Di(t,3))}}}function Ou(e,t,n){const r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==n.has(r)&&!0!==n.has(i)&&(n.add(r),n.add(i),!0)}var Fu=Object.freeze({__proto__:null,BoxGeometry:oa,CapsuleGeometry:zc,CircleGeometry:Uc,ConeGeometry:Gc,CylinderGeometry:Hc,DodecahedronGeometry:jc,EdgesGeometry:$c,ExtrudeGeometry:Su,IcosahedronGeometry:Eu,LatheGeometry:Nc,OctahedronGeometry:Cu,PlaneGeometry:Ca,PolyhedronGeometry:Vc,RingGeometry:Tu,ShapeGeometry:Ru,SphereGeometry:Bu,TetrahedronGeometry:Pu,TorusGeometry:ku,TorusKnotGeometry:Iu,TubeGeometry:Lu,WireframeGeometry:Du});class Nu extends wi{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Xn(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class zu extends da{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class Uu extends wi{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Xn(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dt,this.normalScale=new Bn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Hu extends Uu{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Bn(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return xn(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Xn(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Xn(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Xn(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._iridescence=0,this._transmission=0,this.setValues(e)}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class Gu extends wi{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Xn(16777215),this.specular=new Xn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dt,this.normalScale=new Bn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=K,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Vu extends wi{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Xn(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dt,this.normalScale=new Bn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class ju extends wi{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dt,this.normalScale=new Bn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class Wu extends wi{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Xn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dt,this.normalScale=new Bn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=K,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Ju extends wi{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Xn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Dt,this.normalScale=new Bn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Xu extends Xl{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function Ku(e,t,n){return Yu(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)}function $u(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function Yu(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function qu(e){const t=e.length,n=new Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort((function(t,n){return e[t]-e[n]})),n}function Qu(e,t,n){const r=e.length,i=new e.constructor(r);for(let a=0,o=0;o!==r;++a){const r=n[a]*t;for(let n=0;n!==t;++n)i[o++]=e[r+n]}return i}function Zu(e,t,n,r){let i=1,a=e[0];for(;void 0!==a&&void 0===a[r];)a=e[i++];if(void 0===a)return;let o=a[r];if(void 0!==o)if(Array.isArray(o))do{o=a[r],void 0!==o&&(t.push(a.time),n.push.apply(n,o)),a=e[i++]}while(void 0!==a);else if(void 0!==o.toArray)do{o=a[r],void 0!==o&&(t.push(a.time),o.toArray(n,n.length)),a=e[i++]}while(void 0!==a);else do{o=a[r],void 0!==o&&(t.push(a.time),n.push(o)),a=e[i++]}while(void 0!==a)}var ed=Object.freeze({__proto__:null,arraySlice:Ku,convertArray:$u,isTypedArray:Yu,getKeyframeOrder:qu,sortedArray:Qu,flattenJSON:Zu,subclip:function(e,t,n,r,i=30){const a=e.clone();a.name=t;const o=[];for(let e=0;e<a.tracks.length;++e){const t=a.tracks[e],s=t.getValueSize(),l=[],c=[];for(let e=0;e<t.times.length;++e){const a=t.times[e]*i;if(!(a<n||a>=r)){l.push(t.times[e]);for(let n=0;n<s;++n)c.push(t.values[e*s+n])}}0!==l.length&&(t.times=$u(l,t.times.constructor),t.values=$u(c,t.values.constructor),o.push(t))}a.tracks=o;let s=1/0;for(let e=0;e<a.tracks.length;++e)s>a.tracks[e].times[0]&&(s=a.tracks[e].times[0]);for(let e=0;e<a.tracks.length;++e)a.tracks[e].shift(-1*s);return a.resetDuration(),a},makeClipAdditive:function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,a=t/r;for(let t=0;t<i;++t){const r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)continue;const o=e.tracks.find((function(e){return e.name===r.name&&e.ValueTypeName===i}));if(void 0===o)continue;let s=0;const l=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(s=l/3);let c=0;const u=o.getValueSize();o.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);const d=r.times.length-1;let h;if(a<=r.times[0]){const e=s,t=l-s;h=Ku(r.values,e,t)}else if(a>=r.times[d]){const e=d*l+s,t=e+l-s;h=Ku(r.values,e,t)}else{const e=r.createInterpolant(),t=s,n=l-s;e.evaluate(a),h=Ku(e.resultBuffer,t,n)}"quaternion"===i&&(new sr).fromArray(h).normalize().conjugate().toArray(h);const f=o.times.length;for(let e=0;e<f;++e){const t=e*u+c;if("quaternion"===i)sr.multiplyQuaternionsFlat(o.values,t,h,0,o.values,t);else{const e=u-2*c;for(let n=0;n<e;++n)o.values[t+n]-=h[n]}}}return e.blendMode=Ct,e}});class td{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let a;n:{r:if(!(e<r)){for(let a=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(i=r,r=t[++n],e<r)break t}a=t.length;break n}if(e>=i)break e;{const o=t[1];e<o&&(n=2,i=o);for(let a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(n===a)break;if(r=i,i=t[--n-1],e>=i)break t}a=n,n=0}}for(;n<a;){const r=n+a>>>1;e<t[r]?a=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===r)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let e=0;e!==r;++e)t[e]=n[i+e];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class nd extends td{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Mt,endingEnd:Mt}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,a=e+1,o=r[i],s=r[a];if(void 0===o)switch(this.getSettings_().endingStart){case St:i=e,o=2*t-n;break;case At:i=r.length-2,o=t+r[i]-r[i+1];break;default:i=e,o=n}if(void 0===s)switch(this.getSettings_().endingEnd){case St:a=e,s=2*n-t;break;case At:a=1,s=n+r[1]-r[0];break;default:a=e-1,s=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-o),this._weightNext=l/(s-n),this._offsetPrev=i*c,this._offsetNext=a*c}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,l=s-o,c=this._offsetPrev,u=this._offsetNext,d=this._weightPrev,h=this._weightNext,f=(n-t)/(r-t),p=f*f,m=p*f,g=-d*m+2*d*p-d*f,v=(1+d)*m+(-1.5-2*d)*p+(-.5+d)*f+1,y=(-1-h)*m+(1.5+h)*p+.5*f,b=h*m-h*p;for(let e=0;e!==o;++e)i[e]=g*a[c+e]+v*a[l+e]+y*a[s+e]+b*a[u+e];return i}}class rd extends td{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=e*o,l=s-o,c=(n-t)/(r-t),u=1-c;for(let e=0;e!==o;++e)i[e]=a[l+e]*u+a[s+e]*c;return i}}class id extends td{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class ad{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=$u(t,this.TimeBufferType),this.values=$u(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:$u(e.times,Array),values:$u(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new id(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new rd(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new nd(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case _t:t=this.InterpolantFactoryMethodDiscrete;break;case xt:t=this.InterpolantFactoryMethodLinear;break;case wt:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return _t;case this.InterpolantFactoryMethodLinear:return xt;case this.InterpolantFactoryMethodSmooth:return wt}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,a=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==a&&n[a]>t;)--a;if(++a,0!==i||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);const e=this.getValueSize();this.times=Ku(n,i,a),this.values=Ku(this.values,i*e,a*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==i;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==a&&a>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,a),e=!1;break}a=r}if(void 0!==r&&Yu(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=Ku(this.times),t=Ku(this.values),n=this.getValueSize(),r=this.getInterpolation()===wt,i=e.length-1;let a=1;for(let o=1;o<i;++o){let i=!1;const s=e[o];if(s!==e[o+1]&&(1!==o||s!==e[0]))if(r)i=!0;else{const e=o*n,r=e-n,a=e+n;for(let o=0;o!==n;++o){const n=t[e+o];if(n!==t[r+o]||n!==t[a+o]){i=!0;break}}}if(i){if(o!==a){e[a]=e[o];const r=o*n,i=a*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++a}}if(i>0){e[a]=e[i];for(let e=i*n,r=a*n,o=0;o!==n;++o)t[r+o]=t[e+o];++a}return a!==e.length?(this.times=Ku(e,0,a),this.values=Ku(t,0,a*n)):(this.times=e,this.values=t),this}clone(){const e=Ku(this.times,0),t=Ku(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}ad.prototype.TimeBufferType=Float32Array,ad.prototype.ValueBufferType=Float32Array,ad.prototype.DefaultInterpolation=xt;class od extends ad{}od.prototype.ValueTypeName="bool",od.prototype.ValueBufferType=Array,od.prototype.DefaultInterpolation=_t,od.prototype.InterpolantFactoryMethodLinear=void 0,od.prototype.InterpolantFactoryMethodSmooth=void 0;class sd extends ad{}sd.prototype.ValueTypeName="color";class ld extends ad{}ld.prototype.ValueTypeName="number";class cd extends td{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,o=this.valueSize,s=(n-t)/(r-t);let l=e*o;for(let e=l+o;l!==e;l+=4)sr.slerpFlat(i,0,a,l-o,a,l,s);return i}}class ud extends ad{InterpolantFactoryMethodLinear(e){return new cd(this.times,this.values,this.getValueSize(),e)}}ud.prototype.ValueTypeName="quaternion",ud.prototype.DefaultInterpolation=xt,ud.prototype.InterpolantFactoryMethodSmooth=void 0;class dd extends ad{}dd.prototype.ValueTypeName="string",dd.prototype.ValueBufferType=Array,dd.prototype.DefaultInterpolation=_t,dd.prototype.InterpolantFactoryMethodLinear=void 0,dd.prototype.InterpolantFactoryMethodSmooth=void 0;class hd extends ad{}hd.prototype.ValueTypeName="vector";class fd{constructor(e,t=-1,n,r=Et){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=_n(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(pd(n[e]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,r=n.length;e!==r;++e)t.push(ad.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,a=[];for(let e=0;e<i;e++){let o=[],s=[];o.push((e+i-1)%i,e,(e+1)%i),s.push(0,1,0);const l=qu(o);o=Qu(o,1,l),s=Qu(s,1,l),r||0!==o[0]||(o.push(i),s.push(s[0])),a.push(new ld(".morphTargetInfluences["+t[e].name+"]",o,s).scale(1/n))}return new this(e,-1,a)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let e=0;e<n.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=n.name.match(i);if(a&&a.length>1){const e=a[1];let t=r[e];t||(r[e]=t=[]),t.push(n)}}const a=[];for(const e in r)a.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return a}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const a=[],o=[];Zu(n,a,o,r),0!==a.length&&i.push(new e(t,a,o))}},r=[],i=e.name||"default",a=e.fps||30,o=e.blendMode;let s=e.length||-1;const l=e.hierarchy||[];for(let e=0;e<l.length;e++){const i=l[e].keys;if(i&&0!==i.length)if(i[0].morphTargets){const e={};let t;for(t=0;t<i.length;t++)if(i[t].morphTargets)for(let n=0;n<i[t].morphTargets.length;n++)e[i[t].morphTargets[n]]=-1;for(const n in e){const e=[],a=[];for(let r=0;r!==i[t].morphTargets.length;++r){const r=i[t];e.push(r.time),a.push(r.morphTarget===n?1:0)}r.push(new ld(".morphTargetInfluence["+n+"]",e,a))}s=e.length*a}else{const a=".bones["+t[e].name+"]";n(hd,a+".position",i,"pos",r),n(ud,a+".quaternion",i,"rot",r),n(hd,a+".scale",i,"scl",r)}}return 0===r.length?null:new this(i,s,r,o)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function pd(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return ld;case"vector":case"vector2":case"vector3":case"vector4":return hd;case"color":return sd;case"quaternion":return ud;case"bool":case"boolean":return od;case"string":return dd}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];Zu(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const md={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class gd{constructor(e,t,n){const r=this;let i,a=!1,o=0,s=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){s++,!1===a&&void 0!==r.onStart&&r.onStart(e,o,s),a=!0},this.itemEnd=function(e){o++,void 0!==r.onProgress&&r.onProgress(e,o,s),o===s&&(a=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],r=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}}const vd=new gd;class yd{constructor(e){this.manager=void 0!==e?e:vd,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const bd={};class _d extends Error{constructor(e,t){super(e),this.response=t}}class xd extends yd{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=md.get(e);if(void 0!==i)return this.manager.itemStart(e),setTimeout((()=>{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==bd[e])return void bd[e].push({onLoad:t,onProgress:n,onError:r});bd[e]=[],bd[e].push({onLoad:t,onProgress:n,onError:r});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),o=this.mimeType,s=this.responseType;fetch(a).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=bd[e],r=t.body.getReader(),i=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),a=i?parseInt(i):0,o=0!==a;let s=0;const l=new ReadableStream({start(e){!function t(){r.read().then((({done:r,value:i})=>{if(r)e.close();else{s+=i.byteLength;const r=new ProgressEvent("progress",{lengthComputable:o,loaded:s,total:a});for(let e=0,t=n.length;e<t;e++){const t=n[e];t.onProgress&&t.onProgress(r)}e.enqueue(i),t()}}))}()}});return new Response(l)}throw new _d(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)})).then((e=>{switch(s){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,o)));case"json":return e.json();default:if(void 0===o)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(o),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then((e=>r.decode(e)))}}})).then((t=>{md.add(e,t);const n=bd[e];delete bd[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onLoad&&r.onLoad(t)}})).catch((t=>{const n=bd[e];if(void 0===n)throw this.manager.itemError(e),t;delete bd[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}this.manager.itemError(e)})).finally((()=>{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class wd extends yd{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new xd(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t=[];for(let n=0;n<e.length;n++){const r=fd.parse(e[n]);t.push(r)}return t}}class Md extends yd{constructor(e){super(e)}load(e,t,n,r){const i=this,a=[],o=new fc,s=new xd(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(i.withCredentials);let l=0;function c(c){s.load(e[c],(function(e){const n=i.parse(e,!0);a[c]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(o.minFilter=ve),o.image=a,o.format=n.format,o.needsUpdate=!0,t&&t(o))}),n,r)}if(Array.isArray(e))for(let t=0,n=e.length;t<n;++t)c(t);else s.load(e,(function(e){const n=i.parse(e,!0);if(n.isCubemap){const e=n.mipmaps.length/n.mipmapCount;for(let t=0;t<e;t++){a[t]={mipmaps:[]};for(let e=0;e<n.mipmapCount;e++)a[t].mipmaps.push(n.mipmaps[t*n.mipmapCount+e]),a[t].format=n.format,a[t].width=n.width,a[t].height=n.height}o.image=a}else o.image.width=n.width,o.image.height=n.height,o.mipmaps=n.mipmaps;1===n.mipmapCount&&(o.minFilter=ve),o.format=n.format,o.needsUpdate=!0,t&&t(o)}),n,r);return o}}class Sd extends yd{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,a=md.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;const o=On("img");function s(){c(),md.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){c(),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}function c(){o.removeEventListener("load",s,!1),o.removeEventListener("error",l,!1)}return o.addEventListener("load",s,!1),o.addEventListener("error",l,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(o.crossOrigin=this.crossOrigin),i.manager.itemStart(e),o.src=e,o}}class Ad extends yd{constructor(e){super(e)}load(e,t,n,r){const i=new ga,a=new Sd(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);let o=0;function s(n){a.load(e[n],(function(e){i.images[n]=e,o++,6===o&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let t=0;t<e.length;++t)s(t);return i}}class Ed extends yd{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new Ol,o=new xd(this.manager);return o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setPath(this.path),o.setWithCredentials(i.withCredentials),o.load(e,(function(e){const n=i.parse(e);n&&(void 0!==n.image?a.image=n.image:void 0!==n.data&&(a.image.width=n.width,a.image.height=n.height,a.image.data=n.data),a.wrapS=void 0!==n.wrapS?n.wrapS:ue,a.wrapT=void 0!==n.wrapT?n.wrapT:ue,a.magFilter=void 0!==n.magFilter?n.magFilter:ve,a.minFilter=void 0!==n.minFilter?n.minFilter:ve,a.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(a.encoding=n.encoding),void 0!==n.flipY&&(a.flipY=n.flipY),void 0!==n.format&&(a.format=n.format),void 0!==n.type&&(a.type=n.type),void 0!==n.mipmaps&&(a.mipmaps=n.mipmaps,a.minFilter=_e),1===n.mipmapCount&&(a.minFilter=ve),void 0!==n.generateMipmaps&&(a.generateMipmaps=n.generateMipmaps),a.needsUpdate=!0,t&&t(a,n))}),n,r),a}}class Cd extends yd{constructor(e){super(e)}load(e,t,n,r){const i=new Zn,a=new Sd(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,(function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}class Td extends ci{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Xn(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}class Rd extends Td{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(ci.DefaultUp),this.updateMatrix(),this.groundColor=new Xn(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const Bd=new Nr,Pd=new lr,kd=new lr;class Id{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Bn(512,512),this.map=null,this.mapPass=null,this.matrix=new Nr,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Sa,this._frameExtents=new Bn(1,1),this._viewportCount=1,this._viewports=[new er(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;Pd.setFromMatrixPosition(e.matrixWorld),t.position.copy(Pd),kd.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(kd),t.updateMatrixWorld(),Bd.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Bd),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Bd)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class Ld extends Id{constructor(){super(new fa(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=2*bn*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class Dd extends Td{constructor(e,t,n=0,r=Math.PI/3,i=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(ci.DefaultUp),this.updateMatrix(),this.target=new ci,this.distance=n,this.angle=r,this.penumbra=i,this.decay=a,this.map=null,this.shadow=new Ld}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Od=new Nr,Fd=new lr,Nd=new lr;class zd extends Id{constructor(){super(new fa(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Bn(4,2),this._viewportCount=6,this._viewports=[new er(2,1,1,1),new er(0,1,1,1),new er(3,1,1,1),new er(1,1,1,1),new er(3,0,1,1),new er(1,0,1,1)],this._cubeDirections=[new lr(1,0,0),new lr(-1,0,0),new lr(0,0,1),new lr(0,0,-1),new lr(0,1,0),new lr(0,-1,0)],this._cubeUps=[new lr(0,1,0),new lr(0,1,0),new lr(0,1,0),new lr(0,1,0),new lr(0,0,1),new lr(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),Fd.setFromMatrixPosition(e.matrixWorld),n.position.copy(Fd),Nd.copy(n.position),Nd.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Nd),n.updateMatrixWorld(),r.makeTranslation(-Fd.x,-Fd.y,-Fd.z),Od.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Od)}}class Ud extends Td{constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new zd}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class Hd extends Id{constructor(){super(new Na(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class Gd extends Td{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ci.DefaultUp),this.updateMatrix(),this.target=new ci,this.shadow=new Hd}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class Vd extends Td{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class jd extends Td{constructor(e,t,n=10,r=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class Wd{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new lr)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*r),t.addScaledVector(a[2],.488603*i),t.addScaledVector(a[3],.488603*n),t.addScaledVector(a[4],n*r*1.092548),t.addScaledVector(a[5],r*i*1.092548),t.addScaledVector(a[6],.315392*(3*i*i-1)),t.addScaledVector(a[7],n*i*1.092548),t.addScaledVector(a[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*r),t.addScaledVector(a[2],1.023328*i),t.addScaledVector(a[3],1.023328*n),t.addScaledVector(a[4],.858086*n*r),t.addScaledVector(a[5],.858086*r*i),t.addScaledVector(a[6],.743125*i*i-.247708),t.addScaledVector(a[7],.858086*n*i),t.addScaledVector(a[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}class Jd extends Td{constructor(e=new Wd,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class Xd extends yd{constructor(e){super(e),this.textures={}}load(e,t,n,r){const i=this,a=new xd(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}const r=Xd.createMaterialFromType(e.type);if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=e.sheen),void 0!==e.sheenColor&&(r.sheenColor=(new Xn).setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(r.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.specularIntensity&&(r.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==r.specularColor&&r.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.iridescence&&(r.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(r.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),1!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const t in e.uniforms){const i=e.uniforms[t];switch(r.uniforms[t]={},i.type){case"t":r.uniforms[t].value=n(i.value);break;case"c":r.uniforms[t].value=(new Xn).setHex(i.value);break;case"v2":r.uniforms[t].value=(new Bn).fromArray(i.value);break;case"v3":r.uniforms[t].value=(new lr).fromArray(i.value);break;case"v4":r.uniforms[t].value=(new er).fromArray(i.value);break;case"m3":r.uniforms[t].value=(new Pn).fromArray(i.value);break;case"m4":r.uniforms[t].value=(new Nr).fromArray(i.value);break;default:r.uniforms[t].value=i.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(r.glslVersion=e.glslVersion),void 0!==e.extensions)for(const t in e.extensions)r.extensions[t]=e.extensions[t];if(void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new Bn).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new Bn).fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(r.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){return new{ShadowMaterial:Nu,SpriteMaterial:ul,RawShaderMaterial:zu,ShaderMaterial:da,PointsMaterial:ic,MeshPhysicalMaterial:Hu,MeshStandardMaterial:Uu,MeshPhongMaterial:Gu,MeshToonMaterial:Vu,MeshNormalMaterial:ju,MeshLambertMaterial:Wu,MeshDepthMaterial:Gs,MeshDistanceMaterial:Vs,MeshBasicMaterial:Mi,MeshMatcapMaterial:Ju,LineDashedMaterial:Xu,LineBasicMaterial:Xl,Material:wi}[e]}}class Kd{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class $d extends ji{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class Yd extends yd{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new xd(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t={},n={};function r(e,r){if(void 0!==t[r])return t[r];const i=e.interleavedBuffers[r],a=function(e,t){if(void 0!==n[t])return n[t];const r=e.arrayBuffers[t],i=new Uint32Array(r).buffer;return n[t]=i,i}(e,i.buffer),o=Dn(i.type,a),s=new sl(o,i.stride);return s.uuid=i.uuid,t[r]=s,s}const i=e.isInstancedBufferGeometry?new $d:new ji,a=e.data.index;if(void 0!==a){const e=Dn(a.type,a.array);i.setIndex(new Ei(e,1))}const o=e.data.attributes;for(const t in o){const n=o[t];let a;if(n.isInterleavedBufferAttribute){const t=r(e.data,n.data);a=new cl(t,n.itemSize,n.offset,n.normalized)}else{const e=Dn(n.type,n.array);a=new(n.isInstancedBufferAttribute?Ul:Ei)(e,n.itemSize,n.normalized)}void 0!==n.name&&(a.name=n.name),void 0!==n.usage&&a.setUsage(n.usage),void 0!==n.updateRange&&(a.updateRange.offset=n.updateRange.offset,a.updateRange.count=n.updateRange.count),i.setAttribute(t,a)}const s=e.data.morphAttributes;if(s)for(const t in s){const n=s[t],a=[];for(let t=0,i=n.length;t<i;t++){const i=n[t];let o;if(i.isInterleavedBufferAttribute){const t=r(e.data,i.data);o=new cl(t,i.itemSize,i.offset,i.normalized)}else{const e=Dn(i.type,i.array);o=new Ei(e,i.itemSize,i.normalized)}void 0!==i.name&&(o.name=i.name),a.push(o)}i.morphAttributes[t]=a}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);const l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let e=0,t=l.length;e!==t;++e){const t=l[e];i.addGroup(t.start,t.count,t.materialIndex)}const c=e.data.boundingSphere;if(void 0!==c){const e=new lr;void 0!==c.center&&e.fromArray(c.center),i.boundingSphere=new Rr(e,c.radius)}return e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}}class qd extends yd{constructor(e){super(e)}load(e,t,n,r){const i=this,a=""===this.path?Kd.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||a;const o=new xd(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){let a=null;try{a=JSON.parse(n)}catch(t){return void 0!==r&&r(t),void console.error("THREE:ObjectLoader: Can't parse "+e+".",t.message)}const o=a.metadata;if(void 0===o||void 0===o.type||"geometry"===o.type.toLowerCase())return void 0!==r&&r(new Error("THREE.ObjectLoader: Can't load "+e)),void console.error("THREE.ObjectLoader: Can't load "+e);i.parse(a,t)}),n,r)}async loadAsync(e,t){const n=""===this.path?Kd.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;const r=new xd(this.manager);r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials);const i=await r.loadAsync(e,t),a=JSON.parse(i),o=a.metadata;if(void 0===o||void 0===o.type||"geometry"===o.type.toLowerCase())throw new Error("THREE.ObjectLoader: Can't load "+e);return await this.parseAsync(a)}parse(e,t){const n=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,r),a=this.parseImages(e.images,(function(){void 0!==t&&t(l)})),o=this.parseTextures(e.textures,a),s=this.parseMaterials(e.materials,o),l=this.parseObject(e.object,i,s,o,n),c=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,c),void 0!==t){let e=!1;for(const t in a)if(a[t].data instanceof HTMLImageElement){e=!0;break}!1===e&&t(l)}return l}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,n),i=await this.parseImagesAsync(e.images),a=this.parseTextures(e.textures,i),o=this.parseMaterials(e.materials,a),s=this.parseObject(e.object,r,o,a,t),l=this.parseSkeletons(e.skeletons,s);return this.bindSkeletons(s,l),s}parseShapes(e){const t={};if(void 0!==e)for(let n=0,r=e.length;n<r;n++){const r=(new Yc).fromJSON(e[n]);t[r.uuid]=r}return t}parseSkeletons(e,t){const n={},r={};if(t.traverse((function(e){e.isBone&&(r[e.uuid]=e)})),void 0!==e)for(let t=0,i=e.length;t<i;t++){const i=(new zl).fromJSON(e[t],r);n[i.uuid]=i}return n}parseGeometries(e,t){const n={};if(void 0!==e){const r=new Yd;for(let i=0,a=e.length;i<a;i++){let a;const o=e[i];switch(o.type){case"BufferGeometry":case"InstancedBufferGeometry":a=r.parse(o);break;default:o.type in Fu?a=Fu[o.type].fromJSON(o,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${o.type}"`)}a.uuid=o.uuid,void 0!==o.name&&(a.name=o.name),!0===a.isBufferGeometry&&void 0!==o.userData&&(a.userData=o.userData),n[o.uuid]=a}}return n}parseMaterials(e,t){const n={},r={};if(void 0!==e){const i=new Xd;i.setTextures(t);for(let t=0,a=e.length;t<a;t++){const a=e[t];void 0===n[a.uuid]&&(n[a.uuid]=i.parse(a)),r[a.uuid]=n[a.uuid]}}return r}parseAnimations(e){const t={};if(void 0!==e)for(let n=0;n<e.length;n++){const r=e[n],i=fd.parse(r);t[i.uuid]=i}return t}parseImages(e,t){const n=this,r={};let i;function a(e){if("string"==typeof e){const t=e;return function(e){return n.manager.itemStart(e),i.load(e,(function(){n.manager.itemEnd(e)}),void 0,(function(){n.manager.itemError(e),n.manager.itemEnd(e)}))}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t)?t:n.resourcePath+t)}return e.data?{data:Dn(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){const n=new gd(t);i=new Sd(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t<n;t++){const n=e[t],i=n.url;if(Array.isArray(i)){const e=[];for(let t=0,n=i.length;t<n;t++){const n=a(i[t]);null!==n&&(n instanceof HTMLImageElement?e.push(n):e.push(new Ol(n.data,n.width,n.height)))}r[n.uuid]=new Yn(e)}else{const e=a(n.url);r[n.uuid]=new Yn(e)}}}return r}async parseImagesAsync(e){const t=this,n={};let r;async function i(e){if("string"==typeof e){const n=e,i=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(n)?n:t.resourcePath+n;return await r.loadAsync(i)}return e.data?{data:Dn(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){r=new Sd(this.manager),r.setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t<r;t++){const r=e[t],a=r.url;if(Array.isArray(a)){const e=[];for(let t=0,n=a.length;t<n;t++){const n=a[t],r=await i(n);null!==r&&(r instanceof HTMLImageElement?e.push(r):e.push(new Ol(r.data,r.width,r.height)))}n[r.uuid]=new Yn(e)}else{const e=await i(r.url);n[r.uuid]=new Yn(e)}}}return n}parseTextures(e,t){function n(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}const r={};if(void 0!==e)for(let i=0,a=e.length;i<a;i++){const a=e[i];void 0===a.image&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),void 0===t[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);const o=t[a.image],s=o.data;let l;Array.isArray(s)?(l=new ga,6===s.length&&(l.needsUpdate=!0)):(l=s&&s.data?new Ol:new Zn,s&&(l.needsUpdate=!0)),l.source=o,l.uuid=a.uuid,void 0!==a.name&&(l.name=a.name),void 0!==a.mapping&&(l.mapping=n(a.mapping,Qd)),void 0!==a.offset&&l.offset.fromArray(a.offset),void 0!==a.repeat&&l.repeat.fromArray(a.repeat),void 0!==a.center&&l.center.fromArray(a.center),void 0!==a.rotation&&(l.rotation=a.rotation),void 0!==a.wrap&&(l.wrapS=n(a.wrap[0],Zd),l.wrapT=n(a.wrap[1],Zd)),void 0!==a.format&&(l.format=a.format),void 0!==a.type&&(l.type=a.type),void 0!==a.encoding&&(l.encoding=a.encoding),void 0!==a.minFilter&&(l.minFilter=n(a.minFilter,eh)),void 0!==a.magFilter&&(l.magFilter=n(a.magFilter,eh)),void 0!==a.anisotropy&&(l.anisotropy=a.anisotropy),void 0!==a.flipY&&(l.flipY=a.flipY),void 0!==a.generateMipmaps&&(l.generateMipmaps=a.generateMipmaps),void 0!==a.premultiplyAlpha&&(l.premultiplyAlpha=a.premultiplyAlpha),void 0!==a.unpackAlignment&&(l.unpackAlignment=a.unpackAlignment),void 0!==a.userData&&(l.userData=a.userData),r[a.uuid]=l}return r}parseObject(e,t,n,r,i){let a,o,s;function l(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function c(e){if(void 0!==e){if(Array.isArray(e)){const t=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];void 0===n[i]&&console.warn("THREE.ObjectLoader: Undefined material",i),t.push(n[i])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}function u(e){return void 0===r[e]&&console.warn("THREE.ObjectLoader: Undefined texture",e),r[e]}switch(e.type){case"Scene":a=new ol,void 0!==e.background&&(Number.isInteger(e.background)?a.background=new Xn(e.background):a.background=u(e.background)),void 0!==e.environment&&(a.environment=u(e.environment)),void 0!==e.fog&&("Fog"===e.fog.type?a.fog=new al(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(a.fog=new il(e.fog.color,e.fog.density))),void 0!==e.backgroundBlurriness&&(a.backgroundBlurriness=e.backgroundBlurriness);break;case"PerspectiveCamera":a=new fa(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(a.focus=e.focus),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.filmGauge&&(a.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(a.filmOffset=e.filmOffset),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"OrthographicCamera":a=new Na(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"AmbientLight":a=new Vd(e.color,e.intensity);break;case"DirectionalLight":a=new Gd(e.color,e.intensity);break;case"PointLight":a=new Ud(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":a=new jd(e.color,e.intensity,e.width,e.height);break;case"SpotLight":a=new Dd(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":a=new Rd(e.color,e.groundColor,e.intensity);break;case"LightProbe":a=(new Jd).fromJSON(e);break;case"SkinnedMesh":o=l(e.geometry),s=c(e.material),a=new Ll(o,s),void 0!==e.bindMode&&(a.bindMode=e.bindMode),void 0!==e.bindMatrix&&a.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(a.skeleton=e.skeleton);break;case"Mesh":o=l(e.geometry),s=c(e.material),a=new ia(o,s);break;case"InstancedMesh":o=l(e.geometry),s=c(e.material);const t=e.count,n=e.instanceMatrix,r=e.instanceColor;a=new Jl(o,s,t),a.instanceMatrix=new Ul(new Float32Array(n.array),16),void 0!==r&&(a.instanceColor=new Ul(new Float32Array(r.array),r.itemSize));break;case"LOD":a=new Tl;break;case"Line":a=new Zl(l(e.geometry),c(e.material));break;case"LineLoop":a=new rc(l(e.geometry),c(e.material));break;case"LineSegments":a=new nc(l(e.geometry),c(e.material));break;case"PointCloud":case"Points":a=new cc(l(e.geometry),c(e.material));break;case"Sprite":a=new Sl(c(e.material));break;case"Group":a=new $s;break;case"Bone":a=new Dl;break;default:a=new ci}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(a.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(a.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.frustumCulled&&(a.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(a.renderOrder=e.renderOrder),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.layers&&(a.layers.mask=e.layers),void 0!==e.children){const o=e.children;for(let e=0;e<o.length;e++)a.add(this.parseObject(o[e],t,n,r,i))}if(void 0!==e.animations){const t=e.animations;for(let e=0;e<t.length;e++){const n=t[e];a.animations.push(i[n])}}if("LOD"===e.type){void 0!==e.autoUpdate&&(a.autoUpdate=e.autoUpdate);const t=e.levels;for(let e=0;e<t.length;e++){const n=t[e],r=a.getObjectByProperty("uuid",n.object);void 0!==r&&a.addLevel(r,n.distance,n.hysteresis)}}return a}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse((function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){const n=t[e.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}}))}}const Qd={UVMapping:re,CubeReflectionMapping:ie,CubeRefractionMapping:ae,EquirectangularReflectionMapping:oe,EquirectangularRefractionMapping:se,CubeUVReflectionMapping:le},Zd={RepeatWrapping:ce,ClampToEdgeWrapping:ue,MirroredRepeatWrapping:de},eh={NearestFilter:he,NearestMipmapNearestFilter:fe,NearestMipmapLinearFilter:me,LinearFilter:ve,LinearMipmapNearestFilter:ye,LinearMipmapLinearFilter:_e};class th extends yd{constructor(e){super(e),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,a=md.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;const o={};o.credentials="anonymous"===this.crossOrigin?"same-origin":"include",o.headers=this.requestHeader,fetch(e,o).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){md.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}let nh;class rh{static getContext(){return void 0===nh&&(nh=new(window.AudioContext||window.webkitAudioContext)),nh}static setContext(e){nh=e}}class ih extends yd{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new xd(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{const e=n.slice(0);rh.getContext().decodeAudioData(e,(function(e){t(e)}))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}}class ah extends Jd{constructor(e,t,n=1){super(void 0,n),this.isHemisphereLightProbe=!0;const r=(new Xn).set(e),i=(new Xn).set(t),a=new lr(r.r,r.g,r.b),o=new lr(i.r,i.g,i.b),s=Math.sqrt(Math.PI),l=s*Math.sqrt(.75);this.sh.coefficients[0].copy(a).add(o).multiplyScalar(s),this.sh.coefficients[1].copy(a).sub(o).multiplyScalar(l)}}class oh extends Jd{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const n=(new Xn).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const sh=new Nr,lh=new Nr,ch=new Nr;class uh{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new fa,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new fa,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,ch.copy(e.projectionMatrix);const n=t.eyeSep/2,r=n*t.near/t.focus,i=t.near*Math.tan(yn*t.fov*.5)/t.zoom;let a,o;lh.elements[12]=-n,sh.elements[12]=n,a=-i*t.aspect+r,o=i*t.aspect+r,ch.elements[0]=2*t.near/(o-a),ch.elements[8]=(o+a)/(o-a),this.cameraL.projectionMatrix.copy(ch),a=-i*t.aspect-r,o=i*t.aspect-r,ch.elements[0]=2*t.near/(o-a),ch.elements[8]=(o+a)/(o-a),this.cameraR.projectionMatrix.copy(ch)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(lh),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(sh)}}class dh{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=hh(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=hh();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function hh(){return("undefined"==typeof performance?Date:performance).now()}const fh=new lr,ph=new sr,mh=new lr,gh=new lr;class vh extends ci{constructor(){super(),this.type="AudioListener",this.context=rh.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new dh}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(fh,ph,mh),gh.set(0,0,-1).applyQuaternion(ph),t.positionX){const e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(fh.x,e),t.positionY.linearRampToValueAtTime(fh.y,e),t.positionZ.linearRampToValueAtTime(fh.z,e),t.forwardX.linearRampToValueAtTime(gh.x,e),t.forwardY.linearRampToValueAtTime(gh.y,e),t.forwardZ.linearRampToValueAtTime(gh.z,e),t.upX.linearRampToValueAtTime(n.x,e),t.upY.linearRampToValueAtTime(n.y,e),t.upZ.linearRampToValueAtTime(n.z,e)}else t.setPosition(fh.x,fh.y,fh.z),t.setOrientation(gh.x,gh.y,gh.z,n.x,n.y,n.z)}}class yh extends ci{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}const bh=new lr,_h=new sr,xh=new lr,wh=new lr;class Mh extends yh{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(bh,_h,xh),wh.set(0,0,1).applyQuaternion(_h);const t=this.panner;if(t.positionX){const e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(bh.x,e),t.positionY.linearRampToValueAtTime(bh.y,e),t.positionZ.linearRampToValueAtTime(bh.z,e),t.orientationX.linearRampToValueAtTime(wh.x,e),t.orientationY.linearRampToValueAtTime(wh.y,e),t.orientationZ.linearRampToValueAtTime(wh.z,e)}else t.setPosition(bh.x,bh.y,bh.z),t.setOrientation(wh.x,wh.y,wh.z)}}class Sh{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}class Ah{constructor(e,t,n){let r,i,a;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let a=this.cumulativeWeight;if(0===a){for(let e=0;e!==r;++e)n[i+e]=n[e];a=t}else{a+=t;const e=t/a;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=a}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,a=this.cumulativeWeightAdditive,o=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}a>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){o.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n,i=r;e!==i;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){sr.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const a=this._workIndex*i;sr.multiplyQuaternionsFlat(e,a,e,t,e,n),sr.slerpFlat(e,t,e,t,e,a,r)}_lerp(e,t,n,r,i){const a=1-r;for(let o=0;o!==i;++o){const i=t+o;e[i]=e[i]*a+e[n+o]*r}}_lerpAdditive(e,t,n,r,i){for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]+e[n+a]*r}}}const Eh=new RegExp("[\\[\\]\\.:\\/]","g"),Ch="[^\\[\\]\\.:\\/]",Th="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Rh=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Ch)+/(WCOD+)?/.source.replace("WCOD",Th)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Ch)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Ch)+"$"),Bh=["material","materials","bones","map"];class Ph{constructor(e,t,n){this.path=t,this.parsedPath=n||Ph.parseTrackName(t),this.node=Ph.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Ph.Composite(e,t,n):new Ph(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Eh,"")}static parseTrackName(e){const t=Rh.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==Bh.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const a=n(i.children);if(a)return a}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=Ph.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);e=e.material.map;break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const a=e[r];if(void 0===a){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",e)}let o=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?o=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(o=this.Versioning.MatrixWorldNeedsUpdate);let s=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}s=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=i}else void 0!==a.fromArray&&void 0!==a.toArray?(s=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(s=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=r;this.getValue=this.GetterByBindingType[s],this.setValue=this.SetterByBindingTypeAndVersioning[s][o]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Ph.Composite=class{constructor(e,t,n){const r=n||Ph.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Ph.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Ph.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Ph.prototype.GetterByBindingType=[Ph.prototype._getValue_direct,Ph.prototype._getValue_array,Ph.prototype._getValue_arrayElement,Ph.prototype._getValue_toArray],Ph.prototype.SetterByBindingTypeAndVersioning=[[Ph.prototype._setValue_direct,Ph.prototype._setValue_direct_setNeedsUpdate,Ph.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Ph.prototype._setValue_array,Ph.prototype._setValue_array_setNeedsUpdate,Ph.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Ph.prototype._setValue_arrayElement,Ph.prototype._setValue_arrayElement_setNeedsUpdate,Ph.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Ph.prototype._setValue_fromArray,Ph.prototype._setValue_fromArray_setNeedsUpdate,Ph.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class kh{constructor(){this.isAnimationObjectGroup=!0,this.uuid=_n(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,a=i.length;let o,s=e.length,l=this.nCachedObjects_;for(let c=0,u=arguments.length;c!==u;++c){const u=arguments[c],d=u.uuid;let h=t[d];if(void 0===h){h=s++,t[d]=h,e.push(u);for(let e=0,t=a;e!==t;++e)i[e].push(new Ph(u,n[e],r[e]))}else if(h<l){o=e[h];const s=--l,c=e[s];t[c.uuid]=h,e[h]=c,t[d]=s,e[s]=u;for(let e=0,t=a;e!==t;++e){const t=i[e],a=t[s];let o=t[h];t[h]=a,void 0===o&&(o=new Ph(u,n[e],r[e])),t[s]=o}}else e[h]!==o&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_;for(let a=0,o=arguments.length;a!==o;++a){const o=arguments[a],s=o.uuid,l=t[s];if(void 0!==l&&l>=i){const a=i++,c=e[a];t[c.uuid]=l,e[l]=c,t[s]=a,e[a]=o;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[a],i=t[l];t[l]=r,t[a]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,a=e.length;for(let o=0,s=arguments.length;o!==s;++o){const s=arguments[o].uuid,l=t[s];if(void 0!==l)if(delete t[s],l<i){const o=--i,s=e[o],c=--a,u=e[c];t[s.uuid]=l,e[l]=s,t[u.uuid]=o,e[o]=u,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[o],i=t[c];t[l]=r,t[o]=i,t.pop()}}else{const i=--a,o=e[i];i>0&&(t[o.uuid]=l),e[l]=o,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const a=this._paths,o=this._parsedPaths,s=this._objects,l=s.length,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,a.push(e),o.push(t),i.push(u);for(let n=c,r=s.length;n!==r;++n){const r=s[n];u[n]=new Ph(r,e,t)}return u}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,a=this._bindings,o=a.length-1,s=a[o];t[e[o]]=n,a[n]=s,a.pop(),i[n]=i[o],i.pop(),r[n]=r[o],r.pop()}}}class Ih{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,a=i.length,o=new Array(a),s={endingStart:Mt,endingEnd:Mt};for(let e=0;e!==a;++e){const t=i[e].createInterpolant(null);o[e]=t,t.settings=s}this._interpolantSettings=s,this._interpolants=o,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=yt,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,a=n/r;e.warp(1,i,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,a=this.timeScale;let o=this._timeScaleInterpolant;null===o&&(o=r._lendControlInterpolant(),this._timeScaleInterpolant=o);const s=o.parameterPositions,l=o.sampleValues;return s[0]=i,s[1]=i+n,l[0]=e/a,l[1]=t/a,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;r<0||0===n?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);const a=this._updateTime(t),o=this._updateWeight(e);if(o>0){const e=this._interpolants,t=this._propertyBindings;if(this.blendMode===Ct)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulateAdditive(o);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulate(r,o)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;null!==n&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const a=n===bt;if(0===e)return-1===i?r:a&&1==(1&i)?t-r:r;if(n===vt){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const o=this.repetitions-i;if(o<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===o){const t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(a&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=St,r.endingEnd=St):(r.endingStart=e?this.zeroSlopeAtStart?St:Mt:At,r.endingEnd=t?this.zeroSlopeAtEnd?St:Mt:At)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);const o=a.parameterPositions,s=a.sampleValues;return o[0]=i,s[0]=t,o[1]=i+e,s[1]=n,this}}const Lh=new Float32Array(1);class Dh extends mn{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,o=e._interpolants,s=n.uuid,l=this._bindingsByRootAndName;let c=l[s];void 0===c&&(c={},l[s]=c);for(let e=0;e!==i;++e){const i=r[e],l=i.name;let u=c[l];if(void 0!==u)++u.referenceCount,a[e]=u;else{if(u=a[e],void 0!==u){null===u._cacheIndex&&(++u.referenceCount,this._addInactiveBinding(u,s,l));continue}const r=t&&t._propertyBindings[e].binding.parsedPath;u=new Ah(Ph.create(n,l,r),i.ValueTypeName,i.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,s,l),a[e]=u}o[e].resultBuffer=u.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let a=i[t];if(void 0===a)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=a;else{const t=a.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),a.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,a=this._actionsByClip,o=a[i],s=o.knownActions,l=s[s.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,s[c]=l,s.pop(),e._byClipCacheIndex=null,delete o.actionByRoot[(e._localRoot||this._root).uuid],0===s.length&&delete a[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let a=r[t];void 0===a&&(a={},r[t]=a),a[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,a=this._bindingsByRootAndName,o=a[r],s=t[t.length-1],l=e._cacheIndex;s._cacheIndex=l,t[l]=s,t.pop(),delete o[i],0===Object.keys(o).length&&delete a[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new rd(new Float32Array(2),new Float32Array(2),1,Lh),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let a="string"==typeof e?fd.findByName(r,e):e;const o=null!==a?a.uuid:e,s=this._actionsByClip[o];let l=null;if(void 0===n&&(n=null!==a?a.blendMode:Et),void 0!==s){const e=s.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;l=s.knownActions[0],null===a&&(a=l._clip)}if(null===a)return null;const c=new Ih(this,a,t,n);return this._bindAction(c,l),this._addInactiveAction(c,o,i),c}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"==typeof e?fd.findByName(n,e):e,a=i?i.uuid:e,o=this._actionsByClip[a];return void 0!==o&&o.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1;for(let o=0;o!==n;++o)t[o]._update(r,e,i,a);const o=this._bindings,s=this._nActiveBindings;for(let e=0;e!==s;++e)o[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,a=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,a._cacheIndex=i,t[i]=a,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const e in n){const r=n[e].actionByRoot[t];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const e in r){const t=r[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}class Oh{constructor(e){this.value=e}clone(){return new Oh(void 0===this.value.clone?this.value:this.value.clone())}}let Fh=0;class Nh extends mn{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:Fh++}),this.name="",this.usage=nn,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const t=this.uniforms.indexOf(e);return-1!==t&&this.uniforms.splice(t,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){return this.dispatchEvent({type:"dispose"}),this}copy(e){this.name=e.name,this.usage=e.usage;const t=e.uniforms;this.uniforms.length=0;for(let e=0,n=t.length;e<n;e++)this.uniforms.push(t[e].clone());return this}clone(){return(new this.constructor).copy(this)}}class zh extends sl{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}class Uh{constructor(e,t,n,r,i){this.isGLBufferAttribute=!0,this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}class Hh{constructor(e,t,n=0,r=1/0){this.ray=new Fr(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new $r,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(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.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!0,n=[]){return Vh(e,this,n,t),n.sort(Gh),n}intersectObjects(e,t=!0,n=[]){for(let r=0,i=e.length;r<i;r++)Vh(e[r],this,n,t);return n.sort(Gh),n}}function Gh(e,t){return e.distance-t.distance}function Vh(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)Vh(r[e],t,n,!0)}}class jh{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){const e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(xn(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}class Wh{constructor(e=1,t=0,n=0){return this.radius=e,this.theta=t,this.y=n,this}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return(new this.constructor).copy(this)}}const Jh=new Bn;class Xh{constructor(e=new Bn(1/0,1/0),t=new Bn(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Jh.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Jh.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Kh=new lr,$h=new lr;class Yh{constructor(e=new lr,t=new lr){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Kh.subVectors(e,this.start),$h.subVectors(this.end,this.start);const n=$h.dot($h);let r=$h.dot(Kh)/n;return t&&(r=xn(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const qh=new lr;class Qh extends ci{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new ji,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,n=32;e<n;e++,t++){const i=e/n*Math.PI*2,a=t/n*Math.PI*2;r.push(Math.cos(i),Math.sin(i),1,Math.cos(a),Math.sin(a),1)}n.setAttribute("position",new Di(r,3));const i=new Xl({fog:!1,toneMapped:!1});this.cone=new nc(n,i),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1);const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),qh.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(qh),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Zh=new lr,ef=new Nr,tf=new Nr;class nf extends nc{constructor(e){const t=rf(e),n=new ji,r=[],i=[],a=new Xn(0,0,1),o=new Xn(0,1,0);for(let e=0;e<t.length;e++){const n=t[e];n.parent&&n.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(a.r,a.g,a.b),i.push(o.r,o.g,o.b))}n.setAttribute("position",new Di(r,3)),n.setAttribute("color",new Di(i,3)),super(n,new Xl({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");tf.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e<t.length;e++){const i=t[e];i.parent&&i.parent.isBone&&(ef.multiplyMatrices(tf,i.matrixWorld),Zh.setFromMatrixPosition(ef),r.setXYZ(n,Zh.x,Zh.y,Zh.z),ef.multiplyMatrices(tf,i.parent.matrixWorld),Zh.setFromMatrixPosition(ef),r.setXYZ(n+1,Zh.x,Zh.y,Zh.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}}function rf(e){const t=[];!0===e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push.apply(t,rf(e.children[n]));return t}class af extends ia{constructor(e,t,n){super(new Bu(t,4,2),new Mi({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const of=new lr,sf=new Xn,lf=new Xn;class cf extends ci{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const r=new Cu(t);r.rotateY(.5*Math.PI),this.material=new Mi({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const i=r.getAttribute("position"),a=new Float32Array(3*i.count);r.setAttribute("color",new Ei(a,3)),this.add(new ia(r,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");sf.copy(this.light.color),lf.copy(this.light.groundColor);for(let e=0,n=t.count;e<n;e++){const r=e<n/2?sf:lf;t.setXYZ(e,r.r,r.g,r.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(of.setFromMatrixPosition(this.light.matrixWorld).negate())}}class uf extends nc{constructor(e=10,t=10,n=4473924,r=8947848){n=new Xn(n),r=new Xn(r);const i=t/2,a=e/t,o=e/2,s=[],l=[];for(let e=0,c=0,u=-o;e<=t;e++,u+=a){s.push(-o,0,u,o,0,u),s.push(u,0,-o,u,0,o);const t=e===i?n:r;t.toArray(l,c),c+=3,t.toArray(l,c),c+=3,t.toArray(l,c),c+=3,t.toArray(l,c),c+=3}const c=new ji;c.setAttribute("position",new Di(s,3)),c.setAttribute("color",new Di(l,3)),super(c,new Xl({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class df extends nc{constructor(e=10,t=16,n=8,r=64,i=4473924,a=8947848){i=new Xn(i),a=new Xn(a);const o=[],s=[];if(t>1)for(let n=0;n<t;n++){const r=n/t*(2*Math.PI),l=Math.sin(r)*e,c=Math.cos(r)*e;o.push(0,0,0),o.push(l,0,c);const u=1&n?i:a;s.push(u.r,u.g,u.b),s.push(u.r,u.g,u.b)}for(let t=0;t<n;t++){const l=1&t?i:a,c=e-e/n*t;for(let e=0;e<r;e++){let t=e/r*(2*Math.PI),n=Math.sin(t)*c,i=Math.cos(t)*c;o.push(n,0,i),s.push(l.r,l.g,l.b),t=(e+1)/r*(2*Math.PI),n=Math.sin(t)*c,i=Math.cos(t)*c,o.push(n,0,i),s.push(l.r,l.g,l.b)}}const l=new ji;l.setAttribute("position",new Di(o,3)),l.setAttribute("color",new Di(s,3)),super(l,new Xl({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const hf=new lr,ff=new lr,pf=new lr;class mf extends ci{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",void 0===t&&(t=1);let r=new ji;r.setAttribute("position",new Di([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const i=new Xl({fog:!1,toneMapped:!1});this.lightPlane=new Zl(r,i),this.add(this.lightPlane),r=new ji,r.setAttribute("position",new Di([0,0,0,0,0,1],3)),this.targetLine=new Zl(r,i),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),hf.setFromMatrixPosition(this.light.matrixWorld),ff.setFromMatrixPosition(this.light.target.matrixWorld),pf.subVectors(ff,hf),this.lightPlane.lookAt(ff),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(ff),this.targetLine.scale.z=pf.length()}}const gf=new lr,vf=new ha;class yf extends nc{constructor(e){const t=new ji,n=new Xl({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],i=[],a={};function o(e,t){s(e),s(t)}function s(e){r.push(0,0,0),i.push(0,0,0),void 0===a[e]&&(a[e]=[]),a[e].push(r.length/3-1)}o("n1","n2"),o("n2","n4"),o("n4","n3"),o("n3","n1"),o("f1","f2"),o("f2","f4"),o("f4","f3"),o("f3","f1"),o("n1","f1"),o("n2","f2"),o("n3","f3"),o("n4","f4"),o("p","n1"),o("p","n2"),o("p","n3"),o("p","n4"),o("u1","u2"),o("u2","u3"),o("u3","u1"),o("c","t"),o("p","c"),o("cn1","cn2"),o("cn3","cn4"),o("cf1","cf2"),o("cf3","cf4"),t.setAttribute("position",new Di(r,3)),t.setAttribute("color",new Di(i,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update();const l=new Xn(16755200),c=new Xn(16711680),u=new Xn(43775),d=new Xn(16777215),h=new Xn(3355443);this.setColors(l,c,u,d,h)}setColors(e,t,n,r,i){const a=this.geometry.getAttribute("color");a.setXYZ(0,e.r,e.g,e.b),a.setXYZ(1,e.r,e.g,e.b),a.setXYZ(2,e.r,e.g,e.b),a.setXYZ(3,e.r,e.g,e.b),a.setXYZ(4,e.r,e.g,e.b),a.setXYZ(5,e.r,e.g,e.b),a.setXYZ(6,e.r,e.g,e.b),a.setXYZ(7,e.r,e.g,e.b),a.setXYZ(8,e.r,e.g,e.b),a.setXYZ(9,e.r,e.g,e.b),a.setXYZ(10,e.r,e.g,e.b),a.setXYZ(11,e.r,e.g,e.b),a.setXYZ(12,e.r,e.g,e.b),a.setXYZ(13,e.r,e.g,e.b),a.setXYZ(14,e.r,e.g,e.b),a.setXYZ(15,e.r,e.g,e.b),a.setXYZ(16,e.r,e.g,e.b),a.setXYZ(17,e.r,e.g,e.b),a.setXYZ(18,e.r,e.g,e.b),a.setXYZ(19,e.r,e.g,e.b),a.setXYZ(20,e.r,e.g,e.b),a.setXYZ(21,e.r,e.g,e.b),a.setXYZ(22,e.r,e.g,e.b),a.setXYZ(23,e.r,e.g,e.b),a.setXYZ(24,t.r,t.g,t.b),a.setXYZ(25,t.r,t.g,t.b),a.setXYZ(26,t.r,t.g,t.b),a.setXYZ(27,t.r,t.g,t.b),a.setXYZ(28,t.r,t.g,t.b),a.setXYZ(29,t.r,t.g,t.b),a.setXYZ(30,t.r,t.g,t.b),a.setXYZ(31,t.r,t.g,t.b),a.setXYZ(32,n.r,n.g,n.b),a.setXYZ(33,n.r,n.g,n.b),a.setXYZ(34,n.r,n.g,n.b),a.setXYZ(35,n.r,n.g,n.b),a.setXYZ(36,n.r,n.g,n.b),a.setXYZ(37,n.r,n.g,n.b),a.setXYZ(38,r.r,r.g,r.b),a.setXYZ(39,r.r,r.g,r.b),a.setXYZ(40,i.r,i.g,i.b),a.setXYZ(41,i.r,i.g,i.b),a.setXYZ(42,i.r,i.g,i.b),a.setXYZ(43,i.r,i.g,i.b),a.setXYZ(44,i.r,i.g,i.b),a.setXYZ(45,i.r,i.g,i.b),a.setXYZ(46,i.r,i.g,i.b),a.setXYZ(47,i.r,i.g,i.b),a.setXYZ(48,i.r,i.g,i.b),a.setXYZ(49,i.r,i.g,i.b),a.needsUpdate=!0}update(){const e=this.geometry,t=this.pointMap;vf.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),bf("c",t,e,vf,0,0,-1),bf("t",t,e,vf,0,0,1),bf("n1",t,e,vf,-1,-1,-1),bf("n2",t,e,vf,1,-1,-1),bf("n3",t,e,vf,-1,1,-1),bf("n4",t,e,vf,1,1,-1),bf("f1",t,e,vf,-1,-1,1),bf("f2",t,e,vf,1,-1,1),bf("f3",t,e,vf,-1,1,1),bf("f4",t,e,vf,1,1,1),bf("u1",t,e,vf,.7,1.1,-1),bf("u2",t,e,vf,-.7,1.1,-1),bf("u3",t,e,vf,0,2,-1),bf("cf1",t,e,vf,-1,0,1),bf("cf2",t,e,vf,1,0,1),bf("cf3",t,e,vf,0,-1,1),bf("cf4",t,e,vf,0,1,1),bf("cn1",t,e,vf,-1,0,-1),bf("cn2",t,e,vf,1,0,-1),bf("cn3",t,e,vf,0,-1,-1),bf("cn4",t,e,vf,0,1,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function bf(e,t,n,r,i,a,o){gf.set(i,a,o).unproject(r);const s=t[e];if(void 0!==s){const e=n.getAttribute("position");for(let t=0,n=s.length;t<n;t++)e.setXYZ(s[t],gf.x,gf.y,gf.z)}}const _f=new dr;class xf extends nc{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new ji;i.setIndex(new Ei(n,1)),i.setAttribute("position",new Ei(r,3)),super(i,new Xl({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&_f.setFromObject(this.object),_f.isEmpty())return;const t=_f.min,n=_f.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=t.x,i[4]=n.y,i[5]=n.z,i[6]=t.x,i[7]=t.y,i[8]=n.z,i[9]=n.x,i[10]=t.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=t.z,i[15]=t.x,i[16]=n.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=n.x,i[22]=t.y,i[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class wf extends nc{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new ji;r.setIndex(new Ei(n,1)),r.setAttribute("position",new Di([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(r,new Xl({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class Mf extends Zl{constructor(e,t=1,n=16776960){const r=n,i=new ji;i.setAttribute("position",new Di([1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),i.computeBoundingSphere(),super(i,new Xl({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const a=new ji;a.setAttribute("position",new Di([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),a.computeBoundingSphere(),this.add(new ia(a,new Mi({color:r,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const Sf=new lr;let Af,Ef;class Cf extends ci{constructor(e=new lr(0,0,1),t=new lr(0,0,0),n=1,r=16776960,i=.2*n,a=.2*i){super(),this.type="ArrowHelper",void 0===Af&&(Af=new ji,Af.setAttribute("position",new Di([0,0,0,0,1,0],3)),Ef=new Hc(0,.5,1,5,1),Ef.translate(0,-.5,0)),this.position.copy(t),this.line=new Zl(Af,new Xl({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ia(Ef,new Mi({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,a)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Sf.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Sf,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Tf extends nc{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new ji;n.setAttribute("position",new Di(t,3)),n.setAttribute("color",new Di([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(n,new Xl({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,n){const r=new Xn,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Rf{constructor(){this.type="ShapePath",this.color=new Xn,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Fc,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(e,t){const n=t.length;let r=!1;for(let i=n-1,a=0;a<n;i=a++){let n=t[i],o=t[a],s=o.x-n.x,l=o.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=t[a],s=-s,o=t[i],l=-l),e.y<n.y||e.y>o.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-s*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(o.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=o.x)return!0}}return r}const n=xu.isClockWise,r=this.subPaths;if(0===r.length)return[];let i,a,o;const s=[];if(1===r.length)return a=r[0],o=new Yc,o.curves=a.curves,s.push(o),s;let l=!n(r[0].getPoints());l=e?!l:l;const c=[],u=[];let d,h,f=[],p=0;u[p]=void 0,f[p]=[];for(let t=0,o=r.length;t<o;t++)a=r[t],d=a.getPoints(),i=n(d),i=e?!i:i,i?(!l&&u[p]&&p++,u[p]={s:new Yc,p:d},u[p].s.curves=a.curves,l&&p++,f[p]=[]):f[p].push({h:a,p:d[0]});if(!u[0])return function(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n],i=new Yc;i.curves=r.curves,t.push(i)}return t}(r);if(u.length>1){let e=!1,n=0;for(let e=0,t=u.length;e<t;e++)c[e]=[];for(let r=0,i=u.length;r<i;r++){const i=f[r];for(let a=0;a<i.length;a++){const o=i[a];let s=!0;for(let i=0;i<u.length;i++)t(o.p,u[i].p)&&(r!==i&&n++,s?(s=!1,c[i].push(o)):e=!0);s&&c[r].push(o)}}n>0&&!1===e&&(f=c)}for(let e=0,t=u.length;e<t;e++){o=u[e].s,s.push(o),h=f[e];for(let e=0,t=h.length;e<t;e++)o.holes.push(h[e].h)}return s}}const Bf=Pf();function Pf(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(r[e]=0,r[256|e]=32768,i[e]=24,i[256|e]=24):t<-14?(r[e]=1024>>-t-14,r[256|e]=1024>>-t-14|32768,i[e]=-t-1,i[256|e]=-t-1):t<=15?(r[e]=t+15<<10,r[256|e]=t+15<<10|32768,i[e]=13,i[256|e]=13):t<128?(r[e]=31744,r[256|e]=64512,i[e]=24,i[256|e]=24):(r[e]=31744,r[256|e]=64512,i[e]=13,i[256|e]=13)}const a=new Uint32Array(2048),o=new Uint32Array(64),s=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;0==(8388608&t);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,a[e]=t|n}for(let e=1024;e<2048;++e)a[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)o[e]=e<<23;o[31]=1199570944,o[32]=2147483648;for(let e=33;e<63;++e)o[e]=2147483648+(e-32<<23);o[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(s[e]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:o,offsetTable:s}}var kf=Object.freeze({__proto__:null,toHalfFloat:function(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=xn(e,-65504,65504),Bf.floatView[0]=e;const t=Bf.uint32View[0],n=t>>23&511;return Bf.baseTable[n]+((8388607&t)>>Bf.shiftTable[n])},fromHalfFloat:function(e){const t=e>>10;return Bf.uint32View[0]=Bf.mantissaTable[Bf.offsetTable[t]+(1023&e)]+Bf.exponentTable[t],Bf.floatView[0]}});function If(){console.error("THREE.ImmediateRenderObject has been removed.")}class Lf extends tr{constructor(e,t,n){console.error('THREE.WebGLMultisampleRenderTarget has been removed. Use a normal render target and set the "samples" property to greater 0 to enable multisampling.'),super(e,t,n),this.samples=4}}class Df extends nr{constructor(e,t,n,r){console.warn("THREE.DataTexture2DArray has been renamed to DataArrayTexture."),super(e,t,n,r)}}class Of extends ir{constructor(e,t,n,r){console.warn("THREE.DataTexture3D has been renamed to Data3DTexture."),super(e,t,n,r)}}class Ff extends oa{constructor(e,t,n,r,i,a){console.warn("THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry."),super(e,t,n,r,i,a)}}class Nf extends zc{constructor(e,t,n,r){console.warn("THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry."),super(e,t,n,r)}}class zf extends Uc{constructor(e,t,n,r){console.warn("THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry."),super(e,t,n,r)}}class Uf extends Gc{constructor(e,t,n,r,i,a,o){console.warn("THREE.ConeBufferGeometry has been renamed to THREE.ConeGeometry."),super(e,t,n,r,i,a,o)}}class Hf extends Hc{constructor(e,t,n,r,i,a,o,s){console.warn("THREE.CylinderBufferGeometry has been renamed to THREE.CylinderGeometry."),super(e,t,n,r,i,a,o,s)}}class Gf extends jc{constructor(e,t){console.warn("THREE.DodecahedronBufferGeometry has been renamed to THREE.DodecahedronGeometry."),super(e,t)}}class Vf extends Su{constructor(e,t){console.warn("THREE.ExtrudeBufferGeometry has been renamed to THREE.ExtrudeGeometry."),super(e,t)}}class jf extends Eu{constructor(e,t){console.warn("THREE.IcosahedronBufferGeometry has been renamed to THREE.IcosahedronGeometry."),super(e,t)}}class Wf extends Nc{constructor(e,t,n,r){console.warn("THREE.LatheBufferGeometry has been renamed to THREE.LatheGeometry."),super(e,t,n,r)}}class Jf extends Cu{constructor(e,t){console.warn("THREE.OctahedronBufferGeometry has been renamed to THREE.OctahedronGeometry."),super(e,t)}}class Xf extends Ca{constructor(e,t,n,r){console.warn("THREE.PlaneBufferGeometry has been renamed to THREE.PlaneGeometry."),super(e,t,n,r)}}class Kf extends Vc{constructor(e,t,n,r){console.warn("THREE.PolyhedronBufferGeometry has been renamed to THREE.PolyhedronGeometry."),super(e,t,n,r)}}class $f extends Tu{constructor(e,t,n,r,i,a){console.warn("THREE.RingBufferGeometry has been renamed to THREE.RingGeometry."),super(e,t,n,r,i,a)}}class Yf extends Ru{constructor(e,t){console.warn("THREE.ShapeBufferGeometry has been renamed to THREE.ShapeGeometry."),super(e,t)}}class qf extends Bu{constructor(e,t,n,r,i,a,o){console.warn("THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry."),super(e,t,n,r,i,a,o)}}class Qf extends Pu{constructor(e,t){console.warn("THREE.TetrahedronBufferGeometry has been renamed to THREE.TetrahedronGeometry."),super(e,t)}}class Zf extends ku{constructor(e,t,n,r,i){console.warn("THREE.TorusBufferGeometry has been renamed to THREE.TorusGeometry."),super(e,t,n,r,i)}}class ep extends Iu{constructor(e,t,n,r,i,a){console.warn("THREE.TorusKnotBufferGeometry has been renamed to THREE.TorusKnotGeometry."),super(e,t,n,r,i,a)}}class tp extends Lu{constructor(e,t,n,r,i){console.warn("THREE.TubeBufferGeometry has been renamed to THREE.TubeGeometry."),super(e,t,n,r,i)}}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:r}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=r)}},r={};function i(e){var t=r[e];if(void 0!==t)return t.exports;var a=r[e]={exports:{}};return n[e](a,a.exports,i),a.exports}i.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return i.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,i.t=function(n,r){if(1&r&&(n=this(n)),8&r)return n;if("object"==typeof n&&n){if(4&r&&n.__esModule)return n;if(16&r&&"function"==typeof n.then)return n}var a=Object.create(null);i.r(a);var o={};e=e||[null,t({}),t([]),t(t)];for(var s=2&r&&n;"object"==typeof s&&!~e.indexOf(s);s=t(s))Object.getOwnPropertyNames(s).forEach((e=>o[e]=()=>n[e]));return o.default=()=>n,i.d(a,o),a},i.d=(e,t)=>{for(var n in t)i.o(t,n)&&!i.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},i.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),i.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.nc=void 0,(()=>{"use strict";function e(t){return e="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},e(t)}function t(t,n,r){return(n=function(t){var n=function(t,n){if("object"!==e(t)||null===t)return t;var r=t[Symbol.toPrimitive];if(void 0!==r){var i=r.call(t,n);if("object"!==e(i))return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t,"string");return"symbol"===e(n)?n:String(n)}(n))in t?Object.defineProperty(t,n,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[n]=r,t}var n=i(3324),r=i(7462),a=i(7294),o=i(745),s=i(8628),l=i(8715),c=i(5878),u=i(9477);const d=a.forwardRef((({children:e,enabled:t=!0,speed:n=1,rotationIntensity:r=1,floatIntensity:i=1,floatingRange:o=[-.1,.1],...s},d)=>{const h=a.useRef(null),f=a.useRef(1e4*Math.random());return(0,l.A)((e=>{var a,s;if(!t||0===n)return;const l=f.current+e.clock.getElapsedTime();h.current.rotation.x=Math.cos(l/4*n)/8*r,h.current.rotation.y=Math.sin(l/4*n)/8*r,h.current.rotation.z=Math.sin(l/4*n)/20*r;let c=Math.sin(l/4*n)/10;c=u.MathUtils.mapLinear(c,-.1,.1,null!==(a=null==o?void 0:o[0])&&void 0!==a?a:-.1,null!==(s=null==o?void 0:o[1])&&void 0!==s?s:.1),h.current.position.y=c*i,h.current.updateMatrix()})),a.createElement("group",s,a.createElement("group",{ref:(0,c.Z)([h,d]),matrixAutoUpdate:!1},e))}));var h=i(6227),f=i(3758),p=i(3520),m=i(587),g=i(8274),v=i(3748),y=i(6255),b=i(2809),_=i(2642);function x(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function w(e){var t=(0,h.L)(frameConsts.mobile),n=t.nodes,i=t.materials;return a.createElement("group",(0,r.Z)({},e,{dispose:null}),a.createElement("mesh",{receiveShadow:!0,geometry:n.Object003.geometry,material:i["Material #63.001"],position:[-.1,.07,0],rotation:[Math.PI/2,0,0],scale:.01},a.createElement("meshBasicMaterial",i["Material #63.001"])))}function M(e){var t=(0,h.L)(frameConsts.megaphone),n=t.nodes,i=t.materials;return a.createElement("group",(0,r.Z)({},e,{dispose:null}),a.createElement("mesh",{receiveShadow:!0,geometry:n.Box002.geometry,material:i["Material #63.001"],position:[.01,.11,-.02],rotation:[1.4,0,Math.PI/2],scale:.01},a.createElement("meshBasicMaterial",i["Material #63.001"])))}function S(e){var t=(0,h.L)(frameConsts.egg),n=t.nodes,i=t.materials;return a.createElement("group",(0,r.Z)({},e,{dispose:null}),a.createElement("mesh",{receiveShadow:!0,geometry:n.Object002.geometry,material:i["Material #63"],position:[0,.09,0],rotation:[Math.PI/2,0,0],scale:.01}))}var A=function(){setTimeout((function(){_.p8.fromTo(".floaters",{opacity:0},{opacity:1,duration:3})}),3e3)},E=function(e){return a.createElement(d,(0,r.Z)({},e,{rotationIntensity:5,floatIntensity:0,floatingRange:e.floatingRange}),e.children)},C=function(){var i=(0,a.useRef)(),o=(0,a.useState)(.5),c=(0,n.Z)(o,2),u=c[0],d=(c[1],function(o){var s,c,u,d,h,b,_,A=o.intensity,C=void 0===A?.5:A,T=o.shadows,R=void 0===T?"contact":T,B=o.environment,P=void 0===B?"city":B,k=o.preset,I=void 0===k?"rembrandt":k,L=a.useState({radius:0,width:0,height:0,depth:0}),D=(0,n.Z)(L,2),O=D[0],F=O.radius,N=O.height,z=(D[1],P?"string"==typeof P?{preset:P}:P:null),U="string"==typeof I?{rembrandt:{main:[1,2,1],fill:[-2,-.5,-2]},portrait:{main:[-1,2,.5],fill:[-1,.5,-1.5]},upfront:{main:[0,2,1],fill:[-1,.5,-1.5]},soft:{main:[-2,4,4],fill:[-1,.5,-1.5]}}[I]:I,H=null!==(s=null==R?void 0:R.bias)&&void 0!==s?s:-1e-4,G=(null==R?void 0:R.normalBias,null!==(c=null==R?void 0:R.size)&&void 0!==c?c:1024),V=null!==(u=null==R?void 0:R.offset)&&void 0!==u?u:0,j="contact"===R||"contact"===(null==R?void 0:R.type),W="accumulative"===R||"accumulative"===(null==R?void 0:R.type),J=function(e){for(var n=1;n<arguments.length;n++){var r=null!=arguments[n]?arguments[n]:{};n%2?x(Object(r),!0).forEach((function(n){t(e,n,r[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):x(Object(r)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))}))}return e}({},"object"===e(R)?R:{}),X=(0,l.z)((function(e){return e.viewport}));return(0,l.A)((function(){if(i.current){var e=.4*X.height/window.innerHeight;i.current.position.y=window.scrollY*e}})),a.createElement("group",null,a.createElement("ambientLight",{intensity:C/3}),a.createElement("spotLight",{penumbra:1,position:[U.main[0]*F,U.main[1]*F,U.main[2]*F],intensity:2*C,castShadow:!!R}),a.createElement("pointLight",{position:[U.fill[0]*F,U.fill[1]*F,U.fill[2]*F],intensity:C}),a.createElement("group",{position:[0,0,0]},a.createElement(E,{key:"meg-1",floatingRange:[-.1,.1],position:[-.4*X.width,.5*-X.height,0]},a.createElement(M,{scale:4})),a.createElement(E,{key:"egg-1",floatingRange:[-.1,.1],position:[.25*X.width,.1*X.height,0]},a.createElement(S,{scale:7})),a.createElement(E,{key:"mobile-1",floatingRange:[-.1,.1],position:[.46*X.width,-.6*X.height,0]},a.createElement(w,{scale:9}))),a.createElement("group",{position:[0,-2*X.height,0]},a.createElement(E,{key:"meg-2",floatingRange:[-.1,.1],position:[-.4*X.width,-.5*X.height,0]},a.createElement(M,{scale:4})),a.createElement(E,{key:"egg-2",floatingRange:[-.1,.1],position:[-.4*X.width,0*X.height,0]},a.createElement(S,{scale:7})),a.createElement(E,{key:"mobile-2",floatingRange:[-.1,.1],position:[.46*X.width,-.1*X.height,0]},a.createElement(w,{scale:9}))),a.createElement(f.S,{pixelated:!0}),a.createElement(p.E,null),a.createElement(m.q,null),a.createElement("group",{position:[0,-N/2-V/2,0]},j&&a.createElement(g.j,(0,r.Z)({scale:4*F,far:F,blur:2},J)),W&&a.createElement(AccumulativeShadows,(0,r.Z)({temporal:!0,frames:100,alphaTest:.9,toneMapped:!0,scale:4*F},J),a.createElement(v.mI,{amount:null!==(d=J.amount)&&void 0!==d?d:8,radius:null!==(h=J.radius)&&void 0!==h?h:F,ambient:null!==(b=J.ambient)&&void 0!==b?b:.5,intensity:null!==(_=J.intensity)&&void 0!==_?_:1,position:[U.main[0]*F,U.main[1]*F,U.main[2]*F],size:4*F,bias:-H,mapSize:G}))),P&&a.createElement(y.qA,z))});return a.createElement(s.Xz,{dpr:u,style:{position:"absolute",pointerEvents:"none"}},a.createElement(b.P,null),a.createElement(a.Suspense,{fallback:null},a.createElement("group",{ref:i},a.createElement(d,{shadows:!1,environment:"sunset",intensity:0})),a.createElement(A,null)))};function T(){var e=[].slice.call(document.querySelectorAll(".floaters"));e&&matchMedia("(min-width: 1025px)").matches&&e.forEach((function(e){(0,o.s)(e).render(a.createElement(a.Fragment,null,a.createElement(C,null)))}))}"complete"===document.readyState||"interactive"===document.readyState?T():document.addEventListener("DOMContentLoaded",T,!1)})(),(()=>{"use strict";var e=i(2642),t=i(7082);function n(){var t,n=[].slice.call(document.querySelectorAll(".intro-text .char"));e.p8.timeline({scrollTrigger:{trigger:".hero",start:"top top",end:"+=200vh",scrub:1,pin:matchMedia("(min-width: 1025px)").matches,anticipatePin:matchMedia("(min-width: 1025px)").matches?1:void 0,pinSpacing:!1,snap:matchMedia("(min-width: 1025px)").matches?{snapTo:1,delay:.1}:void 0}}).fromTo(".hero h1",{scale:1},{scale:.6}).fromTo(".hero h1",{opacity:1},{opacity:0}),e.p8.timeline({scrollTrigger:{trigger:".intro-text",scrub:1,start:"top bottom",end:"center center",snap:matchMedia("(min-width: 1025px)").matches?{snapTo:1,delay:.05}:void 0}}),e.p8.timeline({scrollTrigger:{trigger:".intro-text",scrub:1,start:matchMedia("(min-width: 1025px)").matches?"center center":"center bottom",end:matchMedia("(min-width: 1025px)").matches?"+=600vh":"center center",snap:matchMedia("(min-width: 1025px)").matches?{snapTo:1,delay:.05}:void 0,pin:matchMedia("(min-width: 1025px)").matches,anticipatePin:matchMedia("(min-width: 1025px)").matches?1:void 0}}).to(n,{opacity:1,stagger:{amount:1}}),e.p8.timeline({scrollTrigger:{trigger:".wireframe",start:matchMedia("(min-width: 1025px)").matches?"center center":"center bottom",end:matchMedia("(min-width: 1025px)").matches?"+=200vh":"center center",scrub:1,pin:matchMedia("(min-width: 1025px)").matches,anticipatePin:matchMedia("(min-width: 1025px)").matches?1:void 0,snap:matchMedia("(min-width: 1025px)").matches?{snapTo:1,delay:.05}:void 0}}).fromTo(".wireframe > div",{y:"100%",opacity:0},{y:0,opacity:1,duration:.5}),e.p8.timeline({scrollTrigger:{trigger:".phone",start:matchMedia("(min-width: 1025px)").matches?"center center":"center bottom",end:matchMedia("(min-width: 1025px)").matches?"+=400vh":"center center",scrub:1,pin:matchMedia("(min-width: 1025px)").matches,anticipatePin:matchMedia("(min-width: 1025px)").matches?1:void 0,snap:matchMedia("(min-width: 1025px)").matches?{snapTo:1,delay:.05}:void 0}}).fromTo(".phone > div",{y:"100%",opacity:0},{y:0,opacity:1,delay:.5}),e.p8.timeline({scrollTrigger:{trigger:".egg",scrub:1,start:"center 75%",end:"center center",snap:matchMedia("(min-width: 1025px)").matches?{snapTo:1,delay:.05}:void 0}}).fromTo(".egg img",{opacity:1,scale:1},{opacity:.2,scale:.4}),e.p8.timeline({scrollTrigger:{trigger:".egg",scrub:1,start:matchMedia("(min-width: 1025px)").matches?"center center":"center bottom",end:matchMedia("(min-width: 1025px)").matches?"+=600vh":"center center",pin:matchMedia("(min-width: 1025px)").matches,anticipatePin:matchMedia("(min-width: 1025px)").matches?1:void 0,snap:matchMedia("(min-width: 1025px)").matches?{snapTo:1,delay:.05}:void 0}}).to(".egg .char",{opacity:1,stagger:{amount:1}},0),e.p8.timeline({scrollTrigger:{trigger:".egg",scrub:1,start:"bottom 75%",end:"bottom top"}}).to(".egg img",{opacity:1,scale:1}),e.p8.timeline({scrollTrigger:{trigger:".model",start:matchMedia("(min-width: 1025px)").matches?"center center":"center bottom",end:matchMedia("(min-width: 1025px)").matches?"+=200vh":"center center",scrub:1,pin:matchMedia("(min-width: 1025px)").matches,anticipatePin:matchMedia("(min-width: 1025px)").matches?1:void 0,snap:matchMedia("(min-width: 1025px)").matches?{snapTo:1,delay:.05}:void 0}}).fromTo(".model > div",{y:"100%",opacity:0},{y:0,opacity:1,duration:.5}),null===(t=window)||void 0===t||t.loadTeamo()}e.p8.registerPlugin(t.i),"complete"===document.readyState||"interactive"===document.readyState?n():document.addEventListener("DOMContentLoaded",n,!1)})(),(()=>{"use strict";var e=i(7462),t=i(3324),n=i(7294),r=i(745),a=i(8715),o=i(8628),s=i(6227),l=i(5696),c=i(6493),u=i(3758),d=i(3520),h=i(587),f=i(2809),p=i(533),m=i(2642),g=i(7082);m.p8.registerPlugin(g.i);var v=function(){var r=(0,n.useState)(1),i=(0,t.Z)(r,2),m=i[0],g=i[1],v=(0,n.useRef)();function y(t){var r=(0,s.L)(frameConsts.mobile),i=r.nodes,a=r.materials;return n.createElement("group",(0,e.Z)({},t,{dispose:null}),n.createElement("mesh",{receiveShadow:!0,geometry:i.Object003.geometry,material:a["Material #63.001"],position:[-.1,.07,0],rotation:[Math.PI/2,0,0],scale:.01}))}s.L.preload(frameConsts.modelUrl);var b=function(){var e=(0,n.useRef)(null);return(0,a.A)((function(){window.mousePos&&!("ontouchstart"in window)&&e.current&&(e.current.rotation.y=1.2*parseFloat(window.mousePos.x),e.current.rotation.x=1.2*parseFloat(window.mousePos.y))})),n.createElement(n.Suspense,{fallback:null},n.createElement(l.H,{shadows:!1,environment:"sunset",intensity:.5,adjustCamera:matchMedia("(min-width: 1025px)").matches?1.3:1},n.createElement(c.xu,{args:[.2,.2,.2],ref:e},n.createElement(y,{position:[0,-.35,0],scale:4}),n.createElement("meshBasicMaterial",{transparent:!0,opacity:0}))),n.createElement(u.S,{pixelated:!0}),n.createElement(d.E,null),n.createElement(h.q,null),n.createElement(f.P,null))};return n.createElement(o.Xz,{ref:v,dpr:m,frameloop:matchMedia("(min-width: 1025px)").matches?"always":"demand"},n.createElement(p.A,{onIncline:function(){return g(1)},onDecline:function(){return g(.8)}}),n.createElement(b,null))};function y(){var e=document.querySelector(".phone figure");e&&(0,r.s)(e).render(n.createElement(n.Fragment,null,n.createElement(v,null)))}"complete"==document.readyState||"interactive"==document.readyState?y():document.addEventListener("DOMContentLoaded",y,!1)})(),(()=>{"use strict";var e=i(2642),t=i(7082);e.p8.registerPlugin(t.i),"complete"==document.readyState||"interactive"==document.readyState||document.addEventListener("DOMContentLoaded",(function(){}),!1)})(),(()=>{"use strict";var e=i(7462),t=i(3324),n=i(7294),r=i.t(n,2),a=i(745),o=i(8628),s=i(8715),l=i(9477),c=i(4671);let u=0;const d=(0,c.Z)((e=>(l.DefaultLoadingManager.onStart=(t,n,r)=>{e({active:!0,item:t,loaded:n,total:r,progress:(n-u)/(r-u)*100})},l.DefaultLoadingManager.onLoad=()=>{e({active:!1})},l.DefaultLoadingManager.onError=t=>e((e=>({errors:[...e.errors,t]}))),l.DefaultLoadingManager.onProgress=(t,n,r)=>{n===r&&(u=r),e({active:!0,item:t,loaded:n,total:r,progress:(n-u)/(r-u)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0})));var h=i(5878);const f=n.forwardRef((({envMap:t,resolution:r=256,frames:i=1/0,makeDefault:a,children:o,...c},u)=>{const d=(0,s.z)((({set:e})=>e)),f=(0,s.z)((({camera:e})=>e)),p=(0,s.z)((({size:e})=>e)),m=n.useRef(null),g=n.useRef(null),v=function(e,t,r){const i=(0,s.z)((e=>e.size)),a=(0,s.z)((e=>e.viewport)),o="number"==typeof e?e:i.width*a.dpr,c=i.height*a.dpr,u=("number"==typeof e?void 0:e)||{},{samples:d=0,depth:h,...f}=u,p=n.useMemo((()=>{const e=new l.WebGLRenderTarget(o,c,{minFilter:l.LinearFilter,magFilter:l.LinearFilter,type:l.HalfFloatType,...f});return h&&(e.depthTexture=new l.DepthTexture(o,c,l.FloatType)),e.samples=d,e}),[]);return n.useLayoutEffect((()=>{p.setSize(o,c),d&&(p.samples=d)}),[d,p,o,c]),n.useEffect((()=>()=>p.dispose()),[]),p}(r);n.useLayoutEffect((()=>{c.manual||(m.current.aspect=p.width/p.height)}),[p,c]),n.useLayoutEffect((()=>{m.current.updateProjectionMatrix()}));let y=0,b=null;const _="function"==typeof o;return(0,s.A)((e=>{_&&(i===1/0||y<i)&&(g.current.visible=!1,e.gl.setRenderTarget(v),b=e.scene.background,t&&(e.scene.background=t),e.gl.render(e.scene,m.current),e.scene.background=b,e.gl.setRenderTarget(null),g.current.visible=!0,y++)})),n.useLayoutEffect((()=>{if(a){const e=f;return d((()=>({camera:m.current}))),()=>d((()=>({camera:e})))}}),[m,a,d]),n.createElement(n.Fragment,null,n.createElement("perspectiveCamera",(0,e.Z)({ref:(0,h.Z)([m,u])},c),!_&&o),n.createElement("group",{ref:g},_&&o(v.texture)))}));var p=i(6227),m=i(5696),g=i(2809),v=i(3758),y=i(3520),b=i(587),_=i(3935);function x(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}const w=n.forwardRef(((t,r)=>{const{children:i,...a}=t;return n.Children.toArray(i).some(A)?n.createElement(n.Fragment,null,n.Children.map(i,(t=>A(t)?n.createElement(M,(0,e.Z)({},a,{ref:r}),t.props.children):t))):n.createElement(M,(0,e.Z)({},a,{ref:r}),i)}));w.displayName="Slot";const M=n.forwardRef(((e,t)=>{const{children:r,...i}=e;return n.isValidElement(r)?n.cloneElement(r,{...E(i,r.props),ref:x(t,r.ref)}):n.Children.count(r)>1?n.Children.only(null):null}));M.displayName="SlotClone";const S=({children:e})=>n.createElement(n.Fragment,null,e);function A(e){return n.isValidElement(e)&&e.type===S}function E(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?n[r]=(...e)=>{null==a||a(...e),null==i||i(...e)}:"style"===r?n[r]={...i,...a}:"className"===r&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}const C=["a","button","div","h2","h3","img","li","nav","ol","p","span","svg","ul"].reduce(((t,r)=>({...t,[r]:n.forwardRef(((t,i)=>{const{asChild:a,...o}=t,s=a?w:r;return n.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),n.createElement(s,(0,e.Z)({},o,{ref:i}))}))})),{}),T=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?n.useLayoutEffect:()=>{},R=n.forwardRef(((t,r)=>{var i,a;const{containerRef:o,style:s,...l}=t,c=null!==(i=null==o?void 0:o.current)&&void 0!==i?i:null===globalThis||void 0===globalThis||null===(a=globalThis.document)||void 0===a?void 0:a.body,[,u]=n.useState({});return T((()=>{u({})}),[]),c?_.createPortal(n.createElement(C.div,(0,e.Z)({"data-radix-portal":""},l,{ref:r,style:c===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...s}:void 0})),c):null})),B=R;var P=Object.prototype.hasOwnProperty;function k(e,t){var n,r;if(e===t)return!0;if(e&&t&&(n=e.constructor)===t.constructor){if(n===Date)return e.getTime()===t.getTime();if(n===RegExp)return e.toString()===t.toString();if(n===Array){if((r=e.length)===t.length)for(;r--&&k(e[r],t[r]););return-1===r}if(!n||"object"==typeof e){for(n in r=0,e){if(P.call(e,n)&&++r&&!P.call(t,n))return!1;if(!(n in t)||!k(e[n],t[n]))return!1}return Object.keys(t).length===r}}return e!=e&&t!=t}function I(e,t){if(Object.is(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;const n=Object.keys(e);if(n.length!==Object.keys(t).length)return!1;for(let r=0;r<n.length;r++)if(!Object.prototype.hasOwnProperty.call(t,n[r])||!Object.is(e[n[r]],t[n[r]]))return!1;return!0}var L=function(e,t,n,r){this.name=e,this.fn=t,this.args=n,this.modifiers=r};function D(e,t){return void 0===t&&(t="simple"),"object"==typeof e?e[t]:e}function O(e,t,n){if(e.length){var r=e.shift(),i=O(e,t,n);return r.perform(i,n)}return D(t)}function F(e,t,n){if(e.length){var r=e.shift(),i=F(e,t,n);return r.performAsync(i,n)}return function(e){return Promise.resolve(D(t,"async")(e))}}L.prototype._test=function(e){var t=this.fn;try{O(this.modifiers.slice(),t,this)(e)}catch(e){t=function(){return!1}}try{return O(this.modifiers.slice(),t,this)(e)}catch(e){return!1}},L.prototype._check=function(e){try{O(this.modifiers.slice(),this.fn,this)(e)}catch(e){if(O(this.modifiers.slice(),(function(e){return e}),this)(!1))return}if(!O(this.modifiers.slice(),this.fn,this)(e))throw null},L.prototype._testAsync=function(e){var t=this;return new Promise((function(n,r){F(t.modifiers.slice(),t.fn,t)(e).then((function(t){t?n(e):r(null)})).catch((function(e){return r(e)}))}))};var N=function(e,t,n){this.name=e,this.perform=t,this.performAsync=n},z=function(e){function t(n,r,i,a){for(var o=[],s=arguments.length-4;s-- >0;)o[s]=arguments[s+4];e.call(this,o),e.captureStackTrace&&e.captureStackTrace(this,t),this.rule=n,this.value=r,this.cause=i,this.target=a}return e&&(t.__proto__=e),t.prototype=Object.create(e&&e.prototype),t.prototype.constructor=t,t}(Error),U=function(e,t){void 0===e&&(e=[]),void 0===t&&(t=[]),this.chain=e,this.nextRuleModifiers=t};function H(e,t,n,r){if(t.length){var i=t.shift();i._testAsync(e).then((function(){H(e,t,n,r)}),(function(t){r(new z(i,e,t))}))}else n(e)}U.prototype._applyRule=function(e,t){var n=this;return function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];return n.chain.push(new L(t,e.apply(n,r),r,n.nextRuleModifiers)),n.nextRuleModifiers=[],n}},U.prototype._applyModifier=function(e,t){return this.nextRuleModifiers.push(new N(t,e.simple,e.async)),this},U.prototype._clone=function(){return new U(this.chain.slice(),this.nextRuleModifiers.slice())},U.prototype.test=function(e){return this.chain.every((function(t){return t._test(e)}))},U.prototype.testAll=function(e){var t=[];return this.chain.forEach((function(n){try{n._check(e)}catch(r){t.push(new z(n,e,r))}})),t},U.prototype.check=function(e){this.chain.forEach((function(t){try{t._check(e)}catch(n){throw new z(t,e,n)}}))},U.prototype.testAsync=function(e){var t=this;return new Promise((function(n,r){H(e,t.chain.slice(),n,r)}))};var G=function(e,t){return!(!t||"string"!=typeof e||0!==e.trim().length)||null==e};function V(){return"undefined"!=typeof Proxy?W(new U):J(new U)}var j={};function W(e){return new Proxy(e,{get:function(t,n){if(n in t)return t[n];var r=W(e._clone());return n in X?r._applyModifier(X[n],n):n in j?r._applyRule(j[n],n):n in Y?r._applyRule(Y[n],n):void 0}})}function J(e){var t=function(e,t){return Object.keys(e).forEach((function(n){t[n]=function(){for(var r=[],i=arguments.length;i--;)r[i]=arguments[i];var a=J(t._clone()),o=a._applyRule(e[n],n).apply(void 0,r);return o}})),t},n=t(Y,e),r=t(j,n);return Object.keys(X).forEach((function(e){Object.defineProperty(r,e,{get:function(){return J(r._clone())._applyModifier(X[e],e)}})})),r}V.extend=function(e){Object.assign(j,e)},V.clearCustomRules=function(){j={}};var X={not:{simple:function(e){return function(t){return!e(t)}},async:function(e){return function(t){return Promise.resolve(e(t)).then((function(e){return!e})).catch((function(){return!0}))}}},some:{simple:function(e){return function(t){return $(t).some((function(t){try{return e(t)}catch(e){return!1}}))}},async:function(e){return function(t){return Promise.all($(t).map((function(t){try{return e(t).catch((function(){return!1}))}catch(e){return!1}}))).then((function(e){return e.some(Boolean)}))}}},every:{simple:function(e){return function(t){return!1!==t&&$(t).every(e)}},async:function(e){return function(t){return Promise.all($(t).map(e)).then((function(e){return e.every(Boolean)}))}}},strict:{simple:function(e,t){return function(n){return K(t)&&n&&"object"==typeof n?Object.keys(t.args[0]).length===Object.keys(n).length&&e(n):e(n)}},async:function(e,t){return function(n){return Promise.resolve(e(n)).then((function(e){return K(t)&&n&&"object"==typeof n?Object.keys(t.args[0]).length===Object.keys(n).length&&e:e})).catch((function(){return!1}))}}}};function K(e){return e&&"schema"===e.name&&e.args.length>0&&"object"==typeof e.args[0]}function $(e){return"string"==typeof e?e.split(""):e}var Y={equal:function(e){return function(t){return t==e}},exact:function(e){return function(t){return t===e}},number:function(e){return void 0===e&&(e=!0),function(t){return"number"==typeof t&&(e||isFinite(t))}},integer:function(){return function(e){return(Number.isInteger||Q)(e)}},numeric:function(){return function(e){return!isNaN(parseFloat(e))&&isFinite(e)}},string:function(){return q("string")},boolean:function(){return q("boolean")},undefined:function(){return q("undefined")},null:function(){return q("null")},array:function(){return q("array")},object:function(){return q("object")},instanceOf:function(e){return function(t){return t instanceof e}},pattern:function(e){return function(t){return e.test(t)}},lowercase:function(){return function(e){return"boolean"==typeof e||e===e.toLowerCase()&&""!==e.trim()}},uppercase:function(){return function(e){return e===e.toUpperCase()&&""!==e.trim()}},vowel:function(){return function(e){return/^[aeiou]+$/i.test(e)}},consonant:function(){return function(e){return/^(?=[^aeiou])([a-z]+)$/i.test(e)}},first:function(e){return function(t){return t[0]==e}},last:function(e){return function(t){return t[t.length-1]==e}},empty:function(){return function(e){return 0===e.length}},length:function(e,t){return function(n){return n.length>=e&&n.length<=(t||e)}},minLength:function(e){return function(t){return t.length>=e}},maxLength:function(e){return function(t){return t.length<=e}},negative:function(){return function(e){return e<0}},positive:function(){return function(e){return e>=0}},between:function(e,t){return function(n){return n>=e&&n<=t}},range:function(e,t){return function(n){return n>=e&&n<=t}},lessThan:function(e){return function(t){return t<e}},lessThanOrEqual:function(e){return function(t){return t<=e}},greaterThan:function(e){return function(t){return t>e}},greaterThanOrEqual:function(e){return function(t){return t>=e}},even:function(){return function(e){return e%2==0}},odd:function(){return function(e){return e%2!=0}},includes:function(e){return function(t){return~t.indexOf(e)}},schema:function(e){return function(e){return{simple:function(t){var n=[];if(Object.keys(e).forEach((function(r){var i=e[r];try{i.check((t||{})[r])}catch(e){e.target=r,n.push(e)}})),n.length>0)throw n;return!0},async:function(t){var n=[],r=Object.keys(e).map((function(r){return e[r].testAsync((t||{})[r]).catch((function(e){e.target=r,n.push(e)}))}));return Promise.all(r).then((function(){if(n.length>0)throw n;return!0}))}}}(e)},passesAnyOf:function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];return function(t){return e.some((function(e){return e.test(t)}))}},optional:function(e,t){return void 0===t&&(t=!1),{simple:function(n){return G(n,t)||void 0===e.check(n)},async:function(n){return G(n,t)||e.testAsync(n)}}}};function q(e){return function(t){return Array.isArray(t)&&"array"===e||null===t&&"null"===e||typeof t===e}}function Q(e){return"number"==typeof e&&isFinite(e)&&Math.floor(e)===e}const Z=V;var ee="colors",te="sizes",ne="space",re={gap:ne,gridGap:ne,columnGap:ne,gridColumnGap:ne,rowGap:ne,gridRowGap:ne,inset:ne,insetBlock:ne,insetBlockEnd:ne,insetBlockStart:ne,insetInline:ne,insetInlineEnd:ne,insetInlineStart:ne,margin:ne,marginTop:ne,marginRight:ne,marginBottom:ne,marginLeft:ne,marginBlock:ne,marginBlockEnd:ne,marginBlockStart:ne,marginInline:ne,marginInlineEnd:ne,marginInlineStart:ne,padding:ne,paddingTop:ne,paddingRight:ne,paddingBottom:ne,paddingLeft:ne,paddingBlock:ne,paddingBlockEnd:ne,paddingBlockStart:ne,paddingInline:ne,paddingInlineEnd:ne,paddingInlineStart:ne,top:ne,right:ne,bottom:ne,left:ne,scrollMargin:ne,scrollMarginTop:ne,scrollMarginRight:ne,scrollMarginBottom:ne,scrollMarginLeft:ne,scrollMarginX:ne,scrollMarginY:ne,scrollMarginBlock:ne,scrollMarginBlockEnd:ne,scrollMarginBlockStart:ne,scrollMarginInline:ne,scrollMarginInlineEnd:ne,scrollMarginInlineStart:ne,scrollPadding:ne,scrollPaddingTop:ne,scrollPaddingRight:ne,scrollPaddingBottom:ne,scrollPaddingLeft:ne,scrollPaddingX:ne,scrollPaddingY:ne,scrollPaddingBlock:ne,scrollPaddingBlockEnd:ne,scrollPaddingBlockStart:ne,scrollPaddingInline:ne,scrollPaddingInlineEnd:ne,scrollPaddingInlineStart:ne,fontSize:"fontSizes",background:ee,backgroundColor:ee,backgroundImage:ee,borderImage:ee,border:ee,borderBlock:ee,borderBlockEnd:ee,borderBlockStart:ee,borderBottom:ee,borderBottomColor:ee,borderColor:ee,borderInline:ee,borderInlineEnd:ee,borderInlineStart:ee,borderLeft:ee,borderLeftColor:ee,borderRight:ee,borderRightColor:ee,borderTop:ee,borderTopColor:ee,caretColor:ee,color:ee,columnRuleColor:ee,fill:ee,outline:ee,outlineColor:ee,stroke:ee,textDecorationColor:ee,fontFamily:"fonts",fontWeight:"fontWeights",lineHeight:"lineHeights",letterSpacing:"letterSpacings",blockSize:te,minBlockSize:te,maxBlockSize:te,inlineSize:te,minInlineSize:te,maxInlineSize:te,width:te,minWidth:te,maxWidth:te,height:te,minHeight:te,maxHeight:te,flexBasis:te,gridTemplateColumns:te,gridTemplateRows:te,borderWidth:"borderWidths",borderTopWidth:"borderWidths",borderRightWidth:"borderWidths",borderBottomWidth:"borderWidths",borderLeftWidth:"borderWidths",borderStyle:"borderStyles",borderTopStyle:"borderStyles",borderRightStyle:"borderStyles",borderBottomStyle:"borderStyles",borderLeftStyle:"borderStyles",borderRadius:"radii",borderTopLeftRadius:"radii",borderTopRightRadius:"radii",borderBottomRightRadius:"radii",borderBottomLeftRadius:"radii",boxShadow:"shadows",textShadow:"shadows",transition:"transitions",zIndex:"zIndices"},ie=(e,t)=>"function"==typeof t?{"()":Function.prototype.toString.call(t)}:t,ae=()=>{const e=Object.create(null);return(t,n,...r)=>{const i=(e=>JSON.stringify(e,ie))(t);return i in e?e[i]:e[i]=n(t,...r)}},oe=Symbol.for("sxs.internal"),se=(e,t)=>Object.defineProperties(e,Object.getOwnPropertyDescriptors(t)),le=e=>{for(const t in e)return!0;return!1},{hasOwnProperty:ce}=Object.prototype,ue=e=>e.includes("-")?e:e.replace(/[A-Z]/g,(e=>"-"+e.toLowerCase())),de=/\s+(?![^()]*\))/,he=e=>t=>e(..."string"==typeof t?String(t).split(de):[t]),fe={appearance:e=>({WebkitAppearance:e,appearance:e}),backfaceVisibility:e=>({WebkitBackfaceVisibility:e,backfaceVisibility:e}),backdropFilter:e=>({WebkitBackdropFilter:e,backdropFilter:e}),backgroundClip:e=>({WebkitBackgroundClip:e,backgroundClip:e}),boxDecorationBreak:e=>({WebkitBoxDecorationBreak:e,boxDecorationBreak:e}),clipPath:e=>({WebkitClipPath:e,clipPath:e}),content:e=>({content:e.includes('"')||e.includes("'")||/^([A-Za-z]+\([^]*|[^]*-quote|inherit|initial|none|normal|revert|unset)$/.test(e)?e:`"${e}"`}),hyphens:e=>({WebkitHyphens:e,hyphens:e}),maskImage:e=>({WebkitMaskImage:e,maskImage:e}),maskSize:e=>({WebkitMaskSize:e,maskSize:e}),tabSize:e=>({MozTabSize:e,tabSize:e}),textSizeAdjust:e=>({WebkitTextSizeAdjust:e,textSizeAdjust:e}),userSelect:e=>({WebkitUserSelect:e,userSelect:e}),marginBlock:he(((e,t)=>({marginBlockStart:e,marginBlockEnd:t||e}))),marginInline:he(((e,t)=>({marginInlineStart:e,marginInlineEnd:t||e}))),maxSize:he(((e,t)=>({maxBlockSize:e,maxInlineSize:t||e}))),minSize:he(((e,t)=>({minBlockSize:e,minInlineSize:t||e}))),paddingBlock:he(((e,t)=>({paddingBlockStart:e,paddingBlockEnd:t||e}))),paddingInline:he(((e,t)=>({paddingInlineStart:e,paddingInlineEnd:t||e})))},pe=/([\d.]+)([^]*)/,me=(e,t)=>e.length?e.reduce(((e,n)=>(e.push(...t.map((e=>e.includes("&")?e.replace(/&/g,/[ +>|~]/.test(n)&&/&.*&/.test(e)?`:is(${n})`:n):n+" "+e))),e)),[]):t,ge=(e,t)=>e in ve&&"string"==typeof t?t.replace(/^((?:[^]*[^\w-])?)(fit-content|stretch)((?:[^\w-][^]*)?)$/,((t,n,r,i)=>n+("stretch"===r?`-moz-available${i};${ue(e)}:${n}-webkit-fill-available`:`-moz-fit-content${i};${ue(e)}:${n}fit-content`)+i)):String(t),ve={blockSize:1,height:1,inlineSize:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,width:1},ye=e=>e?e+"-":"",be=(e,t,n)=>e.replace(/([+-])?((?:\d+(?:\.\d*)?|\.\d+)(?:[Ee][+-]?\d+)?)?(\$|--)([$\w-]+)/g,((e,r,i,a,o)=>"$"==a==!!i?e:(r||"--"==a?"calc(":"")+"var(--"+("$"===a?ye(t)+(o.includes("$")?"":ye(n))+o.replace(/\$/g,"-"):o)+")"+(r||"--"==a?"*"+(r||"")+(i||"1")+")":""))),_e=/\s*,\s*(?![^()]*\))/,xe=Object.prototype.toString,we=(e,t,n,r,i)=>{let a,o,s;const l=(e,t,n)=>{let c,u;const d=e=>{for(c in e){const p=64===c.charCodeAt(0),m=p&&Array.isArray(e[c])?e[c]:[e[c]];for(u of m){const e=/[A-Z]/.test(f=c)?f:f.replace(/-[^]/g,(e=>e[1].toUpperCase())),m="object"==typeof u&&u&&u.toString===xe&&(!r.utils[e]||!t.length);if(e in r.utils&&!m){const t=r.utils[e];if(t!==o){o=t,d(t(u)),o=null;continue}}else if(e in fe){const t=fe[e];if(t!==s){s=t,d(t(u)),s=null;continue}}if(p&&(h=c.slice(1)in r.media?"@media "+r.media[c.slice(1)]:c,c=h.replace(/\(\s*([\w-]+)\s*(=|<|<=|>|>=)\s*([\w-]+)\s*(?:(<|<=|>|>=)\s*([\w-]+)\s*)?\)/g,((e,t,n,r,i,a)=>{const o=pe.test(t),s=.0625*(o?-1:1),[l,c]=o?[r,t]:[t,r];return"("+("="===n[0]?"":">"===n[0]===o?"max-":"min-")+l+":"+("="!==n[0]&&1===n.length?c.replace(pe,((e,t,r)=>Number(t)+s*(">"===n?1:-1)+r)):c)+(i?") and ("+(">"===i[0]?"min-":"max-")+l+":"+(1===i.length?a.replace(pe,((e,t,n)=>Number(t)+s*(">"===i?-1:1)+n)):a):"")+")"}))),m){const e=p?n.concat(c):[...n],r=p?[...t]:me(t,c.split(_e));void 0!==a&&i(Me(...a)),a=void 0,l(u,r,e)}else void 0===a&&(a=[[],t,n]),c=p||36!==c.charCodeAt(0)?c:`--${ye(r.prefix)}${c.slice(1).replace(/\$/g,"-")}`,u=m?u:"number"==typeof u?u&&e in Se?String(u)+"px":String(u):be(ge(e,null==u?"":u),r.prefix,r.themeMap[e]),a[0].push(`${p?`${c} `:`${ue(c)}:`}${u}`)}}var h,f};d(e),void 0!==a&&i(Me(...a)),a=void 0};l(e,t,n)},Me=(e,t,n)=>`${n.map((e=>`${e}{`)).join("")}${t.length?`${t.join(",")}{`:""}${e.join(";")}${t.length?"}":""}${Array(n.length?n.length+1:0).join("}")}`,Se={animationDelay:1,animationDuration:1,backgroundSize:1,blockSize:1,border:1,borderBlock:1,borderBlockEnd:1,borderBlockEndWidth:1,borderBlockStart:1,borderBlockStartWidth:1,borderBlockWidth:1,borderBottom:1,borderBottomLeftRadius:1,borderBottomRightRadius:1,borderBottomWidth:1,borderEndEndRadius:1,borderEndStartRadius:1,borderInlineEnd:1,borderInlineEndWidth:1,borderInlineStart:1,borderInlineStartWidth:1,borderInlineWidth:1,borderLeft:1,borderLeftWidth:1,borderRadius:1,borderRight:1,borderRightWidth:1,borderSpacing:1,borderStartEndRadius:1,borderStartStartRadius:1,borderTop:1,borderTopLeftRadius:1,borderTopRightRadius:1,borderTopWidth:1,borderWidth:1,bottom:1,columnGap:1,columnRule:1,columnRuleWidth:1,columnWidth:1,containIntrinsicSize:1,flexBasis:1,fontSize:1,gap:1,gridAutoColumns:1,gridAutoRows:1,gridTemplateColumns:1,gridTemplateRows:1,height:1,inlineSize:1,inset:1,insetBlock:1,insetBlockEnd:1,insetBlockStart:1,insetInline:1,insetInlineEnd:1,insetInlineStart:1,left:1,letterSpacing:1,margin:1,marginBlock:1,marginBlockEnd:1,marginBlockStart:1,marginBottom:1,marginInline:1,marginInlineEnd:1,marginInlineStart:1,marginLeft:1,marginRight:1,marginTop:1,maxBlockSize:1,maxHeight:1,maxInlineSize:1,maxWidth:1,minBlockSize:1,minHeight:1,minInlineSize:1,minWidth:1,offsetDistance:1,offsetRotate:1,outline:1,outlineOffset:1,outlineWidth:1,overflowClipMargin:1,padding:1,paddingBlock:1,paddingBlockEnd:1,paddingBlockStart:1,paddingBottom:1,paddingInline:1,paddingInlineEnd:1,paddingInlineStart:1,paddingLeft:1,paddingRight:1,paddingTop:1,perspective:1,right:1,rowGap:1,scrollMargin:1,scrollMarginBlock:1,scrollMarginBlockEnd:1,scrollMarginBlockStart:1,scrollMarginBottom:1,scrollMarginInline:1,scrollMarginInlineEnd:1,scrollMarginInlineStart:1,scrollMarginLeft:1,scrollMarginRight:1,scrollMarginTop:1,scrollPadding:1,scrollPaddingBlock:1,scrollPaddingBlockEnd:1,scrollPaddingBlockStart:1,scrollPaddingBottom:1,scrollPaddingInline:1,scrollPaddingInlineEnd:1,scrollPaddingInlineStart:1,scrollPaddingLeft:1,scrollPaddingRight:1,scrollPaddingTop:1,shapeMargin:1,textDecoration:1,textDecorationThickness:1,textIndent:1,textUnderlineOffset:1,top:1,transitionDelay:1,transitionDuration:1,verticalAlign:1,width:1,wordSpacing:1},Ae=e=>String.fromCharCode(e+(e>25?39:97)),Ee=e=>(e=>{let t,n="";for(t=Math.abs(e);t>52;t=t/52|0)n=Ae(t%52)+n;return Ae(t%52)+n})(((e,t)=>{let n=t.length;for(;n;)e=33*e^t.charCodeAt(--n);return e})(5381,JSON.stringify(e))>>>0),Ce=["themed","global","styled","onevar","resonevar","allvar","inline"],Te=e=>{if(e.href&&!e.href.startsWith(location.origin))return!1;try{return!!e.cssRules}catch(e){return!1}},Re=e=>{let t;const n=()=>{const{cssRules:e}=t.sheet;return[].map.call(e,((n,r)=>{const{cssText:i}=n;let a="";if(i.startsWith("--sxs"))return"";if(e[r-1]&&(a=e[r-1].cssText).startsWith("--sxs")){if(!n.cssRules.length)return"";for(const e in t.rules)if(t.rules[e].group===n)return`--sxs{--sxs:${[...t.rules[e].cache].join(" ")}}${i}`;return n.cssRules.length?`${a}${i}`:""}return i})).join("")},r=()=>{if(t){const{rules:e,sheet:n}=t;if(!n.deleteRule){for(;3===Object(Object(n.cssRules)[0]).type;)n.cssRules.splice(0,1);n.cssRules=[]}for(const t in e)delete e[t]}const i=Object(e).styleSheets||[];for(const e of i)if(Te(e)){for(let i=0,a=e.cssRules;a[i];++i){const o=Object(a[i]);if(1!==o.type)continue;const s=Object(a[i+1]);if(4!==s.type)continue;++i;const{cssText:l}=o;if(!l.startsWith("--sxs"))continue;const c=l.slice(14,-3).trim().split(/\s+/),u=Ce[c[0]];u&&(t||(t={sheet:e,reset:r,rules:{},toString:n}),t.rules[u]={group:s,index:i,cache:new Set(c)})}if(t)break}if(!t){const i=(e,t)=>({type:t,cssRules:[],insertRule(e,t){this.cssRules.splice(t,0,i(e,{import:3,undefined:1}[(e.toLowerCase().match(/^@([a-z]+)/)||[])[1]]||4))},get cssText(){return"@media{}"===e?`@media{${[].map.call(this.cssRules,(e=>e.cssText)).join("")}}`:e}});t={sheet:e?(e.head||e).appendChild(document.createElement("style")).sheet:i("","text/css"),rules:{},reset:r,toString:n}}const{sheet:a,rules:o}=t;for(let e=Ce.length-1;e>=0;--e){const t=Ce[e];if(!o[t]){const n=Ce[e+1],r=o[n]?o[n].index:a.cssRules.length;a.insertRule("@media{}",r),a.insertRule(`--sxs{--sxs:${e}}`,r),o[t]={group:a.cssRules[r+1],index:r,cache:new Set([e])}}Be(o[t])}};return r(),t},Be=e=>{const t=e.group;let n=t.cssRules.length;e.apply=e=>{try{t.insertRule(e,n),++n}catch(e){}}},Pe=Symbol(),ke=ae(),Ie=(e,t)=>ke(e,(()=>(...n)=>{let r={type:null,composers:new Set};for(const t of n)if(null!=t)if(t[oe]){null==r.type&&(r.type=t[oe].type);for(const e of t[oe].composers)r.composers.add(e)}else t.constructor!==Object||t.$$typeof?null==r.type&&(r.type=t):r.composers.add(Le(t,e));return null==r.type&&(r.type="span"),r.composers.size||r.composers.add(["PJLV",{},[],[],{},[]]),De(e,r,t)})),Le=({variants:e,compoundVariants:t,defaultVariants:n,...r},i)=>{const a=`${ye(i.prefix)}c-${Ee(r)}`,o=[],s=[],l=Object.create(null),c=[];for(const e in n)l[e]=String(n[e]);if("object"==typeof e&&e)for(const t in e){u=l,d=t,ce.call(u,d)||(l[t]="undefined");const n=e[t];for(const e in n){const r={[t]:String(e)};"undefined"===String(e)&&c.push(t);const i=n[e],a=[r,i,!le(i)];o.push(a)}}var u,d;if("object"==typeof t&&t)for(const e of t){let{css:t,...n}=e;t="object"==typeof t&&t||{};for(const e in n)n[e]=String(n[e]);const r=[n,t,!le(t)];s.push(r)}return[a,r,o,s,l,c]},De=(e,t,n)=>{const[r,i,a,o]=Oe(t.composers),s="function"==typeof t.type||t.type.$$typeof?(e=>{function t(){for(let n=0;n<t[Pe].length;n++){const[r,i]=t[Pe][n];e.rules[r].apply(i)}return t[Pe]=[],null}return t[Pe]=[],t.rules={},Ce.forEach((e=>t.rules[e]={apply:n=>t[Pe].push([e,n])})),t})(n):null,l=(s||n).rules,c=`.${r}${i.length>1?`:where(.${i.slice(1).join(".")})`:""}`,u=u=>{u="object"==typeof u&&u||Ne;const{css:d,...h}=u,f={};for(const e in a)if(delete h[e],e in u){let t=u[e];"object"==typeof t&&t?f[e]={"@initial":a[e],...t}:(t=String(t),f[e]="undefined"!==t||o.has(e)?t:a[e])}else f[e]=a[e];const p=new Set([...i]);for(const[r,i,a,o]of t.composers){n.rules.styled.cache.has(r)||(n.rules.styled.cache.add(r),we(i,[`.${r}`],[],e,(e=>{l.styled.apply(e)})));const t=Fe(a,f,e.media),s=Fe(o,f,e.media,!0);for(const i of t)if(void 0!==i)for(const[t,a,o]of i){const i=`${r}-${Ee(a)}-${t}`;p.add(i);const s=(o?n.rules.resonevar:n.rules.onevar).cache,c=o?l.resonevar:l.onevar;s.has(i)||(s.add(i),we(a,[`.${i}`],[],e,(e=>{c.apply(e)})))}for(const t of s)if(void 0!==t)for(const[i,a]of t){const t=`${r}-${Ee(a)}-${i}`;p.add(t),n.rules.allvar.cache.has(t)||(n.rules.allvar.cache.add(t),we(a,[`.${t}`],[],e,(e=>{l.allvar.apply(e)})))}}if("object"==typeof d&&d){const t=`${r}-i${Ee(d)}-css`;p.add(t),n.rules.inline.cache.has(t)||(n.rules.inline.cache.add(t),we(d,[`.${t}`],[],e,(e=>{l.inline.apply(e)})))}for(const e of String(u.className||"").trim().split(/\s+/))e&&p.add(e);const m=h.className=[...p].join(" ");return{type:t.type,className:m,selector:c,props:h,toString:()=>m,deferredInjector:s}};return se(u,{className:r,selector:c,[oe]:t,toString:()=>(n.rules.styled.cache.has(r)||u(),r)})},Oe=e=>{let t="";const n=[],r={},i=[];for(const[a,,,,o,s]of e){""===t&&(t=a),n.push(a),i.push(...s);for(const e in o){const t=o[e];(void 0===r[e]||"undefined"!==t||s.includes(t))&&(r[e]=t)}}return[t,n,r,new Set(i)]},Fe=(e,t,n,r)=>{const i=[];e:for(let[a,o,s]of e){if(s)continue;let e,l=0,c=!1;for(e in a){const r=a[e];let i=t[e];if(i!==r){if("object"!=typeof i||!i)continue e;{let e,t,a=0;for(const o in i){if(r===String(i[o])){if("@initial"!==o){const e=o.slice(1);(t=t||[]).push(e in n?n[e]:o.replace(/^@media ?/,"")),c=!0}l+=a,e=!0}++a}if(t&&t.length&&(o={["@media "+t.join(", ")]:o}),!e)continue e}}}(i[l]=i[l]||[]).push([r?"cv":`${e}-${a[e]}`,o,c])}return i},Ne={},ze=ae(),Ue=(e,t)=>ze(e,(()=>(...n)=>{const r=()=>{for(let r of n){r="object"==typeof r&&r||{};let n=Ee(r);if(!t.rules.global.cache.has(n)){if(t.rules.global.cache.add(n),"@import"in r){let e=[].indexOf.call(t.sheet.cssRules,t.rules.themed.group)-1;for(let n of[].concat(r["@import"]))n=n.includes('"')||n.includes("'")?n:`"${n}"`,t.sheet.insertRule(`@import ${n};`,e++);delete r["@import"]}we(r,[],[],e,(e=>{t.rules.global.apply(e)}))}}return""};return se(r,{toString:r})})),He=ae(),Ge=(e,t)=>He(e,(()=>n=>{const r=`${ye(e.prefix)}k-${Ee(n)}`,i=()=>{if(!t.rules.global.cache.has(r)){t.rules.global.cache.add(r);const i=[];we(n,[],[],e,(e=>i.push(e)));const a=`@keyframes ${r}{${i.join("")}}`;t.rules.global.apply(a)}return r};return se(i,{get name(){return i()},toString:i})})),Ve=class{constructor(e,t,n,r){this.token=null==e?"":String(e),this.value=null==t?"":String(t),this.scale=null==n?"":String(n),this.prefix=null==r?"":String(r)}get computedValue(){return"var("+this.variable+")"}get variable(){return"--"+ye(this.prefix)+ye(this.scale)+this.token}toString(){return this.computedValue}},je=ae(),We=(e,t)=>je(e,(()=>(n,r)=>{r="object"==typeof n&&n||Object(r);const i=`.${n=(n="string"==typeof n?n:"")||`${ye(e.prefix)}t-${Ee(r)}`}`,a={},o=[];for(const t in r){a[t]={};for(const n in r[t]){const i=`--${ye(e.prefix)}${t}-${n}`,s=be(String(r[t][n]),e.prefix,t);a[t][n]=new Ve(n,s,t,e.prefix),o.push(`${i}:${s}`)}}const s=()=>{if(o.length&&!t.rules.themed.cache.has(n)){t.rules.themed.cache.add(n);const i=`${r===e.theme?":root,":""}.${n}{${o.join(";")}}`;t.rules.themed.apply(i)}return n};return{...a,get className(){return s()},selector:i,toString:s}})),Je=ae(),Xe=ae(),Ke=i(3805);const $e=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?n.useLayoutEffect:()=>{},Ye=r["useId".toString()]||(()=>{});let qe=0;function Qe(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function Ze(...e){return n.useCallback(Qe(...e),e)}const et=n.forwardRef(((t,r)=>{const{children:i,...a}=t;return n.Children.toArray(i).some(rt)?n.createElement(n.Fragment,null,n.Children.map(i,(t=>rt(t)?n.createElement(tt,(0,e.Z)({},a,{ref:r}),t.props.children):t))):n.createElement(tt,(0,e.Z)({},a,{ref:r}),i)}));et.displayName="Slot";const tt=n.forwardRef(((e,t)=>{const{children:r,...i}=e;return n.isValidElement(r)?n.cloneElement(r,{...it(i,r.props),ref:Qe(t,r.ref)}):n.Children.count(r)>1?n.Children.only(null):null}));tt.displayName="SlotClone";const nt=({children:e})=>n.createElement(n.Fragment,null,e);function rt(e){return n.isValidElement(e)&&e.type===nt}function it(e,t){const n={...t};for(const r in t){const i=e[r],a=t[r];/^on[A-Z]/.test(r)?n[r]=(...e)=>{null==a||a(...e),null==i||i(...e)}:"style"===r?n[r]={...i,...a}:"className"===r&&(n[r]=[i,a].filter(Boolean).join(" "))}return{...e,...n}}const at=["a","button","div","h2","h3","img","li","nav","p","span","svg","ul"].reduce(((t,r)=>({...t,[r]:n.forwardRef(((t,i)=>{const{asChild:a,...o}=t,s=a?et:r;return n.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),t.as&&console.error(ot),n.createElement(s,(0,e.Z)({},o,{ref:i}))}))})),{}),ot="Warning: The `as` prop has been removed in favour of `asChild`. For details, see https://radix-ui.com/docs/primitives/overview/styling#changing-the-rendered-element",st=n.forwardRef(((t,r)=>n.createElement(at.span,(0,e.Z)({},t,{ref:r,style:{...t.style,position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal"}})))),lt=st,ct=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?n.useLayoutEffect:()=>{},ut=n.forwardRef(((t,r)=>{var i,a;const{containerRef:o,style:s,...l}=t,c=null!==(i=null==o?void 0:o.current)&&void 0!==i?i:null===globalThis||void 0===globalThis||null===(a=globalThis.document)||void 0===a?void 0:a.body,[,u]=n.useState({});return ct((()=>{u({})}),[]),c?_.createPortal(n.createElement(at.div,(0,e.Z)({"data-radix-portal":""},l,{ref:r,style:c===document.body?{position:"absolute",top:0,left:0,zIndex:2147483647,...s}:void 0})),c):null})),dt=n.forwardRef(((t,r)=>{const{children:i,width:a=10,height:o=5,...s}=t;return n.createElement(at.svg,(0,e.Z)({},s,{ref:r,width:a,height:o,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),t.asChild?i:n.createElement("polygon",{points:"0,0 30,0 15,10"}))})),ht=dt;function ft(e){const[t,r]=n.useState(void 0);return n.useEffect((()=>{if(e){const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let i,a;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;i=t.inlineSize,a=t.blockSize}else{const t=e.getBoundingClientRect();i=t.width,a=t.height}r({width:i,height:a})}));return t.observe(e,{box:"border-box"}),()=>{r(void 0),t.unobserve(e)}}}),[e]),t}let pt;const mt=new Map;function gt(){const e=[];mt.forEach(((t,n)=>{const r=n.getBoundingClientRect();var i,a;a=r,((i=t.rect).width!==a.width||i.height!==a.height||i.top!==a.top||i.right!==a.right||i.bottom!==a.bottom||i.left!==a.left)&&(t.rect=r,e.push(t))})),e.forEach((e=>{e.callbacks.forEach((t=>t(e.rect)))})),pt=requestAnimationFrame(gt)}function vt(e){const[t,r]=n.useState();return n.useEffect((()=>{if(e){const t=function(e,t){const n=mt.get(e);return void 0===n?(mt.set(e,{rect:{},callbacks:[t]}),1===mt.size&&(pt=requestAnimationFrame(gt))):(n.callbacks.push(t),t(e.getBoundingClientRect())),()=>{const n=mt.get(e);if(void 0===n)return;const r=n.callbacks.indexOf(t);r>-1&&n.callbacks.splice(r,1),0===n.callbacks.length&&(mt.delete(e),0===mt.size&&cancelAnimationFrame(pt))}}(e,r);return()=>{r(void 0),t()}}}),[e]),t}function yt(e,t=[]){let r=[];const i=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const i=(null==r?void 0:r[e])||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:i}})),[r,i])}};return i.scopeName=e,[function(t,i){const a=n.createContext(i),o=r.length;function s(t){const{scope:r,children:i,...s}=t,l=(null==r?void 0:r[e][o])||a,c=n.useMemo((()=>s),Object.values(s));return n.createElement(l.Provider,{value:c},i)}return r=[...r,i],s.displayName=t+"Provider",[s,function(r,s){const l=(null==s?void 0:s[e][o])||a,c=n.useContext(l);if(c)return c;if(void 0!==i)return i;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},bt(i,...t)]}function bt(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const i=r.reduce(((t,{useScope:n,scopeName:r})=>({...t,...n(e)[`__scope${r}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:i})),[i])}};return r.scopeName=t.scopeName,r}function _t(e,t,n){const r=e["x"===n?"left":"top"],i="x"===n?"width":"height",a=e[i],o=t[i];return{before:r-o,start:r,center:r+(a-o)/2,end:r+a-o,after:r+a}}function xt(e){return{position:"absolute",top:0,left:0,minWidth:"max-content",willChange:"transform",transform:`translate3d(${Math.round(e.x+window.scrollX)}px, ${Math.round(e.y+window.scrollY)}px, 0)`}}function wt(e,t,n,r,i){const a="top"===t||"bottom"===t,o=i?i.width:0,s=i?i.height:0,l=o/2+r;let c="",u="";return a?(c={start:`${l}px`,center:"center",end:e.width-l+"px"}[n],u="top"===t?`${e.height+s}px`:-s+"px"):(c="left"===t?`${e.width+s}px`:-s+"px",u={start:`${l}px`,center:"center",end:e.height-l+"px"}[n]),`${c} ${u}`}const Mt={position:"fixed",top:0,left:0,opacity:0,transform:"translate3d(0, -200%, 0)"},St={position:"absolute",opacity:0};function At({popperSize:e,arrowSize:t,arrowOffset:n,side:r,align:i}){const a=(e.width-t.width)/2,o=(e.height-t.width)/2,s={top:0,right:90,bottom:180,left:-90}[r],l=Math.max(t.width,t.height),c={width:`${l}px`,height:`${l}px`,transform:`rotate(${s}deg)`,willChange:"transform",position:"absolute",[r]:"100%",direction:Et(r,i)};return"top"!==r&&"bottom"!==r||("start"===i&&(c.left=`${n}px`),"center"===i&&(c.left=`${a}px`),"end"===i&&(c.right=`${n}px`)),"left"!==r&&"right"!==r||("start"===i&&(c.top=`${n}px`),"center"===i&&(c.top=`${o}px`),"end"===i&&(c.bottom=`${n}px`)),c}function Et(e,t){return("top"!==e&&"right"!==e||"end"!==t)&&("bottom"!==e&&"left"!==e||"end"===t)?"ltr":"rtl"}function Ct(e){return{top:"bottom",right:"left",bottom:"top",left:"right"}[e]}function Tt(e,t){return{top:e.top<t.top,right:e.right>t.right,bottom:e.bottom>t.bottom,left:e.left<t.left}}const[Rt,Bt]=yt("Popper"),[Pt,kt]=Rt("Popper"),It=n.forwardRef(((t,r)=>{const{__scopePopper:i,virtualRef:a,...o}=t,s=kt("PopperAnchor",i),l=n.useRef(null),c=Ze(r,l);return n.useEffect((()=>{s.onAnchorChange((null==a?void 0:a.current)||l.current)})),a?null:n.createElement(at.div,(0,e.Z)({},o,{ref:c}))})),[Lt,Dt]=Rt("PopperContent"),Ot=n.forwardRef(((t,r)=>{const{__scopePopper:i,side:a="bottom",sideOffset:o,align:s="center",alignOffset:l,collisionTolerance:c,avoidCollisions:u=!0,...d}=t,h=kt("PopperContent",i),[f,p]=n.useState(),m=vt(h.anchor),[g,v]=n.useState(null),y=ft(g),[b,_]=n.useState(null),x=ft(b),w=Ze(r,(e=>v(e))),M=function(){const[e,t]=n.useState(void 0);return n.useEffect((()=>{let e;function n(){t({width:window.innerWidth,height:window.innerHeight})}function r(){window.clearTimeout(e),e=window.setTimeout(n,100)}return n(),window.addEventListener("resize",r),()=>window.removeEventListener("resize",r)}),[]),e}(),S=M?DOMRect.fromRect({...M,x:0,y:0}):void 0,{popperStyles:A,arrowStyles:E,placedSide:C,placedAlign:T}=function({anchorRect:e,popperSize:t,arrowSize:n,arrowOffset:r=0,side:i,sideOffset:a=0,align:o,alignOffset:s=0,shouldAvoidCollisions:l=!0,collisionBoundariesRect:c,collisionTolerance:u=0}){if(!e||!t||!c)return{popperStyles:Mt,arrowStyles:St};const d=function(e,t,n=0,r=0,i){const a=i?i.height:0,o=_t(t,e,"x"),s=_t(t,e,"y"),l=s.before-n-a,c=s.after+n+a,u=o.before-n-a,d=o.after+n+a;return{top:{start:{x:o.start+r,y:l},center:{x:o.center,y:l},end:{x:o.end-r,y:l}},right:{start:{x:d,y:s.start+r},center:{x:d,y:s.center},end:{x:d,y:s.end-r}},bottom:{start:{x:o.start+r,y:c},center:{x:o.center,y:c},end:{x:o.end-r,y:c}},left:{start:{x:u,y:s.start+r},center:{x:u,y:s.center},end:{x:u,y:s.end-r}}}}(t,e,a,s,n),h=d[i][o];if(!1===l){const e=xt(h);let a=St;return n&&(a=At({popperSize:t,arrowSize:n,arrowOffset:r,side:i,align:o})),{popperStyles:{...e,"--radix-popper-transform-origin":wt(t,i,o,r,n)},arrowStyles:a,placedSide:i,placedAlign:o}}const f=DOMRect.fromRect({...t,...h}),p=(m=c,g=u,DOMRect.fromRect({width:m.width-2*g,height:m.height-2*g,x:m.left+g,y:m.top+g}));var m,g;const v=Tt(f,p),y=d[Ct(i)][o],b=function(e,t,n){const r=Ct(e);return t[e]&&!n[r]?r:e}(i,v,Tt(DOMRect.fromRect({...t,...y}),p)),_=function(e,t,n,r,i){const a="top"===n||"bottom"===n,o=a?"left":"top",s=a?"right":"bottom",l=a?"width":"height",c=t[l]>e[l];return"start"!==r&&"center"!==r||!(i[o]&&c||i[s]&&!c)?"end"!==r&&"center"!==r||!(i[s]&&c||i[o]&&!c)?r:"start":"end"}(t,e,i,o,v),x=xt(d[b][_]);let w=St;return n&&(w=At({popperSize:t,arrowSize:n,arrowOffset:r,side:b,align:_})),{popperStyles:{...x,"--radix-popper-transform-origin":wt(t,b,_,r,n)},arrowStyles:w,placedSide:b,placedAlign:_}}({anchorRect:m,popperSize:y,arrowSize:x,arrowOffset:f,side:a,sideOffset:o,align:s,alignOffset:l,shouldAvoidCollisions:u,collisionBoundariesRect:S,collisionTolerance:c}),R=void 0!==C;return n.createElement("div",{style:A,"data-radix-popper-content-wrapper":""},n.createElement(Lt,{scope:i,arrowStyles:E,onArrowChange:_,onArrowOffsetChange:p},n.createElement(at.div,(0,e.Z)({"data-side":C,"data-align":T},d,{style:{...d.style,animation:R?void 0:"none"},ref:w}))))})),Ft=n.forwardRef((function(t,r){const{__scopePopper:i,offset:a,...o}=t,s=Dt("PopperArrow",i),{onArrowOffsetChange:l}=s;return n.useEffect((()=>l(a)),[l,a]),n.createElement("span",{style:{...s.arrowStyles,pointerEvents:"none"}},n.createElement("span",{ref:s.onArrowChange,style:{display:"inline-block",verticalAlign:"top",pointerEvents:"auto"}},n.createElement(ht,(0,e.Z)({},o,{ref:r,style:{...o.style,display:"block"}}))))})),Nt=e=>{const{__scopePopper:t,children:r}=e,[i,a]=n.useState(null);return n.createElement(Pt,{scope:t,anchor:i,onAnchorChange:a},r)},zt=It,Ut=Ot,Ht=Ft,Gt=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?n.useLayoutEffect:()=>{},Vt=e=>{const{present:t,children:r}=e,i=function(e){const[t,r]=n.useState(),i=n.useRef({}),a=n.useRef(e),o=n.useRef("none"),s=e?"mounted":"unmounted",[l,c]=function(e,t){return n.useReducer(((e,n)=>{const r=t[e][n];return null!=r?r:e}),e)}(s,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return n.useEffect((()=>{const e=jt(i.current);o.current="mounted"===l?e:"none"}),[l]),Gt((()=>{const t=i.current,n=a.current;if(n!==e){const r=o.current,i=jt(t);if(e)c("MOUNT");else if("none"===i||"none"===(null==t?void 0:t.display))c("UNMOUNT");else{const e=r!==i;c(n&&e?"ANIMATION_OUT":"UNMOUNT")}a.current=e}}),[e,c]),Gt((()=>{if(t){const e=e=>{const n=jt(i.current).includes(e.animationName);e.target===t&&n&&c("ANIMATION_END")},n=e=>{e.target===t&&(o.current=jt(i.current))};return t.addEventListener("animationstart",n),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",n),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}}),[t,c]),{isPresent:["mounted","unmountSuspended"].includes(l),ref:n.useCallback((e=>{e&&(i.current=getComputedStyle(e)),r(e)}),[])}}(t),a="function"==typeof r?r({present:i.isPresent}):n.Children.only(r),o=function(...e){return n.useCallback(function(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}(...e),e)}(i.ref,a.ref);return"function"==typeof r||i.isPresent?n.cloneElement(a,{ref:o}):null};function jt(e){return(null==e?void 0:e.animationName)||"none"}function Wt(e){const t=n.useRef(e);return n.useEffect((()=>{t.current=e}),[e]),t.current}function Jt(e){const t=n.useRef(e);return n.useEffect((()=>{t.current=e})),n.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}function Xt(e,t,{checkForDefaultPrevented:n=!0}={}){return function(r){if(null==e||e(r),!1===n||!r.defaultPrevented)return null==t?void 0:t(r)}}Vt.displayName="Presence";const[Kt,$t]=yt("Tooltip",[Bt]),Yt=Bt(),[qt,Qt]=Kt("TooltipProvider",{isOpenDelayed:!0,delayDuration:700,onOpen:()=>{},onClose:()=>{}}),[Zt,en]=Kt("Tooltip"),tn=n.forwardRef(((t,r)=>{const{__scopeTooltip:i,...a}=t,o=en("TooltipTrigger",i),s=Yt(i),l=Ze(r,o.onTriggerChange),c=n.useRef(!1),u=n.useCallback((()=>c.current=!1),[]);return n.useEffect((()=>()=>document.removeEventListener("mouseup",u)),[u]),n.createElement(zt,(0,e.Z)({asChild:!0},s),n.createElement(at.button,(0,e.Z)({"aria-describedby":o.open?o.contentId:void 0,"data-state":o.stateAttribute},a,{ref:l,onMouseEnter:Xt(t.onMouseEnter,o.onTriggerEnter),onMouseLeave:Xt(t.onMouseLeave,o.onClose),onMouseDown:Xt(t.onMouseDown,(()=>{o.onClose(),c.current=!0,document.addEventListener("mouseup",u,{once:!0})})),onFocus:Xt(t.onFocus,(()=>{c.current||o.onOpen()})),onBlur:Xt(t.onBlur,o.onClose),onClick:Xt(t.onClick,o.onClose)})))})),nn=n.forwardRef(((t,r)=>{const{forceMount:i,...a}=t,o=en("TooltipContent",t.__scopeTooltip);return n.createElement(Vt,{present:i||o.open},n.createElement(rn,(0,e.Z)({ref:r},a)))})),rn=n.forwardRef(((t,r)=>{const{__scopeTooltip:i,children:a,"aria-label":o,portalled:s=!0,...l}=t,c=en("TooltipContent",i),u=Yt(i),d=s?ut:n.Fragment,{onClose:h}=c;return function(e){const t=function(e){const t=n.useRef(e);return n.useEffect((()=>{t.current=e})),n.useMemo((()=>(...e)=>{var n;return null===(n=t.current)||void 0===n?void 0:n.call(t,...e)}),[])}(e);n.useEffect((()=>{const e=e=>{"Escape"===e.key&&t(e)};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[t])}((()=>h())),n.useEffect((()=>(document.addEventListener("tooltip.open",h),()=>document.removeEventListener("tooltip.open",h))),[h]),n.createElement(d,null,n.createElement(on,{__scopeTooltip:i}),n.createElement(Ut,(0,e.Z)({"data-state":c.stateAttribute},u,l,{ref:r,style:{...l.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)"}}),n.createElement(nt,null,a),n.createElement(lt,{id:c.contentId,role:"tooltip"},o||a)))})),an=n.forwardRef(((t,r)=>{const{__scopeTooltip:i,...a}=t,o=Yt(i);return n.createElement(Ht,(0,e.Z)({},o,a,{ref:r}))}));function on(e){const{__scopeTooltip:t}=e,r=en("CheckTriggerMoved",t),i=vt(r.trigger),a=null==i?void 0:i.left,o=Wt(a),s=null==i?void 0:i.top,l=Wt(s),c=r.onClose;return n.useEffect((()=>{(void 0!==o&&o!==a||void 0!==l&&l!==s)&&c()}),[c,o,l,a,s]),null}const sn=e=>{const{__scopeTooltip:t,children:r,open:i,defaultOpen:a=!1,onOpenChange:o,delayDuration:s}=e,l=Qt("Tooltip",t),c=Yt(t),[u,d]=n.useState(null),h=function(e){const[t,r]=n.useState(Ye());return $e((()=>{r((e=>null!=e?e:String(qe++)))}),[e]),t?`radix-${t}`:""}(),f=n.useRef(0),p=null!=s?s:l.delayDuration,m=n.useRef(!1),{onOpen:g,onClose:v}=l,[y=!1,b]=function({prop:e,defaultProp:t,onChange:r=(()=>{})}){const[i,a]=function({defaultProp:e,onChange:t}){const r=n.useState(e),[i]=r,a=n.useRef(i),o=Jt(t);return n.useEffect((()=>{a.current!==i&&(o(i),a.current=i)}),[i,a,o]),r}({defaultProp:t,onChange:r}),o=void 0!==e,s=o?e:i,l=Jt(r);return[s,n.useCallback((t=>{if(o){const n=t,r="function"==typeof t?n(e):t;r!==e&&l(r)}else a(t)}),[o,e,a,l])]}({prop:i,defaultProp:a,onChange:e=>{e&&(document.dispatchEvent(new CustomEvent("tooltip.open")),g()),null==o||o(e)}}),_=n.useMemo((()=>y?m.current?"delayed-open":"instant-open":"closed"),[y]),x=n.useCallback((()=>{window.clearTimeout(f.current),m.current=!1,b(!0)}),[b]),w=n.useCallback((()=>{window.clearTimeout(f.current),f.current=window.setTimeout((()=>{m.current=!0,b(!0)}),p)}),[p,b]);return n.useEffect((()=>()=>window.clearTimeout(f.current)),[]),n.createElement(Nt,c,n.createElement(Zt,{scope:t,contentId:h,open:y,stateAttribute:_,trigger:u,onTriggerChange:d,onTriggerEnter:n.useCallback((()=>{l.isOpenDelayed?w():x()}),[l.isOpenDelayed,w,x]),onOpen:n.useCallback(x,[x]),onClose:n.useCallback((()=>{window.clearTimeout(f.current),b(!1),v()}),[b,v])},r))},ln=tn,cn=nn,un=an;function dn(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}let hn;!function(e){e[e.UNSUPPORTED_INPUT=0]="UNSUPPORTED_INPUT",e[e.NO_COMPONENT_FOR_TYPE=1]="NO_COMPONENT_FOR_TYPE",e[e.UNKNOWN_INPUT=2]="UNKNOWN_INPUT",e[e.DUPLICATE_KEYS=3]="DUPLICATE_KEYS",e[e.ALREADY_REGISTERED_TYPE=4]="ALREADY_REGISTERED_TYPE",e[e.CLIPBOARD_ERROR=5]="CLIPBOARD_ERROR",e[e.THEME_ERROR=6]="THEME_ERROR",e[e.PATH_DOESNT_EXIST=7]="PATH_DOESNT_EXIST",e[e.INPUT_TYPE_OVERRIDE=8]="INPUT_TYPE_OVERRIDE",e[e.EMPTY_KEY=9]="EMPTY_KEY"}(hn||(hn={}));const fn={[hn.UNSUPPORTED_INPUT]:(e,t)=>[`An input with type \`${e}\` input was found at path \`${t}\` but it's not supported yet.`],[hn.NO_COMPONENT_FOR_TYPE]:(e,t)=>[`Type \`${e}\` found at path \`${t}\` can't be displayed in panel because no component supports it yet.`],[hn.UNKNOWN_INPUT]:(e,t)=>[`input at path \`${e}\` is not recognized.`,t],[hn.DUPLICATE_KEYS]:(e,t,n)=>[`Key \`${e}\` of path \`${t}\` already exists at path \`${n}\`. Even nested keys need to be unique. Rename one of the keys.`],[hn.ALREADY_REGISTERED_TYPE]:e=>[`Type ${e} has already been registered. You can't register a component with the same type.`],[hn.CLIPBOARD_ERROR]:e=>["Error copying the value",e],[hn.THEME_ERROR]:(e,t)=>[`Error accessing the theme \`${e}.${t}\` value.`],[hn.PATH_DOESNT_EXIST]:e=>[`Error getting the value at path \`${e}\`. There is probably an error in your \`render\` function.`],[hn.PATH_DOESNT_EXIST]:e=>[`Error accessing the value at path \`${e}\``],[hn.INPUT_TYPE_OVERRIDE]:(e,t,n)=>[`Input at path \`${e}\` already exists with type: \`${t}\`. Its type cannot be overridden with type \`${n}\`.`],[hn.EMPTY_KEY]:()=>["Keys can not be empty, if you want to hide a label use whitespace."]};function pn(e,t,...n){const[r,...i]=fn[t](...n);console[e]("LEVA: "+r,...i)}const mn=pn.bind(null,"warn"),gn=pn.bind(null,"log"),vn=["value"],yn=["schema"],bn=["value"],_n=[],xn={};function wn(e){let{value:t}=e,n=dn(e,vn);for(let e of _n){const r=e(t,n);if(r)return r}}function Mn(e,t){let{schema:n}=t,r=dn(t,yn);e in xn?mn(hn.ALREADY_REGISTERED_TYPE,e):(_n.push(((t,r)=>n(t,r)&&e)),xn[e]=r)}function Sn(e,t,n,r){const{normalize:i}=xn[e];if(i)return i(t,n,r);if("object"!=typeof t||!("value"in t))return{value:t};const{value:a}=t;return{value:a,settings:dn(t,bn)}}function An(e,t,n){const{format:r}=xn[e];return r?r(t,n):t}function En(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function Cn(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Tn(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Cn(Object(n),!0).forEach((function(t){En(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Cn(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}const Rn=(e,t,n)=>e>n?n:e<t?t:e,Bn=e=>{if(""===e||"number"==typeof e)return e;try{const t=Hn(e);if(!isNaN(t))return t}catch(e){}return parseFloat(e)},Pn=Math.log(10);function kn(e){let t=Math.abs(+String(e).replace(".",""));if(0===t)return.01;for(;0!==t&&t%10==0;)t/=10;const n=Math.floor(Math.log(t)/Pn)+1,r=Math.floor(Math.log10(Math.abs(e))),i=Math.pow(10,r-n);return Math.max(i,.001)}const In=(e,t,n)=>n===t?0:(Rn(e,t,n)-t)/(n-t),Ln=(e,t,n)=>e*(n-t)+t,Dn=/\(([0-9+\-*/^ .]+)\)/,On=/(\d+(?:\.\d+)?) ?\^ ?(\d+(?:\.\d+)?)/,Fn=/(\d+(?:\.\d+)?) ?\* ?(\d+(?:\.\d+)?)/,Nn=/(\d+(?:\.\d+)?) ?\/ ?(\d+(?:\.\d+)?)/,zn=/(\d+(?:\.\d+)?) ?\+ ?(\d+(?:\.\d+)?)/,Un=/(\d+(?:\.\d+)?) ?- ?(\d+(?:\.\d+)?)/;function Hn(e){if(isNaN(Number(e))){if(Dn.test(e)){const t=e.replace(Dn,((e,t)=>String(Hn(t))));return Hn(t)}if(On.test(e))return Hn(e.replace(On,((e,t,n)=>String(Math.pow(Number(t),Number(n))))));if(Fn.test(e)){const t=e.replace(Fn,((e,t,n)=>String(Number(t)*Number(n))));return Hn(t)}if(Nn.test(e)){const t=e.replace(Nn,((e,t,n)=>{if(0!=n)return String(Number(t)/Number(n));throw new Error("Division by zero")}));return Hn(t)}if(zn.test(e)){const t=e.replace(zn,((e,t,n)=>String(Number(t)+Number(n))));return Hn(t)}if(Un.test(e)){const t=e.replace(Un,((e,t,n)=>String(Number(t)-Number(n))));return Hn(t)}return Number(e)}return Number(e)}function Gn(e){return"[object Object]"===Object.prototype.toString.call(e)}let Vn,jn;var Wn;(Wn=Vn||(Vn={})).BUTTON="BUTTON",Wn.BUTTON_GROUP="BUTTON_GROUP",Wn.MONITOR="MONITOR",Wn.FOLDER="FOLDER",function(e){e.SELECT="SELECT",e.IMAGE="IMAGE",e.NUMBER="NUMBER",e.COLOR="COLOR",e.STRING="STRING",e.BOOLEAN="BOOLEAN",e.INTERVAL="INTERVAL",e.VECTOR3D="VECTOR3D",e.VECTOR2D="VECTOR2D"}(jn||(jn={}));const Jn=["type","__customInput"],Xn=["render","label","optional","order","disabled","hint","onChange","onEditStart","onEditEnd","transient"],Kn=["type"];function $n(e,t,n={},r){var i,a;if("object"!=typeof e||Array.isArray(e))return{type:r,input:e,options:Tn({key:t,label:t,optional:!1,disabled:!1,order:0},n)};if("__customInput"in e){const{type:n,__customInput:r}=e;return $n(r,t,dn(e,Jn),n)}const{render:o,label:s,optional:l,order:c=0,disabled:u,hint:d,onChange:h,onEditStart:f,onEditEnd:p,transient:m}=e,g=dn(e,Xn),v=Tn({render:o,key:t,label:null!=s?s:t,hint:d,transient:null!=m?m:!!h,onEditStart:f,onEditEnd:p,disabled:u,optional:l,order:c},n);let y,{type:b}=g,_=dn(g,Kn);return b=null!=r?r:b,b in Vn?{type:b,input:_,options:v}:(y=r&&Gn(_)&&"value"in _?_.value:Gn(x=_)&&0===Object.keys(x).length?void 0:_,{type:b,input:y,options:Tn(Tn({},v),{},{onChange:h,optional:null!==(i=v.optional)&&void 0!==i&&i,disabled:null!==(a=v.disabled)&&void 0!==a&&a})});var x}function Yn(e,t,n,r,i){const{value:a,type:o,settings:s}=e;e.value=Qn({type:o,value:a,settings:s},t,n,r),e.fromPanel=i}const qn=function(e,t,n){this.type="LEVA_ERROR",this.message="LEVA: "+e,this.previousValue=t,this.error=n};function Qn({type:e,value:t,settings:n},r,i,a){const o="SELECT"!==e&&"function"==typeof r?r(t):r;let s;try{s=function(e,t,n,r,i,a){const{sanitize:o}=xn[e];return o?o(t,n,r,i,a):t}(e,o,n,t,i,a)}catch(e){throw new qn(`The value \`${r}\` did not result in a correct value.`,t,e)}return k(s,t)?t:s}const Zn=(e,t,n=!1)=>{let r=0;return function(){const i=arguments,a=n&&!r,o=()=>e.apply(this,i);window.clearTimeout(r),r=window.setTimeout(o,t),a&&o()}},er=e=>e.shiftKey?5:e.altKey?.2:1,tr=["value"],nr=["min","max"],rr=(e,{min:t=-1/0,max:n=1/0,suffix:r})=>{const i=parseFloat(e);if(""===e||isNaN(i))throw Error("Invalid number");const a=Rn(i,t,n);return r?a+r:a},ir=e=>{let{value:t}=e,n=dn(e,tr);const{min:r=-1/0,max:i=1/0}=n,a=dn(n,nr);let o=parseFloat(t);const s="string"==typeof t?t.substring((""+o).length):void 0;o=Rn(o,r,i);let l=n.step;l||(Number.isFinite(r)?l=Number.isFinite(i)?+(Math.abs(i-r)/100).toPrecision(1):+(Math.abs(o-r)/100).toPrecision(1):Number.isFinite(i)&&(l=+(Math.abs(i-o)/100).toPrecision(1)));const c=l?10*kn(l):kn(o);return l=l||c/10,{value:s?o+s:o,settings:Tn({initialValue:o,step:l,pad:Math.round(Rn(Math.log10(1/c),0,2)),min:r,max:i,suffix:s},a)}},ar=(e,{step:t,initialValue:n})=>n+Math.round((e-n)/t)*t;var or=Object.freeze({__proto__:null,schema:e=>{if("number"==typeof e)return!0;if("string"==typeof e){const t=parseFloat(e);return!isNaN(t)&&e.substring((""+t).length).trim().length<4}return!1},sanitize:rr,format:(e,{pad:t=0,suffix:n})=>{const r=parseFloat(e).toFixed(t);return n?r+n:r},normalize:ir,sanitizeStep:ar});function sr(){return sr=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},sr.apply(this,arguments)}const lr=(0,n.createContext)({});function cr(){return(0,n.useContext)(lr)}const ur=(0,n.createContext)(null),dr=(0,n.createContext)(null),hr=(0,n.createContext)(null);function fr(){return(0,n.useContext)(dr)}function pr(e,t){const[n,r]=e.split(" "),i={};return"none"!==n&&(i.boxShadow=`${t.inset?"inset ":""}0 0 0 $borderWidths${[t.key]} $colors${"default"!==n&&n||t.borderColor}`),r&&(i.backgroundColor=r),i}const mr={$inputStyle:()=>e=>pr(e,{key:"$input",borderColor:"$highlight1",inset:!0}),$focusStyle:()=>e=>pr(e,{key:"$focus",borderColor:"$accent2"}),$hoverStyle:()=>e=>pr(e,{key:"$hover",borderColor:"$accent1",inset:!0}),$activeStyle:()=>e=>pr(e,{key:"$active",borderColor:"$accent1",inset:!0})},{styled:gr,css:vr,createTheme:yr,globalCss:br,keyframes:_r}=(e=>{const t=(e=>{let t=!1;const n=Je(e,(e=>{t=!0;const n="prefix"in(e="object"==typeof e&&e||{})?String(e.prefix):"",r="object"==typeof e.media&&e.media||{},i="object"==typeof e.root?e.root||null:globalThis.document||null,a="object"==typeof e.theme&&e.theme||{},o={prefix:n,media:r,theme:a,themeMap:"object"==typeof e.themeMap&&e.themeMap||{...re},utils:"object"==typeof e.utils&&e.utils||{}},s=Re(i),l={css:Ie(o,s),globalCss:Ue(o,s),keyframes:Ge(o,s),createTheme:We(o,s),reset(){s.reset(),l.theme.toString()},theme:{},sheet:s,config:o,prefix:n,getCssText:s.toString,toString:s.toString};return String(l.theme=l.createTheme(a)),l}));return t||n.reset(),n})(e);return t.styled=(({config:e,sheet:t})=>Xe(e,(()=>{const r=Ie(e,t);return(...e)=>{const t=r(...e),i=t[oe].type,a=n.forwardRef(((e,r)=>{const a=e&&e.as||i,{props:o,deferredInjector:s}=t(e);return delete o.as,o.ref=r,s?n.createElement(n.Fragment,null,n.createElement(a,o),n.createElement(s,null)):n.createElement(a,o)}));return a.className=t.className,a.displayName=`Styled.${i.displayName||i.name||i}`,a.selector=t.selector,a.toString=()=>t.selector,a[oe]=t[oe],a}})))(t),t})({prefix:"leva",theme:{colors:{elevation1:"#292d39",elevation2:"#181c20",elevation3:"#373c4b",accent1:"#0066dc",accent2:"#007bff",accent3:"#3c93ff",highlight1:"#535760",highlight2:"#8c92a4",highlight3:"#fefefe",vivid1:"#ffcc00",folderWidgetColor:"$highlight2",folderTextColor:"$highlight3",toolTipBackground:"$highlight3",toolTipText:"$elevation2"},radii:{xs:"2px",sm:"3px",lg:"10px"},space:{xs:"3px",sm:"6px",md:"10px",rowGap:"7px",colGap:"7px"},fonts:{mono:"ui-monospace, SFMono-Regular, Menlo, 'Roboto Mono', monospace",sans:"system-ui, sans-serif"},fontSizes:{root:"11px",toolTip:"$root"},sizes:{rootWidth:"280px",controlWidth:"160px",numberInputMinWidth:"38px",scrubberWidth:"8px",scrubberHeight:"16px",rowHeight:"24px",folderTitleHeight:"20px",checkboxSize:"16px",joystickWidth:"100px",joystickHeight:"100px",colorPickerWidth:"$controlWidth",colorPickerHeight:"100px",imagePreviewWidth:"$controlWidth",imagePreviewHeight:"100px",monitorHeight:"60px",titleBarHeight:"39px"},shadows:{level1:"0 0 9px 0 #00000088",level2:"0 4px 14px #00000033"},borderWidths:{root:"0px",input:"1px",focus:"1px",hover:"1px",active:"1px",folder:"1px"},fontWeights:{label:"normal",folder:"normal",button:"normal"}},utils:Tn(Tn({},mr),{},{$flex:()=>({display:"flex",alignItems:"center"}),$flexCenter:()=>({display:"flex",alignItems:"center",justifyContent:"center"}),$reset:()=>({outline:"none",fontSize:"inherit",fontWeight:"inherit",color:"inherit",fontFamily:"inherit",border:"none",backgroundColor:"transparent",appearance:"none"}),$draggable:()=>({touchAction:"none",WebkitUserDrag:"none",userSelect:"none"}),$focus:e=>({"&:focus":mr.$focusStyle()(e)}),$focusWithin:e=>({"&:focus-within":mr.$focusStyle()(e)}),$hover:e=>({"&:hover":mr.$hoverStyle()(e)}),$active:e=>({"&:active":mr.$activeStyle()(e)})})}),xr=br({".leva__panel__dragged":{WebkitUserDrag:"none",userSelect:"none",input:{userSelect:"none"},"*":{cursor:"ew-resize !important"}}});function wr(e,t){const{theme:r}=(0,n.useContext)(ur);if(!(e in r)||!(t in r[e]))return mn(hn.THEME_ERROR,e,t),"";let i=t;for(;;){let t=r[e][i];if("string"!=typeof t||"$"!==t.charAt(0))return t;i=t.substr(1)}}const Mr=gr("input",{$reset:"",padding:"0 $sm",width:0,minWidth:0,flex:1,height:"100%",variants:{levaType:{number:{textAlign:"right"}},as:{textarea:{padding:"$sm"}}}}),Sr=gr("div",{$draggable:"",height:"100%",$flexCenter:"",position:"relative",padding:"0 $xs",fontSize:"0.8em",opacity:.8,cursor:"default",touchAction:"none",[`& + ${Mr}`]:{paddingLeft:0}}),Ar=gr(Sr,{cursor:"ew-resize",marginRight:"-$xs",textTransform:"uppercase",opacity:.3,"&:hover":{opacity:1},variants:{dragging:{true:{backgroundColor:"$accent2",opacity:1}}}}),Er=gr("div",{$flex:"",position:"relative",borderRadius:"$sm",overflow:"hidden",color:"inherit",height:"$rowHeight",backgroundColor:"$elevation3",$inputStyle:"$elevation1",$hover:"",$focusWithin:"",variants:{textArea:{true:{height:"auto"}}}}),Cr=["innerLabel","value","onUpdate","onChange","onKeyDown","type","id","inputType","rows"],Tr=["onUpdate"];function Rr(e){let{innerLabel:t,value:r,onUpdate:i,onChange:a,onKeyDown:o,type:s,id:l,inputType:c="text",rows:u=0}=e,d=dn(e,Cr);const{id:h,emitOnEditStart:f,emitOnEditEnd:p,disabled:m}=cr(),g=l||h,v=(0,n.useRef)(null),y=u>0,b=y?"textarea":"input",_=(0,n.useCallback)((e=>t=>{const n=t.currentTarget.value;e(n)}),[]);n.useEffect((()=>{const e=v.current,t=_((e=>{i(e),p()}));return null==e||e.addEventListener("blur",t),()=>null==e?void 0:e.removeEventListener("blur",t)}),[_,i,p]);const x=(0,n.useCallback)((e=>{"Enter"===e.key&&_(i)(e)}),[_,i]),w=Object.assign({as:b},y?{rows:u}:{},d);return n.createElement(Er,{textArea:y},t&&"string"==typeof t?n.createElement(Sr,null,t):t,n.createElement(Mr,sr({levaType:s,ref:v,id:g,type:c,autoComplete:"off",spellCheck:"false",value:r,onChange:_(a),onFocus:()=>f(),onKeyPress:x,onKeyDown:o,disabled:m},w)))}function Br(e){let{onUpdate:t}=e,r=dn(e,Tr);const i=(0,n.useCallback)((e=>t(Bn(e))),[t]),a=(0,n.useCallback)((e=>{const n="ArrowUp"===e.key?1:"ArrowDown"===e.key?-1:0;if(n){e.preventDefault();const r=e.altKey?.1:e.shiftKey?10:1;t((e=>parseFloat(e)+n*r))}}),[t]);return n.createElement(Rr,sr({},r,{onUpdate:i,onKeyDown:a,type:"number"}))}const Pr=gr("div",{}),kr=gr("div",{position:"relative",background:"$elevation2",transition:"height 300ms ease",variants:{fill:{true:{},false:{}},flat:{false:{},true:{}},isRoot:{true:{},false:{paddingLeft:"$md","&::after":{content:'""',position:"absolute",left:0,top:0,width:"$borderWidths$folder",height:"100%",backgroundColor:"$folderWidgetColor",opacity:.4,transform:"translateX(-50%)"}}}},compoundVariants:[{isRoot:!0,fill:!1,css:{overflowY:"auto",maxHeight:"calc(100vh - 20px - $$titleBarHeight)"}},{isRoot:!0,flat:!1,css:{borderRadius:"$lg"}}]}),Ir=gr("div",{$flex:"",color:"$folderTextColor",userSelect:"none",cursor:"pointer",height:"$folderTitleHeight",fontWeight:"$folder","> svg":{marginLeft:-4,marginRight:4,cursor:"pointer",fill:"$folderWidgetColor",opacity:.6},"&:hover > svg":{fill:"$folderWidgetColor"},[`&:hover + ${kr}::after`]:{opacity:.6},[`${Pr}:hover > & + ${kr}::after`]:{opacity:.6},[`${Pr}:hover > & > svg`]:{opacity:1}}),Lr=gr("div",{position:"relative",display:"grid",gridTemplateColumns:"100%",rowGap:"$rowGap",transition:"opacity 250ms ease",variants:{toggled:{true:{opacity:1,transitionDelay:"250ms"},false:{opacity:0,transitionDelay:"0ms",pointerEvents:"none"}},isRoot:{true:{"& > div":{paddingLeft:"$md",paddingRight:"$md"},"& > div:first-of-type":{paddingTop:"$sm"},"& > div:last-of-type":{paddingBottom:"$sm"},[`> ${Pr}:not(:first-of-type)`]:{paddingTop:"$sm",marginTop:"$md",borderTop:"$borderWidths$folder solid $colors$elevation1"}}}}}),Dr=gr("div",{position:"relative",zIndex:100,display:"grid",rowGap:"$rowGap",gridTemplateRows:"minmax($sizes$rowHeight, max-content)",alignItems:"center",color:"$highlight2",[`${Lr} > &`]:{"&:first-of-type":{marginTop:"$rowGap"},"&:last-of-type":{marginBottom:"$rowGap"}},variants:{disabled:{true:{pointerEvents:"none"},false:{"&:hover,&:focus-within":{color:"$highlight3"}}}}}),Or=gr(Dr,{gridTemplateColumns:"auto $sizes$controlWidth",columnGap:"$colGap"}),Fr=gr("div",{$flex:"",height:"100%",position:"relative",overflow:"hidden","& > div":{marginLeft:"$colGap",padding:"0 $xs",opacity:.4},"& > div:hover":{opacity:.8},"& > div > svg":{display:"none",cursor:"pointer",width:13,minWidth:13,height:13,backgroundColor:"$elevation2"},"&:hover > div > svg":{display:"block"},variants:{align:{top:{height:"100%",alignItems:"flex-start",paddingTop:"$sm"}}}}),Nr=gr("input",{$reset:"",height:0,width:0,opacity:0,margin:0,"& + label":{position:"relative",$flexCenter:"",height:"100%",userSelect:"none",cursor:"pointer",paddingLeft:2,paddingRight:"$sm",pointerEvents:"auto"},"& + label:after":{content:'""',width:6,height:6,backgroundColor:"$elevation3",borderRadius:"50%",$activeStyle:""},"&:focus + label:after":{$focusStyle:""},"& + label:active:after":{backgroundColor:"$accent1",$focusStyle:""},"&:checked + label:after":{backgroundColor:"$accent1"}}),zr=gr("label",{fontWeight:"$label",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap","& > svg":{display:"block"}}),Ur=gr("div",{opacity:1,variants:{disabled:{true:{opacity:.6,pointerEvents:"none",[`& ${zr}`]:{pointerEvents:"auto"}}}}}),Hr=gr("div",{position:"fixed",top:0,bottom:0,right:0,left:0,zIndex:1e3,userSelect:"none"}),Gr=gr("div",{background:"$toolTipBackground",fontFamily:"$sans",fontSize:"$toolTip",padding:"$xs $sm",color:"$toolTipText",borderRadius:"$xs",boxShadow:"$level2",maxWidth:260}),Vr=gr(un,{fill:"$toolTipBackground"});function jr({children:e}){const{className:t}=(0,n.useContext)(ur);return n.createElement(B,{className:t},e)}const Wr=["align"];function Jr(){const{id:e,disable:t,disabled:r}=cr();return n.createElement(n.Fragment,null,n.createElement(Nr,{id:e+"__disable",type:"checkbox",checked:!r,onChange:()=>t(!r)}),n.createElement("label",{htmlFor:e+"__disable"}))}function Xr(e){const{id:t,optional:r,hint:i}=cr(),a=e.htmlFor||(t?{htmlFor:t}:null),o=i||"string"!=typeof e.children?null:{title:e.children};return n.createElement(n.Fragment,null,r&&n.createElement(Jr,null),void 0!==i?n.createElement(sn,null,n.createElement(ln,{asChild:!0},n.createElement(zr,sr({},a,e))),n.createElement(cn,{side:"top",sideOffset:2},n.createElement(Gr,null,i,n.createElement(Vr,null)))):n.createElement(zr,sr({},a,o,e)))}function Kr(e){let{align:t}=e,r=dn(e,Wr);const{value:i,label:a,key:o,disabled:s}=cr(),{hideCopyButton:l}=(0,n.useContext)(hr),c=!l&&void 0!==o,[u,d]=(0,n.useState)(!1);return n.createElement(Fr,{align:t,onPointerLeave:()=>d(!1)},n.createElement(Xr,r),c&&!s&&n.createElement("div",{title:`Click to copy ${"string"==typeof a?a:o} value`},u?n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},n.createElement("path",{d:"M9 2a1 1 0 000 2h2a1 1 0 100-2H9z"}),n.createElement("path",{fillRule:"evenodd",d:"M4 5a2 2 0 012-2 3 3 0 003 3h2a3 3 0 003-3 2 2 0 012 2v11a2 2 0 01-2 2H6a2 2 0 01-2-2V5zm9.707 5.707a1 1 0 00-1.414-1.414L9 12.586l-1.293-1.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z",clipRule:"evenodd"})):n.createElement("svg",{onClick:async()=>{try{await navigator.clipboard.writeText(JSON.stringify({[o]:null!=i?i:""})),d(!0)}catch(e){mn(hn.CLIPBOARD_ERROR,{[o]:i})}},xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 20 20",fill:"currentColor"},n.createElement("path",{d:"M8 3a1 1 0 011-1h2a1 1 0 110 2H9a1 1 0 01-1-1z"}),n.createElement("path",{d:"M6 3a2 2 0 00-2 2v11a2 2 0 002 2h8a2 2 0 002-2V5a2 2 0 00-2-2 3 3 0 01-3 3H9a3 3 0 01-3-3z"}))))}const $r=["toggled"],Yr=gr("svg",{fill:"currentColor",transition:"transform 350ms ease, fill 250ms ease"});function qr(e){let{toggled:t}=e,r=dn(e,$r);return n.createElement(Yr,sr({width:"9",height:"5",viewBox:"0 0 9 5",xmlns:"http://www.w3.org/2000/svg",style:{transform:`rotate(${t?0:-90}deg)`}},r),n.createElement("path",{d:"M3.8 4.4c.4.3 1 .3 1.4 0L8 1.7A1 1 0 007.4 0H1.6a1 1 0 00-.7 1.7l3 2.7z"}))}const Qr=["input"];function Zr(e){let{input:t}=e,r=dn(e,Qr);return t?n.createElement(Or,r):n.createElement(Dr,r)}function ei({value:e,type:t,settings:r,setValue:i}){const[a,o]=(0,n.useState)(An(t,e,r)),s=(0,n.useRef)(e),l=(0,n.useRef)(r);l.current=r;const c=(0,n.useCallback)((e=>o(An(t,e,l.current))),[t]),u=(0,n.useCallback)((e=>{try{i(e)}catch(e){const{type:t,previousValue:n}=e;if("LEVA_ERROR"!==t)throw e;c(n)}}),[c,i]);return(0,n.useEffect)((()=>{k(e,s.current)||c(e),s.current=e}),[e,c]),{displayValue:a,onChange:o,onUpdate:u}}function ti(e,t){const{emitOnEditStart:n,emitOnEditEnd:r}=cr();return(0,Ke.useDrag)((t=>{t.first&&(document.body.classList.add("leva__panel__dragged"),null==n||n());const i=e(t);return t.last&&(document.body.classList.remove("leva__panel__dragged"),null==r||r()),i}),t)}function ni(){const e=(0,n.useRef)(null),t=(0,n.useRef)({x:0,y:0}),r=(0,n.useCallback)((n=>{Object.assign(t.current,n),e.current&&(e.current.style.transform=`translate3d(${t.current.x}px, ${t.current.y}px, 0)`)}),[]);return[e,r]}const ri=["__refCount"],ii=(e,t)=>e[t]?dn(e[t],ri):null,ai=gr("div",{variants:{hasRange:{true:{position:"relative",display:"grid",gridTemplateColumns:"auto $sizes$numberInputMinWidth",columnGap:"$colGap",alignItems:"center"}}}}),oi=gr("div",{position:"relative",width:"100%",height:2,borderRadius:"$xs",backgroundColor:"$elevation1"}),si=gr("div",{position:"absolute",width:"$scrubberWidth",height:"$scrubberHeight",borderRadius:"$xs",boxShadow:"0 0 0 2px $colors$elevation2",backgroundColor:"$accent2",cursor:"pointer",$active:"none $accent1",$hover:"none $accent3",variants:{position:{left:{borderTopRightRadius:0,borderBottomRightRadius:0,transform:"translateX(calc(-0.5 * ($sizes$scrubberWidth + 4px)))"},right:{borderTopLeftRadius:0,borderBottomLeftRadius:0,transform:"translateX(calc(0.5 * ($sizes$scrubberWidth + 4px)))"}}}}),li=gr("div",{position:"relative",$flex:"",height:"100%",cursor:"pointer",touchAction:"none"}),ci=gr("div",{position:"absolute",height:"100%",backgroundColor:"$accent2"});function ui({value:e,min:t,max:r,onDrag:i,step:a,initialValue:o}){const s=(0,n.useRef)(null),l=(0,n.useRef)(null),c=(0,n.useRef)(0),u=wr("sizes","scrubberWidth"),d=ti((({event:n,first:d,xy:[h],movement:[f],memo:p})=>{if(d){const{width:i,left:a}=s.current.getBoundingClientRect();c.current=i-parseFloat(u),p=(null==n?void 0:n.target)===l.current?e:Ln((h-a)/i,t,r)}const m=p+Ln(f/c.current,0,r-t);return i(ar(m,{step:a,initialValue:o})),p})),h=In(e,t,r);return n.createElement(li,sr({ref:s},d()),n.createElement(oi,null,n.createElement(ci,{style:{left:0,right:100*(1-h)+"%"}})),n.createElement(si,{ref:l,style:{left:`calc(${h} * (100% - ${u}))`}}))}const di=n.memo((({label:e,onUpdate:t,step:r,innerLabelTrim:i})=>{const[a,o]=(0,n.useState)(!1),s=ti((({active:e,delta:[n],event:i,memo:a=0})=>(o(e),a+=n/2,Math.abs(a)>=1&&(t((e=>parseFloat(e)+Math.floor(a)*r*er(i))),a=0),a)));return n.createElement(Ar,sr({dragging:a,title:e.length>1?e:""},s()),e.slice(0,i))}));function hi({label:e,id:t,displayValue:r,onUpdate:i,onChange:a,settings:o,innerLabelTrim:s=1}){const l=s>0&&n.createElement(di,{label:e,step:o.step,onUpdate:i,innerLabelTrim:s});return n.createElement(Br,{id:t,value:String(r),onUpdate:i,onChange:a,innerLabel:l})}const{sanitizeStep:fi}=or;var pi=Tn({component:function(){const e=cr(),{label:t,value:r,onUpdate:i,settings:a,id:o}=e,{min:s,max:l}=a,c=l!==1/0&&s!==-1/0;return n.createElement(Zr,{input:!0},n.createElement(Kr,null,t),n.createElement(ai,{hasRange:c},c&&n.createElement(ui,sr({value:parseFloat(r),onDrag:i},a)),n.createElement(hi,sr({},e,{id:o,label:"value",innerLabelTrim:c?0:1}))))}},dn(or,["sanitizeStep"])),mi=Object.freeze({__proto__:null,schema:(e,t)=>Z().schema({options:Z().passesAnyOf(Z().object(),Z().array())}).test(t),sanitize:(e,{values:t})=>{if(t.indexOf(e)<0)throw Error("Selected value doesn't match Select options");return e},format:(e,{values:t})=>t.indexOf(e),normalize:e=>{let t,n,{value:r,options:i}=e;return Array.isArray(i)?(n=i,t=i.map((e=>String(e)))):(n=Object.values(i),t=Object.keys(i)),"value"in e?n.includes(r)||(t.unshift(String(r)),n.unshift(r)):r=n[0],Object.values(i).includes(r)||(i[String(r)]=r),{value:r,settings:{keys:t,values:n}}}});const gi=gr("div",{$flexCenter:"",position:"relative","> svg":{pointerEvents:"none",position:"absolute",right:"$md"}}),vi=gr("select",{position:"absolute",top:0,left:0,width:"100%",height:"100%",opacity:0}),yi=gr("div",{display:"flex",alignItems:"center",width:"100%",height:"$rowHeight",backgroundColor:"$elevation3",borderRadius:"$sm",padding:"0 $sm",cursor:"pointer",[`${vi}:focus + &`]:{$focusStyle:""},[`${vi}:hover + &`]:{$hoverStyle:""}});function bi({displayValue:e,value:t,onUpdate:r,id:i,settings:a,disabled:o}){const{keys:s,values:l}=a,c=(0,n.useRef)();return t===l[e]&&(c.current=s[e]),n.createElement(gi,null,n.createElement(vi,{id:i,value:e,onChange:e=>r(l[Number(e.currentTarget.value)]),disabled:o},s.map(((e,t)=>n.createElement("option",{key:e,value:t},e)))),n.createElement(yi,null,c.current),n.createElement(qr,{toggled:!0}))}var _i=Tn({component:function(){const{label:e,value:t,displayValue:r,onUpdate:i,id:a,disabled:o,settings:s}=cr();return n.createElement(Zr,{input:!0},n.createElement(Kr,null,e),n.createElement(bi,{id:a,value:t,displayValue:r,onUpdate:i,settings:s,disabled:o}))}},mi),xi=Object.freeze({__proto__:null,schema:e=>Z().string().test(e),sanitize:e=>{if("string"!=typeof e)throw Error("Invalid string");return e},normalize:({value:e,editable:t=!0,rows:n=!1})=>({value:e,settings:{editable:t,rows:"number"==typeof n?n:n?5:0}})});const wi=["displayValue","onUpdate","onChange","editable"],Mi=gr("div",{whiteSpace:"pre-wrap"});function Si(e){let{displayValue:t,onUpdate:r,onChange:i,editable:a=!0}=e,o=dn(e,wi);return a?n.createElement(Rr,sr({value:t,onUpdate:r,onChange:i},o)):n.createElement(Mi,null,t)}var Ai=Tn({component:function(){const{label:e,settings:t,displayValue:r,onUpdate:i,onChange:a}=cr();return n.createElement(Zr,{input:!0},n.createElement(Kr,null,e),n.createElement(Si,sr({displayValue:r,onUpdate:i,onChange:a},t)))}},xi),Ei=Object.freeze({__proto__:null,schema:e=>Z().boolean().test(e),sanitize:e=>{if("boolean"!=typeof e)throw Error("Invalid boolean");return e}});const Ci=gr("div",{position:"relative",$flex:"",height:"$rowHeight",input:{$reset:"",height:0,width:0,opacity:0,margin:0},label:{position:"relative",$flexCenter:"",userSelect:"none",cursor:"pointer",height:"$checkboxSize",width:"$checkboxSize",backgroundColor:"$elevation3",borderRadius:"$sm",$hover:""},"input:focus + label":{$focusStyle:""},"input:focus:checked + label, input:checked + label:hover":{$hoverStyle:"$accent3"},"input + label:active":{backgroundColor:"$accent1"},"input:checked + label:active":{backgroundColor:"$accent1"},"label > svg":{display:"none",width:"90%",height:"90%",stroke:"$highlight3"},"input:checked + label":{backgroundColor:"$accent2"},"input:checked + label > svg":{display:"block"}});function Ti({value:e,onUpdate:t,id:r,disabled:i}){return n.createElement(Ci,null,n.createElement("input",{id:r,type:"checkbox",checked:e,onChange:e=>t(e.currentTarget.checked),disabled:i}),n.createElement("label",{htmlFor:r},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",fill:"none",viewBox:"0 0 24 24"},n.createElement("path",{strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:2,d:"M5 13l4 4L19 7"}))))}var Ri=Tn({component:function(){const{label:e,value:t,onUpdate:r,disabled:i,id:a}=cr();return n.createElement(Zr,{input:!0},n.createElement(Kr,null,e),n.createElement(Ti,{value:t,onUpdate:r,id:a,disabled:i}))}},Ei);const Bi=["locked"];function Pi({value:e,id:t,valueKey:r,settings:i,onUpdate:a,innerLabelTrim:o}){const s=(0,n.useRef)(e[r]);s.current=e[r];const l=(0,n.useCallback)((e=>a({[r]:Qn({type:"NUMBER",value:s.current,settings:i},e)})),[a,i,r]),c=ei({type:"NUMBER",value:e[r],settings:i,setValue:l});return n.createElement(hi,{id:t,label:r,value:e[r],displayValue:c.displayValue,onUpdate:c.onUpdate,onChange:c.onChange,settings:i,innerLabelTrim:o})}const ki=gr("div",{display:"grid",columnGap:"$colGap",gridAutoFlow:"column dense",alignItems:"center",variants:{withLock:{true:{gridTemplateColumns:"10px auto","> svg":{cursor:"pointer"}}}}});function Ii(e){let{locked:t}=e,r=dn(e,Bi);return n.createElement("svg",sr({width:"10",height:"10",viewBox:"0 0 15 15",fill:"none",xmlns:"http://www.w3.org/2000/svg"},r),t?n.createElement("path",{d:"M5 4.63601C5 3.76031 5.24219 3.1054 5.64323 2.67357C6.03934 2.24705 6.64582 1.9783 7.5014 1.9783C8.35745 1.9783 8.96306 2.24652 9.35823 2.67208C9.75838 3.10299 10 3.75708 10 4.63325V5.99999H5V4.63601ZM4 5.99999V4.63601C4 3.58148 4.29339 2.65754 4.91049 1.99307C5.53252 1.32329 6.42675 0.978302 7.5014 0.978302C8.57583 0.978302 9.46952 1.32233 10.091 1.99162C10.7076 2.65557 11 3.57896 11 4.63325V5.99999H12C12.5523 5.99999 13 6.44771 13 6.99999V13C13 13.5523 12.5523 14 12 14H3C2.44772 14 2 13.5523 2 13V6.99999C2 6.44771 2.44772 5.99999 3 5.99999H4ZM3 6.99999H12V13H3V6.99999Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}):n.createElement("path",{d:"M9 3.63601C9 2.76044 9.24207 2.11211 9.64154 1.68623C10.0366 1.26502 10.6432 1 11.5014 1C12.4485 1 13.0839 1.30552 13.4722 1.80636C13.8031 2.23312 14 2.84313 14 3.63325H15C15 2.68242 14.7626 1.83856 14.2625 1.19361C13.6389 0.38943 12.6743 0 11.5014 0C10.4294 0 9.53523 0.337871 8.91218 1.0021C8.29351 1.66167 8 2.58135 8 3.63601V6H1C0.447715 6 0 6.44772 0 7V13C0 13.5523 0.447715 14 1 14H10C10.5523 14 11 13.5523 11 13V7C11 6.44772 10.5523 6 10 6H9V3.63601ZM1 7H10V13H1V7Z",fill:"currentColor",fillRule:"evenodd",clipRule:"evenodd"}))}function Li({value:e,onUpdate:t,settings:r,innerLabelTrim:i}){const{id:a,setSettings:o}=cr(),{lock:s,locked:l}=r;return n.createElement(ki,{withLock:s},s&&n.createElement(Ii,{locked:l,onClick:()=>o({locked:!l})}),Object.keys(e).map(((o,s)=>n.createElement(Pi,{id:0===s?a:`${a}.${o}`,key:o,valueKey:o,value:e,settings:r[o],onUpdate:t,innerLabelTrim:i}))))}const Di=(e,t)=>{const n={};let r=0,i=1/0;Object.entries(e).forEach((([e,a])=>{n[e]=ir(Tn({value:a},t[e])).settings,r=Math.max(r,n[e].step),i=Math.min(i,n[e].pad)}));for(let e in n){const{step:a,min:o,max:s}=t[e]||{};isFinite(a)||isFinite(o)&&isFinite(s)||(n[e].step=r,n[e].pad=i)}return n},Oi=["lock"],Fi=["value"];function Ni(e){const t=Z().array().length(e).every.number();return n=>t.test(n)||(t=>{if(!t||"object"!=typeof t)return!1;const n=Object.values(t);return n.length===e&&n.every((e=>isFinite(e)))})(n)}function zi(e,t,n){return function(e){return Array.isArray(e)?"array":"object"}(e)===t?e:"array"===t?Object.values(e):function(e,t){return e.reduce(((e,n,r)=>Object.assign(e,{[t[r]]:n})),{})}(e,n)}function Ui(e){return{schema:Ni(e.length),normalize:t=>{let{value:n}=t;return function(e,t,n=[]){const{lock:r=!1}=t,i=dn(t,Oi),a=Array.isArray(e)?"array":"object",o="object"===a?Object.keys(e):n,s=zi(e,"object",o),l=(c=i)&&("step"in c||"min"in c||"max"in c)?o.reduce(((e,t)=>Object.assign(e,{[t]:i})),{}):i;var c;return{value:"array"===a?e:s,settings:Tn(Tn({},Di(s,l)),{},{format:a,keys:o,lock:r,locked:!1})}}(n,dn(t,Fi),e)},format:(e,t)=>((e,t)=>zi(e,"object",t.keys))(e,t),sanitize:(e,t,n)=>((e,t,n)=>{const r=zi(e,"object",t.keys);for(let e in r)r[e]=rr(r[e],t[e]);const i=Object.keys(r);let a={};if(i.length===t.keys.length)a=r;else{const e=zi(n,"object",t.keys);if(1===i.length&&t.locked){const t=i[0],n=r[t],o=e[t],s=0!==o?n/o:1;for(let r in e)r===t?a[t]=n:a[r]=e[r]*s}else a=Tn(Tn({},e),r)}return zi(a,t.format,t.keys)})(e,t,n)}}var Hi={grad:.9,turn:360,rad:360/(2*Math.PI)},Gi=function(e){return"string"==typeof e?e.length>0:"number"==typeof e},Vi=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n+0},ji=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e>t?e:t},Wi=function(e){return(e=isFinite(e)?e%360:0)>0?e:e+360},Ji=function(e){return{r:ji(e.r,0,255),g:ji(e.g,0,255),b:ji(e.b,0,255),a:ji(e.a)}},Xi=function(e){return{r:Vi(e.r),g:Vi(e.g),b:Vi(e.b),a:Vi(e.a,3)}},Ki=/^#([0-9a-f]{3,8})$/i,$i=function(e){var t=e.toString(16);return t.length<2?"0"+t:t},Yi=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=Math.max(t,n,r),o=a-Math.min(t,n,r),s=o?a===t?(n-r)/o:a===n?2+(r-t)/o:4+(t-n)/o:0;return{h:60*(s<0?s+6:s),s:a?o/a*100:0,v:a/255*100,a:i}},qi=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),o=r*(1-n),s=r*(1-(t-a)*n),l=r*(1-(1-t+a)*n),c=a%6;return{r:255*[r,s,o,o,l,r][c],g:255*[l,r,r,s,o,o][c],b:255*[o,o,l,r,r,s][c],a:i}},Qi=function(e){return{h:Wi(e.h),s:ji(e.s,0,100),l:ji(e.l,0,100),a:ji(e.a)}},Zi=function(e){return{h:Vi(e.h),s:Vi(e.s),l:Vi(e.l),a:Vi(e.a,3)}},ea=function(e){return qi((n=(t=e).s,{h:t.h,s:(n*=((r=t.l)<50?r:100-r)/100)>0?2*n/(r+n)*100:0,v:r+n,a:t.a}));var t,n,r},ta=function(e){return{h:(t=Yi(e)).h,s:(i=(200-(n=t.s))*(r=t.v)/100)>0&&i<200?n*r/100/(i<=100?i:200-i)*100:0,l:i/2,a:t.a};var t,n,r,i},na=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s*,\s*([+-]?\d*\.?\d+)%\s*,\s*([+-]?\d*\.?\d+)%\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ra=/^hsla?\(\s*([+-]?\d*\.?\d+)(deg|rad|grad|turn)?\s+([+-]?\d*\.?\d+)%\s+([+-]?\d*\.?\d+)%\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,ia=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*,\s*([+-]?\d*\.?\d+)(%)?\s*(?:,\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,aa=/^rgba?\(\s*([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s+([+-]?\d*\.?\d+)(%)?\s*(?:\/\s*([+-]?\d*\.?\d+)(%)?\s*)?\)$/i,oa={string:[[function(e){var t=Ki.exec(e);return t?(e=t[1]).length<=4?{r:parseInt(e[0]+e[0],16),g:parseInt(e[1]+e[1],16),b:parseInt(e[2]+e[2],16),a:4===e.length?Vi(parseInt(e[3]+e[3],16)/255,2):1}:6===e.length||8===e.length?{r:parseInt(e.substr(0,2),16),g:parseInt(e.substr(2,2),16),b:parseInt(e.substr(4,2),16),a:8===e.length?Vi(parseInt(e.substr(6,2),16)/255,2):1}:null:null},"hex"],[function(e){var t=ia.exec(e)||aa.exec(e);return t?t[2]!==t[4]||t[4]!==t[6]?null:Ji({r:Number(t[1])/(t[2]?100/255:1),g:Number(t[3])/(t[4]?100/255:1),b:Number(t[5])/(t[6]?100/255:1),a:void 0===t[7]?1:Number(t[7])/(t[8]?100:1)}):null},"rgb"],[function(e){var t=na.exec(e)||ra.exec(e);if(!t)return null;var n,r,i=Qi({h:(n=t[1],r=t[2],void 0===r&&(r="deg"),Number(n)*(Hi[r]||1)),s:Number(t[3]),l:Number(t[4]),a:void 0===t[5]?1:Number(t[5])/(t[6]?100:1)});return ea(i)},"hsl"]],object:[[function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=void 0===i?1:i;return Gi(t)&&Gi(n)&&Gi(r)?Ji({r:Number(t),g:Number(n),b:Number(r),a:Number(a)}):null},"rgb"],[function(e){var t=e.h,n=e.s,r=e.l,i=e.a,a=void 0===i?1:i;if(!Gi(t)||!Gi(n)||!Gi(r))return null;var o=Qi({h:Number(t),s:Number(n),l:Number(r),a:Number(a)});return ea(o)},"hsl"],[function(e){var t=e.h,n=e.s,r=e.v,i=e.a,a=void 0===i?1:i;if(!Gi(t)||!Gi(n)||!Gi(r))return null;var o=function(e){return{h:Wi(e.h),s:ji(e.s,0,100),v:ji(e.v,0,100),a:ji(e.a)}}({h:Number(t),s:Number(n),v:Number(r),a:Number(a)});return qi(o)},"hsv"]]},sa=function(e,t){for(var n=0;n<t.length;n++){var r=t[n][0](e);if(r)return[r,t[n][1]]}return[null,void 0]},la=function(e){return"string"==typeof e?sa(e.trim(),oa.string):"object"==typeof e&&null!==e?sa(e,oa.object):[null,void 0]},ca=function(e,t){var n=ta(e);return{h:n.h,s:ji(n.s+100*t,0,100),l:n.l,a:n.a}},ua=function(e){return(299*e.r+587*e.g+114*e.b)/1e3/255},da=function(e,t){var n=ta(e);return{h:n.h,s:n.s,l:ji(n.l+100*t,0,100),a:n.a}},ha=function(){function e(e){this.parsed=la(e)[0],this.rgba=this.parsed||{r:0,g:0,b:0,a:1}}return e.prototype.isValid=function(){return null!==this.parsed},e.prototype.brightness=function(){return Vi(ua(this.rgba),2)},e.prototype.isDark=function(){return ua(this.rgba)<.5},e.prototype.isLight=function(){return ua(this.rgba)>=.5},e.prototype.toHex=function(){return t=(e=Xi(this.rgba)).r,n=e.g,r=e.b,a=(i=e.a)<1?$i(Vi(255*i)):"","#"+$i(t)+$i(n)+$i(r)+a;var e,t,n,r,i,a},e.prototype.toRgb=function(){return Xi(this.rgba)},e.prototype.toRgbString=function(){return t=(e=Xi(this.rgba)).r,n=e.g,r=e.b,(i=e.a)<1?"rgba("+t+", "+n+", "+r+", "+i+")":"rgb("+t+", "+n+", "+r+")";var e,t,n,r,i},e.prototype.toHsl=function(){return Zi(ta(this.rgba))},e.prototype.toHslString=function(){return t=(e=Zi(ta(this.rgba))).h,n=e.s,r=e.l,(i=e.a)<1?"hsla("+t+", "+n+"%, "+r+"%, "+i+")":"hsl("+t+", "+n+"%, "+r+"%)";var e,t,n,r,i},e.prototype.toHsv=function(){return e=Yi(this.rgba),{h:Vi(e.h),s:Vi(e.s),v:Vi(e.v),a:Vi(e.a,3)};var e},e.prototype.invert=function(){return fa({r:255-(e=this.rgba).r,g:255-e.g,b:255-e.b,a:e.a});var e},e.prototype.saturate=function(e){return void 0===e&&(e=.1),fa(ca(this.rgba,e))},e.prototype.desaturate=function(e){return void 0===e&&(e=.1),fa(ca(this.rgba,-e))},e.prototype.grayscale=function(){return fa(ca(this.rgba,-1))},e.prototype.lighten=function(e){return void 0===e&&(e=.1),fa(da(this.rgba,e))},e.prototype.darken=function(e){return void 0===e&&(e=.1),fa(da(this.rgba,-e))},e.prototype.rotate=function(e){return void 0===e&&(e=15),this.hue(this.hue()+e)},e.prototype.alpha=function(e){return"number"==typeof e?fa({r:(t=this.rgba).r,g:t.g,b:t.b,a:e}):Vi(this.rgba.a,3);var t},e.prototype.hue=function(e){var t=ta(this.rgba);return"number"==typeof e?fa({h:e,s:t.s,l:t.l,a:t.a}):Vi(t.h)},e.prototype.isEqual=function(e){return this.toHex()===fa(e).toHex()},e}(),fa=function(e){return e instanceof ha?e:new ha(e)},pa=[];function ma(){return(ma=Object.assign||function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e}).apply(this,arguments)}function ga(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)t.indexOf(n=a[r])>=0||(i[n]=e[n]);return i}function va(e){var t=(0,n.useRef)(e),r=(0,n.useRef)((function(e){t.current&&t.current(e)}));return t.current=e,r.current}var ya=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=1),e>n?n:e<t?t:e},ba=function(e){return"touches"in e},_a=function(e){return e&&e.ownerDocument.defaultView||self},xa=function(e,t,n){var r=e.getBoundingClientRect(),i=ba(t)?function(e,t){for(var n=0;n<e.length;n++)if(e[n].identifier===t)return e[n];return e[0]}(t.touches,n):t;return{left:ya((i.pageX-(r.left+_a(e).pageXOffset))/r.width),top:ya((i.pageY-(r.top+_a(e).pageYOffset))/r.height)}},wa=function(e){!ba(e)&&e.preventDefault()},Ma=n.memo((function(e){var t=e.onMove,r=e.onKey,i=ga(e,["onMove","onKey"]),a=(0,n.useRef)(null),o=va(t),s=va(r),l=(0,n.useRef)(null),c=(0,n.useRef)(!1),u=(0,n.useMemo)((function(){var e=function(e){wa(e),(ba(e)?e.touches.length>0:e.buttons>0)&&a.current?o(xa(a.current,e,l.current)):n(!1)},t=function(){return n(!1)};function n(n){var r=c.current,i=_a(a.current),o=n?i.addEventListener:i.removeEventListener;o(r?"touchmove":"mousemove",e),o(r?"touchend":"mouseup",t)}return[function(e){var t=e.nativeEvent,r=a.current;if(r&&(wa(t),!function(e,t){return t&&!ba(e)}(t,c.current)&&r)){if(ba(t)){c.current=!0;var i=t.changedTouches||[];i.length&&(l.current=i[0].identifier)}r.focus(),o(xa(r,t,l.current)),n(!0)}},function(e){var t=e.which||e.keyCode;t<37||t>40||(e.preventDefault(),s({left:39===t?.05:37===t?-.05:0,top:40===t?.05:38===t?-.05:0}))},n]}),[s,o]),d=u[0],h=u[1],f=u[2];return(0,n.useEffect)((function(){return f}),[f]),n.createElement("div",ma({},i,{onTouchStart:d,onMouseDown:d,className:"react-colorful__interactive",ref:a,onKeyDown:h,tabIndex:0,role:"slider"}))})),Sa=function(e){return e.filter(Boolean).join(" ")},Aa=function(e){var t=e.color,r=e.left,i=e.top,a=void 0===i?.5:i,o=Sa(["react-colorful__pointer",e.className]);return n.createElement("div",{className:o,style:{top:100*a+"%",left:100*r+"%"}},n.createElement("div",{className:"react-colorful__pointer-fill",style:{backgroundColor:t}}))},Ea=function(e,t,n){return void 0===t&&(t=0),void 0===n&&(n=Math.pow(10,t)),Math.round(n*e)/n},Ca=(Math.PI,function(e){var t=e.s,n=e.v,r=e.a,i=(200-t)*n/100;return{h:Ea(e.h),s:Ea(i>0&&i<200?t*n/100/(i<=100?i:200-i)*100:0),l:Ea(i/2),a:Ea(r,2)}}),Ta=function(e){var t=Ca(e);return"hsl("+t.h+", "+t.s+"%, "+t.l+"%)"},Ra=function(e){var t=Ca(e);return"hsla("+t.h+", "+t.s+"%, "+t.l+"%, "+t.a+")"},Ba=function(e){var t=e.h,n=e.s,r=e.v,i=e.a;t=t/360*6,n/=100,r/=100;var a=Math.floor(t),o=r*(1-n),s=r*(1-(t-a)*n),l=r*(1-(1-t+a)*n),c=a%6;return{r:Ea(255*[r,s,o,o,l,r][c]),g:Ea(255*[l,r,r,s,o,o][c]),b:Ea(255*[o,o,l,r,r,s][c]),a:Ea(i,2)}},Pa=function(e){var t=e.r,n=e.g,r=e.b,i=e.a,a=Math.max(t,n,r),o=a-Math.min(t,n,r),s=o?a===t?(n-r)/o:a===n?2+(r-t)/o:4+(t-n)/o:0;return{h:Ea(60*(s<0?s+6:s)),s:Ea(a?o/a*100:0),v:Ea(a/255*100),a:i}},ka=n.memo((function(e){var t=e.hue,r=e.onChange,i=Sa(["react-colorful__hue",e.className]);return n.createElement("div",{className:i},n.createElement(Ma,{onMove:function(e){r({h:360*e.left})},onKey:function(e){r({h:ya(t+360*e.left,0,360)})},"aria-label":"Hue","aria-valuenow":Ea(t),"aria-valuemax":"360","aria-valuemin":"0"},n.createElement(Aa,{className:"react-colorful__hue-pointer",left:t/360,color:Ta({h:t,s:100,v:100,a:1})})))})),Ia=n.memo((function(e){var t=e.hsva,r=e.onChange,i={backgroundColor:Ta({h:t.h,s:100,v:100,a:1})};return n.createElement("div",{className:"react-colorful__saturation",style:i},n.createElement(Ma,{onMove:function(e){r({s:100*e.left,v:100-100*e.top})},onKey:function(e){r({s:ya(t.s+100*e.left,0,100),v:ya(t.v-100*e.top,0,100)})},"aria-label":"Color","aria-valuetext":"Saturation "+Ea(t.s)+"%, Brightness "+Ea(t.v)+"%"},n.createElement(Aa,{className:"react-colorful__saturation-pointer",top:1-t.v/100,left:t.s/100,color:Ta(t)})))})),La=function(e,t){if(e===t)return!0;for(var n in e)if(e[n]!==t[n])return!1;return!0};function Da(e,t,r){var i=va(r),a=(0,n.useState)((function(){return e.toHsva(t)})),o=a[0],s=a[1],l=(0,n.useRef)({color:t,hsva:o});(0,n.useEffect)((function(){if(!e.equal(t,l.current.color)){var n=e.toHsva(t);l.current={hsva:n,color:t},s(n)}}),[t,e]),(0,n.useEffect)((function(){var t;La(o,l.current.hsva)||e.equal(t=e.fromHsva(o),l.current.color)||(l.current={hsva:o,color:t},i(t))}),[o,e,i]);var c=(0,n.useCallback)((function(e){s((function(t){return Object.assign({},t,e)}))}),[]);return[o,c]}var Oa="undefined"!=typeof window?n.useLayoutEffect:n.useEffect,Fa=new Map,Na=function(e){Oa((function(){var t=e.current?e.current.ownerDocument:document;if(void 0!==t&&!Fa.has(t)){var n=t.createElement("style");n.innerHTML='.react-colorful{position:relative;display:flex;flex-direction:column;width:200px;height:200px;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;cursor:default}.react-colorful__saturation{position:relative;flex-grow:1;border-color:transparent;border-bottom:12px solid #000;border-radius:8px 8px 0 0;background-image:linear-gradient(0deg,#000,transparent),linear-gradient(90deg,#fff,hsla(0,0%,100%,0))}.react-colorful__alpha-gradient,.react-colorful__pointer-fill{content:"";position:absolute;left:0;top:0;right:0;bottom:0;pointer-events:none;border-radius:inherit}.react-colorful__alpha-gradient,.react-colorful__saturation{box-shadow:inset 0 0 0 1px rgba(0,0,0,.05)}.react-colorful__alpha,.react-colorful__hue{position:relative;height:24px}.react-colorful__hue{background:linear-gradient(90deg,red 0,#ff0 17%,#0f0 33%,#0ff 50%,#00f 67%,#f0f 83%,red)}.react-colorful__last-control{border-radius:0 0 8px 8px}.react-colorful__interactive{position:absolute;left:0;top:0;right:0;bottom:0;border-radius:inherit;outline:none;touch-action:none}.react-colorful__pointer{position:absolute;z-index:1;box-sizing:border-box;width:28px;height:28px;transform:translate(-50%,-50%);background-color:#fff;border:2px solid #fff;border-radius:50%;box-shadow:0 2px 4px rgba(0,0,0,.2)}.react-colorful__interactive:focus .react-colorful__pointer{transform:translate(-50%,-50%) scale(1.1)}.react-colorful__alpha,.react-colorful__alpha-pointer{background-color:#fff;background-image:url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')}.react-colorful__saturation-pointer{z-index:3}.react-colorful__hue-pointer{z-index:2}',Fa.set(t,n);var r=i.nc;r&&n.setAttribute("nonce",r),t.head.appendChild(n)}}),[])},za=function(e){var t=e.className,r=e.colorModel,i=e.color,a=void 0===i?r.defaultColor:i,o=e.onChange,s=ga(e,["className","colorModel","color","onChange"]),l=(0,n.useRef)(null);Na(l);var c=Da(r,a,o),u=c[0],d=c[1],h=Sa(["react-colorful",t]);return n.createElement("div",ma({},s,{ref:l,className:h}),n.createElement(Ia,{hsva:u,onChange:d}),n.createElement(ka,{hue:u.h,onChange:d,className:"react-colorful__last-control"}))},Ua=function(e){var t=e.className,r=e.hsva,i=e.onChange,a={backgroundImage:"linear-gradient(90deg, "+Ra(Object.assign({},r,{a:0}))+", "+Ra(Object.assign({},r,{a:1}))+")"},o=Sa(["react-colorful__alpha",t]),s=Ea(100*r.a);return n.createElement("div",{className:o},n.createElement("div",{className:"react-colorful__alpha-gradient",style:a}),n.createElement(Ma,{onMove:function(e){i({a:e.left})},onKey:function(e){i({a:ya(r.a+e.left)})},"aria-label":"Alpha","aria-valuetext":s+"%","aria-valuenow":s,"aria-valuemin":"0","aria-valuemax":"100"},n.createElement(Aa,{className:"react-colorful__alpha-pointer",left:r.a,color:Ra(r)})))},Ha=function(e){var t=e.className,r=e.colorModel,i=e.color,a=void 0===i?r.defaultColor:i,o=e.onChange,s=ga(e,["className","colorModel","color","onChange"]),l=(0,n.useRef)(null);Na(l);var c=Da(r,a,o),u=c[0],d=c[1],h=Sa(["react-colorful",t]);return n.createElement("div",ma({},s,{ref:l,className:h}),n.createElement(Ia,{hsva:u,onChange:d}),n.createElement(ka,{hue:u.h,onChange:d}),n.createElement(Ua,{hsva:u,onChange:d,className:"react-colorful__last-control"}))},Ga={defaultColor:{r:0,g:0,b:0,a:1},toHsva:Pa,fromHsva:Ba,equal:La},Va=function(e){return n.createElement(Ha,ma({},e,{colorModel:Ga}))},ja={defaultColor:{r:0,g:0,b:0},toHsva:function(e){return Pa({r:e.r,g:e.g,b:e.b,a:1})},fromHsva:function(e){return{r:(t=Ba(e)).r,g:t.g,b:t.b};var t},equal:La},Wa=function(e){return n.createElement(za,ma({},e,{colorModel:ja}))},Ja=i(5697),Xa=i.n(Ja);function Ka(e,t,n,r){return new(n||(n=Promise))((function(i,a){function o(e){try{l(r.next(e))}catch(e){a(e)}}function s(e){try{l(r.throw(e))}catch(e){a(e)}}function l(e){var t;e.done?i(e.value):(t=e.value,t instanceof n?t:new n((function(e){e(t)}))).then(o,s)}l((r=r.apply(e,t||[])).next())}))}function $a(e,t){var n,r,i,a,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return a={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(a[Symbol.iterator]=function(){return this}),a;function s(s){return function(l){return function(s){if(n)throw new TypeError("Generator is already executing.");for(;a&&(a=0,s[0]&&(o=0)),o;)try{if(n=1,r&&(i=2&s[0]?r.return:s[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,s[1])).done)return i;switch(r=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return o.label++,{value:s[1],done:!1};case 5:o.label++,r=s[1],s=[0];continue;case 7:s=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]<i[3])){o.label=s[1];break}if(6===s[0]&&o.label<i[1]){o.label=i[1],i=s;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(s);break}i[2]&&o.ops.pop(),o.trys.pop();continue}s=t.call(e,o)}catch(e){s=[6,e],r=0}finally{n=i=0}if(5&s[0])throw s[1];return{value:s[0]?s[1]:void 0,done:!0}}([s,l])}}}function Ya(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var r,i,a=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(r=a.next()).done;)o.push(r.value)}catch(e){i={error:e}}finally{try{r&&!r.done&&(n=a.return)&&n.call(a)}finally{if(i)throw i.error}}return o}Object.create,Object.create;var qa=new Map([["aac","audio/aac"],["abw","application/x-abiword"],["arc","application/x-freearc"],["avif","image/avif"],["avi","video/x-msvideo"],["azw","application/vnd.amazon.ebook"],["bin","application/octet-stream"],["bmp","image/bmp"],["bz","application/x-bzip"],["bz2","application/x-bzip2"],["cda","application/x-cdf"],["csh","application/x-csh"],["css","text/css"],["csv","text/csv"],["doc","application/msword"],["docx","application/vnd.openxmlformats-officedocument.wordprocessingml.document"],["eot","application/vnd.ms-fontobject"],["epub","application/epub+zip"],["gz","application/gzip"],["gif","image/gif"],["heic","image/heic"],["heif","image/heif"],["htm","text/html"],["html","text/html"],["ico","image/vnd.microsoft.icon"],["ics","text/calendar"],["jar","application/java-archive"],["jpeg","image/jpeg"],["jpg","image/jpeg"],["js","text/javascript"],["json","application/json"],["jsonld","application/ld+json"],["mid","audio/midi"],["midi","audio/midi"],["mjs","text/javascript"],["mp3","audio/mpeg"],["mp4","video/mp4"],["mpeg","video/mpeg"],["mpkg","application/vnd.apple.installer+xml"],["odp","application/vnd.oasis.opendocument.presentation"],["ods","application/vnd.oasis.opendocument.spreadsheet"],["odt","application/vnd.oasis.opendocument.text"],["oga","audio/ogg"],["ogv","video/ogg"],["ogx","application/ogg"],["opus","audio/opus"],["otf","font/otf"],["png","image/png"],["pdf","application/pdf"],["php","application/x-httpd-php"],["ppt","application/vnd.ms-powerpoint"],["pptx","application/vnd.openxmlformats-officedocument.presentationml.presentation"],["rar","application/vnd.rar"],["rtf","application/rtf"],["sh","application/x-sh"],["svg","image/svg+xml"],["swf","application/x-shockwave-flash"],["tar","application/x-tar"],["tif","image/tiff"],["tiff","image/tiff"],["ts","video/mp2t"],["ttf","font/ttf"],["txt","text/plain"],["vsd","application/vnd.visio"],["wav","audio/wav"],["weba","audio/webm"],["webm","video/webm"],["webp","image/webp"],["woff","font/woff"],["woff2","font/woff2"],["xhtml","application/xhtml+xml"],["xls","application/vnd.ms-excel"],["xlsx","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"],["xml","application/xml"],["xul","application/vnd.mozilla.xul+xml"],["zip","application/zip"],["7z","application/x-7z-compressed"],["mkv","video/x-matroska"],["mov","video/quicktime"],["msg","application/vnd.ms-outlook"]]);function Qa(e,t){var n=function(e){var t=e.name;if(t&&-1!==t.lastIndexOf(".")&&!e.type){var n=t.split(".").pop().toLowerCase(),r=qa.get(n);r&&Object.defineProperty(e,"type",{value:r,writable:!1,configurable:!1,enumerable:!0})}return e}(e);if("string"!=typeof n.path){var r=e.webkitRelativePath;Object.defineProperty(n,"path",{value:"string"==typeof t?t:"string"==typeof r&&r.length>0?r:e.name,writable:!1,configurable:!1,enumerable:!0})}return n}var Za=[".DS_Store","Thumbs.db"];function eo(e){return"object"==typeof e&&null!==e}function to(e){return ao(e.target.files).map((function(e){return Qa(e)}))}function no(e){return Ka(this,void 0,void 0,(function(){return $a(this,(function(t){switch(t.label){case 0:return[4,Promise.all(e.map((function(e){return e.getFile()})))];case 1:return[2,t.sent().map((function(e){return Qa(e)}))]}}))}))}function ro(e,t){return Ka(this,void 0,void 0,(function(){var n;return $a(this,(function(r){switch(r.label){case 0:return null===e?[2,[]]:e.items?(n=ao(e.items).filter((function(e){return"file"===e.kind})),"drop"!==t?[2,n]:[4,Promise.all(n.map(oo))]):[3,2];case 1:return[2,io(so(r.sent()))];case 2:return[2,io(ao(e.files).map((function(e){return Qa(e)})))]}}))}))}function io(e){return e.filter((function(e){return-1===Za.indexOf(e.name)}))}function ao(e){if(null===e)return[];for(var t=[],n=0;n<e.length;n++){var r=e[n];t.push(r)}return t}function oo(e){if("function"!=typeof e.webkitGetAsEntry)return lo(e);var t=e.webkitGetAsEntry();return t&&t.isDirectory?uo(t):lo(e)}function so(e){return e.reduce((function(e,t){return function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(Ya(arguments[t]));return e}(e,Array.isArray(t)?so(t):[t])}),[])}function lo(e){var t=e.getAsFile();if(!t)return Promise.reject(e+" is not a File");var n=Qa(t);return Promise.resolve(n)}function co(e){return Ka(this,void 0,void 0,(function(){return $a(this,(function(t){return[2,e.isDirectory?uo(e):ho(e)]}))}))}function uo(e){var t=e.createReader();return new Promise((function(e,n){var r=[];!function i(){var a=this;t.readEntries((function(t){return Ka(a,void 0,void 0,(function(){var a,o,s;return $a(this,(function(l){switch(l.label){case 0:if(t.length)return[3,5];l.label=1;case 1:return l.trys.push([1,3,,4]),[4,Promise.all(r)];case 2:return a=l.sent(),e(a),[3,4];case 3:return o=l.sent(),n(o),[3,4];case 4:return[3,6];case 5:s=Promise.all(t.map(co)),r.push(s),i(),l.label=6;case 6:return[2]}}))}))}),(function(e){n(e)}))}()}))}function ho(e){return Ka(this,void 0,void 0,(function(){return $a(this,(function(t){return[2,new Promise((function(t,n){e.file((function(n){var r=Qa(n,e.fullPath);t(r)}),(function(e){n(e)}))}))]}))}))}var fo=i(8363);function po(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function mo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?po(Object(n),!0).forEach((function(t){go(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):po(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function go(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function vo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||function(e,t){if(e){if("string"==typeof e)return yo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?yo(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 yo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}var bo=function(e){e=Array.isArray(e)&&1===e.length?e[0]:e;var t=Array.isArray(e)?"one of ".concat(e.join(", ")):e;return{code:"file-invalid-type",message:"File type must be ".concat(t)}},_o=function(e){return{code:"file-too-large",message:"File is larger than ".concat(e," ").concat(1===e?"byte":"bytes")}},xo=function(e){return{code:"file-too-small",message:"File is smaller than ".concat(e," ").concat(1===e?"byte":"bytes")}},wo={code:"too-many-files",message:"Too many files"};function Mo(e,t){var n="application/x-moz-file"===e.type||(0,fo.Z)(e,t);return[n,n?null:bo(t)]}function So(e,t,n){if(Ao(e.size))if(Ao(t)&&Ao(n)){if(e.size>n)return[!1,_o(n)];if(e.size<t)return[!1,xo(t)]}else{if(Ao(t)&&e.size<t)return[!1,xo(t)];if(Ao(n)&&e.size>n)return[!1,_o(n)]}return[!0,null]}function Ao(e){return null!=e}function Eo(e){var t=e.files,n=e.accept,r=e.minSize,i=e.maxSize,a=e.multiple,o=e.maxFiles;return!(!a&&t.length>1||a&&o>=1&&t.length>o)&&t.every((function(e){var t=vo(Mo(e,n),1)[0],a=vo(So(e,r,i),1)[0];return t&&a}))}function Co(e){return"function"==typeof e.isPropagationStopped?e.isPropagationStopped():void 0!==e.cancelBubble&&e.cancelBubble}function To(e){return e.dataTransfer?Array.prototype.some.call(e.dataTransfer.types,(function(e){return"Files"===e||"application/x-moz-file"===e})):!!e.target&&!!e.target.files}function Ro(e){e.preventDefault()}function Bo(e){return-1!==e.indexOf("MSIE")||-1!==e.indexOf("Trident/")}function Po(e){return-1!==e.indexOf("Edge/")}function ko(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:window.navigator.userAgent;return Bo(e)||Po(e)}function Io(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){for(var n=arguments.length,r=new Array(n>1?n-1:0),i=1;i<n;i++)r[i-1]=arguments[i];return t.some((function(t){return!Co(e)&&t&&t.apply(void 0,[e].concat(r)),Co(e)}))}}function Lo(){return"showOpenFilePicker"in window}function Do(e){return e="string"==typeof e?e.split(","):e,[{description:"everything",accept:Array.isArray(e)?e.filter((function(e){return"audio/*"===e||"video/*"===e||"image/*"===e||"text/*"===e||/\w+\/[-+.\w]+/g.test(e)})).reduce((function(e,t){return mo(mo({},e),{},go({},t,[]))}),{}):{}}]}function Oo(e){return e instanceof DOMException&&("AbortError"===e.name||e.code===e.ABORT_ERR)}function Fo(e){return e instanceof DOMException&&("SecurityError"===e.name||e.code===e.SECURITY_ERR)}var No=["children"],zo=["open"],Uo=["refKey","role","onKeyDown","onFocus","onBlur","onClick","onDragEnter","onDragOver","onDragLeave","onDrop"],Ho=["refKey","onChange","onClick"];function Go(e){return function(e){if(Array.isArray(e))return Wo(e)}(e)||function(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}(e)||jo(e)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Vo(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a=[],o=!0,s=!1;try{for(n=n.call(e);!(o=(r=n.next()).done)&&(a.push(r.value),!t||a.length!==t);o=!0);}catch(e){s=!0,i=e}finally{try{o||null==n.return||n.return()}finally{if(s)throw i}}return a}}(e,t)||jo(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 jo(e,t){if(e){if("string"==typeof e)return Wo(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?Wo(e,t):void 0}}function Wo(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}function Jo(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),n.push.apply(n,r)}return n}function Xo(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?Jo(Object(n),!0).forEach((function(t){Ko(e,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):Jo(Object(n)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))}))}return e}function Ko(e,t,n){return t in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function $o(e,t){if(null==e)return{};var n,r,i=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,t);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||Object.prototype.propertyIsEnumerable.call(e,n)&&(i[n]=e[n])}return i}var Yo=(0,n.forwardRef)((function(e,t){var r=e.children,i=Zo($o(e,No)),a=i.open,o=$o(i,zo);return(0,n.useImperativeHandle)(t,(function(){return{open:a}}),[a]),n.createElement(n.Fragment,null,r(Xo(Xo({},o),{},{open:a})))}));Yo.displayName="Dropzone";var qo={disabled:!1,getFilesFromEvent:function(e){return Ka(this,void 0,void 0,(function(){return $a(this,(function(t){return eo(e)&&eo(e.dataTransfer)?[2,ro(e.dataTransfer,e.type)]:eo(n=e)&&eo(n.target)?[2,to(e)]:Array.isArray(e)&&e.every((function(e){return"getFile"in e&&"function"==typeof e.getFile}))?[2,no(e)]:[2,[]];var n}))}))},maxSize:1/0,minSize:0,multiple:!0,maxFiles:0,preventDropOnDocument:!0,noClick:!1,noKeyboard:!1,noDrag:!1,noDragEventsBubbling:!1,validator:null,useFsAccessApi:!0};Yo.defaultProps=qo,Yo.propTypes={children:Xa().func,accept:Xa().oneOfType([Xa().string,Xa().arrayOf(Xa().string)]),multiple:Xa().bool,preventDropOnDocument:Xa().bool,noClick:Xa().bool,noKeyboard:Xa().bool,noDrag:Xa().bool,noDragEventsBubbling:Xa().bool,minSize:Xa().number,maxSize:Xa().number,maxFiles:Xa().number,disabled:Xa().bool,getFilesFromEvent:Xa().func,onFileDialogCancel:Xa().func,onFileDialogOpen:Xa().func,useFsAccessApi:Xa().bool,onDragEnter:Xa().func,onDragLeave:Xa().func,onDragOver:Xa().func,onDrop:Xa().func,onDropAccepted:Xa().func,onDropRejected:Xa().func,validator:Xa().func};var Qo={isFocused:!1,isFileDialogActive:!1,isDragActive:!1,isDragAccept:!1,isDragReject:!1,draggedFiles:[],acceptedFiles:[],fileRejections:[]};function Zo(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=Xo(Xo({},qo),e),r=t.accept,i=t.disabled,a=t.getFilesFromEvent,o=t.maxSize,s=t.minSize,l=t.multiple,c=t.maxFiles,u=t.onDragEnter,d=t.onDragLeave,h=t.onDragOver,f=t.onDrop,p=t.onDropAccepted,m=t.onDropRejected,g=t.onFileDialogCancel,v=t.onFileDialogOpen,y=t.useFsAccessApi,b=t.preventDropOnDocument,_=t.noClick,x=t.noKeyboard,w=t.noDrag,M=t.noDragEventsBubbling,S=t.validator,A=(0,n.useMemo)((function(){return"function"==typeof v?v:ts}),[v]),E=(0,n.useMemo)((function(){return"function"==typeof g?g:ts}),[g]),C=(0,n.useRef)(null),T=(0,n.useRef)(null),R=(0,n.useReducer)(es,Qo),B=Vo(R,2),P=B[0],k=B[1],I=P.isFocused,L=P.isFileDialogActive,D=P.draggedFiles,O=(0,n.useRef)("undefined"!=typeof window&&window.isSecureContext&&y&&Lo()),F=function(){!O.current&&L&&setTimeout((function(){T.current&&(T.current.files.length||(k({type:"closeDialog"}),E()))}),300)};(0,n.useEffect)((function(){return window.addEventListener("focus",F,!1),function(){window.removeEventListener("focus",F,!1)}}),[T,L,E,O]);var N=(0,n.useRef)([]),z=function(e){C.current&&C.current.contains(e.target)||(e.preventDefault(),N.current=[])};(0,n.useEffect)((function(){return b&&(document.addEventListener("dragover",Ro,!1),document.addEventListener("drop",z,!1)),function(){b&&(document.removeEventListener("dragover",Ro),document.removeEventListener("drop",z))}}),[C,b]);var U=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),Z(e),N.current=[].concat(Go(N.current),[e.target]),To(e)&&Promise.resolve(a(e)).then((function(t){Co(e)&&!M||(k({draggedFiles:t,isDragActive:!0,type:"setDraggedFiles"}),u&&u(e))}))}),[a,u,M]),H=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),Z(e);var t=To(e);if(t&&e.dataTransfer)try{e.dataTransfer.dropEffect="copy"}catch(e){}return t&&h&&h(e),!1}),[h,M]),G=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),Z(e);var t=N.current.filter((function(e){return C.current&&C.current.contains(e)})),n=t.indexOf(e.target);-1!==n&&t.splice(n,1),N.current=t,t.length>0||(k({isDragActive:!1,type:"setDraggedFiles",draggedFiles:[]}),To(e)&&d&&d(e))}),[C,d,M]),V=(0,n.useCallback)((function(e,t){var n=[],i=[];e.forEach((function(e){var t=Vo(Mo(e,r),2),a=t[0],l=t[1],c=Vo(So(e,s,o),2),u=c[0],d=c[1],h=S?S(e):null;if(a&&u&&!h)n.push(e);else{var f=[l,d];h&&(f=f.concat(h)),i.push({file:e,errors:f.filter((function(e){return e}))})}})),(!l&&n.length>1||l&&c>=1&&n.length>c)&&(n.forEach((function(e){i.push({file:e,errors:[wo]})})),n.splice(0)),k({acceptedFiles:n,fileRejections:i,type:"setFiles"}),f&&f(n,i,t),i.length>0&&m&&m(i,t),n.length>0&&p&&p(n,t)}),[k,l,r,s,o,c,f,p,m,S]),j=(0,n.useCallback)((function(e){e.preventDefault(),e.persist(),Z(e),N.current=[],To(e)&&Promise.resolve(a(e)).then((function(t){Co(e)&&!M||V(t,e)})),k({type:"reset"})}),[a,V,M]),W=(0,n.useCallback)((function(){if(O.current){k({type:"openDialog"}),A();var e={multiple:l,types:Do(r)};window.showOpenFilePicker(e).then((function(e){return a(e)})).then((function(e){V(e,null),k({type:"closeDialog"})})).catch((function(e){Oo(e)?(E(e),k({type:"closeDialog"})):Fo(e)&&(O.current=!1,T.current&&(T.current.value=null,T.current.click()))}))}else T.current&&(k({type:"openDialog"}),A(),T.current.value=null,T.current.click())}),[k,A,E,y,V,r,l]),J=(0,n.useCallback)((function(e){C.current&&C.current.isEqualNode(e.target)&&(" "!==e.key&&"Enter"!==e.key&&32!==e.keyCode&&13!==e.keyCode||(e.preventDefault(),W()))}),[C,W]),X=(0,n.useCallback)((function(){k({type:"focus"})}),[]),K=(0,n.useCallback)((function(){k({type:"blur"})}),[]),$=(0,n.useCallback)((function(){_||(ko()?setTimeout(W,0):W())}),[_,W]),Y=function(e){return i?null:e},q=function(e){return x?null:Y(e)},Q=function(e){return w?null:Y(e)},Z=function(e){M&&e.stopPropagation()},ee=(0,n.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,r=e.role,a=e.onKeyDown,o=e.onFocus,s=e.onBlur,l=e.onClick,c=e.onDragEnter,u=e.onDragOver,d=e.onDragLeave,h=e.onDrop,f=$o(e,Uo);return Xo(Xo(Ko({onKeyDown:q(Io(a,J)),onFocus:q(Io(o,X)),onBlur:q(Io(s,K)),onClick:Y(Io(l,$)),onDragEnter:Q(Io(c,U)),onDragOver:Q(Io(u,H)),onDragLeave:Q(Io(d,G)),onDrop:Q(Io(h,j)),role:"string"==typeof r&&""!==r?r:"button"},n,C),i||x?{}:{tabIndex:0}),f)}}),[C,J,X,K,$,U,H,G,j,x,w,i]),te=(0,n.useCallback)((function(e){e.stopPropagation()}),[]),ne=(0,n.useMemo)((function(){return function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.refKey,n=void 0===t?"ref":t,i=e.onChange,a=e.onClick,o=$o(e,Ho),s=Ko({accept:r,multiple:l,type:"file",style:{display:"none"},onChange:Y(Io(i,j)),onClick:Y(Io(a,te)),tabIndex:-1},n,T);return Xo(Xo({},s),o)}}),[T,r,l,j,i]),re=D.length,ie=re>0&&Eo({files:D,accept:r,minSize:s,maxSize:o,multiple:l,maxFiles:c}),ae=re>0&&!ie;return Xo(Xo({},P),{},{isDragAccept:ie,isDragReject:ae,isFocused:I&&!i,getRootProps:ee,getInputProps:ne,rootRef:C,inputRef:T,open:Y(W)})}function es(e,t){switch(t.type){case"focus":return Xo(Xo({},e),{},{isFocused:!0});case"blur":return Xo(Xo({},e),{},{isFocused:!1});case"openDialog":return Xo(Xo({},Qo),{},{isFileDialogActive:!0});case"closeDialog":return Xo(Xo({},e),{},{isFileDialogActive:!1});case"setDraggedFiles":var n=t.isDragActive,r=t.draggedFiles;return Xo(Xo({},e),{},{draggedFiles:r,isDragActive:n});case"setFiles":return Xo(Xo({},e),{},{acceptedFiles:t.acceptedFiles,fileRejections:t.fileRejections});case"reset":return Xo({},Qo);default:return e}}function ts(){}Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable,Object.defineProperty,Object.getOwnPropertySymbols,Object.prototype.hasOwnProperty,Object.prototype.propertyIsEnumerable;var ns=i(4529),rs=i.n(ns);const is=(...e)=>e.filter(Boolean).join(".");function as(e=3){const t=(0,n.useRef)(null),r=(0,n.useRef)(null),[i,a]=(0,n.useState)(!1),o=(0,n.useCallback)((()=>a(!0)),[]),s=(0,n.useCallback)((()=>a(!1)),[]);return(0,n.useLayoutEffect)((()=>{if(i){const{bottom:n,top:i,left:a}=t.current.getBoundingClientRect(),{height:o}=r.current.getBoundingClientRect(),s=n+o>window.innerHeight-40?"up":"down";r.current.style.position="fixed",r.current.style.zIndex="10000",r.current.style.left=a+"px","down"===s?r.current.style.top=n+e+"px":r.current.style.bottom=window.innerHeight-i+e+"px"}}),[e,i]),{popinRef:t,wrapperRef:r,shown:i,show:o,hide:s}}var os;os=[function(e,t){var n={white:"#ffffff",bisque:"#ffe4c4",blue:"#0000ff",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",antiquewhite:"#faebd7",aqua:"#00ffff",azure:"#f0ffff",whitesmoke:"#f5f5f5",papayawhip:"#ffefd5",plum:"#dda0dd",blanchedalmond:"#ffebcd",black:"#000000",gold:"#ffd700",goldenrod:"#daa520",gainsboro:"#dcdcdc",cornsilk:"#fff8dc",cornflowerblue:"#6495ed",burlywood:"#deb887",aquamarine:"#7fffd4",beige:"#f5f5dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkkhaki:"#bdb76b",darkgray:"#a9a9a9",darkgreen:"#006400",darkgrey:"#a9a9a9",peachpuff:"#ffdab9",darkmagenta:"#8b008b",darkred:"#8b0000",darkorchid:"#9932cc",darkorange:"#ff8c00",darkslateblue:"#483d8b",gray:"#808080",darkslategray:"#2f4f4f",darkslategrey:"#2f4f4f",deeppink:"#ff1493",deepskyblue:"#00bfff",wheat:"#f5deb3",firebrick:"#b22222",floralwhite:"#fffaf0",ghostwhite:"#f8f8ff",darkviolet:"#9400d3",magenta:"#ff00ff",green:"#008000",dodgerblue:"#1e90ff",grey:"#808080",honeydew:"#f0fff0",hotpink:"#ff69b4",blueviolet:"#8a2be2",forestgreen:"#228b22",lawngreen:"#7cfc00",indianred:"#cd5c5c",indigo:"#4b0082",fuchsia:"#ff00ff",brown:"#a52a2a",maroon:"#800000",mediumblue:"#0000cd",lightcoral:"#f08080",darkturquoise:"#00ced1",lightcyan:"#e0ffff",ivory:"#fffff0",lightyellow:"#ffffe0",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",linen:"#faf0e6",mediumaquamarine:"#66cdaa",lemonchiffon:"#fffacd",lime:"#00ff00",khaki:"#f0e68c",mediumseagreen:"#3cb371",limegreen:"#32cd32",mediumspringgreen:"#00fa9a",lightskyblue:"#87cefa",lightblue:"#add8e6",midnightblue:"#191970",lightpink:"#ffb6c1",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",mintcream:"#f5fffa",lightslategray:"#778899",lightslategrey:"#778899",navajowhite:"#ffdead",navy:"#000080",mediumvioletred:"#c71585",powderblue:"#b0e0e6",palegoldenrod:"#eee8aa",oldlace:"#fdf5e6",paleturquoise:"#afeeee",mediumturquoise:"#48d1cc",mediumorchid:"#ba55d3",rebeccapurple:"#663399",lightsteelblue:"#b0c4de",mediumslateblue:"#7b68ee",thistle:"#d8bfd8",tan:"#d2b48c",orchid:"#da70d6",mediumpurple:"#9370db",purple:"#800080",pink:"#ffc0cb",skyblue:"#87ceeb",springgreen:"#00ff7f",palegreen:"#98fb98",red:"#ff0000",yellow:"#ffff00",slateblue:"#6a5acd",lavenderblush:"#fff0f5",peru:"#cd853f",palevioletred:"#db7093",violet:"#ee82ee",teal:"#008080",slategray:"#708090",slategrey:"#708090",aliceblue:"#f0f8ff",darkseagreen:"#8fbc8f",darkolivegreen:"#556b2f",greenyellow:"#adff2f",seagreen:"#2e8b57",seashell:"#fff5ee",tomato:"#ff6347",silver:"#c0c0c0",sienna:"#a0522d",lavender:"#e6e6fa",lightgreen:"#90ee90",orange:"#ffa500",orangered:"#ff4500",steelblue:"#4682b4",royalblue:"#4169e1",turquoise:"#40e0d0",yellowgreen:"#9acd32",salmon:"#fa8072",saddlebrown:"#8b4513",sandybrown:"#f4a460",rosybrown:"#bc8f8f",darksalmon:"#e9967a",lightgoldenrodyellow:"#fafad2",snow:"#fffafa",lightgrey:"#d3d3d3",lightgray:"#d3d3d3",dimgray:"#696969",dimgrey:"#696969",olivedrab:"#6b8e23",olive:"#808000"},r={};for(var i in n)r[n[i]]=i;var a={};e.prototype.toName=function(t){if(!(this.rgba.a||this.rgba.r||this.rgba.g||this.rgba.b))return"transparent";var i,o,s=r[this.toHex()];if(s)return s;if(null==t?void 0:t.closest){var l=this.toRgb(),c=1/0,u="black";if(!a.length)for(var d in n)a[d]=new e(n[d]).toRgb();for(var h in n){var f=(i=l,o=a[h],Math.pow(i.r-o.r,2)+Math.pow(i.g-o.g,2)+Math.pow(i.b-o.b,2));f<c&&(c=f,u=h)}return u}},t.string.push([function(t){var r=t.toLowerCase(),i="transparent"===r?"#0000":n[r];return i?new e(i).toRgb():null},"name"])}],os.forEach((function(e){pa.indexOf(e)<0&&(e(ha,oa),pa.push(e))}));const ss={rgb:"toRgb",hsl:"toHsl",hsv:"toHsv",hex:"toHex"};function ls(e,{format:t,hasAlpha:n,isString:r}){const i=e[ss[t]+(r&&"hex"!==t?"String":"")]();return"object"!=typeof i||n?i:function(e,t){const n=Tn({},e);return["a"].forEach((t=>t in e&&delete n[t])),n}(i)}Z.extend({color:()=>e=>fa(e).isValid()});const cs=(e,t)=>{const n=fa(e);if(!n.isValid())throw Error("Invalid color");return ls(n,t)};var us=Object.freeze({__proto__:null,schema:e=>Z().color().test(e),sanitize:cs,format:(e,t)=>ls(fa(e),Tn(Tn({},t),{},{isString:!0,format:"hex"})),normalize:({value:e})=>{const t=function(e){return la(e)[1]}(e),n={format:"name"===t?"hex":t,hasAlpha:"object"==typeof e?"a"in e:"hex"===t&&8===e.length||/^(rgba)|(hsla)|(hsva)/.test(e),isString:"string"==typeof e};return{value:cs(e,n),settings:n}}});const ds=gr("div",{position:"relative",boxSizing:"border-box",borderRadius:"$sm",overflow:"hidden",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",backgroundColor:"#fff",backgroundImage:'url(\'data:image/svg+xml;charset=utf-8,<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill-opacity=".05"><path d="M8 0h8v8H8zM0 8h8v8H0z"/></svg>\')',$inputStyle:"",$hover:"",zIndex:1,variants:{active:{true:{$inputStyle:"$accent1"}}},"&::before":{content:'""',position:"absolute",top:0,bottom:0,right:0,left:0,backgroundColor:"currentColor",zIndex:1}}),hs=gr("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto",columnGap:"$colGap",alignItems:"center"}),fs=gr("div",{width:"$colorPickerWidth",height:"$colorPickerHeight",".react-colorful":{width:"100%",height:"100%",boxShadow:"$level2",cursor:"crosshair"},".react-colorful__saturation":{borderRadius:"$sm $sm 0 0"},".react-colorful__alpha, .react-colorful__hue":{height:10},".react-colorful__last-control":{borderRadius:"0 0 $sm $sm"},".react-colorful__pointer":{height:12,width:12}});function ps(e,t){return"rgb"!==t?fa(e).toRgb():e}function ms({value:e,displayValue:t,settings:r,onUpdate:i}){const{emitOnEditStart:a,emitOnEditEnd:o}=cr(),{format:s,hasAlpha:l}=r,{popinRef:c,wrapperRef:u,shown:d,show:h,hide:f}=as(),p=(0,n.useRef)(0),[m,g]=(0,n.useState)((()=>ps(e,s))),v=l?Va:Wa,y=()=>{f(),o(),window.clearTimeout(p.current)};return(0,n.useEffect)((()=>()=>window.clearTimeout(p.current)),[]),n.createElement(n.Fragment,null,n.createElement(ds,{ref:c,active:d,onClick:()=>(g(ps(e,s)),h(),void a()),style:{color:t}}),d&&n.createElement(jr,null,n.createElement(Hr,{onPointerUp:y}),n.createElement(fs,{ref:u,onMouseEnter:()=>window.clearTimeout(p.current),onMouseLeave:e=>0===e.buttons&&void(p.current=window.setTimeout(y,500))},n.createElement(v,{color:m,onChange:i}))))}var gs=Tn({component:function(){const{value:e,displayValue:t,label:r,onChange:i,onUpdate:a,settings:o}=cr();return n.createElement(Zr,{input:!0},n.createElement(Kr,null,r),n.createElement(hs,null,n.createElement(ms,{value:e,displayValue:t,onChange:i,onUpdate:a,settings:o}),n.createElement(Rr,{value:t,onChange:i,onUpdate:a})))}},us),vs=Tn({component:function(){const{label:e,displayValue:t,onUpdate:r,settings:i}=cr();return n.createElement(Zr,{input:!0},n.createElement(Kr,null,e),n.createElement(Li,{value:t,settings:i,onUpdate:r}))}},Ui(["x","y","z"]));const ys=gr("div",{$flexCenter:"",position:"relative",backgroundColor:"$elevation3",borderRadius:"$sm",cursor:"pointer",height:"$rowHeight",width:"$rowHeight",touchAction:"none",$draggable:"",$hover:"","&:active":{cursor:"none"},"&::after":{content:'""',backgroundColor:"$accent2",height:4,width:4,borderRadius:2}}),bs=gr("div",{$flexCenter:"",width:"$joystickWidth",height:"$joystickHeight",borderRadius:"$sm",boxShadow:"$level2",position:"fixed",zIndex:1e4,overflow:"hidden",$draggable:"",transform:"translate(-50%, -50%)",variants:{isOutOfBounds:{true:{backgroundColor:"$elevation1"},false:{backgroundColor:"$elevation3"}}},"> div":{position:"absolute",$flexCenter:"",borderStyle:"solid",borderWidth:1,borderColor:"$highlight1",backgroundColor:"$elevation3",width:"80%",height:"80%","&::after,&::before":{content:'""',position:"absolute",zindex:10,backgroundColor:"$highlight1"},"&::before":{width:"100%",height:1},"&::after":{height:"100%",width:1}},"> span":{position:"relative",zindex:100,width:10,height:10,backgroundColor:"$accent2",borderRadius:"50%"}});function _s({value:e,settings:t,onUpdate:r}){const i=(0,n.useRef)(),a=(0,n.useRef)(0),o=(0,n.useRef)(0),s=(0,n.useRef)(1),[l,c]=(0,n.useState)(!1),[u,d]=(0,n.useState)(!1),[h,f]=ni(),p=(0,n.useRef)(null),m=(0,n.useRef)(null);(0,n.useLayoutEffect)((()=>{if(l){const{top:e,left:t,width:n,height:r}=p.current.getBoundingClientRect();m.current.style.left=t+n/2+"px",m.current.style.top=e+r/2+"px"}}),[l]);const{keys:[g,v],joystick:y}=t,b="invertY"===y?1:-1,{[g]:{step:_},[v]:{step:x}}=t,w=wr("sizes","joystickWidth"),M=wr("sizes","joystickHeight"),S=.8*parseFloat(w)/2,A=.8*parseFloat(M)/2,E=(0,n.useCallback)((()=>{i.current||(d(!0),a.current&&f({x:a.current*S}),o.current&&f({y:o.current*-A}),i.current=window.setInterval((()=>{r((e=>{const t=_*a.current*s.current,n=b*x*o.current*s.current;return Array.isArray(e)?{[g]:e[0]+t,[v]:e[1]+n}:{[g]:e[g]+t,[v]:e[v]+n}}))}),16))}),[S,A,r,f,_,x,g,v,b]),C=(0,n.useCallback)((()=>{window.clearTimeout(i.current),i.current=void 0,d(!1)}),[]);(0,n.useEffect)((()=>{function e(e){s.current=er(e)}return window.addEventListener("keydown",e),window.addEventListener("keyup",e),()=>{window.clearTimeout(i.current),window.removeEventListener("keydown",e),window.removeEventListener("keyup",e)}}),[]);const T=ti((({first:t,active:n,delta:[i,l],movement:[u,d]})=>{t&&c(!0);const h=Rn(u,-S,S),p=Rn(d,-A,A);a.current=Math.abs(u)>Math.abs(h)?Math.sign(u-h):0,o.current=Math.abs(d)>Math.abs(p)?Math.sign(p-d):0;let m=e[g],y=e[v];n?(a.current||(m+=i*_*s.current,f({x:h})),o.current||(y-=b*l*x*s.current,f({y:p})),a.current||o.current?E():C(),r({[g]:m,[v]:y})):(c(!1),a.current=0,o.current=0,f({x:0,y:0}),C())}));return n.createElement(ys,sr({ref:p},T()),l&&n.createElement(jr,null,n.createElement(bs,{ref:m,isOutOfBounds:u},n.createElement("div",null),n.createElement("span",{ref:h}))))}const xs=gr("div",{display:"grid",columnGap:"$colGap",variants:{withJoystick:{true:{gridTemplateColumns:"$sizes$rowHeight auto"},false:{gridTemplateColumns:"auto"}}}}),ws=["joystick"],Ms=Ui(["x","y"]);var Ss=Tn(Tn({component:function(){const{label:e,displayValue:t,onUpdate:r,settings:i}=cr();return n.createElement(Zr,{input:!0},n.createElement(Kr,null,e),n.createElement(xs,{withJoystick:!!i.joystick},i.joystick&&n.createElement(_s,{value:t,settings:i,onUpdate:r}),n.createElement(Li,{value:t,settings:i,onUpdate:r})))}},Ms),{},{normalize:e=>{let{joystick:t=!0}=e,n=dn(e,ws);const{value:r,settings:i}=Ms.normalize(n);return{value:r,settings:Tn(Tn({},i),{},{joystick:t})}}}),As=Object.freeze({__proto__:null,sanitize:e=>{if(void 0!==e){if(e instanceof File)try{return URL.createObjectURL(e)}catch(e){return}if("string"==typeof e&&0===e.indexOf("blob:"))return e;throw Error("Invalid image format [undefined | blob | File].")}},schema:(e,t)=>"object"==typeof t&&"image"in t,normalize:({image:e})=>({value:e})});const Es=gr("div",{position:"relative",display:"grid",gridTemplateColumns:"$sizes$rowHeight auto 20px",columnGap:"$colGap",alignItems:"center"}),Cs=gr("div",{$flexCenter:"",overflow:"hidden",height:"$rowHeight",background:"$elevation3",textAlign:"center",color:"inherit",borderRadius:"$sm",outline:"none",userSelect:"none",cursor:"pointer",$inputStyle:"",$hover:"",$focusWithin:"",$active:"$accent1 $elevation1",variants:{isDragAccept:{true:{$inputStyle:"$accent1",backgroundColor:"$elevation1"}}}}),Ts=gr("div",{boxSizing:"border-box",borderRadius:"$sm",height:"$rowHeight",width:"$rowHeight",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center",variants:{hasImage:{true:{cursor:"pointer",$hover:"",$active:""}}}}),Rs=gr("div",{$flexCenter:"",width:"$imagePreviewWidth",height:"$imagePreviewHeight",borderRadius:"$sm",boxShadow:"$level2",pointerEvents:"none",$inputStyle:"",backgroundSize:"cover",backgroundPosition:"center"}),Bs=gr("div",{fontSize:"0.8em",height:"100%",padding:"$rowGap $md"}),Ps=gr("div",{$flexCenter:"",top:"0",right:"0",marginRight:"$sm",height:"100%",cursor:"pointer",variants:{disabled:{true:{color:"$elevation3",cursor:"default"}}},"&::after,&::before":{content:'""',position:"absolute",height:2,width:10,borderRadius:1,backgroundColor:"currentColor"},"&::after":{transform:"rotate(45deg)"},"&::before":{transform:"rotate(-45deg)"}});var ks=Tn({component:function(){const{label:e,value:t,onUpdate:r,disabled:i}=cr(),{popinRef:a,wrapperRef:o,shown:s,show:l,hide:c}=as(),u=(0,n.useCallback)((e=>{e.length&&r(e[0])}),[r]),d=(0,n.useCallback)((e=>{e.stopPropagation(),r(void 0)}),[r]),{getRootProps:h,getInputProps:f,isDragAccept:p}=Zo({maxFiles:1,accept:"image/*",onDrop:u,disabled:i});return n.createElement(Zr,{input:!0},n.createElement(Kr,null,e),n.createElement(Es,null,n.createElement(Ts,{ref:a,hasImage:!!t,onPointerDown:()=>!!t&&l(),onPointerUp:c,style:{backgroundImage:t?`url(${t})`:"none"}}),s&&!!t&&n.createElement(jr,null,n.createElement(Hr,{onPointerUp:c,style:{cursor:"pointer"}}),n.createElement(Rs,{ref:o,style:{backgroundImage:`url(${t})`}})),n.createElement(Cs,h({isDragAccept:p}),n.createElement("input",f()),n.createElement(Bs,null,p?"drop image":"click or drop")),n.createElement(Ps,{onClick:d,disabled:!t})))}},As);const Is=Z().number(),Ls=e=>({min:e[0],max:e[1]}),Ds=(e,{bounds:[t,n]},r)=>{const i=Array.isArray(e)?Ls(e):e,a={min:r[0],max:r[1]},{min:o,max:s}=Tn(Tn({},a),i);return[Rn(Number(o),t,Math.max(t,s)),Rn(Number(s),Math.min(n,o),n)]};var Os=Object.freeze({__proto__:null,schema:(e,t)=>Z().array().length(2).every.number().test(e)&&Z().schema({min:Is,max:Is}).test(t),format:Ls,sanitize:Ds,normalize:({value:e,min:t,max:n})=>{const r={min:t,max:n},i=[t,n],a=Tn(Tn({},Di(Ls(e),{min:r,max:r})),{},{bounds:i});return{value:Ds(Ls(e),a,e),settings:a}}});const Fs=["value","bounds","onDrag"],Ns=["bounds"],zs=gr("div",{display:"grid",columnGap:"$colGap",gridTemplateColumns:"auto calc($sizes$numberInputMinWidth * 2 + $space$rowGap)"});function Us(e){let{value:t,bounds:[r,i],onDrag:a}=e,o=dn(e,Fs);const s=(0,n.useRef)(null),l=(0,n.useRef)(null),c=(0,n.useRef)(null),u=(0,n.useRef)(0),d=wr("sizes","scrubberWidth"),h=ti((({event:e,first:n,xy:[h],movement:[f],memo:p={}})=>{if(n){const{width:n,left:a}=s.current.getBoundingClientRect();u.current=n-parseFloat(d);const o=(null==e?void 0:e.target)===l.current||(null==e?void 0:e.target)===c.current;p.pos=Ln((h-a)/n,r,i);const f=Math.abs(p.pos-t.min)-Math.abs(p.pos-t.max);p.key=f<0||0===f&&p.pos<=t.min?"min":"max",o&&(p.pos=t[p.key])}const m=p.pos+Ln(f/u.current,0,i-r);return a({[p.key]:fi(m,o[p.key])}),p})),f=`calc(${In(t.min,r,i)} * (100% - ${d} - 8px) + 4px)`,p=`calc(${1-In(t.max,r,i)} * (100% - ${d} - 8px) + 4px)`;return n.createElement(li,sr({ref:s},h()),n.createElement(oi,null,n.createElement(ci,{style:{left:f,right:p}})),n.createElement(si,{position:"left",ref:l,style:{left:f}}),n.createElement(si,{position:"right",ref:c,style:{right:p}}))}var Hs=Tn({component:function(){const{label:e,displayValue:t,onUpdate:r,settings:i}=cr(),a=dn(i,Ns);return n.createElement(n.Fragment,null,n.createElement(Zr,{input:!0},n.createElement(Kr,null,e),n.createElement(zs,null,n.createElement(Us,sr({value:t},i,{onDrag:r})),n.createElement(Li,{value:t,settings:a,onUpdate:r,innerLabelTrim:0}))))}},Os);const Gs=["type","value"],Vs=["onChange","transient","onEditStart","onEditEnd"];new function(){const e=(0,c.Z)((()=>({data:{}}),(e,t,n)=>{const r=n.subscribe;return n.subscribe=(e,t,i)=>{let a=e;if(t){const r=(null==i?void 0:i.equalityFn)||Object.is;let o=e(n.getState());a=n=>{const i=e(n);if(!r(o,i)){const e=o;t(o=i,e)}},(null==i?void 0:i.fireImmediately)&&t(o,o)}return r(a)},{data:{}}}));const t=(()=>{const e=new Map;return{on:(t,n)=>{let r=e.get(t);void 0===r&&(r=new Set,e.set(t,r)),r.add(n)},off:(t,n)=>{const r=e.get(t);void 0!==r&&(r.delete(n),0===r.size&&e.delete(t))},emit:(t,...n)=>{const r=e.get(t);if(void 0!==r)for(const e of r)e(...n)}}})();this.storeId="_"+Math.random().toString(36).substr(2,9),this.useStore=e;const n={},r=new Set;this.getVisiblePaths=()=>{const e=this.getData(),t=Object.keys(e),i=[];Object.entries(n).forEach((([e,n])=>{n.render&&t.some((t=>0===t.indexOf(e)))&&!n.render(this.get)&&i.push(e+".")}));const a=[];return r.forEach((t=>{t in e&&e[t].__refCount>0&&i.every((e=>-1===t.indexOf(e)))&&(!e[t].render||e[t].render(this.get))&&a.push(t)})),a},this.setOrderedPaths=e=>{e.forEach((e=>r.add(e)))},this.orderPaths=e=>(this.setOrderedPaths(e),e),this.disposePaths=t=>{e.setState((e=>{const n=e.data;return t.forEach((e=>{if(e in n){const t=n[e];t.__refCount--,0===t.__refCount&&t.type in Vn&&delete n[e]}})),{data:n}}))},this.dispose=()=>{e.setState((()=>({data:{}})))},this.getFolderSettings=e=>n[e]||{},this.getData=()=>e.getState().data,this.addData=(t,n)=>{e.setState((e=>{const r=e.data;return Object.entries(t).forEach((([e,t])=>{let i=r[e];if(i){const{type:e,value:r}=t,a=dn(t,Gs);e!==i.type?mn(hn.INPUT_TYPE_OVERRIDE,e):((0===i.__refCount||n)&&Object.assign(i,a),i.__refCount++)}else r[e]=Tn(Tn({},t),{},{__refCount:1})})),{data:r}}))},this.setValueAtPath=(t,n,r)=>{e.setState((e=>{const i=e.data;return Yn(i[t],n,t,this,r),{data:i}}))},this.setSettingsAtPath=(t,n)=>{e.setState((e=>{const r=e.data;return r[t].settings=Tn(Tn({},r[t].settings),n),{data:r}}))},this.disableInputAtPath=(t,n)=>{e.setState((e=>{const r=e.data;return r[t].disabled=n,{data:r}}))},this.set=(t,n)=>{e.setState((e=>{const r=e.data;return Object.entries(t).forEach((([e,t])=>{try{Yn(r[e],t,void 0,void 0,n)}catch(e){}})),{data:r}}))},this.getInput=e=>{try{return this.getData()[e]}catch(t){mn(hn.PATH_DOESNT_EXIST,e)}},this.get=e=>{var t;return null===(t=this.getInput(e))||void 0===t?void 0:t.value},this.emitOnEditStart=e=>{t.emit(`onEditStart:${e}`,this.get(e),e,Tn(Tn({},this.getInput(e)),{},{get:this.get}))},this.emitOnEditEnd=e=>{t.emit(`onEditEnd:${e}`,this.get(e),e,Tn(Tn({},this.getInput(e)),{},{get:this.get}))},this.subscribeToEditStart=(e,n)=>{const r=`onEditStart:${e}`;return t.on(r,n),()=>t.off(r,n)},this.subscribeToEditEnd=(e,n)=>{const r=`onEditEnd:${e}`;return t.on(r,n),()=>t.off(r,n)};const i=(e,t,r)=>{const a={};return Object.entries(e).forEach((([e,o])=>{if(""===e)return mn(hn.EMPTY_KEY);let s=is(t,e);if(o.type===Vn.FOLDER){const e=i(o.schema,s,r);Object.assign(a,e),s in n||(n[s]=o.settings)}else if(e in r)mn(hn.DUPLICATE_KEYS,e,s,r[e].path);else{const t=function(e,t,n,r){const i=$n(e,t),{type:a,input:o,options:s}=i;if(a)return a in Vn?i:{type:a,input:Sn(a,o,n,r),options:s};let l=wn(o);return l?{type:l,input:Sn(l,o,n,r),options:s}:(l=wn({value:o}),!!l&&{type:l,input:Sn(l,{value:o},n,r),options:s})}(o,e,s,a);if(t){const{type:n,options:i,input:o}=t,{onChange:l,transient:c,onEditStart:u,onEditEnd:d}=i,h=dn(i,Vs);a[s]=Tn(Tn(Tn({type:n},h),o),{},{fromPanel:!0}),r[e]={path:s,onChange:l,transient:c,onEditStart:u,onEditEnd:d}}else mn(hn.UNKNOWN_INPUT,s,o)}})),a};this.getDataFromSchema=e=>{const t={};return[i(e,"",t),t]}};const js=e=>"__levaInput"in e,Ws=["type","label","path","valueKey","value","settings","setValue","disabled"];function Js(e){let{type:t,label:r,path:i,valueKey:a,value:o,settings:s,setValue:l,disabled:c}=e,u=dn(e,Ws);const{displayValue:d,onChange:h,onUpdate:f}=ei({type:t,value:o,settings:s,setValue:l}),p=xn[t].component;return p?n.createElement(lr.Provider,{value:Tn({key:a,path:i,id:""+i,label:r,displayValue:d,value:o,onChange:h,onUpdate:f,settings:s,setValue:l,disabled:c},u)},n.createElement(Ur,{disabled:c},n.createElement(p,null))):(mn(hn.NO_COMPONENT_FOR_TYPE,t,i),null)}const Xs=gr("button",{display:"block",$reset:"",fontWeight:"$button",height:"$rowHeight",borderStyle:"none",borderRadius:"$sm",backgroundColor:"$elevation1",color:"$highlight1","&:not(:disabled)":{color:"$highlight3",backgroundColor:"$accent2",cursor:"pointer",$hover:"$accent3",$active:"$accent3 $accent1",$focus:""}}),Ks=gr("div",{$flex:"",justifyContent:"flex-end",gap:"$colGap"}),$s=gr("button",{$reset:"",cursor:"pointer",borderRadius:"$xs","&:hover":{backgroundColor:"$elevation3"}}),Ys=gr("canvas",{height:"$monitorHeight",width:"100%",display:"block",borderRadius:"$sm"}),qs=(0,n.forwardRef)((function({initialValue:e},t){const r=wr("colors","highlight3"),i=wr("colors","elevation2"),a=wr("colors","highlight1"),[o,s]=(0,n.useMemo)((()=>[fa(a).alpha(.4).toRgbString(),fa(a).alpha(.1).toRgbString()]),[a]),l=(0,n.useRef)([e]),c=(0,n.useRef)(e),u=(0,n.useRef)(e),d=(0,n.useRef)(),h=(0,n.useCallback)(((e,t)=>{if(!e)return;const{width:n,height:a}=e,d=new Path2D,h=n/100,f=.05*a;for(let e=0;e<l.current.length;e++){const t=h*e,n=a-In(l.current[e],c.current,u.current)*(a-2*f)-f;d.lineTo(t,n)}t.clearRect(0,0,n,a);const p=new Path2D(d);p.lineTo(h*(l.current.length+1),a),p.lineTo(0,a),p.lineTo(0,0);const m=t.createLinearGradient(0,0,0,a);m.addColorStop(0,o),m.addColorStop(1,s),t.fillStyle=m,t.fill(p),t.strokeStyle=i,t.lineJoin="round",t.lineWidth=14,t.stroke(d),t.strokeStyle=r,t.lineWidth=2,t.stroke(d)}),[r,i,o,s]),[f,p]=function(e){const t=(0,n.useRef)(null),r=(0,n.useRef)(null),i=(0,n.useRef)(!1);return(0,n.useEffect)((()=>{const n=Zn((()=>{t.current.width=t.current.offsetWidth*window.devicePixelRatio,t.current.height=t.current.offsetHeight*window.devicePixelRatio,e(t.current,r.current)}),250);return window.addEventListener("resize",n),i.current||(n(),i.current=!0),()=>window.removeEventListener("resize",n)}),[e]),(0,n.useEffect)((()=>{r.current=t.current.getContext("2d")}),[]),[t,r]}(h);return(0,n.useImperativeHandle)(t,(()=>({frame:e=>{(void 0===c.current||e<c.current)&&(c.current=e),(void 0===u.current||e>u.current)&&(u.current=e),function(e,t){e.push(t),e.length>100&&e.shift()}(l.current,e),d.current=requestAnimationFrame((()=>h(f.current,p.current)))}})),[f,p,h]),(0,n.useEffect)((()=>()=>cancelAnimationFrame(d.current)),[]),n.createElement(Ys,{ref:f})})),Qs=e=>Number.isFinite(e)?e.toPrecision(2):e.toString(),Zs=(0,n.forwardRef)((function({initialValue:e},t){const[r,i]=(0,n.useState)(Qs(e));return(0,n.useImperativeHandle)(t,(()=>({frame:e=>i(Qs(e))})),[]),n.createElement("div",null,r)}));function el(e){return"function"==typeof e?e():e.current}const tl=["type","label","key"],nl={[Vn.BUTTON]:function({onClick:e,settings:t,label:r}){const i=fr();return n.createElement(Zr,null,n.createElement(Xs,{disabled:t.disabled,onClick:()=>e(i.get)},r))},[Vn.BUTTON_GROUP]:function(e){const{label:t,opts:r}=(({label:e,opts:t})=>{let n="string"==typeof e&&""===e.trim()?null:e,r=t;return"object"==typeof t.opts&&(void 0!==r.label&&(n=t.label),r=t.opts),{label:n,opts:r}})(e),i=fr();return n.createElement(Zr,{input:!!t},t&&n.createElement(Kr,null,t),n.createElement(Ks,null,Object.entries(r).map((([e,t])=>n.createElement($s,{key:e,onClick:()=>t(i.get)},e)))))},[Vn.MONITOR]:function({label:e,objectOrFn:t,settings:r}){const i=(0,n.useRef)(),a=(0,n.useRef)(el(t));return(0,n.useEffect)((()=>{const e=window.setInterval((()=>{var e;document.hidden||null===(e=i.current)||void 0===e||e.frame(el(t))}),r.interval);return()=>window.clearInterval(e)}),[t,r.interval]),n.createElement(Zr,{input:!0},n.createElement(Kr,{align:"top"},e),r.graph?n.createElement(qs,{ref:i,initialValue:a.current}):n.createElement(Zs,{ref:i,initialValue:a.current}))}},rl=n.memo((({path:e})=>{const[t,{set:r,setSettings:i,disable:a,storeId:o,emitOnEditStart:s,emitOnEditEnd:l}]=function(e){const t=fr(),[r,i]=(0,n.useState)(ii(t.getData(),e)),a=(0,n.useCallback)((n=>t.setValueAtPath(e,n,!0)),[e,t]),o=(0,n.useCallback)((n=>t.setSettingsAtPath(e,n)),[e,t]),s=(0,n.useCallback)((n=>t.disableInputAtPath(e,n)),[e,t]),l=(0,n.useCallback)((()=>t.emitOnEditStart(e)),[e,t]),c=(0,n.useCallback)((()=>t.emitOnEditEnd(e)),[e,t]);return(0,n.useEffect)((()=>{i(ii(t.getData(),e));const n=t.useStore.subscribe((t=>ii(t.data,e)),i,{equalityFn:I});return()=>n()}),[t,e]),[r,{set:a,setSettings:o,disable:s,storeId:t.storeId,emitOnEditStart:l,emitOnEditEnd:c}]}(e);if(!t)return null;const{type:c,label:u,key:d}=t,h=dn(t,tl);if(c in Vn){const t=nl[c];return n.createElement(t,sr({label:u,path:e},h))}return c in xn?n.createElement(Js,sr({key:o+e,type:c,label:u,storeId:o,path:e,valueKey:d,setValue:r,setSettings:i,disable:a,emitOnEditStart:s,emitOnEditEnd:l},h)):(gn(hn.UNSUPPORTED_INPUT,c,e),null)}));function il({toggle:e,toggled:t,name:r}){return n.createElement(Ir,{onClick:()=>e()},n.createElement(qr,{toggled:t}),n.createElement("div",null,r))}const al=({name:e,path:t,tree:r})=>{const i=fr(),a=is(t,e),{collapsed:o,color:s}=i.getFolderSettings(a),[l,c]=(0,n.useState)(!o),u=(0,n.useRef)(null),d=wr("colors","folderWidgetColor"),h=wr("colors","folderTextColor");return(0,n.useLayoutEffect)((()=>{u.current.style.setProperty("--leva-colors-folderWidgetColor",s||d),u.current.style.setProperty("--leva-colors-folderTextColor",s||h)}),[s,d,h]),n.createElement(Pr,{ref:u},n.createElement(il,{name:e,toggled:l,toggle:()=>c((e=>!e))}),n.createElement(ol,{parent:a,tree:r,toggled:l}))},ol=n.memo((({isRoot:e=!1,fill:t=!1,flat:r=!1,parent:i,tree:a,toggled:o})=>{const{wrapperRef:s,contentRef:l}=function(e){const t=(0,n.useRef)(null),r=(0,n.useRef)(null),i=(0,n.useRef)(!0);return(0,n.useLayoutEffect)((()=>{e||(t.current.style.height="0px",t.current.style.overflow="hidden")}),[]),(0,n.useEffect)((()=>{if(i.current)return void(i.current=!1);let n;const a=t.current,o=()=>{e&&(a.style.removeProperty("height"),a.style.removeProperty("overflow"),r.current.scrollIntoView({behavior:"smooth",block:"nearest"}))};a.addEventListener("transitionend",o,{once:!0});const{height:s}=r.current.getBoundingClientRect();return a.style.height=s+"px",e||(a.style.overflow="hidden",n=window.setTimeout((()=>a.style.height="0px"),50)),()=>{a.removeEventListener("transitionend",o),clearTimeout(n)}}),[e]),{wrapperRef:t,contentRef:r}}(o),c=fr(),u=([e,t])=>{var n;return(js(t)?null===(n=c.getInput(t.path))||void 0===n?void 0:n.order:c.getFolderSettings(is(i,e)).order)||0},d=Object.entries(a).sort(((e,t)=>u(e)-u(t)));return n.createElement(kr,{ref:s,isRoot:e,fill:t,flat:r},n.createElement(Lr,{ref:l,isRoot:e,toggled:o},d.map((([e,t])=>js(t)?n.createElement(rl,{key:t.path,valueKey:t.valueKey,path:t.path}):n.createElement(al,{key:e,name:e,path:i,tree:t})))))})),sl=gr("div",{position:"relative",fontFamily:"$mono",fontSize:"$root",color:"$rootText",backgroundColor:"$elevation1",variants:{fill:{false:{position:"fixed",top:"10px",right:"10px",zIndex:1e3,width:"$rootWidth"},true:{position:"relative",width:"100%"}},flat:{false:{borderRadius:"$lg",boxShadow:"$level1"}},oneLineLabels:{true:{[`${Or}`]:{gridTemplateColumns:"auto",gridAutoColumns:"minmax(max-content, 1fr)",gridAutoRows:"minmax($sizes$rowHeight), auto)",rowGap:0,columnGap:0,marginTop:"$rowGap"}}},hideTitleBar:{true:{$$titleBarHeight:"0px"},false:{$$titleBarHeight:"$sizes$titleBarHeight"}}},"&,*,*:after,*:before":{boxSizing:"border-box"},"*::selection":{backgroundColor:"$accent2"}}),ll=gr("i",{$flexCenter:"",width:40,userSelect:"none",cursor:"pointer","> svg":{fill:"$highlight1",transition:"transform 350ms ease, fill 250ms ease"},"&:hover > svg":{fill:"$highlight3"},variants:{active:{true:{"> svg":{fill:"$highlight2"}}}}}),cl=gr("div",{display:"flex",alignItems:"stretch",justifyContent:"space-between",height:"$titleBarHeight",variants:{mode:{drag:{cursor:"grab"}}}}),ul=gr("div",{$flex:"",position:"relative",width:"100%",overflow:"hidden",transition:"height 250ms ease",color:"$highlight3",paddingLeft:"$md",[`> ${ll}`]:{height:30},variants:{toggled:{true:{height:30},false:{height:0}}}}),dl=gr("input",{$reset:"",flex:1,position:"relative",height:30,width:"100%",backgroundColor:"transparent",fontSize:"10px",borderRadius:"$root","&:focus":{},"&::placeholder":{color:"$highlight2"}}),hl=gr("div",{touchAction:"none",$flexCenter:"",flex:1,"> svg":{fill:"$highlight1"},color:"$highlight1",variants:{drag:{true:{$draggable:"","> svg":{transition:"fill 250ms ease"},"&:hover":{color:"$highlight3"},"&:hover > svg":{fill:"$highlight3"}}},filterEnabled:{false:{paddingRight:40}}}}),fl=n.forwardRef((({setFilter:e,toggle:t},r)=>{const[i,a]=(0,n.useState)(""),o=(0,n.useMemo)((()=>Zn(e,250)),[e]);return(0,n.useEffect)((()=>{o(i)}),[i,o]),n.createElement(n.Fragment,null,n.createElement(dl,{ref:r,value:i,placeholder:"[Open filter with CMD+SHIFT+L]",onPointerDown:e=>e.stopPropagation(),onChange:e=>{const n=e.currentTarget.value;t(!0),a(n)}}),n.createElement(ll,{onClick:()=>(e(""),void a("")),style:{visibility:i?"visible":"hidden"}},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"14",width:"14",viewBox:"0 0 20 20",fill:"currentColor"},n.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z",clipRule:"evenodd"}))))}));function pl({setFilter:e,onDrag:t,onDragStart:r,onDragEnd:i,toggle:a,toggled:o,title:s,drag:l,filterEnabled:c,from:u}){const[d,h]=(0,n.useState)(!1),f=(0,n.useRef)(null);(0,n.useEffect)((()=>{var e,t;d?null===(e=f.current)||void 0===e||e.focus():null===(t=f.current)||void 0===t||t.blur()}),[d]);const p=ti((({offset:[e,n],first:a,last:o})=>{t({x:e,y:n}),a&&r({x:e,y:n}),o&&i({x:e,y:n})}),{filterTaps:!0,from:({offset:[e,t]})=>[(null==u?void 0:u.x)||e,(null==u?void 0:u.y)||t]});return(0,n.useEffect)((()=>{const e=e=>{"L"===e.key&&e.shiftKey&&e.metaKey&&h((e=>!e))};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)}),[]),n.createElement(n.Fragment,null,n.createElement(cl,{mode:l?"drag":void 0},n.createElement(ll,{active:!o,onClick:()=>a()},n.createElement(qr,{toggled:o,width:12,height:8})),n.createElement(hl,sr({},l?p():{},{drag:l,filterEnabled:c}),void 0===s&&l?n.createElement("svg",{width:"20",height:"10",viewBox:"0 0 28 14",xmlns:"http://www.w3.org/2000/svg"},n.createElement("circle",{cx:"2",cy:"2",r:"2"}),n.createElement("circle",{cx:"14",cy:"2",r:"2"}),n.createElement("circle",{cx:"26",cy:"2",r:"2"}),n.createElement("circle",{cx:"2",cy:"12",r:"2"}),n.createElement("circle",{cx:"14",cy:"12",r:"2"}),n.createElement("circle",{cx:"26",cy:"12",r:"2"})):s),c&&n.createElement(ll,{active:d,onClick:()=>h((e=>!e))},n.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",height:"20",viewBox:"0 0 20 20"},n.createElement("path",{d:"M9 9a2 2 0 114 0 2 2 0 01-4 0z"}),n.createElement("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm1-13a4 4 0 00-3.446 6.032l-2.261 2.26a1 1 0 101.414 1.415l2.261-2.261A4 4 0 1011 5z",clipRule:"evenodd"})))),n.createElement(ul,{toggled:d},n.createElement(fl,{ref:f,setFilter:e,toggle:a})))}n.memo((({store:e,rootClass:t,fill:r=!1,flat:i=!1,neverHide:a=!1,oneLineLabels:o=!1,titleBar:s={title:void 0,drag:!0,filter:!0,position:void 0,onDrag:void 0,onDragStart:void 0,onDragEnd:void 0},hideCopyButton:l=!1,toggled:c,setToggle:u})=>{var d,h;const f=(e=>{const[t,r]=(0,n.useState)(e.getVisiblePaths());return(0,n.useEffect)((()=>{r(e.getVisiblePaths());const t=e.useStore.subscribe(e.getVisiblePaths,r,{equalityFn:I});return()=>t()}),[e]),t})(e),[p,m]=(0,n.useState)(""),g=(0,n.useMemo)((()=>((e,t)=>{const n={},r=t?t.toLowerCase():null;return e.forEach((e=>{const[t,i]=function(e){const t=e.split(".");return[t.pop(),t.join(".")||void 0]}(e);(!r||t.toLowerCase().indexOf(r)>-1)&&rs()(n,i,{[t]:{__levaInput:!0,path:e}})})),n})(f,p)),[f,p]),[v,y]=ni(),b=a||f.length>0,_="object"==typeof s&&s.title||void 0,x="object"!=typeof s||null===(d=s.drag)||void 0===d||d,w="object"!=typeof s||null===(h=s.filter)||void 0===h||h,M="object"==typeof s&&s.position||void 0,S="object"==typeof s&&s.onDrag||void 0,A="object"==typeof s&&s.onDragStart||void 0,E="object"==typeof s&&s.onDragEnd||void 0;return n.useEffect((()=>{y({x:null==M?void 0:M.x,y:null==M?void 0:M.y})}),[M,y]),xr(),n.createElement(hr.Provider,{value:{hideCopyButton:l}},n.createElement(sl,{ref:v,className:t,fill:r,flat:i,oneLineLabels:o,hideTitleBar:!s,style:{display:b?"block":"none"}},s&&n.createElement(pl,{onDrag:e=>{y(e),null==S||S(e)},onDragStart:e=>null==A?void 0:A(e),onDragEnd:e=>null==E?void 0:E(e),setFilter:m,toggle:e=>u((t=>null!=e?e:!t)),toggled:c,title:_,drag:x,filterEnabled:w,from:M}),b&&n.createElement(dr.Provider,{value:e},n.createElement(ol,{isRoot:!0,fill:r,flat:i,tree:g,toggled:c}))))})),Mn(jn.SELECT,_i),Mn(jn.IMAGE,ks),Mn(jn.NUMBER,pi),Mn(jn.COLOR,gs),Mn(jn.STRING,Ai),Mn(jn.BOOLEAN,Ri),Mn(jn.INTERVAL,Hs),Mn(jn.VECTOR3D,vs),Mn(jn.VECTOR2D,Ss);var ml=i(2642),gl=i(7082);ml.p8.registerPlugin(gl.i);var vl=function(){var r=(0,n.useState)(matchMedia("(min-width: 1025px)").matches?1:.3),i=(0,t.Z)(r,2),a=i[0],l=(i[1],(0,n.useState)(!0)),c=(0,t.Z)(l,2),u=c[0],h=(c[1],(0,n.useState)("always")),_=(0,t.Z)(h,2),x=(_[0],_[1],(0,n.useRef)(null)),w=(0,n.useRef)(null),M=(0,n.useRef)(null),S=(0,n.useRef)(null),A=(0,n.useRef)(null),E=(0,n.useRef)(null),C=(0,n.useRef)(null),T=(0,n.useRef)(null),R=(0,n.useRef)(null),B=(0,n.useRef)(null),P=(0,n.useRef)(null);function k(t){var r=t.teamo,i=t.bodyTexture,a=t.bodyMaterial,o=t.bodyWireframe,l=t.eggTexture,c=t.eggMaterial,u=t.eggWireframe,h=t.phoneTexture,f=t.phoneMaterial,m=t.phoneWireframe,g=d().progress,v=(0,p.L)(frameConsts.modelUrl),y=v.nodes,b=v.materials;return(0,n.useEffect)((function(){(0,s.l)(),document.body.classList.add("hide-splash"),gl.i.refresh()}),[g]),n.createElement("group",(0,e.Z)({ref:r},t,{dispose:null}),n.createElement("mesh",{receiveShadow:matchMedia("(min-width: 1025px)").matches,geometry:y.Object001.geometry,material:b["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01},n.createElement("meshBasicMaterial",(0,e.Z)({ref:i},b["Material #63.001"],{transparent:!0,opacity:0}))),n.createElement("mesh",{receiveShadow:matchMedia("(min-width: 1025px)").matches,geometry:y.Object001.geometry,material:b["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01},n.createElement("meshLambertMaterial",{ref:a,color:"#e1e1e1",transparent:!0,opacity:0})),n.createElement("mesh",{receiveShadow:matchMedia("(min-width: 1025px)").matches,castShadow:!1,geometry:y.Object001.geometry,material:b["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01},n.createElement("meshLambertMaterial",{ref:o,transparent:!0,opacity:0,wireframe:!0,color:"#e1e1e1"})),n.createElement("mesh",{receiveShadow:!1,castShadow:!1,geometry:y.Object002.geometry,material:b["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01},n.createElement("meshBasicMaterial",(0,e.Z)({ref:l},b["Material #63.001"],{transparent:!0,opacity:0}))),n.createElement("mesh",{receiveShadow:!1,castShadow:!1,geometry:y.Object002.geometry,material:b["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01},n.createElement("meshLambertMaterial",{ref:c,color:"#e1e1e1",transparent:!0,opacity:0})),n.createElement("mesh",{receiveShadow:!1,castShadow:!1,geometry:y.Object002.geometry,material:b["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01},n.createElement("meshLambertMaterial",{ref:u,transparent:!0,opacity:0,wireframe:!0,color:"#e1e1e1"})),n.createElement("mesh",{receiveShadow:matchMedia("(min-width: 1025px)").matches,geometry:y.Object003.geometry,material:b["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01},n.createElement("meshBasicMaterial",(0,e.Z)({ref:h},b["Material #63.001"],{transparent:!0,opacity:0}))),n.createElement("mesh",{receiveShadow:matchMedia("(min-width: 1025px)").matches,geometry:y.Object003.geometry,material:b["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01},n.createElement("meshLambertMaterial",{ref:f,color:"#e1e1e1",transparent:!0,opacity:0})),n.createElement("mesh",{receiveShadow:matchMedia("(min-width: 1025px)").matches,geometry:y.Object003.geometry,material:b["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01},n.createElement("meshLambertMaterial",{ref:m,transparent:!0,opacity:0,wireframe:!0,color:"#e1e1e1"})))}(0,n.useRef)(null),(0,n.useRef)(null);var I=function(){var e=(0,s.z)().invalidate;return(0,n.useEffect)((function(){var t=ml.p8.matchMedia();return t.add("(min-width: 1025px)",(function(){ml.p8.timeline({scrollTrigger:{trigger:".wireframe",start:"top bottom",end:"center center",scrub:1,snap:{snapTo:1,delay:.05}},onUpdate:function(){return e()}}).set(S.current,{opacity:0}).to(x.current.position,{x:-.2},0).to(w.current.rotation,{y:Math.PI/-4},0).fromTo(M.current,{opacity:1},{opacity:0},0).fromTo(A.current,{opacity:0},{opacity:1},0).fromTo(E.current,{opacity:1},{opacity:0},0).fromTo(T.current,{opacity:0},{opacity:1},0).fromTo(R.current,{opacity:1},{opacity:0},0).fromTo(P.current,{opacity:0},{opacity:1},0).fromTo(".teamo-model",{filter:"blur(10px)",opacity:.3},{filter:"blur(0px)",opacity:1},0),ml.p8.timeline({scrollTrigger:{trigger:".phone",start:"top bottom",end:"center center",scrub:1,snap:{snapTo:[0,1],delay:.05}},onUpdate:function(){return e()}}).to(x.current.position,{x:.4},0).to(w.current.rotation,{y:2*Math.PI},0).to(".teamo-model",{opacity:0},0),ml.p8.timeline({scrollTrigger:{trigger:".model",start:"top bottom",endTrigger:".model",end:"center center",scrub:1,snap:{snapTo:1,delay:.05}},onUpdate:function(){return e()}}).to(x.current.position,{x:.2},0).to(S.current,{opacity:1},0).to(A.current,{opacity:0},0).to(C.current,{opacity:1},0).to(T.current,{opacity:0},0).to(B.current,{opacity:1},0).to(P.current,{opacity:0},0).to(w.current.rotation,{y:Math.PI/4},0).to(".teamo-model",{opacity:1},0),ml.p8.timeline({scrollTrigger:{trigger:".welcome",start:"top bottom",end:"center center",scrub:1,snap:{snapTo:1,delay:.05}},onUpdate:function(){return e()}}).to(x.current.position,{x:0},0).to(w.current.rotation,{y:0},0).to(".teamo-model",{opacity:0},">")})),t.add("(max-width: 1024px)",(function(){ml.p8.timeline({scrollTrigger:{trigger:".wireframe",start:"top bottom",end:"center center",scrub:1},onUpdate:function(){return e()}}).set(S.current,{opacity:0}).fromTo(M.current,{opacity:1},{opacity:0},0).fromTo(A.current,{opacity:0},{opacity:1},0).fromTo(E.current,{opacity:1},{opacity:0},0).fromTo(T.current,{opacity:0},{opacity:1},0).fromTo(R.current,{opacity:1},{opacity:0},0).fromTo(P.current,{opacity:0},{opacity:1},0).fromTo(".teamo-model",{filter:"blur(10px)",opacity:.3},{filter:"blur(0px)",opacity:.3},0),ml.p8.timeline({scrollTrigger:{trigger:".wireframe",start:"center center",endTrigger:".phone",end:"center center",scrub:1}}).to(".teamo-model",{opacity:0},0),ml.p8.timeline({scrollTrigger:{trigger:".model",start:"top bottom",endTrigger:".model",end:"center center",scrub:1},onUpdate:function(){return e()}}).to(S.current,{opacity:1},0).to(A.current,{opacity:0},0).to(C.current,{opacity:1},0).to(T.current,{opacity:0},0).to(B.current,{opacity:1},0).to(P.current,{opacity:0},0).to(".teamo-model",{opacity:.3},0),ml.p8.timeline({scrollTrigger:{trigger:".welcome",start:"top bottom",end:"center center",scrub:1}}).to(".teamo-model",{opacity:0})})),function(){e()}}),[x,w]),n.createElement(m.H,{shadows:!1,environment:"sunset",intensity:.5,adjustCamera:1.2},n.createElement(k,{teamo:w,bodyMaterial:S,bodyTexture:M,bodyWireframe:A,eggMaterial:C,eggTexture:E,eggWireframe:T,phoneMaterial:B,phoneTexture:R,phoneWireframe:P}),n.createElement(f,{position:[0,3,8],makeDefault:!0,ref:x}),n.createElement(g.P,null))};return n.createElement(n.Fragment,null,n.createElement(o.Xz,{dpr:a,frameloop:"demand",style:{position:"absolute",pointerEvents:"none"}},n.createElement(n.Suspense,{fallback:null},u&&n.createElement(I,null)),n.createElement(v.S,{pixelated:!0}),n.createElement(y.E,null),n.createElement(b.q,null)))};window.loadTeamo=function(){var e=document.querySelector(".teamo-model");e&&(0,a.s)(e).render(n.createElement(n.Fragment,null,n.createElement(vl,null)))}})(),(()=>{"use strict";var e=i(2642),t=i(7082);function n(){document.querySelector(".video")&&(e.p8.timeline({scrollTrigger:{trigger:".video crowd-video",scrub:1,start:"center bottom",end:"center center"}}).fromTo(".video h2",{y:"0%",opacity:1},{y:"-100%",opacity:0},0),e.p8.timeline({scrollTrigger:{trigger:".video crowd-video",scrub:1,start:"top 75%",end:"center center",snap:{snapTo:1,delay:.05}}}).fromTo(".video crowd-video",{scale:.7,opacity:.7},{scale:1,opacity:1},0),e.p8.timeline({scrollTrigger:{trigger:".video crowd-video",scrub:1,start:"center center",end:"bottom top"}}).fromTo(".video crowd-video",{scale:1,opacity:1},{scale:.7,opacity:.7},0))}e.p8.registerPlugin(t.i),"complete"===document.readyState||"interactive"===document.readyState?n():document.addEventListener("DOMContentLoaded",n,!1)})(),(()=>{"use strict";var e=i(7462),t=i(3324),n=i(7294),r=i(745),a=i(8628),o=i(8715),s=i(9477);let l=S();const c=e=>_(e,l);let u=S();c.write=e=>_(e,u);let d=S();c.onStart=e=>_(e,d);let h=S();c.onFrame=e=>_(e,h);let f=S();c.onFinish=e=>_(e,f);let p=[];c.setTimeout=(e,t)=>{let n=c.now()+t,r=()=>{let e=p.findIndex((e=>e.cancel==r));~e&&p.splice(e,1),y-=~e?1:0},i={time:n,handler:e,cancel:r};return p.splice(m(n),0,i),y+=1,x(),i};let m=e=>~(~p.findIndex((t=>t.time>e))||~p.length);c.cancel=e=>{d.delete(e),h.delete(e),f.delete(e),l.delete(e),u.delete(e)},c.sync=e=>{b=!0,c.batchedUpdates(e),b=!1},c.throttle=e=>{let t;function n(){try{e(...t)}finally{t=null}}function r(...e){t=e,c.onStart(n)}return r.handler=e,r.cancel=()=>{d.delete(n),t=null},r};let g="undefined"!=typeof window?window.requestAnimationFrame:()=>{};c.use=e=>g=e,c.now="undefined"!=typeof performance?()=>performance.now():Date.now,c.batchedUpdates=e=>e(),c.catch=console.error,c.frameLoop="always",c.advance=()=>{"demand"!==c.frameLoop?console.warn("Cannot call the manual advancement of rafz whilst frameLoop is not set as demand"):M()};let v=-1,y=0,b=!1;function _(e,t){b?(t.delete(e),e(0)):(t.add(e),x())}function x(){v<0&&(v=0,"demand"!==c.frameLoop&&g(w))}function w(){~v&&(g(w),c.batchedUpdates(M))}function M(){let e=v;v=c.now();let t=m(v);t&&(A(p.splice(0,t),(e=>e.handler())),y-=t),y?(d.flush(),l.flush(e?Math.min(64,v-e):16.667),h.flush(),u.flush(),f.flush()):v=-1}function S(){let e=new Set,t=e;return{add(n){y+=t!=e||e.has(n)?0:1,e.add(n)},delete:n=>(y-=t==e&&e.has(n)?1:0,e.delete(n)),flush(n){t.size&&(e=new Set,y-=t.size,A(t,(t=>t(n)&&e.add(t))),y+=e.size,t=e)}}}function A(e,t){e.forEach((e=>{try{t(e)}catch(e){c.catch(e)}}))}function E(){}const C={arr:Array.isArray,obj:e=>!!e&&"Object"===e.constructor.name,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,und:e=>void 0===e};function T(e,t){if(C.arr(e)){if(!C.arr(t)||e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}return e===t}const R=(e,t)=>e.forEach(t);function B(e,t,n){if(C.arr(e))for(let r=0;r<e.length;r++)t.call(n,e[r],`${r}`);else for(const r in e)e.hasOwnProperty(r)&&t.call(n,e[r],r)}const P=e=>C.und(e)?[]:C.arr(e)?e:[e];function k(e,t){if(e.size){const n=Array.from(e);e.clear(),R(n,t)}}const I=(e,...t)=>k(e,(e=>e(...t))),L=()=>"undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent);let D,O,F=null,N=!1,z=E;var U=Object.freeze({__proto__:null,get createStringInterpolator(){return D},get to(){return O},get colors(){return F},get skipAnimation(){return N},get willAdvance(){return z},assign:e=>{e.to&&(O=e.to),e.now&&(c.now=e.now),void 0!==e.colors&&(F=e.colors),null!=e.skipAnimation&&(N=e.skipAnimation),e.createStringInterpolator&&(D=e.createStringInterpolator),e.requestAnimationFrame&&c.use(e.requestAnimationFrame),e.batchedUpdates&&(c.batchedUpdates=e.batchedUpdates),e.willAdvance&&(z=e.willAdvance),e.frameLoop&&(c.frameLoop=e.frameLoop)}});const H=new Set;let G=[],V=[],j=0;const W={get idle(){return!H.size&&!G.length},start(e){j>e.priority?(H.add(e),c.onStart(J)):(X(e),c($))},advance:$,sort(e){if(j)c.onFrame((()=>W.sort(e)));else{const t=G.indexOf(e);~t&&(G.splice(t,1),K(e))}},clear(){G=[],H.clear()}};function J(){H.forEach(X),H.clear(),c($)}function X(e){G.includes(e)||K(e)}function K(e){G.splice(function(t,n){const r=t.findIndex((t=>t.priority>e.priority));return r<0?t.length:r}(G),0,e)}function $(e){const t=V;for(let n=0;n<G.length;n++){const r=G[n];j=r.priority,r.idle||(z(r),r.advance(e),r.idle||t.push(r))}return j=0,V=G,V.length=0,G=t,G.length>0}const Y="[-+]?\\d*\\.?\\d+",q=Y+"%";function Q(...e){return"\\(\\s*("+e.join(")\\s*,\\s*(")+")\\s*\\)"}const Z=new RegExp("rgb"+Q(Y,Y,Y)),ee=new RegExp("rgba"+Q(Y,Y,Y,Y)),te=new RegExp("hsl"+Q(Y,q,q)),ne=new RegExp("hsla"+Q(Y,q,q,Y)),re=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ie=/^#([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})([0-9a-fA-F]{1})$/,ae=/^#([0-9a-fA-F]{6})$/,oe=/^#([0-9a-fA-F]{8})$/;function se(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}function le(e,t,n){const r=n<.5?n*(1+t):n+t-n*t,i=2*n-r,a=se(i,r,e+1/3),o=se(i,r,e),s=se(i,r,e-1/3);return Math.round(255*a)<<24|Math.round(255*o)<<16|Math.round(255*s)<<8}function ce(e){const t=parseInt(e,10);return t<0?0:t>255?255:t}function ue(e){return(parseFloat(e)%360+360)%360/360}function de(e){const t=parseFloat(e);return t<0?0:t>1?255:Math.round(255*t)}function he(e){const t=parseFloat(e);return t<0?0:t>100?1:t/100}function fe(e){let t=function(e){let t;return"number"==typeof e?e>>>0===e&&e>=0&&e<=4294967295?e:null:(t=ae.exec(e))?parseInt(t[1]+"ff",16)>>>0:F&&void 0!==F[e]?F[e]:(t=Z.exec(e))?(ce(t[1])<<24|ce(t[2])<<16|ce(t[3])<<8|255)>>>0:(t=ee.exec(e))?(ce(t[1])<<24|ce(t[2])<<16|ce(t[3])<<8|de(t[4]))>>>0:(t=re.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+"ff",16)>>>0:(t=oe.exec(e))?parseInt(t[1],16)>>>0:(t=ie.exec(e))?parseInt(t[1]+t[1]+t[2]+t[2]+t[3]+t[3]+t[4]+t[4],16)>>>0:(t=te.exec(e))?(255|le(ue(t[1]),he(t[2]),he(t[3])))>>>0:(t=ne.exec(e))?(le(ue(t[1]),he(t[2]),he(t[3]))|de(t[4]))>>>0:null}(e);return null===t?e:(t=t||0,`rgba(${(4278190080&t)>>>24}, ${(16711680&t)>>>16}, ${(65280&t)>>>8}, ${(255&t)/255})`)}const pe=(e,t,n)=>{if(C.fun(e))return e;if(C.arr(e))return pe({range:e,output:t,extrapolate:n});if(C.str(e.output[0]))return D(e);const r=e,i=r.output,a=r.range||[0,1],o=r.extrapolateLeft||r.extrapolate||"extend",s=r.extrapolateRight||r.extrapolate||"extend",l=r.easing||(e=>e);return e=>{const t=function(e,t){for(var n=1;n<t.length-1&&!(t[n]>=e);++n);return n-1}(e,a);return function(e,t,n,r,i,a,o,s,l){let c=l?l(e):e;if(c<t){if("identity"===o)return c;"clamp"===o&&(c=t)}if(c>n){if("identity"===s)return c;"clamp"===s&&(c=n)}return r===i?r:t===n?e<=t?r:i:(t===-1/0?c=-c:n===1/0?c-=t:c=(c-t)/(n-t),c=a(c),r===-1/0?c=-c:i===1/0?c+=r:c=c*(i-r)+r,c)}(e,a[t],a[t+1],i[t],i[t+1],l,o,s,r.map)}},me=1.70158,ge=1.525*me,ve=me+1,ye=2*Math.PI/3,be=2*Math.PI/4.5,_e=e=>{const t=7.5625,n=2.75;return e<1/n?t*e*e:e<2/n?t*(e-=1.5/n)*e+.75:e<2.5/n?t*(e-=2.25/n)*e+.9375:t*(e-=2.625/n)*e+.984375},xe={linear:e=>e,easeInQuad:e=>e*e,easeOutQuad:e=>1-(1-e)*(1-e),easeInOutQuad:e=>e<.5?2*e*e:1-Math.pow(-2*e+2,2)/2,easeInCubic:e=>e*e*e,easeOutCubic:e=>1-Math.pow(1-e,3),easeInOutCubic:e=>e<.5?4*e*e*e:1-Math.pow(-2*e+2,3)/2,easeInQuart:e=>e*e*e*e,easeOutQuart:e=>1-Math.pow(1-e,4),easeInOutQuart:e=>e<.5?8*e*e*e*e:1-Math.pow(-2*e+2,4)/2,easeInQuint:e=>e*e*e*e*e,easeOutQuint:e=>1-Math.pow(1-e,5),easeInOutQuint:e=>e<.5?16*e*e*e*e*e:1-Math.pow(-2*e+2,5)/2,easeInSine:e=>1-Math.cos(e*Math.PI/2),easeOutSine:e=>Math.sin(e*Math.PI/2),easeInOutSine:e=>-(Math.cos(Math.PI*e)-1)/2,easeInExpo:e=>0===e?0:Math.pow(2,10*e-10),easeOutExpo:e=>1===e?1:1-Math.pow(2,-10*e),easeInOutExpo:e=>0===e?0:1===e?1:e<.5?Math.pow(2,20*e-10)/2:(2-Math.pow(2,-20*e+10))/2,easeInCirc:e=>1-Math.sqrt(1-Math.pow(e,2)),easeOutCirc:e=>Math.sqrt(1-Math.pow(e-1,2)),easeInOutCirc:e=>e<.5?(1-Math.sqrt(1-Math.pow(2*e,2)))/2:(Math.sqrt(1-Math.pow(-2*e+2,2))+1)/2,easeInBack:e=>ve*e*e*e-me*e*e,easeOutBack:e=>1+ve*Math.pow(e-1,3)+me*Math.pow(e-1,2),easeInOutBack:e=>e<.5?Math.pow(2*e,2)*(7.189819*e-ge)/2:(Math.pow(2*e-2,2)*((ge+1)*(2*e-2)+ge)+2)/2,easeInElastic:e=>0===e?0:1===e?1:-Math.pow(2,10*e-10)*Math.sin((10*e-10.75)*ye),easeOutElastic:e=>0===e?0:1===e?1:Math.pow(2,-10*e)*Math.sin((10*e-.75)*ye)+1,easeInOutElastic:e=>0===e?0:1===e?1:e<.5?-Math.pow(2,20*e-10)*Math.sin((20*e-11.125)*be)/2:Math.pow(2,-20*e+10)*Math.sin((20*e-11.125)*be)/2+1,easeInBounce:e=>1-_e(1-e),easeOutBounce:_e,easeInOutBounce:e=>e<.5?(1-_e(1-2*e))/2:(1+_e(2*e-1))/2,steps:(e,t="end")=>n=>{const r=(n="end"===t?Math.min(n,.999):Math.max(n,.001))*e;return 0,1,i=("end"===t?Math.floor(r):Math.ceil(r))/e,Math.min(Math.max(i,0),1);var i}};function we(){return we=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},we.apply(this,arguments)}const Me=Symbol.for("FluidValue.get"),Se=Symbol.for("FluidValue.observers"),Ae=e=>Boolean(e&&e[Me]),Ee=e=>e&&e[Me]?e[Me]():e,Ce=e=>e[Se]||null;function Te(e,t){let n=e[Se];n&&n.forEach((e=>{!function(e,t){e.eventObserved?e.eventObserved(t):e(t)}(e,t)}))}function Re(e,t){if(e[Me]){let n=e[Se];n||Pe(e,Se,n=new Set),n.has(t)||(n.add(t),e.observerAdded&&e.observerAdded(n.size,t))}return t}function Be(e,t){let n=e[Se];if(n&&n.has(t)){const r=n.size-1;r?n.delete(t):e[Se]=null,e.observerRemoved&&e.observerRemoved(r,t)}}const Pe=(e,t,n)=>Object.defineProperty(e,t,{value:n,writable:!0,configurable:!0}),ke=/[+\-]?(?:0|[1-9]\d*)(?:\.\d*)?(?:[eE][+\-]?\d+)?/g,Ie=/(#(?:[0-9a-f]{2}){2,4}|(#[0-9a-f]{3})|(rgb|hsl)a?\((-?\d+%?[,\s]+){2,3}\s*[\d\.]+%?\))/gi,Le=new RegExp(`(${ke.source})(%|[a-z]+)`,"i"),De=/rgba\(([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+), ([0-9\.-]+)\)/gi,Oe=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/,Fe=e=>{const[t,n]=Ne(e);if(!t||L())return e;const r=window.getComputedStyle(document.documentElement).getPropertyValue(t);if(r)return r.trim();if(n&&n.startsWith("--")){return window.getComputedStyle(document.documentElement).getPropertyValue(n)||e}return n&&Oe.test(n)?Fe(n):n||e},Ne=e=>{const t=Oe.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]};let ze;const Ue=(e,t,n,r,i)=>`rgba(${Math.round(t)}, ${Math.round(n)}, ${Math.round(r)}, ${i})`,He=e=>{ze||(ze=F?new RegExp(`(${Object.keys(F).join("|")})(?!\\w)`,"g"):/^\b$/);const t=e.output.map((e=>Ee(e).replace(Oe,Fe).replace(Ie,fe).replace(ze,fe))),n=t.map((e=>e.match(ke).map(Number))),r=n[0].map(((e,t)=>n.map((e=>{if(!(t in e))throw Error('The arity of each "output" value must be equal');return e[t]})))).map((t=>pe(we({},e,{output:t}))));return e=>{var n;const i=!Le.test(t[0])&&(null==(n=t.find((e=>Le.test(e))))?void 0:n.replace(ke,""));let a=0;return t[0].replace(ke,(()=>`${r[a++](e)}${i||""}`)).replace(De,Ue)}},Ge="react-spring: ",Ve=e=>{const t=e;let n=!1;if("function"!=typeof t)throw new TypeError(`${Ge}once requires a function parameter`);return(...e)=>{n||(t(...e),n=!0)}},je=Ve(console.warn),We=Ve(console.warn);function Je(e){return C.str(e)&&("#"==e[0]||/\d/.test(e)||!L()&&Oe.test(e)||e in(F||{}))}new WeakMap,new Set,new WeakMap,new WeakMap,new WeakMap;const Xe=L()?n.useEffect:n.useLayoutEffect;function Ke(){const e=(0,n.useState)()[1],t=(()=>{const e=(0,n.useRef)(!1);return Xe((()=>(e.current=!0,()=>{e.current=!1})),[]),e})();return()=>{t.current&&e(Math.random())}}const $e=e=>(0,n.useEffect)(e,Ye),Ye=[];function qe(e){const t=(0,n.useRef)();return(0,n.useEffect)((()=>{t.current=e})),t.current}const Qe=Symbol.for("Animated:node"),Ze=e=>e&&e[Qe],et=(e,t)=>{return n=e,r=Qe,i=t,Object.defineProperty(n,r,{value:i,writable:!0,configurable:!0});var n,r,i},tt=e=>e&&e[Qe]&&e[Qe].getPayload();class nt{constructor(){this.payload=void 0,et(this,this)}getPayload(){return this.payload||[]}}class rt extends nt{constructor(e){super(),this.done=!0,this.elapsedTime=void 0,this.lastPosition=void 0,this.lastVelocity=void 0,this.v0=void 0,this.durationProgress=0,this._value=e,C.num(this._value)&&(this.lastPosition=this._value)}static create(e){return new rt(e)}getPayload(){return[this]}getValue(){return this._value}setValue(e,t){return C.num(e)&&(this.lastPosition=e,t&&(e=Math.round(e/t)*t,this.done&&(this.lastPosition=e))),this._value!==e&&(this._value=e,!0)}reset(){const{done:e}=this;this.done=!1,C.num(this._value)&&(this.elapsedTime=0,this.durationProgress=0,this.lastPosition=this._value,e&&(this.lastVelocity=null),this.v0=null)}}class it extends rt{constructor(e){super(0),this._string=null,this._toString=void 0,this._toString=pe({output:[e,e]})}static create(e){return new it(e)}getValue(){let e=this._string;return null==e?this._string=this._toString(this._value):e}setValue(e){if(C.str(e)){if(e==this._string)return!1;this._string=e,this._value=1}else{if(!super.setValue(e))return!1;this._string=null}return!0}reset(e){e&&(this._toString=pe({output:[this.getValue(),e]})),this._value=0,super.reset()}}const at={dependencies:null};class ot extends nt{constructor(e){super(),this.source=e,this.setValue(e)}getValue(e){const t={};return B(this.source,((n,r)=>{var i;(i=n)&&i[Qe]===i?t[r]=n.getValue(e):Ae(n)?t[r]=Ee(n):e||(t[r]=n)})),t}setValue(e){this.source=e,this.payload=this._makePayload(e)}reset(){this.payload&&R(this.payload,(e=>e.reset()))}_makePayload(e){if(e){const t=new Set;return B(e,this._addToPayload,t),Array.from(t)}}_addToPayload(e){at.dependencies&&Ae(e)&&at.dependencies.add(e);const t=tt(e);t&&R(t,(e=>this.add(e)))}}class st extends ot{constructor(e){super(e)}static create(e){return new st(e)}getValue(){return this.source.map((e=>e.getValue()))}setValue(e){const t=this.getPayload();return e.length==t.length?t.map(((t,n)=>t.setValue(e[n]))).some(Boolean):(super.setValue(e.map(lt)),!0)}}function lt(e){return(Je(e)?it:rt).create(e)}function ct(e){const t=Ze(e);return t?t.constructor:C.arr(e)?st:Je(e)?it:rt}function ut(){return ut=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},ut.apply(this,arguments)}const dt=(e,t)=>{const r=!C.fun(e)||e.prototype&&e.prototype.isReactComponent;return(0,n.forwardRef)(((i,a)=>{const o=(0,n.useRef)(null),s=r&&(0,n.useCallback)((e=>{o.current=function(e,t){return e&&(C.fun(e)?e(t):e.current=t),t}(a,e)}),[a]),[l,u]=function(e,t){const n=new Set;return at.dependencies=n,e.style&&(e=ut({},e,{style:t.createAnimatedStyle(e.style)})),e=new ot(e),at.dependencies=null,[e,n]}(i,t),d=Ke(),h=()=>{const e=o.current;r&&!e||!1===(!!e&&t.applyAnimatedValues(e,l.getValue(!0)))&&d()},f=new ht(h,u),p=(0,n.useRef)();Xe((()=>(p.current=f,R(u,(e=>Re(e,f))),()=>{p.current&&(R(p.current.deps,(e=>Be(e,p.current))),c.cancel(p.current.update))}))),(0,n.useEffect)(h,[]),$e((()=>()=>{const e=p.current;R(e.deps,(t=>Be(t,e)))}));const m=t.getComponentProps(l.getValue());return n.createElement(e,ut({},m,{ref:s}))}))};class ht{constructor(e,t){this.update=e,this.deps=t}eventObserved(e){"change"==e.type&&c.write(this.update)}}const ft=Symbol.for("AnimatedComponent"),pt=e=>C.str(e)?e:e&&C.str(e.displayName)?e.displayName:C.fun(e)&&e.name||null;function mt(){return mt=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},mt.apply(this,arguments)}function gt(e,...t){return C.fun(e)?e(...t):e}const vt=(e,t)=>!0===e||!!(t&&e&&(C.fun(e)?e(t):P(e).includes(t))),yt=(e,t)=>C.obj(e)?t&&e[t]:e,bt=(e,t)=>!0===e.default?e[t]:e.default?e.default[t]:void 0,_t=e=>e,xt=(e,t=_t)=>{let n=wt;e.default&&!0!==e.default&&(e=e.default,n=Object.keys(e));const r={};for(const i of n){const n=t(e[i],i);C.und(n)||(r[i]=n)}return r},wt=["config","onProps","onStart","onChange","onPause","onResume","onRest"],Mt={config:1,from:1,to:1,ref:1,loop:1,reset:1,pause:1,cancel:1,reverse:1,immediate:1,default:1,delay:1,onProps:1,onStart:1,onChange:1,onPause:1,onResume:1,onRest:1,onResolve:1,items:1,trail:1,sort:1,expires:1,initial:1,enter:1,update:1,leave:1,children:1,onDestroyed:1,keys:1,callId:1,parentId:1};function St(e){const t=function(e){const t={};let n=0;if(B(e,((e,r)=>{Mt[r]||(t[r]=e,n++)})),n)return t}(e);if(t){const n={to:t};return B(e,((e,r)=>r in t||(n[r]=e))),n}return mt({},e)}function At(e){return e=Ee(e),C.arr(e)?e.map(At):Je(e)?U.createStringInterpolator({range:[0,1],output:[e,e]})(1):e}function Et(e){for(const t in e)return!0;return!1}function Ct(e){return C.fun(e)||C.arr(e)&&C.obj(e[0])}function Tt(e,t){var n;null==(n=e.ref)||n.delete(e),null==t||t.delete(e)}function Rt(e,t){var n;t&&e.ref!==t&&(null==(n=e.ref)||n.delete(e),t.add(e),e.ref=t)}const Bt=mt({},{tension:170,friction:26},{mass:1,damping:1,easing:xe.linear,clamp:!1});class Pt{constructor(){this.tension=void 0,this.friction=void 0,this.frequency=void 0,this.damping=void 0,this.mass=void 0,this.velocity=0,this.restVelocity=void 0,this.precision=void 0,this.progress=void 0,this.duration=void 0,this.easing=void 0,this.clamp=void 0,this.bounce=void 0,this.decay=void 0,this.round=void 0,Object.assign(this,Bt)}}function kt(e,t){if(C.und(t.decay)){const n=!C.und(t.tension)||!C.und(t.friction);!n&&C.und(t.frequency)&&C.und(t.damping)&&C.und(t.mass)||(e.duration=void 0,e.decay=void 0),n&&(e.frequency=void 0)}else e.duration=void 0}const It=[];class Lt{constructor(){this.changed=!1,this.values=It,this.toValues=null,this.fromValues=It,this.to=void 0,this.from=void 0,this.config=new Pt,this.immediate=!1}}function Dt(e,{key:t,props:n,defaultProps:r,state:i,actions:a}){return new Promise(((o,s)=>{var l;let u,d,h=vt(null!=(l=n.cancel)?l:null==r?void 0:r.cancel,t);if(h)m();else{C.und(n.pause)||(i.paused=vt(n.pause,t));let e=null==r?void 0:r.pause;!0!==e&&(e=i.paused||vt(e,t)),u=gt(n.delay||0,t),e?(i.resumeQueue.add(p),a.pause()):(a.resume(),p())}function f(){i.resumeQueue.add(p),i.timeouts.delete(d),d.cancel(),u=d.time-c.now()}function p(){u>0&&!U.skipAnimation?(i.delayed=!0,d=c.setTimeout(m,u),i.pauseQueue.add(f),i.timeouts.add(d)):m()}function m(){i.delayed&&(i.delayed=!1),i.pauseQueue.delete(f),i.timeouts.delete(d),e<=(i.cancelId||0)&&(h=!0);try{a.start(mt({},n,{callId:e,cancel:h}),o)}catch(e){s(e)}}}))}const Ot=(e,t)=>1==t.length?t[0]:t.some((e=>e.cancelled))?zt(e.get()):t.every((e=>e.noop))?Ft(e.get()):Nt(e.get(),t.every((e=>e.finished))),Ft=e=>({value:e,noop:!0,finished:!0,cancelled:!1}),Nt=(e,t,n=!1)=>({value:e,finished:t,cancelled:n}),zt=e=>({value:e,cancelled:!0,finished:!1});function Ut(e,t,n,r){const{callId:i,parentId:a,onRest:o}=t,{asyncTo:s,promise:l}=n;return a||e!==s||t.reset?n.promise=(async()=>{n.asyncId=i,n.asyncTo=e;const u=xt(t,((e,t)=>"onRest"===t?void 0:e));let d,h;const f=new Promise(((e,t)=>(d=e,h=t))),p=e=>{const t=i<=(n.cancelId||0)&&zt(r)||i!==n.asyncId&&Nt(r,!1);if(t)throw e.result=t,h(e),e},m=(e,t)=>{const a=new Gt,o=new Vt;return(async()=>{if(U.skipAnimation)throw Ht(n),o.result=Nt(r,!1),h(o),o;p(a);const s=C.obj(e)?mt({},e):mt({},t,{to:e});s.parentId=i,B(u,((e,t)=>{C.und(s[t])&&(s[t]=e)}));const l=await r.start(s);return p(a),n.paused&&await new Promise((e=>{n.resumeQueue.add(e)})),l})()};let g;if(U.skipAnimation)return Ht(n),Nt(r,!1);try{let t;t=C.arr(e)?(async e=>{for(const t of e)await m(t)})(e):Promise.resolve(e(m,r.stop.bind(r))),await Promise.all([t.then(d),f]),g=Nt(r.get(),!0,!1)}catch(e){if(e instanceof Gt)g=e.result;else{if(!(e instanceof Vt))throw e;g=e.result}}finally{i==n.asyncId&&(n.asyncId=a,n.asyncTo=a?s:void 0,n.promise=a?l:void 0)}return C.fun(o)&&c.batchedUpdates((()=>{o(g,r,r.item)})),g})():l}function Ht(e,t){k(e.timeouts,(e=>e.cancel())),e.pauseQueue.clear(),e.resumeQueue.clear(),e.asyncId=e.asyncTo=e.promise=void 0,t&&(e.cancelId=t)}class Gt extends Error{constructor(){super("An async animation has been interrupted. You see this error because you forgot to use `await` or `.catch(...)` on its returned promise."),this.result=void 0}}class Vt extends Error{constructor(){super("SkipAnimationSignal"),this.result=void 0}}const jt=e=>e instanceof Jt;let Wt=1;class Jt extends class{constructor(e){if(this[Me]=void 0,this[Se]=void 0,!e&&!(e=this.get))throw Error("Unknown getter");((e,t)=>{Pe(e,Me,t)})(this,e)}}{constructor(...e){super(...e),this.id=Wt++,this.key=void 0,this._priority=0}get priority(){return this._priority}set priority(e){this._priority!=e&&(this._priority=e,this._onPriorityChange(e))}get(){const e=Ze(this);return e&&e.getValue()}to(...e){return U.to(this,e)}interpolate(...e){return je(`${Ge}The "interpolate" function is deprecated in v9 (use "to" instead)`),U.to(this,e)}toJSON(){return this.get()}observerAdded(e){1==e&&this._attach()}observerRemoved(e){0==e&&this._detach()}_attach(){}_detach(){}_onChange(e,t=!1){Te(this,{type:"change",parent:this,value:e,idle:t})}_onPriorityChange(e){this.idle||W.sort(this),Te(this,{type:"priority",parent:this,priority:e})}}const Xt=Symbol.for("SpringPhase"),Kt=e=>(1&e[Xt])>0,$t=e=>(2&e[Xt])>0,Yt=e=>(4&e[Xt])>0,qt=(e,t)=>t?e[Xt]|=3:e[Xt]&=-3,Qt=(e,t)=>t?e[Xt]|=4:e[Xt]&=-5;class Zt extends Jt{constructor(e,t){if(super(),this.key=void 0,this.animation=new Lt,this.queue=void 0,this.defaultProps={},this._state={paused:!1,delayed:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._pendingCalls=new Set,this._lastCallId=0,this._lastToId=0,this._memoizedDuration=0,!C.und(e)||!C.und(t)){const n=C.obj(e)?mt({},e):mt({},t,{from:e});C.und(n.default)&&(n.default=!0),this.start(n)}}get idle(){return!($t(this)||this._state.asyncTo)||Yt(this)}get goal(){return Ee(this.animation.to)}get velocity(){const e=Ze(this);return e instanceof rt?e.lastVelocity||0:e.getPayload().map((e=>e.lastVelocity||0))}get hasAnimated(){return Kt(this)}get isAnimating(){return $t(this)}get isPaused(){return Yt(this)}get isDelayed(){return this._state.delayed}advance(e){let t=!0,n=!1;const r=this.animation;let{config:i,toValues:a}=r;const o=tt(r.to);!o&&Ae(r.to)&&(a=P(Ee(r.to))),r.values.forEach(((s,l)=>{if(s.done)return;const c=s.constructor==it?1:o?o[l].lastPosition:a[l];let u=r.immediate,d=c;if(!u){if(d=s.lastPosition,i.tension<=0)return void(s.done=!0);let t=s.elapsedTime+=e;const n=r.fromValues[l],a=null!=s.v0?s.v0:s.v0=C.arr(i.velocity)?i.velocity[l]:i.velocity;let o;const h=i.precision||(n==c?.005:Math.min(1,.001*Math.abs(c-n)));if(C.und(i.duration))if(i.decay){const e=!0===i.decay?.998:i.decay,r=Math.exp(-(1-e)*t);d=n+a/(1-e)*(1-r),u=Math.abs(s.lastPosition-d)<=h,o=a*r}else{o=null==s.lastVelocity?a:s.lastVelocity;const t=i.restVelocity||h/10,r=i.clamp?0:i.bounce,l=!C.und(r),f=n==c?s.v0>0:n<c;let p,m=!1;const g=1,v=Math.ceil(e/g);for(let e=0;e<v&&(p=Math.abs(o)>t,p||(u=Math.abs(c-d)<=h,!u));++e)l&&(m=d==c||d>c==f,m&&(o=-o*r,d=c)),o+=(1e-6*-i.tension*(d-c)+.001*-i.friction*o)/i.mass*g,d+=o*g}else{let r=1;i.duration>0&&(this._memoizedDuration!==i.duration&&(this._memoizedDuration=i.duration,s.durationProgress>0&&(s.elapsedTime=i.duration*s.durationProgress,t=s.elapsedTime+=e)),r=(i.progress||0)+t/this._memoizedDuration,r=r>1?1:r<0?0:r,s.durationProgress=r),d=n+i.easing(r)*(c-n),o=(d-s.lastPosition)/e,u=1==r}s.lastVelocity=o,Number.isNaN(d)&&(console.warn("Got NaN while animating:",this),u=!0)}o&&!o[l].done&&(u=!1),u?s.done=!0:t=!1,s.setValue(d,i.round)&&(n=!0)}));const s=Ze(this),l=s.getValue();if(t){const e=Ee(r.to);l===e&&!n||i.decay?n&&i.decay&&this._onChange(l):(s.setValue(e),this._onChange(e)),this._stop()}else n&&this._onChange(l)}set(e){return c.batchedUpdates((()=>{this._stop(),this._focus(e),this._set(e)})),this}pause(){this._update({pause:!0})}resume(){this._update({pause:!1})}finish(){if($t(this)){const{to:e,config:t}=this.animation;c.batchedUpdates((()=>{this._onStart(),t.decay||this._set(e,!1),this._stop()}))}return this}update(e){return(this.queue||(this.queue=[])).push(e),this}start(e,t){let n;return C.und(e)?(n=this.queue||[],this.queue=[]):n=[C.obj(e)?e:mt({},t,{to:e})],Promise.all(n.map((e=>this._update(e)))).then((e=>Ot(this,e)))}stop(e){const{to:t}=this.animation;return this._focus(this.get()),Ht(this._state,e&&this._lastCallId),c.batchedUpdates((()=>this._stop(t,e))),this}reset(){this._update({reset:!0})}eventObserved(e){"change"==e.type?this._start():"priority"==e.type&&(this.priority=e.priority+1)}_prepareNode(e){const t=this.key||"";let{to:n,from:r}=e;n=C.obj(n)?n[t]:n,(null==n||Ct(n))&&(n=void 0),r=C.obj(r)?r[t]:r,null==r&&(r=void 0);const i={to:n,from:r};return Kt(this)||(e.reverse&&([n,r]=[r,n]),r=Ee(r),C.und(r)?Ze(this)||this._set(n):this._set(r)),i}_update(e,t){let n=mt({},e);const{key:r,defaultProps:i}=this;n.default&&Object.assign(i,xt(n,((e,t)=>/^on/.test(t)?yt(e,r):e))),sn(this,n,"onProps"),ln(this,"onProps",n,this);const a=this._prepareNode(n);if(Object.isFrozen(this))throw Error("Cannot animate a `SpringValue` object that is frozen. Did you forget to pass your component to `animated(...)` before animating its props?");const o=this._state;return Dt(++this._lastCallId,{key:r,props:n,defaultProps:i,state:o,actions:{pause:()=>{Yt(this)||(Qt(this,!0),I(o.pauseQueue),ln(this,"onPause",Nt(this,en(this,this.animation.to)),this))},resume:()=>{Yt(this)&&(Qt(this,!1),$t(this)&&this._resume(),I(o.resumeQueue),ln(this,"onResume",Nt(this,en(this,this.animation.to)),this))},start:this._merge.bind(this,a)}}).then((e=>{if(n.loop&&e.finished&&(!t||!e.noop)){const e=tn(n);if(e)return this._update(e,!0)}return e}))}_merge(e,t,n){if(t.cancel)return this.stop(!0),n(zt(this));const r=!C.und(e.to),i=!C.und(e.from);if(r||i){if(!(t.callId>this._lastToId))return n(zt(this));this._lastToId=t.callId}const{key:a,defaultProps:o,animation:s}=this,{to:l,from:u}=s;let{to:d=l,from:h=u}=e;!i||r||t.default&&!C.und(d)||(d=h),t.reverse&&([d,h]=[h,d]);const f=!T(h,u);f&&(s.from=h),h=Ee(h);const p=!T(d,l);p&&this._focus(d);const m=Ct(t.to),{config:g}=s,{decay:v,velocity:y}=g;(r||i)&&(g.velocity=0),t.config&&!m&&function(e,t,n){n&&(kt(n=mt({},n),t),t=mt({},n,t)),kt(e,t),Object.assign(e,t);for(const t in Bt)null==e[t]&&(e[t]=Bt[t]);let{mass:r,frequency:i,damping:a}=e;C.und(i)||(i<.01&&(i=.01),a<0&&(a=0),e.tension=Math.pow(2*Math.PI/i,2)*r,e.friction=4*Math.PI*a*r/i)}(g,gt(t.config,a),t.config!==o.config?gt(o.config,a):void 0);let b=Ze(this);if(!b||C.und(d))return n(Nt(this,!0));const _=C.und(t.reset)?i&&!t.default:!C.und(h)&&vt(t.reset,a),x=_?h:this.get(),w=At(d),M=C.num(w)||C.arr(w)||Je(w),S=!m&&(!M||vt(o.immediate||t.immediate,a));if(p){const e=ct(d);if(e!==b.constructor){if(!S)throw Error(`Cannot animate between ${b.constructor.name} and ${e.name}, as the "to" prop suggests`);b=this._set(w)}}const A=b.constructor;let E=Ae(d),B=!1;if(!E){const e=_||!Kt(this)&&f;(p||e)&&(B=T(At(x),w),E=!B),(T(s.immediate,S)||S)&&T(g.decay,v)&&T(g.velocity,y)||(E=!0)}if(B&&$t(this)&&(s.changed&&!_?E=!0:E||this._stop(l)),!m&&((E||Ae(l))&&(s.values=b.getPayload(),s.toValues=Ae(d)?null:A==it?[1]:P(w)),s.immediate!=S&&(s.immediate=S,S||_||this._set(l)),E)){const{onRest:e}=s;R(on,(e=>sn(this,t,e)));const r=Nt(this,en(this,l));I(this._pendingCalls,r),this._pendingCalls.add(n),s.changed&&c.batchedUpdates((()=>{s.changed=!_,null==e||e(r,this),_?gt(o.onRest,r):null==s.onStart||s.onStart(r,this)}))}_&&this._set(x),m?n(Ut(t.to,t,this._state,this)):E?this._start():$t(this)&&!p?this._pendingCalls.add(n):n(Ft(x))}_focus(e){const t=this.animation;e!==t.to&&(Ce(this)&&this._detach(),t.to=e,Ce(this)&&this._attach())}_attach(){let e=0;const{to:t}=this.animation;Ae(t)&&(Re(t,this),jt(t)&&(e=t.priority+1)),this.priority=e}_detach(){const{to:e}=this.animation;Ae(e)&&Be(e,this)}_set(e,t=!0){const n=Ee(e);if(!C.und(n)){const e=Ze(this);if(!e||!T(n,e.getValue())){const r=ct(n);e&&e.constructor==r?e.setValue(n):et(this,r.create(n)),e&&c.batchedUpdates((()=>{this._onChange(n,t)}))}}return Ze(this)}_onStart(){const e=this.animation;e.changed||(e.changed=!0,ln(this,"onStart",Nt(this,en(this,e.to)),this))}_onChange(e,t){t||(this._onStart(),gt(this.animation.onChange,e,this)),gt(this.defaultProps.onChange,e,this),super._onChange(e,t)}_start(){const e=this.animation;Ze(this).reset(Ee(e.to)),e.immediate||(e.fromValues=e.values.map((e=>e.lastPosition))),$t(this)||(qt(this,!0),Yt(this)||this._resume())}_resume(){U.skipAnimation?this.finish():W.start(this)}_stop(e,t){if($t(this)){qt(this,!1);const n=this.animation;R(n.values,(e=>{e.done=!0})),n.toValues&&(n.onChange=n.onPause=n.onResume=void 0),Te(this,{type:"idle",parent:this});const r=t?zt(this.get()):Nt(this.get(),en(this,null!=e?e:n.to));I(this._pendingCalls,r),n.changed&&(n.changed=!1,ln(this,"onRest",r,this))}}}function en(e,t){const n=At(t);return T(At(e.get()),n)}function tn(e,t=e.loop,n=e.to){let r=gt(t);if(r){const i=!0!==r&&St(r),a=(i||e).reverse,o=!i||i.reset;return nn(mt({},e,{loop:t,default:!1,pause:void 0,to:!a||Ct(n)?n:void 0,from:o?e.from:void 0,reset:o},i))}}function nn(e){const{to:t,from:n}=e=St(e),r=new Set;return C.obj(t)&&an(t,r),C.obj(n)&&an(n,r),e.keys=r.size?Array.from(r):null,e}function rn(e){const t=nn(e);return C.und(t.default)&&(t.default=xt(t)),t}function an(e,t){B(e,((e,n)=>null!=e&&t.add(n)))}const on=["onStart","onRest","onChange","onPause","onResume"];function sn(e,t,n){e.animation[n]=t[n]!==bt(t,n)?yt(t[n],e.key):void 0}function ln(e,t,...n){var r,i,a,o;null==(r=(i=e.animation)[t])||r.call(i,...n),null==(a=(o=e.defaultProps)[t])||a.call(o,...n)}const cn=["onStart","onChange","onRest"];let un=1;class dn{constructor(e,t){this.id=un++,this.springs={},this.queue=[],this.ref=void 0,this._flush=void 0,this._initialProps=void 0,this._lastAsyncId=0,this._active=new Set,this._changed=new Set,this._started=!1,this._item=void 0,this._state={paused:!1,pauseQueue:new Set,resumeQueue:new Set,timeouts:new Set},this._events={onStart:new Map,onChange:new Map,onRest:new Map},this._onFrame=this._onFrame.bind(this),t&&(this._flush=t),e&&this.start(mt({default:!0},e))}get idle(){return!this._state.asyncTo&&Object.values(this.springs).every((e=>e.idle&&!e.isDelayed&&!e.isPaused))}get item(){return this._item}set item(e){this._item=e}get(){const e={};return this.each(((t,n)=>e[n]=t.get())),e}set(e){for(const t in e){const n=e[t];C.und(n)||this.springs[t].set(n)}}update(e){return e&&this.queue.push(nn(e)),this}start(e){let{queue:t}=this;return e?t=P(e).map(nn):this.queue=[],this._flush?this._flush(this,t):(yn(this,t),hn(this,t))}stop(e,t){if(e!==!!e&&(t=e),t){const n=this.springs;R(P(t),(t=>n[t].stop(!!e)))}else Ht(this._state,this._lastAsyncId),this.each((t=>t.stop(!!e)));return this}pause(e){if(C.und(e))this.start({pause:!0});else{const t=this.springs;R(P(e),(e=>t[e].pause()))}return this}resume(e){if(C.und(e))this.start({pause:!1});else{const t=this.springs;R(P(e),(e=>t[e].resume()))}return this}each(e){B(this.springs,e)}_onFrame(){const{onStart:e,onChange:t,onRest:n}=this._events,r=this._active.size>0,i=this._changed.size>0;(r&&!this._started||i&&!this._started)&&(this._started=!0,k(e,(([e,t])=>{t.value=this.get(),e(t,this,this._item)})));const a=!r&&this._started,o=i||a&&n.size?this.get():null;i&&t.size&&k(t,(([e,t])=>{t.value=o,e(t,this,this._item)})),a&&(this._started=!1,k(n,(([e,t])=>{t.value=o,e(t,this,this._item)})))}eventObserved(e){if("change"==e.type)this._changed.add(e.parent),e.idle||this._active.add(e.parent);else{if("idle"!=e.type)return;this._active.delete(e.parent)}c.onFrame(this._onFrame)}}function hn(e,t){return Promise.all(t.map((t=>fn(e,t)))).then((t=>Ot(e,t)))}async function fn(e,t,n){const{keys:r,to:i,from:a,loop:o,onRest:s,onResolve:l}=t,u=C.obj(t.default)&&t.default;o&&(t.loop=!1),!1===i&&(t.to=null),!1===a&&(t.from=null);const d=C.arr(i)||C.fun(i)?i:void 0;d?(t.to=void 0,t.onRest=void 0,u&&(u.onRest=void 0)):R(cn,(n=>{const r=t[n];if(C.fun(r)){const i=e._events[n];t[n]=({finished:e,cancelled:t})=>{const n=i.get(r);n?(e||(n.finished=!1),t&&(n.cancelled=!0)):i.set(r,{value:null,finished:e||!1,cancelled:t||!1})},u&&(u[n]=t[n])}}));const h=e._state;t.pause===!h.paused?(h.paused=t.pause,I(t.pause?h.pauseQueue:h.resumeQueue)):h.paused&&(t.pause=!0);const f=(r||Object.keys(e.springs)).map((n=>e.springs[n].start(t))),p=!0===t.cancel||!0===bt(t,"cancel");(d||p&&h.asyncId)&&f.push(Dt(++e._lastAsyncId,{props:t,state:h,actions:{pause:E,resume:E,start(t,n){p?(Ht(h,e._lastAsyncId),n(zt(e))):(t.onRest=s,n(Ut(d,t,h,e)))}}})),h.paused&&await new Promise((e=>{h.resumeQueue.add(e)}));const m=Ot(e,await Promise.all(f));if(o&&m.finished&&(!n||!m.noop)){const n=tn(t,o,i);if(n)return yn(e,[n]),fn(e,n,!0)}return l&&c.batchedUpdates((()=>l(m,e,e.item))),m}function pn(e,t){const n=mt({},e.springs);return t&&R(P(t),(e=>{C.und(e.keys)&&(e=nn(e)),C.obj(e.to)||(e=mt({},e,{to:void 0})),vn(n,e,(e=>gn(e)))})),mn(e,n),n}function mn(e,t){B(t,((t,n)=>{e.springs[n]||(e.springs[n]=t,Re(t,e))}))}function gn(e,t){const n=new Zt;return n.key=e,t&&Re(n,t),n}function vn(e,t,n){t.keys&&R(t.keys,(r=>{(e[r]||(e[r]=n(r)))._prepareNode(t)}))}function yn(e,t){R(t,(t=>{vn(e.springs,t,(t=>gn(t,e)))}))}const bn=["children"],_n=e=>{let{children:t}=e,r=function(e,t){if(null==e)return{};var n,r,i={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(i[n]=e[n]);return i}(e,bn);const i=(0,n.useContext)(xn),a=r.pause||!!i.pause,o=r.immediate||!!i.immediate;r=function(e,t){const[r]=(0,n.useState)((()=>({inputs:t,result:e()}))),i=(0,n.useRef)(),a=i.current;let o=a;return o?Boolean(t&&o.inputs&&function(e,t){if(e.length!==t.length)return!1;for(let n=0;n<e.length;n++)if(e[n]!==t[n])return!1;return!0}(t,o.inputs))||(o={inputs:t,result:e()}):o=r,(0,n.useEffect)((()=>{i.current=o,a==r&&(r.inputs=r.result=void 0)}),[o]),o.result}((()=>({pause:a,immediate:o})),[a,o]);const{Provider:s}=xn;return n.createElement(s,{value:r},t)},xn=(wn=_n,Object.assign(wn,n.createContext({})),wn.Provider._context=wn,wn.Consumer._context=wn,wn);var wn;_n.Provider=xn.Provider,_n.Consumer=xn.Consumer;const Mn=()=>{const e=[],t=function(t){We(`${Ge}Directly calling start instead of using the api object is deprecated in v9 (use ".start" instead), this will be removed in later 0.X.0 versions`);const r=[];return R(e,((e,i)=>{if(C.und(t))r.push(e.start());else{const a=n(t,e,i);a&&r.push(e.start(a))}})),r};t.current=e,t.add=function(t){e.includes(t)||e.push(t)},t.delete=function(t){const n=e.indexOf(t);~n&&e.splice(n,1)},t.pause=function(){return R(e,(e=>e.pause(...arguments))),this},t.resume=function(){return R(e,(e=>e.resume(...arguments))),this},t.set=function(t){R(e,(e=>e.set(t)))},t.start=function(t){const n=[];return R(e,((e,r)=>{if(C.und(t))n.push(e.start());else{const i=this._getProps(t,e,r);i&&n.push(e.start(i))}})),n},t.stop=function(){return R(e,(e=>e.stop(...arguments))),this},t.update=function(t){return R(e,((e,n)=>e.update(this._getProps(t,e,n)))),this};const n=function(e,t,n){return C.fun(e)?e(n,t):e};return t._getProps=n,t};function Sn(e,t,r){const i=C.fun(t)&&t;i&&!r&&(r=[]);const a=(0,n.useMemo)((()=>i||3==arguments.length?Mn():void 0),[]),o=(0,n.useRef)(0),s=Ke(),l=(0,n.useMemo)((()=>({ctrls:[],queue:[],flush(e,t){const n=pn(e,t);return o.current>0&&!l.queue.length&&!Object.keys(n).some((t=>!e.springs[t]))?hn(e,t):new Promise((r=>{mn(e,n),l.queue.push((()=>{r(hn(e,t))})),s()}))}})),[]),c=(0,n.useRef)([...l.ctrls]),u=[],d=qe(e)||0;function h(e,n){for(let r=e;r<n;r++){const e=c.current[r]||(c.current[r]=new dn(null,l.flush)),n=i?i(r,e):t[r];n&&(u[r]=rn(n))}}(0,n.useMemo)((()=>{R(c.current.slice(e,d),(e=>{Tt(e,a),e.stop(!0)})),c.current.length=e,h(d,e)}),[e]),(0,n.useMemo)((()=>{h(0,Math.min(d,e))}),r);const f=c.current.map(((e,t)=>pn(e,u[t]))),p=(0,n.useContext)(_n),m=qe(p),g=p!==m&&Et(p);Xe((()=>{o.current++,l.ctrls=c.current;const{queue:e}=l;e.length&&(l.queue=[],R(e,(e=>e()))),R(c.current,((e,t)=>{null==a||a.add(e),g&&e.start({default:p});const n=u[t];n&&(Rt(e,n.ref),e.ref?e.queue.push(n):e.start(n))}))})),$e((()=>()=>{R(l.ctrls,(e=>e.stop(!0)))}));const v=f.map((e=>mt({},e)));return a?[v,a]:v}let An;!function(e){e.MOUNT="mount",e.ENTER="enter",e.UPDATE="update",e.LEAVE="leave"}(An||(An={}));class En extends Jt{constructor(e,t){super(),this.key=void 0,this.idle=!0,this.calc=void 0,this._active=new Set,this.source=e,this.calc=pe(...t);const n=this._get(),r=ct(n);et(this,r.create(n))}advance(e){const t=this._get();T(t,this.get())||(Ze(this).setValue(t),this._onChange(t,this.idle)),!this.idle&&Tn(this._active)&&Rn(this)}_get(){const e=C.arr(this.source)?this.source.map(Ee):P(Ee(this.source));return this.calc(...e)}_start(){this.idle&&!Tn(this._active)&&(this.idle=!1,R(tt(this),(e=>{e.done=!1})),U.skipAnimation?(c.batchedUpdates((()=>this.advance())),Rn(this)):W.start(this))}_attach(){let e=1;R(P(this.source),(t=>{Ae(t)&&Re(t,this),jt(t)&&(t.idle||this._active.add(t),e=Math.max(e,t.priority+1))})),this.priority=e,this._start()}_detach(){R(P(this.source),(e=>{Ae(e)&&Be(e,this)})),this._active.clear(),Rn(this)}eventObserved(e){"change"==e.type?e.idle?this.advance():(this._active.add(e.parent),this._start()):"idle"==e.type?this._active.delete(e.parent):"priority"==e.type&&(this.priority=P(this.source).reduce(((e,t)=>Math.max(e,(jt(t)?t.priority:0)+1)),0))}}function Cn(e){return!1!==e.idle}function Tn(e){return!e.size||Array.from(e).every(Cn)}function Rn(e){e.idle||(e.idle=!0,R(tt(e),(e=>{e.done=!0})),Te(e,{type:"idle",parent:e}))}U.assign({createStringInterpolator:He,to:(e,t)=>new En(e,t)}),W.advance;const Bn=["primitive"].concat(Object.keys(s).filter((e=>/^[A-Z]/.test(e))).map((e=>e[0].toLowerCase()+e.slice(1))));U.assign({createStringInterpolator:He,colors:{transparent:0,aliceblue:4042850303,antiquewhite:4209760255,aqua:16777215,aquamarine:2147472639,azure:4043309055,beige:4126530815,bisque:4293182719,black:255,blanchedalmond:4293643775,blue:65535,blueviolet:2318131967,brown:2771004159,burlywood:3736635391,burntsienna:3934150143,cadetblue:1604231423,chartreuse:2147418367,chocolate:3530104575,coral:4286533887,cornflowerblue:1687547391,cornsilk:4294499583,crimson:3692313855,cyan:16777215,darkblue:35839,darkcyan:9145343,darkgoldenrod:3095792639,darkgray:2846468607,darkgreen:6553855,darkgrey:2846468607,darkkhaki:3182914559,darkmagenta:2332068863,darkolivegreen:1433087999,darkorange:4287365375,darkorchid:2570243327,darkred:2332033279,darksalmon:3918953215,darkseagreen:2411499519,darkslateblue:1211993087,darkslategray:793726975,darkslategrey:793726975,darkturquoise:13554175,darkviolet:2483082239,deeppink:4279538687,deepskyblue:12582911,dimgray:1768516095,dimgrey:1768516095,dodgerblue:512819199,firebrick:2988581631,floralwhite:4294635775,forestgreen:579543807,fuchsia:4278255615,gainsboro:3705462015,ghostwhite:4177068031,gold:4292280575,goldenrod:3668254975,gray:2155905279,green:8388863,greenyellow:2919182335,grey:2155905279,honeydew:4043305215,hotpink:4285117695,indianred:3445382399,indigo:1258324735,ivory:4294963455,khaki:4041641215,lavender:3873897215,lavenderblush:4293981695,lawngreen:2096890111,lemonchiffon:4294626815,lightblue:2916673279,lightcoral:4034953471,lightcyan:3774873599,lightgoldenrodyellow:4210742015,lightgray:3553874943,lightgreen:2431553791,lightgrey:3553874943,lightpink:4290167295,lightsalmon:4288707327,lightseagreen:548580095,lightskyblue:2278488831,lightslategray:2005441023,lightslategrey:2005441023,lightsteelblue:2965692159,lightyellow:4294959359,lime:16711935,limegreen:852308735,linen:4210091775,magenta:4278255615,maroon:2147483903,mediumaquamarine:1724754687,mediumblue:52735,mediumorchid:3126187007,mediumpurple:2473647103,mediumseagreen:1018393087,mediumslateblue:2070474495,mediumspringgreen:16423679,mediumturquoise:1221709055,mediumvioletred:3340076543,midnightblue:421097727,mintcream:4127193855,mistyrose:4293190143,moccasin:4293178879,navajowhite:4292783615,navy:33023,oldlace:4260751103,olive:2155872511,olivedrab:1804477439,orange:4289003775,orangered:4282712319,orchid:3664828159,palegoldenrod:4008225535,palegreen:2566625535,paleturquoise:2951671551,palevioletred:3681588223,papayawhip:4293907967,peachpuff:4292524543,peru:3448061951,pink:4290825215,plum:3718307327,powderblue:2967529215,purple:2147516671,rebeccapurple:1714657791,red:4278190335,rosybrown:3163525119,royalblue:1097458175,saddlebrown:2336560127,salmon:4202722047,sandybrown:4104413439,seagreen:780883967,seashell:4294307583,sienna:2689740287,silver:3233857791,skyblue:2278484991,slateblue:1784335871,slategray:1887473919,slategrey:1887473919,snow:4294638335,springgreen:16744447,steelblue:1182971135,tan:3535047935,teal:8421631,thistle:3636451583,tomato:4284696575,turquoise:1088475391,violet:4001558271,wheat:4125012991,white:4294967295,whitesmoke:4126537215,yellow:4294902015,yellowgreen:2597139199},frameLoop:"demand"}),(0,o.n)((()=>{c.advance()}));const Pn=((e,{applyAnimatedValues:t=(()=>!1),createAnimatedStyle:n=(e=>new ot(e)),getComponentProps:r=(e=>e)}={})=>{const i={applyAnimatedValues:t,createAnimatedStyle:n,getComponentProps:r},a=e=>{const t=pt(e)||"Anonymous";return(e=C.str(e)?a[e]||(a[e]=dt(e,i)):e[ft]||(e[ft]=dt(e,i))).displayName=`Animated(${t})`,e};return B(e,((t,n)=>{C.arr(e)&&(n=pt(t)),a[n]=a(t)})),{animated:a}})(Bn,{applyAnimatedValues:o.j}),kn=Pn.animated;var In=i(3805);function Ln({enabled:t=!0,snap:r,global:i,domElement:a,cursor:l=!0,children:c,speed:u=1,rotation:d=[0,0,0],zoom:h=1,polar:f=[0,Math.PI/2],azimuth:p=[-1/0,1/0],config:m={mass:1,tension:170,friction:26}}){const g=(0,o.z)((e=>e.events)),v=(0,o.z)((e=>e.gl)),y=a||g.connected||v.domElement,{size:b}=(0,o.z)(),_=n.useMemo((()=>[d[0]+f[0],d[0]+f[1]]),[d[0],f[0],f[1]]),x=n.useMemo((()=>[d[1]+p[0],d[1]+p[1]]),[d[1],p[0],p[1]]),w=n.useMemo((()=>[s.MathUtils.clamp(d[0],..._),s.MathUtils.clamp(d[1],...x),d[2]]),[d[0],d[1],d[2],_,x]),[M,S]=function(e,t){const n=C.fun(e),[[r],i]=Sn(1,n?e:[e],n?t||[]:t);return n||2==arguments.length?[r,i]:r}((()=>({scale:1,rotation:w,config:m})));n.useEffect((()=>{S.start({scale:1,rotation:w,config:m})}),[w]),n.useEffect((()=>{if(i&&l&&t)return y.style.cursor="grab",v.domElement.style.cursor="",()=>{y.style.cursor="default",v.domElement.style.cursor="default"}}),[i,l,y,t]);const A=(0,In.useGesture)({onHover:({last:e})=>{l&&!i&&t&&(y.style.cursor=e?"auto":"grab")},onDrag:({down:e,delta:[n,i],memo:[a,o]=M.rotation.animation.to||w})=>{if(!t)return[i,n];l&&(y.style.cursor=e?"grabbing":"grab"),n=s.MathUtils.clamp(o+n/b.width*Math.PI*u,...x),i=s.MathUtils.clamp(a+i/b.height*Math.PI*u,..._);const c=r&&!e&&"boolean"!=typeof r?r:m;return S.start({scale:e&&i>_[1]/2?h:1,rotation:r&&!e?w:[i,n,0],config:e=>"scale"===e?{...c,friction:3*c.friction}:c}),[i,n]}},{target:i?y:void 0});return n.createElement(kn.group,(0,e.Z)({},null==A?void 0:A(),M),c)}var Dn=i(6227),On=i(533),Fn=i(5696),Nn=i(6493),zn=i(3758),Un=i(3520),Hn=i(587),Gn=i(2642),Vn=i(7082);Gn.p8.registerPlugin(Vn.i);var jn=function(){var r=(0,n.useState)(1),i=(0,t.Z)(r,2),s=(i[0],i[1]),l=(0,n.useRef)(null);function c(t){var r=t.teamo,i=(0,Dn.L)(frameConsts.modelUrl),a=i.nodes,s=i.materials;return(0,o.A)((function(){matchMedia("(min-width: 1025px)").matches||(r.current.rotation.y+=.005)})),n.createElement("group",(0,e.Z)({ref:r},t,{dispose:null}),n.createElement("mesh",{receiveShadow:!0,geometry:a.Object001.geometry,material:s["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01}),n.createElement("mesh",{receiveShadow:!0,geometry:a.Object002.geometry,material:s["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01}),n.createElement("mesh",{receiveShadow:!0,geometry:a.Object003.geometry,material:s["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01}))}return Dn.L.preload(frameConsts.modelUrl),n.createElement(a.Xz,{frameloop:matchMedia("(min-width: 1025px)").matches?"demand":"always"},n.createElement(On.A,{onIncline:function(){return s(2)},onDecline:function(){return s(1)}}),n.createElement(n.Suspense,{fallback:null},n.createElement(Fn.H,{style:{pointerEvents:"none"},shadows:!1,environment:"sunset",intensity:.5,adjustCamera:matchMedia("(min-width: 1025px)").matches?1.3:1},matchMedia("(min-width: 1025px)").matches?n.createElement(Ln,{style:{pointerEvents:"all"},zoom:0,global:!0,polar:[-1/0,1/0],makeDefault:!0,cursor:!1},n.createElement(Nn.xu,{args:[.1,.1,.1]},n.createElement(c,{teamo:l,position:[0,-.1,0]}),n.createElement("meshBasicMaterial",{transparent:!0,opacity:0}))):n.createElement(c,{teamo:l})),n.createElement(zn.S,{pixelated:!0}),n.createElement(Un.E,null),n.createElement(Hn.q,null)))};function Wn(){var e=document.querySelector(".welcome figure");e&&(0,r.s)(e).render(n.createElement(n.Fragment,null,n.createElement(jn,null)))}"complete"==document.readyState||"interactive"==document.readyState?Wn():document.addEventListener("DOMContentLoaded",Wn,!1)})(),(()=>{"use strict";var e=i(2642),t=i(7082);e.p8.registerPlugin(t.i),"complete"==document.readyState||"interactive"==document.readyState||document.addEventListener("DOMContentLoaded",(function(){}),!1)})()})(); </script> <script id="https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/dist/js/essential.js-js-after"> /*! For license information please see essential.js.LICENSE.txt */ (()=>{var t={957:()=>{(()=>{var t={123:(t,e,r)=>{"use strict";r.r(e);const i=!(window.ShadyDOM&&window.ShadyDOM.inUse);let n,A;function o(t){n=(!t||!t.shimcssproperties)&&(i||Boolean(!navigator.userAgent.match(/AppleWebKit\/601|Edge\/15/)&&window.CSS&&CSS.supports&&CSS.supports("box-shadow","0 0 0 var(--foo)")))}window.ShadyCSS&&void 0!==window.ShadyCSS.cssBuild&&(A=window.ShadyCSS.cssBuild);const s=Boolean(window.ShadyCSS&&window.ShadyCSS.disableRuntime);window.ShadyCSS&&void 0!==window.ShadyCSS.nativeCss?n=window.ShadyCSS.nativeCss:window.ShadyCSS?(o(window.ShadyCSS),window.ShadyCSS=void 0):o(window.WebComponents&&window.WebComponents.flags);const a=n;class l{constructor(){this.start=0,this.end=0,this.previous=null,this.parent=null,this.rules=null,this.parsedCssText="",this.cssText="",this.atRule=!1,this.type=0,this.keyframesName="",this.selector="",this.parsedSelector=""}}function c(t){return d(function(t){let e=new l;e.start=0,e.end=t.length;let r=e;for(let i=0,n=t.length;i<n;i++)if(t[i]===p){r.rules||(r.rules=[]);let t=r,e=t.rules[t.rules.length-1]||null;r=new l,r.start=i+1,r.parent=t,r.previous=e,t.rules.push(r)}else t[i]===f&&(r.end=i+1,r=r.parent||e);return e}(t=t.replace(m.comments,"").replace(m.port,"")),t)}function d(t,e){let r=e.substring(t.start,t.end-1);if(t.parsedCssText=t.cssText=r.trim(),t.parent){let i=t.previous?t.previous.end:t.parent.start;r=e.substring(i,t.start-1),r=function(t){return t.replace(/\\([0-9a-f]{1,6})\s/gi,(function(){let t=arguments[1],e=6-t.length;for(;e--;)t="0"+t;return"\\"+t}))}(r),r=r.replace(m.multipleSpaces," "),r=r.substring(r.lastIndexOf(";")+1);let n=t.parsedSelector=t.selector=r.trim();t.atRule=0===n.indexOf(y),t.atRule?0===n.indexOf(v)?t.type=h.MEDIA_RULE:n.match(m.keyframesRule)&&(t.type=h.KEYFRAMES_RULE,t.keyframesName=t.selector.split(m.multipleSpaces).pop()):0===n.indexOf(g)?t.type=h.MIXIN_RULE:t.type=h.STYLE_RULE}let i=t.rules;if(i)for(let t,r=0,n=i.length;r<n&&(t=i[r]);r++)d(t,e);return t}function u(t,e,r=""){let i="";if(t.cssText||t.rules){let r=t.rules;if(r&&!function(t){let e=t[0];return Boolean(e)&&Boolean(e.selector)&&0===e.selector.indexOf(g)}(r))for(let t,n=0,A=r.length;n<A&&(t=r[n]);n++)i=u(t,e,i);else i=e?t.cssText:function(t){return function(t){return t.replace(m.mixinApply,"").replace(m.varApply,"")}(t=function(t){return t.replace(m.customProp,"").replace(m.mixinProp,"")}(t))}(t.cssText),i=i.trim(),i&&(i=" "+i+"\n")}return i&&(t.selector&&(r+=t.selector+" "+p+"\n"),r+=i,t.selector&&(r+=f+"\n\n")),r}const h={STYLE_RULE:1,KEYFRAMES_RULE:7,MEDIA_RULE:4,MIXIN_RULE:1e3},p="{",f="}",m={comments:/\/\*[^*]*\*+([^/*][^*]*\*+)*\//gim,port:/@import[^;]*;/gim,customProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?(?:[;\n]|$)/gim,mixinProp:/(?:^[^;\-\s}]+)?--[^;{}]*?:[^{};]*?{[^}]*?}(?:[;\n]|$)?/gim,mixinApply:/@apply\s*\(?[^);]*\)?\s*(?:[;\n]|$)?/gim,varApply:/[^;:]*?:[^;]*?var\([^;]*\)(?:[;\n]|$)?/gim,keyframesRule:/^@[^\s]*keyframes/,multipleSpaces:/\s+/g},g="--",v="@media",y="@",b=/(?:^|[;\s{]\s*)(--[\w-]*?)\s*:\s*(?:((?:'(?:\\'|.)*?'|"(?:\\"|.)*?"|\([^)]*?\)|[^};{])+)|\{([^}]*)\}(?:(?=[;\s}])|$))/gi,_=/(?:^|\W+)@apply\s*\(?([^);\n]*)\)?/gi,w=/@media\s(.*)/,x=new Set;function k(t){const e=t.textContent;if(!x.has(e)){x.add(e);const t=document.createElement("style");t.setAttribute("shady-unscoped",""),t.textContent=e,document.head.appendChild(t)}}function S(t){return t.hasAttribute("shady-unscoped")}function C(t,e){return t?("string"==typeof t&&(t=c(t)),e&&P(t,e),u(t,a)):""}function E(t){return!t.__cssRules&&t.textContent&&(t.__cssRules=c(t.textContent)),t.__cssRules||null}function P(t,e,r,i){if(!t)return;let n=!1,A=t.type;if(i&&A===h.MEDIA_RULE){let e=t.selector.match(w);e&&(window.matchMedia(e[1]).matches||(n=!0))}A===h.STYLE_RULE?e(t):r&&A===h.KEYFRAMES_RULE?r(t):A===h.MIXIN_RULE&&(n=!0);let o=t.rules;if(o&&!n)for(let t,n=0,A=o.length;n<A&&(t=o[n]);n++)P(t,e,r,i)}function T(t,e){let r=t.indexOf("var(");if(-1===r)return e(t,"","","");let i=function(t,e){let r=0;for(let i=e,n=t.length;i<n;i++)if("("===t[i])r++;else if(")"===t[i]&&0==--r)return i;return-1}(t,r+3),n=t.substring(r+4,i),A=t.substring(0,r),o=T(t.substring(i+1),e),s=n.indexOf(",");return-1===s?e(A,n.trim(),"",o):e(A,n.substring(0,s).trim(),n.substring(s+1).trim(),o)}window.ShadyDOM&&window.ShadyDOM.wrap;const O="css-build";function N(t){return""!==function(t){if(void 0!==A)return A;if(void 0===t.__cssBuild){const e=t.getAttribute(O);if(e)t.__cssBuild=e;else{const e=function(t){const e="template"===t.localName?t.content.firstChild:t.firstChild;if(e instanceof Comment){const t=e.textContent.trim().split(":");if(t[0]===O)return t[1]}return""}(t);""!==e&&function(t){const e="template"===t.localName?t.content.firstChild:t.firstChild;e.parentNode.removeChild(e)}(t),t.__cssBuild=e}}return t.__cssBuild||""}(t)}function $(t,e){for(let r in e)null===r?t.style.removeProperty(r):t.style.setProperty(r,e[r])}function I(t,e){const r=window.getComputedStyle(t).getPropertyValue(e);return r?r.trim():""}const M=/;\s*/m,D=/^\s*(initial)|(inherit)\s*$/,L=/\s*!important/;class z{constructor(){this._map={}}set(t,e){t=t.trim(),this._map[t]={properties:e,dependants:{}}}get(t){return t=t.trim(),this._map[t]||null}}let B=null;class R{constructor(){this._currentElement=null,this._measureElement=null,this._map=new z}detectMixin(t){return function(t){const e=_.test(t)||b.test(t);return _.lastIndex=0,b.lastIndex=0,e}(t)}gatherStyles(t){const e=function(t){const e=[],r=t.querySelectorAll("style");for(let t=0;t<r.length;t++){const n=r[t];S(n)?i||(k(n),n.parentNode.removeChild(n)):(e.push(n.textContent),n.parentNode.removeChild(n))}return e.join("").trim()}(t.content);if(e){const r=document.createElement("style");return r.textContent=e,t.content.insertBefore(r,t.content.firstChild),r}return null}transformTemplate(t,e){void 0===t._gatheredStyle&&(t._gatheredStyle=this.gatherStyles(t));const r=t._gatheredStyle;return r?this.transformStyle(r,e):null}transformStyle(t,e=""){let r=E(t);return this.transformRules(r,e),t.textContent=C(r),r}transformCustomStyle(t){let e=E(t);return P(e,(t=>{":root"===t.selector&&(t.selector="html"),this.transformRule(t)})),t.textContent=C(e),e}transformRules(t,e){this._currentElement=e,P(t,(t=>{this.transformRule(t)})),this._currentElement=null}transformRule(t){t.cssText=this.transformCssText(t.parsedCssText,t),":root"===t.selector&&(t.selector=":host > *")}transformCssText(t,e){return t=t.replace(b,((t,r,i,n)=>this._produceCssProperties(t,r,i,n,e))),this._consumeCssProperties(t,e)}_getInitialValueForProperty(t){return this._measureElement||(this._measureElement=document.createElement("meta"),this._measureElement.setAttribute("apply-shim-measure",""),this._measureElement.style.all="initial",document.head.appendChild(this._measureElement)),window.getComputedStyle(this._measureElement).getPropertyValue(t)}_fallbacksFromPreviousRules(t){let e=t;for(;e.parent;)e=e.parent;const r={};let i=!1;return P(e,(e=>{i=i||e===t,i||e.selector===t.selector&&Object.assign(r,this._cssTextToMap(e.parsedCssText))})),r}_consumeCssProperties(t,e){let r=null;for(;r=_.exec(t);){let i=r[0],n=r[1],A=r.index,o=A+i.indexOf("@apply"),s=A+i.length,a=t.slice(0,o),l=t.slice(s),c=e?this._fallbacksFromPreviousRules(e):{};Object.assign(c,this._cssTextToMap(a));let d=this._atApplyToCssProperties(n,c);t=`${a}${d}${l}`,_.lastIndex=A+d.length}return t}_atApplyToCssProperties(t,e){t=t.replace(M,"");let r=[],i=this._map.get(t);if(i||(this._map.set(t,{}),i=this._map.get(t)),i){let n,A,o;this._currentElement&&(i.dependants[this._currentElement]=!0);const s=i.properties;for(n in s)o=e&&e[n],A=[n,": var(",t,"_-_",n],o&&A.push(",",o.replace(L,"")),A.push(")"),L.test(s[n])&&A.push(" !important"),r.push(A.join(""))}return r.join("; ")}_replaceInitialOrInherit(t,e){let r=D.exec(e);return r&&(e=r[1]?this._getInitialValueForProperty(t):"apply-shim-inherit"),e}_cssTextToMap(t,e=!1){let r,i,n=t.split(";"),A={};for(let t,o,s=0;s<n.length;s++)t=n[s],t&&(o=t.split(":"),o.length>1&&(r=o[0].trim(),i=o.slice(1).join(":"),e&&(i=this._replaceInitialOrInherit(r,i)),A[r]=i));return A}_invalidateMixinEntry(t){if(B)for(let e in t.dependants)e!==this._currentElement&&B(e)}_produceCssProperties(t,e,r,i,n){if(r&&T(r,((t,e)=>{e&&this._map.get(e)&&(i=`@apply ${e};`)})),!i)return t;let A=this._consumeCssProperties(""+i,n),o=t.slice(0,t.indexOf("--")),s=this._cssTextToMap(A,!0),a=s,l=this._map.get(e),c=l&&l.properties;c?a=Object.assign(Object.create(c),s):this._map.set(e,a);let d,u,h=[],p=!1;for(d in a)u=s[d],void 0===u&&(u="initial"),c&&!(d in c)&&(p=!0),h.push(`${e}_-_${d}: ${u}`);return p&&this._invalidateMixinEntry(l),l&&(l.properties=a),r&&(o=`${t};${o}`),`${o}${h.join("; ")};`}}R.prototype.detectMixin=R.prototype.detectMixin,R.prototype.transformStyle=R.prototype.transformStyle,R.prototype.transformCustomStyle=R.prototype.transformCustomStyle,R.prototype.transformRules=R.prototype.transformRules,R.prototype.transformRule=R.prototype.transformRule,R.prototype.transformTemplate=R.prototype.transformTemplate,R.prototype._separator="_-_",Object.defineProperty(R.prototype,"invalidCallback",{get:()=>B,set(t){B=t}});const F=R,H={},V="_applyShimCurrentVersion",U="_applyShimNextVersion",Y="_applyShimValidatingVersion",q=Promise.resolve();function j(t){let e=H[t];e&&function(t){t[V]=t[V]||0,t[Y]=t[Y]||0,t[U]=(t[U]||0)+1}(e)}function Q(t){return t[V]===t[U]}let W,Z=null,G=window.HTMLImports&&window.HTMLImports.whenReady||null;function J(t){requestAnimationFrame((function(){G?G(t):(Z||(Z=new Promise((t=>{W=t})),"complete"===document.readyState?W():document.addEventListener("readystatechange",(()=>{"complete"===document.readyState&&W()}))),Z.then((function(){t&&t()})))}))}const X="__seenByShadyCSS",K="__shadyCSSCachedStyle";let tt=null,et=null;class rt{constructor(){this.customStyles=[],this.enqueued=!1,J((()=>{window.ShadyCSS.flushCustomStyles&&window.ShadyCSS.flushCustomStyles()}))}enqueueDocumentValidation(){!this.enqueued&&et&&(this.enqueued=!0,J(et))}addCustomStyle(t){t[X]||(t[X]=!0,this.customStyles.push(t),this.enqueueDocumentValidation())}getStyleForCustomStyle(t){if(t[K])return t[K];let e;return e=t.getStyle?t.getStyle():t,e}processStyles(){const t=this.customStyles;for(let e=0;e<t.length;e++){const r=t[e];if(r[K])continue;const i=this.getStyleForCustomStyle(r);if(i){const t=i.__appliedElement||i;tt&&tt(t),r[K]=t}}return t}}rt.prototype.addCustomStyle=rt.prototype.addCustomStyle,rt.prototype.getStyleForCustomStyle=rt.prototype.getStyleForCustomStyle,rt.prototype.processStyles=rt.prototype.processStyles,Object.defineProperties(rt.prototype,{transformCallback:{get:()=>tt,set(t){tt=t}},validateCallback:{get:()=>et,set(t){let e=!1;et||(e=!0),et=t,e&&this.enqueueDocumentValidation()}}});const it=new F;class nt{constructor(){this.customStyleInterface=null,it.invalidCallback=j}ensure(){this.customStyleInterface||window.ShadyCSS.CustomStyleInterface&&(this.customStyleInterface=window.ShadyCSS.CustomStyleInterface,this.customStyleInterface.transformCallback=t=>{it.transformCustomStyle(t)},this.customStyleInterface.validateCallback=()=>{requestAnimationFrame((()=>{this.customStyleInterface.enqueued&&this.flushCustomStyles()}))})}prepareTemplate(t,e){if(this.ensure(),N(t))return;H[e]=t;let r=it.transformTemplate(t,e);t._styleAst=r}flushCustomStyles(){if(this.ensure(),!this.customStyleInterface)return;let t=this.customStyleInterface.processStyles();if(this.customStyleInterface.enqueued){for(let e=0;e<t.length;e++){let r=t[e],i=this.customStyleInterface.getStyleForCustomStyle(r);i&&it.transformCustomStyle(i)}this.customStyleInterface.enqueued=!1}}styleSubtree(t,e){if(this.ensure(),e&&$(t,e),t.shadowRoot){this.styleElement(t);let e=t.shadowRoot.children||t.shadowRoot.childNodes;for(let t=0;t<e.length;t++)this.styleSubtree(e[t])}else{let e=t.children||t.childNodes;for(let t=0;t<e.length;t++)this.styleSubtree(e[t])}}styleElement(t){this.ensure();let{is:e}=function(t){let e=t.localName,r="",i="";return e?e.indexOf("-")>-1?r=e:(i=e,r=t.getAttribute&&t.getAttribute("is")||""):(r=t.is,i=t.extends),{is:r,typeExtension:i}}(t),r=H[e];if((!r||!N(r))&&r&&!Q(r)){(function(t){return!Q(t)&&t[Y]===t[U]})(r)||(this.prepareTemplate(r,e),function(t){t[Y]=t[U],t._validating||(t._validating=!0,q.then((function(){t[V]=t[U],t._validating=!1})))}(r));let i=t.shadowRoot;if(i){let t=i.querySelector("style");t&&(t.__cssRules=r._styleAst,t.textContent=C(r._styleAst))}}}styleDocument(t){this.ensure(),this.styleSubtree(document.body,t)}}if(!window.ShadyCSS||!window.ShadyCSS.ScopingShim){const t=new nt;let e=window.ShadyCSS&&window.ShadyCSS.CustomStyleInterface;window.ShadyCSS={prepareTemplate(e,r,i){t.flushCustomStyles(),t.prepareTemplate(e,r)},prepareTemplateStyles(t,e,r){window.ShadyCSS.prepareTemplate(t,e,r)},prepareTemplateDom(t,e){},styleSubtree(e,r){t.flushCustomStyles(),t.styleSubtree(e,r)},styleElement(e){t.flushCustomStyles(),t.styleElement(e)},styleDocument(e){t.flushCustomStyles(),t.styleDocument(e)},getComputedStyleValue:(t,e)=>I(t,e),flushCustomStyles(){t.flushCustomStyles()},nativeCss:a,nativeShadow:i,cssBuild:A,disableRuntime:s},e&&(window.ShadyCSS.CustomStyleInterface=e)}window.ShadyCSS.ApplyShim=it,window.JSCompiler_renameProperty=function(t,e){return t};let At,ot,st=/(url\()([^)]*)(\))/g,at=/(^\/[^\/])|(^#)|(^[\w-\d]*:)/;function lt(t,e){if(t&&at.test(t))return t;if("//"===t)return t;if(void 0===At){At=!1;try{const t=new URL("b","http://a");t.pathname="c%20d",At="http://a/c%20d"===t.href}catch(t){}}if(e||(e=document.baseURI||window.location.href),At)try{return new URL(t,e).href}catch(e){return t}return ot||(ot=document.implementation.createHTMLDocument("temp"),ot.base=ot.createElement("base"),ot.head.appendChild(ot.base),ot.anchor=ot.createElement("a"),ot.body.appendChild(ot.anchor)),ot.base.href=e,ot.anchor.href=t,ot.anchor.href||t}function ct(t,e){return t.replace(st,(function(t,r,i,n){return r+"'"+lt(i.replace(/["']/g,""),e)+"'"+n}))}function dt(t){return t.substring(0,t.lastIndexOf("/")+1)}const ut=!window.ShadyDOM||!window.ShadyDOM.inUse,ht=(Boolean(!window.ShadyCSS||window.ShadyCSS.nativeCss),window.customElements.polyfillWrapFlushCallback,ut&&"adoptedStyleSheets"in Document.prototype&&"replaceSync"in CSSStyleSheet.prototype&&(()=>{try{const t=new CSSStyleSheet;t.replaceSync("");const e=document.createElement("div");return e.attachShadow({mode:"open"}),e.shadowRoot.adoptedStyleSheets=[t],e.shadowRoot.adoptedStyleSheets[0]===t}catch(t){return!1}})());let pt=window.Polymer&&window.Polymer.rootPath||dt(document.baseURI||window.location.href),ft=window.Polymer&&window.Polymer.sanitizeDOMValue||void 0,mt=window.Polymer&&window.Polymer.setPassiveTouchGestures||!1,gt=window.Polymer&&window.Polymer.strictTemplatePolicy||!1,vt=window.Polymer&&window.Polymer.allowTemplateFromDomModule||!1,yt=window.Polymer&&window.Polymer.legacyOptimizations||!1,bt=window.Polymer&&window.Polymer.legacyWarnings||!1,_t=window.Polymer&&window.Polymer.syncInitialRender||!1,wt=window.Polymer&&window.Polymer.legacyUndefined||!1,xt=window.Polymer&&window.Polymer.orderedComputed||!1,kt=window.Polymer&&window.Polymer.removeNestedTemplates||!1,St=window.Polymer&&window.Polymer.fastDomIf||!1,Ct=window.Polymer&&window.Polymer.suppressTemplateNotifications||!1,Et=window.Polymer&&window.Polymer.legacyNoObservedAttributes||!1,Pt=window.Polymer&&window.Polymer.useAdoptedStyleSheetsWithBuiltCSS||!1,Tt=0;function Ot(){}Ot.prototype.__mixinApplications,Ot.prototype.__mixinSet;const Nt=function(t){let e=t.__mixinApplications;e||(e=new WeakMap,t.__mixinApplications=e);let r=Tt++;return function(i){let n=i.__mixinSet;if(n&&n[r])return i;let A=e,o=A.get(i);if(!o){o=t(i),A.set(i,o);let e=Object.create(o.__mixinSet||n||null);e[r]=!0,o.__mixinSet=e}return o}};let $t={},It={};function Mt(t,e){$t[t]=It[t.toLowerCase()]=e}function Dt(t){return $t[t]||It[t.toLowerCase()]}class Lt extends HTMLElement{static get observedAttributes(){return["id"]}static import(t,e){if(t){let r=Dt(t);return r&&e?r.querySelector(e):r}return null}attributeChangedCallback(t,e,r,i){e!==r&&this.register()}get assetpath(){if(!this.__assetpath){const t=window.HTMLImports&&HTMLImports.importForElement?HTMLImports.importForElement(this)||document:this.ownerDocument,e=lt(this.getAttribute("assetpath")||"",t.baseURI);this.__assetpath=dt(e)}return this.__assetpath}register(t){if(t=t||this.id){if(gt&&void 0!==Dt(t))throw Mt(t,null),new Error(`strictTemplatePolicy: dom-module ${t} re-registered`);this.id=t,Mt(t,this),(e=this).querySelector("style")&&console.warn("dom-module %s has style outside template",e.id)}var e}}Lt.prototype.modules=$t,customElements.define("dom-module",Lt);const zt="shady-unscoped";function Bt(t){return Lt.import(t)}function Rt(t){const e=ct((t.body?t.body:t).textContent,t.baseURI),r=document.createElement("style");return r.textContent=e,r}function Ft(t){const e=t.trim().split(/\s+/),r=[];for(let t=0;t<e.length;t++)r.push(...Ht(e[t]));return r}function Ht(t){const e=Bt(t);if(!e)return console.warn("Could not find style data in module named",t),[];if(void 0===e._styles){const t=[];t.push(...Ut(e));const r=e.querySelector("template");r&&t.push(...Vt(r,e.assetpath)),e._styles=t}return e._styles}function Vt(t,e){if(!t._styles){const r=[],i=t.content.querySelectorAll("style");for(let t=0;t<i.length;t++){let n=i[t],A=n.getAttribute("include");A&&r.push(...Ft(A).filter((function(t,e,r){return r.indexOf(t)===e}))),e&&(n.textContent=ct(n.textContent,e)),r.push(n)}t._styles=r}return t._styles}function Ut(t){const e=[],r=t.querySelectorAll("link[rel=import][type~=css]");for(let t=0;t<r.length;t++){let i=r[t];if(i.import){const t=i.import,r=i.hasAttribute(zt);if(r&&!t._unscopedStyle){const e=Rt(t);e.setAttribute(zt,""),t._unscopedStyle=e}else t._style||(t._style=Rt(t));e.push(r?t._unscopedStyle:t._style)}}return e}function Yt(t){let e=Bt(t);if(e&&void 0===e._cssText){let t=function(t){let e="",r=Ut(t);for(let t=0;t<r.length;t++)e+=r[t].textContent;return e}(e),r=e.querySelector("template");r&&(t+=function(t,e){let r="";const i=Vt(t,e);for(let t=0;t<i.length;t++){let e=i[t];e.parentNode&&e.parentNode.removeChild(e),r+=e.textContent}return r}(r,e.assetpath)),e._cssText=t||null}return e||console.warn("Could not find style data in module named",t),e&&e._cssText||""}const qt=window.ShadyDOM&&window.ShadyDOM.noPatch&&window.ShadyDOM.wrap?window.ShadyDOM.wrap:window.ShadyDOM?t=>ShadyDOM.patch(t):t=>t;function jt(t){return t.indexOf(".")>=0}function Qt(t){let e=t.indexOf(".");return-1===e?t:t.slice(0,e)}function Wt(t,e){return 0===t.indexOf(e+".")}function Zt(t,e){return 0===e.indexOf(t+".")}function Gt(t,e,r){return e+r.slice(t.length)}function Jt(t){if(Array.isArray(t)){let e=[];for(let r=0;r<t.length;r++){let i=t[r].toString().split(".");for(let t=0;t<i.length;t++)e.push(i[t])}return e.join(".")}return t}function Xt(t){return Array.isArray(t)?Jt(t).split("."):t.toString().split(".")}function Kt(t,e,r){let i=t,n=Xt(e);for(let t=0;t<n.length;t++){if(!i)return;i=i[n[t]]}return r&&(r.path=n.join(".")),i}function te(t,e,r){let i=t,n=Xt(e),A=n[n.length-1];if(n.length>1){for(let t=0;t<n.length-1;t++)if(i=i[n[t]],!i)return;i[A]=r}else i[e]=r;return n.join(".")}const ee={},re=/-[a-z]/g,ie=/([A-Z])/g;function ne(t){return ee[t]||(ee[t]=t.indexOf("-")<0?t:t.replace(re,(t=>t[1].toUpperCase())))}function Ae(t){return ee[t]||(ee[t]=t.replace(ie,"-$1").toLowerCase())}let oe=0,se=0,ae=[],le=0,ce=!1,de=document.createTextNode("");new window.MutationObserver((function(){ce=!1;const t=ae.length;for(let e=0;e<t;e++){let r=ae[e];if(r)try{r()}catch(t){setTimeout((()=>{throw t}))}}ae.splice(0,t),se+=t})).observe(de,{characterData:!0});const ue={after:t=>({run:e=>window.setTimeout(e,t),cancel(t){window.clearTimeout(t)}}),run:(t,e)=>window.setTimeout(t,e),cancel(t){window.clearTimeout(t)}},he={run:t=>(ce||(ce=!0,de.textContent=le++),ae.push(t),oe++),cancel(t){const e=t-se;if(e>=0){if(!ae[e])throw new Error("invalid async handle: "+t);ae[e]=null}}},pe=he,fe=Nt((t=>class extends t{static createProperties(t){const e=this.prototype;for(let r in t)r in e||e._createPropertyAccessor(r)}static attributeNameForProperty(t){return t.toLowerCase()}static typeForProperty(t){}_createPropertyAccessor(t,e){this._addPropertyToAttributeMap(t),this.hasOwnProperty(JSCompiler_renameProperty("__dataHasAccessor",this))||(this.__dataHasAccessor=Object.assign({},this.__dataHasAccessor)),this.__dataHasAccessor[t]||(this.__dataHasAccessor[t]=!0,this._definePropertyAccessor(t,e))}_addPropertyToAttributeMap(t){this.hasOwnProperty(JSCompiler_renameProperty("__dataAttributes",this))||(this.__dataAttributes=Object.assign({},this.__dataAttributes));let e=this.__dataAttributes[t];return e||(e=this.constructor.attributeNameForProperty(t),this.__dataAttributes[e]=t),e}_definePropertyAccessor(t,e){Object.defineProperty(this,t,{get(){return this.__data[t]},set:e?function(){}:function(e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}})}constructor(){super(),this.__dataEnabled=!1,this.__dataReady=!1,this.__dataInvalid=!1,this.__data={},this.__dataPending=null,this.__dataOld=null,this.__dataInstanceProps=null,this.__dataCounter=0,this.__serializing=!1,this._initializeProperties()}ready(){this.__dataReady=!0,this._flushProperties()}_initializeProperties(){for(let t in this.__dataHasAccessor)this.hasOwnProperty(t)&&(this.__dataInstanceProps=this.__dataInstanceProps||{},this.__dataInstanceProps[t]=this[t],delete this[t])}_initializeInstanceProperties(t){Object.assign(this,t)}_setProperty(t,e){this._setPendingProperty(t,e)&&this._invalidateProperties()}_getProperty(t){return this.__data[t]}_setPendingProperty(t,e,r){let i=this.__data[t],n=this._shouldPropertyChange(t,e,i);return n&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),this.__dataOld&&!(t in this.__dataOld)&&(this.__dataOld[t]=i),this.__data[t]=e,this.__dataPending[t]=e),n}_isPropertyPending(t){return!(!this.__dataPending||!this.__dataPending.hasOwnProperty(t))}_invalidateProperties(){!this.__dataInvalid&&this.__dataReady&&(this.__dataInvalid=!0,pe.run((()=>{this.__dataInvalid&&(this.__dataInvalid=!1,this._flushProperties())})))}_enableProperties(){this.__dataEnabled||(this.__dataEnabled=!0,this.__dataInstanceProps&&(this._initializeInstanceProperties(this.__dataInstanceProps),this.__dataInstanceProps=null),this.ready())}_flushProperties(){this.__dataCounter++;const t=this.__data,e=this.__dataPending,r=this.__dataOld;this._shouldPropertiesChange(t,e,r)&&(this.__dataPending=null,this.__dataOld=null,this._propertiesChanged(t,e,r)),this.__dataCounter--}_shouldPropertiesChange(t,e,r){return Boolean(e)}_propertiesChanged(t,e,r){}_shouldPropertyChange(t,e,r){return r!==e&&(r==r||e==e)}attributeChangedCallback(t,e,r,i){e!==r&&this._attributeToProperty(t,r),super.attributeChangedCallback&&super.attributeChangedCallback(t,e,r,i)}_attributeToProperty(t,e,r){if(!this.__serializing){const i=this.__dataAttributes,n=i&&i[t]||t;this[n]=this._deserializeValue(e,r||this.constructor.typeForProperty(n))}}_propertyToAttribute(t,e,r){this.__serializing=!0,r=arguments.length<3?this[t]:r,this._valueToNodeAttribute(this,r,e||this.constructor.attributeNameForProperty(t)),this.__serializing=!1}_valueToNodeAttribute(t,e,r){const i=this._serializeValue(e);"class"!==r&&"name"!==r&&"slot"!==r||(t=qt(t)),void 0===i?t.removeAttribute(r):t.setAttribute(r,i)}_serializeValue(t){return"boolean"==typeof t?t?"":void 0:null!=t?t.toString():void 0}_deserializeValue(t,e){switch(e){case Boolean:return null!==t;case Number:return Number(t);default:return t}}})),me={};let ge=HTMLElement.prototype;for(;ge;){let t=Object.getOwnPropertyNames(ge);for(let e=0;e<t.length;e++)me[t[e]]=!0;ge=Object.getPrototypeOf(ge)}const ve=Nt((t=>{const e=fe(t);return class extends e{static createPropertiesForAttributes(){let t=this.observedAttributes;for(let e=0;e<t.length;e++)this.prototype._createPropertyAccessor(ne(t[e]))}static attributeNameForProperty(t){return Ae(t)}_initializeProperties(){this.__dataProto&&(this._initializeProtoProperties(this.__dataProto),this.__dataProto=null),super._initializeProperties()}_initializeProtoProperties(t){for(let e in t)this._setProperty(e,t[e])}_ensureAttribute(t,e){this.hasAttribute(t)||this._valueToNodeAttribute(this,e,t)}_serializeValue(t){if("object"==typeof t){if(t instanceof Date)return t.toString();if(t)try{return JSON.stringify(t)}catch(t){return""}}return super._serializeValue(t)}_deserializeValue(t,e){let r;switch(e){case Object:try{r=JSON.parse(t)}catch(e){r=t}break;case Array:try{r=JSON.parse(t)}catch(e){r=null,console.warn(`Polymer::Attributes: couldn't decode Array as JSON: ${t}`)}break;case Date:r=isNaN(t)?String(t):Number(t),r=new Date(r);break;default:r=super._deserializeValue(t,e)}return r}_definePropertyAccessor(t,e){!function(t,e){if(!me[e]){let r=t[e];void 0!==r&&(t.__data?t._setPendingProperty(e,r):(t.__dataProto?t.hasOwnProperty(JSCompiler_renameProperty("__dataProto",t))||(t.__dataProto=Object.create(t.__dataProto)):t.__dataProto={},t.__dataProto[e]=r))}}(this,t),super._definePropertyAccessor(t,e)}_hasAccessor(t){return this.__dataHasAccessor&&this.__dataHasAccessor[t]}_isPropertyPending(t){return Boolean(this.__dataPending&&t in this.__dataPending)}}})),ye={"dom-if":!0,"dom-repeat":!0};let be=!1,_e=!1;function we(t){let e=t.getAttribute("is");if(e&&ye[e]){let r=t;for(r.removeAttribute("is"),t=r.ownerDocument.createElement(e),r.parentNode.replaceChild(t,r),t.appendChild(r);r.attributes.length;)t.setAttribute(r.attributes[0].name,r.attributes[0].value),r.removeAttribute(r.attributes[0].name)}return t}function xe(t,e){let r=e.parentInfo&&xe(t,e.parentInfo);if(!r)return t;for(let t=r.firstChild,i=0;t;t=t.nextSibling)if(e.parentIndex===i++)return t}function ke(t,e,r,i){i.id&&(e[i.id]=r)}function Se(t,e,r){if(r.events&&r.events.length)for(let i,n=0,A=r.events;n<A.length&&(i=A[n]);n++)t._addMethodEventListenerToNode(e,i.name,i.value,t)}function Ce(t,e,r,i){r.templateInfo&&(e._templateInfo=r.templateInfo,e._parentTemplateInfo=i)}const Ee=Nt((t=>class extends t{static _parseTemplate(t,e){if(!t._templateInfo){let r=t._templateInfo={};r.nodeInfoList=[],r.nestedTemplate=Boolean(e),r.stripWhiteSpace=e&&e.stripWhiteSpace||t.hasAttribute("strip-whitespace"),this._parseTemplateContent(t,r,{parent:null})}return t._templateInfo}static _parseTemplateContent(t,e,r){return this._parseTemplateNode(t.content,e,r)}static _parseTemplateNode(t,e,r){let i=!1,n=t;return"template"!=n.localName||n.hasAttribute("preserve-content")?"slot"===n.localName&&(e.hasInsertionPoint=!0):i=this._parseTemplateNestedTemplate(n,e,r)||i,function(t){(function(){if(!be){be=!0;const t=document.createElement("textarea");t.placeholder="a",_e=t.placeholder===t.textContent}return _e})()&&"textarea"===t.localName&&t.placeholder&&t.placeholder===t.textContent&&(t.textContent=null)}(n),n.firstChild&&this._parseTemplateChildNodes(n,e,r),n.hasAttributes&&n.hasAttributes()&&(i=this._parseTemplateNodeAttributes(n,e,r)||i),i||r.noted}static _parseTemplateChildNodes(t,e,r){if("script"!==t.localName&&"style"!==t.localName)for(let i,n=t.firstChild,A=0;n;n=i){if("template"==n.localName&&(n=we(n)),i=n.nextSibling,n.nodeType===Node.TEXT_NODE){let r=i;for(;r&&r.nodeType===Node.TEXT_NODE;)n.textContent+=r.textContent,i=r.nextSibling,t.removeChild(r),r=i;if(e.stripWhiteSpace&&!n.textContent.trim()){t.removeChild(n);continue}}let o={parentIndex:A,parentInfo:r};this._parseTemplateNode(n,e,o)&&(o.infoIndex=e.nodeInfoList.push(o)-1),n.parentNode&&A++}}static _parseTemplateNestedTemplate(t,e,r){let i=t,n=this._parseTemplate(i,e);return(n.content=i.content.ownerDocument.createDocumentFragment()).appendChild(i.content),r.templateInfo=n,!0}static _parseTemplateNodeAttributes(t,e,r){let i=!1,n=Array.from(t.attributes);for(let A,o=n.length-1;A=n[o];o--)i=this._parseTemplateNodeAttribute(t,e,r,A.name,A.value)||i;return i}static _parseTemplateNodeAttribute(t,e,r,i,n){return"on-"===i.slice(0,3)?(t.removeAttribute(i),r.events=r.events||[],r.events.push({name:i.slice(3),value:n}),!0):"id"===i&&(r.id=n,!0)}static _contentForTemplate(t){let e=t._templateInfo;return e&&e.content||t.content}_stampTemplate(t,e){t&&!t.content&&window.HTMLTemplateElement&&HTMLTemplateElement.decorate&&HTMLTemplateElement.decorate(t);let r=(e=e||this.constructor._parseTemplate(t)).nodeInfoList,i=e.content||t.content,n=document.importNode(i,!0);n.__noInsertionPoint=!e.hasInsertionPoint;let A=n.nodeList=new Array(r.length);n.$={};for(let t,i=0,o=r.length;i<o&&(t=r[i]);i++){let r=A[i]=xe(n,t);ke(0,n.$,r,t),Ce(0,r,t,e),Se(this,r,t)}return n}_addMethodEventListenerToNode(t,e,r,i){let n=function(t,e,r){return t=t._methodHost||t,function(e){t[r]?t[r](e,e.detail):console.warn("listener method `"+r+"` not defined")}}(i=i||t,0,r);return this._addEventListenerToNode(t,e,n),n}_addEventListenerToNode(t,e,r){t.addEventListener(e,r)}_removeEventListenerFromNode(t,e,r){t.removeEventListener(e,r)}}));let Pe=0;const Te=[],Oe={COMPUTE:"__computeEffects",REFLECT:"__reflectEffects",NOTIFY:"__notifyEffects",PROPAGATE:"__propagateEffects",OBSERVE:"__observeEffects",READ_ONLY:"__readOnly"},Ne=/[A-Z]/;function $e(t,e,r){let i=t[e];if(i){if(!t.hasOwnProperty(e)&&(i=t[e]=Object.create(t[e]),r))for(let t in i){let e=i[t],r=i[t]=Array(e.length);for(let t=0;t<e.length;t++)r[t]=e[t]}}else i=t[e]={};return i}function Ie(t,e,r,i,n,A){if(e){let o=!1;const s=Pe++;for(let a in r){let l=e[n?Qt(a):a];if(l)for(let e,c=0,d=l.length;c<d&&(e=l[c]);c++)e.info&&e.info.lastRun===s||n&&!De(a,e.trigger)||(e.info&&(e.info.lastRun=s),e.fn(t,a,r,i,e.info,n,A),o=!0)}return o}return!1}function Me(t,e,r,i,n,A,o,s){let a=!1,l=e[o?Qt(i):i];if(l)for(let e,c=0,d=l.length;c<d&&(e=l[c]);c++)e.info&&e.info.lastRun===r||o&&!De(i,e.trigger)||(e.info&&(e.info.lastRun=r),e.fn(t,i,n,A,e.info,o,s),a=!0);return a}function De(t,e){if(e){let r=e.name;return r==t||!(!e.structured||!Wt(r,t))||!(!e.wildcard||!Zt(r,t))}return!0}function Le(t,e,r,i,n){let A="string"==typeof n.method?t[n.method]:n.method,o=n.property;A?A.call(t,t.__data[o],i[o]):n.dynamicFn||console.warn("observer method `"+n.method+"` not defined")}function ze(t,e,r){let i=Qt(e);return i!==e&&(Be(t,Ae(i)+"-changed",r[e],e),!0)}function Be(t,e,r,i){let n={value:r,queueProperty:!0};i&&(n.path=i),qt(t).dispatchEvent(new CustomEvent(e,{detail:n}))}function Re(t,e,r,i,n,A){let o=(A?Qt(e):e)!=e?e:null,s=o?Kt(t,o):t.__data[e];o&&void 0===s&&(s=r[e]),Be(t,n.eventName,s,o)}function Fe(t,e,r,i,n){let A=t.__data[e];ft&&(A=ft(A,n.attrName,"attribute",t)),t._propertyToAttribute(e,n.attrName,A)}const He=(t,e,r)=>{let i=0,n=e.length-1,A=-1;for(;i<=n;){const o=i+n>>1,s=r.get(e[o].methodInfo)-r.get(t.methodInfo);if(s<0)i=o+1;else{if(!(s>0)){A=o;break}n=o-1}}A<0&&(A=n+1),e.splice(A,0,t)},Ve=(t,e,r,i,n)=>{const A=e[n?Qt(t):t];if(A)for(let e=0;e<A.length;e++){const o=A[e];o.info.lastRun===Pe||n&&!De(t,o.trigger)||(o.info.lastRun=Pe,He(o.info,r,i))}};function Ue(t,e,r,i,n){let A=Ge(t,e,r,0,n);if(A===Te)return!1;let o=n.methodInfo;return t.__dataHasAccessor&&t.__dataHasAccessor[o]?t._setPendingProperty(o,A,!0):(t[o]=A,!1)}function Ye(t,e,r,i,n,A,o){r.bindings=r.bindings||[];let s={kind:i,target:n,parts:A,literal:o,isCompound:1!==A.length};if(r.bindings.push(s),function(t){return Boolean(t.target)&&"attribute"!=t.kind&&"text"!=t.kind&&!t.isCompound&&"{"===t.parts[0].mode}(s)){let{event:t,negate:e}=s.parts[0];s.listenerEvent=t||Ae(n)+"-changed",s.listenerNegate=e}let a=e.nodeInfoList.length;for(let r=0;r<s.parts.length;r++){let i=s.parts[r];i.compoundIndex=r,qe(t,e,s,i,a)}}function qe(t,e,r,i,n){if(!i.literal)if("attribute"===r.kind&&"-"===r.target[0])console.warn("Cannot set attribute "+r.target+' because "-" is not a valid attribute starting character');else{let A=i.dependencies,o={index:n,binding:r,part:i,evaluator:t};for(let r=0;r<A.length;r++){let i=A[r];"string"==typeof i&&(i=er(i),i.wildcard=!0),t._addTemplatePropertyEffect(e,i.rootProperty,{fn:je,info:o,trigger:i})}}}function je(t,e,r,i,n,A,o){let s=o[n.index],a=n.binding,l=n.part;if(A&&l.source&&e.length>l.source.length&&"property"==a.kind&&!a.isCompound&&s.__isPropertyEffectsClient&&s.__dataHasAccessor&&s.__dataHasAccessor[a.target]){let i=r[e];e=Gt(l.source,a.target,e),s._setPendingPropertyOrPath(e,i,!1,!0)&&t._enqueueClient(s)}else{let o=n.evaluator._evaluateBinding(t,l,e,r,i,A);o!==Te&&function(t,e,r,i,n){if(n=function(t,e,r,i){if(r.isCompound){let n=t.__dataCompoundStorage[r.target];n[i.compoundIndex]=e,e=n.join("")}return"attribute"!==r.kind&&("textContent"!==r.target&&("value"!==r.target||"input"!==t.localName&&"textarea"!==t.localName)||(e=null==e?"":e)),e}(e,n,r,i),ft&&(n=ft(n,r.target,r.kind,e)),"attribute"==r.kind)t._valueToNodeAttribute(e,n,r.target);else{let i=r.target;e.__isPropertyEffectsClient&&e.__dataHasAccessor&&e.__dataHasAccessor[i]?e[Oe.READ_ONLY]&&e[Oe.READ_ONLY][i]||e._setPendingProperty(i,n)&&t._enqueueClient(e):t._setUnmanagedPropertyToNode(e,i,n)}}(t,s,a,l,o)}}function Qe(t,e){if(e.isCompound){let r=t.__dataCompoundStorage||(t.__dataCompoundStorage={}),i=e.parts,n=new Array(i.length);for(let t=0;t<i.length;t++)n[t]=i[t].literal;let A=e.target;r[A]=n,e.literal&&"property"==e.kind&&("className"===A&&(t=qt(t)),t[A]=e.literal)}}function We(t,e,r){if(r.listenerEvent){let i=r.parts[0];t.addEventListener(r.listenerEvent,(function(t){!function(t,e,r,i,n){let A,o=t.detail,s=o&&o.path;s?(i=Gt(r,i,s),A=o&&o.value):A=t.currentTarget[r],A=n?!A:A,e[Oe.READ_ONLY]&&e[Oe.READ_ONLY][i]||!e._setPendingPropertyOrPath(i,A,!0,Boolean(s))||o&&o.queueProperty||e._invalidateProperties()}(t,e,r.target,i.source,i.negate)}))}}function Ze(t,e,r,i,n,A){A=e.static||A&&("object"!=typeof A||A[e.methodName]);let o={methodName:e.methodName,args:e.args,methodInfo:n,dynamicFn:A};for(let n,A=0;A<e.args.length&&(n=e.args[A]);A++)n.literal||t._addPropertyEffect(n.rootProperty,r,{fn:i,info:o,trigger:n});return A&&t._addPropertyEffect(e.methodName,r,{fn:i,info:o}),o}function Ge(t,e,r,i,n){let A=t._methodHost||t,o=A[n.methodName];if(o){let i=t._marshalArgs(n.args,e,r);return i===Te?Te:o.apply(A,i)}n.dynamicFn||console.warn("method `"+n.methodName+"` not defined")}const Je=[],Xe=new RegExp("(\\[\\[|{{)\\s*(?:(!)\\s*)?((?:[a-zA-Z_$][\\w.:$\\-*]*)\\s*(?:\\(\\s*(?:(?:(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*)(?:,\\s*(?:((?:[a-zA-Z_$][\\w.:$\\-*]*)|(?:[-+]?[0-9]*\\.?[0-9]+(?:[eE][-+]?[0-9]+)?)|(?:(?:'(?:[^'\\\\]|\\\\.)*')|(?:\"(?:[^\"\\\\]|\\\\.)*\")))\\s*))*)?)\\)\\s*)?)(?:]]|}})","g");function Ke(t){let e="";for(let r=0;r<t.length;r++)e+=t[r].literal||"";return e}function tr(t){let e=t.match(/([^\s]+?)\(([\s\S]*)\)/);if(e){let t={methodName:e[1],static:!0,args:Je};return e[2].trim()?function(t,e){return e.args=t.map((function(t){let r=er(t);return r.literal||(e.static=!1),r}),this),e}(e[2].replace(/\\,/g,",").split(","),t):t}return null}function er(t){let e=t.trim().replace(/,/g,",").replace(/\\(.)/g,"$1"),r={name:e,value:"",literal:!1},i=e[0];switch("-"===i&&(i=e[1]),i>="0"&&i<="9"&&(i="#"),i){case"'":case'"':r.value=e.slice(1,-1),r.literal=!0;break;case"#":r.value=Number(e),r.literal=!0}return r.literal||(r.rootProperty=Qt(e),r.structured=jt(e),r.structured&&(r.wildcard=".*"==e.slice(-2),r.wildcard&&(r.name=e.slice(0,-2)))),r}function rr(t,e,r){let i=Kt(t,r);return void 0===i&&(i=e[r]),i}function ir(t,e,r,i){const n={indexSplices:i};wt&&!t._overrideLegacyUndefined&&(e.splices=n),t.notifyPath(r+".splices",n),t.notifyPath(r+".length",e.length),wt&&!t._overrideLegacyUndefined&&(n.indexSplices=[])}function nr(t,e,r,i,n,A){ir(t,e,r,[{index:i,addedCount:n,removed:A,object:e,type:"splice"}])}const Ar=Nt((t=>{const e=Ee(ve(t));return class extends e{constructor(){super(),this.__isPropertyEffectsClient=!0,this.__dataClientsReady,this.__dataPendingClients,this.__dataToNotify,this.__dataLinkedPaths,this.__dataHasPaths,this.__dataCompoundStorage,this.__dataHost,this.__dataTemp,this.__dataClientsInitialized,this.__data,this.__dataPending,this.__dataOld,this.__computeEffects,this.__computeInfo,this.__reflectEffects,this.__notifyEffects,this.__propagateEffects,this.__observeEffects,this.__readOnly,this.__templateInfo,this._overrideLegacyUndefined}get PROPERTY_EFFECT_TYPES(){return Oe}_initializeProperties(){super._initializeProperties(),this._registerHost(),this.__dataClientsReady=!1,this.__dataPendingClients=null,this.__dataToNotify=null,this.__dataLinkedPaths=null,this.__dataHasPaths=!1,this.__dataCompoundStorage=this.__dataCompoundStorage||null,this.__dataHost=this.__dataHost||null,this.__dataTemp={},this.__dataClientsInitialized=!1}_registerHost(){if(or.length){let t=or[or.length-1];t._enqueueClient(this),this.__dataHost=t}}_initializeProtoProperties(t){this.__data=Object.create(t),this.__dataPending=Object.create(t),this.__dataOld={}}_initializeInstanceProperties(t){let e=this[Oe.READ_ONLY];for(let r in t)e&&e[r]||(this.__dataPending=this.__dataPending||{},this.__dataOld=this.__dataOld||{},this.__data[r]=this.__dataPending[r]=t[r])}_addPropertyEffect(t,e,r){this._createPropertyAccessor(t,e==Oe.READ_ONLY);let i=$e(this,e,!0)[t];i||(i=this[e][t]=[]),i.push(r)}_removePropertyEffect(t,e,r){let i=$e(this,e,!0)[t],n=i.indexOf(r);n>=0&&i.splice(n,1)}_hasPropertyEffect(t,e){let r=this[e];return Boolean(r&&r[t])}_hasReadOnlyEffect(t){return this._hasPropertyEffect(t,Oe.READ_ONLY)}_hasNotifyEffect(t){return this._hasPropertyEffect(t,Oe.NOTIFY)}_hasReflectEffect(t){return this._hasPropertyEffect(t,Oe.REFLECT)}_hasComputedEffect(t){return this._hasPropertyEffect(t,Oe.COMPUTE)}_setPendingPropertyOrPath(t,e,r,i){if(i||Qt(Array.isArray(t)?t[0]:t)!==t){if(!i){let r=Kt(this,t);if(!(t=te(this,t,e))||!super._shouldPropertyChange(t,e,r))return!1}if(this.__dataHasPaths=!0,this._setPendingProperty(t,e,r))return function(t,e,r){let i=t.__dataLinkedPaths;if(i){let n;for(let A in i){let o=i[A];Zt(A,e)?(n=Gt(A,o,e),t._setPendingPropertyOrPath(n,r,!0,!0)):Zt(o,e)&&(n=Gt(o,A,e),t._setPendingPropertyOrPath(n,r,!0,!0))}}}(this,t,e),!0}else{if(this.__dataHasAccessor&&this.__dataHasAccessor[t])return this._setPendingProperty(t,e,r);this[t]=e}return!1}_setUnmanagedPropertyToNode(t,e,r){r===t[e]&&"object"!=typeof r||("className"===e&&(t=qt(t)),t[e]=r)}_setPendingProperty(t,e,r){let i=this.__dataHasPaths&&jt(t),n=i?this.__dataTemp:this.__data;return!!this._shouldPropertyChange(t,e,n[t])&&(this.__dataPending||(this.__dataPending={},this.__dataOld={}),t in this.__dataOld||(this.__dataOld[t]=this.__data[t]),i?this.__dataTemp[t]=e:this.__data[t]=e,this.__dataPending[t]=e,(i||this[Oe.NOTIFY]&&this[Oe.NOTIFY][t])&&(this.__dataToNotify=this.__dataToNotify||{},this.__dataToNotify[t]=r),!0)}_setProperty(t,e){this._setPendingProperty(t,e,!0)&&this._invalidateProperties()}_invalidateProperties(){this.__dataReady&&this._flushProperties()}_enqueueClient(t){this.__dataPendingClients=this.__dataPendingClients||[],t!==this&&this.__dataPendingClients.push(t)}_flushClients(){this.__dataClientsReady?this.__enableOrFlushClients():(this.__dataClientsReady=!0,this._readyClients(),this.__dataReady=!0)}__enableOrFlushClients(){let t=this.__dataPendingClients;if(t){this.__dataPendingClients=null;for(let e=0;e<t.length;e++){let r=t[e];r.__dataEnabled?r.__dataPending&&r._flushProperties():r._enableProperties()}}}_readyClients(){this.__enableOrFlushClients()}setProperties(t,e){for(let r in t)!e&&this[Oe.READ_ONLY]&&this[Oe.READ_ONLY][r]||this._setPendingPropertyOrPath(r,t[r],!0);this._invalidateProperties()}ready(){this._flushProperties(),this.__dataClientsReady||this._flushClients(),this.__dataPending&&this._flushProperties()}_propertiesChanged(t,e,r){let i,n=this.__dataHasPaths;this.__dataHasPaths=!1,function(t,e,r,i){let n=t[Oe.COMPUTE];if(n)if(xt){Pe++;const A=function(t){let e=t.constructor.__orderedComputedDeps;if(!e){e=new Map;const r=t[Oe.COMPUTE];let i,{counts:n,ready:A,total:o}=function(t){const e=t.__computeInfo,r={},i=t[Oe.COMPUTE],n=[];let A=0;for(let t in e){const i=e[t];A+=r[t]=i.args.filter((t=>!t.literal)).length+(i.dynamicFn?1:0)}for(let t in i)e[t]||n.push(t);return{counts:r,ready:n,total:A}}(t);for(;i=A.shift();){e.set(i,e.size);const t=r[i];t&&t.forEach((t=>{const e=t.info.methodInfo;--o,0==--n[e]&&A.push(e)}))}if(0!==o){const e=t;console.warn(`Computed graph for ${e.localName} incomplete; circular?`)}t.constructor.__orderedComputedDeps=e}return e}(t),o=[];for(let t in e)Ve(t,n,o,A,i);let s;for(;s=o.shift();)Ue(t,"",e,0,s)&&Ve(s.methodInfo,n,o,A,i);Object.assign(r,t.__dataOld),Object.assign(e,t.__dataPending),t.__dataPending=null}else{let A=e;for(;Ie(t,n,A,r,i);)Object.assign(r,t.__dataOld),Object.assign(e,t.__dataPending),A=t.__dataPending,t.__dataPending=null}}(this,e,r,n),i=this.__dataToNotify,this.__dataToNotify=null,this._propagatePropertyChanges(e,r,n),this._flushClients(),Ie(this,this[Oe.REFLECT],e,r,n),Ie(this,this[Oe.OBSERVE],e,r,n),i&&function(t,e,r,i,n){let A,o,s=t[Oe.NOTIFY],a=Pe++;for(let o in e)e[o]&&(s&&Me(t,s,a,o,r,i,n)||n&&ze(t,o,r))&&(A=!0);A&&(o=t.__dataHost)&&o._invalidateProperties&&o._invalidateProperties()}(this,i,e,r,n),1==this.__dataCounter&&(this.__dataTemp={})}_propagatePropertyChanges(t,e,r){this[Oe.PROPAGATE]&&Ie(this,this[Oe.PROPAGATE],t,e,r),this.__templateInfo&&this._runEffectsForTemplate(this.__templateInfo,t,e,r)}_runEffectsForTemplate(t,e,r,i){const n=(e,i)=>{Ie(this,t.propertyEffects,e,r,i,t.nodeList);for(let n=t.firstChild;n;n=n.nextSibling)this._runEffectsForTemplate(n,e,r,i)};t.runEffects?t.runEffects(n,e,i):n(e,i)}linkPaths(t,e){t=Jt(t),e=Jt(e),this.__dataLinkedPaths=this.__dataLinkedPaths||{},this.__dataLinkedPaths[t]=e}unlinkPaths(t){t=Jt(t),this.__dataLinkedPaths&&delete this.__dataLinkedPaths[t]}notifySplices(t,e){let r={path:""};ir(this,Kt(this,t,r),r.path,e)}get(t,e){return Kt(e||this,t)}set(t,e,r){r?te(r,t,e):this[Oe.READ_ONLY]&&this[Oe.READ_ONLY][t]||this._setPendingPropertyOrPath(t,e,!0)&&this._invalidateProperties()}push(t,...e){let r={path:""},i=Kt(this,t,r),n=i.length,A=i.push(...e);return e.length&&nr(this,i,r.path,n,e.length,[]),A}pop(t){let e={path:""},r=Kt(this,t,e),i=Boolean(r.length),n=r.pop();return i&&nr(this,r,e.path,r.length,0,[n]),n}splice(t,e,r,...i){let n,A={path:""},o=Kt(this,t,A);return e<0?e=o.length-Math.floor(-e):e&&(e=Math.floor(e)),n=2===arguments.length?o.splice(e):o.splice(e,r,...i),(i.length||n.length)&&nr(this,o,A.path,e,i.length,n),n}shift(t){let e={path:""},r=Kt(this,t,e),i=Boolean(r.length),n=r.shift();return i&&nr(this,r,e.path,0,0,[n]),n}unshift(t,...e){let r={path:""},i=Kt(this,t,r),n=i.unshift(...e);return e.length&&nr(this,i,r.path,0,e.length,[]),n}notifyPath(t,e){let r;if(1==arguments.length){let i={path:""};e=Kt(this,t,i),r=i.path}else r=Array.isArray(t)?Jt(t):t;this._setPendingPropertyOrPath(r,e,!0,!0)&&this._invalidateProperties()}_createReadOnlyProperty(t,e){var r;this._addPropertyEffect(t,Oe.READ_ONLY),e&&(this["_set"+(r=t,r[0].toUpperCase()+r.substring(1))]=function(e){this._setProperty(t,e)})}_createPropertyObserver(t,e,r){let i={property:t,method:e,dynamicFn:Boolean(r)};this._addPropertyEffect(t,Oe.OBSERVE,{fn:Le,info:i,trigger:{name:t}}),r&&this._addPropertyEffect(e,Oe.OBSERVE,{fn:Le,info:i,trigger:{name:e}})}_createMethodObserver(t,e){let r=tr(t);if(!r)throw new Error("Malformed observer expression '"+t+"'");Ze(this,r,Oe.OBSERVE,Ge,null,e)}_createNotifyingProperty(t){this._addPropertyEffect(t,Oe.NOTIFY,{fn:Re,info:{eventName:Ae(t)+"-changed",property:t}})}_createReflectedProperty(t){let e=this.constructor.attributeNameForProperty(t);"-"===e[0]?console.warn("Property "+t+" cannot be reflected to attribute "+e+' because "-" is not a valid starting attribute name. Use a lowercase first letter for the property instead.'):this._addPropertyEffect(t,Oe.REFLECT,{fn:Fe,info:{attrName:e}})}_createComputedProperty(t,e,r){let i=tr(e);if(!i)throw new Error("Malformed computed expression '"+e+"'");const n=Ze(this,i,Oe.COMPUTE,Ue,t,r);$e(this,"__computeInfo")[t]=n}_marshalArgs(t,e,r){const i=this.__data,n=[];for(let A=0,o=t.length;A<o;A++){let{name:o,structured:s,wildcard:a,value:l,literal:c}=t[A];if(!c)if(a){const t=Zt(o,e),n=rr(i,r,t?e:o);l={path:t?e:o,value:n,base:t?Kt(i,o):n}}else l=s?rr(i,r,o):i[o];if(wt&&!this._overrideLegacyUndefined&&void 0===l&&t.length>1)return Te;n[A]=l}return n}static addPropertyEffect(t,e,r){this.prototype._addPropertyEffect(t,e,r)}static createPropertyObserver(t,e,r){this.prototype._createPropertyObserver(t,e,r)}static createMethodObserver(t,e){this.prototype._createMethodObserver(t,e)}static createNotifyingProperty(t){this.prototype._createNotifyingProperty(t)}static createReadOnlyProperty(t,e){this.prototype._createReadOnlyProperty(t,e)}static createReflectedProperty(t){this.prototype._createReflectedProperty(t)}static createComputedProperty(t,e,r){this.prototype._createComputedProperty(t,e,r)}static bindTemplate(t){return this.prototype._bindTemplate(t)}_bindTemplate(t,e){let r=this.constructor._parseTemplate(t),i=this.__preBoundTemplateInfo==r;if(!i)for(let t in r.propertyEffects)this._createPropertyAccessor(t);if(e)if(r=Object.create(r),r.wasPreBound=i,this.__templateInfo){const e=t._parentTemplateInfo||this.__templateInfo,i=e.lastChild;r.parent=e,e.lastChild=r,r.previousSibling=i,i?i.nextSibling=r:e.firstChild=r}else this.__templateInfo=r;else this.__preBoundTemplateInfo=r;return r}static _addTemplatePropertyEffect(t,e,r){(t.hostProps=t.hostProps||{})[e]=!0;let i=t.propertyEffects=t.propertyEffects||{};(i[e]=i[e]||[]).push(r)}_stampTemplate(t,e){e=e||this._bindTemplate(t,!0),or.push(this);let r=super._stampTemplate(t,e);if(or.pop(),e.nodeList=r.nodeList,!e.wasPreBound){let t=e.childNodes=[];for(let e=r.firstChild;e;e=e.nextSibling)t.push(e)}return r.templateInfo=e,function(t,e){let{nodeList:r,nodeInfoList:i}=e;if(i.length)for(let e=0;e<i.length;e++){let n=i[e],A=r[e],o=n.bindings;if(o)for(let e=0;e<o.length;e++){let r=o[e];Qe(A,r),We(A,t,r)}A.__dataHost=t}}(this,e),this.__dataClientsReady&&(this._runEffectsForTemplate(e,this.__data,null,!1),this._flushClients()),r}_removeBoundDom(t){const e=t.templateInfo,{previousSibling:r,nextSibling:i,parent:n}=e;r?r.nextSibling=i:n&&(n.firstChild=i),i?i.previousSibling=r:n&&(n.lastChild=r),e.nextSibling=e.previousSibling=null;let A=e.childNodes;for(let t=0;t<A.length;t++){let e=A[t];qt(qt(e).parentNode).removeChild(e)}}static _parseTemplateNode(t,r,i){let n=e._parseTemplateNode.call(this,t,r,i);if(t.nodeType===Node.TEXT_NODE){let e=this._parseBindings(t.textContent,r);e&&(t.textContent=Ke(e)||" ",Ye(this,r,i,"text","textContent",e),n=!0)}return n}static _parseTemplateNodeAttribute(t,r,i,n,A){let o=this._parseBindings(A,r);if(o){let e=n,A="property";Ne.test(n)?A="attribute":"$"==n[n.length-1]&&(n=n.slice(0,-1),A="attribute");let s=Ke(o);return s&&"attribute"==A&&("class"==n&&t.hasAttribute("class")&&(s+=" "+t.getAttribute(n)),t.setAttribute(n,s)),"attribute"==A&&"disable-upgrade$"==e&&t.setAttribute(n,""),"input"===t.localName&&"value"===e&&t.setAttribute(e,""),t.removeAttribute(e),"property"===A&&(n=ne(n)),Ye(this,r,i,A,n,o,s),!0}return e._parseTemplateNodeAttribute.call(this,t,r,i,n,A)}static _parseTemplateNestedTemplate(t,r,i){let n=e._parseTemplateNestedTemplate.call(this,t,r,i);const A=t.parentNode,o=i.templateInfo,s="dom-if"===A.localName,a="dom-repeat"===A.localName;kt&&(s||a)&&(A.removeChild(t),(i=i.parentInfo).templateInfo=o,i.noted=!0,n=!1);let l=o.hostProps;if(St&&s)l&&(r.hostProps=Object.assign(r.hostProps||{},l),kt||(i.parentInfo.noted=!0));else{let t="{";for(let e in l)Ye(this,r,i,"property","_host_"+e,[{mode:t,source:e,dependencies:[e],hostProp:!0}])}return n}static _parseBindings(t,e){let r,i=[],n=0;for(;null!==(r=Xe.exec(t));){r.index>n&&i.push({literal:t.slice(n,r.index)});let A=r[1][0],o=Boolean(r[2]),s=r[3].trim(),a=!1,l="",c=-1;"{"==A&&(c=s.indexOf("::"))>0&&(l=s.substring(c+2),s=s.substring(0,c),a=!0);let d=tr(s),u=[];if(d){let{args:t,methodName:r}=d;for(let e=0;e<t.length;e++){let r=t[e];r.literal||u.push(r)}let i=e.dynamicFns;(i&&i[r]||d.static)&&(u.push(r),d.dynamicFn=!0)}else u.push(s);i.push({source:s,mode:A,negate:o,customEvent:a,signature:d,dependencies:u,event:l}),n=Xe.lastIndex}if(n&&n<t.length){let e=t.substring(n);e&&i.push({literal:e})}return i.length?i:null}static _evaluateBinding(t,e,r,i,n,A){let o;return o=e.signature?Ge(t,r,i,0,e.signature):r!=e.source?Kt(t,e.source):A&&jt(r)?Kt(t,r):t.__data[r],e.negate&&(o=!o),o}}})),or=[],sr=[];function ar(t){sr.push(t)}const lr=Nt((t=>{const e=fe(t);function r(t){const e=Object.getPrototypeOf(t);return e.prototype instanceof n?e:null}function i(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__ownProperties",t))){let e=null;if(t.hasOwnProperty(JSCompiler_renameProperty("properties",t))){const r=t.properties;r&&(e=function(t){const e={};for(let r in t){const i=t[r];e[r]="function"==typeof i?{type:i}:i}return e}(r))}t.__ownProperties=e}return t.__ownProperties}class n extends e{static get observedAttributes(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))){ar(this.prototype);const t=this._properties;this.__observedAttributes=t?Object.keys(t).map((t=>this.prototype._addPropertyToAttributeMap(t))):[]}return this.__observedAttributes}static finalize(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__finalized",this))){const t=r(this);t&&t.finalize(),this.__finalized=!0,this._finalizeClass()}}static _finalizeClass(){const t=i(this);t&&this.createProperties(t)}static get _properties(){if(!this.hasOwnProperty(JSCompiler_renameProperty("__properties",this))){const t=r(this);this.__properties=Object.assign({},t&&t._properties,i(this))}return this.__properties}static typeForProperty(t){const e=this._properties[t];return e&&e.type}_initializeProperties(){this.constructor.finalize(),super._initializeProperties()}connectedCallback(){super.connectedCallback&&super.connectedCallback(),this._enableProperties()}disconnectedCallback(){super.disconnectedCallback&&super.disconnectedCallback()}}return n})),cr=window.ShadyCSS&&window.ShadyCSS.cssBuild,dr=Nt((t=>{const e=lr(Ar(t));function r(t,e,r,i){r.computed&&(r.readOnly=!0),r.computed&&(t._hasReadOnlyEffect(e)?console.warn(`Cannot redefine computed property '${e}'.`):t._createComputedProperty(e,r.computed,i)),r.readOnly&&!t._hasReadOnlyEffect(e)?t._createReadOnlyProperty(e,!r.computed):!1===r.readOnly&&t._hasReadOnlyEffect(e)&&console.warn(`Cannot make readOnly property '${e}' non-readOnly.`),r.reflectToAttribute&&!t._hasReflectEffect(e)?t._createReflectedProperty(e):!1===r.reflectToAttribute&&t._hasReflectEffect(e)&&console.warn(`Cannot make reflected property '${e}' non-reflected.`),r.notify&&!t._hasNotifyEffect(e)?t._createNotifyingProperty(e):!1===r.notify&&t._hasNotifyEffect(e)&&console.warn(`Cannot make notify property '${e}' non-notify.`),r.observer&&t._createPropertyObserver(e,r.observer,i[r.observer]),t._addPropertyToAttributeMap(e)}return class extends e{static get polymerElementVersion(){return"3.4.1"}static _finalizeClass(){e._finalizeClass.call(this);const t=((r=this).hasOwnProperty(JSCompiler_renameProperty("__ownObservers",r))||(r.__ownObservers=r.hasOwnProperty(JSCompiler_renameProperty("observers",r))?r.observers:null),r.__ownObservers);var r;t&&this.createObservers(t,this._properties),this._prepareTemplate()}static _prepareTemplate(){let t=this.template;t&&("string"==typeof t?(console.error("template getter must return HTMLTemplateElement"),t=null):yt||(t=t.cloneNode(!0))),this.prototype._template=t}static createProperties(t){for(let e in t)r(this.prototype,e,t[e],t)}static createObservers(t,e){const r=this.prototype;for(let i=0;i<t.length;i++)r._createMethodObserver(t[i],e)}static get template(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_template",this))){const t=this.prototype.hasOwnProperty(JSCompiler_renameProperty("_template",this.prototype))?this.prototype._template:void 0;this._template=void 0!==t?t:this.hasOwnProperty(JSCompiler_renameProperty("is",this))&&function(t){let e=null;if(t&&(!gt||vt)&&(e=Lt.import(t,"template"),gt&&!e))throw new Error(`strictTemplatePolicy: expecting dom-module or null template for ${t}`);return e}(this.is)||Object.getPrototypeOf(this.prototype).constructor.template}return this._template}static set template(t){this._template=t}static get importPath(){if(!this.hasOwnProperty(JSCompiler_renameProperty("_importPath",this))){const t=this.importMeta;if(t)this._importPath=dt(t.url);else{const t=Lt.import(this.is);this._importPath=t&&t.assetpath||Object.getPrototypeOf(this.prototype).constructor.importPath}}return this._importPath}constructor(){super(),this._template,this._importPath,this.rootPath,this.importPath,this.root,this.$}_initializeProperties(){this.constructor.finalize(),this.constructor._finalizeTemplate(this.localName),super._initializeProperties(),this.rootPath=pt,this.importPath=this.constructor.importPath;let t=function(t){if(!t.hasOwnProperty(JSCompiler_renameProperty("__propertyDefaults",t))){t.__propertyDefaults=null;let e=t._properties;for(let r in e){let i=e[r];"value"in i&&(t.__propertyDefaults=t.__propertyDefaults||{},t.__propertyDefaults[r]=i)}}return t.__propertyDefaults}(this.constructor);if(t)for(let e in t){let r=t[e];if(this._canApplyPropertyDefault(e)){let t="function"==typeof r.value?r.value.call(this):r.value;this._hasAccessor(e)?this._setPendingProperty(e,t,!0):this[e]=t}}}_canApplyPropertyDefault(t){return!this.hasOwnProperty(t)}static _processStyleText(t,e){return ct(t,e)}static _finalizeTemplate(t){const e=this.prototype._template;if(e&&!e.__polymerFinalized){e.__polymerFinalized=!0;const r=this.importPath;(function(t,e,r,i){if(!cr){const n=e.content.querySelectorAll("style"),A=Vt(e),o=function(t){let e=Bt(t);return e?Ut(e):[]}(r),s=e.content.firstElementChild;for(let r=0;r<o.length;r++){let n=o[r];n.textContent=t._processStyleText(n.textContent,i),e.content.insertBefore(n,s)}let a=0;for(let e=0;e<A.length;e++){let r=A[e],o=n[a];o!==r?(r=r.cloneNode(!0),o.parentNode.insertBefore(r,o)):a++,r.textContent=t._processStyleText(r.textContent,i)}}if(window.ShadyCSS&&window.ShadyCSS.prepareTemplate(e,r),Pt&&cr&&ht){const r=e.content.querySelectorAll("style");if(r){let e="";Array.from(r).forEach((t=>{e+=t.textContent,t.parentNode.removeChild(t)})),t._styleSheet=new CSSStyleSheet,t._styleSheet.replaceSync(e)}}})(this,e,t,r?lt(r):""),this.prototype._bindTemplate(e)}}connectedCallback(){window.ShadyCSS&&this._template&&window.ShadyCSS.styleElement(this),super.connectedCallback()}ready(){this._template&&(this.root=this._stampTemplate(this._template),this.$=this.root.$),super.ready()}_readyClients(){this._template&&(this.root=this._attachDom(this.root)),super._readyClients()}_attachDom(t){const e=qt(this);if(e.attachShadow)return t?(e.shadowRoot||(e.attachShadow({mode:"open",shadyUpgradeFragment:t}),e.shadowRoot.appendChild(t),this.constructor._styleSheet&&(e.shadowRoot.adoptedStyleSheets=[this.constructor._styleSheet])),_t&&window.ShadyDOM&&window.ShadyDOM.flushInitial(e.shadowRoot),e.shadowRoot):null;throw new Error("ShadowDOM not available. PolymerElement can create dom as children instead of in ShadowDOM by setting `this.root = this;` before `ready`.")}updateStyles(t){window.ShadyCSS&&window.ShadyCSS.styleSubtree(this,t)}resolveUrl(t,e){return!e&&this.importPath&&(e=lt(this.importPath)),lt(t,e)}static _parseTemplateContent(t,r,i){return r.dynamicFns=r.dynamicFns||this._properties,e._parseTemplateContent.call(this,t,r,i)}static _addTemplatePropertyEffect(t,r,i){return!bt||r in this._properties||i.info.part.signature&&i.info.part.signature.static||i.info.part.hostProp||t.nestedTemplate||console.warn(`Property '${r}' used in template but not declared in 'properties'; attribute will not be observed.`),e._addTemplatePropertyEffect.call(this,t,r,i)}}}));class ur{constructor(){this._asyncModule=null,this._callback=null,this._timer=null}setConfig(t,e){this._asyncModule=t,this._callback=e,this._timer=this._asyncModule.run((()=>{this._timer=null,hr.delete(this),this._callback()}))}cancel(){this.isActive()&&(this._cancelAsync(),hr.delete(this))}_cancelAsync(){this.isActive()&&(this._asyncModule.cancel(this._timer),this._timer=null)}flush(){this.isActive()&&(this.cancel(),this._callback())}isActive(){return null!=this._timer}static debounce(t,e,r){return t instanceof ur?t._cancelAsync():t=new ur,t.setConfig(e,r),t}}let hr=new Set;const pr=function(t){hr.add(t)},fr=function(){const t=Boolean(hr.size);return hr.forEach((t=>{try{t.flush()}catch(t){setTimeout((()=>{throw t}))}})),t};let mr="string"==typeof document.head.style.touchAction,gr="__polymerGestures",vr="__polymerGesturesHandled",yr="__polymerGesturesTouchAction",br=["mousedown","mousemove","mouseup","click"],_r=[0,1,4,2],wr=function(){try{return 1===new MouseEvent("test",{buttons:1}).buttons}catch(t){return!1}}();function xr(t){return br.indexOf(t)>-1}let kr=!1;function Sr(t){if(!xr(t)&&"touchend"!==t)return mr&&kr&&mt?{passive:!0}:void 0}!function(){try{let t=Object.defineProperty({},"passive",{get(){kr=!0}});window.addEventListener("test",null,t),window.removeEventListener("test",null,t)}catch(t){}}();let Cr=navigator.userAgent.match(/iP(?:[oa]d|hone)|Android/);const Er=[],Pr={button:!0,input:!0,keygen:!0,meter:!0,output:!0,textarea:!0,progress:!0,select:!0},Tr={button:!0,command:!0,fieldset:!0,input:!0,keygen:!0,optgroup:!0,option:!0,select:!0,textarea:!0};function Or(t){let e=Array.prototype.slice.call(t.labels||[]);if(!e.length){e=[];let r=t.getRootNode();if(t.id){let i=r.querySelectorAll(`label[for = ${t.id}]`);for(let t=0;t<i.length;t++)e.push(i[t])}}return e}let Nr=function(t){let e=t.sourceCapabilities;var r;if((!e||e.firesTouchEvents)&&(t[vr]={skip:!0},"click"===t.type)){let e=!1,i=zr(t);for(let t=0;t<i.length;t++){if(i[t].nodeType===Node.ELEMENT_NODE)if("label"===i[t].localName)Er.push(i[t]);else if(r=i[t],Pr[r.localName]){let r=Or(i[t]);for(let t=0;t<r.length;t++)e=e||Er.indexOf(r[t])>-1}if(i[t]===Mr.mouse.target)return}if(e)return;t.preventDefault(),t.stopPropagation()}};function $r(t){let e=Cr?["click"]:br;for(let r,i=0;i<e.length;i++)r=e[i],t?(Er.length=0,document.addEventListener(r,Nr,!0)):document.removeEventListener(r,Nr,!0)}function Ir(t){let e=t.type;if(!xr(e))return!1;if("mousemove"===e){let e=void 0===t.buttons?1:t.buttons;return t instanceof window.MouseEvent&&!wr&&(e=_r[t.which]||0),Boolean(1&e)}return 0===(void 0===t.button?0:t.button)}let Mr={mouse:{target:null,mouseIgnoreJob:null},touch:{x:0,y:0,id:-1,scrollDecided:!1}};function Dr(t,e,r){t.movefn=e,t.upfn=r,document.addEventListener("mousemove",e),document.addEventListener("mouseup",r)}function Lr(t){document.removeEventListener("mousemove",t.movefn),document.removeEventListener("mouseup",t.upfn),t.movefn=null,t.upfn=null}document.addEventListener("touchend",(function(t){Mr.mouse.mouseIgnoreJob||$r(!0),Mr.mouse.target=zr(t)[0],Mr.mouse.mouseIgnoreJob=ur.debounce(Mr.mouse.mouseIgnoreJob,ue.after(2500),(function(){$r(),Mr.mouse.target=null,Mr.mouse.mouseIgnoreJob=null}))}),!!kr&&{passive:!0});const zr=window.ShadyDOM&&window.ShadyDOM.noPatch?window.ShadyDOM.composedPath:t=>t.composedPath&&t.composedPath()||[],Br={},Rr=[];function Fr(t){const e=zr(t);return e.length>0?e[0]:t.target}function Hr(t){let e,r=t.type,i=t.currentTarget[gr];if(!i)return;let n=i[r];if(n){if(!t[vr]&&(t[vr]={},"touch"===r.slice(0,5))){let e=t.changedTouches[0];if("touchstart"===r&&1===t.touches.length&&(Mr.touch.id=e.identifier),Mr.touch.id!==e.identifier)return;mr||"touchstart"!==r&&"touchmove"!==r||function(t){let e=t.changedTouches[0],r=t.type;if("touchstart"===r)Mr.touch.x=e.clientX,Mr.touch.y=e.clientY,Mr.touch.scrollDecided=!1;else if("touchmove"===r){if(Mr.touch.scrollDecided)return;Mr.touch.scrollDecided=!0;let r=function(t){let e="auto",r=zr(t);for(let t,i=0;i<r.length;i++)if(t=r[i],t[yr]){e=t[yr];break}return e}(t),i=!1,n=Math.abs(Mr.touch.x-e.clientX),A=Math.abs(Mr.touch.y-e.clientY);t.cancelable&&("none"===r?i=!0:"pan-x"===r?i=A>n:"pan-y"===r&&(i=n>A)),i?t.preventDefault():qr("track")}}(t)}if(e=t[vr],!e.skip){for(let r,i=0;i<Rr.length;i++)r=Rr[i],n[r.name]&&!e[r.name]&&r.flow&&r.flow.start.indexOf(t.type)>-1&&r.reset&&r.reset();for(let i,A=0;A<Rr.length;A++)i=Rr[A],n[i.name]&&!e[i.name]&&(e[i.name]=!0,i[r](t))}}}function Vr(t){Rr.push(t);for(let e=0;e<t.emits.length;e++)Br[t.emits[e]]=t}function Ur(t,e){mr&&t instanceof HTMLElement&&he.run((()=>{t.style.touchAction=e})),t[yr]=e}function Yr(t,e,r){let i=new Event(e,{bubbles:!0,cancelable:!0,composed:!0});if(i.detail=r,qt(t).dispatchEvent(i),i.defaultPrevented){let t=r.preventer||r.sourceEvent;t&&t.preventDefault&&t.preventDefault()}}function qr(t){let e=function(t){for(let e,r=0;r<Rr.length;r++){e=Rr[r];for(let r,i=0;i<e.emits.length;i++)if(r=e.emits[i],r===t)return e}return null}(t);e.info&&(e.info.prevent=!0)}function jr(t,e,r,i){e&&Yr(e,t,{x:r.clientX,y:r.clientY,sourceEvent:r,preventer:i,prevent:function(t){return qr(t)}})}function Qr(t,e,r){if(t.prevent)return!1;if(t.started)return!0;let i=Math.abs(t.x-e),n=Math.abs(t.y-r);return i>=5||n>=5}function Wr(t,e,r){if(!e)return;let i,n=t.moves[t.moves.length-2],A=t.moves[t.moves.length-1],o=A.x-t.x,s=A.y-t.y,a=0;n&&(i=A.x-n.x,a=A.y-n.y),Yr(e,"track",{state:t.state,x:r.clientX,y:r.clientY,dx:o,dy:s,ddx:i,ddy:a,sourceEvent:r,hover:function(){return function(t,e){let r=document.elementFromPoint(t,e),i=r;for(;i&&i.shadowRoot&&!window.ShadyDOM;){let n=i;if(i=i.shadowRoot.elementFromPoint(t,e),n===i)break;i&&(r=i)}return r}(r.clientX,r.clientY)}})}function Zr(t,e,r){let i=Math.abs(e.clientX-t.x),n=Math.abs(e.clientY-t.y),A=Fr(r||e);!A||Tr[A.localName]&&A.hasAttribute("disabled")||(isNaN(i)||isNaN(n)||i<=25&&n<=25||function(t){if("click"===t.type){if(0===t.detail)return!0;let e=Fr(t);if(!e.nodeType||e.nodeType!==Node.ELEMENT_NODE)return!0;let r=e.getBoundingClientRect(),i=t.pageX,n=t.pageY;return!(i>=r.left&&i<=r.right&&n>=r.top&&n<=r.bottom)}return!1}(e))&&(t.prevent||Yr(A,"tap",{x:e.clientX,y:e.clientY,sourceEvent:e,preventer:r}))}Vr({name:"downup",deps:["mousedown","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["down","up"],info:{movefn:null,upfn:null},reset:function(){Lr(this.info)},mousedown:function(t){if(!Ir(t))return;let e=Fr(t),r=this;Dr(this.info,(function(t){Ir(t)||(jr("up",e,t),Lr(r.info))}),(function(t){Ir(t)&&jr("up",e,t),Lr(r.info)})),jr("down",e,t)},touchstart:function(t){jr("down",Fr(t),t.changedTouches[0],t)},touchend:function(t){jr("up",Fr(t),t.changedTouches[0],t)}}),Vr({name:"track",touchAction:"none",deps:["mousedown","touchstart","touchmove","touchend"],flow:{start:["mousedown","touchstart"],end:["mouseup","touchend"]},emits:["track"],info:{x:0,y:0,state:"start",started:!1,moves:[],addMove:function(t){this.moves.length>2&&this.moves.shift(),this.moves.push(t)},movefn:null,upfn:null,prevent:!1},reset:function(){this.info.state="start",this.info.started=!1,this.info.moves=[],this.info.x=0,this.info.y=0,this.info.prevent=!1,Lr(this.info)},mousedown:function(t){if(!Ir(t))return;let e=Fr(t),r=this,i=function(t){let i=t.clientX,n=t.clientY;Qr(r.info,i,n)&&(r.info.state=r.info.started?"mouseup"===t.type?"end":"track":"start","start"===r.info.state&&qr("tap"),r.info.addMove({x:i,y:n}),Ir(t)||(r.info.state="end",Lr(r.info)),e&&Wr(r.info,e,t),r.info.started=!0)};Dr(this.info,i,(function(t){r.info.started&&i(t),Lr(r.info)})),this.info.x=t.clientX,this.info.y=t.clientY},touchstart:function(t){let e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchmove:function(t){let e=Fr(t),r=t.changedTouches[0],i=r.clientX,n=r.clientY;Qr(this.info,i,n)&&("start"===this.info.state&&qr("tap"),this.info.addMove({x:i,y:n}),Wr(this.info,e,r),this.info.state="track",this.info.started=!0)},touchend:function(t){let e=Fr(t),r=t.changedTouches[0];this.info.started&&(this.info.state="end",this.info.addMove({x:r.clientX,y:r.clientY}),Wr(this.info,e,r))}}),Vr({name:"tap",deps:["mousedown","click","touchstart","touchend"],flow:{start:["mousedown","touchstart"],end:["click","touchend"]},emits:["tap"],info:{x:NaN,y:NaN,prevent:!1},reset:function(){this.info.x=NaN,this.info.y=NaN,this.info.prevent=!1},mousedown:function(t){Ir(t)&&(this.info.x=t.clientX,this.info.y=t.clientY)},click:function(t){Ir(t)&&Zr(this.info,t)},touchstart:function(t){const e=t.changedTouches[0];this.info.x=e.clientX,this.info.y=e.clientY},touchend:function(t){Zr(this.info,t.changedTouches[0],t)}});const Gr=Nt((t=>class extends t{_addEventListenerToNode(t,e,r){(function(t,e,r){return!!Br[e]&&(function(t,e,r){let i=Br[e],n=i.deps,A=i.name,o=t[gr];o||(t[gr]=o={});for(let e,r,i=0;i<n.length;i++)e=n[i],Cr&&xr(e)&&"click"!==e||(r=o[e],r||(o[e]=r={_count:0}),0===r._count&&t.addEventListener(e,Hr,Sr(e)),r[A]=(r[A]||0)+1,r._count=(r._count||0)+1);t.addEventListener(e,r),i.touchAction&&Ur(t,i.touchAction)}(t,e,r),!0)})(t,e,r)||super._addEventListenerToNode(t,e,r)}_removeEventListenerFromNode(t,e,r){(function(t,e,r){return!!Br[e]&&(function(t,e,r){let i=Br[e],n=i.deps,A=i.name,o=t[gr];if(o)for(let e,r,i=0;i<n.length;i++)e=n[i],r=o[e],r&&r[A]&&(r[A]=(r[A]||1)-1,r._count=(r._count||1)-1,0===r._count&&t.removeEventListener(e,Hr,Sr(e)));t.removeEventListener(e,r)}(t,e,r),!0)})(t,e,r)||super._removeEventListenerFromNode(t,e,r)}})),Jr=/:host\(:dir\((ltr|rtl)\)\)/g,Xr=/([\s\w-#\.\[\]\*]*):dir\((ltr|rtl)\)/g,Kr=/:dir\((?:ltr|rtl)\)/,ti=Boolean(window.ShadyDOM&&window.ShadyDOM.inUse),ei=[];let ri=null,ii="";function ni(){ii=document.documentElement.getAttribute("dir")}function Ai(t){t.__autoDirOptOut||t.setAttribute("dir",ii)}function oi(){ni(),ii=document.documentElement.getAttribute("dir");for(let t=0;t<ei.length;t++)Ai(ei[t])}const si=Nt((t=>{ti||ri||(ni(),ri=new MutationObserver(oi),ri.observe(document.documentElement,{attributes:!0,attributeFilter:["dir"]}));const e=ve(t);class r extends e{static _processStyleText(t,r){return t=e._processStyleText.call(this,t,r),!ti&&Kr.test(t)&&(t=this._replaceDirInCssText(t),this.__activateDir=!0),t}static _replaceDirInCssText(t){let e=t;return e=e.replace(Jr,':host([dir="$1"])'),e=e.replace(Xr,':host([dir="$2"]) $1'),e}constructor(){super(),this.__autoDirOptOut=!1}ready(){super.ready(),this.__autoDirOptOut=this.hasAttribute("dir")}connectedCallback(){e.prototype.connectedCallback&&super.connectedCallback(),this.constructor.__activateDir&&(ri&&ri.takeRecords().length&&oi(),ei.push(this),Ai(this))}disconnectedCallback(){if(e.prototype.disconnectedCallback&&super.disconnectedCallback(),this.constructor.__activateDir){const t=ei.indexOf(this);t>-1&&ei.splice(t,1)}}}return r.__activateDir=!1,r}));function ai(){document.body.removeAttribute("unresolved")}function li(t,e,r){return{index:t,removed:e,addedCount:r}}function ci(t,e){return function(t,e,r,i,n,A){let o,s=0,a=0,l=Math.min(r-e,A-n);if(0==e&&0==n&&(s=function(t,e,r){for(let i=0;i<r;i++)if(!di(t[i],e[i]))return i;return r}(t,i,l)),r==t.length&&A==i.length&&(a=function(t,e,r){let i=t.length,n=e.length,A=0;for(;A<r&&di(t[--i],e[--n]);)A++;return A}(t,i,l-s)),n+=s,A-=a,(r-=a)-(e+=s)==0&&A-n==0)return[];if(e==r){for(o=li(e,[],0);n<A;)o.removed.push(i[n++]);return[o]}if(n==A)return[li(e,[],r-e)];let c=function(t){let e=t.length-1,r=t[0].length-1,i=t[e][r],n=[];for(;e>0||r>0;){if(0==e){n.push(2),r--;continue}if(0==r){n.push(3),e--;continue}let A,o=t[e-1][r-1],s=t[e-1][r],a=t[e][r-1];A=s<a?s<o?s:o:a<o?a:o,A==o?(o==i?n.push(0):(n.push(1),i=o),e--,r--):A==s?(n.push(3),e--,i=s):(n.push(2),r--,i=a)}return n.reverse(),n}(function(t,e,r,i,n,A){let o=A-n+1,s=r-e+1,a=new Array(o);for(let t=0;t<o;t++)a[t]=new Array(s),a[t][0]=t;for(let t=0;t<s;t++)a[0][t]=t;for(let r=1;r<o;r++)for(let A=1;A<s;A++)if(di(t[e+A-1],i[n+r-1]))a[r][A]=a[r-1][A-1];else{let t=a[r-1][A]+1,e=a[r][A-1]+1;a[r][A]=t<e?t:e}return a}(t,e,r,i,n,A));o=void 0;let d=[],u=e,h=n;for(let t=0;t<c.length;t++)switch(c[t]){case 0:o&&(d.push(o),o=void 0),u++,h++;break;case 1:o||(o=li(u,[],0)),o.addedCount++,u++,o.removed.push(i[h]),h++;break;case 2:o||(o=li(u,[],0)),o.addedCount++,u++;break;case 3:o||(o=li(u,[],0)),o.removed.push(i[h]),h++}return o&&d.push(o),d}(t,0,t.length,e,0,e.length)}function di(t,e){return t===e}function ui(t){return"slot"===t.localName}"interactive"===document.readyState||"complete"===document.readyState?ai():window.addEventListener("DOMContentLoaded",ai);let hi=class{static getFlattenedNodes(t){const e=qt(t);return ui(t)?e.assignedNodes({flatten:!0}):Array.from(e.childNodes).map((t=>ui(t)?qt(t).assignedNodes({flatten:!0}):[t])).reduce(((t,e)=>t.concat(e)),[])}constructor(t,e){this._shadyChildrenObserver=null,this._nativeChildrenObserver=null,this._connected=!1,this._target=t,this.callback=e,this._effectiveNodes=[],this._observer=null,this._scheduled=!1,this._boundSchedule=()=>{this._schedule()},this.connect(),this._schedule()}connect(){ui(this._target)?this._listenSlots([this._target]):qt(this._target).children&&(this._listenSlots(qt(this._target).children),window.ShadyDOM?this._shadyChildrenObserver=window.ShadyDOM.observeChildren(this._target,(t=>{this._processMutations(t)})):(this._nativeChildrenObserver=new MutationObserver((t=>{this._processMutations(t)})),this._nativeChildrenObserver.observe(this._target,{childList:!0}))),this._connected=!0}disconnect(){ui(this._target)?this._unlistenSlots([this._target]):qt(this._target).children&&(this._unlistenSlots(qt(this._target).children),window.ShadyDOM&&this._shadyChildrenObserver?(window.ShadyDOM.unobserveChildren(this._shadyChildrenObserver),this._shadyChildrenObserver=null):this._nativeChildrenObserver&&(this._nativeChildrenObserver.disconnect(),this._nativeChildrenObserver=null)),this._connected=!1}_schedule(){this._scheduled||(this._scheduled=!0,he.run((()=>this.flush())))}_processMutations(t){this._processSlotMutations(t),this.flush()}_processSlotMutations(t){if(t)for(let e=0;e<t.length;e++){let r=t[e];r.addedNodes&&this._listenSlots(r.addedNodes),r.removedNodes&&this._unlistenSlots(r.removedNodes)}}flush(){if(!this._connected)return!1;window.ShadyDOM&&ShadyDOM.flush(),this._nativeChildrenObserver?this._processSlotMutations(this._nativeChildrenObserver.takeRecords()):this._shadyChildrenObserver&&this._processSlotMutations(this._shadyChildrenObserver.takeRecords()),this._scheduled=!1;let t={target:this._target,addedNodes:[],removedNodes:[]},e=this.constructor.getFlattenedNodes(this._target),r=ci(e,this._effectiveNodes);for(let e,i=0;i<r.length&&(e=r[i]);i++)for(let r,i=0;i<e.removed.length&&(r=e.removed[i]);i++)t.removedNodes.push(r);for(let i,n=0;n<r.length&&(i=r[n]);n++)for(let r=i.index;r<i.index+i.addedCount;r++)t.addedNodes.push(e[r]);this._effectiveNodes=e;let i=!1;return(t.addedNodes.length||t.removedNodes.length)&&(i=!0,this.callback.call(this._target,t)),i}_listenSlots(t){for(let e=0;e<t.length;e++){let r=t[e];ui(r)&&r.addEventListener("slotchange",this._boundSchedule)}}_unlistenSlots(t){for(let e=0;e<t.length;e++){let r=t[e];ui(r)&&r.removeEventListener("slotchange",this._boundSchedule)}}};const pi=function(){let t,e;do{t=window.ShadyDOM&&ShadyDOM.flush(),window.ShadyCSS&&window.ShadyCSS.ScopingShim&&window.ShadyCSS.ScopingShim.flush(),e=fr()}while(t||e)},fi=Element.prototype,mi=fi.matches||fi.matchesSelector||fi.mozMatchesSelector||fi.msMatchesSelector||fi.oMatchesSelector||fi.webkitMatchesSelector,gi=function(t,e){return mi.call(t,e)};class vi{constructor(t){window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.patch(t),this.node=t}observeNodes(t){return new hi(this.node,t)}unobserveNodes(t){t.disconnect()}notifyObserver(){}deepContains(t){if(qt(this.node).contains(t))return!0;let e=t,r=t.ownerDocument;for(;e&&e!==r&&e!==this.node;)e=qt(e).parentNode||qt(e).host;return e===this.node}getOwnerRoot(){return qt(this.node).getRootNode()}getDistributedNodes(){return"slot"===this.node.localName?qt(this.node).assignedNodes({flatten:!0}):[]}getDestinationInsertionPoints(){let t=[],e=qt(this.node).assignedSlot;for(;e;)t.push(e),e=qt(e).assignedSlot;return t}importNode(t,e){let r=this.node instanceof Document?this.node:this.node.ownerDocument;return qt(r).importNode(t,e)}getEffectiveChildNodes(){return hi.getFlattenedNodes(this.node)}queryDistributedElements(t){let e=this.getEffectiveChildNodes(),r=[];for(let i,n=0,A=e.length;n<A&&(i=e[n]);n++)i.nodeType===Node.ELEMENT_NODE&&gi(i,t)&&r.push(i);return r}get activeElement(){let t=this.node;return void 0!==t._activeElement?t._activeElement:t.activeElement}}function yi(t,e){for(let r=0;r<e.length;r++){let i=e[r];Object.defineProperty(t,i,{get:function(){return this.node[i]},configurable:!0})}}class bi{constructor(t){this.event=t}get rootTarget(){return this.path[0]}get localTarget(){return this.event.target}get path(){return this.event.composedPath()}}vi.prototype.cloneNode,vi.prototype.appendChild,vi.prototype.insertBefore,vi.prototype.removeChild,vi.prototype.replaceChild,vi.prototype.setAttribute,vi.prototype.removeAttribute,vi.prototype.querySelector,vi.prototype.querySelectorAll,vi.prototype.parentNode,vi.prototype.firstChild,vi.prototype.lastChild,vi.prototype.nextSibling,vi.prototype.previousSibling,vi.prototype.firstElementChild,vi.prototype.lastElementChild,vi.prototype.nextElementSibling,vi.prototype.previousElementSibling,vi.prototype.childNodes,vi.prototype.children,vi.prototype.classList,vi.prototype.textContent,vi.prototype.innerHTML;let _i=vi;if(window.ShadyDOM&&window.ShadyDOM.inUse&&window.ShadyDOM.noPatch&&window.ShadyDOM.Wrapper){class t extends window.ShadyDOM.Wrapper{}Object.getOwnPropertyNames(vi.prototype).forEach((e=>{"activeElement"!=e&&(t.prototype[e]=vi.prototype[e])})),yi(t.prototype,["classList"]),_i=t,Object.defineProperties(bi.prototype,{localTarget:{get(){const t=this.event.currentTarget,e=t&&wi(t).getOwnerRoot(),r=this.path;for(let t=0;t<r.length;t++){const i=r[t];if(wi(i).getOwnerRoot()===e)return i}},configurable:!0},path:{get(){return window.ShadyDOM.composedPath(this.event)},configurable:!0}})}else!function(t,e){for(let r=0;r<e.length;r++){let i=e[r];t[i]=function(){return this.node[i].apply(this.node,arguments)}}}(vi.prototype,["cloneNode","appendChild","insertBefore","removeChild","replaceChild","setAttribute","removeAttribute","querySelector","querySelectorAll"]),yi(vi.prototype,["parentNode","firstChild","lastChild","nextSibling","previousSibling","firstElementChild","lastElementChild","nextElementSibling","previousElementSibling","childNodes","children","classList"]),function(t,e){for(let r=0;r<e.length;r++){let i=e[r];Object.defineProperty(t,i,{get:function(){return this.node[i]},set:function(t){this.node[i]=t},configurable:!0})}}(vi.prototype,["textContent","innerHTML","className"]);const wi=function(t){if((t=t||document)instanceof _i)return t;if(t instanceof bi)return t;let e=t.__domApi;return e||(e=t instanceof Event?new bi(t):new _i(t),t.__domApi=e),e},xi=window.ShadyDOM,ki=window.ShadyCSS;function Si(t,e){return qt(t).getRootNode()===e}const Ci="disable-upgrade",Ei=t=>{for(;t;){const e=Object.getOwnPropertyDescriptor(t,"observedAttributes");if(e)return e.get;t=Object.getPrototypeOf(t.prototype).constructor}return()=>[]},Pi=(Nt((t=>{const e=dr(t);let r=Ei(e);return class extends e{constructor(){super(),this.__isUpgradeDisabled}static get observedAttributes(){return r.call(this).concat(Ci)}_initializeProperties(){this.hasAttribute(Ci)?this.__isUpgradeDisabled=!0:super._initializeProperties()}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}attributeChangedCallback(t,e,r,i){t==Ci?this.__isUpgradeDisabled&&null==r&&(super._initializeProperties(),this.__isUpgradeDisabled=!1,qt(this).isConnected&&super.connectedCallback()):super.attributeChangedCallback(t,e,r,i)}connectedCallback(){this.__isUpgradeDisabled||super.connectedCallback()}disconnectedCallback(){this.__isUpgradeDisabled||super.disconnectedCallback()}}})),"disable-upgrade");let Ti=window.ShadyCSS;const Oi=Nt((t=>{const e=Gr(dr(t)),r=cr?e:si(e),i=Ei(r),n={x:"pan-x",y:"pan-y",none:"none",all:"auto"};class A extends r{constructor(){super(),this.isAttached,this.__boundListeners,this._debouncers,this.__isUpgradeDisabled,this.__needsAttributesAtConnected,this._legacyForceObservedAttributes}static get importMeta(){return this.prototype.importMeta}created(){}__attributeReaction(t,e,r){(this.__dataAttributes&&this.__dataAttributes[t]||t===Pi)&&this.attributeChangedCallback(t,e,r,null)}setAttribute(t,e){if(Et&&!this._legacyForceObservedAttributes){const r=this.getAttribute(t);super.setAttribute(t,e),this.__attributeReaction(t,r,String(e))}else super.setAttribute(t,e)}removeAttribute(t){if(Et&&!this._legacyForceObservedAttributes){const e=this.getAttribute(t);super.removeAttribute(t),this.__attributeReaction(t,e,null)}else super.removeAttribute(t)}static get observedAttributes(){return Et&&!this.prototype._legacyForceObservedAttributes?(this.hasOwnProperty(JSCompiler_renameProperty("__observedAttributes",this))||(this.__observedAttributes=[],ar(this.prototype)),this.__observedAttributes):i.call(this).concat(Pi)}_enableProperties(){this.__isUpgradeDisabled||super._enableProperties()}_canApplyPropertyDefault(t){return super._canApplyPropertyDefault(t)&&!(this.__isUpgradeDisabled&&this._isPropertyPending(t))}connectedCallback(){this.__needsAttributesAtConnected&&this._takeAttributes(),this.__isUpgradeDisabled||(super.connectedCallback(),this.isAttached=!0,this.attached())}attached(){}disconnectedCallback(){this.__isUpgradeDisabled||(super.disconnectedCallback(),this.isAttached=!1,this.detached())}detached(){}attributeChangedCallback(t,e,r,i){e!==r&&(t==Pi?this.__isUpgradeDisabled&&null==r&&(this._initializeProperties(),this.__isUpgradeDisabled=!1,qt(this).isConnected&&this.connectedCallback()):(super.attributeChangedCallback(t,e,r,i),this.attributeChanged(t,e,r)))}attributeChanged(t,e,r){}_initializeProperties(){if(yt&&this.hasAttribute(Pi))this.__isUpgradeDisabled=!0;else{let t=Object.getPrototypeOf(this);t.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",t))||(this._registered(),t.__hasRegisterFinished=!0),super._initializeProperties(),this.root=this,this.created(),Et&&!this._legacyForceObservedAttributes&&(this.hasAttributes()?this._takeAttributes():this.parentNode||(this.__needsAttributesAtConnected=!0)),this._applyListeners()}}_takeAttributes(){const t=this.attributes;for(let e=0,r=t.length;e<r;e++){const r=t[e];this.__attributeReaction(r.name,null,r.value)}}_registered(){}ready(){this._ensureAttributes(),super.ready()}_ensureAttributes(){}_applyListeners(){}serialize(t){return this._serializeValue(t)}deserialize(t,e){return this._deserializeValue(t,e)}reflectPropertyToAttribute(t,e,r){this._propertyToAttribute(t,e,r)}serializeValueToAttribute(t,e,r){this._valueToNodeAttribute(r||this,t,e)}extend(t,e){if(!t||!e)return t||e;let r=Object.getOwnPropertyNames(e);for(let i,n=0;n<r.length&&(i=r[n]);n++){let r=Object.getOwnPropertyDescriptor(e,i);r&&Object.defineProperty(t,i,r)}return t}mixin(t,e){for(let r in e)t[r]=e[r];return t}chainObject(t,e){return t&&e&&t!==e&&(t.__proto__=e),t}instanceTemplate(t){let e=this.constructor._contentForTemplate(t);return document.importNode(e,!0)}fire(t,e,r){r=r||{},e=null==e?{}:e;let i=new Event(t,{bubbles:void 0===r.bubbles||r.bubbles,cancelable:Boolean(r.cancelable),composed:void 0===r.composed||r.composed});i.detail=e;let n=r.node||this;return qt(n).dispatchEvent(i),i}listen(t,e,r){t=t||this;let i=this.__boundListeners||(this.__boundListeners=new WeakMap),n=i.get(t);n||(n={},i.set(t,n));let A=e+r;n[A]||(n[A]=this._addMethodEventListenerToNode(t,e,r,this))}unlisten(t,e,r){t=t||this;let i=this.__boundListeners&&this.__boundListeners.get(t),n=e+r,A=i&&i[n];A&&(this._removeEventListenerFromNode(t,e,A),i[n]=null)}setScrollDirection(t,e){Ur(e||this,n[t]||"auto")}$$(t){return this.root.querySelector(t)}get domHost(){let t=qt(this).getRootNode();return t instanceof DocumentFragment?t.host:t}distributeContent(){const t=wi(this);window.ShadyDOM&&t.shadowRoot&&ShadyDOM.flush()}getEffectiveChildNodes(){return wi(this).getEffectiveChildNodes()}queryDistributedElements(t){return wi(this).queryDistributedElements(t)}getEffectiveChildren(){return this.getEffectiveChildNodes().filter((function(t){return t.nodeType===Node.ELEMENT_NODE}))}getEffectiveTextContent(){let t=this.getEffectiveChildNodes(),e=[];for(let r,i=0;r=t[i];i++)r.nodeType!==Node.COMMENT_NODE&&e.push(r.textContent);return e.join("")}queryEffectiveChildren(t){let e=this.queryDistributedElements(t);return e&&e[0]}queryAllEffectiveChildren(t){return this.queryDistributedElements(t)}getContentChildNodes(t){let e=this.root.querySelector(t||"slot");return e?wi(e).getDistributedNodes():[]}getContentChildren(t){return this.getContentChildNodes(t).filter((function(t){return t.nodeType===Node.ELEMENT_NODE}))}isLightDescendant(t){const e=this;return e!==t&&qt(e).contains(t)&&qt(e).getRootNode()===qt(t).getRootNode()}isLocalDescendant(t){return this.root===qt(t).getRootNode()}scopeSubtree(t,e=!1){return function(t,e=!1){if(!xi||!ki)return null;if(!xi.handlesDynamicScoping)return null;const r=ki.ScopingShim;if(!r)return null;const i=r.scopeForNode(t),n=qt(t).getRootNode(),A=t=>{if(!Si(t,n))return;const e=Array.from(xi.nativeMethods.querySelectorAll.call(t,"*"));e.push(t);for(let t=0;t<e.length;t++){const A=e[t];if(!Si(A,n))continue;const o=r.currentScopeForNode(A);o!==i&&(""!==o&&r.unscopeNode(A,o),r.scopeNode(A,i))}};if(A(t),e){const e=new MutationObserver((t=>{for(let e=0;e<t.length;e++){const r=t[e];for(let t=0;t<r.addedNodes.length;t++){const e=r.addedNodes[t];e.nodeType===Node.ELEMENT_NODE&&A(e)}}}));return e.observe(t,{childList:!0,subtree:!0}),e}return null}(t,e)}getComputedStyleValue(t){return Ti.getComputedStyleValue(this,t)}debounce(t,e,r){return this._debouncers=this._debouncers||{},this._debouncers[t]=ur.debounce(this._debouncers[t],r>0?ue.after(r):he,e.bind(this))}isDebouncerActive(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];return!(!e||!e.isActive())}flushDebouncer(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];e&&e.flush()}cancelDebouncer(t){this._debouncers=this._debouncers||{};let e=this._debouncers[t];e&&e.cancel()}async(t,e){return e>0?ue.run(t.bind(this),e):~he.run(t.bind(this))}cancelAsync(t){t<0?he.cancel(~t):ue.cancel(t)}create(t,e){let r=document.createElement(t);if(e)if(r.setProperties)r.setProperties(e);else for(let t in e)r[t]=e[t];return r}elementMatches(t,e){return gi(e||this,t)}toggleAttribute(t,e){let r=this;return 3===arguments.length&&(r=arguments[2]),1==arguments.length&&(e=!r.hasAttribute(t)),e?(qt(r).setAttribute(t,""),!0):(qt(r).removeAttribute(t),!1)}toggleClass(t,e,r){r=r||this,1==arguments.length&&(e=!r.classList.contains(t)),e?r.classList.add(t):r.classList.remove(t)}transform(t,e){(e=e||this).style.webkitTransform=t,e.style.transform=t}translate3d(t,e,r,i){i=i||this,this.transform("translate3d("+t+","+e+","+r+")",i)}arrayDelete(t,e){let r;if(Array.isArray(t)){if(r=t.indexOf(e),r>=0)return t.splice(r,1)}else if(r=Kt(this,t).indexOf(e),r>=0)return this.splice(t,r,1);return null}_logger(t,e){switch(Array.isArray(e)&&1===e.length&&Array.isArray(e[0])&&(e=e[0]),t){case"log":case"warn":case"error":console[t](...e)}}_log(...t){this._logger("log",t)}_warn(...t){this._logger("warn",t)}_error(...t){this._logger("error",t)}_logf(t,...e){return["[%s::%s]",this.is,t,...e]}}return A.prototype.is="",A})),Ni={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,listeners:!0,hostAttributes:!0},$i={attached:!0,detached:!0,ready:!0,created:!0,beforeRegister:!0,registered:!0,attributeChanged:!0,behaviors:!0,_noAccessors:!0},Ii=Object.assign({listeners:!0,hostAttributes:!0,properties:!0,observers:!0},$i);function Mi(t,e,r,i){!function(t,e,r){const i=t._noAccessors,n=Object.getOwnPropertyNames(t);for(let A=0;A<n.length;A++){let o=n[A];if(!(o in r))if(i)e[o]=t[o];else{let r=Object.getOwnPropertyDescriptor(t,o);r&&(r.configurable=!0,Object.defineProperty(e,o,r))}}}(e,t,i);for(let t in Ni)e[t]&&(r[t]=r[t]||[],r[t].push(e[t]))}function Di(t,e,r){e=e||[];for(let i=t.length-1;i>=0;i--){let n=t[i];n?Array.isArray(n)?Di(n,e):e.indexOf(n)<0&&(!r||r.indexOf(n)<0)&&e.unshift(n):console.warn("behavior is null, check for missing or 404 import")}return e}function Li(t,e){for(const r in e){const i=t[r],n=e[r];t[r]=!("value"in n)&&i&&"value"in i?Object.assign({value:i.value},n):n}}const zi=Oi(HTMLElement);function Bi(t,e,r){let i;const n={};class A extends e{static _finalizeClass(){if(this.hasOwnProperty(JSCompiler_renameProperty("generatedFrom",this))){if(i)for(let t,e=0;e<i.length;e++)t=i[e],t.properties&&this.createProperties(t.properties),t.observers&&this.createObservers(t.observers,t.properties);t.properties&&this.createProperties(t.properties),t.observers&&this.createObservers(t.observers,t.properties),this._prepareTemplate()}else e._finalizeClass.call(this)}static get properties(){const e={};if(i)for(let t=0;t<i.length;t++)Li(e,i[t].properties);return Li(e,t.properties),e}static get observers(){let e=[];if(i)for(let t,r=0;r<i.length;r++)t=i[r],t.observers&&(e=e.concat(t.observers));return t.observers&&(e=e.concat(t.observers)),e}created(){super.created();const t=n.created;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}_registered(){const t=A.prototype;if(!t.hasOwnProperty(JSCompiler_renameProperty("__hasRegisterFinished",t))){t.__hasRegisterFinished=!0,super._registered(),yt&&o(t);const e=Object.getPrototypeOf(this);let r=n.beforeRegister;if(r)for(let t=0;t<r.length;t++)r[t].call(e);if(r=n.registered,r)for(let t=0;t<r.length;t++)r[t].call(e)}}_applyListeners(){super._applyListeners();const t=n.listeners;if(t)for(let e=0;e<t.length;e++){const r=t[e];if(r)for(let t in r)this._addMethodEventListenerToNode(this,t,r[t])}}_ensureAttributes(){const t=n.hostAttributes;if(t)for(let e=t.length-1;e>=0;e--){const r=t[e];for(let t in r)this._ensureAttribute(t,r[t])}super._ensureAttributes()}ready(){super.ready();let t=n.ready;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}attached(){super.attached();let t=n.attached;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}detached(){super.detached();let t=n.detached;if(t)for(let e=0;e<t.length;e++)t[e].call(this)}attributeChanged(t,e,r){super.attributeChanged();let i=n.attributeChanged;if(i)for(let n=0;n<i.length;n++)i[n].call(this,t,e,r)}}if(r){Array.isArray(r)||(r=[r]);let t=e.prototype.behaviors;i=Di(r,null,t),A.prototype.behaviors=t?t.concat(r):i}const o=e=>{i&&function(t,e,r){for(let i=0;i<e.length;i++)Mi(t,e[i],r,Ii)}(e,i,n),Mi(e,t,n,$i)};return yt||o(A.prototype),A.generatedFrom=t,A}const Ri=function(t){let e;return e="function"==typeof t?t:Ri.Class(t),t._legacyForceObservedAttributes&&(e.prototype._legacyForceObservedAttributes=t._legacyForceObservedAttributes),customElements.define(e.is,e),e};function Fi(t,e,r,i,n){let A;n&&(A="object"==typeof r&&null!==r,A&&(i=t.__dataTemp[e]));let o=i!==r&&(i==i||r==r);return A&&o&&(t.__dataTemp[e]=r),o}Ri.Class=function(t,e){t||console.warn("Polymer.Class requires `info` argument");let r=e?e(zi):zi;return r=Bi(t,r,t.behaviors),r.is=r.prototype.is=t.is,r};const Hi=Nt((t=>class extends t{_shouldPropertyChange(t,e,r){return Fi(this,t,e,r,!0)}})),Vi=Nt((t=>class extends t{static get properties(){return{mutableData:Boolean}}_shouldPropertyChange(t,e,r){return Fi(this,t,e,r,this.mutableData)}}));Hi._mutablePropertyChange=Fi;let Ui=null;function Yi(){return Ui}Yi.prototype=Object.create(HTMLTemplateElement.prototype,{constructor:{value:Yi,writable:!0}});const qi=Ar(Yi),ji=Hi(qi),Qi=Ar(class{});function Wi(t,e){for(let r=0;r<e.length;r++){let i=e[r];if(Boolean(t)!=Boolean(i.__hideTemplateChildren__))if(i.nodeType===Node.TEXT_NODE)t?(i.__polymerTextContent__=i.textContent,i.textContent=""):i.textContent=i.__polymerTextContent__;else if("slot"===i.localName)if(t)i.__polymerReplaced__=document.createComment("hidden-slot"),qt(qt(i).parentNode).replaceChild(i.__polymerReplaced__,i);else{const t=i.__polymerReplaced__;t&&qt(qt(t).parentNode).replaceChild(i,t)}else i.style&&(t?(i.__polymerDisplay__=i.style.display,i.style.display="none"):i.style.display=i.__polymerDisplay__);i.__hideTemplateChildren__=t,i._showHideChildren&&i._showHideChildren(t)}}class Zi extends Qi{constructor(t){super(),this._configureProperties(t),this.root=this._stampTemplate(this.__dataHost);let e=[];this.children=e;for(let t=this.root.firstChild;t;t=t.nextSibling)e.push(t),t.__templatizeInstance=this;this.__templatizeOwner&&this.__templatizeOwner.__hideTemplateChildren__&&this._showHideChildren(!0);let r=this.__templatizeOptions;(t&&r.instanceProps||!r.instanceProps)&&this._enableProperties()}_configureProperties(t){if(this.__templatizeOptions.forwardHostProp)for(let t in this.__hostProps)this._setPendingProperty(t,this.__dataHost["_host_"+t]);for(let e in t)this._setPendingProperty(e,t[e])}forwardHostProp(t,e){this._setPendingPropertyOrPath(t,e,!1,!0)&&this.__dataHost._enqueueClient(this)}_addEventListenerToNode(t,e,r){if(this._methodHost&&this.__templatizeOptions.parentModel)this._methodHost._addEventListenerToNode(t,e,(t=>{t.model=this,r(t)}));else{let i=this.__dataHost.__dataHost;i&&i._addEventListenerToNode(t,e,r)}}_showHideChildren(t){Wi(t,this.children)}_setUnmanagedPropertyToNode(t,e,r){t.__hideTemplateChildren__&&t.nodeType==Node.TEXT_NODE&&"textContent"==e?t.__polymerTextContent__=r:super._setUnmanagedPropertyToNode(t,e,r)}get parentModel(){let t=this.__parentModel;if(!t){let e;t=this;do{t=t.__dataHost.__dataHost}while((e=t.__templatizeOptions)&&!e.parentModel);this.__parentModel=t}return t}dispatchEvent(t){return!0}}Zi.prototype.__dataHost,Zi.prototype.__templatizeOptions,Zi.prototype._methodHost,Zi.prototype.__templatizeOwner,Zi.prototype.__hostProps;const Gi=Hi(Zi);function Ji(t){let e=t.__dataHost;return e&&e._methodHost||e}function Xi(t,e){return function(t,r,i){e.call(t.__templatizeOwner,r.substring("_host_".length),i[r])}}function Ki(t,e){return function(t,r,i){e.call(t.__templatizeOwner,t,r,i[r])}}function tn(t,e,r){if(gt&&!Ji(t))throw new Error("strictTemplatePolicy: template owner not trusted");if(r=r||{},t.__templatizeOwner)throw new Error("A <template> can only be templatized once");t.__templatizeOwner=e;let i=(e?e.constructor:Zi)._parseTemplate(t),n=i.templatizeInstanceClass;n||(n=function(t,e,r){let i=r.mutableData?Gi:Zi;tn.mixin&&(i=tn.mixin(i));let n=class extends i{};return n.prototype.__templatizeOptions=r,n.prototype._bindTemplate(t),function(t,e,r,i){let n=r.hostProps||{};for(let e in i.instanceProps){delete n[e];let r=i.notifyInstanceProp;r&&t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:Ki(0,r)})}if(i.forwardHostProp&&e.__dataHost)for(let e in n)r.hasHostProps||(r.hasHostProps=!0),t.prototype._addPropertyEffect(e,t.prototype.PROPERTY_EFFECT_TYPES.NOTIFY,{fn:function(t,e,r){t.__dataHost._setPendingPropertyOrPath("_host_"+e,r[e],!0,!0)}})}(n,t,e,r),n}(t,i,r),i.templatizeInstanceClass=n);const A=Ji(t);!function(t,e,r,i){let n=r.forwardHostProp;if(n&&e.hasHostProps){const s="template"==t.localName;let a=e.templatizeTemplateClass;if(!a){if(s){let t=r.mutableData?ji:qi;class i extends t{}a=e.templatizeTemplateClass=i}else{const r=t.constructor;class i extends r{}a=e.templatizeTemplateClass=i}let A=e.hostProps;for(let t in A)a.prototype._addPropertyEffect("_host_"+t,a.prototype.PROPERTY_EFFECT_TYPES.PROPAGATE,{fn:Xi(0,n)}),a.prototype._createNotifyingProperty("_host_"+t);bt&&i&&function(t,e,r){const i=r.constructor._properties,{propertyEffects:n}=t,{instanceProps:A}=e;for(let t in n)if(!(i[t]||A&&A[t])){const e=n[t];for(let r=0;r<e.length;r++){const{part:i}=e[r].info;if(!i.signature||!i.signature.static){console.warn(`Property '${t}' used in template but not declared in 'properties'; attribute will not be observed.`);break}}}}(e,r,i)}if(t.__dataProto&&Object.assign(t.__data,t.__dataProto),s)o=a,Ui=A=t,Object.setPrototypeOf(A,o.prototype),new o,Ui=null,t.__dataTemp={},t.__dataPending=null,t.__dataOld=null,t._enableProperties();else{Object.setPrototypeOf(t,a.prototype);const r=e.hostProps;for(let e in r)if(e="_host_"+e,e in t){const r=t[e];delete t[e],t.__data[e]=r}}}var A,o}(t,i,r,A);let o=class extends n{};return o.prototype._methodHost=A,o.prototype.__dataHost=t,o.prototype.__templatizeOwner=e,o.prototype.__hostProps=i.hostProps,o}let en=!1;function rn(){if(yt&&!ut){if(!en){en=!0;const t=document.createElement("style");t.textContent="dom-bind,dom-if,dom-repeat{display:none;}",document.head.appendChild(t)}return!0}return!1}const nn=Gr(Vi(Ar(HTMLElement)));customElements.define("dom-bind",class extends nn{static get observedAttributes(){return["mutable-data"]}constructor(){if(super(),gt)throw new Error("strictTemplatePolicy: dom-bind not allowed");this.root=null,this.$=null,this.__children=null}attributeChangedCallback(t,e,r,i){this.mutableData=!0}connectedCallback(){rn()||(this.style.display="none"),this.render()}disconnectedCallback(){this.__removeChildren()}__insertChildren(){qt(qt(this).parentNode).insertBefore(this.root,this)}__removeChildren(){if(this.__children)for(let t=0;t<this.__children.length;t++)this.root.appendChild(this.__children[t])}render(){let t;if(!this.__children){if(t=t||this.querySelector("template"),!t){let e=new MutationObserver((()=>{if(t=this.querySelector("template"),!t)throw new Error("dom-bind requires a <template> child");e.disconnect(),this.render()}));return void e.observe(this,{childList:!0})}this.root=this._stampTemplate(t),this.$=this.root.$,this.__children=[];for(let t=this.root.firstChild;t;t=t.nextSibling)this.__children[this.__children.length]=t;this._enableProperties()}this.__insertChildren(),this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}});class An{constructor(t){this.value=t.toString()}toString(){return this.value}}const on=dr(HTMLElement),sn=Vi(on);class an extends sn{static get is(){return"dom-repeat"}static get template(){return null}static get properties(){return{items:{type:Array},as:{type:String,value:"item"},indexAs:{type:String,value:"index"},itemsIndexAs:{type:String,value:"itemsIndex"},sort:{type:Function,observer:"__sortChanged"},filter:{type:Function,observer:"__filterChanged"},observe:{type:String,observer:"__observeChanged"},delay:Number,renderedItemCount:{type:Number,notify:!Ct,readOnly:!0},initialCount:{type:Number},targetFramerate:{type:Number,value:20},_targetFrameTime:{type:Number,computed:"__computeFrameTime(targetFramerate)"},notifyDomChange:{type:Boolean},reuseChunkedInstances:{type:Boolean}}}static get observers(){return["__itemsChanged(items.*)"]}constructor(){super(),this.__instances=[],this.__renderDebouncer=null,this.__itemsIdxToInstIdx={},this.__chunkCount=null,this.__renderStartTime=null,this.__itemsArrayChanged=!1,this.__shouldMeasureChunk=!1,this.__shouldContinueChunking=!1,this.__chunkingId=0,this.__sortFn=null,this.__filterFn=null,this.__observePaths=null,this.__ctor=null,this.__isDetached=!0,this.template=null,this._templateInfo}disconnectedCallback(){super.disconnectedCallback(),this.__isDetached=!0;for(let t=0;t<this.__instances.length;t++)this.__detachInstance(t)}connectedCallback(){if(super.connectedCallback(),rn()||(this.style.display="none"),this.__isDetached){this.__isDetached=!1;let t=qt(qt(this).parentNode);for(let e=0;e<this.__instances.length;e++)this.__attachInstance(e,t)}}__ensureTemplatized(){if(!this.__ctor){const t=this;let e=this.template=t._templateInfo?t:this.querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!this.querySelector("template"))throw new Error("dom-repeat requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}let r={};r[this.as]=!0,r[this.indexAs]=!0,r[this.itemsIndexAs]=!0,this.__ctor=tn(e,this,{mutableData:this.mutableData,parentModel:!0,instanceProps:r,forwardHostProp:function(t,e){let r=this.__instances;for(let i,n=0;n<r.length&&(i=r[n]);n++)i.forwardHostProp(t,e)},notifyInstanceProp:function(t,e,r){if((i=this.as)===(n=e)||Wt(i,n)||Zt(i,n)){let i=t[this.itemsIndexAs];e==this.as&&(this.items[i]=r);let n=Gt(this.as,`${JSCompiler_renameProperty("items",this)}.${i}`,e);this.notifyPath(n,r)}var i,n}})}return!0}__getMethodHost(){return this.__dataHost._methodHost||this.__dataHost}__functionFromPropertyValue(t){if("string"==typeof t){let e=t,r=this.__getMethodHost();return function(){return r[e].apply(r,arguments)}}return t}__sortChanged(t){this.__sortFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__filterChanged(t){this.__filterFn=this.__functionFromPropertyValue(t),this.items&&this.__debounceRender(this.__render)}__computeFrameTime(t){return Math.ceil(1e3/t)}__observeChanged(){this.__observePaths=this.observe&&this.observe.replace(".*",".").split(" ")}__handleObservedPaths(t){if(this.__sortFn||this.__filterFn)if(t){if(this.__observePaths){let e=this.__observePaths;for(let r=0;r<e.length;r++)0===t.indexOf(e[r])&&this.__debounceRender(this.__render,this.delay)}}else this.__debounceRender(this.__render,this.delay)}__itemsChanged(t){this.items&&!Array.isArray(this.items)&&console.warn("dom-repeat expected array for `items`, found",this.items),this.__handleItemPath(t.path,t.value)||("items"===t.path&&(this.__itemsArrayChanged=!0),this.__debounceRender(this.__render))}__debounceRender(t,e=0){this.__renderDebouncer=ur.debounce(this.__renderDebouncer,e>0?ue.after(e):he,t.bind(this)),pr(this.__renderDebouncer)}render(){this.__debounceRender(this.__render),pi()}__render(){if(!this.__ensureTemplatized())return;let t=this.items||[];const e=this.__sortAndFilterItems(t),r=this.__calculateLimit(e.length);this.__updateInstances(t,r,e),this.initialCount&&(this.__shouldMeasureChunk||this.__shouldContinueChunking)&&(cancelAnimationFrame(this.__chunkingId),this.__chunkingId=requestAnimationFrame((()=>this.__continueChunking()))),this._setRenderedItemCount(this.__instances.length),Ct&&!this.notifyDomChange||this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0}))}__sortAndFilterItems(t){let e=new Array(t.length);for(let r=0;r<t.length;r++)e[r]=r;return this.__filterFn&&(e=e.filter(((e,r,i)=>this.__filterFn(t[e],r,i)))),this.__sortFn&&e.sort(((e,r)=>this.__sortFn(t[e],t[r]))),e}__calculateLimit(t){let e=t;const r=this.__instances.length;if(this.initialCount){let i;!this.__chunkCount||this.__itemsArrayChanged&&!this.reuseChunkedInstances?(e=Math.min(t,this.initialCount),i=Math.max(e-r,0),this.__chunkCount=i||1):(i=Math.min(Math.max(t-r,0),this.__chunkCount),e=Math.min(r+i,t)),this.__shouldMeasureChunk=i===this.__chunkCount,this.__shouldContinueChunking=e<t,this.__renderStartTime=performance.now()}return this.__itemsArrayChanged=!1,e}__continueChunking(){if(this.__shouldMeasureChunk){const t=performance.now()-this.__renderStartTime,e=this._targetFrameTime/t;this.__chunkCount=Math.round(this.__chunkCount*e)||1}this.__shouldContinueChunking&&this.__debounceRender(this.__render)}__updateInstances(t,e,r){const i=this.__itemsIdxToInstIdx={};let n;for(n=0;n<e;n++){let e=this.__instances[n],A=r[n],o=t[A];i[A]=n,e?(e._setPendingProperty(this.as,o),e._setPendingProperty(this.indexAs,n),e._setPendingProperty(this.itemsIndexAs,A),e._flushProperties()):this.__insertInstance(o,n,A)}for(let t=this.__instances.length-1;t>=n;t--)this.__detachAndRemoveInstance(t)}__detachInstance(t){let e=this.__instances[t];const r=qt(e.root);for(let t=0;t<e.children.length;t++){let i=e.children[t];r.appendChild(i)}return e}__attachInstance(t,e){let r=this.__instances[t];e.insertBefore(r.root,this)}__detachAndRemoveInstance(t){this.__detachInstance(t),this.__instances.splice(t,1)}__stampInstance(t,e,r){let i={};return i[this.as]=t,i[this.indexAs]=e,i[this.itemsIndexAs]=r,new this.__ctor(i)}__insertInstance(t,e,r){const i=this.__stampInstance(t,e,r);let n=this.__instances[e+1],A=n?n.children[0]:this;return qt(qt(this).parentNode).insertBefore(i.root,A),this.__instances[e]=i,i}_showHideChildren(t){for(let e=0;e<this.__instances.length;e++)this.__instances[e]._showHideChildren(t)}__handleItemPath(t,e){let r=t.slice(6),i=r.indexOf("."),n=i<0?r:r.substring(0,i);if(n==parseInt(n,10)){let t=i<0?"":r.substring(i+1);this.__handleObservedPaths(t);let A=this.__itemsIdxToInstIdx[n],o=this.__instances[A];if(o){let r=this.as+(t?"."+t:"");o._setPendingPropertyOrPath(r,e,!1,!0),o._flushProperties()}return!0}}itemForElement(t){let e=this.modelForElement(t);return e&&e[this.as]}indexForElement(t){let e=this.modelForElement(t);return e&&e[this.indexAs]}modelForElement(t){return function(t,e){let r;for(;e;)if(r=e.__dataHost?e:e.__templatizeInstance){if(r.__dataHost==t)return r;e=r.__dataHost}else e=qt(e).parentNode;return null}(this.template,t)}}customElements.define(an.is,an);class ln extends on{static get is(){return"dom-if"}static get template(){return null}static get properties(){return{if:{type:Boolean,observer:"__debounceRender"},restamp:{type:Boolean,observer:"__debounceRender"},notifyDomChange:{type:Boolean}}}constructor(){super(),this.__renderDebouncer=null,this._lastIf=!1,this.__hideTemplateChildren__=!1,this.__template,this._templateInfo}__debounceRender(){this.__renderDebouncer=ur.debounce(this.__renderDebouncer,he,(()=>this.__render())),pr(this.__renderDebouncer)}disconnectedCallback(){super.disconnectedCallback();const t=qt(this).parentNode;t&&(t.nodeType!=Node.DOCUMENT_FRAGMENT_NODE||qt(t).host)||this.__teardownInstance()}connectedCallback(){super.connectedCallback(),rn()||(this.style.display="none"),this.if&&this.__debounceRender()}__ensureTemplate(){if(!this.__template){const t=this;let e=t._templateInfo?t:qt(t).querySelector("template");if(!e){let t=new MutationObserver((()=>{if(!qt(this).querySelector("template"))throw new Error("dom-if requires a <template> child");t.disconnect(),this.__render()}));return t.observe(this,{childList:!0}),!1}this.__template=e}return!0}__ensureInstance(){let t=qt(this).parentNode;if(this.__hasInstance()){let e=this.__getInstanceNodes();if(e&&e.length&&qt(this).previousSibling!==e[e.length-1])for(let r,i=0;i<e.length&&(r=e[i]);i++)qt(t).insertBefore(r,this)}else{if(!t)return!1;if(!this.__ensureTemplate())return!1;this.__createAndInsertInstance(t)}return!0}render(){pi()}__render(){if(this.if){if(!this.__ensureInstance())return}else this.restamp&&this.__teardownInstance();this._showHideChildren(),Ct&&!this.notifyDomChange||this.if==this._lastIf||(this.dispatchEvent(new CustomEvent("dom-change",{bubbles:!0,composed:!0})),this._lastIf=this.if)}__hasInstance(){}__getInstanceNodes(){}__createAndInsertInstance(t){}__teardownInstance(){}_showHideChildren(){}}const cn=St?class extends ln{constructor(){super(),this.__instance=null,this.__syncInfo=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.templateInfo.childNodes}__createAndInsertInstance(t){const e=this.__dataHost||this;if(gt&&!this.__dataHost)throw new Error("strictTemplatePolicy: template owner not trusted");const r=e._bindTemplate(this.__template,!0);r.runEffects=(t,e,r)=>{let i=this.__syncInfo;if(this.if)i&&(this.__syncInfo=null,this._showHideChildren(),e=Object.assign(i.changedProps,e)),t(e,r);else if(this.__instance)if(i||(i=this.__syncInfo={runEffects:t,changedProps:{}}),r)for(const t in e){const e=Qt(t);i.changedProps[e]=this.__dataHost[e]}else Object.assign(i.changedProps,e)},this.__instance=e._stampTemplate(this.__template,r),qt(t).insertBefore(this.__instance,this)}__syncHostProperties(){const t=this.__syncInfo;t&&(this.__syncInfo=null,t.runEffects(t.changedProps,!1))}__teardownInstance(){const t=this.__dataHost||this;this.__instance&&(t._removeBoundDom(this.__instance),this.__instance=null,this.__syncInfo=null)}_showHideChildren(){const t=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==t&&(this.__instance.__hidden=t,Wi(t,this.__instance.templateInfo.childNodes)),t||this.__syncHostProperties()}}:class extends ln{constructor(){super(),this.__ctor=null,this.__instance=null,this.__invalidProps=null}__hasInstance(){return Boolean(this.__instance)}__getInstanceNodes(){return this.__instance.children}__createAndInsertInstance(t){this.__ctor||(this.__ctor=tn(this.__template,this,{mutableData:!0,forwardHostProp:function(t,e){this.__instance&&(this.if?this.__instance.forwardHostProp(t,e):(this.__invalidProps=this.__invalidProps||Object.create(null),this.__invalidProps[Qt(t)]=!0))}})),this.__instance=new this.__ctor,qt(t).insertBefore(this.__instance.root,this)}__teardownInstance(){if(this.__instance){let t=this.__instance.children;if(t&&t.length){let e=qt(t[0]).parentNode;if(e){e=qt(e);for(let r,i=0;i<t.length&&(r=t[i]);i++)e.removeChild(r)}}this.__invalidProps=null,this.__instance=null}}__syncHostProperties(){let t=this.__invalidProps;if(t){this.__invalidProps=null;for(let e in t)this.__instance._setPendingProperty(e,this.__dataHost[e]);this.__instance._flushProperties()}}_showHideChildren(){const t=this.__hideTemplateChildren__||!this.if;this.__instance&&Boolean(this.__instance.__hidden)!==t&&(this.__instance.__hidden=t,this.__instance._showHideChildren(t)),t||this.__syncHostProperties()}};customElements.define(cn.is,cn);let dn=Nt((t=>{let e=dr(t);return class extends e{static get properties(){return{items:{type:Array},multi:{type:Boolean,value:!1},selected:{type:Object,notify:!0},selectedItem:{type:Object,notify:!0},toggle:{type:Boolean,value:!1}}}static get observers(){return["__updateSelection(multi, items.*)"]}constructor(){super(),this.__lastItems=null,this.__lastMulti=null,this.__selectedMap=null}__updateSelection(t,e){let r=e.path;if(r==JSCompiler_renameProperty("items",this)){let r=e.base||[],i=this.__lastItems;if(t!==this.__lastMulti&&this.clearSelection(),i){let t=ci(r,i);this.__applySplices(t)}this.__lastItems=r,this.__lastMulti=t}else if(e.path==`${JSCompiler_renameProperty("items",this)}.splices`)this.__applySplices(e.value.indexSplices);else{let t=r.slice(`${JSCompiler_renameProperty("items",this)}.`.length),e=parseInt(t,10);t.indexOf(".")<0&&t==e&&this.__deselectChangedIdx(e)}}__applySplices(t){let e=this.__selectedMap;for(let r=0;r<t.length;r++){let i=t[r];e.forEach(((t,r)=>{t<i.index||(t>=i.index+i.removed.length?e.set(r,t+i.addedCount-i.removed.length):e.set(r,-1))}));for(let t=0;t<i.addedCount;t++){let r=i.index+t;e.has(this.items[r])&&e.set(this.items[r],r)}}this.__updateLinks();let r=0;e.forEach(((t,i)=>{t<0?(this.multi?this.splice(JSCompiler_renameProperty("selected",this),r,1):this.selected=this.selectedItem=null,e.delete(i)):r++}))}__updateLinks(){if(this.__dataLinkedPaths={},this.multi){let t=0;this.__selectedMap.forEach((e=>{e>=0&&this.linkPaths(`${JSCompiler_renameProperty("items",this)}.${e}`,`${JSCompiler_renameProperty("selected",this)}.${t++}`)}))}else this.__selectedMap.forEach((t=>{this.linkPaths(JSCompiler_renameProperty("selected",this),`${JSCompiler_renameProperty("items",this)}.${t}`),this.linkPaths(JSCompiler_renameProperty("selectedItem",this),`${JSCompiler_renameProperty("items",this)}.${t}`)}))}clearSelection(){this.__dataLinkedPaths={},this.__selectedMap=new Map,this.selected=this.multi?[]:null,this.selectedItem=null}isSelected(t){return this.__selectedMap.has(t)}isIndexSelected(t){return this.isSelected(this.items[t])}__deselectChangedIdx(t){let e=this.__selectedIndexForItemIndex(t);if(e>=0){let t=0;this.__selectedMap.forEach(((r,i)=>{e==t++&&this.deselect(i)}))}}__selectedIndexForItemIndex(t){let e=this.__dataLinkedPaths[`${JSCompiler_renameProperty("items",this)}.${t}`];if(e)return parseInt(e.slice(`${JSCompiler_renameProperty("selected",this)}.`.length),10)}deselect(t){let e=this.__selectedMap.get(t);if(e>=0){let r;this.__selectedMap.delete(t),this.multi&&(r=this.__selectedIndexForItemIndex(e)),this.__updateLinks(),this.multi?this.splice(JSCompiler_renameProperty("selected",this),r,1):this.selected=this.selectedItem=null}}deselectIndex(t){this.deselect(this.items[t])}select(t){this.selectIndex(this.items.indexOf(t))}selectIndex(t){let e=this.items[t];this.isSelected(e)?this.toggle&&this.deselectIndex(t):(this.multi||this.__selectedMap.clear(),this.__selectedMap.set(e,t),this.__updateLinks(),this.multi?this.push(JSCompiler_renameProperty("selected",this),e):this.selected=this.selectedItem=e)}}}))(on);class un extends dn{static get is(){return"array-selector"}static get template(){return null}}customElements.define(un.is,un);const hn=new rt;window.ShadyCSS||(window.ShadyCSS={prepareTemplate(t,e,r){},prepareTemplateDom(t,e){},prepareTemplateStyles(t,e,r){},styleSubtree(t,e){hn.processStyles(),$(t,e)},styleElement(t){hn.processStyles()},styleDocument(t){hn.processStyles(),$(document.body,t)},getComputedStyleValue:(t,e)=>I(t,e),flushCustomStyles(){},nativeCss:a,nativeShadow:i,cssBuild:A,disableRuntime:s}),window.ShadyCSS.CustomStyleInterface=hn;const pn="include",fn=window.ShadyCSS.CustomStyleInterface;class mn extends HTMLElement{constructor(){super(),this._style=null,fn.addCustomStyle(this)}getStyle(){if(this._style)return this._style;const t=this.querySelector("style");if(!t)return null;this._style=t;const e=t.getAttribute(pn);return e&&(t.removeAttribute(pn),t.textContent=function(t){let e=t.trim().split(/\s+/),r="";for(let t=0;t<e.length;t++)r+=Yt(e[t]);return r}(e)+t.textContent),this.ownerDocument!==window.document&&window.document.head.appendChild(this),this._style}}let gn;window.customElements.define("custom-style",mn),gn=Hi._mutablePropertyChange,Boolean;const vn=Oi(HTMLElement).prototype,yn={properties:{libraryLoaded:{type:Boolean,value:!1,notify:!0,readOnly:!0},libraryErrorMessage:{type:String,value:null,notify:!0,readOnly:!0}},observers:["_libraryUrlChanged(libraryUrl)"],_libraryUrlChanged:function(t){this._isReady&&this.libraryUrl&&this._loadLibrary()},_libraryLoadCallback:function(t,e){t?(vn._warn("Library load failed:",t.message),this._setLibraryErrorMessage(t.message)):(this._setLibraryErrorMessage(null),this._setLibraryLoaded(!0),this.notifyEvent&&this.fire(this.notifyEvent,e,{composed:!0}))},_loadLibrary:function(){bn.require(this.libraryUrl,this._libraryLoadCallback.bind(this),this.callbackName)},ready:function(){this._isReady=!0,this.libraryUrl&&this._loadLibrary()}};var bn={apiMap:{},require:function(t,e,r){var i=this.nameFromUrl(t);this.apiMap[i]||(this.apiMap[i]=new _n(i,t,r)),this.apiMap[i].requestNotify(e)},nameFromUrl:function(t){return t.replace(/[\:\/\%\?\&\.\=\-\,]/g,"_")+"_api"}},_n=function(t,e,r){if(this.notifiers=[],!r){if(!(e.indexOf(this.callbackMacro)>=0))return void(this.error=new Error("IronJsonpLibraryBehavior a %%callback%% parameter is required in libraryUrl"));r=t+"_loaded",e=e.replace(this.callbackMacro,r)}this.callbackName=r,window[this.callbackName]=this.success.bind(this),this.addScript(e)};_n.prototype={callbackMacro:"%%callback%%",loaded:!1,addScript:function(t){var e=document.createElement("script");e.src=t,e.onerror=this.handleError.bind(this);var r=document.querySelector("script")||document.body;r.parentNode.insertBefore(e,r),this.script=e},removeScript:function(){this.script.parentNode&&this.script.parentNode.removeChild(this.script),this.script=null},handleError:function(t){this.error=new Error("Library failed to load"),this.notifyAll(),this.cleanup()},success:function(){this.loaded=!0,this.result=Array.prototype.slice.call(arguments),this.notifyAll(),this.cleanup()},cleanup:function(){delete window[this.callbackName]},notifyAll:function(){this.notifiers.forEach(function(t){t(this.error,this.result)}.bind(this)),this.notifiers=[]},requestNotify:function(t){this.loaded||this.error?t(this.error,this.result):this.notifiers.push(t)}},Ri({is:"iron-jsonp-library",behaviors:[yn],properties:{libraryUrl:String,callbackName:String,notifyEvent:String}}),Ri({is:"google-youtube-api",_template:null,behaviors:[yn],properties:{libraryUrl:{type:String,value:"https://www.youtube.com/iframe_api"},notifyEvent:{type:String,value:"api-load"},callbackName:{type:String,value:"onYouTubeIframeAPIReady"}},get api(){return window.YT}}),Ri({is:"iron-localstorage",properties:{name:{type:String,value:""},value:{type:Object,notify:!0},useRaw:{type:Boolean,value:!1},autoSaveDisabled:{type:Boolean,value:!1},errorMessage:{type:String,notify:!0},_loaded:{type:Boolean,value:!1}},observers:["_debounceReload(name,useRaw)","_trySaveValue(autoSaveDisabled)","_trySaveValue(value.*)"],ready:function(){this._boundHandleStorage=this._handleStorage.bind(this)},attached:function(){window.addEventListener("storage",this._boundHandleStorage)},detached:function(){window.removeEventListener("storage",this._boundHandleStorage)},_handleStorage:function(t){t.key==this.name&&this._load(!0)},_trySaveValue:function(){void 0===this.autoSaveDisabled||this._doNotSave||this._loaded&&!this.autoSaveDisabled&&this.debounce("save",this.save)},_debounceReload:function(){void 0!==this.name&&void 0!==this.useRaw&&this.debounce("reload",this.reload)},reload:function(){this._loaded=!1,this._load()},_load:function(t){try{var e=window.localStorage.getItem(this.name)}catch(t){this.errorMessage=t.message,this._error("Could not save to localStorage. Try enabling cookies for this page.",t)}if(null===e)this._loaded=!0,this._doNotSave=!0,this.value=null,this._doNotSave=!1,this.fire("iron-localstorage-load-empty",{externalChange:t},{composed:!0});else{if(!this.useRaw)try{e=JSON.parse(e)}catch(t){this.errorMessage="Could not parse local storage value",vn._error("could not parse local storage value",e),e=null}this._loaded=!0,this._doNotSave=!0,this.value=e,this._doNotSave=!1,this.fire("iron-localstorage-load",{externalChange:t},{composed:!0})}},save:function(){var t=this.useRaw?this.value:JSON.stringify(this.value);try{null===this.value||void 0===this.value?window.localStorage.removeItem(this.name):window.localStorage.setItem(this.name,t)}catch(t){this.errorMessage=t.message,vn._error("Could not save to localStorage. Incognito mode may be blocking this action",t)}}}),Ri({_template:(function(t,...e){const r=document.createElement("template");return r.innerHTML=e.reduce(((e,r,i)=>e+function(t){if(t instanceof HTMLTemplateElement)return t.innerHTML;if(t instanceof An)return function(t){if(t instanceof An)return t.value;throw new Error(`non-literal value passed to Polymer's htmlLiteral function: ${t}`)}(t);throw new Error(`non-template value passed to Polymer's html function: ${t}`)}(r)+t[i+1]),t[0]),r})` <style> :host { display: block; } :host([fluid]) { width: 100%; max-width: 100%; position: relative; } :host([fluid]) iframe, :host([fluid]) #thumbnail { vertical-align: bottom; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; } iframe { @apply --google-youtube-iframe; } #container { max-width: 100%; max-height: 100%; @apply --google-youtube-container; } #thumbnail { width: 100%; height: 100%; cursor: pointer; @apply --google-youtube-thumbnail; } </style> <div id="container" style\$="{{_computeContainerStyle(width, height)}}"> <template is="dom-if" if="{{thumbnail}}"> <img id="thumbnail" src\$="{{thumbnail}}" title="YouTube video thumbnail." alt="YouTube video thumbnail." on-tap="_handleThumbnailTap"> </template> <template is="dom-if" if="{{!thumbnail}}"> <template is="dom-if" if="[[shouldLoadApi]]"> <google-youtube-api on-api-load="_apiLoad"></google-youtube-api> </template> </template> <!-- Use this._playsupportedLocalStorage as the value, since this.playsupported is set to true as soon as initial playback has started, and we don't want that cached. --> <iron-localstorage name="google-youtube-playsupported" value="{{_playsupportedLocalStorage}}" on-iron-localstorage-load="_useExistingPlaySupportedValue" on-iron-localstorage-load-empty="_determinePlaySupported"> </iron-localstorage> <div id="player"></div> </div> `,is:"google-youtube",properties:{videoId:{type:String,value:"",observer:"_videoIdChanged"},list:{type:String,value:""},listType:String,shouldLoadApi:{type:Boolean,computed:"_computeShouldLoadApi(list, videoId)"},playsupported:{type:Boolean,value:null,notify:!0},autoplay:{type:Number,value:0},playbackstarted:{type:Boolean,value:!1,notify:!0},height:{type:String,value:"270px"},width:{type:String,value:"480px"},state:{type:Number,value:-1,notify:!0},currenttime:{type:Number,value:0,notify:!0},duration:{type:Number,value:1,notify:!0},currenttimeformatted:{type:String,value:"0:00",notify:!0},durationformatted:{type:String,value:"0:00",notify:!0},fractionloaded:{type:Number,value:0,notify:!0},chromeless:{type:Boolean,value:!1},thumbnail:{type:String,value:""},fluid:{type:Boolean,value:!1},volume:{type:Number,value:100,notify:!0},playbackrate:{type:Number,value:1,notify:!0},playbackquality:{type:String,value:"",notify:!0},statsUpdateInterval:{type:Number,value:1e3}},_computeContainerStyle:function(t,e){return"width:"+t+"; height:"+e},_computeShouldLoadApi:function(t,e){return Boolean(t||e)},_useExistingPlaySupportedValue:function(){this.playsupported=this._playsupportedLocalStorage},_determinePlaySupported:function(){if(null==this.playsupported){var t,e=document.createElement("video");if("play"in e){e.id="playtest",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px";var r=document.createElement("source");r.src="data:video/mp4;base64,AAAAFGZ0eXBNU05WAAACAE1TTlYAAAOUbW9vdgAAAGxtdmhkAAAAAM9ghv7PYIb+AAACWAAACu8AAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAnh0cmFrAAAAXHRraGQAAAAHz2CG/s9ghv4AAAABAAAAAAAACu8AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAFAAAAA4AAAAAAHgbWRpYQAAACBtZGhkAAAAAM9ghv7PYIb+AAALuAAANq8AAAAAAAAAIWhkbHIAAAAAbWhscnZpZGVBVlMgAAAAAAABAB4AAAABl21pbmYAAAAUdm1oZAAAAAAAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAVdzdGJsAAAAp3N0c2QAAAAAAAAAAQAAAJdhdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAFAAOABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAAEmNvbHJuY2xjAAEAAQABAAAAL2F2Y0MBTUAz/+EAGGdNQDOadCk/LgIgAAADACAAAAMA0eMGVAEABGjuPIAAAAAYc3R0cwAAAAAAAAABAAAADgAAA+gAAAAUc3RzcwAAAAAAAAABAAAAAQAAABxzdHNjAAAAAAAAAAEAAAABAAAADgAAAAEAAABMc3RzegAAAAAAAAAAAAAADgAAAE8AAAAOAAAADQAAAA0AAAANAAAADQAAAA0AAAANAAAADQAAAA0AAAANAAAADQAAAA4AAAAOAAAAFHN0Y28AAAAAAAAAAQAAA7AAAAA0dXVpZFVTTVQh0k/Ou4hpXPrJx0AAAAAcTVREVAABABIAAAAKVcQAAAAAAAEAAAAAAAAAqHV1aWRVU01UIdJPzruIaVz6ycdAAAAAkE1URFQABAAMAAAAC1XEAAACHAAeAAAABBXHAAEAQQBWAFMAIABNAGUAZABpAGEAAAAqAAAAASoOAAEAZABlAHQAZQBjAHQAXwBhAHUAdABvAHAAbABhAHkAAAAyAAAAA1XEAAEAMgAwADAANQBtAGUALwAwADcALwAwADYAMAA2ACAAMwA6ADUAOgAwAAABA21kYXQAAAAYZ01AM5p0KT8uAiAAAAMAIAAAAwDR4wZUAAAABGjuPIAAAAAnZYiAIAAR//eBLT+oL1eA2Nlb/edvwWZflzEVLlhlXtJvSAEGRA3ZAAAACkGaAQCyJ/8AFBAAAAAJQZoCATP/AOmBAAAACUGaAwGz/wDpgAAAAAlBmgQCM/8A6YEAAAAJQZoFArP/AOmBAAAACUGaBgMz/wDpgQAAAAlBmgcDs/8A6YEAAAAJQZoIBDP/AOmAAAAACUGaCQSz/wDpgAAAAAlBmgoFM/8A6YEAAAAJQZoLBbP/AOmAAAAACkGaDAYyJ/8AFBAAAAAKQZoNBrIv/4cMeQ==",e.appendChild(r);var i=document.createElement("source");i.src="data:video/webm;base64,GkXfo49CgoR3ZWJtQoeBAUKFgQEYU4BnAQAAAAAAF60RTZt0vE27jFOrhBVJqWZTrIIQA027jFOrhBZUrmtTrIIQbE27jFOrhBFNm3RTrIIXmU27jFOrhBxTu2tTrIIWs+xPvwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFUmpZuQq17GDD0JATYCjbGliZWJtbCB2MC43LjcgKyBsaWJtYXRyb3NrYSB2MC44LjFXQY9BVlNNYXRyb3NrYUZpbGVEiYRFnEAARGGIBc2Lz1QNtgBzpJCy3XZ0KNuKNZS4+fDpFxzUFlSua9iu1teBAXPFhL4G+bmDgQG5gQGIgQFVqoEAnIEAbeeBASMxT4Q/gAAAVe6BAIaFVl9WUDiqgQEj44OEE95DVSK1nIN1bmTgkbCBULqBPJqBAFSwgVBUuoE87EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB9DtnVB4eeBAKC4obaBAAAAkAMAnQEqUAA8AABHCIWFiIWEiAICAAamYnoOC6cfJa8f5Zvda4D+/7YOf//nNefQYACgnKGWgQFNANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQKbANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQPoANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQU1ANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQaDANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQfQANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQkdANEBAAEQEBRgAGFgv9AAIiGAAPuC/rOgnKGWgQprANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQu4ANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQ0FANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQ5TANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQ+gANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgRDtANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgRI7ANEBAAEQEAAYABhYL/QACIhgAPuC/rIcU7trQOC7jLOBALeH94EB8YIUzLuNs4IBTbeH94EB8YIUzLuNs4ICm7eH94EB8YIUzLuNs4ID6LeH94EB8YIUzLuNs4IFNbeH94EB8YIUzLuNs4IGg7eH94EB8YIUzLuNs4IH0LeH94EB8YIUzLuNs4IJHbeH94EB8YIUzLuNs4IKa7eH94EB8YIUzLuNs4ILuLeH94EB8YIUzLuNs4INBbeH94EB8YIUzLuNs4IOU7eH94EB8YIUzLuNs4IPoLeH94EB8YIUzLuNs4IQ7beH94EB8YIUzLuNs4ISO7eH94EB8YIUzBFNm3SPTbuMU6uEH0O2dVOsghTM",e.appendChild(i),document.body.appendChild(e),this.async((function(){e.onplaying=function(r){clearTimeout(t),this.playsupported=r&&"playing"===r.type||0!==e.currentTime,this._playsupportedLocalStorage=this.playsupported,e.onplaying=null,document.body.removeChild(e)}.bind(this),t=setTimeout(e.onplaying,500),e.play()}))}else this.playsupported=!1,this._playsupportedLocalStorage=!1}},ready:function(){if(this.hasAttribute("fluid")){var t=parseInt(this.height,10)/parseInt(this.width,10);isNaN(t)&&(t=9/16),t*=100,this.width="100%",this.height="auto",this.$.container.style["padding-top"]=t+"%"}},detached:function(){this._player&&this._player.destroy()},play:function(){this._player&&this._player.playVideo&&this.playsupported&&this._player.playVideo()},setVolume:function(t){this._player&&this._player.setVolume&&this._player.setVolume(t)},mute:function(){this._player&&this._player.mute&&this._player.mute()},unMute:function(){this._player&&this._player.unMute&&this._player.unMute()},pause:function(){this._player&&this._player.pauseVideo&&this._player.pauseVideo()},seekTo:function(t){this._player&&this._player.seekTo&&(this._player.seekTo(t,!0),this.async((function(){this._updatePlaybackStats()}),100))},setPlaybackRate:function(t){this._player&&this._player.setPlaybackRate&&this._player.setPlaybackRate(t)},setPlaybackQuality:function(t){this._player&&this._player.setPlaybackQuality&&this._player.setPlaybackQuality(t)},_videoIdChanged:function(){this.videoId&&(this.currenttime=0,this.currenttimeformatted=this._toHHMMSS(0),this.fractionloaded=0,this.duration=1,this.durationformatted=this._toHHMMSS(0),this._player&&this._player.cueVideoById?this.playsupported&&this.attributes.autoplay&&"1"==this.attributes.autoplay.value?this._player.loadVideoById(this.videoId):this._player.cueVideoById(this.videoId):this._pendingVideoId=this.videoId)},_player:null,__updatePlaybackStatsInterval:null,_pendingVideoId:"",_apiLoad:function(){var t={playsinline:1,controls:2,autohide:1,autoplay:this.autoplay};this.chromeless&&(t.controls=0,t.modestbranding=1,t.showinfo=0,t.iv_load_policy=3,t.rel=0);for(var e=0;e<this.attributes.length;e++){var r=this.attributes[e];t[r.nodeName]=r.value}this._player=new YT.Player(this.$.player,{videoId:this.videoId,width:"100%",height:"100%",playerVars:t,events:{onReady:function(t){this._pendingVideoId&&this._pendingVideoId!=this.videoId&&(this._player.cueVideoById(this._pendingVideoId),this._pendingVideoId=""),this.fire("google-youtube-ready",t)}.bind(this),onStateChange:function(t){this.state=t.data,1==this.state?(this.playbackstarted=!0,this.playsupported=!0,this.duration=this._player.getDuration(),this.durationformatted=this._toHHMMSS(this.duration),this.__updatePlaybackStatsInterval||(this.__updatePlaybackStatsInterval=setInterval(this._updatePlaybackStats.bind(this),this.statsUpdateInterval))):this.__updatePlaybackStatsInterval&&(clearInterval(this.__updatePlaybackStatsInterval),this.__updatePlaybackStatsInterval=null),this.fire("google-youtube-state-change",t)}.bind(this),onPlaybackQualityChange:function(t){this.playbackquality=t.data}.bind(this),onPlaybackRateChange:function(t){this.playbackrate=t.data}.bind(this),onError:function(t){this.state=0,this.fire("google-youtube-error",t)}.bind(this)}})},_updatePlaybackStats:function(){this.currenttime=this.statsUpdateInterval>=1e3?Math.round(this._player.getCurrentTime()):this._player.getCurrentTime(),this.currenttimeformatted=this._toHHMMSS(this.currenttime),this.fractionloaded=this._player.getVideoLoadedFraction(),this.volume=this._player.getVolume()},_toHHMMSS:function(t){var e=Math.floor(t/3600);t-=3600*e;var r=Math.floor(t/60),i=Math.round(t-60*r),n="";return e>0&&(n+=e+":",r<10&&(r="0"+r)),i<10&&(i="0"+i),n+r+":"+i},_handleThumbnailTap:function(){this.autoplay=1,this.thumbnail=""}})},490:(t,e)=>{"use strict";function r(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}function i(t,e,i){return e&&r(t.prototype,e),i&&r(t,i),t}function n(){return n=Object.assign||function(t){for(var e=1;e<arguments.length;e++){var r=arguments[e];for(var i in r)Object.prototype.hasOwnProperty.call(r,i)&&(t[i]=r[i])}return t},n.apply(this,arguments)}function A(t,e){t.prototype=Object.create(e.prototype),t.prototype.constructor=t,s(t,e)}function o(t){return o=Object.setPrototypeOf?Object.getPrototypeOf:function(t){return t.__proto__||Object.getPrototypeOf(t)},o(t)}function s(t,e){return s=Object.setPrototypeOf||function(t,e){return t.__proto__=e,t},s(t,e)}function a(){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 l(t,e,r){return l=a()?Reflect.construct:function(t,e,r){var i=[null];i.push.apply(i,e);var n=new(Function.bind.apply(t,i));return r&&s(n,r.prototype),n},l.apply(null,arguments)}function c(t){var e="function"==typeof Map?new Map:void 0;return c=function(t){if(null===t||(r=t,-1===Function.toString.call(r).indexOf("[native code]")))return t;var r;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,i)}function i(){return l(t,arguments,o(this).constructor)}return i.prototype=Object.create(t.prototype,{constructor:{value:i,enumerable:!1,writable:!0,configurable:!0}}),s(i,t)},c(t)}function d(t,e){if(null==t)return{};var r,i,n={},A=Object.keys(t);for(i=0;i<A.length;i++)r=A[i],e.indexOf(r)>=0||(n[r]=t[r]);return n}function u(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function h(t,e){var r="undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(r)return(r=r.call(t)).next.bind(r);if(Array.isArray(t)||(r=function(t,e){if(t){if("string"==typeof t)return u(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)?u(t,e):void 0}}(t))||e&&t&&"number"==typeof t.length){r&&(t=r);var i=0;return function(){return i>=t.length?{done:!0}:{done:!1,value:t[i++]}}}throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}Object.defineProperty(e,"__esModule",{value:!0});var p=function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e}(c(Error)),f=function(t){function e(e){return t.call(this,"Invalid DateTime: "+e.toMessage())||this}return A(e,t),e}(p),m=function(t){function e(e){return t.call(this,"Invalid Interval: "+e.toMessage())||this}return A(e,t),e}(p),g=function(t){function e(e){return t.call(this,"Invalid Duration: "+e.toMessage())||this}return A(e,t),e}(p),v=function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e}(p),y=function(t){function e(e){return t.call(this,"Invalid unit "+e)||this}return A(e,t),e}(p),b=function(t){function e(){return t.apply(this,arguments)||this}return A(e,t),e}(p),_=function(t){function e(){return t.call(this,"Zone is an abstract class")||this}return A(e,t),e}(p),w="numeric",x="short",k="long",S={year:w,month:w,day:w},C={year:w,month:x,day:w},E={year:w,month:x,day:w,weekday:x},P={year:w,month:k,day:w},T={year:w,month:k,day:w,weekday:k},O={hour:w,minute:w},N={hour:w,minute:w,second:w},$={hour:w,minute:w,second:w,timeZoneName:x},I={hour:w,minute:w,second:w,timeZoneName:k},M={hour:w,minute:w,hourCycle:"h23"},D={hour:w,minute:w,second:w,hourCycle:"h23"},L={hour:w,minute:w,second:w,hourCycle:"h23",timeZoneName:x},z={hour:w,minute:w,second:w,hourCycle:"h23",timeZoneName:k},B={year:w,month:w,day:w,hour:w,minute:w},R={year:w,month:w,day:w,hour:w,minute:w,second:w},F={year:w,month:x,day:w,hour:w,minute:w},H={year:w,month:x,day:w,hour:w,minute:w,second:w},V={year:w,month:x,day:w,weekday:x,hour:w,minute:w},U={year:w,month:k,day:w,hour:w,minute:w,timeZoneName:x},Y={year:w,month:k,day:w,hour:w,minute:w,second:w,timeZoneName:x},q={year:w,month:k,day:w,weekday:k,hour:w,minute:w,timeZoneName:k},j={year:w,month:k,day:w,weekday:k,hour:w,minute:w,second:w,timeZoneName:k};function Q(t){return void 0===t}function W(t){return"number"==typeof t}function Z(t){return"number"==typeof t&&t%1==0}function G(){try{return"undefined"!=typeof Intl&&!!Intl.RelativeTimeFormat}catch(t){return!1}}function J(t,e,r){if(0!==t.length)return t.reduce((function(t,i){var n=[e(i),i];return t&&r(t[0],n[0])===t[0]?t:n}),null)[1]}function X(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function K(t,e,r){return Z(t)&&t>=e&&t<=r}function tt(t,e){return void 0===e&&(e=2),t<0?"-"+(""+-t).padStart(e,"0"):(""+t).padStart(e,"0")}function et(t){return Q(t)||null===t||""===t?void 0:parseInt(t,10)}function rt(t){return Q(t)||null===t||""===t?void 0:parseFloat(t)}function it(t){if(!Q(t)&&null!==t&&""!==t){var e=1e3*parseFloat("0."+t);return Math.floor(e)}}function nt(t,e,r){void 0===r&&(r=!1);var i=Math.pow(10,e);return(r?Math.trunc:Math.round)(t*i)/i}function At(t){return t%4==0&&(t%100!=0||t%400==0)}function ot(t){return At(t)?366:365}function st(t,e){var r,i=(r=e-1)-12*Math.floor(r/12)+1;return 2===i?At(t+(e-i)/12)?29:28:[31,null,31,30,31,30,31,31,30,31,30,31][i-1]}function at(t){var e=Date.UTC(t.year,t.month-1,t.day,t.hour,t.minute,t.second,t.millisecond);return t.year<100&&t.year>=0&&(e=new Date(e)).setUTCFullYear(e.getUTCFullYear()-1900),+e}function lt(t){var e=(t+Math.floor(t/4)-Math.floor(t/100)+Math.floor(t/400))%7,r=t-1,i=(r+Math.floor(r/4)-Math.floor(r/100)+Math.floor(r/400))%7;return 4===e||3===i?53:52}function ct(t){return t>99?t:t>60?1900+t:2e3+t}function dt(t,e,r,i){void 0===i&&(i=null);var A=new Date(t),o={hourCycle:"h23",year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit"};i&&(o.timeZone=i);var s=n({timeZoneName:e},o),a=new Intl.DateTimeFormat(r,s).formatToParts(A).find((function(t){return"timezonename"===t.type.toLowerCase()}));return a?a.value:null}function ut(t,e){var r=parseInt(t,10);Number.isNaN(r)&&(r=0);var i=parseInt(e,10)||0;return 60*r+(r<0||Object.is(r,-0)?-i:i)}function ht(t){var e=Number(t);if("boolean"==typeof t||""===t||Number.isNaN(e))throw new b("Invalid unit value "+t);return e}function pt(t,e){var r={};for(var i in t)if(X(t,i)){var n=t[i];if(null==n)continue;r[e(i)]=ht(n)}return r}function ft(t,e){var r=Math.trunc(Math.abs(t/60)),i=Math.trunc(Math.abs(t%60)),n=t>=0?"+":"-";switch(e){case"short":return""+n+tt(r,2)+":"+tt(i,2);case"narrow":return""+n+r+(i>0?":"+i:"");case"techie":return""+n+tt(r,2)+tt(i,2);default:throw new RangeError("Value format "+e+" is out of range for property format")}}function mt(t){return function(t,e){return["hour","minute","second","millisecond"].reduce((function(e,r){return e[r]=t[r],e}),{})}(t)}var gt=/[A-Za-z_+-]{1,256}(:?\/[A-Za-z0-9_+-]{1,256}(\/[A-Za-z0-9_+-]{1,256})?)?/,vt=["January","February","March","April","May","June","July","August","September","October","November","December"],yt=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],bt=["J","F","M","A","M","J","J","A","S","O","N","D"];function _t(t){switch(t){case"narrow":return[].concat(bt);case"short":return[].concat(yt);case"long":return[].concat(vt);case"numeric":return["1","2","3","4","5","6","7","8","9","10","11","12"];case"2-digit":return["01","02","03","04","05","06","07","08","09","10","11","12"];default:return null}}var wt=["Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday"],xt=["Mon","Tue","Wed","Thu","Fri","Sat","Sun"],kt=["M","T","W","T","F","S","S"];function St(t){switch(t){case"narrow":return[].concat(kt);case"short":return[].concat(xt);case"long":return[].concat(wt);case"numeric":return["1","2","3","4","5","6","7"];default:return null}}var Ct=["AM","PM"],Et=["Before Christ","Anno Domini"],Pt=["BC","AD"],Tt=["B","A"];function Ot(t){switch(t){case"narrow":return[].concat(Tt);case"short":return[].concat(Pt);case"long":return[].concat(Et);default:return null}}function Nt(t,e){for(var r,i="",n=h(t);!(r=n()).done;){var A=r.value;A.literal?i+=A.val:i+=e(A.val)}return i}var $t={D:S,DD:C,DDD:P,DDDD:T,t:O,tt:N,ttt:$,tttt:I,T:M,TT:D,TTT:L,TTTT:z,f:B,ff:F,fff:U,ffff:q,F:R,FF:H,FFF:Y,FFFF:j},It=function(){function t(t,e){this.opts=e,this.loc=t,this.systemLoc=null}t.create=function(e,r){return void 0===r&&(r={}),new t(e,r)},t.parseFormat=function(t){for(var e=null,r="",i=!1,n=[],A=0;A<t.length;A++){var o=t.charAt(A);"'"===o?(r.length>0&&n.push({literal:i,val:r}),e=null,r="",i=!i):i||o===e?r+=o:(r.length>0&&n.push({literal:!1,val:r}),r=o,e=o)}return r.length>0&&n.push({literal:i,val:r}),n},t.macroTokenToFormatOpts=function(t){return $t[t]};var e=t.prototype;return e.formatWithSystemDefault=function(t,e){return null===this.systemLoc&&(this.systemLoc=this.loc.redefaultToSystem()),this.systemLoc.dtFormatter(t,n({},this.opts,e)).format()},e.formatDateTime=function(t,e){return void 0===e&&(e={}),this.loc.dtFormatter(t,n({},this.opts,e)).format()},e.formatDateTimeParts=function(t,e){return void 0===e&&(e={}),this.loc.dtFormatter(t,n({},this.opts,e)).formatToParts()},e.resolvedOptions=function(t,e){return void 0===e&&(e={}),this.loc.dtFormatter(t,n({},this.opts,e)).resolvedOptions()},e.num=function(t,e){if(void 0===e&&(e=0),this.opts.forceSimple)return tt(t,e);var r=n({},this.opts);return e>0&&(r.padTo=e),this.loc.numberFormatter(r).format(t)},e.formatDateTimeFromString=function(e,r){var i=this,n="en"===this.loc.listingMode(),A=this.loc.outputCalendar&&"gregory"!==this.loc.outputCalendar,o=function(t,r){return i.loc.extract(e,t,r)},s=function(t){return e.isOffsetFixed&&0===e.offset&&t.allowZ?"Z":e.isValid?e.zone.formatOffset(e.ts,t.format):""},a=function(t,r){return n?function(t,e){return _t(e)[t.month-1]}(e,t):o(r?{month:t}:{month:t,day:"numeric"},"month")},l=function(t,r){return n?function(t,e){return St(e)[t.weekday-1]}(e,t):o(r?{weekday:t}:{weekday:t,month:"long",day:"numeric"},"weekday")},c=function(t){return n?function(t,e){return Ot(e)[t.year<0?0:1]}(e,t):o({era:t},"era")};return Nt(t.parseFormat(r),(function(r){switch(r){case"S":return i.num(e.millisecond);case"u":case"SSS":return i.num(e.millisecond,3);case"s":return i.num(e.second);case"ss":return i.num(e.second,2);case"uu":return i.num(Math.floor(e.millisecond/10),2);case"uuu":return i.num(Math.floor(e.millisecond/100));case"m":return i.num(e.minute);case"mm":return i.num(e.minute,2);case"h":return i.num(e.hour%12==0?12:e.hour%12);case"hh":return i.num(e.hour%12==0?12:e.hour%12,2);case"H":return i.num(e.hour);case"HH":return i.num(e.hour,2);case"Z":return s({format:"narrow",allowZ:i.opts.allowZ});case"ZZ":return s({format:"short",allowZ:i.opts.allowZ});case"ZZZ":return s({format:"techie",allowZ:i.opts.allowZ});case"ZZZZ":return e.zone.offsetName(e.ts,{format:"short",locale:i.loc.locale});case"ZZZZZ":return e.zone.offsetName(e.ts,{format:"long",locale:i.loc.locale});case"z":return e.zoneName;case"a":return n?function(t){return Ct[t.hour<12?0:1]}(e):o({hour:"numeric",hourCycle:"h12"},"dayperiod");case"d":return A?o({day:"numeric"},"day"):i.num(e.day);case"dd":return A?o({day:"2-digit"},"day"):i.num(e.day,2);case"c":case"E":return i.num(e.weekday);case"ccc":return l("short",!0);case"cccc":return l("long",!0);case"ccccc":return l("narrow",!0);case"EEE":return l("short",!1);case"EEEE":return l("long",!1);case"EEEEE":return l("narrow",!1);case"L":return A?o({month:"numeric",day:"numeric"},"month"):i.num(e.month);case"LL":return A?o({month:"2-digit",day:"numeric"},"month"):i.num(e.month,2);case"LLL":return a("short",!0);case"LLLL":return a("long",!0);case"LLLLL":return a("narrow",!0);case"M":return A?o({month:"numeric"},"month"):i.num(e.month);case"MM":return A?o({month:"2-digit"},"month"):i.num(e.month,2);case"MMM":return a("short",!1);case"MMMM":return a("long",!1);case"MMMMM":return a("narrow",!1);case"y":return A?o({year:"numeric"},"year"):i.num(e.year);case"yy":return A?o({year:"2-digit"},"year"):i.num(e.year.toString().slice(-2),2);case"yyyy":return A?o({year:"numeric"},"year"):i.num(e.year,4);case"yyyyyy":return A?o({year:"numeric"},"year"):i.num(e.year,6);case"G":return c("short");case"GG":return c("long");case"GGGGG":return c("narrow");case"kk":return i.num(e.weekYear.toString().slice(-2),2);case"kkkk":return i.num(e.weekYear,4);case"W":return i.num(e.weekNumber);case"WW":return i.num(e.weekNumber,2);case"o":return i.num(e.ordinal);case"ooo":return i.num(e.ordinal,3);case"q":return i.num(e.quarter);case"qq":return i.num(e.quarter,2);case"X":return i.num(Math.floor(e.ts/1e3));case"x":return i.num(e.ts);default:return function(r){var n=t.macroTokenToFormatOpts(r);return n?i.formatWithSystemDefault(e,n):r}(r)}}))},e.formatDurationFromString=function(e,r){var i,n=this,A=function(t){switch(t[0]){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":return"hour";case"d":return"day";case"M":return"month";case"y":return"year";default:return null}},o=t.parseFormat(r),s=o.reduce((function(t,e){var r=e.literal,i=e.val;return r?t:t.concat(i)}),[]),a=e.shiftTo.apply(e,s.map(A).filter((function(t){return t})));return Nt(o,(i=a,function(t){var e=A(t);return e?n.num(i.get(e),t.length):t}))},t}(),Mt=function(){function t(t,e){this.reason=t,this.explanation=e}return t.prototype.toMessage=function(){return this.explanation?this.reason+": "+this.explanation:this.reason},t}(),Dt=function(){function t(){}var e=t.prototype;return e.offsetName=function(t,e){throw new _},e.formatOffset=function(t,e){throw new _},e.offset=function(t){throw new _},e.equals=function(t){throw new _},i(t,[{key:"type",get:function(){throw new _}},{key:"name",get:function(){throw new _}},{key:"isUniversal",get:function(){throw new _}},{key:"isValid",get:function(){throw new _}}]),t}(),Lt=null,zt=function(t){function e(){return t.apply(this,arguments)||this}A(e,t);var r=e.prototype;return r.offsetName=function(t,e){return dt(t,e.format,e.locale)},r.formatOffset=function(t,e){return ft(this.offset(t),e)},r.offset=function(t){return-new Date(t).getTimezoneOffset()},r.equals=function(t){return"system"===t.type},i(e,[{key:"type",get:function(){return"system"}},{key:"name",get:function(){return(new Intl.DateTimeFormat).resolvedOptions().timeZone}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!0}}],[{key:"instance",get:function(){return null===Lt&&(Lt=new e),Lt}}]),e}(Dt),Bt=RegExp("^"+gt.source+"$"),Rt={},Ft={year:0,month:1,day:2,hour:3,minute:4,second:5},Ht={},Vt=function(t){function e(r){var i;return(i=t.call(this)||this).zoneName=r,i.valid=e.isValidZone(r),i}A(e,t),e.create=function(t){return Ht[t]||(Ht[t]=new e(t)),Ht[t]},e.resetCache=function(){Ht={},Rt={}},e.isValidSpecifier=function(t){return!(!t||!t.match(Bt))},e.isValidZone=function(t){if(!t)return!1;try{return new Intl.DateTimeFormat("en-US",{timeZone:t}).format(),!0}catch(t){return!1}};var r=e.prototype;return r.offsetName=function(t,e){return dt(t,e.format,e.locale,this.name)},r.formatOffset=function(t,e){return ft(this.offset(t),e)},r.offset=function(t){var e=new Date(t);if(isNaN(e))return NaN;var r,i=(r=this.name,Rt[r]||(Rt[r]=new Intl.DateTimeFormat("en-US",{hour12:!1,timeZone:r,year:"numeric",month:"2-digit",day:"2-digit",hour:"2-digit",minute:"2-digit",second:"2-digit"})),Rt[r]),n=i.formatToParts?function(t,e){for(var r=t.formatToParts(e),i=[],n=0;n<r.length;n++){var A=r[n],o=A.type,s=A.value,a=Ft[o];Q(a)||(i[a]=parseInt(s,10))}return i}(i,e):function(t,e){var r=t.format(e).replace(/\u200E/g,""),i=/(\d+)\/(\d+)\/(\d+),? (\d+):(\d+):(\d+)/.exec(r),n=i[1],A=i[2];return[i[3],n,A,i[4],i[5],i[6]]}(i,e),A=n[0],o=n[1],s=n[2],a=n[3],l=+e,c=l%1e3;return(at({year:A,month:o,day:s,hour:24===a?0:a,minute:n[4],second:n[5],millisecond:0})-(l-=c>=0?c:1e3+c))/6e4},r.equals=function(t){return"iana"===t.type&&t.name===this.name},i(e,[{key:"type",get:function(){return"iana"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return this.valid}}]),e}(Dt),Ut=null,Yt=function(t){function e(e){var r;return(r=t.call(this)||this).fixed=e,r}A(e,t),e.instance=function(t){return 0===t?e.utcInstance:new e(t)},e.parseSpecifier=function(t){if(t){var r=t.match(/^utc(?:([+-]\d{1,2})(?::(\d{2}))?)?$/i);if(r)return new e(ut(r[1],r[2]))}return null};var r=e.prototype;return r.offsetName=function(){return this.name},r.formatOffset=function(t,e){return ft(this.fixed,e)},r.offset=function(){return this.fixed},r.equals=function(t){return"fixed"===t.type&&t.fixed===this.fixed},i(e,[{key:"type",get:function(){return"fixed"}},{key:"name",get:function(){return 0===this.fixed?"UTC":"UTC"+ft(this.fixed,"narrow")}},{key:"isUniversal",get:function(){return!0}},{key:"isValid",get:function(){return!0}}],[{key:"utcInstance",get:function(){return null===Ut&&(Ut=new e(0)),Ut}}]),e}(Dt),qt=function(t){function e(e){var r;return(r=t.call(this)||this).zoneName=e,r}A(e,t);var r=e.prototype;return r.offsetName=function(){return null},r.formatOffset=function(){return""},r.offset=function(){return NaN},r.equals=function(){return!1},i(e,[{key:"type",get:function(){return"invalid"}},{key:"name",get:function(){return this.zoneName}},{key:"isUniversal",get:function(){return!1}},{key:"isValid",get:function(){return!1}}]),e}(Dt);function jt(t,e){if(Q(t)||null===t)return e;if(t instanceof Dt)return t;if("string"==typeof t){var r=t.toLowerCase();return"local"===r||"system"===r?e:"utc"===r||"gmt"===r?Yt.utcInstance:Vt.isValidSpecifier(r)?Vt.create(t):Yt.parseSpecifier(r)||new qt(t)}return W(t)?Yt.instance(t):"object"==typeof t&&t.offset&&"number"==typeof t.offset?t:new qt(t)}var Qt,Wt=function(){return Date.now()},Zt="system",Gt=null,Jt=null,Xt=null,Kt=function(){function t(){}return t.resetCaches=function(){ue.resetCache(),Vt.resetCache()},i(t,null,[{key:"now",get:function(){return Wt},set:function(t){Wt=t}},{key:"defaultZone",get:function(){return jt(Zt,zt.instance)},set:function(t){Zt=t}},{key:"defaultLocale",get:function(){return Gt},set:function(t){Gt=t}},{key:"defaultNumberingSystem",get:function(){return Jt},set:function(t){Jt=t}},{key:"defaultOutputCalendar",get:function(){return Xt},set:function(t){Xt=t}},{key:"throwOnInvalid",get:function(){return Qt},set:function(t){Qt=t}}]),t}(),te=["base"],ee=["padTo","floor"],re={},ie={};function ne(t,e){void 0===e&&(e={});var r=JSON.stringify([t,e]),i=ie[r];return i||(i=new Intl.DateTimeFormat(t,e),ie[r]=i),i}var Ae={},oe={},se=null;function ae(t,e,r,i,n){var A=t.listingMode(r);return"error"===A?null:"en"===A?i(e):n(e)}var le=function(){function t(t,e,r){this.padTo=r.padTo||0,this.floor=r.floor||!1,r.padTo,r.floor;var i=d(r,ee);if(!e||Object.keys(i).length>0){var A=n({useGrouping:!1},r);r.padTo>0&&(A.minimumIntegerDigits=r.padTo),this.inf=function(t,e){void 0===e&&(e={});var r=JSON.stringify([t,e]),i=Ae[r];return i||(i=new Intl.NumberFormat(t,e),Ae[r]=i),i}(t,A)}}return t.prototype.format=function(t){if(this.inf){var e=this.floor?Math.floor(t):t;return this.inf.format(e)}return tt(this.floor?Math.floor(t):nt(t,3),this.padTo)},t}(),ce=function(){function t(t,e,r){var i;if(this.opts=r,t.zone.isUniversal){var A=t.offset/60*-1,o=A>=0?"Etc/GMT+"+A:"Etc/GMT"+A;0!==t.offset&&Vt.create(o).valid?(i=o,this.dt=t):(i="UTC",r.timeZoneName?this.dt=t:this.dt=0===t.offset?t:li.fromMillis(t.ts+60*t.offset*1e3))}else"system"===t.zone.type?this.dt=t:(this.dt=t,i=t.zone.name);var s=n({},this.opts);i&&(s.timeZone=i),this.dtf=ne(e,s)}var e=t.prototype;return e.format=function(){return this.dtf.format(this.dt.toJSDate())},e.formatToParts=function(){return this.dtf.formatToParts(this.dt.toJSDate())},e.resolvedOptions=function(){return this.dtf.resolvedOptions()},t}(),de=function(){function t(t,e,r){this.opts=n({style:"long"},r),!e&&G()&&(this.rtf=function(t,e){void 0===e&&(e={});var r=e;r.base;var i=d(r,te),n=JSON.stringify([t,i]),A=oe[n];return A||(A=new Intl.RelativeTimeFormat(t,e),oe[n]=A),A}(t,r))}var e=t.prototype;return e.format=function(t,e){return this.rtf?this.rtf.format(t,e):function(t,e,r,i){void 0===r&&(r="always"),void 0===i&&(i=!1);var n={years:["year","yr."],quarters:["quarter","qtr."],months:["month","mo."],weeks:["week","wk."],days:["day","day","days"],hours:["hour","hr."],minutes:["minute","min."],seconds:["second","sec."]},A=-1===["hours","minutes","seconds"].indexOf(t);if("auto"===r&&A){var o="days"===t;switch(e){case 1:return o?"tomorrow":"next "+n[t][0];case-1:return o?"yesterday":"last "+n[t][0];case 0:return o?"today":"this "+n[t][0]}}var s=Object.is(e,-0)||e<0,a=Math.abs(e),l=1===a,c=n[t],d=i?l?c[1]:c[2]||c[1]:l?n[t][0]:t;return s?a+" "+d+" ago":"in "+a+" "+d}(e,t,this.opts.numeric,"long"!==this.opts.style)},e.formatToParts=function(t,e){return this.rtf?this.rtf.formatToParts(t,e):[]},t}(),ue=function(){function t(t,e,r,i){var n=function(t){var e=t.indexOf("-u-");if(-1===e)return[t];var r,i=t.substring(0,e);try{r=ne(t).resolvedOptions()}catch(t){r=ne(i).resolvedOptions()}var n=r;return[i,n.numberingSystem,n.calendar]}(t),A=n[0],o=n[1],s=n[2];this.locale=A,this.numberingSystem=e||o||null,this.outputCalendar=r||s||null,this.intl=function(t,e,r){return r||e?(t+="-u",r&&(t+="-ca-"+r),e&&(t+="-nu-"+e),t):t}(this.locale,this.numberingSystem,this.outputCalendar),this.weekdaysCache={format:{},standalone:{}},this.monthsCache={format:{},standalone:{}},this.meridiemCache=null,this.eraCache={},this.specifiedLocale=i,this.fastNumbersCached=null}t.fromOpts=function(e){return t.create(e.locale,e.numberingSystem,e.outputCalendar,e.defaultToEN)},t.create=function(e,r,i,n){void 0===n&&(n=!1);var A=e||Kt.defaultLocale;return new t(A||(n?"en-US":se||(se=(new Intl.DateTimeFormat).resolvedOptions().locale)),r||Kt.defaultNumberingSystem,i||Kt.defaultOutputCalendar,A)},t.resetCache=function(){se=null,ie={},Ae={},oe={}},t.fromObject=function(e){var r=void 0===e?{}:e,i=r.locale,n=r.numberingSystem,A=r.outputCalendar;return t.create(i,n,A)};var e=t.prototype;return e.listingMode=function(){var t=this.isEnglish(),e=!(null!==this.numberingSystem&&"latn"!==this.numberingSystem||null!==this.outputCalendar&&"gregory"!==this.outputCalendar);return t&&e?"en":"intl"},e.clone=function(e){return e&&0!==Object.getOwnPropertyNames(e).length?t.create(e.locale||this.specifiedLocale,e.numberingSystem||this.numberingSystem,e.outputCalendar||this.outputCalendar,e.defaultToEN||!1):this},e.redefaultToEN=function(t){return void 0===t&&(t={}),this.clone(n({},t,{defaultToEN:!0}))},e.redefaultToSystem=function(t){return void 0===t&&(t={}),this.clone(n({},t,{defaultToEN:!1}))},e.months=function(t,e,r){var i=this;return void 0===e&&(e=!1),void 0===r&&(r=!0),ae(this,t,r,_t,(function(){var r=e?{month:t,day:"numeric"}:{month:t},n=e?"format":"standalone";return i.monthsCache[n][t]||(i.monthsCache[n][t]=function(t){for(var e=[],r=1;r<=12;r++){var i=li.utc(2016,r,1);e.push(t(i))}return e}((function(t){return i.extract(t,r,"month")}))),i.monthsCache[n][t]}))},e.weekdays=function(t,e,r){var i=this;return void 0===e&&(e=!1),void 0===r&&(r=!0),ae(this,t,r,St,(function(){var r=e?{weekday:t,year:"numeric",month:"long",day:"numeric"}:{weekday:t},n=e?"format":"standalone";return i.weekdaysCache[n][t]||(i.weekdaysCache[n][t]=function(t){for(var e=[],r=1;r<=7;r++){var i=li.utc(2016,11,13+r);e.push(t(i))}return e}((function(t){return i.extract(t,r,"weekday")}))),i.weekdaysCache[n][t]}))},e.meridiems=function(t){var e=this;return void 0===t&&(t=!0),ae(this,void 0,t,(function(){return Ct}),(function(){if(!e.meridiemCache){var t={hour:"numeric",hourCycle:"h12"};e.meridiemCache=[li.utc(2016,11,13,9),li.utc(2016,11,13,19)].map((function(r){return e.extract(r,t,"dayperiod")}))}return e.meridiemCache}))},e.eras=function(t,e){var r=this;return void 0===e&&(e=!0),ae(this,t,e,Ot,(function(){var e={era:t};return r.eraCache[t]||(r.eraCache[t]=[li.utc(-40,1,1),li.utc(2017,1,1)].map((function(t){return r.extract(t,e,"era")}))),r.eraCache[t]}))},e.extract=function(t,e,r){var i=this.dtFormatter(t,e).formatToParts().find((function(t){return t.type.toLowerCase()===r}));return i?i.value:null},e.numberFormatter=function(t){return void 0===t&&(t={}),new le(this.intl,t.forceSimple||this.fastNumbers,t)},e.dtFormatter=function(t,e){return void 0===e&&(e={}),new ce(t,this.intl,e)},e.relFormatter=function(t){return void 0===t&&(t={}),new de(this.intl,this.isEnglish(),t)},e.listFormatter=function(t){return void 0===t&&(t={}),function(t,e){void 0===e&&(e={});var r=JSON.stringify([t,e]),i=re[r];return i||(i=new Intl.ListFormat(t,e),re[r]=i),i}(this.intl,t)},e.isEnglish=function(){return"en"===this.locale||"en-us"===this.locale.toLowerCase()||new Intl.DateTimeFormat(this.intl).resolvedOptions().locale.startsWith("en-us")},e.equals=function(t){return this.locale===t.locale&&this.numberingSystem===t.numberingSystem&&this.outputCalendar===t.outputCalendar},i(t,[{key:"fastNumbers",get:function(){var t;return null==this.fastNumbersCached&&(this.fastNumbersCached=(!(t=this).numberingSystem||"latn"===t.numberingSystem)&&("latn"===t.numberingSystem||!t.locale||t.locale.startsWith("en")||"latn"===new Intl.DateTimeFormat(t.intl).resolvedOptions().numberingSystem)),this.fastNumbersCached}}]),t}();function he(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];var i=e.reduce((function(t,e){return t+e.source}),"");return RegExp("^"+i+"$")}function pe(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t){return e.reduce((function(e,r){var i=e[0],A=e[1],o=e[2],s=r(t,o),a=s[0],l=s[1],c=s[2];return[n({},i,a),A||l,c]}),[{},null,1]).slice(0,2)}}function fe(t){if(null==t)return[null,null];for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];for(var n=0,A=r;n<A.length;n++){var o=A[n],s=o[0],a=o[1],l=s.exec(t);if(l)return a(l)}return[null,null]}function me(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return function(t,r){var i,n={};for(i=0;i<e.length;i++)n[e[i]]=et(t[r+i]);return[n,null,r+i]}}var ge=/(?:(Z)|([+-]\d\d)(?::?(\d\d))?)/,ve=/(\d\d)(?::?(\d\d)(?::?(\d\d)(?:[.,](\d{1,30}))?)?)?/,ye=RegExp(""+ve.source+ge.source+"?"),be=RegExp("(?:T"+ye.source+")?"),_e=me("weekYear","weekNumber","weekDay"),we=me("year","ordinal"),xe=RegExp(ve.source+" ?(?:"+ge.source+"|("+gt.source+"))?"),ke=RegExp("(?: "+xe.source+")?");function Se(t,e,r){var i=t[e];return Q(i)?r:et(i)}function Ce(t,e){return[{year:Se(t,e),month:Se(t,e+1,1),day:Se(t,e+2,1)},null,e+3]}function Ee(t,e){return[{hours:Se(t,e,0),minutes:Se(t,e+1,0),seconds:Se(t,e+2,0),milliseconds:it(t[e+3])},null,e+4]}function Pe(t,e){var r=!t[e]&&!t[e+1],i=ut(t[e+1],t[e+2]);return[{},r?null:Yt.instance(i),e+3]}function Te(t,e){return[{},t[e]?Vt.create(t[e]):null,e+1]}var Oe=RegExp("^T?"+ve.source+"$"),Ne=/^-?P(?:(?:(-?\d{1,9}(?:\.\d{1,9})?)Y)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,9}(?:\.\d{1,9})?)W)?(?:(-?\d{1,9}(?:\.\d{1,9})?)D)?(?:T(?:(-?\d{1,9}(?:\.\d{1,9})?)H)?(?:(-?\d{1,9}(?:\.\d{1,9})?)M)?(?:(-?\d{1,20})(?:[.,](-?\d{1,9}))?S)?)?)$/;function $e(t){var e=t[0],r=t[1],i=t[2],n=t[3],A=t[4],o=t[5],s=t[6],a=t[7],l=t[8],c="-"===e[0],d=a&&"-"===a[0],u=function(t,e){return void 0===e&&(e=!1),void 0!==t&&(e||t&&c)?-t:t};return[{years:u(rt(r)),months:u(rt(i)),weeks:u(rt(n)),days:u(rt(A)),hours:u(rt(o)),minutes:u(rt(s)),seconds:u(rt(a),"-0"===a),milliseconds:u(it(l),d)}]}var Ie={GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function Me(t,e,r,i,n,A,o){var s={year:2===e.length?ct(et(e)):et(e),month:yt.indexOf(r)+1,day:et(i),hour:et(n),minute:et(A)};return o&&(s.second=et(o)),t&&(s.weekday=t.length>3?wt.indexOf(t)+1:xt.indexOf(t)+1),s}var De=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|(?:([+-]\d\d)(\d\d)))$/;function Le(t){var e,r=t[1],i=t[2],n=t[3],A=t[4],o=t[5],s=t[6],a=t[7],l=t[8],c=t[9],d=t[10],u=t[11],h=Me(r,A,n,i,o,s,a);return e=l?Ie[l]:c?0:ut(d,u),[h,new Yt(e)]}var ze=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun), (\d\d) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) (\d{4}) (\d\d):(\d\d):(\d\d) GMT$/,Be=/^(Monday|Tuesday|Wedsday|Thursday|Friday|Saturday|Sunday), (\d\d)-(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)-(\d\d) (\d\d):(\d\d):(\d\d) GMT$/,Re=/^(Mon|Tue|Wed|Thu|Fri|Sat|Sun) (Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec) ( \d|\d\d) (\d\d):(\d\d):(\d\d) (\d{4})$/;function Fe(t){var e=t[1],r=t[2],i=t[3];return[Me(e,t[4],i,r,t[5],t[6],t[7]),Yt.utcInstance]}function He(t){var e=t[1],r=t[2],i=t[3],n=t[4],A=t[5],o=t[6];return[Me(e,t[7],r,i,n,A,o),Yt.utcInstance]}var Ve=he(/([+-]\d{6}|\d{4})(?:-?(\d\d)(?:-?(\d\d))?)?/,be),Ue=he(/(\d{4})-?W(\d\d)(?:-?(\d))?/,be),Ye=he(/(\d{4})-?(\d{3})/,be),qe=he(ye),je=pe(Ce,Ee,Pe),Qe=pe(_e,Ee,Pe),We=pe(we,Ee,Pe),Ze=pe(Ee,Pe),Ge=pe(Ee),Je=he(/(\d{4})-(\d\d)-(\d\d)/,ke),Xe=he(xe),Ke=pe(Ce,Ee,Pe,Te),tr=pe(Ee,Pe,Te),er={weeks:{days:7,hours:168,minutes:10080,seconds:604800,milliseconds:6048e5},days:{hours:24,minutes:1440,seconds:86400,milliseconds:864e5},hours:{minutes:60,seconds:3600,milliseconds:36e5},minutes:{seconds:60,milliseconds:6e4},seconds:{milliseconds:1e3}},rr=n({years:{quarters:4,months:12,weeks:52,days:365,hours:8760,minutes:525600,seconds:31536e3,milliseconds:31536e6},quarters:{months:3,weeks:13,days:91,hours:2184,minutes:131040,seconds:7862400,milliseconds:78624e5},months:{weeks:4,days:30,hours:720,minutes:43200,seconds:2592e3,milliseconds:2592e6}},er),ir=n({years:{quarters:4,months:12,weeks:52.1775,days:365.2425,hours:8765.82,minutes:525949.2,seconds:525949.2*60,milliseconds:525949.2*60*1e3},quarters:{months:3,weeks:13.044375,days:91.310625,hours:2191.455,minutes:131487.3,seconds:525949.2*60/4,milliseconds:7889237999.999999},months:{weeks:4.3481250000000005,days:30.436875,hours:730.485,minutes:43829.1,seconds:2629746,milliseconds:2629746e3}},er),nr=["years","quarters","months","weeks","days","hours","minutes","seconds","milliseconds"],Ar=nr.slice(0).reverse();function or(t,e,r){void 0===r&&(r=!1);var i={values:r?e.values:n({},t.values,e.values||{}),loc:t.loc.clone(e.loc),conversionAccuracy:e.conversionAccuracy||t.conversionAccuracy};return new ar(i)}function sr(t,e,r,i,n){var A=t[n][r],o=e[r]/A,s=Math.sign(o)!==Math.sign(i[n])&&0!==i[n]&&Math.abs(o)<=1?function(t){return t<0?Math.floor(t):Math.ceil(t)}(o):Math.trunc(o);i[n]+=s,e[r]-=s*A}var ar=function(){function t(t){var e="longterm"===t.conversionAccuracy||!1;this.values=t.values,this.loc=t.loc||ue.create(),this.conversionAccuracy=e?"longterm":"casual",this.invalid=t.invalid||null,this.matrix=e?ir:rr,this.isLuxonDuration=!0}t.fromMillis=function(e,r){return t.fromObject({milliseconds:e},r)},t.fromObject=function(e,r){if(void 0===r&&(r={}),null==e||"object"!=typeof e)throw new b("Duration.fromObject: argument expected to be an object, got "+(null===e?"null":typeof e));return new t({values:pt(e,t.normalizeUnit),loc:ue.fromObject(r),conversionAccuracy:r.conversionAccuracy})},t.fromDurationLike=function(e){if(W(e))return t.fromMillis(e);if(t.isDuration(e))return e;if("object"==typeof e)return t.fromObject(e);throw new b("Unknown duration argument "+e+" of type "+typeof e)},t.fromISO=function(e,r){var i=function(t){return fe(t,[Ne,$e])}(e),n=i[0];return n?t.fromObject(n,r):t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.fromISOTime=function(e,r){var i=function(t){return fe(t,[Oe,Ge])}(e),n=i[0];return n?t.fromObject(n,r):t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.invalid=function(e,r){if(void 0===r&&(r=null),!e)throw new b("need to specify a reason the Duration is invalid");var i=e instanceof Mt?e:new Mt(e,r);if(Kt.throwOnInvalid)throw new g(i);return new t({invalid:i})},t.normalizeUnit=function(t){var e={year:"years",years:"years",quarter:"quarters",quarters:"quarters",month:"months",months:"months",week:"weeks",weeks:"weeks",day:"days",days:"days",hour:"hours",hours:"hours",minute:"minutes",minutes:"minutes",second:"seconds",seconds:"seconds",millisecond:"milliseconds",milliseconds:"milliseconds"}[t?t.toLowerCase():t];if(!e)throw new y(t);return e},t.isDuration=function(t){return t&&t.isLuxonDuration||!1};var e=t.prototype;return e.toFormat=function(t,e){void 0===e&&(e={});var r=n({},e,{floor:!1!==e.round&&!1!==e.floor});return this.isValid?It.create(this.loc,r).formatDurationFromString(this,t):"Invalid Duration"},e.toHuman=function(t){var e=this;void 0===t&&(t={});var r=nr.map((function(r){var i=e.values[r];return Q(i)?null:e.loc.numberFormatter(n({style:"unit",unitDisplay:"long"},t,{unit:r.slice(0,-1)})).format(i)})).filter((function(t){return t}));return this.loc.listFormatter(n({type:"conjunction",style:t.listStyle||"narrow"},t)).format(r)},e.toObject=function(){return this.isValid?n({},this.values):{}},e.toISO=function(){if(!this.isValid)return null;var t="P";return 0!==this.years&&(t+=this.years+"Y"),0===this.months&&0===this.quarters||(t+=this.months+3*this.quarters+"M"),0!==this.weeks&&(t+=this.weeks+"W"),0!==this.days&&(t+=this.days+"D"),0===this.hours&&0===this.minutes&&0===this.seconds&&0===this.milliseconds||(t+="T"),0!==this.hours&&(t+=this.hours+"H"),0!==this.minutes&&(t+=this.minutes+"M"),0===this.seconds&&0===this.milliseconds||(t+=nt(this.seconds+this.milliseconds/1e3,3)+"S"),"P"===t&&(t+="T0S"),t},e.toISOTime=function(t){if(void 0===t&&(t={}),!this.isValid)return null;var e=this.toMillis();if(e<0||e>=864e5)return null;t=n({suppressMilliseconds:!1,suppressSeconds:!1,includePrefix:!1,format:"extended"},t);var r=this.shiftTo("hours","minutes","seconds","milliseconds"),i="basic"===t.format?"hhmm":"hh:mm";t.suppressSeconds&&0===r.seconds&&0===r.milliseconds||(i+="basic"===t.format?"ss":":ss",t.suppressMilliseconds&&0===r.milliseconds||(i+=".SSS"));var A=r.toFormat(i);return t.includePrefix&&(A="T"+A),A},e.toJSON=function(){return this.toISO()},e.toString=function(){return this.toISO()},e.toMillis=function(){return this.as("milliseconds")},e.valueOf=function(){return this.toMillis()},e.plus=function(e){if(!this.isValid)return this;for(var r,i=t.fromDurationLike(e),n={},A=h(nr);!(r=A()).done;){var o=r.value;(X(i.values,o)||X(this.values,o))&&(n[o]=i.get(o)+this.get(o))}return or(this,{values:n},!0)},e.minus=function(e){if(!this.isValid)return this;var r=t.fromDurationLike(e);return this.plus(r.negate())},e.mapUnits=function(t){if(!this.isValid)return this;for(var e={},r=0,i=Object.keys(this.values);r<i.length;r++){var n=i[r];e[n]=ht(t(this.values[n],n))}return or(this,{values:e},!0)},e.get=function(e){return this[t.normalizeUnit(e)]},e.set=function(e){return this.isValid?or(this,{values:n({},this.values,pt(e,t.normalizeUnit))}):this},e.reconfigure=function(t){var e=void 0===t?{}:t,r=e.locale,i=e.numberingSystem,n=e.conversionAccuracy,A={loc:this.loc.clone({locale:r,numberingSystem:i})};return n&&(A.conversionAccuracy=n),or(this,A)},e.as=function(t){return this.isValid?this.shiftTo(t).get(t):NaN},e.normalize=function(){if(!this.isValid)return this;var t=this.toObject();return function(t,e){Ar.reduce((function(r,i){return Q(e[i])?r:(r&&sr(t,e,r,e,i),i)}),null)}(this.matrix,t),or(this,{values:t},!0)},e.shiftTo=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(!this.isValid)return this;if(0===r.length)return this;r=r.map((function(e){return t.normalizeUnit(e)}));for(var n,A,o={},s={},a=this.toObject(),l=h(nr);!(A=l()).done;){var c=A.value;if(r.indexOf(c)>=0){n=c;var d=0;for(var u in s)d+=this.matrix[u][c]*s[u],s[u]=0;W(a[c])&&(d+=a[c]);var p=Math.trunc(d);for(var f in o[c]=p,s[c]=(1e3*d-1e3*p)/1e3,a)nr.indexOf(f)>nr.indexOf(c)&&sr(this.matrix,a,f,o,c)}else W(a[c])&&(s[c]=a[c])}for(var m in s)0!==s[m]&&(o[n]+=m===n?s[m]:s[m]/this.matrix[n][m]);return or(this,{values:o},!0).normalize()},e.negate=function(){if(!this.isValid)return this;for(var t={},e=0,r=Object.keys(this.values);e<r.length;e++){var i=r[e];t[i]=-this.values[i]}return or(this,{values:t},!0)},e.equals=function(t){if(!this.isValid||!t.isValid)return!1;if(!this.loc.equals(t.loc))return!1;for(var e,r=h(nr);!(e=r()).done;){var i=e.value;if(n=this.values[i],A=t.values[i],!(void 0===n||0===n?void 0===A||0===A:n===A))return!1}var n,A;return!0},i(t,[{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"years",get:function(){return this.isValid?this.values.years||0:NaN}},{key:"quarters",get:function(){return this.isValid?this.values.quarters||0:NaN}},{key:"months",get:function(){return this.isValid?this.values.months||0:NaN}},{key:"weeks",get:function(){return this.isValid?this.values.weeks||0:NaN}},{key:"days",get:function(){return this.isValid?this.values.days||0:NaN}},{key:"hours",get:function(){return this.isValid?this.values.hours||0:NaN}},{key:"minutes",get:function(){return this.isValid?this.values.minutes||0:NaN}},{key:"seconds",get:function(){return this.isValid?this.values.seconds||0:NaN}},{key:"milliseconds",get:function(){return this.isValid?this.values.milliseconds||0:NaN}},{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),t}(),lr="Invalid Interval",cr=function(){function t(t){this.s=t.start,this.e=t.end,this.invalid=t.invalid||null,this.isLuxonInterval=!0}t.invalid=function(e,r){if(void 0===r&&(r=null),!e)throw new b("need to specify a reason the Interval is invalid");var i=e instanceof Mt?e:new Mt(e,r);if(Kt.throwOnInvalid)throw new m(i);return new t({invalid:i})},t.fromDateTimes=function(e,r){var i=ci(e),n=ci(r),A=function(t,e){return t&&t.isValid?e&&e.isValid?e<t?cr.invalid("end before start","The end of an interval must be after its start, but you had start="+t.toISO()+" and end="+e.toISO()):null:cr.invalid("missing or invalid end"):cr.invalid("missing or invalid start")}(i,n);return null==A?new t({start:i,end:n}):A},t.after=function(e,r){var i=ar.fromDurationLike(r),n=ci(e);return t.fromDateTimes(n,n.plus(i))},t.before=function(e,r){var i=ar.fromDurationLike(r),n=ci(e);return t.fromDateTimes(n.minus(i),n)},t.fromISO=function(e,r){var i=(e||"").split("/",2),n=i[0],A=i[1];if(n&&A){var o,s,a,l;try{s=(o=li.fromISO(n,r)).isValid}catch(A){s=!1}try{l=(a=li.fromISO(A,r)).isValid}catch(A){l=!1}if(s&&l)return t.fromDateTimes(o,a);if(s){var c=ar.fromISO(A,r);if(c.isValid)return t.after(o,c)}else if(l){var d=ar.fromISO(n,r);if(d.isValid)return t.before(a,d)}}return t.invalid("unparsable",'the input "'+e+"\" can't be parsed as ISO 8601")},t.isInterval=function(t){return t&&t.isLuxonInterval||!1};var e=t.prototype;return e.length=function(t){return void 0===t&&(t="milliseconds"),this.isValid?this.toDuration.apply(this,[t]).get(t):NaN},e.count=function(t){if(void 0===t&&(t="milliseconds"),!this.isValid)return NaN;var e=this.start.startOf(t),r=this.end.startOf(t);return Math.floor(r.diff(e,t).get(t))+1},e.hasSame=function(t){return!!this.isValid&&(this.isEmpty()||this.e.minus(1).hasSame(this.s,t))},e.isEmpty=function(){return this.s.valueOf()===this.e.valueOf()},e.isAfter=function(t){return!!this.isValid&&this.s>t},e.isBefore=function(t){return!!this.isValid&&this.e<=t},e.contains=function(t){return!!this.isValid&&this.s<=t&&this.e>t},e.set=function(e){var r=void 0===e?{}:e,i=r.start,n=r.end;return this.isValid?t.fromDateTimes(i||this.s,n||this.e):this},e.splitAt=function(){var e=this;if(!this.isValid)return[];for(var r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];for(var A=i.map(ci).filter((function(t){return e.contains(t)})).sort(),o=[],s=this.s,a=0;s<this.e;){var l=A[a]||this.e,c=+l>+this.e?this.e:l;o.push(t.fromDateTimes(s,c)),s=c,a+=1}return o},e.splitBy=function(e){var r=ar.fromDurationLike(e);if(!this.isValid||!r.isValid||0===r.as("milliseconds"))return[];for(var i,n=this.s,A=1,o=[];n<this.e;){var s=this.start.plus(r.mapUnits((function(t){return t*A})));i=+s>+this.e?this.e:s,o.push(t.fromDateTimes(n,i)),n=i,A+=1}return o},e.divideEqually=function(t){return this.isValid?this.splitBy(this.length()/t).slice(0,t):[]},e.overlaps=function(t){return this.e>t.s&&this.s<t.e},e.abutsStart=function(t){return!!this.isValid&&+this.e==+t.s},e.abutsEnd=function(t){return!!this.isValid&&+t.e==+this.s},e.engulfs=function(t){return!!this.isValid&&this.s<=t.s&&this.e>=t.e},e.equals=function(t){return!(!this.isValid||!t.isValid)&&this.s.equals(t.s)&&this.e.equals(t.e)},e.intersection=function(e){if(!this.isValid)return this;var r=this.s>e.s?this.s:e.s,i=this.e<e.e?this.e:e.e;return r>=i?null:t.fromDateTimes(r,i)},e.union=function(e){if(!this.isValid)return this;var r=this.s<e.s?this.s:e.s,i=this.e>e.e?this.e:e.e;return t.fromDateTimes(r,i)},t.merge=function(t){var e=t.sort((function(t,e){return t.s-e.s})).reduce((function(t,e){var r=t[0],i=t[1];return i?i.overlaps(e)||i.abutsStart(e)?[r,i.union(e)]:[r.concat([i]),e]:[r,e]}),[[],null]),r=e[0],i=e[1];return i&&r.push(i),r},t.xor=function(e){for(var r,i,n=null,A=0,o=[],s=e.map((function(t){return[{time:t.s,type:"s"},{time:t.e,type:"e"}]})),a=h((r=Array.prototype).concat.apply(r,s).sort((function(t,e){return t.time-e.time})));!(i=a()).done;){var l=i.value;1===(A+="s"===l.type?1:-1)?n=l.time:(n&&+n!=+l.time&&o.push(t.fromDateTimes(n,l.time)),n=null)}return t.merge(o)},e.difference=function(){for(var e=this,r=arguments.length,i=new Array(r),n=0;n<r;n++)i[n]=arguments[n];return t.xor([this].concat(i)).map((function(t){return e.intersection(t)})).filter((function(t){return t&&!t.isEmpty()}))},e.toString=function(){return this.isValid?"["+this.s.toISO()+" – "+this.e.toISO()+")":lr},e.toISO=function(t){return this.isValid?this.s.toISO(t)+"/"+this.e.toISO(t):lr},e.toISODate=function(){return this.isValid?this.s.toISODate()+"/"+this.e.toISODate():lr},e.toISOTime=function(t){return this.isValid?this.s.toISOTime(t)+"/"+this.e.toISOTime(t):lr},e.toFormat=function(t,e){var r=(void 0===e?{}:e).separator,i=void 0===r?" – ":r;return this.isValid?""+this.s.toFormat(t)+i+this.e.toFormat(t):lr},e.toDuration=function(t,e){return this.isValid?this.e.diff(this.s,t,e):ar.invalid(this.invalidReason)},e.mapEndpoints=function(e){return t.fromDateTimes(e(this.s),e(this.e))},i(t,[{key:"start",get:function(){return this.isValid?this.s:null}},{key:"end",get:function(){return this.isValid?this.e:null}},{key:"isValid",get:function(){return null===this.invalidReason}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}}]),t}(),dr=function(){function t(){}return t.hasDST=function(t){void 0===t&&(t=Kt.defaultZone);var e=li.now().setZone(t).set({month:12});return!t.isUniversal&&e.offset!==e.set({month:6}).offset},t.isValidIANAZone=function(t){return Vt.isValidSpecifier(t)&&Vt.isValidZone(t)},t.normalizeZone=function(t){return jt(t,Kt.defaultZone)},t.months=function(t,e){void 0===t&&(t="long");var r=void 0===e?{}:e,i=r.locale,n=void 0===i?null:i,A=r.numberingSystem,o=void 0===A?null:A,s=r.locObj,a=void 0===s?null:s,l=r.outputCalendar,c=void 0===l?"gregory":l;return(a||ue.create(n,o,c)).months(t)},t.monthsFormat=function(t,e){void 0===t&&(t="long");var r=void 0===e?{}:e,i=r.locale,n=void 0===i?null:i,A=r.numberingSystem,o=void 0===A?null:A,s=r.locObj,a=void 0===s?null:s,l=r.outputCalendar,c=void 0===l?"gregory":l;return(a||ue.create(n,o,c)).months(t,!0)},t.weekdays=function(t,e){void 0===t&&(t="long");var r=void 0===e?{}:e,i=r.locale,n=void 0===i?null:i,A=r.numberingSystem,o=void 0===A?null:A,s=r.locObj;return((void 0===s?null:s)||ue.create(n,o,null)).weekdays(t)},t.weekdaysFormat=function(t,e){void 0===t&&(t="long");var r=void 0===e?{}:e,i=r.locale,n=void 0===i?null:i,A=r.numberingSystem,o=void 0===A?null:A,s=r.locObj;return((void 0===s?null:s)||ue.create(n,o,null)).weekdays(t,!0)},t.meridiems=function(t){var e=(void 0===t?{}:t).locale,r=void 0===e?null:e;return ue.create(r).meridiems()},t.eras=function(t,e){void 0===t&&(t="short");var r=(void 0===e?{}:e).locale,i=void 0===r?null:r;return ue.create(i,null,"gregory").eras(t)},t.features=function(){return{relative:G()}},t}();function ur(t,e){var r=function(t){return t.toUTC(0,{keepLocalTime:!0}).startOf("day").valueOf()},i=r(e)-r(t);return Math.floor(ar.fromMillis(i).as("days"))}var hr={arab:"[٠-٩]",arabext:"[۰-۹]",bali:"[᭐-᭙]",beng:"[০-৯]",deva:"[०-९]",fullwide:"[0-9]",gujr:"[૦-૯]",hanidec:"[〇|一|二|三|四|五|六|七|八|九]",khmr:"[០-៩]",knda:"[೦-೯]",laoo:"[໐-໙]",limb:"[᥆-᥏]",mlym:"[൦-൯]",mong:"[᠐-᠙]",mymr:"[၀-၉]",orya:"[୦-୯]",tamldec:"[௦-௯]",telu:"[౦-౯]",thai:"[๐-๙]",tibt:"[༠-༩]",latn:"\\d"},pr={arab:[1632,1641],arabext:[1776,1785],bali:[6992,7001],beng:[2534,2543],deva:[2406,2415],fullwide:[65296,65303],gujr:[2790,2799],khmr:[6112,6121],knda:[3302,3311],laoo:[3792,3801],limb:[6470,6479],mlym:[3430,3439],mong:[6160,6169],mymr:[4160,4169],orya:[2918,2927],tamldec:[3046,3055],telu:[3174,3183],thai:[3664,3673],tibt:[3872,3881]},fr=hr.hanidec.replace(/[\[|\]]/g,"").split("");function mr(t,e){var r=t.numberingSystem;return void 0===e&&(e=""),new RegExp(""+hr[r||"latn"]+e)}function gr(t,e){return void 0===e&&(e=function(t){return t}),{regex:t,deser:function(t){var r=t[0];return e(function(t){var e=parseInt(t,10);if(isNaN(e)){e="";for(var r=0;r<t.length;r++){var i=t.charCodeAt(r);if(-1!==t[r].search(hr.hanidec))e+=fr.indexOf(t[r]);else for(var n in pr){var A=pr[n],o=A[0],s=A[1];i>=o&&i<=s&&(e+=i-o)}}return parseInt(e,10)}return e}(r))}}}var vr="( |"+String.fromCharCode(160)+")",yr=new RegExp(vr,"g");function br(t){return t.replace(/\./g,"\\.?").replace(yr,vr)}function _r(t){return t.replace(/\./g,"").replace(yr," ").toLowerCase()}function wr(t,e){return null===t?null:{regex:RegExp(t.map(br).join("|")),deser:function(r){var i=r[0];return t.findIndex((function(t){return _r(i)===_r(t)}))+e}}}function xr(t,e){return{regex:t,deser:function(t){return ut(t[1],t[2])},groups:e}}function kr(t){return{regex:t,deser:function(t){return t[0]}}}var Sr={year:{"2-digit":"yy",numeric:"yyyyy"},month:{numeric:"M","2-digit":"MM",short:"MMM",long:"MMMM"},day:{numeric:"d","2-digit":"dd"},weekday:{short:"EEE",long:"EEEE"},dayperiod:"a",dayPeriod:"a",hour:{numeric:"h","2-digit":"hh"},minute:{numeric:"m","2-digit":"mm"},second:{numeric:"s","2-digit":"ss"}},Cr=null;function Er(t,e,r){var i=function(t,e){var r;return(r=Array.prototype).concat.apply(r,t.map((function(t){return function(t,e){if(t.literal)return t;var r=It.macroTokenToFormatOpts(t.val);if(!r)return t;var i=It.create(e,r).formatDateTimeParts((Cr||(Cr=li.fromMillis(1555555555555)),Cr)).map((function(t){return function(t,e,r){var i=t.type,n=t.value;if("literal"===i)return{literal:!0,val:n};var A=r[i],o=Sr[i];return"object"==typeof o&&(o=o[A]),o?{literal:!1,val:o}:void 0}(t,0,r)}));return i.includes(void 0)?t:i}(t,e)})))}(It.parseFormat(r),t),n=i.map((function(e){return r=e,n=mr(i=t),A=mr(i,"{2}"),o=mr(i,"{3}"),s=mr(i,"{4}"),a=mr(i,"{6}"),l=mr(i,"{1,2}"),c=mr(i,"{1,3}"),d=mr(i,"{1,6}"),u=mr(i,"{1,9}"),h=mr(i,"{2,4}"),p=mr(i,"{4,6}"),f=function(t){return{regex:RegExp((e=t.val,e.replace(/[\-\[\]{}()*+?.,\\\^$|#\s]/g,"\\$&"))),deser:function(t){return t[0]},literal:!0};var e},m=function(t){if(r.literal)return f(t);switch(t.val){case"G":return wr(i.eras("short",!1),0);case"GG":return wr(i.eras("long",!1),0);case"y":return gr(d);case"yy":case"kk":return gr(h,ct);case"yyyy":case"kkkk":return gr(s);case"yyyyy":return gr(p);case"yyyyyy":return gr(a);case"M":case"L":case"d":case"H":case"h":case"m":case"q":case"s":case"W":return gr(l);case"MM":case"LL":case"dd":case"HH":case"hh":case"mm":case"qq":case"ss":case"WW":return gr(A);case"MMM":return wr(i.months("short",!0,!1),1);case"MMMM":return wr(i.months("long",!0,!1),1);case"LLL":return wr(i.months("short",!1,!1),1);case"LLLL":return wr(i.months("long",!1,!1),1);case"o":case"S":return gr(c);case"ooo":case"SSS":return gr(o);case"u":return kr(u);case"uu":return kr(l);case"uuu":case"E":case"c":return gr(n);case"a":return wr(i.meridiems(),0);case"EEE":return wr(i.weekdays("short",!1,!1),1);case"EEEE":return wr(i.weekdays("long",!1,!1),1);case"ccc":return wr(i.weekdays("short",!0,!1),1);case"cccc":return wr(i.weekdays("long",!0,!1),1);case"Z":case"ZZ":return xr(new RegExp("([+-]"+l.source+")(?::("+A.source+"))?"),2);case"ZZZ":return xr(new RegExp("([+-]"+l.source+")("+A.source+")?"),2);case"z":return kr(/[a-z_+-/]{1,256}?/i);default:return f(t)}}(r)||{invalidReason:"missing Intl.DateTimeFormat.formatToParts support"},m.token=r,m;var r,i,n,A,o,s,a,l,c,d,u,h,p,f,m})),A=n.find((function(t){return t.invalidReason}));if(A)return{input:e,tokens:i,invalidReason:A.invalidReason};var o=function(t){return["^"+t.map((function(t){return t.regex})).reduce((function(t,e){return t+"("+e.source+")"}),"")+"$",t]}(n),s=o[0],a=o[1],l=RegExp(s,"i"),c=function(t,e,r){var i=t.match(e);if(i){var n={},A=1;for(var o in r)if(X(r,o)){var s=r[o],a=s.groups?s.groups+1:1;!s.literal&&s.token&&(n[s.token.val[0]]=s.deser(i.slice(A,A+a))),A+=a}return[i,n]}return[i,{}]}(e,l,a),d=c[0],u=c[1],h=u?function(t){var e,r=null;return Q(t.z)||(r=Vt.create(t.z)),Q(t.Z)||(r||(r=new Yt(t.Z)),e=t.Z),Q(t.q)||(t.M=3*(t.q-1)+1),Q(t.h)||(t.h<12&&1===t.a?t.h+=12:12===t.h&&0===t.a&&(t.h=0)),0===t.G&&t.y&&(t.y=-t.y),Q(t.u)||(t.S=it(t.u)),[Object.keys(t).reduce((function(e,r){var i=function(t){switch(t){case"S":return"millisecond";case"s":return"second";case"m":return"minute";case"h":case"H":return"hour";case"d":return"day";case"o":return"ordinal";case"L":case"M":return"month";case"y":return"year";case"E":case"c":return"weekday";case"W":return"weekNumber";case"k":return"weekYear";case"q":return"quarter";default:return null}}(r);return i&&(e[i]=t[r]),e}),{}),r,e]}(u):[null,null,void 0],p=h[0],f=h[1],m=h[2];if(X(u,"a")&&X(u,"H"))throw new v("Can't include meridiem when specifying 24-hour format");return{input:e,tokens:i,regex:l,rawMatches:d,matches:u,result:p,zone:f,specificOffset:m}}var Pr=[0,31,59,90,120,151,181,212,243,273,304,334],Tr=[0,31,60,91,121,152,182,213,244,274,305,335];function Or(t,e){return new Mt("unit out of range","you specified "+e+" (of type "+typeof e+") as a "+t+", which is invalid")}function Nr(t,e,r){var i=new Date(Date.UTC(t,e-1,r)).getUTCDay();return 0===i?7:i}function $r(t,e,r){return r+(At(t)?Tr:Pr)[e-1]}function Ir(t,e){var r=At(t)?Tr:Pr,i=r.findIndex((function(t){return t<e}));return{month:i+1,day:e-r[i]}}function Mr(t){var e,r=t.year,i=t.month,A=t.day,o=$r(r,i,A),s=Nr(r,i,A),a=Math.floor((o-s+10)/7);return a<1?a=lt(e=r-1):a>lt(r)?(e=r+1,a=1):e=r,n({weekYear:e,weekNumber:a,weekday:s},mt(t))}function Dr(t){var e,r=t.weekYear,i=t.weekNumber,A=t.weekday,o=Nr(r,1,4),s=ot(r),a=7*i+A-o-3;a<1?a+=ot(e=r-1):a>s?(e=r+1,a-=ot(r)):e=r;var l=Ir(e,a);return n({year:e,month:l.month,day:l.day},mt(t))}function Lr(t){var e=t.year;return n({year:e,ordinal:$r(e,t.month,t.day)},mt(t))}function zr(t){var e=t.year,r=Ir(e,t.ordinal);return n({year:e,month:r.month,day:r.day},mt(t))}function Br(t){var e=Z(t.year),r=K(t.month,1,12),i=K(t.day,1,st(t.year,t.month));return e?r?!i&&Or("day",t.day):Or("month",t.month):Or("year",t.year)}function Rr(t){var e=t.hour,r=t.minute,i=t.second,n=t.millisecond,A=K(e,0,23)||24===e&&0===r&&0===i&&0===n,o=K(r,0,59),s=K(i,0,59),a=K(n,0,999);return A?o?s?!a&&Or("millisecond",n):Or("second",i):Or("minute",r):Or("hour",e)}var Fr="Invalid DateTime",Hr=864e13;function Vr(t){return new Mt("unsupported zone",'the zone "'+t.name+'" is not supported')}function Ur(t){return null===t.weekData&&(t.weekData=Mr(t.c)),t.weekData}function Yr(t,e){var r={ts:t.ts,zone:t.zone,c:t.c,o:t.o,loc:t.loc,invalid:t.invalid};return new li(n({},r,e,{old:r}))}function qr(t,e,r){var i=t-60*e*1e3,n=r.offset(i);if(e===n)return[i,e];i-=60*(n-e)*1e3;var A=r.offset(i);return n===A?[i,n]:[t-60*Math.min(n,A)*1e3,Math.max(n,A)]}function jr(t,e){var r=new Date(t+=60*e*1e3);return{year:r.getUTCFullYear(),month:r.getUTCMonth()+1,day:r.getUTCDate(),hour:r.getUTCHours(),minute:r.getUTCMinutes(),second:r.getUTCSeconds(),millisecond:r.getUTCMilliseconds()}}function Qr(t,e,r){return qr(at(t),e,r)}function Wr(t,e){var r=t.o,i=t.c.year+Math.trunc(e.years),A=t.c.month+Math.trunc(e.months)+3*Math.trunc(e.quarters),o=n({},t.c,{year:i,month:A,day:Math.min(t.c.day,st(i,A))+Math.trunc(e.days)+7*Math.trunc(e.weeks)}),s=ar.fromObject({years:e.years-Math.trunc(e.years),quarters:e.quarters-Math.trunc(e.quarters),months:e.months-Math.trunc(e.months),weeks:e.weeks-Math.trunc(e.weeks),days:e.days-Math.trunc(e.days),hours:e.hours,minutes:e.minutes,seconds:e.seconds,milliseconds:e.milliseconds}).as("milliseconds"),a=qr(at(o),r,t.zone),l=a[0],c=a[1];return 0!==s&&(l+=s,c=t.zone.offset(l)),{ts:l,o:c}}function Zr(t,e,r,i,A,o){var s=r.setZone,a=r.zone;if(t&&0!==Object.keys(t).length){var l=e||a,c=li.fromObject(t,n({},r,{zone:l,specificOffset:o}));return s?c:c.setZone(a)}return li.invalid(new Mt("unparsable",'the input "'+A+"\" can't be parsed as "+i))}function Gr(t,e,r){return void 0===r&&(r=!0),t.isValid?It.create(ue.create("en-US"),{allowZ:r,forceSimple:!0}).formatDateTimeFromString(t,e):null}function Jr(t,e){var r=t.c.year>9999||t.c.year<0,i="";return r&&t.c.year>=0&&(i+="+"),i+=tt(t.c.year,r?6:4),e?(i+="-",i+=tt(t.c.month),i+="-",i+=tt(t.c.day)):(i+=tt(t.c.month),i+=tt(t.c.day)),i}function Xr(t,e,r,i,n){var A=tt(t.c.hour);return e?(A+=":",A+=tt(t.c.minute),0===t.c.second&&r||(A+=":")):A+=tt(t.c.minute),0===t.c.second&&r||(A+=tt(t.c.second),0===t.c.millisecond&&i||(A+=".",A+=tt(t.c.millisecond,3))),n&&(t.isOffsetFixed&&0===t.offset?A+="Z":t.o<0?(A+="-",A+=tt(Math.trunc(-t.o/60)),A+=":",A+=tt(Math.trunc(-t.o%60))):(A+="+",A+=tt(Math.trunc(t.o/60)),A+=":",A+=tt(Math.trunc(t.o%60)))),A}var Kr={month:1,day:1,hour:0,minute:0,second:0,millisecond:0},ti={weekNumber:1,weekday:1,hour:0,minute:0,second:0,millisecond:0},ei={ordinal:1,hour:0,minute:0,second:0,millisecond:0},ri=["year","month","day","hour","minute","second","millisecond"],ii=["weekYear","weekNumber","weekday","hour","minute","second","millisecond"],ni=["year","ordinal","hour","minute","second","millisecond"];function Ai(t){var e={year:"year",years:"year",month:"month",months:"month",day:"day",days:"day",hour:"hour",hours:"hour",minute:"minute",minutes:"minute",quarter:"quarter",quarters:"quarter",second:"second",seconds:"second",millisecond:"millisecond",milliseconds:"millisecond",weekday:"weekday",weekdays:"weekday",weeknumber:"weekNumber",weeksnumber:"weekNumber",weeknumbers:"weekNumber",weekyear:"weekYear",weekyears:"weekYear",ordinal:"ordinal"}[t.toLowerCase()];if(!e)throw new y(t);return e}function oi(t,e){var r,i,n=jt(e.zone,Kt.defaultZone),A=ue.fromObject(e),o=Kt.now();if(Q(t.year))r=o;else{for(var s,a=h(ri);!(s=a()).done;){var l=s.value;Q(t[l])&&(t[l]=Kr[l])}var c=Br(t)||Rr(t);if(c)return li.invalid(c);var d=Qr(t,n.offset(o),n);r=d[0],i=d[1]}return new li({ts:r,zone:n,loc:A,o:i})}function si(t,e,r){var i=!!Q(r.round)||r.round,n=function(t,n){return t=nt(t,i||r.calendary?0:2,!0),e.loc.clone(r).relFormatter(r).format(t,n)},A=function(i){return r.calendary?e.hasSame(t,i)?0:e.startOf(i).diff(t.startOf(i),i).get(i):e.diff(t,i).get(i)};if(r.unit)return n(A(r.unit),r.unit);for(var o,s=h(r.units);!(o=s()).done;){var a=o.value,l=A(a);if(Math.abs(l)>=1)return n(l,a)}return n(t>e?-0:0,r.units[r.units.length-1])}function ai(t){var e,r={};return t.length>0&&"object"==typeof t[t.length-1]?(r=t[t.length-1],e=Array.from(t).slice(0,t.length-1)):e=Array.from(t),[r,e]}var li=function(){function t(t){var e=t.zone||Kt.defaultZone,r=t.invalid||(Number.isNaN(t.ts)?new Mt("invalid input"):null)||(e.isValid?null:Vr(e));this.ts=Q(t.ts)?Kt.now():t.ts;var i=null,n=null;if(!r)if(t.old&&t.old.ts===this.ts&&t.old.zone.equals(e)){var A=[t.old.c,t.old.o];i=A[0],n=A[1]}else{var o=e.offset(this.ts);i=jr(this.ts,o),i=(r=Number.isNaN(i.year)?new Mt("invalid input"):null)?null:i,n=r?null:o}this._zone=e,this.loc=t.loc||ue.create(),this.invalid=r,this.weekData=null,this.c=i,this.o=n,this.isLuxonDateTime=!0}t.now=function(){return new t({})},t.local=function(){var t=ai(arguments),e=t[0],r=t[1],i=r[0],n=r[1],A=r[2],o=r[3],s=r[4],a=r[5],l=r[6];return oi({year:i,month:n,day:A,hour:o,minute:s,second:a,millisecond:l},e)},t.utc=function(){var t=ai(arguments),e=t[0],r=t[1],i=r[0],n=r[1],A=r[2],o=r[3],s=r[4],a=r[5],l=r[6];return e.zone=Yt.utcInstance,oi({year:i,month:n,day:A,hour:o,minute:s,second:a,millisecond:l},e)},t.fromJSDate=function(e,r){void 0===r&&(r={});var i,n=(i=e,"[object Date]"===Object.prototype.toString.call(i)?e.valueOf():NaN);if(Number.isNaN(n))return t.invalid("invalid input");var A=jt(r.zone,Kt.defaultZone);return A.isValid?new t({ts:n,zone:A,loc:ue.fromObject(r)}):t.invalid(Vr(A))},t.fromMillis=function(e,r){if(void 0===r&&(r={}),W(e))return e<-Hr||e>Hr?t.invalid("Timestamp out of range"):new t({ts:e,zone:jt(r.zone,Kt.defaultZone),loc:ue.fromObject(r)});throw new b("fromMillis requires a numerical input, but received a "+typeof e+" with value "+e)},t.fromSeconds=function(e,r){if(void 0===r&&(r={}),W(e))return new t({ts:1e3*e,zone:jt(r.zone,Kt.defaultZone),loc:ue.fromObject(r)});throw new b("fromSeconds requires a numerical input")},t.fromObject=function(e,r){void 0===r&&(r={}),e=e||{};var i=jt(r.zone,Kt.defaultZone);if(!i.isValid)return t.invalid(Vr(i));var n=Kt.now(),A=Q(r.specificOffset)?i.offset(n):r.specificOffset,o=pt(e,Ai),s=!Q(o.ordinal),a=!Q(o.year),l=!Q(o.month)||!Q(o.day),c=a||l,d=o.weekYear||o.weekNumber,u=ue.fromObject(r);if((c||s)&&d)throw new v("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(l&&s)throw new v("Can't mix ordinal dates with month/day");var p,f,m=d||o.weekday&&!c,g=jr(n,A);m?(p=ii,f=ti,g=Mr(g)):s?(p=ni,f=ei,g=Lr(g)):(p=ri,f=Kr);for(var y,b=!1,_=h(p);!(y=_()).done;){var w=y.value;Q(o[w])?o[w]=b?f[w]:g[w]:b=!0}var x=m?function(t){var e=Z(t.weekYear),r=K(t.weekNumber,1,lt(t.weekYear)),i=K(t.weekday,1,7);return e?r?!i&&Or("weekday",t.weekday):Or("week",t.week):Or("weekYear",t.weekYear)}(o):s?function(t){var e=Z(t.year),r=K(t.ordinal,1,ot(t.year));return e?!r&&Or("ordinal",t.ordinal):Or("year",t.year)}(o):Br(o),k=x||Rr(o);if(k)return t.invalid(k);var S=Qr(m?Dr(o):s?zr(o):o,A,i),C=new t({ts:S[0],zone:i,o:S[1],loc:u});return o.weekday&&c&&e.weekday!==C.weekday?t.invalid("mismatched weekday","you can't specify both a weekday of "+o.weekday+" and a date of "+C.toISO()):C},t.fromISO=function(t,e){void 0===e&&(e={});var r=function(t){return fe(t,[Ve,je],[Ue,Qe],[Ye,We],[qe,Ze])}(t);return Zr(r[0],r[1],e,"ISO 8601",t)},t.fromRFC2822=function(t,e){void 0===e&&(e={});var r=function(t){return fe(function(t){return t.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").trim()}(t),[De,Le])}(t);return Zr(r[0],r[1],e,"RFC 2822",t)},t.fromHTTP=function(t,e){void 0===e&&(e={});var r=function(t){return fe(t,[ze,Fe],[Be,Fe],[Re,He])}(t);return Zr(r[0],r[1],e,"HTTP",e)},t.fromFormat=function(e,r,i){if(void 0===i&&(i={}),Q(e)||Q(r))throw new b("fromFormat requires an input string and a format");var n=i,A=n.locale,o=void 0===A?null:A,s=n.numberingSystem,a=void 0===s?null:s,l=function(t,e,r){var i=Er(t,e,r);return[i.result,i.zone,i.specificOffset,i.invalidReason]}(ue.fromOpts({locale:o,numberingSystem:a,defaultToEN:!0}),e,r),c=l[0],d=l[1],u=l[2],h=l[3];return h?t.invalid(h):Zr(c,d,i,"format "+r,e,u)},t.fromString=function(e,r,i){return void 0===i&&(i={}),t.fromFormat(e,r,i)},t.fromSQL=function(t,e){void 0===e&&(e={});var r=function(t){return fe(t,[Je,Ke],[Xe,tr])}(t);return Zr(r[0],r[1],e,"SQL",t)},t.invalid=function(e,r){if(void 0===r&&(r=null),!e)throw new b("need to specify a reason the DateTime is invalid");var i=e instanceof Mt?e:new Mt(e,r);if(Kt.throwOnInvalid)throw new f(i);return new t({invalid:i})},t.isDateTime=function(t){return t&&t.isLuxonDateTime||!1};var e=t.prototype;return e.get=function(t){return this[t]},e.resolvedLocaleOptions=function(t){void 0===t&&(t={});var e=It.create(this.loc.clone(t),t).resolvedOptions(this);return{locale:e.locale,numberingSystem:e.numberingSystem,outputCalendar:e.calendar}},e.toUTC=function(t,e){return void 0===t&&(t=0),void 0===e&&(e={}),this.setZone(Yt.instance(t),e)},e.toLocal=function(){return this.setZone(Kt.defaultZone)},e.setZone=function(e,r){var i=void 0===r?{}:r,n=i.keepLocalTime,A=void 0!==n&&n,o=i.keepCalendarTime,s=void 0!==o&&o;if((e=jt(e,Kt.defaultZone)).equals(this.zone))return this;if(e.isValid){var a=this.ts;if(A||s){var l=e.offset(this.ts);a=Qr(this.toObject(),l,e)[0]}return Yr(this,{ts:a,zone:e})}return t.invalid(Vr(e))},e.reconfigure=function(t){var e=void 0===t?{}:t,r=e.locale,i=e.numberingSystem,n=e.outputCalendar;return Yr(this,{loc:this.loc.clone({locale:r,numberingSystem:i,outputCalendar:n})})},e.setLocale=function(t){return this.reconfigure({locale:t})},e.set=function(t){if(!this.isValid)return this;var e,r=pt(t,Ai),i=!Q(r.weekYear)||!Q(r.weekNumber)||!Q(r.weekday),A=!Q(r.ordinal),o=!Q(r.year),s=!Q(r.month)||!Q(r.day),a=o||s,l=r.weekYear||r.weekNumber;if((a||A)&&l)throw new v("Can't mix weekYear/weekNumber units with year/month/day or ordinals");if(s&&A)throw new v("Can't mix ordinal dates with month/day");i?e=Dr(n({},Mr(this.c),r)):Q(r.ordinal)?(e=n({},this.toObject(),r),Q(r.day)&&(e.day=Math.min(st(e.year,e.month),e.day))):e=zr(n({},Lr(this.c),r));var c=Qr(e,this.o,this.zone);return Yr(this,{ts:c[0],o:c[1]})},e.plus=function(t){return this.isValid?Yr(this,Wr(this,ar.fromDurationLike(t))):this},e.minus=function(t){return this.isValid?Yr(this,Wr(this,ar.fromDurationLike(t).negate())):this},e.startOf=function(t){if(!this.isValid)return this;var e={},r=ar.normalizeUnit(t);switch(r){case"years":e.month=1;case"quarters":case"months":e.day=1;case"weeks":case"days":e.hour=0;case"hours":e.minute=0;case"minutes":e.second=0;case"seconds":e.millisecond=0}if("weeks"===r&&(e.weekday=1),"quarters"===r){var i=Math.ceil(this.month/3);e.month=3*(i-1)+1}return this.set(e)},e.endOf=function(t){var e;return this.isValid?this.plus((e={},e[t]=1,e)).startOf(t).minus(1):this},e.toFormat=function(t,e){return void 0===e&&(e={}),this.isValid?It.create(this.loc.redefaultToEN(e)).formatDateTimeFromString(this,t):Fr},e.toLocaleString=function(t,e){return void 0===t&&(t=S),void 0===e&&(e={}),this.isValid?It.create(this.loc.clone(e),t).formatDateTime(this):Fr},e.toLocaleParts=function(t){return void 0===t&&(t={}),this.isValid?It.create(this.loc.clone(t),t).formatDateTimeParts(this):[]},e.toISO=function(t){var e=void 0===t?{}:t,r=e.format,i=void 0===r?"extended":r,n=e.suppressSeconds,A=void 0!==n&&n,o=e.suppressMilliseconds,s=void 0!==o&&o,a=e.includeOffset,l=void 0===a||a;if(!this.isValid)return null;var c="extended"===i,d=Jr(this,c);return(d+="T")+Xr(this,c,A,s,l)},e.toISODate=function(t){var e=(void 0===t?{}:t).format,r=void 0===e?"extended":e;return this.isValid?Jr(this,"extended"===r):null},e.toISOWeekDate=function(){return Gr(this,"kkkk-'W'WW-c")},e.toISOTime=function(t){var e=void 0===t?{}:t,r=e.suppressMilliseconds,i=void 0!==r&&r,n=e.suppressSeconds,A=void 0!==n&&n,o=e.includeOffset,s=void 0===o||o,a=e.includePrefix,l=void 0!==a&&a,c=e.format,d=void 0===c?"extended":c;return this.isValid?(l?"T":"")+Xr(this,"extended"===d,A,i,s):null},e.toRFC2822=function(){return Gr(this,"EEE, dd LLL yyyy HH:mm:ss ZZZ",!1)},e.toHTTP=function(){return Gr(this.toUTC(),"EEE, dd LLL yyyy HH:mm:ss 'GMT'")},e.toSQLDate=function(){return this.isValid?Jr(this,!0):null},e.toSQLTime=function(t){var e=void 0===t?{}:t,r=e.includeOffset,i=void 0===r||r,n=e.includeZone,A=void 0!==n&&n,o="HH:mm:ss.SSS";return(A||i)&&(o+=" ",A?o+="z":i&&(o+="ZZ")),Gr(this,o,!0)},e.toSQL=function(t){return void 0===t&&(t={}),this.isValid?this.toSQLDate()+" "+this.toSQLTime(t):null},e.toString=function(){return this.isValid?this.toISO():Fr},e.valueOf=function(){return this.toMillis()},e.toMillis=function(){return this.isValid?this.ts:NaN},e.toSeconds=function(){return this.isValid?this.ts/1e3:NaN},e.toJSON=function(){return this.toISO()},e.toBSON=function(){return this.toJSDate()},e.toObject=function(t){if(void 0===t&&(t={}),!this.isValid)return{};var e=n({},this.c);return t.includeConfig&&(e.outputCalendar=this.outputCalendar,e.numberingSystem=this.loc.numberingSystem,e.locale=this.loc.locale),e},e.toJSDate=function(){return new Date(this.isValid?this.ts:NaN)},e.diff=function(t,e,r){if(void 0===e&&(e="milliseconds"),void 0===r&&(r={}),!this.isValid||!t.isValid)return ar.invalid("created by diffing an invalid DateTime");var i,A=n({locale:this.locale,numberingSystem:this.numberingSystem},r),o=(i=e,Array.isArray(i)?i:[i]).map(ar.normalizeUnit),s=t.valueOf()>this.valueOf(),a=function(t,e,r,i){var n,A=function(t,e,r){for(var i,n,A={},o=0,s=[["years",function(t,e){return e.year-t.year}],["quarters",function(t,e){return e.quarter-t.quarter}],["months",function(t,e){return e.month-t.month+12*(e.year-t.year)}],["weeks",function(t,e){var r=ur(t,e);return(r-r%7)/7}],["days",ur]];o<s.length;o++){var a=s[o],l=a[0],c=a[1];if(r.indexOf(l)>=0){var d;i=l;var u,h=c(t,e);(n=t.plus(((d={})[l]=h,d)))>e?(t=t.plus(((u={})[l]=h-1,u)),h-=1):t=n,A[l]=h}}return[t,A,n,i]}(t,e,r),o=A[0],s=A[1],a=A[2],l=A[3],c=e-o,d=r.filter((function(t){return["hours","minutes","seconds","milliseconds"].indexOf(t)>=0}));0===d.length&&(a<e&&(a=o.plus(((n={})[l]=1,n))),a!==o&&(s[l]=(s[l]||0)+c/(a-o)));var u,h=ar.fromObject(s,i);return d.length>0?(u=ar.fromMillis(c,i)).shiftTo.apply(u,d).plus(h):h}(s?this:t,s?t:this,o,A);return s?a.negate():a},e.diffNow=function(e,r){return void 0===e&&(e="milliseconds"),void 0===r&&(r={}),this.diff(t.now(),e,r)},e.until=function(t){return this.isValid?cr.fromDateTimes(this,t):this},e.hasSame=function(t,e){if(!this.isValid)return!1;var r=t.valueOf(),i=this.setZone(t.zone,{keepLocalTime:!0});return i.startOf(e)<=r&&r<=i.endOf(e)},e.equals=function(t){return this.isValid&&t.isValid&&this.valueOf()===t.valueOf()&&this.zone.equals(t.zone)&&this.loc.equals(t.loc)},e.toRelative=function(e){if(void 0===e&&(e={}),!this.isValid)return null;var r=e.base||t.fromObject({},{zone:this.zone}),i=e.padding?this<r?-e.padding:e.padding:0,A=["years","months","days","hours","minutes","seconds"],o=e.unit;return Array.isArray(e.unit)&&(A=e.unit,o=void 0),si(r,this.plus(i),n({},e,{numeric:"always",units:A,unit:o}))},e.toRelativeCalendar=function(e){return void 0===e&&(e={}),this.isValid?si(e.base||t.fromObject({},{zone:this.zone}),this,n({},e,{numeric:"auto",units:["years","months","days"],calendary:!0})):null},t.min=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(!r.every(t.isDateTime))throw new b("min requires all arguments be DateTimes");return J(r,(function(t){return t.valueOf()}),Math.min)},t.max=function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];if(!r.every(t.isDateTime))throw new b("max requires all arguments be DateTimes");return J(r,(function(t){return t.valueOf()}),Math.max)},t.fromFormatExplain=function(t,e,r){void 0===r&&(r={});var i=r,n=i.locale,A=void 0===n?null:n,o=i.numberingSystem,s=void 0===o?null:o;return Er(ue.fromOpts({locale:A,numberingSystem:s,defaultToEN:!0}),t,e)},t.fromStringExplain=function(e,r,i){return void 0===i&&(i={}),t.fromFormatExplain(e,r,i)},i(t,[{key:"isValid",get:function(){return null===this.invalid}},{key:"invalidReason",get:function(){return this.invalid?this.invalid.reason:null}},{key:"invalidExplanation",get:function(){return this.invalid?this.invalid.explanation:null}},{key:"locale",get:function(){return this.isValid?this.loc.locale:null}},{key:"numberingSystem",get:function(){return this.isValid?this.loc.numberingSystem:null}},{key:"outputCalendar",get:function(){return this.isValid?this.loc.outputCalendar:null}},{key:"zone",get:function(){return this._zone}},{key:"zoneName",get:function(){return this.isValid?this.zone.name:null}},{key:"year",get:function(){return this.isValid?this.c.year:NaN}},{key:"quarter",get:function(){return this.isValid?Math.ceil(this.c.month/3):NaN}},{key:"month",get:function(){return this.isValid?this.c.month:NaN}},{key:"day",get:function(){return this.isValid?this.c.day:NaN}},{key:"hour",get:function(){return this.isValid?this.c.hour:NaN}},{key:"minute",get:function(){return this.isValid?this.c.minute:NaN}},{key:"second",get:function(){return this.isValid?this.c.second:NaN}},{key:"millisecond",get:function(){return this.isValid?this.c.millisecond:NaN}},{key:"weekYear",get:function(){return this.isValid?Ur(this).weekYear:NaN}},{key:"weekNumber",get:function(){return this.isValid?Ur(this).weekNumber:NaN}},{key:"weekday",get:function(){return this.isValid?Ur(this).weekday:NaN}},{key:"ordinal",get:function(){return this.isValid?Lr(this.c).ordinal:NaN}},{key:"monthShort",get:function(){return this.isValid?dr.months("short",{locObj:this.loc})[this.month-1]:null}},{key:"monthLong",get:function(){return this.isValid?dr.months("long",{locObj:this.loc})[this.month-1]:null}},{key:"weekdayShort",get:function(){return this.isValid?dr.weekdays("short",{locObj:this.loc})[this.weekday-1]:null}},{key:"weekdayLong",get:function(){return this.isValid?dr.weekdays("long",{locObj:this.loc})[this.weekday-1]:null}},{key:"offset",get:function(){return this.isValid?+this.o:NaN}},{key:"offsetNameShort",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"short",locale:this.locale}):null}},{key:"offsetNameLong",get:function(){return this.isValid?this.zone.offsetName(this.ts,{format:"long",locale:this.locale}):null}},{key:"isOffsetFixed",get:function(){return this.isValid?this.zone.isUniversal:null}},{key:"isInDST",get:function(){return!this.isOffsetFixed&&(this.offset>this.set({month:1}).offset||this.offset>this.set({month:5}).offset)}},{key:"isInLeapYear",get:function(){return At(this.year)}},{key:"daysInMonth",get:function(){return st(this.year,this.month)}},{key:"daysInYear",get:function(){return this.isValid?ot(this.year):NaN}},{key:"weeksInWeekYear",get:function(){return this.isValid?lt(this.weekYear):NaN}}],[{key:"DATE_SHORT",get:function(){return S}},{key:"DATE_MED",get:function(){return C}},{key:"DATE_MED_WITH_WEEKDAY",get:function(){return E}},{key:"DATE_FULL",get:function(){return P}},{key:"DATE_HUGE",get:function(){return T}},{key:"TIME_SIMPLE",get:function(){return O}},{key:"TIME_WITH_SECONDS",get:function(){return N}},{key:"TIME_WITH_SHORT_OFFSET",get:function(){return $}},{key:"TIME_WITH_LONG_OFFSET",get:function(){return I}},{key:"TIME_24_SIMPLE",get:function(){return M}},{key:"TIME_24_WITH_SECONDS",get:function(){return D}},{key:"TIME_24_WITH_SHORT_OFFSET",get:function(){return L}},{key:"TIME_24_WITH_LONG_OFFSET",get:function(){return z}},{key:"DATETIME_SHORT",get:function(){return B}},{key:"DATETIME_SHORT_WITH_SECONDS",get:function(){return R}},{key:"DATETIME_MED",get:function(){return F}},{key:"DATETIME_MED_WITH_SECONDS",get:function(){return H}},{key:"DATETIME_MED_WITH_WEEKDAY",get:function(){return V}},{key:"DATETIME_FULL",get:function(){return U}},{key:"DATETIME_FULL_WITH_SECONDS",get:function(){return Y}},{key:"DATETIME_HUGE",get:function(){return q}},{key:"DATETIME_HUGE_WITH_SECONDS",get:function(){return j}}]),t}();function ci(t){if(li.isDateTime(t))return t;if(t&&t.valueOf&&W(t.valueOf()))return li.fromJSDate(t);if(t&&"object"==typeof t)return li.fromObject(t);throw new b("Unknown datetime argument: "+t+", of type "+typeof t)}e.DateTime=li,e.Duration=ar,e.FixedOffsetZone=Yt,e.IANAZone=Vt,e.Info=dr,e.Interval=cr,e.InvalidZone=qt,e.Settings=Kt,e.SystemZone=zt,e.VERSION="2.3.0",e.Zone=Dt},621:(t,e,r)=>{var i;!function(n){var A=/^\s+/,o=/\s+$/,s=0,a=n.round,l=n.min,c=n.max,d=n.random;function u(t,e){if(e=e||{},(t=t||"")instanceof u)return t;if(!(this instanceof u))return new u(t,e);var r=function(t){var e,r,i,s={r:0,g:0,b:0},a=1,d=null,u=null,h=null,p=!1,f=!1;return"string"==typeof t&&(t=function(t){t=t.replace(A,"").replace(o,"").toLowerCase();var e,r=!1;if(O[t])t=O[t],r=!0;else if("transparent"==t)return{r:0,g:0,b:0,a:0,format:"name"};return(e=U.rgb.exec(t))?{r:e[1],g:e[2],b:e[3]}:(e=U.rgba.exec(t))?{r:e[1],g:e[2],b:e[3],a:e[4]}:(e=U.hsl.exec(t))?{h:e[1],s:e[2],l:e[3]}:(e=U.hsla.exec(t))?{h:e[1],s:e[2],l:e[3],a:e[4]}:(e=U.hsv.exec(t))?{h:e[1],s:e[2],v:e[3]}:(e=U.hsva.exec(t))?{h:e[1],s:e[2],v:e[3],a:e[4]}:(e=U.hex8.exec(t))?{r:D(e[1]),g:D(e[2]),b:D(e[3]),a:R(e[4]),format:r?"name":"hex8"}:(e=U.hex6.exec(t))?{r:D(e[1]),g:D(e[2]),b:D(e[3]),format:r?"name":"hex"}:(e=U.hex4.exec(t))?{r:D(e[1]+""+e[1]),g:D(e[2]+""+e[2]),b:D(e[3]+""+e[3]),a:R(e[4]+""+e[4]),format:r?"name":"hex8"}:!!(e=U.hex3.exec(t))&&{r:D(e[1]+""+e[1]),g:D(e[2]+""+e[2]),b:D(e[3]+""+e[3]),format:r?"name":"hex"}}(t)),"object"==typeof t&&(Y(t.r)&&Y(t.g)&&Y(t.b)?(e=t.r,r=t.g,i=t.b,s={r:255*I(e,255),g:255*I(r,255),b:255*I(i,255)},p=!0,f="%"===String(t.r).substr(-1)?"prgb":"rgb"):Y(t.h)&&Y(t.s)&&Y(t.v)?(d=z(t.s),u=z(t.v),s=function(t,e,r){t=6*I(t,360),e=I(e,100),r=I(r,100);var i=n.floor(t),A=t-i,o=r*(1-e),s=r*(1-A*e),a=r*(1-(1-A)*e),l=i%6;return{r:255*[r,s,o,o,a,r][l],g:255*[a,r,r,s,o,o][l],b:255*[o,o,a,r,r,s][l]}}(t.h,d,u),p=!0,f="hsv"):Y(t.h)&&Y(t.s)&&Y(t.l)&&(d=z(t.s),h=z(t.l),s=function(t,e,r){var i,n,A;function o(t,e,r){return r<0&&(r+=1),r>1&&(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=I(t,360),e=I(e,100),r=I(r,100),0===e)i=n=A=r;else{var s=r<.5?r*(1+e):r+e-r*e,a=2*r-s;i=o(a,s,t+1/3),n=o(a,s,t),A=o(a,s,t-1/3)}return{r:255*i,g:255*n,b:255*A}}(t.h,d,h),p=!0,f="hsl"),t.hasOwnProperty("a")&&(a=t.a)),a=$(a),{ok:p,format:t.format||f,r:l(255,c(s.r,0)),g:l(255,c(s.g,0)),b:l(255,c(s.b,0)),a}}(t);this._originalInput=t,this._r=r.r,this._g=r.g,this._b=r.b,this._a=r.a,this._roundA=a(100*this._a)/100,this._format=e.format||r.format,this._gradientType=e.gradientType,this._r<1&&(this._r=a(this._r)),this._g<1&&(this._g=a(this._g)),this._b<1&&(this._b=a(this._b)),this._ok=r.ok,this._tc_id=s++}function h(t,e,r){t=I(t,255),e=I(e,255),r=I(r,255);var i,n,A=c(t,e,r),o=l(t,e,r),s=(A+o)/2;if(A==o)i=n=0;else{var a=A-o;switch(n=s>.5?a/(2-A-o):a/(A+o),A){case t:i=(e-r)/a+(e<r?6:0);break;case e:i=(r-t)/a+2;break;case r:i=(t-e)/a+4}i/=6}return{h:i,s:n,l:s}}function p(t,e,r){t=I(t,255),e=I(e,255),r=I(r,255);var i,n,A=c(t,e,r),o=l(t,e,r),s=A,a=A-o;if(n=0===A?0:a/A,A==o)i=0;else{switch(A){case t:i=(e-r)/a+(e<r?6:0);break;case e:i=(r-t)/a+2;break;case r:i=(t-e)/a+4}i/=6}return{h:i,s:n,v:s}}function f(t,e,r,i){var n=[L(a(t).toString(16)),L(a(e).toString(16)),L(a(r).toString(16))];return i&&n[0].charAt(0)==n[0].charAt(1)&&n[1].charAt(0)==n[1].charAt(1)&&n[2].charAt(0)==n[2].charAt(1)?n[0].charAt(0)+n[1].charAt(0)+n[2].charAt(0):n.join("")}function m(t,e,r,i){return[L(B(i)),L(a(t).toString(16)),L(a(e).toString(16)),L(a(r).toString(16))].join("")}function g(t,e){e=0===e?0:e||10;var r=u(t).toHsl();return r.s-=e/100,r.s=M(r.s),u(r)}function v(t,e){e=0===e?0:e||10;var r=u(t).toHsl();return r.s+=e/100,r.s=M(r.s),u(r)}function y(t){return u(t).desaturate(100)}function b(t,e){e=0===e?0:e||10;var r=u(t).toHsl();return r.l+=e/100,r.l=M(r.l),u(r)}function _(t,e){e=0===e?0:e||10;var r=u(t).toRgb();return r.r=c(0,l(255,r.r-a(-e/100*255))),r.g=c(0,l(255,r.g-a(-e/100*255))),r.b=c(0,l(255,r.b-a(-e/100*255))),u(r)}function w(t,e){e=0===e?0:e||10;var r=u(t).toHsl();return r.l-=e/100,r.l=M(r.l),u(r)}function x(t,e){var r=u(t).toHsl(),i=(r.h+e)%360;return r.h=i<0?360+i:i,u(r)}function k(t){var e=u(t).toHsl();return e.h=(e.h+180)%360,u(e)}function S(t){var e=u(t).toHsl(),r=e.h;return[u(t),u({h:(r+120)%360,s:e.s,l:e.l}),u({h:(r+240)%360,s:e.s,l:e.l})]}function C(t){var e=u(t).toHsl(),r=e.h;return[u(t),u({h:(r+90)%360,s:e.s,l:e.l}),u({h:(r+180)%360,s:e.s,l:e.l}),u({h:(r+270)%360,s:e.s,l:e.l})]}function E(t){var e=u(t).toHsl(),r=e.h;return[u(t),u({h:(r+72)%360,s:e.s,l:e.l}),u({h:(r+216)%360,s:e.s,l:e.l})]}function P(t,e,r){e=e||6,r=r||30;var i=u(t).toHsl(),n=360/r,A=[u(t)];for(i.h=(i.h-(n*e>>1)+720)%360;--e;)i.h=(i.h+n)%360,A.push(u(i));return A}function T(t,e){e=e||6;for(var r=u(t).toHsv(),i=r.h,n=r.s,A=r.v,o=[],s=1/e;e--;)o.push(u({h:i,s:n,v:A})),A=(A+s)%1;return o}u.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,i=this.toRgb();return t=i.r/255,e=i.g/255,r=i.b/255,.2126*(t<=.03928?t/12.92:n.pow((t+.055)/1.055,2.4))+.7152*(e<=.03928?e/12.92:n.pow((e+.055)/1.055,2.4))+.0722*(r<=.03928?r/12.92:n.pow((r+.055)/1.055,2.4))},setAlpha:function(t){return this._a=$(t),this._roundA=a(100*this._a)/100,this},toHsv:function(){var t=p(this._r,this._g,this._b);return{h:360*t.h,s:t.s,v:t.v,a:this._a}},toHsvString:function(){var t=p(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),i=a(100*t.v);return 1==this._a?"hsv("+e+", "+r+"%, "+i+"%)":"hsva("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHsl:function(){var t=h(this._r,this._g,this._b);return{h:360*t.h,s:t.s,l:t.l,a:this._a}},toHslString:function(){var t=h(this._r,this._g,this._b),e=a(360*t.h),r=a(100*t.s),i=a(100*t.l);return 1==this._a?"hsl("+e+", "+r+"%, "+i+"%)":"hsla("+e+", "+r+"%, "+i+"%, "+this._roundA+")"},toHex:function(t){return f(this._r,this._g,this._b,t)},toHexString:function(t){return"#"+this.toHex(t)},toHex8:function(t){return function(t,e,r,i,n){var A=[L(a(t).toString(16)),L(a(e).toString(16)),L(a(r).toString(16)),L(B(i))];return n&&A[0].charAt(0)==A[0].charAt(1)&&A[1].charAt(0)==A[1].charAt(1)&&A[2].charAt(0)==A[2].charAt(1)&&A[3].charAt(0)==A[3].charAt(1)?A[0].charAt(0)+A[1].charAt(0)+A[2].charAt(0)+A[3].charAt(0):A.join("")}(this._r,this._g,this._b,this._a,t)},toHex8String:function(t){return"#"+this.toHex8(t)},toRgb:function(){return{r:a(this._r),g:a(this._g),b:a(this._b),a:this._a}},toRgbString:function(){return 1==this._a?"rgb("+a(this._r)+", "+a(this._g)+", "+a(this._b)+")":"rgba("+a(this._r)+", "+a(this._g)+", "+a(this._b)+", "+this._roundA+")"},toPercentageRgb:function(){return{r:a(100*I(this._r,255))+"%",g:a(100*I(this._g,255))+"%",b:a(100*I(this._b,255))+"%",a:this._a}},toPercentageRgbString:function(){return 1==this._a?"rgb("+a(100*I(this._r,255))+"%, "+a(100*I(this._g,255))+"%, "+a(100*I(this._b,255))+"%)":"rgba("+a(100*I(this._r,255))+"%, "+a(100*I(this._g,255))+"%, "+a(100*I(this._b,255))+"%, "+this._roundA+")"},toName:function(){return 0===this._a?"transparent":!(this._a<1)&&(N[f(this._r,this._g,this._b,!0)]||!1)},toFilter:function(t){var e="#"+m(this._r,this._g,this._b,this._a),r=e,i=this._gradientType?"GradientType = 1, ":"";if(t){var n=u(t);r="#"+m(n._r,n._g,n._b,n._a)}return"progid:DXImageTransform.Microsoft.gradient("+i+"startColorstr="+e+",endColorstr="+r+")"},toString:function(t){var e=!!t;t=t||this._format;var r=!1,i=this._a<1&&this._a>=0;return e||!i||"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 u(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(b,arguments)},brighten:function(){return this._applyModification(_,arguments)},darken:function(){return this._applyModification(w,arguments)},desaturate:function(){return this._applyModification(g,arguments)},saturate:function(){return this._applyModification(v,arguments)},greyscale:function(){return this._applyModification(y,arguments)},spin:function(){return this._applyModification(x,arguments)},_applyCombination:function(t,e){return t.apply(null,[this].concat([].slice.call(e)))},analogous:function(){return this._applyCombination(P,arguments)},complement:function(){return this._applyCombination(k,arguments)},monochromatic:function(){return this._applyCombination(T,arguments)},splitcomplement:function(){return this._applyCombination(E,arguments)},triad:function(){return this._applyCombination(S,arguments)},tetrad:function(){return this._applyCombination(C,arguments)}},u.fromRatio=function(t,e){if("object"==typeof t){var r={};for(var i in t)t.hasOwnProperty(i)&&(r[i]="a"===i?t[i]:z(t[i]));t=r}return u(t,e)},u.equals=function(t,e){return!(!t||!e)&&u(t).toRgbString()==u(e).toRgbString()},u.random=function(){return u.fromRatio({r:d(),g:d(),b:d()})},u.mix=function(t,e,r){r=0===r?0:r||50;var i=u(t).toRgb(),n=u(e).toRgb(),A=r/100;return u({r:(n.r-i.r)*A+i.r,g:(n.g-i.g)*A+i.g,b:(n.b-i.b)*A+i.b,a:(n.a-i.a)*A+i.a})},u.readability=function(t,e){var r=u(t),i=u(e);return(n.max(r.getLuminance(),i.getLuminance())+.05)/(n.min(r.getLuminance(),i.getLuminance())+.05)},u.isReadable=function(t,e,r){var i,n,A,o,s,a=u.readability(t,e);switch(n=!1,(A=r,"AA"!==(o=((A=A||{level:"AA",size:"small"}).level||"AA").toUpperCase())&&"AAA"!==o&&(o="AA"),"small"!==(s=(A.size||"small").toLowerCase())&&"large"!==s&&(s="small"),i={level:o,size:s}).level+i.size){case"AAsmall":case"AAAlarge":n=a>=4.5;break;case"AAlarge":n=a>=3;break;case"AAAsmall":n=a>=7}return n},u.mostReadable=function(t,e,r){var i,n,A,o,s=null,a=0;n=(r=r||{}).includeFallbackColors,A=r.level,o=r.size;for(var l=0;l<e.length;l++)(i=u.readability(t,e[l]))>a&&(a=i,s=u(e[l]));return u.isReadable(t,s,{level:A,size:o})||!n?s:(r.includeFallbackColors=!1,u.mostReadable(t,["#fff","#000"],r))};var O=u.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=u.hexNames=function(t){var e={};for(var r in t)t.hasOwnProperty(r)&&(e[t[r]]=r);return e}(O);function $(t){return t=parseFloat(t),(isNaN(t)||t<0||t>1)&&(t=1),t}function I(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=l(e,c(0,parseFloat(t))),r&&(t=parseInt(t*e,10)/100),n.abs(t-e)<1e-6?1:t%e/parseFloat(e)}function M(t){return l(1,c(0,t))}function D(t){return parseInt(t,16)}function L(t){return 1==t.length?"0"+t:""+t}function z(t){return t<=1&&(t=100*t+"%"),t}function B(t){return n.round(255*parseFloat(t)).toString(16)}function R(t){return D(t)/255}var F,H,V,U=(H="[\\s|\\(]+("+(F="(?:[-\\+]?\\d*\\.\\d+%?)|(?:[-\\+]?\\d+%?)")+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",V="[\\s|\\(]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")[,|\\s]+("+F+")\\s*\\)?",{CSS_UNIT:new RegExp(F),rgb:new RegExp("rgb"+H),rgba:new RegExp("rgba"+V),hsl:new RegExp("hsl"+H),hsla:new RegExp("hsla"+V),hsv:new RegExp("hsv"+H),hsva:new RegExp("hsva"+V),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 Y(t){return!!U.CSS_UNIT.exec(t)}t.exports?t.exports=u:void 0===(i=function(){return u}.call(e,r,e,t))||(t.exports=i)}(Math)},861:(t,e,r)=>{"use strict";r.d(e,{b:()=>n,Q:()=>A});var i=r(392);class n extends i.oi{static properties={multiple:{type:Boolean}};static styles=[i.iv` :host { display: block; } .container { border: var(--crowd-accordion-border-width, 1px) var(--crowd-accordion-border-style, solid) var(--crowd-accordion-border-color, #ddd); border-radius: var(--crowd-accordion-border-radius, 4px); } `];connectedCallback(){super.connectedCallback();let t=[].slice.call(this.querySelectorAll("crowd-accordion-item"));t&&t.forEach((e=>{e.addEventListener("crowdOpen",(()=>{t.forEach((t=>{t===e||this.multiple||t.close()}))}),!1)}))}render(){return i.dy` <div class='container' part='container'> <slot></slot> </div> `}}class A extends i.oi{static properties={open:{type:Boolean,reflect:!0}};static styles=[i.iv` :host { display: block; } * { margin: 0; padding: 0; } *,*::before, *::after { box-sizing: border-box; } .tray { max-height: 0px; transition-property: max-height; transition-duration: var(--accordion-item-transition-duration, 0.15s); transition-delay: var(--accordion-item-transition-delay, 0s); transition-timing-function: var(--accordion-item-ease, ease-in-out); overflow-y: scroll; padding: 0 var(--crowd-accordion-item-tray-padding-horizontal,1em); background-color: var(--crowd-accordion-tray-background-color, #fff); pointer-events: none; } :host([open]) .tray { max-height: 900vh; padding: var(--crowd-accordion-item-tray-padding-vertical,0.5em) var(--crowd-accordion-item-tray-padding-horizontal,1em); pointer-events: all; } h3 { display: flex; flex-flow: row nowrap; justify-content: space-between; align-items: center; cursor: pointer; padding: var(--crowd-accordion-item-title-padding-vertical,1em) var(--crowd-accordion-item-title-padding-horizontal,1em); color: var(--crowd-accordion-item-title-color, #000); background-color: var(--crowd-accordion-item-title-background-color, #fff); font-weight: var(--crowd-accordion-item-title-weight, 400); font-size: var(--crowd-accordion-item-title-font-size, 1.15em); font-family: var(--crowd-accordion-title-font-family, inherit); } @media (hover: hover) { h3:hover { color: var(--crowd-accordion-item-title-hover-color, #000); background-color: var(--crowd-accordion-item-title-hover-background-color, #eee); } } input { opacity: 0; position: absolute; -webkit-appearance: none; } .container:focus-within h3 { color: var(--crowd-accordion-item-title-hover-color, #000); background-color: var(--crowd-accordion-item-title-hover-background-color, #eee); box-shadow: 0 0 0 var(--crowd-input-focus-width, 2px) var(--crowd-input-focus-color, rgba(0,0,0,0.3)); } :host([open]) h3 { color: var(--crowd-accordion-item-title-open-color, #000); background-color: var(--crowd-accordion-item-title-open-background-color, #eee); border-bottom: var(--crowd-accordion-border-width, 1px) var(--crowd-accordion-border-style, solid) var(--crowd-accordion-border-color, #ddd); } h3 crowd-icon { transition-property: transform; transition-duration: var(--accordion-item-transition-duration, 0.15s); transition-delay: var(--accordion-item-transition-delay, 0s); transition-timing-function: var(--accordion-item-ease, ease-in-out); } :host([open]) h3 crowd-icon { transform: rotate(180deg); } :host(:first-child) .container,:host(:first-child) .container h3 { border-top-left-radius: var(--crowd-accordion-border-radius, 4px); border-top-right-radius: var(--crowd-accordion-border-radius, 4px); } :host(:last-child) .container,:host(:last-child) .container .tray, :host(:last-child:not([open])) .container h3 { border-bottom-left-radius: var(--crowd-accordion-border-radius, 4px); border-bottom-right-radius: var(--crowd-accordion-border-radius, 4px); } :host(:not(:first-child)) .container { border-top: var(--crowd-accordion-border-width, 1px) var(--crowd-accordion-border-style, solid) var(--crowd-accordion-border-color, #ddd); } :host(:nth-child(2):last-child) .container { border-top: none; } `];show(){this.open=!0;const t=new CustomEvent("crowdOpen");this.dispatchEvent(t)}close(){this.open=!1;const t=new CustomEvent("crowdClose");this.dispatchEvent(t)}toggle(){let t;this.open=!this.open,t=this.open?new CustomEvent("crowdOpen"):new CustomEvent("crowdClose"),this.dispatchEvent(t)}_focus(){this.renderRoot.querySelector("input").focus()}_keyDown(t){switch(t.key){case" ":case"Enter":this.toggle();break;case"Tab":break;default:t.preventDefault()}}render(){return i.dy` <div class='container' part='container'> <input inputmode='none' @keydown='${t=>this._keyDown(t)}' type='text' /> <h3 @click='${()=>{this._focus(),this.toggle()}}'>${this.title}<crowd-icon name='chevron-down'></crowd-icon></h3> <div class='tray' part='tray'> <slot></slot> </div> </div> `}}},326:(t,e,r)=>{"use strict";r.d(e,{b:()=>n});var i=r(392);class n extends i.oi{static properties={open:{type:Boolean,reflect:!0},closable:{type:Boolean},duration:{type:Number},toast:{type:Boolean},title:{type:String}};static styles=[i.iv` :host { display: block; } :host, :host * { box-sizing: inherit; } .alert { display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center; background-color: var(--crowd-alert-background-color, white); padding: var(--crowd-alert-padding-vertical, 1em) var(--crowd-alert-padding-horizontal,1em); gap: var(--crowd-alert-spacing, 1em); color: inherit; border: 1px solid var(--crowd-alert-outline-color,#eee); border-top: var(--crowd-alert-border-width, 3px) var(--crowd-alert-border-style, solid) var(--crowd-alert-border-color,black); animation: close 0.2s forwards; border-radius: var(--crowd-alert-border-radius,2px); font-size: var(--crowd-alert-font-size, inherit); pointer-events: var(--crowd-alert-pointer-events, all); } .alert > div { flex: 1 1 auto; } slot[name='icon'] { color: var(--crowd-alert-color, black); } :host([open]) .alert { animation: open 0.2s forwards; } :host([toast]) .alert { box-shadow: var( --crowd-alert-box-shadow, 0 2px 8px rgba(0, 0, 0, 0.1) ); } .close { margin-left: auto; } h3 { display: flex; gap: 0.5em; align-items: center; margin: 0; } @keyframes open { 0% { height: 0px; transform: scale(0); opacity: 0; padding: 0; border-width: 0px; } 1% { height: auto; transform: scale(0.5); padding: 0; border-width: 0px; opacity: 0; } 100% { transform: scale(1); opacity: 1; } } @keyframes close { 0% { height: auto; transform: scale(1); opacity: 1; } 99% { height: auto; transform: scale(0.5); opacity: 0; padding: 0; border-width: 0px; } 100% { height: 0px; transform: scale(0); opacity: 0; padding: 0; border-width: 0px; } } `];connectedCallback(){super.connectedCallback(),this.duration&&setTimeout((()=>this.hide()),this.duration),this.toast&&this._setupToast()}_createToastStack(){let t=document.createElement("toast-stack");return document.body.appendChild(t),t}_setupToast(){let t=document.querySelector("toast-stack");t||(t=this._createToastStack()),this.parentElement!=t&&(this.parentElement.removeChild(this),t.appendChild(this))}show(){this.open=!0,this.duration&&setTimeout((()=>this.hide()),this.duration)}hide(){this.open=!1}toast(){this.toast&&(this.open=!0)}constructor(){super(),this.toast=!1}render(){let t="";return this.closable&&(t=i.dy` <crowd-icon-button class='close' name='x' @click='${()=>this.hide()}'></crowd-icon-button> `),i.dy` <article class='alert' part='alert'> <div> <h3> <slot name='icon'></slot> ${this.title} </h3> <slot></slot> </div> ${t} </article> `}}},867:(t,e,r)=>{"use strict";r.d(e,{C:()=>n});var i=r(392);class n extends i.oi{static properties={pill:{type:Boolean},pulse:{type:Boolean},type:{type:String}};static styles=[i.iv` :host { display: inline-grid; place-items: center; } :host([type='danger']) { --crowd-badge-color: #f92f06; } :host([type='warning']) { --crowd-badge-color: #ffd000; } :host([type='success']) { --crowd-badge-color: #65d672; } .badge { color: var(--crowd-badge-text-color, inherit); background-color: var(--crowd-badge-color); display: inline-flex; align-items: center; justify-content: center; font-size: inherit; font-weight: inherit; line-height: 1; white-space: nowrap; padding: var(--crowd-badge-padding-vertical,3px) var(--crowd-badge-padding-horizontal, 6px); user-select: none; cursor: inherit; } :host([pill]) .badge { border-radius: 999px; } :host([pulse]) .badge { animation: 1.5s ease 0s infinite normal none running pulse; } .badge { border-radius: var(--crowd-badge-border-radius, 0px); } @keyframes pulse { 0% { box-shadow: 0 0 0 0 var(--pulse-color, var(--crowd-badge-color)); } 70% { box-shadow: 0 0 0 0.5rem transparent; } 100% { box-shadow: 0 0 0 0 transparent; } } `];render(){return i.dy` <span class='badge' part='badge'> <slot></slot> </span> `}}},565:(t,e,r)=>{"use strict";r.d(e,{z:()=>n});var i=r(392);class n extends i.oi{static properties={href:{type:String},pill:{type:Boolean},loading:{type:Boolean},disabled:{type:Boolean},caret:{type:Boolean},target:{type:String},circle:{type:Boolean}};static styles=i.iv` :host { display: inline-block; width: auto; cursor: pointer; line-height: 1; height:min-content; } button,a { -webkit-appearance: none; background-color: var(--crowd-button-background-color, #eeeeee); padding: var(--crowd-button-padding-vertical,0.5em) var(--crowd-button-padding-horizontal, 1em); color: var(--crowd-button-color, inherit); border: var(--crowd-button-border-width, 2px) var(--crowd-button-border-style, solid) var(--crowd-button-border-color, #aeaeae); border-radius: var(--crowd-button-border-radius, 3px); font-family: inherit; font-size: inherit; font-weight: inherit; text-align: var(--crowd-button-text-align, center); display: inline-flex; width: 100%; height: var(--crowd-button-height, 2.5em); flex-flow: row nowrap; justify-content: var(--crowd-button-justify,center); align-items: center; gap: var(--crowd-button-gap, 0.5em); cursor: pointer; margin: 0; text-decoration: none; text-transform: inherit; box-sizing: border-box; transition-property: background-color, border-color, color; transition-duration: var(--crowd-button-transition-duration, 0.15s); transition-timing-function: var(--crowd-button-transition-ease, ease-in-out); transition-delay: var(--crowd-button-transition-delay, 0s); position:relative; text-transform: var(--crowd-button-text-transform, inherit); } button:focus-visible, button:active, a:focus-visible,a:active { outline: none; } button:focus-visible,button:active, a:focus-visible,a:active { box-shadow: 0px 0px 0px var(--crowd-button-focus-width, 2px) var(--crowd-button-focus-color, rgba(0,0,0,0.3)); } :host([pill]) button, :host([pill]) a { border-radius: var(--crowd-button-pill-border-radius, 999px); } @media (hover: hover) { button:hover, a:hover { background-color: var(--crowd-button-hover-background-color, #aeaeae); border-color: var(--crowd-button-hover-border-color, #aeaeae); color: var(--crowd-button-hover-color, #fff); } } :host([disabled]) { opacity: 0.5; pointer-events: none; } :host([circle]) button, :host([circle]) a { aspect-ratio: 1/1; height: var(--crowd-button-width, auto); width: var(--crowd-button-width, auto); border-radius: 50%; } slot[name='prefix'] svg, slot[name='suffix'] svg { height: 1.5em; } .prefix,.suffix { display: inline-grid; place-items:center; } .label { display: flex; flex-flow: row nowrap; justfy-content: flex-start; align-items:center; } :host([loading]) button, :host([loading]) a { display: inline-grid; place-items: center; } crowd-spinner { position: absolute; top:50%; left:50%; transform: translate(-50%,-50%); } .loading { display: inline-flex; flex-flow: row nowrap; justify-content: var(--crowd-button-justify,center); align-items: center; gap: var(--crowd-button-gap, 0.5em); opacity: 0; } `;constructor(){super()}render(){let t="";this.caret&&(t=i.dy` <crowd-icon name='chevron-down'></crowd-icon> `);let e=i.dy` <span class='prefix' part='prefix'> <slot name='prefix'></slot> </span> <span class='label' part='label'> <slot></slot> </span> <span class='suffix' part='suffix'> <slot name='suffix'>${t}</slot> </span> `;this.loading&&(e=i.dy`<crowd-spinner></crowd-spinner><span class='loading'>${e}</span>`);let r=i.dy` <button part='button'> ${e} </button> `;return this.href&&(r=i.dy` <a part='button' href='${this.href}' target='${this.target}'> ${e} </a> `),i.dy` ${r} `}}},266:(t,e,r)=>{"use strict";r.d(e,{X:()=>A});var i=r(392),n=r(414);class A extends i.oi{static properties={name:{type:String},value:{type:String},checked:{type:Boolean,reflect:!0},required:{type:Boolean},errorMessage:{type:String},invalid:{type:Boolean,reflect:!0}};static styles=i.iv` :host { display: block; position:relative; } input { -webkit-apperance: none; height: 0px; width: 0px; opacity: 0; position: absolute; margin: 0; } label { color: var(--crowd-input-color, inherit); font-family: inherit; font-weight: inherit; font-size: inherit; cursor: pointer; display: inline-flex; flex-flow: row nowrap; justify-content: flex-start; align-items: var(--crowd-checkbox-align, center); gap: var(--crowd-checkbox-spacing,0.5em); } .box { border: var(--crowd-checkbox-border-width,1px) var(--crowd-checkbox-border-style,solid) var(--crowd-checkbox-border-color,black); min-width: calc(1.2em - (2 * var(--crowd-checkbox-border-width,1px))); min-height: calc(1.2em - (2 * var(--crowd-checkbox-border-height,1px))); max-width: calc(1.2em - (2 * var(--crowd-checkbox-border-width,1px))); max-height: calc(1.2em - (2 * var(--crowd-checkbox-border-height,1px))); background-color: var(--crowd-checkbox-background-color, transparent); color: var(--crowd-checkbox-color, black); line-height: 1; display: grid; place-items: center; font-size: 1em; position: relative; transition-property: color, background-color; transition-duration: var(--crowd-checkbox-transition-duration,0.15s); transition-timing-function: var(--crowd-checkbox-transition-ease, ease-in-out); transition-delay: var(--crowd-checkbox-transition-delay,0s); } .container { max-width: 100%; } .box svg { position:absolute; top: 0; left: 0; right: 0; bottom: 0; } input:focus-visible + label .box { box-shadow: 0 0 0 var(--crowd-input-focus-width, 2px) var(--crowd-input-focus-color, rgba(0,0,0,0.3)); } .error { font-size: var(--crowd-input-error-message-font-size, 0.8em); color: var(--crowd-input-error-message-color, red); } :host([checked]) .box { background-color: var(--crowd-checkbox-checked-background-color, black); color: var(--crowd-checkbox-checked-color, white); } :host([invalid]) input { outline: 1px solid var(--crowd-input-error-message-color, red); } `;constructor(){super(),this.checked=!1,this.invalid=!1}connectedCallback(){super.connectedCallback(),this.id="checkbox-"+Date.now(),new n.z(this)}_dispatchChange(){const t=new CustomEvent("crowdChange");this.dispatchEvent(t)}_onChange(t){this.checked=t.currentTarget.checked,this.invalid=!1,this.checked?this.value=t.currentTarget.value:this.value=null,this._dispatchChange()}validate(){this.required&&(this.checked||(this.invalid=!0))}render(){let t="";this.checked&&(t=i.dy` <slot name='check-icon'> <svg viewBox="0 0 16 16"><g stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" stroke-linecap="round"><g stroke="currentColor" stroke-width="2"><g transform="translate(3.428571, 3.428571)"><path d="M0,5.71428571 L3.42857143,9.14285714"></path><path d="M9.14285714,0 L3.42857143,9.14285714"></path></g></g></g></svg> </slot> `);let e="";return this.invalid&&(e=i.dy` <div part='error' class='error'> ${this.errorMessage} </div> `),i.dy` <div class='container' part='container'> <input @change='${this._onChange}' type='checkbox' id='${this.id}' name='${this.name}' value='${this.value}' required='${this.required}' /> <label part='label' for='${this.id}'> <div class='box' part='box'> ${t} </div> <slot></slot> </label> ${e} </div> `}}},95:(t,e,r)=>{"use strict";r.d(e,{z:()=>o});var i=r(392);const n=r(621),A=(t=0,e=20)=>+(Math.round(t+`e${e}`)+`e-${e}`);class o extends i.oi{static properties={value:{type:String,reflect:!0},name:{type:String},label:{type:String},_unit:{type:String},_hue:{type:Number},_sat:{type:Number},_v:{type:Number},_alpha:{type:Number},_recentColors:{type:Array}};static styles=[i.iv` :host { display: inline-block; } :host,:host * { box-sizing: border-box; margin: 0; padding: 0; } .pallete { background: linear-gradient(to top, hsla(0,0%,0%,calc(var(--a))), transparent), linear-gradient(to left, hsla(calc(var(--h)),100%,50%,calc(var(--a))),hsla(0,0%,100%,calc(var(--a)))),linear-gradient( 45deg, #ddd 25%,transparent 0,transparent 75%,#ddd 0 ),linear-gradient( 45deg, #ddd 25%,transparent 0,transparent 75%,#ddd 0 ); background-position: 0 0, 0 0,0 0,5px 5px; background-size: 100% 100%, 100% 100%, 10px 10px, 10px 10px; user-select: none; cursor: crosshair; min-width: 150px; min-height: 150px; position:relative; } .hue-range,.alpha-range { -webkit-appearance: none; display: block; border-radius: 999px; width: 100%; } input[type="range"]::-webkit-slider-thumb { -webkit-appearance: none; position: relative; width: 10px; height: 10px; transform: scale(1.2); border-radius: 50%; box-shadow: 0 0 10px rgb(0 0 0 / 10%); background: #fff; transition: .2s cubic-bezier(.12, .4, .29, 1.46); } .hue-range { background: linear-gradient(to right, red, yellow, lime, cyan, blue, magenta, red); } .alpha-range { background: linear-gradient(to right, hsla(calc(var(--h)),100%,50%,0), hsla(calc(var(--h)),100%,50%,1)),linear-gradient( 45deg, #ddd 25%,transparent 0,transparent 75%,#ddd 0 ),linear-gradient( 45deg, #ddd 25%,transparent 0,transparent 75%,#ddd 0 ); background-position: 0 0,0 0,5px 5px; background-size: 100% 100%,10px 10px,10px 10px; } .indicator { position: relative; } .indicator::after,.indicator::before { content: ''; position: absolute; top: 0; left: 0; right: 0; bottom: 0; } .indicator::after { background: var(--background); } .indicator::before { background: linear-gradient( 45deg, #ddd 25%,transparent 0,transparent 75%,#ddd 0 ),linear-gradient( 45deg, #ddd 25%,transparent 0,transparent 75%,#ddd 0 ); background-position: 0 0,5px 5px; background-size: 10px 10px, 10px 10px; } .container { display: flex; flex-flow: column; align-items: stretch; gap: var(--crowd-color-picker-spacing,0.2em); } .recent-colors { display: flex; gap: 5px; } .recent-colors button { -webkit-appearance: none; border: 1px solid #eee; padding: 0; } .pallete-indicator { display: inline-block; position: absolute; left: var(--s); top: calc(100% - var(--v)); width: 5px; height: 5px; transform: translate(-50%,-50%); border-radius: 50%; background-color: white; border: 1px solid #eee; } `];_dispatchChange(){const t=new CustomEvent("crowdChange");this.dispatchEvent(t)}_setValue(){let t=n(`hsva(${this._hue},${A(this._sat,2)}%,${A(this._v,2)}%,${this._alpha}%)`);t.setAlpha(this._alpha/100),this.value=t.toHslString();let e=JSON.parse(localStorage.getItem("recentColors"));e||(e=[]),e.indexOf(this.value)<0&&e.push(this.value),localStorage.setItem("recentColors",JSON.stringify(e)),this._dispatchChange()}_chooseColor(t){let e=t.currentTarget.getBoundingClientRect().width,r=t.currentTarget.getBoundingClientRect().height,i=t.offsetX/e*100,n=100*(1-t.offsetY/r);this._sat=i,this._v=n,this._setValue()}constructor(){super(),this._hue=0,this._sat=0,this._v=0,this._alpha=100,this._recentColors=[]}_loop(){this._recentColors=JSON.parse(localStorage.getItem("recentColors")),requestAnimationFrame((()=>this._loop()))}connectedCallback(){super.connectedCallback(),localStorage.getItem("recentColors")||localStorage.setItem("recentColors","[]"),this._loop()}_redraw(){let t=n(this.value).toHsv();this._hue=t.h,this._sat=100*t.s,this._v=100*t.v,this._alpha=100*t.a,this._dispatchChange()}render(){let t="";return this._recentColors&&(t=i.dy` <div class='recent-colors'> ${this._recentColors.slice(-8).reverse().map((t=>i.dy`<button @click='${()=>{this.value=t,this._redraw()}}' style='background-color: ${t};width:1em;height: 1em;'></button>`))} </div> `),i.dy` <crowd-dropdown style='--h: ${this._hue};--s:${this._sat}%;--v: ${this._v}%;--a: ${this._alpha}%;'> <crowd-button slot='trigger' style='--crowd-button-background-color:var(--crowd-color-picker-background-color,#eee);--crowd-button-gap:0px;--crowd-button-padding-vertical:10px;--crowd-button-padding-horizontal: 10px;'> <div style='width: 1em;height: 1em;--background: ${this.value};' class='indicator'></div> </crowd-button> <div part='container' class='container'> <div @mouseup='${t=>this._chooseColor(t)}' part='pallete' class='pallete'> <span class='pallete-indicator'></span> </div> <input class='hue-range' type='range' min='0' max='360' step='1' value='${this._hue}' @change='${t=>{this._hue=t.currentTarget.value,this._setValue()}}' /> <input class='alpha-range' type='range' min='0' max='100' step='1' value='${this._alpha}' @change='${t=>{this._alpha=t.currentTarget.value,this._setValue()}}' /> ${t} <small>${this.value}</small> </div> </crowd-dropdown> `}}},978:(t,e,r)=>{"use strict";r.d(e,{V:()=>o});var i=r(392);const n=new Event("crowdDialogHide",{bubbles:!0,composed:!0}),A=new Event("crowdDialogShow",{bubbles:!0,composed:!0});class o extends i.oi{static properties={open:{type:Boolean,reflect:!0},label:{type:String}};static styles=i.iv` :host .dialog-container { pointer-events: none; visibility:hidden; background-color: transparent; transition-property: visibility; transition-duration: var(--crowd-dialog-container-transition-duration, 0.2s); transition-timing-function: var(--crowd-dialog-container-transition-function, ease-in-out); transition-delay: var(--crowd-dialog-container-transition-delay, 0.3s); } :host([open]) .dialog-container { pointer-events: all; visibility:visible; transition-property: none; } :host .dialog-overlay { transition-property: background-color; transition-duration: var(--crowd-dialog-overlay-transition-duration, 0.2s); transition-timing-function: var(--crowd-dialog-overlay-transition-function, ease-in-out); transition-delay: var(--crowd-dialog-overlay-transition-delay, 0.3s); } :host([open]) .dialog-overlay { background-color: var(--crowd-dialog-overlay-background, rgba(0,0,0,0.3)); } dialog::backdrop { background-color: var(--crowd-dialog-overlay-background, rgba(0,0,0,0.3)); } :host dialog { transform: scale(0); } :host([open]) dialog { transform: scale(1); transition-delay: var(--crowd-dialog-transition-delay, 0.2s); } dialog { all:unset; display: block; } dialog { background-color: var(--crowd-dialog-background, white); padding: var(--crowd-dialog-padding-vertical,1em) var(--crowd-dialog-padding-horizontal,1em); height: min(var(--height,calc(100% - (2 * var(--crowd-dialog-spacing-vertical,1em)))), 100%); width: min(var(--width,calc(100% - (2 * var(--crowd-dialog-spacing-horiztonal,1em)))), 100%); overflow-y: scroll; transition-property: transform; transition-duration: var(--crowd-dialog-transition-duration, 0.15s); transition-timing-function: var(--crowd-dialog-transition-function, ease-in-out); position: relative; border-radius: var(--crowd-dialog-border-radius,0px); box-shadow: var(--crowd-dialog-box-shadow, 0 1px 1px hsl(0deg 0% 0% / 0.075), 0 2px 2px hsl(0deg 0% 0% / 0.075), 0 4px 4px hsl(0deg 0% 0% / 0.075), 0 8px 8px hsl(0deg 0% 0% / 0.075), 0 16px 16px hsl(0deg 0% 0% / 0.075) ); } h2 { margin: var(--crowd-dialog-heading-margin-top, 0px) 0 var(--crowd-dialog-heading-margin-bottom, 0px); } .dialog-container { display: grid; position: fixed; top: 0; left: 0; right: 0; bottom: 0; place-items: center; padding: var(--crowd-dialog-spacing-vertical, 2em) var(--crowd-dialog-spacing-horizontal, 2em); z-index: var(--crowd-dialog-z-index,9999); } .dialog-overlay { position:absolute; top: 0; left: 0; right: 0; bottom: 0; cursor: pointer; } dialog > button.dialog-close { -webkit-appearance: none; background-color: var(--crowd-dialog-close-background,transparent); color: var(--crowd-dialog-close-color, black); border: var(--crowd-dialog-close-border-width,0px) var(--crowd-dialog-close-border-type,solid) var(--crowd-dialog-close-border-color,transparent); font-size: var(--crowd-dialog-close-font-size,2rem); line-height: 1; position: absolute; top: 0; right: 0; cursor: pointer; } @media (hover: hover) { dialog > button.dialog-close:hover { opacity: var(--crowd-dialog-close-hover-opacity, 0.6); } } @media (prefers-reduced-motion: reduce) { :host { --crowd-dialog-container-transition-duration: 0s; --crowd-dialog-container-transition-delay: 0s; --crowd-dialog-overlay-transition-duration: 0s; --crowd-dialog-overlay-transition-delay: 0s; --crowd-dialog-transition-duration: 0s; --crowd-dialog-transition-delay: 0s; } } `;constructor(){super(),this.open=!1}toggle(){this.open=!this.open,this.renderRoot.querySelector("dialog").show(),this.open?this.dispatchEvent(A):this.dispatchEvent(n)}show(){this.open=!0,this.renderRoot.querySelector("dialog").show(),this.dispatchEvent(A)}hide(){this.open=!1,this.renderRoot.querySelector("dialog").close(),this.dispatchEvent(n)}render(){let t;return this.label&&(t=i.dy`<h2>${this.label}</h2>`),i.dy` <div class='dialog-container' part="container"> <div class='dialog-overlay' part="overlay" @click="${()=>this.hide()}"></div> <dialog ${this.open?"open":""} @close='${this.dispatchEvent(n)}' @cancel='${this.dispatchEvent(n)}'> <button part="close" name='close dialog' aria-label='close dialog' class='dialog-close' @click="${()=>this.hide()}" ><crowd-icon name='x'></crowd-icon></button> ${t} <slot></slot> </dialog> </div> `}}},829:(t,e,r)=>{"use strict";r.d(e,{d:()=>o});var i=r(392);const n=new Event("crowdDrawerHide",{bubbles:!0,composed:!0}),A=new Event("crowdDrawerShow",{bubbles:!0,composed:!0});class o extends i.oi{static properties={open:{type:Boolean,reflect:!0},placement:{type:String}};static styles=i.iv` :host .drawer-container { pointer-events: none; visibility:hidden; background-color: transparent; transition-property: visibility; transition-duration: var(--crowd-drawer-container-transition-duration, 0.2s); transition-timing-function: var(--crowd-drawer-container-ease, ease-in-out); transition-delay: var(--crowd-drawer-container-transition-delay, 0.3s); } .drawer-container { position: fixed; top: 0; left: 0; right: 0; bottom: 0; z-index: var(--crowd-drawer-z-index,9999); } :host([open]) .drawer-container { pointer-events: all; visibility: visible; } .drawer-overlay { width: 100%; height: 100%; } :host .drawer-overlay { transition-property: background-color; transition-duration: var(--crowd-drawer-overlay-transition-duration, 0.2s); transition-timing-function: var(--crowd-drawer-overlay-transition-function, ease-in-out); transition-delay: var(--crowd-drawer-overlay-transition-delay, 0.3s); cursor: pointer; } :host([open]) .drawer-overlay { background-color: var(--crowd-drawer-overlay-background, rgba(0,0,0,0.3)); } .drawer { background-color: var(--crowd-drawer-background,white); position: absolute; top:var(--crowd-drawer-position-top, 0); left:var(--crowd-drawer-position-left, 0); right:var(--crowd-drawer-position-right, 0); bottom:var(--crowd-drawer-position-bottom, 0); padding: var(--crowd-drawer-padding-vertical, 2em) var(--crowd-drawer-padding-horizontal, 1em); transition-property: transform; transition-duration: var(--crowd-drawer-transition-duration, 0.2s); transition-timing-function: var(--crowd-drawer-transition-function, ease-in-out); overflow-y: scroll; } .drawer--top { transform: translateY(-100%); } .drawer--right { transform: translateX(100%); } .drawer--left { transform: translateX(-100%); } .drawer--bottom { transform: translateY(100%); } :host([open]) .drawer { transform: none; transition-delay: var(--crowd-drawer-transition-delay, 0.3s); } `;constructor(){super()}connectedCallback(){super.connectedCallback(),this.classList.add("hydrated")}toggle(){this.open=!this.open,this.open?this.dispatchEvent(A):this.dispatchEvent(n)}show(){this.open=!0,this.dispatchEvent(A)}hide(){this.open=!1,this.dispatchEvent(n)}render(){return i.dy` <div part="container" class='drawer-container'> <div @click='${()=>this.hide()}' part="overlay" class='drawer-overlay'></div> <aside part="drawer" class='drawer drawer--${this.placement}'> <slot></slot> </aside> </div> `}}},510:(t,e,r)=>{"use strict";r.d(e,{L:()=>A});var i=r(392),n=r(515);class A extends i.oi{static properties={show:{type:Boolean,reflect:!0},hoist:{type:Boolean},position:{type:String,reflect:!0}};static styles=[n.P.styles,i.iv` :host { transform: none !important; } .input-container { background-color: transparent; border: none; } .select-dropdown { min-width: 100%; width: max-content; } :host([hoist]) .select-dropdown { min-width: auto; width: max-content; } :host([position*="top"]) .select-dropdown { top: auto; bottom: calc(100% + var(--crowd-input-wrapper-padding-vertical, 0px) - var(--crowd-select-dropdown-spacing,2px)); transform-origin: center bottom; } :host([position*="right"]) .select-dropdown { top: auto; left: auto; right: 0px; bottom: calc(100% + var(--crowd-input-wrapper-padding-vertical, 0px) - var(--crowd-select-dropdown-spacing,2px)); transform-origin: center bottom; } `];open(){this.show=!0,this._dispatchOpen()}close(){this.show=!1,this._dispatchClose()}toggle(){this.show=!this.show,this.show?this._dispatchOpen():this._dispatchClose()}_dispatchOpen(){const t=new CustomEvent("crowdOpen");this.dispatchEvent(t)}_dispatchClose(){const t=new CustomEvent("crowdClose");this.dispatchEvent(t)}_hoistPosition(){let t=this.renderRoot.querySelector(".select-dropdown"),e=this.renderRoot.querySelector(".input-container");t&&e&&(t.style.top=e.getBoundingClientRect().bottom+"px",t.style.left=e.getBoundingClientRect().left+"px",t.style.width=e.getBoundingClientRect().width+"px"),requestAnimationFrame((()=>{this._hoistPosition()}))}constructor(){super(),this.position="bottom"}render(){let t=i.dy` <div class='select-dropdown' part='dropdown'> <slot></slot> </div> `;return this.hoist&&requestAnimationFrame((()=>{this._hoistPosition()})),i.dy` <div part='wrapper' class='wrapper'> <div @click='${this.open}' part='container' class='input-container'> <slot name='trigger'></slot> </div> ${this.hoist?"":t} </div> <div @click='${this.close}' part='overlay'></div> ${this.hoist?t:""} `}}},473:(t,e,r)=>{"use strict";r.d(e,{l:()=>A});var i=r(392);function n(t){let e=[];return t.children.length&&Array.prototype.slice.call(t.children).forEach((t=>{e.push(t),t.children.length&&(e=[...e,...n(t)])})),e}class A extends i.oi{static styles=i.iv` :host { display: block; } .form-container { padding: var(--crowd-form-padding-vertical, 1em) var(--crowd-form-padding-horizontal, 1em); } `;constructor(){super()}connectedCallback(){super.connectedCallback();let t=[].slice.call(this.querySelectorAll("[submit]"));t&&t.forEach((t=>{t.addEventListener("click",(()=>{this.submit()}),!1)}))}validate(){return new Promise(((t,e)=>{this.getFormControls().then((r=>{let i=!0;r.forEach((t=>{t.validate&&(t.validate(),t.invalid&&(i=!1))})),i&&t(),e()}))}))}getFormControls(){let t=n(this);return new Promise(((e,r)=>{e(t.filter((t=>t.name)))}))}getFormData(){return new Promise(((t,e)=>{let r=new FormData;this.getFormControls().then((e=>{e.forEach((t=>{("CROWD-CHECKBOX"==t.tagName&&t.checked||"CROWD-CHECKBOX"!=t.tagName)&&r.append(t.name,t.value)})),t(r)}))}))}submit(){this.validate().then((()=>{this.getFormData().then((t=>{const e=new CustomEvent("crowdFormSubmit",{detail:{formData:t}});this.dispatchEvent(e)}))}))}render(){return i.dy` <div part='container' class='form-container'> <form part='form'> <slot></slot> </form> </div> `}}},658:(t,e,r)=>{"use strict";r.d(e,{h:()=>A});var i=r(392),n=r(565);class A extends n.z{static properties={...super.properties,name:{type:String},src:{type:String},count:{type:Number}};static styles=[n.z.styles,i.iv` :host { line-height: 0; } button { background-color: transparent; border: none; padding: var(--crowd-icon-button-padding, 0.25em); width: 1em; height: 1em; } @media (hover: hover) { button:hover { background-color: transparent; border: none; } } `];constructor(){super()}render(){let t=i.dy` <slot part='label' class='label'> <slot><crowd-icon count='${this.count}' name='${this.name}' src='${this.src}'></crowd-icon></slot> </slot> `,e=i.dy` <button part='button'> ${t} </button> `;return this.href&&(e=i.dy` <a part='button' href='${this.href}' target='${this.target}'> ${t} </a> `),i.dy` ${e} `}}},497:(t,e,r)=>{"use strict";r.d(e,{J:()=>w});var i=r(392),n=r(692);const A=t=>(...e)=>({_$litDirective$:t,values:e});class o{constructor(t){}get _$AU(){return this._$AM._$AU}_$AT(t,e,r){this._$Ct=t,this._$AM=e,this._$Ci=r}_$AS(t,e){return this.update(t,e)}update(t,e){return this.render(...e)}}const{H:s}=n.Al,a=(t,e)=>{var r,i;const n=t._$AN;if(void 0===n)return!1;for(const t of n)null===(i=(r=t)._$AO)||void 0===i||i.call(r,e,!1),a(t,e);return!0},l=t=>{let e,r;do{if(void 0===(e=t._$AM))break;r=e._$AN,r.delete(t),t=e}while(0===(null==r?void 0:r.size))},c=t=>{for(let e;e=t._$AM;t=e){let r=e._$AN;if(void 0===r)e._$AN=r=new Set;else if(r.has(t))break;r.add(t),h(e)}};function d(t){void 0!==this._$AN?(l(this),this._$AM=t,c(this)):this._$AM=t}function u(t,e=!1,r=0){const i=this._$AH,n=this._$AN;if(void 0!==n&&0!==n.size)if(e)if(Array.isArray(i))for(let t=r;t<i.length;t++)a(i[t],!1),l(i[t]);else null!=i&&(a(i,!1),l(i));else a(this,t)}const h=t=>{var e,r,i,n;2==t.type&&(null!==(e=(i=t)._$AP)&&void 0!==e||(i._$AP=u),null!==(r=(n=t)._$AQ)&&void 0!==r||(n._$AQ=d))};class p extends o{constructor(){super(...arguments),this._$AN=void 0}_$AT(t,e,r){super._$AT(t,e,r),c(this),this.isConnected=t._$AU}_$AO(t,e=!0){var r,i;t!==this.isConnected&&(this.isConnected=t,t?null===(r=this.reconnected)||void 0===r||r.call(this):null===(i=this.disconnected)||void 0===i||i.call(this)),e&&(a(this,t),l(this))}setValue(t){if((t=>void 0===this._$Ct.strings)())this._$Ct._$AI(t,this);else{const e=[...this._$Ct._$AH];e[this._$Ci]=t,this._$Ct._$AI(e,this,0)}}disconnected(){}reconnected(){}}class f{constructor(t){this.U=t}disconnect(){this.U=void 0}reconnect(t){this.U=t}deref(){return this.U}}class m{constructor(){this.Y=void 0,this.q=void 0}get(){return this.Y}pause(){var t;null!==(t=this.Y)&&void 0!==t||(this.Y=new Promise((t=>this.q=t)))}resume(){var t;null===(t=this.q)||void 0===t||t.call(this),this.Y=this.q=void 0}}const g=t=>!(t=>null===t||"object"!=typeof t&&"function"!=typeof t)(t)&&"function"==typeof t.then,v=A(class extends p{constructor(){super(...arguments),this._$Cft=1073741823,this._$Cwt=[],this._$CG=new f(this),this._$CK=new m}render(...t){var e;return null!==(e=t.find((t=>!g(t))))&&void 0!==e?e:n.Jb}update(t,e){const r=this._$Cwt;let i=r.length;this._$Cwt=e;const A=this._$CG,o=this._$CK;this.isConnected||this.disconnected();for(let t=0;t<e.length&&!(t>this._$Cft);t++){const n=e[t];if(!g(n))return this._$Cft=t,n;t<i&&n===r[t]||(this._$Cft=1073741823,i=0,Promise.resolve(n).then((async t=>{for(;o.get();)await o.get();const e=A.deref();if(void 0!==e){const r=e._$Cwt.indexOf(n);r>-1&&r<e._$Cft&&(e._$Cft=r,e.setValue(t))}})))}return n.Jb}disconnected(){this._$CG.disconnect(),this._$CK.pause()}reconnected(){this._$CG.reconnect(this),this._$CK.resume()}});class y extends o{constructor(t){if(super(t),this.it=n.Ld,2!==t.type)throw Error(this.constructor.directiveName+"() can only be used in child bindings")}render(t){if(t===n.Ld||null==t)return this.vt=void 0,this.it=t;if(t===n.Jb)return t;if("string"!=typeof t)throw Error(this.constructor.directiveName+"() called with a non-string value");if(t===this.it)return this.vt;this.it=t;const e=[t];return e.raw=e,this.vt={_$litType$:this.constructor.resultType,strings:e,values:[]}}}y.directiveName="unsafeHTML",y.resultType=1,A(y);class b extends y{}b.directiveName="unsafeSVG",b.resultType=2;const _=A(b);class w extends i.oi{static properties={name:{type:String},style:{type:String},src:{type:String},count:{type:Number}};static styles=i.iv` :host { display: inline-grid; place-items: center; position: relative; margin: var(--crowd-icon-vertical-spacing,0px) var(--crowd-icon-horizontal-spacing,0px); } img,i,svg { width: 1em; height: 1em; color: inherit; } img { width: 100%; height: 100%; aspect-ratio: 1/1; object-fit: contain; } .count { position:absolute; top: 0; right: 0; aspect-ratio: 1/1; display: inline-grid; place-items: center; border-radius: 50%; background-color: var(--crowd-icon-count-background-color, red); color: var(--crowd-icon-count-color, white); font-size: 0.5em; transform: translate(50%,-50%); width: 1em; height: 1em; padding: 0.2em; line-height: 1; } `;constructor(){super()}_fetchSrc(){return new Promise(((t,e)=>{this.src?t(i.dy`<img src='${this.src}' />`):this.name&&fetch(`https://icons.getbootstrap.com/assets/icons/${this.name}.svg`).then((t=>t.text())).then((e=>t(i.dy`${_(e)}`)))}))}render(){return i.dy` ${v(this._fetchSrc().then((t=>i.dy`${t}`)),i.dy``)} ${this.count?i.dy`<span class='count'>${this.count<10?this.count:"•"}</span>`:""} `}}},757:(t,e,r)=>{"use strict";r.d(e,{I:()=>A});var i=r(392),n=r(414);class A extends i.oi{static properties={type:{type:String,reflect:!0},name:{type:String},value:{type:String,reflect:!0},placeholder:{type:String},label:{type:String},required:{type:Boolean},togglePassword:{type:Boolean},showPassword:{type:Boolean},errorMessage:{type:String},showSuccess:{type:Boolean},success:{type:Boolean,reflect:!0},successMessage:{type:String},invalid:{type:Boolean,reflect:!0},maxlength:{type:String}};static styles=i.iv` :host { display: block; } :host,:host *,:host *::before, :host *::after { box-sizing: border-box; } input,textarea { -webkit-appearance: none; background-color: transparent; border: none; height: 100%; width: calc(100% - (2 * var(--crowd-input-padding-horizontal, 1em))); color: inherit; font-family: inherit; font-size: inherit; padding: 0 var(--crowd-input-padding-horizontal, 1em); font-weight: var(--crowd-input-font-weight,400); height: calc( var(--crowd-input-height, 2em) - (var(--crowd-input-border-width,0px) * 2) ); text-transform: var(--crowd-input-text-transform); flex: 1 1 auto; } textarea { height: auto; padding: var(--crowd-textarea-padding-vertical, 1em) var(--crowd-textarea-padding-horizontal, 1em); } input:focus-visible, input:active, textarea:focus-visible, textarea:active { outline: none; } input::placeholder,textarea::placeholder { color: var(--crowd-input-placeholder-color, inherit); } .input-container { color: var(--crowd-input-color, inherit); background-color: var(--crowd-input-background, white); border: var(--crowd-input-border-width,1px) var(--crowd-input-border-type, solid) var(--crowd-input-border-color, #eee); border-radius: var(--crowd-input-border-radius, 0px); font-size: var(--crowd-input-font-size,1rem); display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: stretch; } .input-container:focus-within { box-shadow: 0 0 0 var(--crowd-input-focus-width, 2px) var(--crowd-input-focus-color, rgba(0,0,0,0.3)); } label { display: inline-block; color: var(--crowd-input-label-color, inherit); margin-bottom: var(--crowd-input-label-spacing, 0.5em); } .wrapper { padding: var(--crowd-input-wrapper-padding-vertical, 0) var(--crowd-input-wrapper-padding-horizontal, 0); max-width: 100%; } .password-toggle { -webkit-appearance: none; background-color: transparent; color: var(--crowd-input-password-toggle-color, inherit); font-family: inherit; padding: 0; border: none; display: grid; place-items:center; margin-right: var(--crowd-input-padding-horizontal, 1em); cursor: pointer; } .error,.success { font-size: var(--crowd-input-error-message-font-size, 0.8em); color: var(--crowd-input-error-message-color, red); } .success { color: var(--crowd-input-success-message-color, lime); } :host([invalid]) .input-container { outline: var(--crowd-input-status-outline-width,1px) solid var(--crowd-input-error-message-color, red); } :host([success]) .input-container { outline: var(--crowd-input-status-outline-width,1px) solid var(--crowd-input-success-message-color, lime); } slot[name='help-text'] { font-size:var(--crowd-input-error-message-font-size, 0.8em); } `;constructor(){super(),this.showPassword=!1,this.invalid=!1,this.showSuccess=!1,this.success=!1}connectedCallback(){super.connectedCallback(),this.id="input-"+Date.now(),this.classList.add("hydrated"),new n.z(this)}_dispatchChange(){const t=new CustomEvent("crowdChange");this.dispatchEvent(t)}_onInput(t){this.invalid=!1,this.value=t.currentTarget.value,this.validate(),this._dispatchChange()}_togglePassword(){this.showPassword=!this.showPassword}_getType(){return"password"===this.type&&this.showPassword?"text":this.type}_validateEmail(){this.value&&null==this.value.match(/^.+@\w+\.\w+/g)&&(this.invalid=!0)}validate(){this.invalid=!1,this.success=!1,"email"==this.type&&this._validateEmail(),this.required&&(""!==this.value&&null!=this.value||(this.invalid=!0)),!this.invalid&&this.showSuccess&&(this.success=!0);const t=new CustomEvent("crowdValidate",{detail:{value:this.value}});this.dispatchEvent(t)}render(){let t="";"password"===this.type&&this.togglePassword&&(t=i.dy` <button tabindex='-1' part='password-toggle' class='password-toggle' @click='${this._togglePassword}'> <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-eye" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.134 13.134 0 0 0 1.66 2.043C4.12 11.332 5.88 12.5 8 12.5c2.12 0 3.879-1.168 5.168-2.457A13.134 13.134 0 0 0 14.828 8a13.133 13.133 0 0 0-1.66-2.043C11.879 4.668 10.119 3.5 8 3.5c-2.12 0-3.879 1.168-5.168 2.457A13.133 13.133 0 0 0 1.172 8z"></path> <path fill-rule="evenodd" d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"></path> </svg> </button> `);let e="";this.invalid&&(e=i.dy` <div part='error' class='error'> ${this.errorMessage} </div> `);let r="";this.success&&(r=i.dy` <div part='success' class='success'> ${this.successMessage} </div> `);let n="";this.maxlength&&(n=`maxlength='${this.maxlength}'`);let A="";return this.label&&(A=i.dy` <label part='label' for='${this.id}'> ${this.label} </label> `),i.dy` <div part='wrapper' class='wrapper'> ${A} <div part='container' class='input-container'> <input ${n} @change='${this._dispatchChange}' @input='${this._onInput}' id='${this.id}' type='${this._getType()}' name='${this.name}' value='${this.value}' placeholder='${this.placeholder}' required='${this.required}' /> <slot name="icon"></slot> ${t} </div> ${e} ${r} <slot name="help-text"></slot> </div> `}}},897:(t,e,r)=>{"use strict";r.d(e,{s:()=>n});var i=r(392);class n extends i.oi{static styles=[i.iv` :host { display: inline-block; } li { display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center; padding: var(--crowd-menu-item-padding-vertical,0.2em) var(--crowd-menu-item-padding-horizontal,1em); color: var(--crowd-menu-item-color, inherit); background-color: var(--crowd-menu-item-background-color, transparent); transition-property: color, background-color; transition-duration: var(--crowd-menu-item-transition-duration,0.15s); transition-timing-function: var(--crowd-menu-item-transition-ease,ease-in-out); transition-delay: var(--crowd-menu-item-transition-delay, 0s); cursor: pointer; position: relative; container-type: inline-size; container-name: submenu-container; } slot[name='submenu'] { display: block; position: absolute; top: 0; left: 100%; transform: scale(0); opacity: 0; transition-duration: var(--crowd-menu-item-submenu-transition-duration, 0.15s); transition-timing-function: var(--crowd-menu-item-submenu-transition-ease, ease-in-out); transition-delay: var(--crowd-menu-item-submenu-transition-delay, 0s); } @media (hover: hover) { li:hover { background-color: var(--crowd-menu-item-hover-background-color, rgba(0,0,0,0.1)); color: var(--crowd-menu-item-hover-color, inherit); } li:hover slot[name='submenu'] { transform: scale(1); opacity: 1; } } li:focus-visible,li:focus-within { outline: none; background-color: var(--crowd-menu-item-hover-background-color, rgba(0,0,0,0.1)); color: var(--crowd-menu-item-hover-color, inherit); } li:focus-visible slot[name='submenu'],li:active slot[name='submenu'] { transform: scale(1); opacity: 1; } span.shortcut { opacity: 0.5; padding-left: 0.5em; } :host([position*="left"]) slot[name='submenu'] { left: auto; right: 100%; } :host([position*="bottom"]) slot[name='submenu'] { top: auto; bottom: 0; } `];static properties={shortcut:{type:String},position:{type:String,reflect:!0}};_executeShortcut(t){(t.ctrlKey||t.metaKey)&&t.key==this.shortcut&&(t.preventDefault(),this.triggerFocus(),this.click())}_listenForShortcut(){this.parentMenu&&document.addEventListener("keydown",this.bindExecuteShortcut,!1)}_stopListenForShortcut(){this.parentMenu&&document.removeEventListener("keydown",this.bindExecuteShortcut,!1)}triggerFocus(){this.renderRoot.querySelector("li").focus()}_executeNavigation(t){const e=()=>{this.nextElementSibling&&"CROWD-MENU-ITEM"==this.nextElementSibling.nodeName&&(this.blur(),this.nextElementSibling.triggerFocus())},r=()=>{this.previousElementSibling&&"CROWD-MENU-ITEM"==this.previousElementSibling.nodeName&&(this.blur(),this.previousElementSibling.triggerFocus())},i=()=>{this.querySelector("crowd-menu crowd-menu-item")&&(this.blur(),this.querySelector("crowd-menu crowd-menu-item").triggerFocus())};switch(t.key){case"Down":case"ArrowDown":t.preventDefault(),e();break;case"Up":case"ArrowUp":t.preventDefault(),r();break;case"Right":case"ArrowRight":t.preventDefault(),i();break;case"Enter":t.preventDefault(),this.click();default:return}}_listenForNavigation(){this.triggerFocus(),document.addEventListener("keydown",this.bindExecuteNavigation,!1)}_stopListenForNavigation(){document.removeEventListener("keydown",this.bindExecuteNavigation,!1)}constructor(){super(),this.position="right"}connectedCallback(){super.connectedCallback(),this.bindExecuteShortcut=this._executeShortcut.bind(this),this.bindExecuteNavigation=this._executeNavigation.bind(this),this.parentMenu=this.parentElement,this.parentMenu&&"CROWD-MENU"==this.parentMenu.nodeName&&this.shortcut&&(this.parentMenu.addEventListener("focusin",(()=>this._listenForShortcut()),!1),this.parentMenu.addEventListener("mouseover",(()=>this._listenForShortcut()),!1),this.parentMenu.addEventListener("focusout",(()=>this._stopListenForShortcut()),!1),this.parentMenu.addEventListener("mouseleave",(()=>this._stopListenForShortcut()),!1)),this.addEventListener("focusin",(()=>this._listenForNavigation()),!1),this.addEventListener("focus",(()=>this._listenForNavigation()),!1),this.addEventListener("focusout",(()=>this._stopListenForNavigation()),!1),this.addEventListener("mouseover",(()=>this._listenForNavigation()),!1),this.addEventListener("mouseleave",(()=>this._stopListenForNavigation()),!1)}render(){return i.dy` <li part='item' tabindex='0'> <slot></slot> <div class='submenu'> <slot name='submenu'> </div> </slot> <span class='shortcut'> ${this.shortcut?`Ctrl+${this.shortcut.toUpperCase()}`:""} </span> </li> `}}},842:(t,e,r)=>{"use strict";r.d(e,{v:()=>n});var i=r(392);class n extends i.oi{static styles=[i.iv` :host, :host * { box-sizing: inherit; } ul { list-style: none; margin: 0; padding: var(--crowd-menu-padding-vertical,0.5em) var(--crowd-menu-padding-horizontal,0.5em); background-color: var(--crowd-menu-background-color,white); border: var(--crowd-menu-border-width, 0px) var(--crowd-menu-border-style, solid) var(--crowd-menu-border-color, black); border-radius: var(--crowd-menu-border-radius, 0px); display: flex; flex-flow: column nowrap; justify-content: flex-start; align-items: stretch; max-height: 50vh; overflow: visible; } `];render(){return i.dy` <ul part='menu'> <slot></slot> </ul> `}}},582:(t,e,r)=>{"use strict";r.d(e,{e:()=>n});var i=r(392);class n extends i.oi{static properties={percentage:{type:String},size:{type:String},trackWidth:{type:String,attribute:"stroke-width"}};static styles=[i.iv` :host, :host * { box-sizing: inherit; } .progress-ring { display: inline-flex; align-items: center; justify-content: center; position: relative; } .progress-ring__image { width: var(--size,1em); height: var(--size,1em); transform: rotate(-90deg); transform-origin: 50% 50%; } .progress-ring__track { stroke: var(--track-color,rgba(0,0,0,0.2)); } .progress-ring__track, .progress-ring__indicator { --radius: calc(var(--size,1em) / 2 - var(--track-width,2px) * 2); --circumference: calc(var(--radius) * 2 * 3.14159); fill: none; stroke-width: var(--track-width,2px); r: var(--radius); cx: calc(var(--size,1em) / 2); cy: calc(var(--size,1em) / 2); } .progress-ring__indicator { stroke: var(--indicator-color,black); stroke-linecap: round; transition: stroke-dashoffset 0.35s ease 0s; stroke-dasharray: var(--circumference) var(--circumference); stroke-dashoffset: calc(var(--circumference) - var(--percentage) * var(--circumference)); } .progress-ring__label { display: flex; align-items: center; justify-content: center; position: absolute; top: 0px; left: 0px; width: 100%; height: 100%; text-align: center; user-select: none; } `];render(){return i.dy` <div part="base" class="progress-ring" role="progressbar" aria-valuemin="0" aria-valuemax="100" aria-valuenow="${this.percentage}"> <svg class="progress-ring__image" style='${this.size?`--size: ${this.size};`:""} ${this.trackWidth?`--track-width:${this.trackWidth}`:""}'> <circle class="progress-ring__track"></circle> <circle class="progress-ring__indicator" style="--percentage: ${this.percentage/100};"></circle> </svg> <span part="label" class="progress-ring__label"> <slot></slot> </span> </div> `}}},139:(t,e,r)=>{"use strict";r.d(e,{e:()=>A});var i=r(392),n=r(414);class A extends i.oi{static properties={value:{type:Number,reflect:!0},min:{type:Number},max:{type:Number},step:{type:Number},notches:{type:Boolean},numbers:{type:Boolean},tooltip:{type:Boolean},required:{type:Boolean},label:{type:String},invalid:{type:Boolean},errorMessage:{type:String},hideMinMax:{type:Boolean}};static styles=[i.iv` :host { display: inline-block; } :host,:host *,:host *::before, :host *::after { box-sizing: border-box; padding: 0; margin: 0; } .wrapper { padding: var(--crowd-input-wrapper-padding-vertical, 0) var(--crowd-input-wrapper-padding-horizontal, 0); max-width: 100%; width: var(--crowd-range-width,300px); } .container { position: relative; display: flex; flex-flow: row nowrap; justify-content: stretch; align-items: center; gap: var(--crowd-range-spacing,0.2em); } .container > span { flex: 0 1 auto; } .track { flex: 1 0 auto; position: relative; height: var(--crowd-range-track-height, 0.5em); border: var(--crowd-range-track-border-width, 1px) var(--crowd-range-track-border-style, solid) var(--crowd-range-track-border-color, #000); border-radius: var(--crowd-range-track-border-radius, 0px); background-color: var(--crowd-range-track-background-color,#eee); cursor: pointer; } .track::before { content: ''; display: block; position:absolute; top: 0; right: calc(100% - var(--value)); bottom: 0; left: 0; background-color: var(--crowd-range-indicator-color,#000); } .thumb { height: calc(var(--crowd-range-thumb-scale, 2) * var(--crowd-range-track-height, 0.5em)); width: calc(var(--crowd-range-thumb-scale, 2) * var(--crowd-range-track-height, 0.5em)); border: var(--crowd-range-track-border-width, 1px) var(--crowd-range-thumb-border-style, solid) var(--crowd-range-thumb-border-color, #000); border-radius: var(--crowd-range-thumb-border-radius, 50%); background-color: var(--crowd-range-thumb-background-color,#fff); position: absolute; top:50%; left: var(--value); transform: translate(-50%,-50%); pointer-events: none; } .track:focus-within .thumb { box-shadow: 0 0 0 var(--crowd-input-focus-width, 2px) var(--crowd-input-focus-color, rgba(0,0,0,0.3)); } input { position: absolute; top: 0; left: 0; right: 0; bottom: 0; -webkit-appearance: none; padding: 0; margin: 0; height: 0; width: 0; opacity: 0; } :host([notches]) .container { margin-top: calc(1ex + var(--crowd-range-notch-height,0.5em)); } .notches { width: 100%; position: absolute; bottom: 100%; height: var(--crowd-range-notch-height,0.5em); left: 0; right: 0; pointer-events:none; } .notches > div:first-child,.notches > div:last-child { opacity: 0; } .notches > div { position: absolute; top: 0; height: 100%; left: var(--left); color: var(--crowd-range-number-color, inherit); } .notches > div.notched::before { content: ''; display:block; position: absolute; top: 0; height: 100%; width: var(--crowd-range-notch-width,1px); background-color: var(--crowd-range-notch-color,#000); } .notches > div span { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); } label { display: inline-block; color: var(--crowd-input-label-color, inherit); margin-bottom: var(--crowd-input-label-spacing, 0.5em); } .error { font-size: var(--crowd-input-error-message-font-size, 0.8em); color: var(--crowd-input-error-message-color, red); } `];constructor(){super(),this.min="0",this.max="100",this.step=1,this.notches=!1,this.value=this.min,this.tooltipTimer=null,this.invalid=!1,this.hideMinMax=!1}connectedCallback(){super.connectedCallback(),this.id="range-"+Date.now(),new n.z(this)}_dispatchPreChange(){const t=new CustomEvent("crowdMove");this.dispatchEvent(t)}_dispatchChange(){const t=new CustomEvent("crowdChange");this.dispatchEvent(t)}_roundToStep(t,e){return Math.round(t/e)*e}_setValue(t){this.value=this._roundToStep(t.offsetX/t.currentTarget.getBoundingClientRect().width*this.max,this.step),this.value>this.max&&(this.value=this.max),this.value<this.min&&(this.value=this.min);let e=this.renderRoot.querySelector("input");e&&e.focus(),this.invalid=!1,this._showTooltip(),this._dispatchChange()}_onMove(t){1==Math.round(t.pressure)&&(this._dispatchPreChange(),this._setValue(t))}_showTooltip(){let t=this.renderRoot.querySelector("crowd-tooltip");t&&(t.setAttribute("show",!0),this.tooltipTimer&&clearTimeout(this.tooltipTimer),this.tooltipTimer=setTimeout((()=>{t.removeAttribute("show")}),4e3))}_keyDown(t){switch(t.preventDefault(),t.key){case"ArrowLeft":this._dispatchPreChange(),this.value>this.min&&(this.value=this._roundToStep(this.value-this.step,this.step),this._dispatchChange());break;case"ArrowRight":this._dispatchPreChange(),this.value<this.max&&(this.value=this._roundToStep(this.value+this.step,this.step),this._dispatchChange())}}validate(){this.invalid=!1,this.required&&(""!==this.value&&null!=this.value||(this.invalid=!0))}render(){let t="";this.hideMinMax||(t=i.dy`<span>${this.min}</span>`);let e="";this.max&&!this.hideMinMax&&(e=i.dy`<span>${this.max}</span>`);let r="";if(this.notches||this.numbers){let t=[];for(let e=0;e<=this.max;e+=this.step)t.push(e);r=i.dy` <div class='notches' part='notches'> ${t.map((t=>{let e="";return this.numbers&&(e=i.dy`<span>${t}</span>`),i.dy`<div class='${this.notches?"notched":""}' style='--left: ${t/this.max*100}%;'>${e}</div>`}))} </div> `}let n="";n=this.tooltip?i.dy` <crowd-tooltip content='${this.value}'> <div aria-label='Slider thumb' class='thumb' part='thumb'></div> </crowd-tooltip> `:i.dy` <div aria-label='Slider thumb' class='thumb' part='thumb'></div> `;let A="";this.label&&(A=i.dy` <label for='${this.id}'> ${this.label} </label> `);let o="";return this.invalid&&(o=i.dy` <div part='error' class='error'> ${this.errorMessage} </div> `),i.dy` <div part='wrapper' class='wrapper'> ${A} <div class='container' part='container'> ${t} <div @pointermove='${t=>this._onMove(t)}' @pointerdown='${t=>this._setValue(t)}' class='track' part='track' style='--value: ${this.value/this.max*100}%;'> ${r} ${n} <input inputmode='none' id='${this.id}' @keydown='${t=>this._keyDown(t)}' type='text' value='${this.value}' /> </div> ${e} </div> ${o} </div> `}}},515:(t,e,r)=>{"use strict";r.d(e,{P:()=>A,W:()=>o});var i=r(392),n=r(414);class A extends i.oi{static properties={id:{type:String},show:{type:Boolean,reflect:!0},value:{type:String,reflect:!0},selectedLabel:{type:String},name:{type:String},placeholder:{type:String},required:{type:Boolean},label:{type:String},clearable:{type:Boolean},multiple:{type:Boolean},hoist:{type:Boolean},errorMessage:{type:String},showSuccess:{type:Boolean},success:{type:Boolean,reflect:!0},successMessage:{type:String},invalid:{type:Boolean,reflect:!0},_childIndex:{type:Number},_multiSelect:{type:Array},_multiLabel:{type:Array}};static styles=i.iv` :host { display: inline-block; } :host,:host *,:host *::before, :host *::after { box-sizing: border-box; } .wrapper { padding: var(--crowd-input-wrapper-padding-vertical, 0) var(--crowd-input-wrapper-padding-horizontal, 0); max-width: 100%; position:relative; } label { display: inline-block; color: var(--crowd-input-label-color, inherit); margin-bottom: var(--crowd-input-label-spacing, 0.5em); } .select-dropdown { box-sizing: border-box; position: absolute; top:calc(100% - var(--crowd-input-wrapper-padding-vertical, 0) + var(--crowd-select-dropdown-spacing,2px)); left: 0; width: 100%; max-height: var(--crowd-select-dropdown-max-height, 50vh); overflow-y: scroll; padding: var(--crowd-select-dropdown-padding-vertical, 0.5em) var(--crowd-select-dropdown-padding-horizontal, 0.5em); pointer-events: none; transition-property: opacity, transform; transition-duration: var(--crowd-select-transition-duration, 0.15s); transition-timing-function: var(--crowd-select-transition-ease, ease-in-out); transition-delay: var(--crowd-select-transition-delay, 0s); opacity: 0; transform: scaleY(0.5); transform-origin: top center; background-color: var(--crowd-select-dropdown-background-color, white); z-index: var(--crowd-select-dropdown-z-index, 999); box-shadow: var( --crowd-select-dropdown-box-shadow, 0 2px 8px rgba(0, 0, 0, 0.1) ); border: var(--crowd-select-dropdown-border-width,0px) var(--crowd-input-border-type, solid) var(--crowd-select-dropdown-border-color, transparent); } :host([hoist]) .select-dropdown { position:fixed; top: auto; left: auto; } :host([show]) .select-dropdown { opacity: 1; transform: scale(1); pointer-events: all; } input,.multiple-items { -webkit-appearance: none; background-color: transparent; border: none; height: 100%; width: calc(100% - (2 * var(--crowd-input-padding-horizontal, 1em))); color: inherit; font-family: inherit; font-size: inherit; padding: 0 var(--crowd-input-padding-horizontal, 1em); font-weight: var(--crowd-input-font-weight,400); height: calc( var(--crowd-input-height, 2em) - (var(--crowd-input-border-width,0px) * 2) ); caret-color: transparent; cursor: pointer; text-transform: var(--crowd-input-text-transform); } input.multi { opacity: 0; } input:focus-visible, input:active { outline: none; } input::placeholder { color: var(--crowd-input-placeholder-color, inherit); } .input-container { color: var(--crowd-input-color, inherit); background-color: var(--crowd-input-background, white); border: var(--crowd-input-border-width,0px) var(--crowd-input-border-type, solid) var(--crowd-input-border-color, transparent); border-radius: var(--crowd-input-border-radius, 0px); font-size: var(--crowd-input-font-size,1rem); padding: var(--crowd-input-padding-vertical, 1em) 0; display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: stretch; position: relative; } .input-container:focus-within, .input-container:focus-visible { box-shadow: 0 0 0 var(--crowd-input-focus-width, 2px) var(--crowd-input-focus-color, rgba(0,0,0,0.3)); } [part='overlay'] { position: fixed; top: 0; left: 0; right: 0; bottom: 0; pointer-events: none; z-index: calc(var(--crowd-select-dropdown-z-index, 999) - 1); } :host([show]) [part='overlay'] { pointer-events: all; } button { -webkit-appearance: none; background-color: transparent; color: var(--crowd-select-icon-color, inherit); border: none; padding: 0; display: grid; place-items: center; transition-property: transform,color; transition-duration: var(--crowd-select-icon-transition-duration,0.15s); transition-timing-function: var(--crowd-select-icon-transition-ease, ease-in-out); transition-delay: var(--crowd-select-icon-transition-delay, 0s); margin-right: var(--crowd-input-padding-horizontal, 1em); cursor: pointer; position:relative; z-index: 2; } .error,.success { font-size: var(--crowd-input-error-message-font-size, 0.8em); color: var(--crowd-input-error-message-color, red); } .success { color: var(--crowd-input-success-message-color, lime); } @media (hover: hover) { button:hover { color: var(--crowd-select-icon-hover-color, inherit); } } :host([show]) button[part='toggle'] { transform: rotate(180deg); } :host([invalid]) .input-container { outline: var(--crowd-input-status-outline-width,1px) solid var(--crowd-input-error-message-color, red); } :host([success]) .input-container { outline: var(--crowd-input-status-outline-width,1px) solid var(--crowd-input-success-message-color, lime); } .multiple-items { position: absolute; top: 50%; transform: translateY(-50%); bottom: 0; left: 0; right: 0; overflow-x: scroll; display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center; gap: 4px; z-index: 1; scrollbar-width:thin; } .multiple-items::-webkit-scrollbar { height: 4px; background-color: #aaa; } .multiple-items::-webkit-scrollbar-thumb { background: #000; } .multiple-items crowd-badge { pointer-events: auto; gap: 2px; } `;constructor(){super(),this.placeholder="Please select",this.show=!1,this.childIndex=-1,this.invalid=!1}connectedCallback(){super.connectedCallback(),this.id="select-"+Date.now(),new n.z(this),this._multiSelect=[],this._multiLabel=[],this.multiple&&this.value&&(this._multiSelect=this.value.split(","),this._multiLabel=this.value.split(","),console.log(this._multiSelect),this._multiSelect.length>0?(this.value=this._multiSelect.join(),this.selectedLabel=this._multiLabel.join()):(this.value="",this.selectedLabel=""),console.log(this.value))}firstUpdated(){let t=[].slice.call(this.querySelectorAll("crowd-option"));t&&t.forEach((t=>{t.addEventListener("click",(()=>{this._selectOption(t),this.multiple||this.close()}),!1),console.log(t.value.toUpperCase())}))}updated(){let t=[].slice.call(this.querySelectorAll("crowd-option"));t&&t.forEach((t=>{this.value&&this.value==t.value?(t.isActive=!0,this.selectedLabel!=t.innerHTML.replace(/(<([^>]+)>)/gi,"")&&(this.selectedLabel=t.innerHTML.replace(/(<([^>]+)>)/gi,""))):this.multiple&&this.value&&this._multiSelect.indexOf(t.value)>-1?t.isActive=!0:t.isActive=!1}))}open(){this.show=!0}close(){this.show=!1,this.childIndex=-1,this._blurOptions()}_blurOptions(){let t=[].slice.call(this.querySelectorAll("crowd-option"));t&&t.forEach((t=>{t.blur()}))}validate(){this.invalid=!1,this.success=!1,this.required&&(""!==this.value&&null!=this.value||(this.invalid=!0)),!this.invalid&&this.showSuccess&&(this.success=!0);const t=new CustomEvent("crowdValidate",{detail:{value:this.value}});this.dispatchEvent(t)}toggle(){this.show=!this.show,this.show||(this.childIndex=-1,this._blurOptions())}clear(){this._multiSelect=[],this._multiLabel=[],this.value=null,this._dispatchChange()}_dispatchChange(){const t=new CustomEvent("crowdChange");this.dispatchEvent(t)}_onInput(t){t.preventDefault(),this.invalid=!1}_keyDown(t){if("Tab"===t.key)return;t.preventDefault();let e=[].slice.call(this.querySelectorAll("crowd-option"));"Enter"===t.key?(this.open(),-1!=this.childIndex&&e[this.childIndex].click()):"ArrowDown"===t.key?(this.open(),e[this.childIndex]&&e[this.childIndex].blur(),e.length==this.childIndex+1?this.childIndex=0:this.childIndex=this.childIndex+1,e[this.childIndex]&&e[this.childIndex].focus()):"ArrowUp"===t.key?(this.open(),e[this.childIndex]&&e[this.childIndex].blur(),0==this.childIndex?this.childIndex=e.length-1:this.childIndex=this.childIndex-1,e[this.childIndex]&&e[this.childIndex].focus()):(this.open(),e&&e.forEach(((r,i)=>{if(r.value.toUpperCase()[0]==t.key.toUpperCase())return e.forEach((t=>t.blur())),r.focus(),void(this.childIndex=i)})))}_selectOption(t){let e=t.value,r=t.innerHTML.replace(/(<([^>]+)>)/gi,"");this.multiple?(this._multiSelect.indexOf(e)<0?(this._multiSelect.push(e),this._multiLabel.push(r)):(this._multiSelect.splice(this._multiSelect.indexOf(e),1),this._multiLabel.splice(this._multiLabel.indexOf(r),1)),this._multiSelect.length>0?(this.value=this._multiSelect.join(),this.selectedLabel=this._multiLabel.join()):(this.value="",this.selectedLabel="")):(this.value=e,this.selectedLabel=r),this.validate(),this._dispatchChange()}_hoistPosition(){let t=this.renderRoot.querySelector(".select-dropdown"),e=this.renderRoot.querySelector(".input-container");t&&e&&(t.style.top=e.getBoundingClientRect().bottom+"px",t.style.left=e.getBoundingClientRect().left+"px",t.style.width=e.getBoundingClientRect().width+"px"),requestAnimationFrame((()=>{this._hoistPosition()}))}render(){let t="";this.clearable&&this.value&&(t=i.dy` <button @click='${this.clear}' part="clear" name="clear" aria-label="clear select"> <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-x-circle" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" d="M8 15A7 7 0 1 0 8 1a7 7 0 0 0 0 14zm0 1A8 8 0 1 0 8 0a8 8 0 0 0 0 16z"></path> <path fill-rule="evenodd" d="M4.646 4.646a.5.5 0 0 1 .708 0L8 7.293l2.646-2.647a.5.5 0 0 1 .708.708L8.707 8l2.647 2.646a.5.5 0 0 1-.708.708L8 8.707l-2.646 2.647a.5.5 0 0 1-.708-.708L7.293 8 4.646 5.354a.5.5 0 0 1 0-.708z"></path> </svg> </button> `);let e=i.dy` <div class='select-dropdown'> <slot></slot> </div> `;this.hoist&&requestAnimationFrame((()=>{this._hoistPosition()}));let r="";this.label&&(r=i.dy` <label @click='${this.open}' part='label' for='${this.id}'> ${this.label} </label> `);let n="";this.invalid&&(n=i.dy` <div part='error' class='error'> ${this.errorMessage} </div> `);let A="";this.success&&(A=i.dy` <div part='success' class='success'> ${this.successMessage} </div> `);let o=i.dy``;return this.multiple&&this._multiSelect.length&&(o=i.dy` <div class='multiple-items' @click='${this.open}'> ${this._multiSelect.map((t=>i.dy`<crowd-badge pill @click='${()=>this._selectOption(t)}'>${t}<crowd-icon name='x'></crowd-icon></crowd-badge>`))} </div> `),i.dy` <div part='wrapper' class='wrapper'> ${r} <div part='container' class='input-container'> <input inputmode='none' class='${this._multiSelect.length?"multi":""}' @click='${this.open}' @change='${this._dispatchChange}' @keydown='${this._keyDown}' @input='${this._onInput}' id='${this.id}' type='text' name='${this.name}' value='${this.selectedLabel}' placeholder='${this.placeholder}' required='${this.required}' /> ${o} ${t} <slot name="icon"></slot> <button @click='${this.toggle}' part="toggle" name="toggle" aria-label="toggle dropdown"> <svg width="1em" height="1em" viewBox="0 0 16 16" class="bi bi-chevron-down" fill="currentColor" xmlns="http://www.w3.org/2000/svg"> <path fill-rule="evenodd" d="M1.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"></path> </svg> </button> </div> ${n} ${A} ${this.hoist?"":e} </div> <div @click='${this.close}' part='overlay'></div> ${this.hoist?e:""} `}}class o extends i.oi{static properties={value:{type:String},isFocus:{type:Boolean,reflect:!0,attribute:"focus"},isActive:{type:Boolean,reflect:!0,attribute:"active"}};static styles=i.iv` :host,:host *,:host *::before, :host *::after { box-sizing: border-box; } [part='container'] { padding: var(--crowd-option-padding-vertical, 0.2em) var(--crowd-option-padding-horizontal, 1em); font-family: var(--crowd-option-font-family, inherit); font-size: var(--crowd-option-font-size, inherit); font-weight: var(--crowd-option-font-weight, inherit); color: var(--crowd-option-color, inherit); background-color: var(--crowd-option-background-color, transparent); width: calc(100% - (1 * var(--crowd-option-padding-horizontal, 1em))); margin: 0 calc(-1 * var(--crowd-select-dropdown-padding-horizontal, 0.5em)); cursor: pointer; transition-property: color, background-color; transition-duration: var(--crowd-option-transition-duration,0.15s); transition-timing-function: var(--crowd-option-transition-timing-function, ease-in-out); transition-delay: var(--crowd-option-transition-delay, 0s); border-radius: var(--crowd-option-border-radius,0px); } @media (hover: hover) { [part='container']:hover { color: var(--crowd-option-hover-color, inherit); background-color: var(--crowd-option-hover-background-color, rgba(0,0,0,0.1)); } } [part='container']:focus-visible, :host([focus]) [part='container'],:host([active]) [part='container'] { color: var(--crowd-option-hover-color, inherit); background-color: var(--crowd-option-hover-background-color, rgba(0,0,0,0.1)); } `;constructor(){super(),this.isFocus=!1,this.isActive=!1}focus(){this.isFocus=!0}blur(){this.isFocus=!1}render(){return i.dy` <div part='container'> <slot></slot> </div> `}}},320:(t,e,r)=>{"use strict";r.d(e,{$:()=>n});var i=r(392);class n extends i.oi{static styles=[i.iv` :host { display: inline-block; } :host,:host * { box-sizing: inherit; } figure { margin: 0; width: 1em; height: 1em; } svg { width: 100%; height: 100%; transform-origin: 50% 50%; animation: spin var(--crowd-spinner-animation-duration, 1s) forwards infinite linear; } .track,.indicator { fill: none; stroke-width: var(--track-width,2px); r: calc(0.5em - var(--track-width,2px) / 2); cx: 0.5em; cy: 0.5em; stroke: var(--track-color,rgba(0,0,0,0.2)); } .indicator { stroke: var(--indicator-color,black); stroke-linecap: round; stroke-dasharray: 25 250; transform-origin: 50% 50%; animation: pulse var(--crowd-spinner-animation-duration, 1s) forwards infinite alternate linear; } @keyframes pulse { 0% { stroke-dasharray: 25 250; } 100% { stroke-dasharray: 3 250; } } @keyframes spin { 0% { transform: rotate(0deg); } 50% { transform: rotate(180deg); } 0% { transform: rotate(360deg); } } `];render(){return i.dy` <figure> <svg> <circle class='track'></circle> <circle class='indicator'></circle> </svg> </figure> `}}},752:(t,e,r)=>{"use strict";r.d(e,{r:()=>n});var i=r(392);class n extends i.oi{static properties={checked:{type:Boolean,reflect:!0},label:{type:String},value:{type:String,reflect:!0},name:{type:String},true:{type:String},false:{type:String}};static styles=[i.iv` :host { display: inline-block; } :host,:host *,:host *::before, :host *::after { box-sizing: border-box; padding: 0; margin: 0; } .wrapper { padding: var(--crowd-input-wrapper-padding-vertical, 0) var(--crowd-input-wrapper-padding-horizontal, 0); max-width: 100%; } .container { display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center; gap: var(--crowd-switch-spacing, 0.5em); } .container > span { cursor: pointer; } .error { font-size: var(--crowd-input-error-message-font-size, 0.8em); color: var(--crowd-input-error-message-color, red); } slot[name='help-text'] { font-size:var(--crowd-input-error-message-font-size, 0.8em); } :host label { display: inline-block; color: var(--crowd-input-label-color, inherit); margin: 0 0 var(--crowd-input-label-spacing, 0.5em); } .track { position:relative; padding: var(--crowd-switch-track-spacing, 3px); border-radius: var(--crowd-switch-border-radius, 999px); width: calc((2 * var(--crowd-switch-size, 1em)) + (2 * var(--crowd-switch-track-spacing, 3px))); height: calc((var(--crowd-switch-size, 1em)) + (2 * var(--crowd-switch-track-spacing, 3px))); background-color: var(--crowd-switch-track-background-color, #eeeeee); cursor: pointer; transition-property: background-color; transition-duration: var(--crowd-switch-transition-duration,0.15s); transition-delay: var(--crowd-switch-transition-delay, 0s); transition-timing-function: var(--crowd-switch-ease, ease-in-out); } .track:focus-within { box-shadow: 0 0 0 var(--crowd-input-focus-width, 2px) var(--crowd-input-focus-color, rgba(0,0,0,0.3)); } .thumb { position: absolute; display: block; width: var(--crowd-switch-size, 1em); height: var(--crowd-switch-size, 1em); border-radius: var(--crowd-switch-border-radius, 999px); left: var(--crowd-switch-track-spacing, 3px); right: auto; background-color: var(--crowd-switch-thumb-background-color, #ffffff); transition-property: left, right; transition-duration: var(--crowd-switch-transition-duration,0.15s); transition-delay: var(--crowd-switch-transition-delay, 0s); transition-timing-function: var(--crowd-switch-ease, ease-in-out); } .on { color: var(--crowd-switch-unswitched-text-color, rgba(0,0,0,0.5)); } :host([checked]) .on { color: inherit; } :host([checked]) .off { color: var(--crowd-switch-unswitched-text-color, rgba(0,0,0,0.5)); } :host([checked]) .thumb { left: 50%; } :host([checked]) .track { background-color: var(--crowd-switch-track-background-color-active, #000000); } input[type='text'] { -webkit-appearance: none; opacity: 0; position: absolute; width: 0; height: 0; } `];_updateValue(){this.checked&&this.true?this.value=this.true:this.checked?this.value="true":!this.checked&&this.false?this.value=this.false:this.checked||(this.value="false")}_dispatchChange(){const t=new CustomEvent("crowdChange");this.dispatchEvent(t)}_toggle(){this.checked=!this.checked;let t=this.renderRoot.querySelector("input");t&&t.focus(),this._updateValue(),this._dispatchChange()}_check(){this.checked=!0;let t=this.renderRoot.querySelector("input");t&&t.focus(),this._updateValue(),this._dispatchChange()}_unCheck(){this.checked=!1;let t=this.renderRoot.querySelector("input");t&&t.focus(),this._updateValue(),this._dispatchChange()}_keyDown(t){switch(t.preventDefault(),t.key){case" ":this._toggle();break;case"ArrowLeft":this._unCheck();break;case"ArrowRight":this._check()}}constructor(){super(),this.checked=!1,this.value="false"}connectedCallback(){super.connectedCallback(),this.id="switch-"+Date.now()}render(){let t="";this.invalid&&(t=i.dy` <div part='error' class='error'> ${this.errorMessage} </div> `);let e="";this.label&&(e=i.dy` <label part='label' for='${this.id}'> ${this.label} </label> `);let r="";this.false&&(r=i.dy` <span class='off' part='off' @click='${()=>this._unCheck()}'>${this.false}</span> `);let n="";return this.true&&(n=i.dy` <span class='on' part='on' @click='${()=>this._check()}'>${this.true}</span> `),i.dy` <div part='wrapper' class='wrapper'> ${e} <div class='container' part='container'> ${r} <div @click='${()=>this._toggle()}' class='track' part='track'> <span class='thumb' part='thumb'></span> <input inputmode='none' aria-label='Toggle switch' @keydown='${t=>this._keyDown(t)}' id='${this.id}' type='text' /> </div> ${n} </div> ${t} <slot name="help-text"></slot> </div> `}}},822:(t,e,r)=>{"use strict";r.d(e,{K:()=>A});var i=r(392),n=r(757);class A extends n.I{static styles=i.iv` ${n.I.styles} .input-container { position: relative; } .icon { position: absolute; top: var(--crowd-textarea-icon-top,1ex); right: var(--crowd-textarea-icon-right,1ex); bottom: var(--crowd-textarea-icon-bottom,auto); left: var(--crowd-textarea-icon-left,auto); } `;constructor(){super()}render(){let t="";this.invalid&&(t=i.dy` <div part='error' class='error'> ${this.errorMessage} </div> `);let e="";this.success&&(e=i.dy` <div part='success' class='success'> ${this.successMessage} </div> `);let r="";return this.maxlength&&(r=`maxlength='${this.maxlength}'`),i.dy` <div part='wrapper' class='wrapper'> <label part='label' for='${this.id}'> ${this.label} </label> <div part='container' class='input-container'> <textarea rows='4' ${r} @change='${this._dispatchChange}' @input='${this._onInput}' id='${this.id}' name='${this.name}' value='${this.value}' placeholder='${this.placeholder}' required='${this.required}'>${this.value}</textarea> <div class='icon'> <slot name="icon"></slot> </div> </div> ${t} ${e} <slot name="help-text"></slot> </div> `}}},613:(t,e,r)=>{"use strict";r.d(e,{g:()=>n});var i=r(392);class n extends i.oi{static styles=[i.iv` :host { display: block; } .toast-stack { position: fixed; top: 1rem; right: 1rem; display: flex; flex-flow: column nowrap; justify-content: flex-start; align-items: stretch; gap: var(--toast-stack-gap,1rem); z-index: var(--toast-stack-z-index, 9999); max-width: var(--toast-stack-max-width, min(500px,100%)); pointer-events: none; } `];render(){return i.dy` <article class='toast-stack'> <slot></slot> </article> `}}},461:(t,e,r)=>{"use strict";r.d(e,{u:()=>n});var i=r(392);class n extends i.oi{static properties={_hidden:{type:Boolean,reflect:!0},show:{type:Boolean},content:{type:String},delay:{type:Number},hoist:{type:Boolean}};static styles=[i.iv` :host { display: contents; position:relative; } :host, :host * { box-sizing: inherit; } .positioner { position: absolute; z-index: var(--crowd-tooltip-z-index,1); pointer-events: none; } :host([hoist]) .positioner { position: fixed; } .tooltip { display: inline-block; font-size: 0.8em; padding: var(--crowd-tooltip-padding-vertical,0.5em) var(--crowd-tooltip-padding-horizontal,0.8em); color: var(--crowd-tooltip-color, inherit); background-color: var(--crowd-tooltip-background-color, white); border: var(--crowd-tooltip-border-width, 1px) var(--crowd-tooltip-border-style, solid) var(--crowd-tooltip-border-color, #eee); border-radius: var(--crowd-tooltip-border-radius, 4px); transform: translate(-50%,calc(-100% - 1em)) scale(1); opacity: 1; transition-property: transform, opacity; transition-duration: var(--crowd-tooltip-transition-duration, 0.15s); transition-timing-function: var(--crowd-tooltip-transition-ease, ease-in-out); transition-delay: var(--tooltip-delay); } :host([_hidden]) .tooltip { pointer-events: none; transform: translate(-50%,calc(-100% - 1em)) scale(0.5); opacity: 0; transition-delay: 0s; } :host([show]) .tooltip { pointer-events: all !important; transform: translate(-50%,calc(-100% - 1em)) scale(1) !important; opacity: 1 !important; } `];constructor(){super(),this._hidden=!0,this.delay=0}_positionTooltip(){let t=this.renderRoot.querySelector(".positioner");if(!t)return;let e=null,r=null;if(this.hoist)for(let t of this.children){let i=t.getBoundingClientRect();(null===e||i.top<e)&&(e=i.top);let n=i.left+i.width/2;(null===r||n>r)&&(r=n)}else for(let t of this.children){(null===e||t.offsetTop<e)&&(e=t.offsetTop);let i=t.offsetLeft+t.offsetWidth/2;(null===r||i>r)&&(r=i)}t.style.top=e+"px",t.style.left=r+"px",requestAnimationFrame((()=>this._positionTooltip()))}connectedCallback(){super.connectedCallback();for(let t of this.children)t.addEventListener("pointerover",(()=>this._show()),!1),t.addEventListener("pointerleave",(()=>this._hide()),!1)}_show(){this._hidden=!1}_hide(){this._hidden=!0}render(){return this._positionTooltip(),i.dy` <div class='positioner' part='positioner'> <article part='tooltip' style='--tooltip-delay: ${this.delay/1e3}s;' class='tooltip' ${this._hidden?'hidden aria-hidden="true"':""}> ${this.content} </article> </div> <slot></slot> `}}},414:(t,e,r)=>{"use strict";r.d(e,{z:()=>i});class i{constructor(t){this.element=t,this.form=t.closest("form"),this.bindHandleFormData=this.handleFormData.bind(this),this.form&&this.element.name&&this.form.addEventListener("formdata",this.bindHandleFormData,!1),this.bindHandleFormSubmit=this.handleFormSubmit.bind(this),this.form&&this.form.addEventListener("submit",this.bindHandleFormSubmit,!1)}handleFormSubmit(t){const e=this.element.disabled;this.element.validate&&this.element.validate(),this.form&&!this.form.noValidate&&!e&&this.element.invalid&&(t.preventDefault(),t.stopImmediatePropagation())}handleFormData(t){for(var e of(null==this.element.value?t.formData.append(this.element.name,null):Array.isArray(this.element.value)?this.element.value.forEach((e=>{t.formData.append(this.element.name,e.toString())})):(console.log(this.element.name,this.element.value.toString()),t.formData.append(this.element.name,this.element.value.toString())),t.formData.entries()))console.log(e[0]+", "+e[1])}}},692:(t,e,r)=>{"use strict";var i,n;r.d(e,{Al:()=>R,dy:()=>x,Jb:()=>k,Ld:()=>S,sY:()=>E});const A=globalThis.trustedTypes,o=A?A.createPolicy("lit-html",{createHTML:t=>t}):void 0,s=`lit$${(Math.random()+"").slice(9)}$`,a="?"+s,l=`<${a}>`,c=document,d=(t="")=>c.createComment(t),u=t=>null===t||"object"!=typeof t&&"function"!=typeof t,h=Array.isArray,p=t=>{var e;return h(t)||"function"==typeof(null===(e=t)||void 0===e?void 0:e[Symbol.iterator])},f=/<(?:(!--|\/[^a-zA-Z])|(\/?[a-zA-Z][^>\s]*)|(\/?$))/g,m=/-->/g,g=/>/g,v=/>|[ \n\r](?:([^\s"'>=/]+)([ \n\r]*=[ \n\r]*(?:[^ \n\r"'`<>=]|("|')|))|$)/g,y=/'/g,b=/"/g,_=/^(?:script|style|textarea)$/i,w=t=>(e,...r)=>({_$litType$:t,strings:e,values:r}),x=w(1),k=(w(2),Symbol.for("lit-noChange")),S=Symbol.for("lit-nothing"),C=new WeakMap,E=(t,e,r)=>{var i,n;const A=null!==(i=null==r?void 0:r.renderBefore)&&void 0!==i?i:e;let o=A._$litPart$;if(void 0===o){const t=null!==(n=null==r?void 0:r.renderBefore)&&void 0!==n?n:null;A._$litPart$=o=new I(e.insertBefore(d(),t),t,void 0,null!=r?r:{})}return o._$AI(t),o},P=c.createTreeWalker(c,129,null,!1),T=(t,e)=>{const r=t.length-1,i=[];let n,A=2===e?"<svg>":"",a=f;for(let e=0;e<r;e++){const r=t[e];let o,c,d=-1,u=0;for(;u<r.length&&(a.lastIndex=u,c=a.exec(r),null!==c);)u=a.lastIndex,a===f?"!--"===c[1]?a=m:void 0!==c[1]?a=g:void 0!==c[2]?(_.test(c[2])&&(n=RegExp("</"+c[2],"g")),a=v):void 0!==c[3]&&(a=v):a===v?">"===c[0]?(a=null!=n?n:f,d=-1):void 0===c[1]?d=-2:(d=a.lastIndex-c[2].length,o=c[1],a=void 0===c[3]?v:'"'===c[3]?b:y):a===b||a===y?a=v:a===m||a===g?a=f:(a=v,n=void 0);const h=a===v&&t[e+1].startsWith("/>")?" ":"";A+=a===f?r+l:d>=0?(i.push(o),r.slice(0,d)+"$lit$"+r.slice(d)+s+h):r+s+(-2===d?(i.push(void 0),e):h)}const c=A+(t[r]||"<?>")+(2===e?"</svg>":"");return[void 0!==o?o.createHTML(c):c,i]};class O{constructor({strings:t,_$litType$:e},r){let i;this.parts=[];let n=0,o=0;const l=t.length-1,c=this.parts,[u,h]=T(t,e);if(this.el=O.createElement(u,r),P.currentNode=this.el.content,2===e){const t=this.el.content,e=t.firstChild;e.remove(),t.append(...e.childNodes)}for(;null!==(i=P.nextNode())&&c.length<l;){if(1===i.nodeType){if(i.hasAttributes()){const t=[];for(const e of i.getAttributeNames())if(e.endsWith("$lit$")||e.startsWith(s)){const r=h[o++];if(t.push(e),void 0!==r){const t=i.getAttribute(r.toLowerCase()+"$lit$").split(s),e=/([.?@])?(.*)/.exec(r);c.push({type:1,index:n,name:e[2],strings:t,ctor:"."===e[1]?D:"?"===e[1]?L:"@"===e[1]?z:M})}else c.push({type:6,index:n})}for(const e of t)i.removeAttribute(e)}if(_.test(i.tagName)){const t=i.textContent.split(s),e=t.length-1;if(e>0){i.textContent=A?A.emptyScript:"";for(let r=0;r<e;r++)i.append(t[r],d()),P.nextNode(),c.push({type:2,index:++n});i.append(t[e],d())}}}else if(8===i.nodeType)if(i.data===a)c.push({type:2,index:n});else{let t=-1;for(;-1!==(t=i.data.indexOf(s,t+1));)c.push({type:7,index:n}),t+=s.length-1}n++}}static createElement(t,e){const r=c.createElement("template");return r.innerHTML=t,r}}function N(t,e,r=t,i){var n,A,o,s;if(e===k)return e;let a=void 0!==i?null===(n=r._$Cl)||void 0===n?void 0:n[i]:r._$Cu;const l=u(e)?void 0:e._$litDirective$;return(null==a?void 0:a.constructor)!==l&&(null===(A=null==a?void 0:a._$AO)||void 0===A||A.call(a,!1),void 0===l?a=void 0:(a=new l(t),a._$AT(t,r,i)),void 0!==i?(null!==(o=(s=r)._$Cl)&&void 0!==o?o:s._$Cl=[])[i]=a:r._$Cu=a),void 0!==a&&(e=N(t,a._$AS(t,e.values),a,i)),e}class ${constructor(t,e){this.v=[],this._$AN=void 0,this._$AD=t,this._$AM=e}get parentNode(){return this._$AM.parentNode}get _$AU(){return this._$AM._$AU}p(t){var e;const{el:{content:r},parts:i}=this._$AD,n=(null!==(e=null==t?void 0:t.creationScope)&&void 0!==e?e:c).importNode(r,!0);P.currentNode=n;let A=P.nextNode(),o=0,s=0,a=i[0];for(;void 0!==a;){if(o===a.index){let e;2===a.type?e=new I(A,A.nextSibling,this,t):1===a.type?e=new a.ctor(A,a.name,a.strings,this,t):6===a.type&&(e=new B(A,this,t)),this.v.push(e),a=i[++s]}o!==(null==a?void 0:a.index)&&(A=P.nextNode(),o++)}return n}m(t){let e=0;for(const r of this.v)void 0!==r&&(void 0!==r.strings?(r._$AI(t,r,e),e+=r.strings.length-2):r._$AI(t[e])),e++}}class I{constructor(t,e,r,i){var n;this.type=2,this._$AH=S,this._$AN=void 0,this._$AA=t,this._$AB=e,this._$AM=r,this.options=i,this._$Cg=null===(n=null==i?void 0:i.isConnected)||void 0===n||n}get _$AU(){var t,e;return null!==(e=null===(t=this._$AM)||void 0===t?void 0:t._$AU)&&void 0!==e?e:this._$Cg}get parentNode(){let t=this._$AA.parentNode;const e=this._$AM;return void 0!==e&&11===t.nodeType&&(t=e.parentNode),t}get startNode(){return this._$AA}get endNode(){return this._$AB}_$AI(t,e=this){t=N(this,t,e),u(t)?t===S||null==t||""===t?(this._$AH!==S&&this._$AR(),this._$AH=S):t!==this._$AH&&t!==k&&this.$(t):void 0!==t._$litType$?this.T(t):void 0!==t.nodeType?this.S(t):p(t)?this.M(t):this.$(t)}A(t,e=this._$AB){return this._$AA.parentNode.insertBefore(t,e)}S(t){this._$AH!==t&&(this._$AR(),this._$AH=this.A(t))}$(t){this._$AH!==S&&u(this._$AH)?this._$AA.nextSibling.data=t:this.S(c.createTextNode(t)),this._$AH=t}T(t){var e;const{values:r,_$litType$:i}=t,n="number"==typeof i?this._$AC(t):(void 0===i.el&&(i.el=O.createElement(i.h,this.options)),i);if((null===(e=this._$AH)||void 0===e?void 0:e._$AD)===n)this._$AH.m(r);else{const t=new $(n,this),e=t.p(this.options);t.m(r),this.S(e),this._$AH=t}}_$AC(t){let e=C.get(t.strings);return void 0===e&&C.set(t.strings,e=new O(t)),e}M(t){h(this._$AH)||(this._$AH=[],this._$AR());const e=this._$AH;let r,i=0;for(const n of t)i===e.length?e.push(r=new I(this.A(d()),this.A(d()),this,this.options)):r=e[i],r._$AI(n),i++;i<e.length&&(this._$AR(r&&r._$AB.nextSibling,i),e.length=i)}_$AR(t=this._$AA.nextSibling,e){var r;for(null===(r=this._$AP)||void 0===r||r.call(this,!1,!0,e);t&&t!==this._$AB;){const e=t.nextSibling;t.remove(),t=e}}setConnected(t){var e;void 0===this._$AM&&(this._$Cg=t,null===(e=this._$AP)||void 0===e||e.call(this,t))}}class M{constructor(t,e,r,i,n){this.type=1,this._$AH=S,this._$AN=void 0,this.element=t,this.name=e,this._$AM=i,this.options=n,r.length>2||""!==r[0]||""!==r[1]?(this._$AH=Array(r.length-1).fill(new String),this.strings=r):this._$AH=S}get tagName(){return this.element.tagName}get _$AU(){return this._$AM._$AU}_$AI(t,e=this,r,i){const n=this.strings;let A=!1;if(void 0===n)t=N(this,t,e,0),A=!u(t)||t!==this._$AH&&t!==k,A&&(this._$AH=t);else{const i=t;let o,s;for(t=n[0],o=0;o<n.length-1;o++)s=N(this,i[r+o],e,o),s===k&&(s=this._$AH[o]),A||(A=!u(s)||s!==this._$AH[o]),s===S?t=S:t!==S&&(t+=(null!=s?s:"")+n[o+1]),this._$AH[o]=s}A&&!i&&this.k(t)}k(t){t===S?this.element.removeAttribute(this.name):this.element.setAttribute(this.name,null!=t?t:"")}}class D extends M{constructor(){super(...arguments),this.type=3}k(t){this.element[this.name]=t===S?void 0:t}}class L extends M{constructor(){super(...arguments),this.type=4}k(t){t&&t!==S?this.element.setAttribute(this.name,""):this.element.removeAttribute(this.name)}}class z extends M{constructor(t,e,r,i,n){super(t,e,r,i,n),this.type=5}_$AI(t,e=this){var r;if((t=null!==(r=N(this,t,e,0))&&void 0!==r?r:S)===k)return;const i=this._$AH,n=t===S&&i!==S||t.capture!==i.capture||t.once!==i.once||t.passive!==i.passive,A=t!==S&&(i===S||n);n&&this.element.removeEventListener(this.name,this,i),A&&this.element.addEventListener(this.name,this,t),this._$AH=t}handleEvent(t){var e,r;"function"==typeof this._$AH?this._$AH.call(null!==(r=null===(e=this.options)||void 0===e?void 0:e.host)&&void 0!==r?r:this.element,t):this._$AH.handleEvent(t)}}class B{constructor(t,e,r){this.element=t,this.type=6,this._$AN=void 0,this._$AM=e,this.options=r}get _$AU(){return this._$AM._$AU}_$AI(t){N(this,t)}}const R={P:"$lit$",V:s,L:a,I:1,N:T,R:$,D:p,j:N,H:I,O:M,F:L,B:z,W:D,Z:B};null===(i=globalThis.litHtmlPolyfillSupport)||void 0===i||i.call(globalThis,O,I),(null!==(n=globalThis.litHtmlVersions)&&void 0!==n?n:globalThis.litHtmlVersions=[]).push("2.0.0")},392:(t,e,r)=>{"use strict";r.d(e,{oi:()=>y,iv:()=>s,dy:()=>v.dy});const i=window.ShadowRoot&&(void 0===window.ShadyCSS||window.ShadyCSS.nativeShadow)&&"adoptedStyleSheets"in Document.prototype&&"replace"in CSSStyleSheet.prototype,n=Symbol(),A=new Map;class o{constructor(t,e){if(this._$cssResult$=!0,e!==n)throw Error("CSSResult is not constructable. Use `unsafeCSS` or `css` instead.");this.cssText=t}get styleSheet(){let t=A.get(this.cssText);return i&&void 0===t&&(A.set(this.cssText,t=new CSSStyleSheet),t.replaceSync(this.cssText)),t}toString(){return this.cssText}}const s=(t,...e)=>{const r=1===t.length?t[0]:e.reduce(((e,r,i)=>e+(t=>{if(!0===t._$cssResult$)return t.cssText;if("number"==typeof t)return t;throw Error("Value passed to 'css' function must be a 'css' function result: "+t+". Use 'unsafeCSS' to pass non-literal values, but take care to ensure page security.")})(r)+t[i+1]),t[0]);return new o(r,n)},a=i?t=>t:t=>t instanceof CSSStyleSheet?(t=>{let e="";for(const r of t.cssRules)e+=r.cssText;return(t=>new o("string"==typeof t?t:t+"",n))(e)})(t):t;var l,c;const d={toAttribute(t,e){switch(e){case Boolean:t=t?"":null;break;case Object:case Array:t=null==t?t:JSON.stringify(t)}return t},fromAttribute(t,e){let r=t;switch(e){case Boolean:r=null!==t;break;case Number:r=null===t?null:Number(t);break;case Object:case Array:try{r=JSON.parse(t)}catch(t){r=null}}return r}},u=(t,e)=>e!==t&&(e==e||t==t),h={attribute:!0,type:String,converter:d,reflect:!1,hasChanged:u};class p extends HTMLElement{constructor(){super(),this._$Et=new Map,this.isUpdatePending=!1,this.hasUpdated=!1,this._$Ei=null,this.o()}static addInitializer(t){var e;null!==(e=this.l)&&void 0!==e||(this.l=[]),this.l.push(t)}static get observedAttributes(){this.finalize();const t=[];return this.elementProperties.forEach(((e,r)=>{const i=this._$Eh(r,e);void 0!==i&&(this._$Eu.set(i,r),t.push(i))})),t}static createProperty(t,e=h){if(e.state&&(e.attribute=!1),this.finalize(),this.elementProperties.set(t,e),!e.noAccessor&&!this.prototype.hasOwnProperty(t)){const r="symbol"==typeof t?Symbol():"__"+t,i=this.getPropertyDescriptor(t,r,e);void 0!==i&&Object.defineProperty(this.prototype,t,i)}}static getPropertyDescriptor(t,e,r){return{get(){return this[e]},set(i){const n=this[t];this[e]=i,this.requestUpdate(t,n,r)},configurable:!0,enumerable:!0}}static getPropertyOptions(t){return this.elementProperties.get(t)||h}static finalize(){if(this.hasOwnProperty("finalized"))return!1;this.finalized=!0;const t=Object.getPrototypeOf(this);if(t.finalize(),this.elementProperties=new Map(t.elementProperties),this._$Eu=new Map,this.hasOwnProperty("properties")){const t=this.properties,e=[...Object.getOwnPropertyNames(t),...Object.getOwnPropertySymbols(t)];for(const r of e)this.createProperty(r,t[r])}return this.elementStyles=this.finalizeStyles(this.styles),!0}static finalizeStyles(t){const e=[];if(Array.isArray(t)){const r=new Set(t.flat(1/0).reverse());for(const t of r)e.unshift(a(t))}else void 0!==t&&e.push(a(t));return e}static _$Eh(t,e){const r=e.attribute;return!1===r?void 0:"string"==typeof r?r:"string"==typeof t?t.toLowerCase():void 0}o(){var t;this._$Ev=new Promise((t=>this.enableUpdating=t)),this._$AL=new Map,this._$Ep(),this.requestUpdate(),null===(t=this.constructor.l)||void 0===t||t.forEach((t=>t(this)))}addController(t){var e,r;(null!==(e=this._$Em)&&void 0!==e?e:this._$Em=[]).push(t),void 0!==this.renderRoot&&this.isConnected&&(null===(r=t.hostConnected)||void 0===r||r.call(t))}removeController(t){var e;null===(e=this._$Em)||void 0===e||e.splice(this._$Em.indexOf(t)>>>0,1)}_$Ep(){this.constructor.elementProperties.forEach(((t,e)=>{this.hasOwnProperty(e)&&(this._$Et.set(e,this[e]),delete this[e])}))}createRenderRoot(){var t;const e=null!==(t=this.shadowRoot)&&void 0!==t?t:this.attachShadow(this.constructor.shadowRootOptions);return((t,e)=>{i?t.adoptedStyleSheets=e.map((t=>t instanceof CSSStyleSheet?t:t.styleSheet)):e.forEach((e=>{const r=document.createElement("style"),i=window.litNonce;void 0!==i&&r.setAttribute("nonce",i),r.textContent=e.cssText,t.appendChild(r)}))})(e,this.constructor.elementStyles),e}connectedCallback(){var t;void 0===this.renderRoot&&(this.renderRoot=this.createRenderRoot()),this.enableUpdating(!0),null===(t=this._$Em)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostConnected)||void 0===e?void 0:e.call(t)}))}enableUpdating(t){}disconnectedCallback(){var t;null===(t=this._$Em)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostDisconnected)||void 0===e?void 0:e.call(t)}))}attributeChangedCallback(t,e,r){this._$AK(t,r)}_$Eg(t,e,r=h){var i,n;const A=this.constructor._$Eh(t,r);if(void 0!==A&&!0===r.reflect){const o=(null!==(n=null===(i=r.converter)||void 0===i?void 0:i.toAttribute)&&void 0!==n?n:d.toAttribute)(e,r.type);this._$Ei=t,null==o?this.removeAttribute(A):this.setAttribute(A,o),this._$Ei=null}}_$AK(t,e){var r,i,n;const A=this.constructor,o=A._$Eu.get(t);if(void 0!==o&&this._$Ei!==o){const t=A.getPropertyOptions(o),s=t.converter,a=null!==(n=null!==(i=null===(r=s)||void 0===r?void 0:r.fromAttribute)&&void 0!==i?i:"function"==typeof s?s:null)&&void 0!==n?n:d.fromAttribute;this._$Ei=o,this[o]=a(e,t.type),this._$Ei=null}}requestUpdate(t,e,r){let i=!0;void 0!==t&&(((r=r||this.constructor.getPropertyOptions(t)).hasChanged||u)(this[t],e)?(this._$AL.has(t)||this._$AL.set(t,e),!0===r.reflect&&this._$Ei!==t&&(void 0===this._$ES&&(this._$ES=new Map),this._$ES.set(t,r))):i=!1),!this.isUpdatePending&&i&&(this._$Ev=this._$EC())}async _$EC(){this.isUpdatePending=!0;try{await this._$Ev}catch(t){Promise.reject(t)}const t=this.scheduleUpdate();return null!=t&&await t,!this.isUpdatePending}scheduleUpdate(){return this.performUpdate()}performUpdate(){var t;if(!this.isUpdatePending)return;this.hasUpdated,this._$Et&&(this._$Et.forEach(((t,e)=>this[e]=t)),this._$Et=void 0);let e=!1;const r=this._$AL;try{e=this.shouldUpdate(r),e?(this.willUpdate(r),null===(t=this._$Em)||void 0===t||t.forEach((t=>{var e;return null===(e=t.hostUpdate)||void 0===e?void 0:e.call(t)})),this.update(r)):this._$ET()}catch(t){throw e=!1,this._$ET(),t}e&&this._$AE(r)}willUpdate(t){}_$AE(t){var e;null===(e=this._$Em)||void 0===e||e.forEach((t=>{var e;return null===(e=t.hostUpdated)||void 0===e?void 0:e.call(t)})),this.hasUpdated||(this.hasUpdated=!0,this.firstUpdated(t)),this.updated(t)}_$ET(){this._$AL=new Map,this.isUpdatePending=!1}get updateComplete(){return this.getUpdateComplete()}getUpdateComplete(){return this._$Ev}shouldUpdate(t){return!0}update(t){void 0!==this._$ES&&(this._$ES.forEach(((t,e)=>this._$Eg(e,this[e],t))),this._$ES=void 0),this._$ET()}updated(t){}firstUpdated(t){}}p.finalized=!0,p.elementProperties=new Map,p.elementStyles=[],p.shadowRootOptions={mode:"open"},null===(l=globalThis.reactiveElementPolyfillSupport)||void 0===l||l.call(globalThis,{ReactiveElement:p}),(null!==(c=globalThis.reactiveElementVersions)&&void 0!==c?c:globalThis.reactiveElementVersions=[]).push("1.0.0");var f,m,g,v=r(692);class y extends p{constructor(){super(...arguments),this.renderOptions={host:this},this._$Dt=void 0}createRenderRoot(){var t,e;const r=super.createRenderRoot();return null!==(t=(e=this.renderOptions).renderBefore)&&void 0!==t||(e.renderBefore=r.firstChild),r}update(t){const e=this.render();this.hasUpdated||(this.renderOptions.isConnected=this.isConnected),super.update(t),this._$Dt=(0,v.sY)(e,this.renderRoot,this.renderOptions)}connectedCallback(){var t;super.connectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!0)}disconnectedCallback(){var t;super.disconnectedCallback(),null===(t=this._$Dt)||void 0===t||t.setConnected(!1)}render(){return v.Jb}}y.finalized=!0,y._$litElement$=!0,null===(f=globalThis.litElementHydrateSupport)||void 0===f||f.call(globalThis,{LitElement:y}),null===(m=globalThis.litElementPolyfillSupport)||void 0===m||m.call(globalThis,{LitElement:y}),(null!==(g=globalThis.litElementVersions)&&void 0!==g?g:globalThis.litElementVersions=[]).push("3.0.0")}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var A=e[i]={exports:{}};return t[i](A,A.exports,r),A.exports}r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},(()=>{"use strict";var t=r(861),e=r(326),i=r(867),n=r(565),A=r(266),o=r(95),s=r(392);class a extends s.oi{static properties={show:{type:Boolean,reflect:!0}};toggle(){this.show=!this.show}open(){this.show=!0,this.querySelector("crowd-menu")&&this.querySelector("crowd-menu").querySelector("crowd-menu-item")&&this.querySelector("crowd-menu").querySelector("crowd-menu-item").triggerFocus()}close(){this.show=!1}static styles=[s.iv` :host { display: contents; --mouse-y: 0px; --mouse-x: 0px; } * { box-sizing: border-box; padding: 0; margin: 0; transition-duration: var(--context-menu-transition-duration, 0.15s); transition-property: none; } @media (prefers-reduced-motion: reduced) { * { transition-duration: none; } } .context { position: fixed; top: calc(var(--mouse-y) + 0.5em); left: calc(var(--mouse-x) + 0.5em); opacity: 0; transform: scale(0); transition-property: opacity, transform; background-color: var(--context-background-color, white); padding: var(--context-padding-vertical,1em) var(--context-padding-horizontal,1em); box-shadow: var(--context-padding-box-shadow, 0px 10px 15px -3px rgba(0,0,0,0.1)); z-index: var(--context-z-index,999); } :host([show]) .context { opacity: 1; transform: scale(1); } .overlay { position: fixed; inset: 0; pointer-events: none; z-index: calc(var(--context-z-index,999) - 1); } :host([show]) .overlay { pointer-events: all; } `];connectedCallback(){super.connectedCallback(),window.addEventListener("mousemove",(t=>{this.show||(this.style.setProperty("--mouse-x",t.clientX+"px"),this.style.setProperty("--mouse-y",t.clientY+"px"))})),document.addEventListener("contextmenu",(t=>{t.preventDefault(),this.open()}),!1)}render(){return s.dy` <div class='overlay' @click='${()=>this.close()}'></div> <div class='context'> <slot></slot> </div> `}}class l extends s.oi{static properties={property:{type:String},type:{type:String},min:{type:Number},max:{type:Number},value:{type:String,reflect:!0},unit:{type:String},step:{type:Number},options:{type:Array}};static styles=[s.iv` :host { display: inline-block; } `];_onChange(t){let e;this.value=t.target.value,e="Number"==this.type?this.value+this.unit:this.value,document.documentElement.style.setProperty(this.property,e);const r=new CustomEvent("crowdChange");this.dispatchEvent(r)}constructor(){super()}render(){if(!this.property)throw'"property" attribute is not defined.';if(!this.type)throw'"type" attribute is not defined.';if("Number"===this.type&&null===this.unit)throw'"unit" attribute is not defined.';let t="";return"Number"==this.type?t=s.dy` <!-- <crowd-range @crowdChange='${t=>this._onChange(t)}' step='${this.step}' tooltip min='${this.min}' max='${this.max}' value='${this.value}' ></crowd-range> --> <crowd-number @crowdChange='${t=>this._onChange(t)}' placement='after' unit="${this.unit}" value='${this.value}' step='${this.step}' min='${this.min}' max='${this.max}'></crowd-number> `:"Color"==this.type?t=s.dy` <crowd-color-picker @crowdChange='${t=>this._onChange(t)}' value='${this.value}'></crowd-color-picker> `:"Select"==this.type?t=s.dy` <crowd-select @crowdChange='${t=>this._onChange(t)}' value='${this.value}'> ${this.options.map((t=>s.dy`<crowd-option value='${t}'>${t}</crowd-option>`))} </crowd-select> `:"Text"==this.type&&(t=s.dy` <crowd-input @crowdChange='${t=>this._onChange(t)}' type='text' value='${this.value}'></crowd-input> `),s.dy` ${t} `}}var c=r(414);const{DateTime:d}=r(490);class u extends s.oi{static properties={value:{type:String,reflect:!0},open:{type:Boolean,reflect:!0},month:{type:Number},year:{type:Number},selected:{type:Object},label:{type:String},required:{type:Boolean},errorMessage:{type:String},invalid:{type:Boolean,reflect:!0},format:{type:String,reflect:!0},range:{type:Boolean},dateRange:{type:Array},rangeState:{type:Number},weekFormat:{type:String}};static styles=[s.iv` :host { display: inline-block; } :host,:host *,:host *::before, :host *::after { box-sizing: border-box; padding: 0; margin: 0; } .container { position: relative; padding: var(--crowd-input-wrapper-padding-vertical, 0) var(--crowd-input-wrapper-padding-horizontal, 0); max-width: 100%; } label.label { display: inline-block; color: var(--crowd-input-label-color, inherit); margin-bottom: var(--crowd-input-label-spacing, 0.5em); } .error { font-size: var(--crowd-input-error-message-font-size, 0.8em); color: var(--crowd-input-error-message-color, red); } :host([invalid]) .container { outline: 1px solid var(--crowd-input-error-message-color, red); } slot[name='help-text'] { font-size:var(--crowd-input-error-message-font-size, 0.8em); } .calendar { display: grid; grid-template-columns: repeat(7,1fr); padding-top: var(--crowd-date-picker-calendar-padding-top,1em); } .panel { position: absolute; top: 100%; left: 0; width:max-content; transform-origin: top center; transform: scaleY(0); transition-property: transform; transition-duration: var(--crowd-date-picker-transition-duration, 0.15s); transition-delay: var(--crowd-date-picker-transition-delay, 0s); transition-timing-function: var(--crowd-date-picker-transition-ease, ease-in-out); } :host([open]) .panel { transform: scaleY(1); } .panel { font-size: var(--crowd-date-time-picker-font-size,0.7rem); --crowd-input-font-size: var(--crowd-date-time-picker-font-size,0.7rem); --crowd-input-padding-vertical: 0px; background-color: var(--crowd-date-picker-panel-background-color, #fff); padding: var(--crowd-date-picker-panel-padding-vertical, 1em) var(--crowd-date-picker-panel-padding-horizontal, 1em); box-shadow: var( --crowd-date-picker-panel-box-shadow, 0 2px 8px rgba(0, 0, 0, 0.1) ); z-index: var(--crowd-date-picker-z-index, 999); } .calendar-nav { display: flex; justify-content: var(--crowd-date-picker-calendar-nav-justify, center); align-items: center; padding: var(--crowd-date-picker-calendar-nav-padding-vertical, 0) var(--crowd-date-picker-calendar-nav-padding-horizontal, 1em); } crowd-select::part(toggle) { font-size: 0.5em; } .month-picker { width: var(--crowd-date-picker-month-picker-width,13ch); } .year-picker { width: var(--crowd-date-picker-year-picker-width,12ch); } .calendar-nav crowd-button { margin: 0 auto; -webkit-appearance: none; cursor: pointer; --crowd-button-width: 1.5em; --crowd-button-padding-vertical: 0px; --crowd-button-padding-horizontal: 0px; --crowd-button-background-color: transparent; --crowd-button-hover-background-color: var(--crowd-date-picker-calendar-nav-button-hover-background-color, #f9f9f9); --crowd-button-border-width: 0px; --crowd-button-color: var(--crowd-menu-item-hover-color,inherit); --crowd-button-hover-color: var(--crowd-menu-item-hover-color,inherit); } .calendar-nav .active { text-decoration: underline; } .calendar-nav .today-button { margin-right: 0; } .weekday,.day { aspect-ratio: 1/1; padding: 5px; } .weekday { font-size: 0.5em; } .day { cursor: pointer; transition-property: background-color; transition-duration: var(--crowd-date-picker-transition-duration, 0.15s); transition-timing-function: var(--crowd-date-picker-transition-ease, ease-in-out); transition-delay: var(--crowd-date-picker-transition-delay, 0s); border: var(--crowd-date-picker-day-border-width,1px) var(--crowd-date-picker-day-border-style,solid) var(--crowd-date-picker-day-border-color,#f7f7f7); } @media (hover: hover) { .day:hover { background-color: var(--crowd-date-picker-day-hover-background-color,#f9f9f9); } } .day:focus-visible { background-color: var(--crowd-date-picker-day-hover-background-color,#f9f9f9); } .day.today { text-decoration: underline; } .day.ranged.from ~ * { background-color: var(--crowd-date-picker-day-hover-background-color,#f9f9f9); } .day.ranged.from.to ~ *,.day.ranged.to ~ * { background-color: transparent; } .day.ranged,.day.ranged.from,.day.ranged.to, .day.active, .day:active { background-color: var(--crowd-date-picker-day-selected-background-color, #eee); } .action-buttons { margin-top: 0.5em; display: flex; gap: 1em; justify-content: space-between; } `];_generateCalendar(){let t=new Date(this.year,this.month+1,0).getDate(),e=[];for(let r=0;r<t;r++)e[r]=d.fromObject({day:r+1,month:this.month+1,year:this.year});return e}_prevMonth(){0==this.month?(this.month=11,this.year-=1):this.month-=1}_nextMonth(){11==this.month?(this.month=0,this.year+=1):this.month+=1}_selectDay(t){this.selected=t,this.month=t.month-1,this.year=t.year,this.range&&(this.dateRange[this.rangeState]=this.selected)}_dispatchChange(){const t=new CustomEvent("crowdChange");this.dispatchEvent(t)}_onInput(t){this.invalid=!1,this._dispatchChange()}_setValue(){if(this.range)this.value=this.dateRange[0].toFormat(this.format)+" - "+this.dateRange[1].toFormat(this.format);else{let t=this.selected;this.value=t.toFormat(this.format)}this._dispatchChange()}_onKeydown(t){"Tab"!=t.key&&t.preventDefault()}_showPicker(){this.open=!0}_hidePicker(){this.open=!1}_swapRange(t){this.rangeState=t,this.selected=this.dateRange[t]}_isSelected(t){return t.hasSame(this.selected,"day")&&t.hasSame(this.selected,"month")&&t.hasSame(this.selected,"year")}_isRanged(t){if(!this.range)return!1;let e=t.hasSame(this.dateRange[0],"day")&&t.hasSame(this.dateRange[0],"month")&&t.hasSame(this.dateRange[0],"year"),r=t.hasSame(this.dateRange[1],"day")&&t.hasSame(this.dateRange[1],"month")&&t.hasSame(this.dateRange[1],"year");return e||r}_dayRangeState(t){let e=t.hasSame(this.dateRange[0],"day")&&t.hasSame(this.dateRange[0],"month")&&t.hasSame(this.dateRange[0],"year"),r=t.hasSame(this.dateRange[1],"day")&&t.hasSame(this.dateRange[1],"month")&&t.hasSame(this.dateRange[1],"year");return e&&r?"from to":e?"from":r?"to":void 0}connectedCallback(){super.connectedCallback(),new c.z(this)}constructor(){super(),this.year=(new Date).getFullYear(),this.month=(new Date).getMonth(),this.weekdays=new Array(7).fill(0),this.monthList=new Array(12).fill(0);let t=d.now();this.selected=t,this.format="dd/MM/y",this.dateRange=[t,t],this.rangeState=0,this._setValue(),this.weekFormat="cccc"}render(){let t="";this.invalid&&(t=s.dy` <div part='error' class='error'> ${this.errorMessage} </div> `);let e="";return this.label&&(e=s.dy` <label class='label' part='label' for='${this.id}'> ${this.label} </label> `),s.dy` <div class='container' @focusin='${this._showPicker}' @focusout='${this._hidePicker}'> ${e} <div class='input'> <crowd-input part='input' @keydown='${this._onKeydown}' @crowdChange='${this._onInput}' type='text' value='${this.value}'></crowd-input> </div> <div class='panel' part='panel' tabindex='0'> <div class='calendar-nav'> <crowd-button circle @click='${this._prevMonth}'> <slot name='prev-icon'> <crowd-icon name='chevron-left'></crowd-icon> </slot> </crowd-button> <p> <crowd-select class='month-picker' @crowdChange='${t=>this.month=parseInt(t.currentTarget.value)}' value='${this.month}'> ${this.monthList.map(((t,e)=>{let r=d.fromObject({month:e+1});return s.dy`<crowd-option value='${e}'>${r.monthLong}</crowd-option>`}))} </crowd-select> <crowd-select class='year-picker' @crowdChange='${t=>this.year=parseInt(t.currentTarget.value)}' value='${this.year}'> ${new Array(5).fill(0).map(((t,e)=>s.dy` <crowd-option value='${this.year-5+e}'>${this.year-5+e}</crowd-option> `))} ${new Array(5).fill(0).map(((t,e)=>s.dy` <crowd-option value='${this.year+e}'>${this.year+e}</crowd-option> `))} </crowd-select> </p> <crowd-button circle @click='${this._nextMonth}'> <slot name='next-icon'> <crowd-icon name='chevron-right'></crowd-icon> </slot> </crowd-button> <crowd-button class='today-button' circle @click='${()=>this._selectDay(d.now())}'> <slot name='today-icon'> <crowd-icon name='calendar-event'></crowd-icon> </slot> </crowd-button> </div> ${this.range?s.dy` <div class='calendar-nav'> <crowd-button @click='${()=>this._swapRange(0)}' class='${0==this.rangeState?"active":""}'>FROM</crowd-button> <crowd-button @click='${()=>this._swapRange(1)}' class='${1==this.rangeState?"active":""}'>TO</crowd-button> </div> `:""} <div class='calendar'> ${this.weekdays.map(((t,e)=>{let r=d.fromObject({weekday:e+1});return s.dy`<div class='weekday'>${r.toFormat(this.weekFormat)}</div>`}))} ${new Array(this._generateCalendar()[0].weekday-1).fill(0).map(((t,e)=>s.dy`<div class='day' @click='${this._prevMonth}'></div>`))} ${this._generateCalendar().map(((t,e)=>s.dy` <div tabindex='0' @click='${()=>this._selectDay(t)}' class='day ${this._isRanged(t)?`ranged ${this._dayRangeState(t)}`:""} ${this._isSelected(t)?"active":""} ${t.hasSame(d.now(),"day")?"today":""}' part='day'> ${t.day} </div> `))} ${new Array(7-this._generateCalendar()[this._generateCalendar().length-1].weekday).fill(0).map(((t,e)=>s.dy`<div class='day' @click='${this._nextMonth}'></div>`))} </div> <div class='action-buttons'> <crowd-button @click='${this._hidePicker}'>CANCEL</crowd-button> <crowd-button @click='${()=>{this._setValue(),this._hidePicker()}}'>OK</crowd-button> </div> </div> ${t} <slot name="help-text"></slot> </div> `}}var h=r(978),p=r(829),f=r(510),m=r(473),g=r(658),v=r(497),y=r(757),b=r(897),_=r(842);class w extends s.oi{static properties={value:{type:String,reflect:!0},_selectedItems:{type:Array},name:{type:String},label:{type:String},required:{type:Boolean},errorMessage:{type:String},invalid:{type:Boolean,reflect:!0}};static styles=[s.iv` :host { display: inline-block; } .input-container { color: var(--crowd-input-color, inherit); font-size: var(--crowd-input-font-size,1rem); display: inline-flex; flex-flow: row wrap; justify-content: flex-start; align-items: center; gap: var(--crowd-multi-toggle-row-gap, 1em); } label { display: inline-block; color: var(--crowd-input-label-color, inherit); margin-bottom: var(--crowd-input-label-spacing, 0.5em); } .wrapper { padding: var(--crowd-input-wrapper-padding-vertical, 0) var(--crowd-input-wrapper-padding-horizontal, 0); max-width: 100%; } .error { font-size: var(--crowd-input-error-message-font-size, 0.8em); color: var(--crowd-input-error-message-color, red); } :host([invalid]) .input-container { outline: 1px solid var(--crowd-input-error-message-color, red); } slot[name='help-text'] { font-size:var(--crowd-input-error-message-font-size, 0.8em); } `];_dispatchChange(){const t=new CustomEvent("crowdChange");this.dispatchEvent(t)}_setValue(){this.value=this._selectedItems.join(","),this._dispatchChange()}constructor(){super(),this._selectedItems=[]}connectedCallback(){super.connectedCallback(),new c.z(this);let t=[].slice.call(this.querySelectorAll("crowd-multi-toggle-item"));t&&t.forEach((t=>{t.addEventListener("crowdChange",(()=>{if(t.checked)this._selectedItems.indexOf(t.value)<0&&this._selectedItems.push(t.value);else if(-1!=this._selectedItems.indexOf(t.value)){let e=this._selectedItems.indexOf(t.value);this._selectedItems.splice(e,1)}this._setValue()}),!1)}))}validate(){this.invalid=!1,this.required&&(""!==this.value&&null!=this.value||(this.invalid=!0))}render(){let t="";this.invalid&&(t=s.dy` <div part='error' class='error'> ${this.errorMessage} </div> `);let e="";return this.label&&(e=s.dy` <label part='label'> ${this.label} </label> `),s.dy` <div part='wrapper' class='wrapper'> ${e} <div part='container' class='input-container'> <slot></slot> </div> ${t} <slot name="help-text"></slot> </div> `}}class x extends s.oi{static properties={checked:{type:Boolean,reflect:!0},"show-icon":{type:Boolean,converter:(t,e)=>("string"==typeof t&&(t="false"!=t),t)},"icon-position":{type:String},value:{type:String}};static styles=[s.iv` *,*::before, *::after { box-sizing: border-box; transition-property: none; transition-duration: var(--crowd-multi-toggle-transition-duration, 0.15s); transition-delay: var(--crowd-multi-toggle-transition-delay, 0s); transition-timing-function: var(--crowd-multi-toggle-transition-ease, ease-in-out); } :host { display: inline-block; width: auto; line-height: 1; height:min-content; } button { -webkit-appearance: none; background-color: var(--crowd-multi-toggle-off-background-color, transparent); color: var(--crowd-multi-toggle-off-color, inherit); border: var(--crowd-button-border-width, 2px) var(--crowd-button-border-style, solid) var(--crowd-multi-toggle-off-border-color, #000); border-radius: var(--crowd-button-border-radius, 3px); font-family: inherit; font-size: inherit; font-weight: inherit; display: inline-flex; justify-content: center; align-items: center; gap: var(--crowd-button-gap, 0.5em); padding: var(--crowd-button-padding-vertical,0.5em) var(--crowd-button-padding-horizontal, 1em); cursor: pointer; transition-property: color, border-color, background-color; } button > span { display: inherit; min-width: 1ch; } @media (hover: hover) { button:hover { background-color: var(--crowd-multi-toggle-off-hover-background-color, transparent); color: var(--crowd-multi-toggle-off-hover-color, inherit); border: var(--crowd-button-border-width, 2px) var(--crowd-button-border-style, solid) var(--crowd-multi-toggle-off-hover-border-color, #000); } } button:focus-visible,button:active { background-color: var(--crowd-multi-toggle-off-hover-background-color, transparent); color: var(--crowd-multi-toggle-off-hover-color, inherit); border: var(--crowd-button-border-width, 2px) var(--crowd-button-border-style, solid) var(--crowd-multi-toggle-off-hover-border-color, #000); box-shadow: 0px 0px 0px var(--crowd-button-focus-width, 2px) var(--crowd-multi-toggle-off-focus-color, rgba(0,0,0,0.3)); } button.toggled { background-color: var(--crowd-multi-toggle-on-background-color, rgba(133, 255, 102,0.3)); color: var(--crowd-multi-toggle-on-color, #85ff66); border: var(--crowd-button-border-width, 2px) var(--crowd-button-border-style, solid) var(--crowd-multi-toggle-on-border-color, #85ff66); border-radius: var(--crowd-multi-toggle-border-radius, 3px); } @media (hover: hover) { button.toggled:hover { background-color: var(--crowd-multi-toggle-on-hover-background-color, rgba(133, 255, 102,0.3)); color: var(--crowd-multi-toggle-on-hover-color, #85ff66); border: var(--crowd-button-border-width, 2px) var(--crowd-button-border-style, solid) var(--crowd-multi-toggle-on-hover-border-color, #85ff66); } } button.toggled:focus-visible, button.toggled:active { background-color: var(--crowd-multi-toggle-on-hover-background-color, rgba(133, 255, 102,0.3)); color: var(--crowd-multi-toggle-on-hover-color, #85ff66); border: var(--crowd-button-border-width, 2px) var(--crowd-button-border-style, solid) var(--crowd-multi-toggle-on-hover-border-color, #85ff66); box-shadow: 0px 0px 0px var(--crowd-button-focus-width, 2px) var(--crowd-multi-toggle-on-focus-color, rgba(133, 255, 102,0.3)); } `];_dispatchChange(){const t=new CustomEvent("crowdChange");this.dispatchEvent(t)}toggle(){this.checked=!this.checked,this._dispatchChange()}constructor(){super(),this["icon-position"]="after",this["show-icon"]=!0}render(){let t="";return this["show-icon"]&&(t=s.dy`<span>${this.checked?s.dy`<slot name='on'><crowd-icon name='x'></crowd-icon></slot>`:s.dy`<slot name='off'><crowd-icon name='plus'></crowd-icon></slot>`}</span>`),s.dy` <button part='button' class='${this.checked?"toggled":""}' @click='${()=>this.toggle()}'> ${"before"==this["icon-position"]?t:""} <slot></slot> ${"after"==this["icon-position"]?t:""} </button> `}}class k extends s.oi{static properties={value:{type:k,reflect:!0},name:{type:String},min:{type:k},max:{type:k},step:{type:k},fixedPoint:{type:k},label:{type:String},required:{type:Boolean},errorMessage:{type:String},invalid:{type:Boolean,reflect:!0},placement:{type:String,hasChanged:(t,e)=>"before"==t||"after"==t?t:e},unit:{type:String}};static styles=[s.iv` :host { display: block; } *,*::before, *::after { box-sizing: border-box; padding: 0; margin: 0; } .input-container { color: var(--crowd-input-color, inherit); background-color: var(--crowd-input-background, white); border: var(--crowd-input-border-width,1px) var(--crowd-input-border-type, solid) var(--crowd-input-border-color, #eee); border-radius: var(--crowd-input-border-radius, 0px); font-size: var(--crowd-input-font-size,1rem); display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: stretch; width: max-content; } .input-container:focus-within { box-shadow: 0 0 0 var(--crowd-input-focus-width, 2px) var(--crowd-input-focus-color, rgba(0,0,0,0.3)); } label { display: inline-block; color: var(--crowd-input-label-color, inherit); margin-bottom: var(--crowd-input-label-spacing, 0.5em); } .wrapper { padding: var(--crowd-input-wrapper-padding-vertical, 0) var(--crowd-input-wrapper-padding-horizontal, 0); max-width: 100%; } .error { font-size: var(--crowd-input-error-message-font-size, 0.8em); color: var(--crowd-input-error-message-color, red); } :host([invalid]) .input-container { outline: 1px solid var(--crowd-input-error-message-color, red); } slot[name='help-text'] { font-size:var(--crowd-input-error-message-font-size, 0.8em); } input { -webkit-appearance: none; background-color: transparent; border: none; height: 100%; width: max-content; min-width: 2ch; color: inherit; font-family: inherit; font-size: inherit; padding: 0 var(--crowd-input-padding-horizontal, 1em); font-weight: var(--crowd-input-font-weight,400); height: calc( var(--crowd-input-height, 2em) - (var(--crowd-input-border-width,0px) * 2) ); text-transform: var(--crowd-input-text-transform); flex: 1 1 auto; } input:focus-visible { outline: none; } input::-webkit-outer-spin-button, input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; } /* Firefox */ input[type=number] { -moz-appearance: textfield; } .controls { display: flex; flex-flow: column; font-size: 0.5em; justify-content: space-around; margin: 0.5em 0 0.5em 0.5em; padding: 2px; background-color: var(--crowd-number-controls-background, #efefef); color: var(--crowd-number-controls-color, #dedede); --crowd-button-hover-color: #cecece; } :host([placement="after"]) .controls { margin: 0.5em 0.5em 0.5em 0; } .unit { display: flex; flex-flow: column; justify-content: center; padding: 0 0.3em; color: var(--crowd-number-unit-color, #dedede); font-size: 0.8em; } `];connectedCallback(){super.connectedCallback(),new c.z(this),this.id="input-"+Date.now()}_dispatchChange(){const t=new CustomEvent("crowdChange");this.dispatchEvent(t)}_onInput(t){this.invalid=!1,this.value=parseFloat(t.currentTarget.value).toFixed(this.fixedPoint)}_increment(){this.value=(parseFloat(this.value)+parseFloat(this.step)).toFixed(this.fixedPoint)}_decrement(){this.value=(parseFloat(this.value)-parseFloat(this.step)).toFixed(this.fixedPoint)}validate(){this.invalid=!1,this.required&&(""!==this.value&&null!=this.value||(this.invalid=!0))}shouldUpdate(t){if(t.has("value")){if(!(null==this.max||parseFloat(this.value)<=parseFloat(this.max))||!(null==this.min||parseFloat(this.value)>=parseFloat(this.min)))return this.value=t.get("value"),this._syncValue(t.get("value")),!1;this._dispatchChange()}return!0}_syncValue(t){let e=this.renderRoot.querySelector("input");e&&(e.value=t)}updated(t){t.has("value")&&this._syncValue(this.value)}constructor(){super(),this.placement="before",this.value=0,this.step=1,this.fixedPoint=1}render(){let t="";this.invalid&&(t=s.dy` <div part='error' class='error'> ${this.errorMessage} </div> `),this.maxlength&&this.maxlength;let e="";this.label&&(e=s.dy` <label part='label' for='${this.id}'> ${this.label} </label> `);let r=s.dy` <div class='controls' part='controls'> <crowd-icon-button @click='${this._increment}' name='caret-up-fill'></crowd-icon-button> <crowd-icon-button @click='${this._decrement}' name='caret-down-fill'></crowd-icon-button> </div> `,i="";return this.unit&&(i=s.dy` <div class='unit'>${this.unit}</div> `),s.dy` <div part='wrapper' class='wrapper'> ${e} <div part='container' class='input-container'> ${"before"==this.placement?r:""} <input @change='${this._dispatchChange}' @input='${this._onInput}' id='${this.id}' type='text' min='${this.min}' max='${this.max}' step='${this.step}' name='${this.name}' value='${this.value}' required='${this.required}' /> ${i} ${"after"==this.placement?r:""} </div> ${t} <slot name="help-text"></slot> </div> `}}var S=r(582),C=r(139),E=r(515),P=r(320);class T extends s.oi{static properties={_content:{type:String}};static styles=[s.iv` :host { display: block; } pre { padding: 1em; border: 1px solid #eeeeee; } `];_loop(){}_updateStylesheet(){this._content=document.documentElement.style.cssText.replace(/; /g,";\n")}connectedCallback(){super.connectedCallback();let t=[].slice.call(document.querySelectorAll("crowd-customiser"));t&&t.forEach((t=>{t.addEventListener("crowdChange",(()=>this._updateStylesheet()))}))}render(){return s.dy` <pre>${this._content}</pre> `}}var O=r(752);class N extends s.oi{static properties={title:{type:String},_tabIndex:{type:Number},active:{type:Boolean,reflect:!0}};static styles=[s.iv` :host { display: contents; } * { box-sizing: border-box; } :host(:not([active])) .container { opacity: 0; pointer-events: none; } :host(:not([active])) button { opacity: 0.4; } article { position: relative; grid-area: 1 / 1; max-width: 100%; } `];_dispatchChange(){const t=new CustomEvent("crowdShowTab");this.dispatchEvent(t)}show(){this.active=!0,this._dispatchChange()}hide(){this.active=!1}render(){return s.dy` <article part='wrapper'> <div class='container' part='container'> <slot></slot> </div> </article> `}}class $ extends s.oi{static properties={_tabs:{type:Array},_activeTab:{type:Number}};static styles=[s.iv` :host { display: block; } * { box-sizing: border-box; } .panels { display: grid; } .buttons { display: flex; flex-flow: row nowrap; justify-content: flex-start; align-items: center; overflow-x: scroll; scrollbar-width: none; gap: var(--crowd-tabs-gap,0px); width:100%; border-bottom: var(--crowd-tab-button-active-border-width, 1px) var(--crowd-tab-button-active-border-style, solid) var(--crowd-tab-button-active-border-color, #ccc); } .buttons::-webkit-scrollbar { display: none; width: 0px; height: 0px; opacity: 0; } .buttons button { -webkit-appearance: none; background-color: var(--crowd-tab-button-background-color, #fff); border: var(--crowd-tab-button-border-width, 0px) var(--crowd-tab-button-border-style, solid) var(--crowd-tab-button-border-color, #eee); padding: var(--crowd-tab-button-padding-vertical, 0.3em) var(--crowd-tab-button-padding-horizontal, 0.5em); font-size: var(--crowd-tab-button-font-size, inherit); cursor: pointer; border-top-left-radius: var(--crowd-tab-button-border-radius, 3px); border-top-right-radius: var(--crowd-tab-button-border-radius, 3px); opacity: 0.4; } @media (hover: hover) { .buttons button:hover { background-color: var(--crowd-tab-button-hover-background-color, #fafafa); } } .buttons button:active,.buttons button:focus-visible { outline: none; background-color: var(--crowd-tab-button-hover-background-color, #fafafa); box-shadow: 0 0 0 var(--crowd-input-focus-width, 2px) var(--crowd-input-focus-color, rgba(0,0,0,0.3)); } .buttons button.active { opacity: 1; background-color: var(--crowd-tab-button-active-background-color, #fff); border-top: var(--crowd-tab-button-active-border-width, 1px) var(--crowd-tab-button-active-border-style, solid) var(--crowd-tab-button-active-border-color, #ccc); border-left: var(--crowd-tab-button-active-border-width, 1px) var(--crowd-tab-button-active-border-style, solid) var(--crowd-tab-button-active-border-color, #ccc); border-right: var(--crowd-tab-button-active-border-width, 1px) var(--crowd-tab-button-active-border-style, solid) var(--crowd-tab-button-active-border-color, #ccc); border-bottom: none; position: relative; } // .buttons button.active::after { // content: ''; // display: inline-block; // width: 100%; // left: 0; // height: var(--crowd-tab-button-active-border-width, 1px); // background-color: var(--crowd-tab-button-active-background-color, #fff); // position: absolute; // bottom: 0; // transform: translateY(100%); // } `];_hideOtherTabs(t){[].slice.call(this.querySelectorAll("crowd-tab")).forEach((e=>{e!=t&&e.hide()}))}showTab(t){let e=[].slice.call(this.querySelectorAll("crowd-tab"));e&&(this._activeTab=t,e[t].show())}connectedCallback(){super.connectedCallback();let t=[].slice.call(this.querySelectorAll("crowd-tab"));t&&(this._tabs=t,t.forEach((t=>{t.addEventListener("crowdShowTab",(()=>this._hideOtherTabs(t)),!1)})),this.showTab(0))}constructor(){super(),this._activeTab=0}render(){return s.dy` <article class='tab-group'> <div class='buttons'> ${this._tabs.map(((t,e)=>s.dy` <button class='${e===this._activeTab?"active":""}' @click='${()=>this.showTab(e)}'>${t.title}</button> `))} </div> <div class='panels'> <slot></slot> </div> </article> `}}var I=r(822);const{DateTime:M}=r(490);class D extends s.oi{static properties={value:{type:String,reflect:!0},open:{type:Boolean,reflect:!0},_angle:{type:Number},hours:{type:Number},minutes:{type:Number},meridiem:{type:String},selecting:{type:String},format:{type:String,reflect:!0},label:{type:String},required:{type:Boolean},errorMessage:{type:String},invalid:{type:Boolean,reflect:!0}};static styles=[s.iv` :host { display: inline-block; } :host,:host *,:host *::before, :host *::after { box-sizing: border-box; padding: 0; margin: 0; } .container { position: relative; padding: var(--crowd-input-wrapper-padding-vertical, 0) var(--crowd-input-wrapper-padding-horizontal, 0); max-width: 100%; } label.label { display: inline-block; color: var(--crowd-input-label-color, inherit); margin-bottom: var(--crowd-input-label-spacing, 0.5em); } .error { font-size: var(--crowd-input-error-message-font-size, 0.8em); color: var(--crowd-input-error-message-color, red); } :host([invalid]) .container { outline: 1px solid var(--crowd-input-error-message-color, red); } slot[name='help-text'] { font-size:var(--crowd-input-error-message-font-size, 0.8em); } .picker { position: absolute; top: 100%; left: 0; transform-origin: top center; transform: scaleY(0); transition-property: transform; transition-duration: var(--crowd-time-picker-transition-duration, 0.15s); transition-delay: var(--crowd-time-picker-transition-delay, 0s); transition-timing-function: var(--crowd-time-picker-transition-ease, ease-in-out); background-color: var(--crowd-time-picker-background-color, white); padding: var(--crowd-time-picker-padding-vertical, 1em) var(--crowd-time-picker-padding-horizontal, 1em); box-shadow: var( --crowd-select-dropdown-box-shadow, 0 2px 8px rgba(0, 0, 0, 0.1) ); z-index: var(--crowd-time-picker-z-index, 999); } :host([open]) .picker { transform: scaleY(1); } .time-display { display: flex; flex-flow: row nowrap; gap: 0.5em; padding-bottom: 0.5em; } .time-digital { flex: 1 0 auto; display: flex; flex-flow: row nowrap; align-items: center; gap: 0.25em; height: 100%; } .time-digital crowd-button { font-size: 2em; min-width: 3em; --crowd-button-padding-vertical: 0.25em --crowd-button-padding-horizontal: 0.5em } .time-display crowd-button.active { --crowd-button-background-color: var(--crowd-time-picker-active-button-background-color, #ccc); } .time-digital span { font-size: 2em; } .meridiem { flex: 0 1 0; height: 100%; border: var(--crowd-button-border-width, 2px) var(--crowd-button-border-style, solid) var(--crowd-button-border-color, #aeaeae); border-radius: var(--crowd-button-border-radius, 3px); } .meridiem crowd-button { --crowd-button-border-width: 0px; --crowd-button-border-radius: 0px; } .clock { width: 100%; aspect-ratio: 1/1; display: grid; grid-template-area: 100% / 100%; } .clock-face,.clock-hand,.clock-thumb { grid-area: 1/1; } .clock-face { width: 100%; height: 100%; background-color: var(--crowd-time-picker-clock-face-background-color, #eee); border-radius: 50%; position: relative; display: grid; } .clock-face > span { grid-area: 1/1; place-self: center; display: block; width: 100%; aspect-ratio: 1/1; position: relative; z-index: 2; pointer-events: none; user-select: none; } .clock-face > span > span { display: inline-block; } .clock-hand { place-self: center; height: 50%; width: var(--crowd-time-picker-clock-hand-width, 2px); background-color: var(--crowd-time-picker-clock-hand-background-color, #ccc); } .clock-thumb { aspect-ratio: 1/1; transform-origin:center; position: relative; place-self: center; cursor: pointer; } .clock-thumb::before { content: ''; position: absolute; width: var(--crowd-time-picker-clock-thumb-size, 2em); background-color: var(--crowd-time-picker-clock-hand-background-color, #ccc); aspect-ratio: 1/1; transform: translate(-25%,-25%); border-radius: 50%; top: 0; left: 0; } .action-buttons { margin-top: 0.5em; display: flex; gap: 1em; justify-content: space-between; } `];_setValue(){let t=this.hours;"pm"==this.meridiem?t=12==this.hours?this.hours:this.hours+12:12==this.hours&&(t=0);let e=M.fromObject({hour:t,minute:this.minutes});this.value=e.toFormat(this.format),this._dispatchChange()}_showPicker(){this.open=!0}_hidePicker(){this.open=!1}_onPointerDown(t){this._onMouseMove(t),t.target.addEventListener("pointermove",this.bindMouseMove,!1)}_onPointerUp(t){t.target.removeEventListener("pointermove",this.bindMouseMove,!1)}_onMouseMove(t){let e=this.shadowRoot.querySelector(".clock"),r=e.getBoundingClientRect().x+e.getBoundingClientRect().width/2,i=e.getBoundingClientRect().y+e.getBoundingClientRect().height/2,n=t.clientX-r,A=i-t.clientY,o=Math.PI/2-Math.atan2(A,n);o*=180/Math.PI,o=(o+360)%360,this._angle=o,"hours"==this.selecting&&(this.hours=Math.round(o/360*12),0==this.hours&&(this.hours=12)),"minutes"==this.selecting&&(this.minutes=Math.round(o/360*60),60==this.minutes&&(this.minutes=0))}_getHoursDegree(t){return(t+1)/12*360+45}_getMinutesDegree(t){return(t+1)/6*360+45}_addPaddingZero(t){return t<10?"0"+t:t}_dispatchChange(){const t=new CustomEvent("crowdChange");this.dispatchEvent(t)}_onInput(t){this.invalid=!1,this._dispatchChange()}_onKeydown(t){"Tab"!=t.key&&t.preventDefault()}validate(){this.invalid=!1,"email"==this.type&&this._validateEmail(),this.required&&(""!==this.value&&null!=this.value||(this.invalid=!0))}connectedCallback(){super.connectedCallback(),new c.z(this),this.bindMouseMove=this._onMouseMove.bind(this),this.textInput=this.renderRoot.querySelector("crowd-input")}constructor(){super();let t=(new Date).getHours();t>12?(this.meridiem="pm",t-=12):this.meridiem="am",this.hours=t,this.minutes=(new Date).getMinutes(),this._angle=t/12*360,this.selecting="hours",this.format="HH:mm a",this._setValue()}render(){let t="";this.invalid&&(t=s.dy` <div part='error' class='error'> ${this.errorMessage} </div> `);let e="";return this.label&&(e=s.dy` <label class='label' part='label' for='${this.id}'> ${this.label} </label> `),s.dy` <div class='container' @focusin='${this._showPicker}' @focusout='${this._hidePicker}'> ${e} <div part='input' class='input'> <crowd-input @keydown='${this._onKeydown}' @crowdChange='${this._onInput}' type='text' value='${this.value}'></crowd-input> </div> <div part='picker' class='picker' tabindex='0'> <div class='time-display'> <div class='time-digital'> <div class='hours'> <crowd-button class='${"hours"==this.selecting?"active":""}' @click=${()=>this.selecting="hours"}>${this._addPaddingZero(this.hours)}</crowd-button> </div> <span>:</span> <div class='minutes'> <crowd-button class='${"minutes"==this.selecting?"active":""}' @click=${()=>this.selecting="minutes"}>${this._addPaddingZero(this.minutes)}</crowd-button> </div> </div> <div class='meridiem'> <crowd-button @click='${()=>this.meridiem="am"}' class='${"am"==this.meridiem?"active":""}'>AM</crowd-button> <crowd-button @click='${()=>this.meridiem="pm"}' class='${"pm"==this.meridiem?"active":""}'>PM</crowd-button> </div> </div> <div class='clock' @pointerdown='${this._onPointerDown}' @pointerup='${this._onPointerUp}' @pointerout='${this._onPointerUp}' @pointerleave='${this._onPointerUp}'> <div class='clock-face'> ${"hours"==this.selecting?new Array(12).fill(0).map(((t,e)=>s.dy` <span style=' width: ${Math.sqrt(5e3)}%; transform: rotate(${this._getHoursDegree(e)}deg); '> <span style='transform: rotate(${-1*this._getHoursDegree(e)}deg);'> ${e+1} </span> </span> `)):""} ${"minutes"==this.selecting?new Array(6).fill(0).map(((t,e)=>s.dy` <span style=' width: ${Math.sqrt(5e3)}%; transform: rotate(${this._getMinutesDegree(e)}deg); '> <span style='transform: rotate(${-1*this._getMinutesDegree(e)}deg);'> ${10*(e+1)} </span> </span> `)):""} </div> <div class='clock-hand' style=' transform: rotate(${this._angle}deg) translateY(-50%); '></div> <div class='clock-thumb' style=' width: ${Math.sqrt(5e3)}%; transform: rotate(${this._angle+45}deg); '></div> </div> <div class='action-buttons'> <crowd-button @click='${this._hidePicker}'>CANCEL</crowd-button> <crowd-button @click='${()=>{this._setValue(),this._hidePicker()}}'>OK</crowd-button> </div> </div> ${t} <slot name="help-text"></slot> </div> `}}var L=r(613),z=r(461),B=r(692);const R=t=>null!=t?t:B.Ld;r(123);class F extends s.oi{static properties={src:{type:String},"src-youtube":{type:String},"src-vimeo":{type:String},type:{type:String},playState:{type:Boolean,reflect:!0},initialPlay:{type:Boolean},progress:{type:Number},volume:{type:Number},muted:{type:Boolean,reflect:!0},loop:{type:Boolean,reflect:!0},fullscreen:{type:Boolean},_hideControls:{type:Boolean,reflect:!0},controlHideTimeoutDuration:{type:Number},playbackRate:{type:Number},pip:{type:Boolean},poster:{type:String},_embedWidth:{type:Number},playsupported:{type:Boolean},controls:{type:Boolean}};static styles=[s.iv` *,*::before, *::after { box-sizing: border-box; transition-property: none; transition-duration: var(--crowd-video-transition-duration, 0.15s); transition-delay: var(--crowd-video-transition-delay, 0s); transition-timing-function: var(--crowd-video-transition-ease, ease-in-out); } :host { display: inline-block; --crowd-range-indicator-color: var(--crowd-video-theme-color, #000); --crowd-button-background-color: var(--crowd-video-theme-color, #000); --crowd-button-border-color: var(--crowd-video-theme-color, #000); --crowd-button-color: var(--crowd-video-alt-color, #fff); --crowd-button-hover-background-color: var(--crowd-video-button-hover-color, #aaa); --crowd-button-hover-border-color: var(--crowd-video-button-hover-color, #000); --crowd-menu-item-color: var(--crowd-video-theme-color, #000); } :host([src-youtube]) { display: block; width: 100%; } video { display: inline-block; max-width: 100%; width:100%; } .container { display: grid; place-items: center; position: relative; overflow: hidden; } :host([src-youtube]) .container { width: 100%; } .media, .play, .pause { grid-area: 1/1; } .media { width: 100%; } .pause { opacity: 0; transition-property: opacity; } @media (hover: hover) { .container:hover .pause { opacity: 1; } :host([_hideControls]) .container:hover .pause { opacity: 0; } } .controls { position: absolute; bottom: 0; left: 0; right: 0; color: #fff; padding: var(--crowd-video-controls-padding, 1em); background: var(--crowd-video-controls-background,linear-gradient(0deg, var(--crowd-video-controls-background-color,rgba(0,0,0,1)) 0%, rgba(255,255,255,0) 100%)); transition-property: transform opacity; transform: translateY(100%); opacity: 0; display: flex; align-items: center; gap: var(--crowd-video-controls-gap, 1em); } @media (hover: hover) { .container:hover .controls { transform: translateY(0); opacity: 1; } :host([_hideControls]) .container:hover .controls { transform: translateY(100%); opacity: 0; } } .controls crowd-icon-button { font-size: var(--crowd-video-controls-button-size, 1.2em); } .controls .progress { width: 100%; --crowd-range-width: 100%; } .controls .volume { --crowd-range-width: 75px; } .audio { display: flex; align-items: center; gap: 0.5em; } crowd-icon-button { --crowd-button-hover-color: var(--crowd-video-button-hover-color, #aaa); } .settings { --crowd-input-padding-vertical: 0px; --crowd-input-wrapper-padding-vertical: 5px; } .settings::part(dropdown) { overflow: visible; } .playback span { display: inline-block; padding-left: 0.5em; font-style: italic; opacity: 0.5; } .container:not(.no-play) google-youtube { pointer-events: none; } .container.no-play .play { display: none; } `];async play(){this.video=this.renderRoot.querySelector(".video"),this.youtube=this.renderRoot.querySelector("google-youtube"),!this.initialPlay&&this.video&&(this.seeking=!1),this.video?(this.initialPlay=!0,this.video.play().then((()=>{this.playState=!0}))):this.youtube&&(this.initialPlay=!0,this.youtube.playsupported?(this.youtube.play(),this.playState=!0):this.renderRoot.querySelector(".container").classList.add("no-play"))}pause(){this.video=this.renderRoot.querySelector(".video"),this.youtube=this.renderRoot.querySelector("google-youtube"),this.video?(this.video.pause(),this.playState=!1):this.youtube&&(this.youtube.pause(),this.playState=!1,this.youtube.playsupported||this.renderRoot.querySelector(".container").classList.add("no-play"))}_saveVolume(){localStorage.setItem("crowd-video-volume",this.volume),localStorage.setItem("crowd-video-muted",this.muted)}_toggleFullscreen(){let t=this.renderRoot.querySelector(".container");this.fullscreen?document.exitFullscreen():t.requestFullscreen()}_startControlTimeout(){this._hideControls=!1,this._clearControlTimeout(),this.controlTimeout=setTimeout((()=>{this._hideControls=!0}),this.controlHideTimeoutDuration)}_clearControlTimeout(){this.controlTimeout&&clearTimeout(this.controlTimeout)}_setPlaybackRate(t){this.playbackRate=t}_togglePiP(){this.pip&&document.pictureInPictureElement?document.exitPictureInPicture().then((()=>{this.pip=!1})):(this.video=this.renderRoot.querySelector(".video"),this.video&&(this.video.requestPictureInPicture().then((()=>{this.pip=!0})),this.video.addEventListener("leavepictureinpicture",(()=>{this.pip=!1}))))}_checkPlaySupported(){var t,e=document.createElement("video");if("play"in e){e.id="playtest",e.style.position="absolute",e.style.top="-9999px",e.style.left="-9999px";var r=document.createElement("source");r.src="data:video/mp4;base64,AAAAFGZ0eXBNU05WAAACAE1TTlYAAAOUbW9vdgAAAGxtdmhkAAAAAM9ghv7PYIb+AAACWAAACu8AAQAAAQAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAgAAAnh0cmFrAAAAXHRraGQAAAAHz2CG/s9ghv4AAAABAAAAAAAACu8AAAAAAAAAAAAAAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAABAAAAAAAAAAAAAAAAAABAAAAAAFAAAAA4AAAAAAHgbWRpYQAAACBtZGhkAAAAAM9ghv7PYIb+AAALuAAANq8AAAAAAAAAIWhkbHIAAAAAbWhscnZpZGVBVlMgAAAAAAABAB4AAAABl21pbmYAAAAUdm1oZAAAAAAAAAAAAAAAAAAAACRkaW5mAAAAHGRyZWYAAAAAAAAAAQAAAAx1cmwgAAAAAQAAAVdzdGJsAAAAp3N0c2QAAAAAAAAAAQAAAJdhdmMxAAAAAAAAAAEAAAAAAAAAAAAAAAAAAAAAAFAAOABIAAAASAAAAAAAAAABAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAGP//AAAAEmNvbHJuY2xjAAEAAQABAAAAL2F2Y0MBTUAz/+EAGGdNQDOadCk/LgIgAAADACAAAAMA0eMGVAEABGjuPIAAAAAYc3R0cwAAAAAAAAABAAAADgAAA+gAAAAUc3RzcwAAAAAAAAABAAAAAQAAABxzdHNjAAAAAAAAAAEAAAABAAAADgAAAAEAAABMc3RzegAAAAAAAAAAAAAADgAAAE8AAAAOAAAADQAAAA0AAAANAAAADQAAAA0AAAANAAAADQAAAA0AAAANAAAADQAAAA4AAAAOAAAAFHN0Y28AAAAAAAAAAQAAA7AAAAA0dXVpZFVTTVQh0k/Ou4hpXPrJx0AAAAAcTVREVAABABIAAAAKVcQAAAAAAAEAAAAAAAAAqHV1aWRVU01UIdJPzruIaVz6ycdAAAAAkE1URFQABAAMAAAAC1XEAAACHAAeAAAABBXHAAEAQQBWAFMAIABNAGUAZABpAGEAAAAqAAAAASoOAAEAZABlAHQAZQBjAHQAXwBhAHUAdABvAHAAbABhAHkAAAAyAAAAA1XEAAEAMgAwADAANQBtAGUALwAwADcALwAwADYAMAA2ACAAMwA6ADUAOgAwAAABA21kYXQAAAAYZ01AM5p0KT8uAiAAAAMAIAAAAwDR4wZUAAAABGjuPIAAAAAnZYiAIAAR//eBLT+oL1eA2Nlb/edvwWZflzEVLlhlXtJvSAEGRA3ZAAAACkGaAQCyJ/8AFBAAAAAJQZoCATP/AOmBAAAACUGaAwGz/wDpgAAAAAlBmgQCM/8A6YEAAAAJQZoFArP/AOmBAAAACUGaBgMz/wDpgQAAAAlBmgcDs/8A6YEAAAAJQZoIBDP/AOmAAAAACUGaCQSz/wDpgAAAAAlBmgoFM/8A6YEAAAAJQZoLBbP/AOmAAAAACkGaDAYyJ/8AFBAAAAAKQZoNBrIv/4cMeQ==",e.appendChild(r);var i=document.createElement("source");i.src="data:video/webm;base64,GkXfo49CgoR3ZWJtQoeBAUKFgQEYU4BnAQAAAAAAF60RTZt0vE27jFOrhBVJqWZTrIIQA027jFOrhBZUrmtTrIIQbE27jFOrhBFNm3RTrIIXmU27jFOrhBxTu2tTrIIWs+xPvwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAFUmpZuQq17GDD0JATYCjbGliZWJtbCB2MC43LjcgKyBsaWJtYXRyb3NrYSB2MC44LjFXQY9BVlNNYXRyb3NrYUZpbGVEiYRFnEAARGGIBc2Lz1QNtgBzpJCy3XZ0KNuKNZS4+fDpFxzUFlSua9iu1teBAXPFhL4G+bmDgQG5gQGIgQFVqoEAnIEAbeeBASMxT4Q/gAAAVe6BAIaFVl9WUDiqgQEj44OEE95DVSK1nIN1bmTgkbCBULqBPJqBAFSwgVBUuoE87EQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAB9DtnVB4eeBAKC4obaBAAAAkAMAnQEqUAA8AABHCIWFiIWEiAICAAamYnoOC6cfJa8f5Zvda4D+/7YOf//nNefQYACgnKGWgQFNANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQKbANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQPoANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQU1ANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQaDANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQfQANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQkdANEBAAEQEBRgAGFgv9AAIiGAAPuC/rOgnKGWgQprANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQu4ANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQ0FANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgQ5TANEBAAEQEAAYABhYL/QACIhgAPuC/rKgnKGWgQ+gANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgRDtANEBAAEQEAAYABhYL/QACIhgAPuC/rOgnKGWgRI7ANEBAAEQEAAYABhYL/QACIhgAPuC/rIcU7trQOC7jLOBALeH94EB8YIUzLuNs4IBTbeH94EB8YIUzLuNs4ICm7eH94EB8YIUzLuNs4ID6LeH94EB8YIUzLuNs4IFNbeH94EB8YIUzLuNs4IGg7eH94EB8YIUzLuNs4IH0LeH94EB8YIUzLuNs4IJHbeH94EB8YIUzLuNs4IKa7eH94EB8YIUzLuNs4ILuLeH94EB8YIUzLuNs4INBbeH94EB8YIUzLuNs4IOU7eH94EB8YIUzLuNs4IPoLeH94EB8YIUzLuNs4IQ7beH94EB8YIUzLuNs4ISO7eH94EB8YIUzBFNm3SPTbuMU6uEH0O2dVOsghTM",e.appendChild(i),document.body.appendChild(e),e.onplaying=r=>{clearTimeout(t),this.playsupported=r&&"playing"===r.type||0!==e.currentTime,e.onplaying=null,document.body.removeChild(e)},t=setTimeout(e.onplaying,500),e.play().catch((t=>{}))}else this.playsupported=!1}constructor(){super(),this.playState=!1,this.initialPlay=!1,this.loop=!1,this.controls=!1,localStorage.getItem("crowd-video-volume")?this.volume=Number(localStorage.getItem("crowd-video-volume")):this.volume=1,localStorage.getItem("crowd-video-muted")&&(this.muted="true"==localStorage.getItem("crowd-video-muted")),this._saveVolume(),this.fullscreen=!1,this.controlHideTimeoutDuration=5e3,this.playbackRate=1,this.pip=!1}connectedCallback(){super.connectedCallback(),document.addEventListener("fullscreenchange",(()=>{document.fullscreenElement?this.fullscreen=!0:this.fullscreen=!1})),this._checkPlaySupported(),console.log(this.controls)}firstUpdated(){let t=this.renderRoot.querySelector(".container");this._embedWidth=t.getBoundingClientRect().width,new ResizeObserver((t=>{for(let e of t)this._embedWidth=e.contentRect.width})).observe(t)}render(){let t="";return this.src?t=s.dy` <video class='video' muted=${R(this.muted?this.muted:void 0)} loop=${R(this.loop?this.loop:void 0)} poster='${this.poster}' loading='lazy' preload="metadata" playsinline part='video' @timeupdate='${t=>{this.video&&requestAnimationFrame((()=>{this.seeking||(this.progress=this.video.currentTime/this.video.duration*100,this.video.volume=this.volume,this.video.muted=this.muted,this.video.playbackRate=this.playbackRate)}))}}'> <source src='${this.src}' type='${this.type}' /> </video> `:this["src-youtube"]&&(t=s.dy` <google-youtube video-id="${this["src-youtube"]}" height="${this._embedWidth/16*9}px" width="${this._embedWidth}px" autoplay="0" playsupported="${this.playsupported}" chromeless class='youtube' part='youtube' @google-youtube-state-change='${t=>{0===t.detail.data&&(this.pause(),this.youtube._videoIdChanged(),this.loop&&this.play())}}' @playbackstarted-changed='${t=>{this.renderRoot.querySelector(".container").classList.remove("no-play"),this.playState=t.detail.value}}' @currenttime-changed='${t=>{this.initialPlay=!0,this.youtube?requestAnimationFrame((()=>{this.seeking||(this.progress=this.youtube.currenttime/this.youtube.duration*100,this.youtube.setVolume(100*this.volume),this.muted?this.youtube.mute():this.youtube.unMute(),this.youtube.setPlaybackRate(this.playbackRate))})):this.youtube=this.renderRoot.querySelector("google-youtube")}}' > </google-youtube> `),s.dy` <div class='container' part='container' @pointerleave='${()=>this._clearControlTimeout()}' @pointerenter='${()=>this._startControlTimeout()}' @pointermove='${()=>this._startControlTimeout()}' @pointerover='${()=>this._startControlTimeout()}'> <div class='media' part='media'> ${t} </div> ${!this.playState&&this.controls?s.dy` <crowd-button @click='${()=>this.play()}' circle part='play' class='play'> <slot name='play'> <crowd-icon name='play-fill'></crowd-icon> </slot> </crowd-button> `:""} ${this.playState&&this.controls?s.dy` <crowd-button @click='${()=>this.pause()}' circle part='pause' class='pause'> <slot name='pause'> <crowd-icon name='pause-fill'></crowd-icon> </slot> </crowd-button> `:""} ${this.initialPlay&&this.controls?s.dy` <div class='controls' part='controls'> <crowd-icon-button @click='${()=>{this.playState?this.pause():this.play()}}' name='${this.playState?"pause-fill":"play-fill"}'></crowd-icon-button> <crowd-range part='progress' class='progress' hideMinMax='true' min='0' max='100' value='${this.progress}' step='1' @crowdMove='${t=>{if(this.pause(),this.seeking=!0,this.video&&(this.video.currentTime=t.currentTarget.value/100*this.video.duration),this.youtube&&3!=this.youtube.state){let e=(t.currentTarget.value/100*this.youtube.duration-this.progress)/100*this.youtube.duration;e=Math.round(e),this.youtube.seekTo(e)}setTimeout((()=>{this.seeking=!1,this.play()}),500)}}'></crowd-range> <div class='audio' part='audio'> <crowd-icon-button @click='${()=>{this.muted=!this.muted,this._saveVolume()}}' name='${0==this.volume||this.muted?"volume-mute-fill":""}${this.volume>0&&this.volume<.5&&!this.muted?"volume-down-fill":""}${this.volume>=.5&&!this.muted?"volume-up-fill":""}'></crowd-icon-button> <crowd-range part='volume' class='volume' hideMinMax='true' min='0' max='1' value='${this.volume}' step='0.1' @crowdMove='${t=>{this.volume=t.currentTarget.value,this._saveVolume()}}'></crowd-range> </div> <crowd-dropdown position="top right" class='settings' part='settings'> <crowd-icon-button name='gear-fill' slot='trigger'></crowd-icon-button> <crowd-menu> <crowd-menu-item class='playback' position='left bottom'> Playback Speed <span>${this.playbackRate}x</span> <crowd-menu slot="submenu"> <crowd-menu-item @click='${()=>this._setPlaybackRate(.25)}'>0.25x</crowd-menu-item> <crowd-menu-item @click='${()=>this._setPlaybackRate(.5)}'>0.5x</crowd-menu-item> <crowd-menu-item @click='${()=>this._setPlaybackRate(1)}'>1x</crowd-menu-item> <crowd-menu-item @click='${()=>this._setPlaybackRate(1.5)}'>1.5x</crowd-menu-item> <crowd-menu-item @click='${()=>this._setPlaybackRate(2)}'>2x</crowd-menu-item> </crowd-menu> </crowd-menu-item> <crowd-menu-item @click='${()=>this._togglePiP()}'>Picture in picture</crowd-menu-item> </crowd-menu> </crowd-dropdown> <crowd-icon-button @click='${()=>this._toggleFullscreen()}' name='${this.fullscreen?"fullscreen-exit":"fullscreen"}'></crowd-icon-button> </div> `:""} </div> `}}customElements.define("crowd-accordion-group",t.b),customElements.define("crowd-accordion-item",t.Q),customElements.define("crowd-alert",e.b),customElements.define("crowd-badge",i.C),customElements.define("crowd-button",n.z),customElements.define("crowd-checkbox",A.X),customElements.define("crowd-color-picker",o.z),customElements.define("crowd-context-menu",a),customElements.define("crowd-customiser",l),customElements.define("crowd-date-picker",u),customElements.define("crowd-dialog",h.V),customElements.define("crowd-drawer",p.d),customElements.define("crowd-dropdown",f.L),customElements.define("crowd-form",m.l),customElements.define("crowd-icon-button",g.h),customElements.define("crowd-icon",v.J),customElements.define("crowd-input",y.I),customElements.define("crowd-menu-item",b.s),customElements.define("crowd-menu",_.v),customElements.define("crowd-multi-toggle",w),customElements.define("crowd-multi-toggle-item",x),customElements.define("crowd-number",k),customElements.define("crowd-progress-ring",S.e),customElements.define("crowd-range",C.e),customElements.define("crowd-select",E.P),customElements.define("crowd-stylesheet",T),customElements.define("crowd-switch",O.r),customElements.define("crowd-option",E.W),customElements.define("crowd-spinner",P.$),customElements.define("crowd-tab",N),customElements.define("crowd-tab-group",$),customElements.define("crowd-textarea",I.K),customElements.define("crowd-time-picker",D),customElements.define("toast-stack",L.g),customElements.define("crowd-tooltip",z.u),customElements.define("crowd-video",F)})()})()}},e={};function r(i){var n=e[i];if(void 0!==n)return n.exports;var A=e[i]={exports:{}};return t[i](A,A.exports,r),A.exports}r.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return r.d(e,{a:e}),e},r.d=(t,e)=>{for(var i in e)r.o(e,i)&&!r.o(t,i)&&Object.defineProperty(t,i,{enumerable:!0,get:e[i]})},r.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),(()=>{"use strict";r(957)})(),console.log(""),(()=>{"use strict";function t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function e(t){return e="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},e(t)}function r(t,r){for(var i=0;i<r.length;i++){var n=r[i];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,(A=n.key,o=void 0,o=function(t,r){if("object"!==e(t)||null===t)return t;var i=t[Symbol.toPrimitive];if(void 0!==i){var n=i.call(t,r);if("object"!==e(n))return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(A,"string"),"symbol"===e(o)?o:String(o)),n)}var A,o}var i=function(){function e(r,i){var n=this,A=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{disconnect:!1};t(this,e),"undefined"!==r&&r.nodeType&&"function"==typeof i&&(this.options=A,this.element=r,this.callback=i,this.observer=new IntersectionObserver((function(t,e){return n._callback(t,e)})),this.observer.observe(this.element))}var i,n;return i=e,(n=[{key:"_callback",value:function(t,e){var r=this;t.forEach((function(t){t.isIntersecting&&(r.callback(),r.options.disconnect&&e.disconnect(r.element))}))}}])&&r(i.prototype,n),Object.defineProperty(i,"prototype",{writable:!1}),e}();function n(t,e){for(var r=0;r<e.length;r++){var i=e[r];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),Object.defineProperty(t,i.key,i)}}var A,o,s,a,l,c,d,u,h,p,f,m,g,v=function(){return A||"undefined"!=typeof window&&(A=window.gsap)&&A.registerPlugin&&A},y=1,b=[],_=[],w=[],x=Date.now,k=function(t,e){return e},S=function(t,e){return~w.indexOf(t)&&w[w.indexOf(t)+1][e]},C=function(t){return!!~p.indexOf(t)},E=function(t,e,r,i,n){return t.addEventListener(e,r,{passive:!i,capture:!!n})},P=function(t,e,r,i){return t.removeEventListener(e,r,!!i)},T=function(){return f&&f.isPressed||_.cache++},O=function(t,e){var r=function r(i){if(i||0===i){y&&(s.history.scrollRestoration="manual");var n=f&&f.isPressed;i=r.v=Math.round(i)||(f&&f.iOS?1:0),t(i),r.cacheID=_.cache,n&&k("ss",i)}else(e||_.cache!==r.cacheID||k("ref"))&&(r.cacheID=_.cache,r.v=t());return r.v+r.offset};return r.offset=0,t&&r},N={s:"scrollLeft",p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:O((function(t){return arguments.length?s.scrollTo(t,$.sc()):s.pageXOffset||a.scrollLeft||l.scrollLeft||c.scrollLeft||0}))},$={s:"scrollTop",p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:N,sc:O((function(t){return arguments.length?s.scrollTo(N.sc(),t):s.pageYOffset||a.scrollTop||l.scrollTop||c.scrollTop||0}))},I=function(t){return A.utils.toArray(t)[0]||("string"==typeof t&&!1!==A.config().nullTargetWarn?console.warn("Element not found:",t):null)},M=function(t,e){var r=e.s,i=e.sc;C(t)&&(t=a.scrollingElement||l);var n=_.indexOf(t),o=i===$.sc?1:2;!~n&&(n=_.push(t)-1),_[n+o]||t.addEventListener("scroll",T);var s=_[n+o],c=s||(_[n+o]=O(S(t,r),!0)||(C(t)?i:O((function(e){return arguments.length?t[r]=e:t[r]}))));return c.target=t,s||(c.smooth="smooth"===A.getProperty(t,"scrollBehavior")),c},D=function(t,e,r){var i=t,n=t,A=x(),o=A,s=e||50,a=Math.max(500,3*s),l=function(t,e){var a=x();e||a-A>s?(n=i,i=t,o=A,A=a):r?i+=t:i=n+(t-n)/(a-o)*(A-o)};return{update:l,reset:function(){n=i=r?0:i,o=A=0},getVelocity:function(t){var e=o,s=n,c=x();return(t||0===t)&&t!==i&&l(t),A===o||c-o>a?0:(i+(r?s:-s))/((r?c:A)-e)*1e3}}},L=function(t,e){return e&&!t._gsapAllow&&t.preventDefault(),t.changedTouches?t.changedTouches[0]:t},z=function(t){var e=Math.max.apply(Math,t),r=Math.min.apply(Math,t);return Math.abs(e)>=Math.abs(r)?e:r},B=function(){var t,e,r,i;(h=A.core.globals().ScrollTrigger)&&h.core&&(t=h.core,e=t.bridge||{},r=t._scrollers,i=t._proxies,r.push.apply(r,_),i.push.apply(i,w),_=r,w=i,k=function(t,r){return e[t](r)})},R=function(t){return(A=t||v())&&"undefined"!=typeof document&&document.body&&(s=window,a=document,l=a.documentElement,c=a.body,p=[s,a,l,c],A.utils.clamp,g=A.core.context||function(){},u="onpointerenter"in c?"pointer":"mouse",d=F.isTouch=s.matchMedia&&s.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in s||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,m=F.eventTypes=("ontouchstart"in l?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in l?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout((function(){return y=0}),500),B(),o=1),o};N.op=$,_.cache=0;var F=function(){function t(t){this.init(t)}var e,r;return t.prototype.init=function(t){o||R(A)||console.warn("Please gsap.registerPlugin(Observer)"),h||B();var e=t.tolerance,r=t.dragMinimum,i=t.type,n=t.target,p=t.lineHeight,v=t.debounce,y=t.preventDefault,_=t.onStop,w=t.onStopDelay,k=t.ignore,S=t.wheelSpeed,O=t.event,F=t.onDragStart,H=t.onDragEnd,V=t.onDrag,U=t.onPress,Y=t.onRelease,q=t.onRight,j=t.onLeft,Q=t.onUp,W=t.onDown,Z=t.onChangeX,G=t.onChangeY,J=t.onChange,X=t.onToggleX,K=t.onToggleY,tt=t.onHover,et=t.onHoverEnd,rt=t.onMove,it=t.ignoreCheck,nt=t.isNormalizer,At=t.onGestureStart,ot=t.onGestureEnd,st=t.onWheel,at=t.onEnable,lt=t.onDisable,ct=t.onClick,dt=t.scrollSpeed,ut=t.capture,ht=t.allowClicks,pt=t.lockAxis,ft=t.onLockAxis;this.target=n=I(n)||l,this.vars=t,k&&(k=A.utils.toArray(k)),e=e||1e-9,r=r||0,S=S||1,dt=dt||1,i=i||"wheel,touch,pointer",v=!1!==v,p||(p=parseFloat(s.getComputedStyle(c).lineHeight)||22);var mt,gt,vt,yt,bt,_t,wt,xt=this,kt=0,St=0,Ct=M(n,N),Et=M(n,$),Pt=Ct(),Tt=Et(),Ot=~i.indexOf("touch")&&!~i.indexOf("pointer")&&"pointerdown"===m[0],Nt=C(n),$t=n.ownerDocument||a,It=[0,0,0],Mt=[0,0,0],Dt=0,Lt=function(){return Dt=x()},zt=function(t,e){return(xt.event=t)&&k&&~k.indexOf(t.target)||e&&Ot&&"touch"!==t.pointerType||it&&it(t,e)},Bt=function(){var t=xt.deltaX=z(It),r=xt.deltaY=z(Mt),i=Math.abs(t)>=e,n=Math.abs(r)>=e;J&&(i||n)&&J(xt,t,r,It,Mt),i&&(q&&xt.deltaX>0&&q(xt),j&&xt.deltaX<0&&j(xt),Z&&Z(xt),X&&xt.deltaX<0!=kt<0&&X(xt),kt=xt.deltaX,It[0]=It[1]=It[2]=0),n&&(W&&xt.deltaY>0&&W(xt),Q&&xt.deltaY<0&&Q(xt),G&&G(xt),K&&xt.deltaY<0!=St<0&&K(xt),St=xt.deltaY,Mt[0]=Mt[1]=Mt[2]=0),(yt||vt)&&(rt&&rt(xt),vt&&(V(xt),vt=!1),yt=!1),_t&&!(_t=!1)&&ft&&ft(xt),bt&&(st(xt),bt=!1),mt=0},Rt=function(t,e,r){It[r]+=t,Mt[r]+=e,xt._vx.update(t),xt._vy.update(e),v?mt||(mt=requestAnimationFrame(Bt)):Bt()},Ft=function(t,e){pt&&!wt&&(xt.axis=wt=Math.abs(t)>Math.abs(e)?"x":"y",_t=!0),"y"!==wt&&(It[2]+=t,xt._vx.update(t,!0)),"x"!==wt&&(Mt[2]+=e,xt._vy.update(e,!0)),v?mt||(mt=requestAnimationFrame(Bt)):Bt()},Ht=function(t){if(!zt(t,1)){var e=(t=L(t,y)).clientX,i=t.clientY,n=e-xt.x,A=i-xt.y,o=xt.isDragging;xt.x=e,xt.y=i,(o||Math.abs(xt.startX-e)>=r||Math.abs(xt.startY-i)>=r)&&(V&&(vt=!0),o||(xt.isDragging=!0),Ft(n,A),o||F&&F(xt))}},Vt=xt.onPress=function(t){zt(t,1)||(xt.axis=wt=null,gt.pause(),xt.isPressed=!0,t=L(t),kt=St=0,xt.startX=xt.x=t.clientX,xt.startY=xt.y=t.clientY,xt._vx.reset(),xt._vy.reset(),E(nt?n:$t,m[1],Ht,y,!0),xt.deltaX=xt.deltaY=0,U&&U(xt))},Ut=function(t){if(!zt(t,1)){P(nt?n:$t,m[1],Ht,!0);var e=!isNaN(xt.y-xt.startY),r=xt.isDragging&&(Math.abs(xt.x-xt.startX)>3||Math.abs(xt.y-xt.startY)>3),i=L(t);!r&&e&&(xt._vx.reset(),xt._vy.reset(),y&&ht&&A.delayedCall(.08,(function(){if(x()-Dt>300&&!t.defaultPrevented)if(t.target.click)t.target.click();else if($t.createEvent){var e=$t.createEvent("MouseEvents");e.initMouseEvent("click",!0,!0,s,1,i.screenX,i.screenY,i.clientX,i.clientY,!1,!1,!1,!1,0,null),t.target.dispatchEvent(e)}}))),xt.isDragging=xt.isGesturing=xt.isPressed=!1,_&&!nt&>.restart(!0),H&&r&&H(xt),Y&&Y(xt,r)}},Yt=function(t){return t.touches&&t.touches.length>1&&(xt.isGesturing=!0)&&At(t,xt.isDragging)},qt=function(){return(xt.isGesturing=!1)||ot(xt)},jt=function(t){if(!zt(t)){var e=Ct(),r=Et();Rt((e-Pt)*dt,(r-Tt)*dt,1),Pt=e,Tt=r,_&>.restart(!0)}},Qt=function(t){if(!zt(t)){t=L(t,y),st&&(bt=!0);var e=(1===t.deltaMode?p:2===t.deltaMode?s.innerHeight:1)*S;Rt(t.deltaX*e,t.deltaY*e,0),_&&!nt&>.restart(!0)}},Wt=function(t){if(!zt(t)){var e=t.clientX,r=t.clientY,i=e-xt.x,n=r-xt.y;xt.x=e,xt.y=r,yt=!0,(i||n)&&Ft(i,n)}},Zt=function(t){xt.event=t,tt(xt)},Gt=function(t){xt.event=t,et(xt)},Jt=function(t){return zt(t)||L(t,y)&&ct(xt)};gt=xt._dc=A.delayedCall(w||.25,(function(){xt._vx.reset(),xt._vy.reset(),gt.pause(),_&&_(xt)})).pause(),xt.deltaX=xt.deltaY=0,xt._vx=D(0,50,!0),xt._vy=D(0,50,!0),xt.scrollX=Ct,xt.scrollY=Et,xt.isDragging=xt.isGesturing=xt.isPressed=!1,g(this),xt.enable=function(t){return xt.isEnabled||(E(Nt?$t:n,"scroll",T),i.indexOf("scroll")>=0&&E(Nt?$t:n,"scroll",jt,y,ut),i.indexOf("wheel")>=0&&E(n,"wheel",Qt,y,ut),(i.indexOf("touch")>=0&&d||i.indexOf("pointer")>=0)&&(E(n,m[0],Vt,y,ut),E($t,m[2],Ut),E($t,m[3],Ut),ht&&E(n,"click",Lt,!1,!0),ct&&E(n,"click",Jt),At&&E($t,"gesturestart",Yt),ot&&E($t,"gestureend",qt),tt&&E(n,u+"enter",Zt),et&&E(n,u+"leave",Gt),rt&&E(n,u+"move",Wt)),xt.isEnabled=!0,t&&t.type&&Vt(t),at&&at(xt)),xt},xt.disable=function(){xt.isEnabled&&(b.filter((function(t){return t!==xt&&C(t.target)})).length||P(Nt?$t:n,"scroll",T),xt.isPressed&&(xt._vx.reset(),xt._vy.reset(),P(nt?n:$t,m[1],Ht,!0)),P(Nt?$t:n,"scroll",jt,ut),P(n,"wheel",Qt,ut),P(n,m[0],Vt,ut),P($t,m[2],Ut),P($t,m[3],Ut),P(n,"click",Lt,!0),P(n,"click",Jt),P($t,"gesturestart",Yt),P($t,"gestureend",qt),P(n,u+"enter",Zt),P(n,u+"leave",Gt),P(n,u+"move",Wt),xt.isEnabled=xt.isPressed=xt.isDragging=!1,lt&<(xt))},xt.kill=xt.revert=function(){xt.disable();var t=b.indexOf(xt);t>=0&&b.splice(t,1),f===xt&&(f=0)},b.push(xt),nt&&C(n)&&(f=xt),xt.enable(O)},e=t,(r=[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}])&&n(e.prototype,r),t}();F.version="3.11.4",F.create=function(t){return new F(t)},F.register=R,F.getAll=function(){return b.slice()},F.getById=function(t){return b.filter((function(e){return e.vars.id===t}))[0]},v()&&A.registerPlugin(F);var H,V,U,Y,q,j,Q,W,Z,G,J,X,K,tt,et,rt,it,nt,At,ot,st,at,lt,ct,dt,ut,ht,pt,ft,mt,gt,vt,yt,bt,_t=1,wt=Date.now,xt=wt(),kt=0,St=0,Ct=function(){return tt=1},Et=function(){return tt=0},Pt=function(t){return t},Tt=function(t){return Math.round(1e5*t)/1e5||0},Ot=function(){return"undefined"!=typeof window},Nt=function(){return H||Ot()&&(H=window.gsap)&&H.registerPlugin&&H},$t=function(t){return!!~Q.indexOf(t)},It=function(t){return S(t,"getBoundingClientRect")||($t(t)?function(){return Be.width=U.innerWidth,Be.height=U.innerHeight,Be}:function(){return Kt(t)})},Mt=function(t,e){var r=e.s,i=e.d2,n=e.d,A=e.a;return(r="scroll"+i)&&(A=S(t,r))?A()-It(t)()[n]:$t(t)?(q[r]||j[r])-(U["inner"+i]||q["client"+i]||j["client"+i]):t[r]-t["offset"+i]},Dt=function(t,e){for(var r=0;r<At.length;r+=3)(!e||~e.indexOf(At[r+1]))&&t(At[r],At[r+1],At[r+2])},Lt=function(t){return"string"==typeof t},zt=function(t){return"function"==typeof t},Bt=function(t){return"number"==typeof t},Rt=function(t){return"object"==typeof t},Ft=function(t,e,r){return t&&t.progress(e?0:1)&&r&&t.pause()},Ht=function(t,e){if(t.enabled){var r=e(t);r&&r.totalTime&&(t.callbackAnimation=r)}},Vt=Math.abs,Ut="right",Yt="bottom",qt="width",jt="height",Qt="padding",Wt="margin",Zt="Width",Gt="px",Jt=function(t){return U.getComputedStyle(t)},Xt=function(t,e){for(var r in e)r in t||(t[r]=e[r]);return t},Kt=function(t,e){var r=e&&"matrix(1, 0, 0, 1, 0, 0)"!==Jt(t)[et]&&H.to(t,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),i=t.getBoundingClientRect();return r&&r.progress(0).kill(),i},te=function(t,e){var r=e.d2;return t["offset"+r]||t["client"+r]||0},ee=function(t){var e,r=[],i=t.labels,n=t.duration();for(e in i)r.push(i[e]/n);return r},re=function(t){var e=H.utils.snap(t),r=Array.isArray(t)&&t.slice(0).sort((function(t,e){return t-e}));return r?function(t,i,n){var A;if(void 0===n&&(n=.001),!i)return e(t);if(i>0){for(t-=n,A=0;A<r.length;A++)if(r[A]>=t)return r[A];return r[A-1]}for(A=r.length,t+=n;A--;)if(r[A]<=t)return r[A];return r[0]}:function(r,i,n){void 0===n&&(n=.001);var A=e(r);return!i||Math.abs(A-r)<n||A-r<0==i<0?A:e(i<0?r-t:r+t)}},ie=function(t,e,r,i){return r.split(",").forEach((function(r){return t(e,r,i)}))},ne=function(t,e,r,i,n){return t.addEventListener(e,r,{passive:!i,capture:!!n})},Ae=function(t,e,r,i){return t.removeEventListener(e,r,!!i)},oe=function(t,e,r){return r&&r.wheelHandler&&t(e,"wheel",r)},se={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},ae={toggleActions:"play",anticipatePin:0},le={top:0,left:0,center:.5,bottom:1,right:1},ce=function(t,e){if(Lt(t)){var r=t.indexOf("="),i=~r?+(t.charAt(r-1)+1)*parseFloat(t.substr(r+1)):0;~r&&(t.indexOf("%")>r&&(i*=e/100),t=t.substr(0,r-1)),t=i+(t in le?le[t]*e:~t.indexOf("%")?parseFloat(t)*e/100:parseFloat(t)||0)}return t},de=function(t,e,r,i,n,A,o,s){var a=n.startColor,l=n.endColor,c=n.fontSize,d=n.indent,u=n.fontWeight,h=Y.createElement("div"),p=$t(r)||"fixed"===S(r,"pinType"),f=-1!==t.indexOf("scroller"),m=p?j:r,g=-1!==t.indexOf("start"),v=g?a:l,y="border-color:"+v+";font-size:"+c+";color:"+v+";font-weight:"+u+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return y+="position:"+((f||s)&&p?"fixed;":"absolute;"),(f||s||!p)&&(y+=(i===$?Ut:Yt)+":"+(A+parseFloat(d))+"px;"),o&&(y+="box-sizing:border-box;text-align:left;width:"+o.offsetWidth+"px;"),h._isStart=g,h.setAttribute("class","gsap-marker-"+t+(e?" marker-"+e:"")),h.style.cssText=y,h.innerText=e||0===e?t+"-"+e:t,m.children[0]?m.insertBefore(h,m.children[0]):m.appendChild(h),h._offset=h["offset"+i.op.d2],ue(h,0,i,g),h},ue=function(t,e,r,i){var n={display:"block"},A=r[i?"os2":"p2"],o=r[i?"p2":"os2"];t._isFlipped=i,n[r.a+"Percent"]=i?-100:0,n[r.a]=i?"1px":0,n["border"+A+Zt]=1,n["border"+o+Zt]=0,n[r.p]=e+"px",H.set(t,n)},he=[],pe={},fe=function(){return wt()-kt>34&&(gt||(gt=requestAnimationFrame(Ne)))},me=function(){(!lt||!lt.isPressed||lt.startX>j.clientWidth)&&(_.cache++,lt?gt||(gt=requestAnimationFrame(Ne)):Ne(),kt||we("scrollStart"),kt=wt())},ge=function(){ut=U.innerWidth,dt=U.innerHeight},ve=function(){_.cache++,!K&&!at&&!Y.fullscreenElement&&!Y.webkitFullscreenElement&&(!ct||ut!==U.innerWidth||Math.abs(U.innerHeight-dt)>.25*U.innerHeight)&&W.restart(!0)},ye={},be=[],_e=function t(){return Ae(Ue,"scrollEnd",t)||Pe(!0)},we=function(t){return ye[t]&&ye[t].map((function(t){return t()}))||be},xe=[],ke=function(t){for(var e=0;e<xe.length;e+=5)(!t||xe[e+4]&&xe[e+4].query===t)&&(xe[e].style.cssText=xe[e+1],xe[e].getBBox&&xe[e].setAttribute("transform",xe[e+2]||""),xe[e+3].uncache=1)},Se=function(t,e){var r;for(rt=0;rt<he.length;rt++)!(r=he[rt])||e&&r._ctx!==e||(t?r.kill(1):r.revert(!0,!0));e&&ke(e),e||we("revert")},Ce=function(t,e){_.cache++,(e||!vt)&&_.forEach((function(t){return zt(t)&&t.cacheID++&&(t.rec=0)})),Lt(t)&&(U.history.scrollRestoration=ft=t)},Ee=0,Pe=function(t,e){if(!kt||t){vt=Ue.isRefreshing=!0,_.forEach((function(t){return zt(t)&&t.cacheID++&&(t.rec=t())}));var r=we("refreshInit");ot&&Ue.sort(),e||Se(),_.forEach((function(t){zt(t)&&(t.smooth&&(t.target.style.scrollBehavior="auto"),t(0))})),he.slice(0).forEach((function(t){return t.refresh()})),he.forEach((function(t,e){if(t._subPinOffset&&t.pin){var r=t.vars.horizontal?"offsetWidth":"offsetHeight",i=t.pin[r];t.revert(!0,1),t.adjustPinSpacing(t.pin[r]-i),t.revert(!1,1)}})),he.forEach((function(t){return"max"===t.vars.end&&t.setPositions(t.start,Math.max(t.start+1,Mt(t.scroller,t._dir)))})),r.forEach((function(t){return t&&t.render&&t.render(-1)})),_.forEach((function(t){zt(t)&&(t.smooth&&requestAnimationFrame((function(){return t.target.style.scrollBehavior="smooth"})),t.rec&&t(t.rec))})),Ce(ft,1),W.pause(),Ee++,Ne(2),he.forEach((function(t){return zt(t.vars.onRefresh)&&t.vars.onRefresh(t)})),vt=Ue.isRefreshing=!1,we("refresh")}else ne(Ue,"scrollEnd",_e)},Te=0,Oe=1,Ne=function(t){if(!vt||2===t){Ue.isUpdating=!0,bt&&bt.update(0);var e=he.length,r=wt(),i=r-xt>=50,n=e&&he[0].scroll();if(Oe=Te>n?-1:1,Te=n,i&&(kt&&!tt&&r-kt>200&&(kt=0,we("scrollEnd")),J=xt,xt=r),Oe<0){for(rt=e;rt-- >0;)he[rt]&&he[rt].update(0,i);Oe=1}else for(rt=0;rt<e;rt++)he[rt]&&he[rt].update(0,i);Ue.isUpdating=!1}gt=0},$e=["left","top",Yt,Ut,"marginBottom","marginRight","marginTop","marginLeft","display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],Ie=$e.concat([qt,jt,"boxSizing","maxWidth","maxHeight","position",Wt,Qt,"paddingTop","paddingRight","paddingBottom","paddingLeft"]),Me=function(t,e,r,i){if(!t._gsap.swappedIn){for(var n,A=$e.length,o=e.style,s=t.style;A--;)o[n=$e[A]]=r[n];o.position="absolute"===r.position?"absolute":"relative","inline"===r.display&&(o.display="inline-block"),s.bottom=s.right="auto",o.flexBasis=r.flexBasis||"auto",o.overflow="visible",o.boxSizing="border-box",o.width=te(t,N)+Gt,o.height=te(t,$)+Gt,o.padding=s.margin=s.top=s.left="0",Le(i),s.width=s.maxWidth=r.width,s.height=s.maxHeight=r.height,s.padding=r.padding,t.parentNode!==e&&(t.parentNode.insertBefore(e,t),e.appendChild(t)),t._gsap.swappedIn=!0}},De=/([A-Z])/g,Le=function(t){if(t){var e,r,i=t.t.style,n=t.length,A=0;for((t.t._gsap||H.core.getCache(t.t)).uncache=1;A<n;A+=2)r=t[A+1],e=t[A],r?i[e]=r:i[e]&&i.removeProperty(e.replace(De,"-$1").toLowerCase())}},ze=function(t){for(var e=Ie.length,r=t.style,i=[],n=0;n<e;n++)i.push(Ie[n],r[Ie[n]]);return i.t=t,i},Be={left:0,top:0},Re=function(t,e,r,i,n,A,o,s,a,l,c,d,u){zt(t)&&(t=t(s)),Lt(t)&&"max"===t.substr(0,3)&&(t=d+("="===t.charAt(4)?ce("0"+t.substr(3),r):0));var h,p,f,m=u?u.time():0;if(u&&u.seek(0),Bt(t))o&&ue(o,r,i,!0);else{zt(e)&&(e=e(s));var g,v,y,b,_=(t||"0").split(" ");f=I(e)||j,(g=Kt(f)||{})&&(g.left||g.top)||"none"!==Jt(f).display||(b=f.style.display,f.style.display="block",g=Kt(f),b?f.style.display=b:f.style.removeProperty("display")),v=ce(_[0],g[i.d]),y=ce(_[1]||"0",r),t=g[i.p]-a[i.p]-l+v+n-y,o&&ue(o,y,i,r-y<20||o._isStart&&y>20),r-=r-y}if(A){var w=t+r,x=A._isStart;h="scroll"+i.d2,ue(A,w,i,x&&w>20||!x&&(c?Math.max(j[h],q[h]):A.parentNode[h])<=w+1),c&&(a=Kt(o),c&&(A.style[i.op.p]=a[i.op.p]-i.op.m-A._offset+Gt))}return u&&f&&(h=Kt(f),u.seek(d),p=Kt(f),u._caScrollDist=h[i.p]-p[i.p],t=t/u._caScrollDist*d),u&&u.seek(m),u?t:Math.round(t)},Fe=/(webkit|moz|length|cssText|inset)/i,He=function(t,e,r,i){if(t.parentNode!==e){var n,A,o=t.style;if(e===j){for(n in t._stOrig=o.cssText,A=Jt(t))+n||Fe.test(n)||!A[n]||"string"!=typeof o[n]||"0"===n||(o[n]=A[n]);o.top=r,o.left=i}else o.cssText=t._stOrig;H.core.getCache(t).uncache=1,e.appendChild(t)}},Ve=function(t,e){var r,i,n=M(t,e),A="_scroll"+e.p2,o=function e(o,s,a,l,c){var d=e.tween,u=s.onComplete,h={};return a=a||n(),c=l&&c||0,l=l||o-a,d&&d.kill(),r=Math.round(a),s[A]=o,s.modifiers=h,h[A]=function(t){return(t=Math.round(n()))!==r&&t!==i&&Math.abs(t-r)>3&&Math.abs(t-i)>3?(d.kill(),e.tween=0):t=a+l*d.ratio+c*d.ratio*d.ratio,i=r,r=Math.round(t)},s.onUpdate=function(){_.cache++,Ne()},s.onComplete=function(){e.tween=0,u&&u.call(d)},d=e.tween=H.to(t,s)};return t[A]=n,n.wheelHandler=function(){return o.tween&&o.tween.kill()&&(o.tween=0)},ne(t,"wheel",n.wheelHandler),o},Ue=function(){function t(e,r){V||t.register(H)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),this.init(e,r)}return t.prototype.init=function(e,r){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),St){var i,n,A,o,s,a,l,c,d,u,h,p,f,m,g,v,y,b,x,k,C,E,P,T,O,D,L,z,B,R,F,V,Q,W,X,et,it,nt,At,at,lt,ct,dt=e=Xt(Lt(e)||Bt(e)||e.nodeType?{trigger:e}:e,ae),ut=dt.onUpdate,ht=dt.toggleClass,ft=dt.id,gt=dt.onToggle,xt=dt.onRefresh,Ct=dt.scrub,Et=dt.trigger,Ot=dt.pin,Nt=dt.pinSpacing,Dt=dt.invalidateOnRefresh,Ut=dt.anticipatePin,Yt=dt.onScrubComplete,qt=dt.onSnapComplete,jt=dt.once,ie=dt.snap,oe=dt.pinReparent,le=dt.pinSpacer,ue=dt.containerAnimation,fe=dt.fastScrollEnd,ge=dt.preventOverlaps,ye=e.horizontal||e.containerAnimation&&!1!==e.horizontal?N:$,be=!Ct&&0!==Ct,we=I(e.scroller||U),xe=H.core.getCache(we),ke=$t(we),Se="fixed"===("pinType"in e?e.pinType:S(we,"pinType")||ke&&"fixed"),Ce=[e.onEnter,e.onLeave,e.onEnterBack,e.onLeaveBack],Te=be&&e.toggleActions.split(" "),Ne="markers"in e?e.markers:ae.markers,$e=ke?0:parseFloat(Jt(we)["border"+ye.p2+Zt])||0,Ie=this,De=e.onRefreshInit&&function(){return e.onRefreshInit(Ie)},Fe=function(t,e,r){var i=r.d,n=r.d2,A=r.a;return(A=S(t,"getBoundingClientRect"))?function(){return A()[i]}:function(){return(e?U["inner"+n]:t["client"+n])||0}}(we,ke,ye),Ue=function(t,e){return!e||~w.indexOf(t)?It(t):function(){return Be}}(we,ke),Ye=0,qe=0,je=M(we,ye);if(pt(Ie),Ie._dir=ye,Ut*=45,Ie.scroller=we,Ie.scroll=ue?ue.time.bind(ue):je,o=je(),Ie.vars=e,r=r||e.animation,"refreshPriority"in e&&(ot=1,-9999===e.refreshPriority&&(bt=Ie)),xe.tweenScroll=xe.tweenScroll||{top:Ve(we,$),left:Ve(we,N)},Ie.tweenTo=i=xe.tweenScroll[ye.p],Ie.scrubDuration=function(t){(V=Bt(t)&&t)?F?F.duration(t):F=H.to(r,{ease:"expo",totalProgress:"+=0.001",duration:V,paused:!0,onComplete:function(){return Yt&&Yt(Ie)}}):(F&&F.progress(1).kill(),F=0)},r&&(r.vars.lazy=!1,r._initted||!1!==r.vars.immediateRender&&!1!==e.immediateRender&&r.duration()&&r.render(0,!0,!0),Ie.animation=r.pause(),r.scrollTrigger=Ie,Ie.scrubDuration(Ct),B=0,ft||(ft=r.vars.id)),he.push(Ie),ie&&(Rt(ie)&&!ie.push||(ie={snapTo:ie}),"scrollBehavior"in j.style&&H.set(ke?[j,q]:we,{scrollBehavior:"auto"}),_.forEach((function(t){return zt(t)&&t.target===(ke?Y.scrollingElement||q:we)&&(t.smooth=!1)})),A=zt(ie.snapTo)?ie.snapTo:"labels"===ie.snapTo?function(t){return function(e){return H.utils.snap(ee(t),e)}}(r):"labelsDirectional"===ie.snapTo?(at=r,function(t,e){return re(ee(at))(t,e.direction)}):!1!==ie.directional?function(t,e){return re(ie.snapTo)(t,wt()-qe<500?0:e.direction)}:H.utils.snap(ie.snapTo),Q=ie.duration||{min:.1,max:2},Q=Rt(Q)?G(Q.min,Q.max):G(Q,Q),W=H.delayedCall(ie.delay||V/2||.1,(function(){var t=je(),e=wt()-qe<500,n=i.tween;if(!(e||Math.abs(Ie.getVelocity())<10)||n||tt||Ye===t)Ie.isActive&&Ye!==t&&W.restart(!0);else{var o=(t-a)/f,s=r&&!be?r.totalProgress():o,c=e?0:(s-R)/(wt()-J)*1e3||0,d=H.utils.clamp(-o,1-o,Vt(c/2)*c/.185),u=o+(!1===ie.inertia?0:d),h=G(0,1,A(u,Ie)),p=Math.round(a+h*f),m=ie,g=m.onStart,v=m.onInterrupt,y=m.onComplete;if(t<=l&&t>=a&&p!==t){if(n&&!n._initted&&n.data<=Vt(p-t))return;!1===ie.inertia&&(d=h-o),i(p,{duration:Q(Vt(.185*Math.max(Vt(u-s),Vt(h-s))/c/.05||0)),ease:ie.ease||"power3",data:Vt(p-t),onInterrupt:function(){return W.restart(!0)&&v&&v(Ie)},onComplete:function(){Ie.update(),Ye=je(),B=R=r&&!be?r.totalProgress():Ie.progress,qt&&qt(Ie),y&&y(Ie)}},t,d*f,p-t-d*f),g&&g(Ie,i.tween)}}})).pause()),ft&&(pe[ft]=Ie),(At=(Et=Ie.trigger=I(Et||Ot))&&Et._gsap&&Et._gsap.stRevert)&&(At=At(Ie)),Ot=!0===Ot?Et:I(Ot),Lt(ht)&&(ht={targets:Et,className:ht}),Ot&&(!1===Nt||Nt===Wt||(Nt=!(!Nt&&Ot.parentNode&&Ot.parentNode.style&&"flex"===Jt(Ot.parentNode).display)&&Qt),Ie.pin=Ot,(n=H.core.getCache(Ot)).spacer?m=n.pinState:(le&&((le=I(le))&&!le.nodeType&&(le=le.current||le.nativeElement),n.spacerIsNative=!!le,le&&(n.spacerState=ze(le))),n.spacer=y=le||Y.createElement("div"),y.classList.add("pin-spacer"),ft&&y.classList.add("pin-spacer-"+ft),n.pinState=m=ze(Ot)),!1!==e.force3D&&H.set(Ot,{force3D:!0}),Ie.spacer=y=n.spacer,z=Jt(Ot),P=z[Nt+ye.os2],x=H.getProperty(Ot),k=H.quickSetter(Ot,ye.a,Gt),Me(Ot,y,z),v=ze(Ot)),Ne){p=Rt(Ne)?Xt(Ne,se):se,u=de("scroller-start",ft,we,ye,p,0),h=de("scroller-end",ft,we,ye,p,0,u),b=u["offset"+ye.op.d2];var Qe=I(S(we,"content")||we);c=this.markerStart=de("start",ft,Qe,ye,p,b,0,ue),d=this.markerEnd=de("end",ft,Qe,ye,p,b,0,ue),ue&&(nt=H.quickSetter([c,d],ye.a,Gt)),Se||w.length&&!0===S(we,"fixedMarkers")||(ct=Jt(lt=ke?j:we).position,lt.style.position="absolute"===ct||"fixed"===ct?ct:"relative",H.set([u,h],{force3D:!0}),O=H.quickSetter(u,ye.a,Gt),L=H.quickSetter(h,ye.a,Gt))}if(ue){var We=ue.vars.onUpdate,Ze=ue.vars.onUpdateParams;ue.eventCallback("onUpdate",(function(){Ie.update(0,0,1),We&&We.apply(Ze||[])}))}Ie.previous=function(){return he[he.indexOf(Ie)-1]},Ie.next=function(){return he[he.indexOf(Ie)+1]},Ie.revert=function(t,e){if(!e)return Ie.kill(!0);var i=!1!==t||!Ie.enabled,n=K;i!==Ie.isReverted&&(i&&(et=Math.max(je(),Ie.scroll.rec||0),X=Ie.progress,it=r&&r.progress()),c&&[c,d,u,h].forEach((function(t){return t.style.display=i?"none":"block"})),i&&(K=1,Ie.update(i)),!Ot||oe&&Ie.isActive||(i?function(t,e,r){Le(r);var i=t._gsap;if(i.spacerIsNative)Le(i.spacerState);else if(t._gsap.swappedIn){var n=e.parentNode;n&&(n.insertBefore(t,e),n.removeChild(e))}t._gsap.swappedIn=!1}(Ot,y,m):Me(Ot,y,Jt(Ot),T)),i||Ie.update(i),K=n,Ie.isReverted=i)},Ie.refresh=function(n,A){if(!K&&Ie.enabled||A)if(Ot&&n&&kt)ne(t,"scrollEnd",_e);else{!vt&&De&&De(Ie),K=1,qe=wt(),i.tween&&(i.tween.kill(),i.tween=0),F&&F.pause(),Dt&&r&&r.revert({kill:!1}).invalidate(),Ie.isReverted||Ie.revert(!0,!0),Ie._subPinOffset=!1;for(var p,b,_,w,k,S,P,O,L,z,B,R=Fe(),V=Ue(),U=ue?ue.duration():Mt(we,ye),Q=0,Z=0,G=e.end,J=e.endTrigger||Et,tt=e.start||(0!==e.start&&Et?Ot?"0 0":"0 100%":0),rt=Ie.pinnedContainer=e.pinnedContainer&&I(e.pinnedContainer),nt=Et&&Math.max(0,he.indexOf(Ie))||0,At=nt;At--;)(S=he[At]).end||S.refresh(0,1)||(K=1),!(P=S.pin)||P!==Et&&P!==Ot||S.isReverted||(z||(z=[]),z.unshift(S),S.revert(!0,!0)),S!==he[At]&&(nt--,At--);for(zt(tt)&&(tt=tt(Ie)),a=Re(tt,Et,R,ye,je(),c,u,Ie,V,$e,Se,U,ue)||(Ot?-.001:0),zt(G)&&(G=G(Ie)),Lt(G)&&!G.indexOf("+=")&&(~G.indexOf(" ")?G=(Lt(tt)?tt.split(" ")[0]:"")+G:(Q=ce(G.substr(2),R),G=Lt(tt)?tt:a+Q,J=Et)),l=Math.max(a,Re(G||(J?"100% 0":U),J,R,ye,je()+Q,d,h,Ie,V,$e,Se,U,ue))||-.001,f=l-a||(a-=.01)&&.001,Q=0,At=nt;At--;)(P=(S=he[At]).pin)&&S.start-S._pinPush<=a&&!ue&&S.end>0&&(p=S.end-S.start,(P===Et&&S.start-S._pinPush<a||P===rt)&&!Bt(tt)&&(Q+=p*(1-S.progress)),P===Ot&&(Z+=p));if(a+=Q,l+=Q,Ie._pinPush=Z,c&&Q&&((p={})[ye.a]="+="+Q,rt&&(p[ye.p]="-="+je()),H.set([c,d],p)),Ot)p=Jt(Ot),w=ye===$,_=je(),C=parseFloat(x(ye.a))+Z,!U&&l>1&&((B={style:B=(ke?Y.scrollingElement||q:we).style,value:B["overflow"+ye.a.toUpperCase()]})["overflow"+ye.a.toUpperCase()]="scroll"),Me(Ot,y,p),v=ze(Ot),b=Kt(Ot,!0),O=Se&&M(we,w?N:$)(),Nt&&((T=[Nt+ye.os2,f+Z+Gt]).t=y,(At=Nt===Qt?te(Ot,ye)+f+Z:0)&&T.push(ye.d,At+Gt),Le(T),rt&&he.forEach((function(t){t.pin===rt&&!1!==t.vars.pinSpacing&&(t._subPinOffset=!0)})),Se&&je(et)),Se&&((k={top:b.top+(w?_-a:O)+Gt,left:b.left+(w?O:_-a)+Gt,boxSizing:"border-box",position:"fixed"}).width=k.maxWidth=Math.ceil(b.width)+Gt,k.height=k.maxHeight=Math.ceil(b.height)+Gt,k.margin=k.marginTop=k.marginRight=k.marginBottom=k.marginLeft="0",k.padding=p.padding,k.paddingTop=p.paddingTop,k.paddingRight=p.paddingRight,k.paddingBottom=p.paddingBottom,k.paddingLeft=p.paddingLeft,g=function(t,e,r){for(var i,n=[],A=t.length,o=r?8:0;o<A;o+=2)i=t[o],n.push(i,i in e?e[i]:t[o+1]);return n.t=t.t,n}(m,k,oe),vt&&je(0)),r?(L=r._initted,st(1),r.render(r.duration(),!0,!0),E=x(ye.a)-C+f+Z,D=Math.abs(f-E)>1,Se&&D&&g.splice(g.length-2,2),r.render(0,!0,!0),L||r.invalidate(!0),r.parent||r.totalTime(r.totalTime()),st(0)):E=f,B&&(B.value?B.style["overflow"+ye.a.toUpperCase()]=B.value:B.style.removeProperty("overflow-"+ye.a));else if(Et&&je()&&!ue)for(b=Et.parentNode;b&&b!==j;)b._pinOffset&&(a-=b._pinOffset,l-=b._pinOffset),b=b.parentNode;z&&z.forEach((function(t){return t.revert(!1,!0)})),Ie.start=a,Ie.end=l,o=s=vt?et:je(),ue||vt||(o<et&&je(et),Ie.scroll.rec=0),Ie.revert(!1,!0),W&&(Ye=-1,Ie.isActive&&je(a+f*X),W.restart(!0)),K=0,r&&be&&(r._initted||it)&&r.progress()!==it&&r.progress(it,!0).render(r.time(),!0,!0),(X!==Ie.progress||ue)&&(r&&!be&&r.totalProgress(X,!0),Ie.progress=(o-a)/f===X?0:X),Ot&&Nt&&(y._pinOffset=Math.round(Ie.progress*E)),xt&&!vt&&xt(Ie)}},Ie.getVelocity=function(){return(je()-s)/(wt()-J)*1e3||0},Ie.endAnimation=function(){Ft(Ie.callbackAnimation),r&&(F?F.progress(1):r.paused()?be||Ft(r,Ie.direction<0,1):Ft(r,r.reversed()))},Ie.labelToScroll=function(t){return r&&r.labels&&(a||Ie.refresh()||a)+r.labels[t]/r.duration()*f||0},Ie.getTrailing=function(t){var e=he.indexOf(Ie),r=Ie.direction>0?he.slice(0,e).reverse():he.slice(e+1);return(Lt(t)?r.filter((function(e){return e.vars.preventOverlaps===t})):r).filter((function(t){return Ie.direction>0?t.end<=a:t.start>=l}))},Ie.update=function(t,e,n){if(!ue||n||t){var A,c,d,h,p,m,b,_=vt?et:Ie.scroll(),w=t?0:(_-a)/f,x=w<0?0:w>1?1:w||0,S=Ie.progress;if(e&&(s=o,o=ue?je():_,ie&&(R=B,B=r&&!be?r.totalProgress():x)),Ut&&!x&&Ot&&!K&&!_t&&kt&&a<_+(_-s)/(wt()-J)*Ut&&(x=1e-4),x!==S&&Ie.enabled){if(h=(p=(A=Ie.isActive=!!x&&x<1)!=(!!S&&S<1))||!!x!=!!S,Ie.direction=x>S?1:-1,Ie.progress=x,h&&!K&&(c=x&&!S?0:1===x?1:1===S?2:3,be&&(d=!p&&"none"!==Te[c+1]&&Te[c+1]||Te[c],b=r&&("complete"===d||"reset"===d||d in r))),ge&&(p||b)&&(b||Ct||!r)&&(zt(ge)?ge(Ie):Ie.getTrailing(ge).forEach((function(t){return t.endAnimation()}))),be||(!F||K||_t?r&&r.totalProgress(x,!!K):(F._dp._time-F._start!==F._time&&F.render(F._dp._time-F._start),F.resetTo?F.resetTo("totalProgress",x,r._tTime/r._tDur):(F.vars.totalProgress=x,F.invalidate().restart()))),Ot)if(t&&Nt&&(y.style[Nt+ye.os2]=P),Se){if(h){if(m=!t&&x>S&&l+1>_&&_+1>=Mt(we,ye),oe)if(t||!A&&!m)He(Ot,y);else{var T=Kt(Ot,!0),N=_-a;He(Ot,j,T.top+(ye===$?N:0)+Gt,T.left+(ye===$?0:N)+Gt)}Le(A||m?g:v),D&&x<1&&A||k(C+(1!==x||m?0:E))}}else k(Tt(C+E*x));ie&&!i.tween&&!K&&!_t&&W.restart(!0),ht&&(p||jt&&x&&(x<1||!mt))&&Z(ht.targets).forEach((function(t){return t.classList[A||jt?"add":"remove"](ht.className)})),ut&&!be&&!t&&ut(Ie),h&&!K?(be&&(b&&("complete"===d?r.pause().totalProgress(1):"reset"===d?r.restart(!0).pause():"restart"===d?r.restart(!0):r[d]()),ut&&ut(Ie)),!p&&mt||(gt&&p&&Ht(Ie,gt),Ce[c]&&Ht(Ie,Ce[c]),jt&&(1===x?Ie.kill(!1,1):Ce[c]=0),p||Ce[c=1===x?1:3]&&Ht(Ie,Ce[c])),fe&&!A&&Math.abs(Ie.getVelocity())>(Bt(fe)?fe:2500)&&(Ft(Ie.callbackAnimation),F?F.progress(1):Ft(r,"reverse"===d?1:!x,1))):be&&ut&&!K&&ut(Ie)}if(L){var I=ue?_/ue.duration()*(ue._caScrollDist||0):_;O(I+(u._isFlipped?1:0)),L(I)}nt&&nt(-_/ue.duration()*(ue._caScrollDist||0))}},Ie.enable=function(e,r){Ie.enabled||(Ie.enabled=!0,ne(we,"resize",ve),ne(ke?Y:we,"scroll",me),De&&ne(t,"refreshInit",De),!1!==e&&(Ie.progress=X=0,o=s=Ye=je()),!1!==r&&Ie.refresh())},Ie.getTween=function(t){return t&&i?i.tween:F},Ie.setPositions=function(t,e){Ot&&(C+=t-a,E+=e-t-f,Nt===Qt&&Ie.adjustPinSpacing(e-t-f)),Ie.start=a=t,Ie.end=l=e,f=e-t,Ie.update()},Ie.adjustPinSpacing=function(t){if(T){var e=T.indexOf(ye.d)+1;T[e]=parseFloat(T[e])+t+Gt,T[1]=parseFloat(T[1])+t+Gt,Le(T)}},Ie.disable=function(e,r){if(Ie.enabled&&(!1!==e&&Ie.revert(!0,!0),Ie.enabled=Ie.isActive=!1,r||F&&F.pause(),et=0,n&&(n.uncache=1),De&&Ae(t,"refreshInit",De),W&&(W.pause(),i.tween&&i.tween.kill()&&(i.tween=0)),!ke)){for(var A=he.length;A--;)if(he[A].scroller===we&&he[A]!==Ie)return;Ae(we,"resize",ve),Ae(we,"scroll",me)}},Ie.kill=function(t,i){Ie.disable(t,i),F&&!i&&F.kill(),ft&&delete pe[ft];var A=he.indexOf(Ie);A>=0&&he.splice(A,1),A===rt&&Oe>0&&rt--,A=0,he.forEach((function(t){return t.scroller===Ie.scroller&&(A=1)})),A||vt||(Ie.scroll.rec=0),r&&(r.scrollTrigger=null,t&&r.revert({kill:!1}),i||r.kill()),c&&[c,d,u,h].forEach((function(t){return t.parentNode&&t.parentNode.removeChild(t)})),bt===Ie&&(bt=0),Ot&&(n&&(n.uncache=1),A=0,he.forEach((function(t){return t.pin===Ot&&A++})),A||(n.spacer=0)),e.onKill&&e.onKill(Ie)},Ie.enable(!1,!1),At&&At(Ie),r&&r.add&&!f?H.delayedCall(.01,(function(){return a||l||Ie.refresh()}))&&(f=.01)&&(a=l=0):Ie.refresh(),Ot&&function(){if(yt!==Ee){var t=yt=Ee;requestAnimationFrame((function(){return t===Ee&&Pe(!0)}))}}()}else this.update=this.refresh=this.kill=Pt},t.register=function(e){return V||(H=e||Nt(),Ot()&&window.document&&t.enable(),V=St),V},t.defaults=function(t){if(t)for(var e in t)ae[e]=t[e];return ae},t.disable=function(t,e){St=0,he.forEach((function(r){return r[e?"kill":"disable"](t)})),Ae(U,"wheel",me),Ae(Y,"scroll",me),clearInterval(X),Ae(Y,"touchcancel",Pt),Ae(j,"touchstart",Pt),ie(Ae,Y,"pointerdown,touchstart,mousedown",Ct),ie(Ae,Y,"pointerup,touchend,mouseup",Et),W.kill(),Dt(Ae);for(var r=0;r<_.length;r+=3)oe(Ae,_[r],_[r+1]),oe(Ae,_[r],_[r+2])},t.enable=function(){if(U=window,Y=document,q=Y.documentElement,j=Y.body,H&&(Z=H.utils.toArray,G=H.utils.clamp,pt=H.core.context||Pt,st=H.core.suppressOverwrites||Pt,ft=U.history.scrollRestoration||"auto",H.core.globals("ScrollTrigger",t),j)){St=1,F.register(H),t.isTouch=F.isTouch,ht=F.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),ne(U,"wheel",me),Q=[U,Y,q,j],H.matchMedia?(t.matchMedia=function(t){var e,r=H.matchMedia();for(e in t)r.add(e,t[e]);return r},H.addEventListener("matchMediaInit",(function(){return Se()})),H.addEventListener("matchMediaRevert",(function(){return ke()})),H.addEventListener("matchMedia",(function(){Pe(0,1),we("matchMedia")})),H.matchMedia("(orientation: portrait)",(function(){return ge(),ge}))):console.warn("Requires GSAP 3.11.0 or later"),ge(),ne(Y,"scroll",me);var e,r,i=j.style,n=i.borderTopStyle,A=H.core.Animation.prototype;for(A.revert||Object.defineProperty(A,"revert",{value:function(){return this.time(-.01,!0)}}),i.borderTopStyle="solid",e=Kt(j),$.m=Math.round(e.top+$.sc())||0,N.m=Math.round(e.left+N.sc())||0,n?i.borderTopStyle=n:i.removeProperty("border-top-style"),X=setInterval(fe,250),H.delayedCall(.5,(function(){return _t=0})),ne(Y,"touchcancel",Pt),ne(j,"touchstart",Pt),ie(ne,Y,"pointerdown,touchstart,mousedown",Ct),ie(ne,Y,"pointerup,touchend,mouseup",Et),et=H.utils.checkPrefix("transform"),Ie.push(et),V=wt(),W=H.delayedCall(.2,Pe).pause(),At=[Y,"visibilitychange",function(){var t=U.innerWidth,e=U.innerHeight;Y.hidden?(it=t,nt=e):it===t&&nt===e||ve()},Y,"DOMContentLoaded",Pe,U,"load",Pe,U,"resize",ve],Dt(ne),he.forEach((function(t){return t.enable(0,1)})),r=0;r<_.length;r+=3)oe(Ae,_[r],_[r+1]),oe(Ae,_[r],_[r+2])}},t.config=function(e){"limitCallbacks"in e&&(mt=!!e.limitCallbacks);var r=e.syncInterval;r&&clearInterval(X)||(X=r)&&setInterval(fe,r),"ignoreMobileResize"in e&&(ct=1===t.isTouch&&e.ignoreMobileResize),"autoRefreshEvents"in e&&(Dt(Ae)||Dt(ne,e.autoRefreshEvents||"none"),at=-1===(e.autoRefreshEvents+"").indexOf("resize"))},t.scrollerProxy=function(t,e){var r=I(t),i=_.indexOf(r),n=$t(r);~i&&_.splice(i,n?6:2),e&&(n?w.unshift(U,e,j,e,q,e):w.unshift(r,e))},t.clearMatchMedia=function(t){he.forEach((function(e){return e._ctx&&e._ctx.query===t&&e._ctx.kill(!0,!0)}))},t.isInViewport=function(t,e,r){var i=(Lt(t)?I(t):t).getBoundingClientRect(),n=i[r?qt:jt]*e||0;return r?i.right-n>0&&i.left+n<U.innerWidth:i.bottom-n>0&&i.top+n<U.innerHeight},t.positionInViewport=function(t,e,r){Lt(t)&&(t=I(t));var i=t.getBoundingClientRect(),n=i[r?qt:jt],A=null==e?n/2:e in le?le[e]*n:~e.indexOf("%")?parseFloat(e)*n/100:parseFloat(e)||0;return r?(i.left+A)/U.innerWidth:(i.top+A)/U.innerHeight},t.killAll=function(t){if(he.slice(0).forEach((function(t){return"ScrollSmoother"!==t.vars.id&&t.kill()})),!0!==t){var e=ye.killAll||[];ye={},e.forEach((function(t){return t()}))}},t}();Ue.version="3.11.4",Ue.saveStyles=function(t){return t?Z(t).forEach((function(t){if(t&&t.style){var e=xe.indexOf(t);e>=0&&xe.splice(e,5),xe.push(t,t.style.cssText,t.getBBox&&t.getAttribute("transform"),H.core.getCache(t),pt())}})):xe},Ue.revert=function(t,e){return Se(!t,e)},Ue.create=function(t,e){return new Ue(t,e)},Ue.refresh=function(t){return t?ve():(V||Ue.register())&&Pe(!0)},Ue.update=function(t){return++_.cache&&Ne(!0===t?2:0)},Ue.clearScrollMemory=Ce,Ue.maxScroll=function(t,e){return Mt(t,e?N:$)},Ue.getScrollFunc=function(t,e){return M(I(t),e?N:$)},Ue.getById=function(t){return pe[t]},Ue.getAll=function(){return he.filter((function(t){return"ScrollSmoother"!==t.vars.id}))},Ue.isScrolling=function(){return!!kt},Ue.snapDirectional=re,Ue.addEventListener=function(t,e){var r=ye[t]||(ye[t]=[]);~r.indexOf(e)||r.push(e)},Ue.removeEventListener=function(t,e){var r=ye[t],i=r&&r.indexOf(e);i>=0&&r.splice(i,1)},Ue.batch=function(t,e){var r,i=[],n={},A=e.interval||.016,o=e.batchMax||1e9,s=function(t,e){var r=[],i=[],n=H.delayedCall(A,(function(){e(r,i),r=[],i=[]})).pause();return function(t){r.length||n.restart(!0),r.push(t.trigger),i.push(t),o<=r.length&&n.progress(1)}};for(r in e)n[r]="on"===r.substr(0,2)&&zt(e[r])&&"onRefreshInit"!==r?s(0,e[r]):e[r];return zt(o)&&(o=o(),ne(Ue,"refresh",(function(){return o=e.batchMax()}))),Z(t).forEach((function(t){var e={};for(r in n)e[r]=n[r];e.trigger=t,i.push(Ue.create(e))})),i};var Ye,qe=function(t,e,r,i){return e>i?t(i):e<0&&t(0),r>i?(i-e)/(r-e):r<0?e/(e-r):1},je=function t(e,r){!0===r?e.style.removeProperty("touch-action"):e.style.touchAction=!0===r?"auto":r?"pan-"+r+(F.isTouch?" pinch-zoom":""):"none",e===q&&t(j,r)},Qe={auto:1,scroll:1},We=function(t){var e,r=t.event,i=t.target,n=t.axis,A=(r.changedTouches?r.changedTouches[0]:r).target,o=A._gsap||H.core.getCache(A),s=wt();if(!o._isScrollT||s-o._isScrollT>2e3){for(;A&&A!==j&&(A.scrollHeight<=A.clientHeight&&A.scrollWidth<=A.clientWidth||!Qe[(e=Jt(A)).overflowY]&&!Qe[e.overflowX]);)A=A.parentNode;o._isScroll=A&&A!==i&&!$t(A)&&(Qe[(e=Jt(A)).overflowY]||Qe[e.overflowX]),o._isScrollT=s}(o._isScroll||"x"===n)&&(r.stopPropagation(),r._gsapAllow=!0)},Ze=function(t,e,r,i){return F.create({target:t,capture:!0,debounce:!1,lockAxis:!0,type:e,onWheel:i=i&&We,onPress:i,onDrag:i,onScroll:i,onEnable:function(){return r&&ne(Y,F.eventTypes[0],Je,!1,!0)},onDisable:function(){return Ae(Y,F.eventTypes[0],Je,!0)}})},Ge=/(input|label|select|textarea)/i,Je=function(t){var e=Ge.test(t.target.tagName);(e||Ye)&&(t._gsapAllow=!0,Ye=e)};function Xe(){var t=[].slice.call(document.querySelectorAll("[data-srcset]:not(.loaded)"));t&&t.forEach((function(t){new i(t.parentElement.querySelector("img"),(function(){t.addEventListener("load",(function(){return t.classList.add("loaded")}),!1),t.srcset=t.dataset.srcset,Ue.refresh()}))}));var e=[].slice.call(document.querySelectorAll("img[data-src]:not(.loaded)"));e&&e.forEach((function(t){new i(t,(function(){t.addEventListener("load",(function(){return t.classList.add("loaded")}),!1),t.src=t.dataset.src,Ue.refresh()}))}));var r=[].slice.call(document.querySelectorAll("video:not(.loaded) source[data-src]"));r&&r.forEach((function(t){new i(t.parentElement,(function(){t.addEventListener("load",(function(){t.parentElement.classList.add("loaded")}),!1),t.src=t.dataset.src,t.parentElement.load(),Ue.refresh()}))}));var n=[].slice.call(document.querySelectorAll("link.preload-css:not(.loaded)"));n&&n.forEach((function(t){requestAnimationFrame((function(){t.rel="stylesheet",t.classList.add("loaded"),Ue.refresh()}))}))}Ue.sort=function(t){return he.sort(t||function(t,e){return-1e6*(t.vars.refreshPriority||0)+t.start-(e.start+-1e6*(e.vars.refreshPriority||0))})},Ue.observe=function(t){return new F(t)},Ue.normalizeScroll=function(t){if(void 0===t)return lt;if(!0===t&<)return lt.enable();if(!1===t)return lt&<.kill();var e=t instanceof F?t:function(t){Rt(t)||(t={}),t.preventDefault=t.isNormalizer=t.allowClicks=!0,t.type||(t.type="wheel,touch"),t.debounce=!!t.debounce,t.id=t.id||"normalizer";var e,r,i,n,A,o,s,a,l=t,c=l.normalizeScrollX,d=l.momentum,u=l.allowNestedScroll,h=I(t.target)||q,p=H.core.globals().ScrollSmoother,f=p&&p.get(),m=ht&&(t.content&&I(t.content)||f&&!1!==t.content&&!f.smooth()&&f.content()),g=M(h,$),v=M(h,N),y=1,b=(F.isTouch&&U.visualViewport?U.visualViewport.scale*U.visualViewport.width:U.outerWidth)/U.innerWidth,w=0,x=zt(d)?function(){return d(e)}:function(){return d||2.8},k=Ze(h,t.type,!0,u),S=function(){return n=!1},C=Pt,E=Pt,P=function(){r=Mt(h,$),E=G(ht?1:0,r),c&&(C=G(0,Mt(h,N))),i=Ee},T=function(){m._gsap.y=Tt(parseFloat(m._gsap.y)+g.offset)+"px",m.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(m._gsap.y)+", 0, 1)",g.offset=g.cacheID=0},O=function(){P(),A.isActive()&&A.vars.scrollY>r&&(g()>r?A.progress(1)&&g(r):A.resetTo("scrollY",r))};return m&&H.set(m,{y:"+=0"}),t.ignoreCheck=function(t){return ht&&"touchmove"===t.type&&function(){if(n){requestAnimationFrame(S);var t=Tt(e.deltaY/2),r=E(g.v-t);if(m&&r!==g.v+g.offset){g.offset=r-g.v;var i=Tt((parseFloat(m&&m._gsap.y)||0)-g.offset);m.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+i+", 0, 1)",m._gsap.y=i+"px",g.cacheID=_.cache,Ne()}return!0}g.offset&&T(),n=!0}()||y>1.05&&"touchstart"!==t.type||e.isGesturing||t.touches&&t.touches.length>1},t.onPress=function(){var t=y;y=Tt((U.visualViewport&&U.visualViewport.scale||1)/b),A.pause(),t!==y&&je(h,y>1.01||!c&&"x"),o=v(),s=g(),P(),i=Ee},t.onRelease=t.onGestureStart=function(t,e){if(g.offset&&T(),e){_.cache++;var i,n,o=x();c&&(n=(i=v())+.05*o*-t.velocityX/.227,o*=qe(v,i,n,Mt(h,N)),A.vars.scrollX=C(n)),n=(i=g())+.05*o*-t.velocityY/.227,o*=qe(g,i,n,Mt(h,$)),A.vars.scrollY=E(n),A.invalidate().duration(o).play(.01),(ht&&A.vars.scrollY>=r||i>=r-1)&&H.to({},{onUpdate:O,duration:o})}else a.restart(!0)},t.onWheel=function(){A._ts&&A.pause(),wt()-w>1e3&&(i=0,w=wt())},t.onChange=function(t,e,r,n,A){if(Ee!==i&&P(),e&&c&&v(C(n[2]===e?o+(t.startX-t.x):v()+e-n[1])),r){g.offset&&T();var a=A[2]===r,l=a?s+t.startY-t.y:g()+r-A[1],d=E(l);a&&l!==d&&(s+=d-l),g(d)}(r||e)&&Ne()},t.onEnable=function(){je(h,!c&&"x"),Ue.addEventListener("refresh",O),ne(U,"resize",O),g.smooth&&(g.target.style.scrollBehavior="auto",g.smooth=v.smooth=!1),k.enable()},t.onDisable=function(){je(h,!0),Ae(U,"resize",O),Ue.removeEventListener("refresh",O),k.kill()},t.lockAxis=!1!==t.lockAxis,(e=new F(t)).iOS=ht,ht&&!g()&&g(1),ht&&H.ticker.add(Pt),a=e._dc,A=H.to(e,{ease:"power4",paused:!0,scrollX:c?"+=0.1":"+=0",scrollY:"+=0.1",onComplete:a.vars.onComplete}),e}(t);return lt&<.target===e.target&<.kill(),$t(e.target)&&(lt=e),e},Ue.core={_getVelocityProp:D,_inputObserver:Ze,_scrollers:_,_proxies:w,bridge:{ss:function(){kt||we("scrollStart"),kt=wt()},ref:function(){return K}}},Nt()&&H.registerPlugin(Ue),window.addEventListener("load",Xe,!1),"complete"==document.readyState||"interactive"==document.readyState?Xe():document.addEventListener("DOMContentLoaded",Xe,!1),window.loadImages=function(){return Xe()}})()})(); </script> <script id="https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/dist/js/deferred.js-js-after"> /*! For license information please see deferred.js.LICENSE.txt */ (()=>{var e={3748:(e,t,n)=>{"use strict";n.d(t,{iA:()=>h,mI:()=>d});var r=n(7462),i=n(9477),a=n(7294),s=n(8715),o=n(9137),l=n(8198);const u=a.createContext(null),c=(0,o.g)({color:new i.Color,blend:2,alphaTest:.75,opacity:0,map:null},"varying vec2 vUv;\n void main() {\n gl_Position = projectionMatrix * viewMatrix * modelMatrix * vec4(position, 1.);\n vUv = uv;\n }","varying vec2 vUv;\n uniform sampler2D map;\n uniform vec3 color;\n uniform float opacity;\n uniform float alphaTest;\n uniform float blend;\n void main() {\n vec4 sampledDiffuseColor = texture2D(map, vUv);\n gl_FragColor = vec4(color * sampledDiffuseColor.r * blend, max(0.0, (1.0 - (sampledDiffuseColor.r + sampledDiffuseColor.g + sampledDiffuseColor.b) / alphaTest)) * opacity);\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n }"),h=a.forwardRef((({children:e,temporal:t,frames:n=40,limit:r=1/0,blend:i=20,scale:o=10,opacity:l=1,alphaTest:h=.75,color:d="black",colorBlend:p=2,resolution:m=1024,toneMapped:g=!0,...v},y)=>{(0,s.e)({SoftShadowMaterial:c});const x=(0,s.z)((e=>e.gl)),b=(0,s.z)((e=>e.scene)),_=(0,s.z)((e=>e.camera)),w=(0,s.z)((e=>e.invalidate)),M=a.useRef(null),S=a.useRef(null),[A]=a.useState((()=>new f(x,b,m)));a.useLayoutEffect((()=>{A.configure(M.current)}),[]);const C=a.useMemo((()=>({lights:new Map,temporal:!!t,frames:Math.max(2,n),blend:Math.max(2,n===1/0?i:n),count:0,getMesh:()=>M.current,reset:()=>{A.clear();const e=M.current.material;e.opacity=0,e.alphaTest=0,C.count=0},update:(e=1)=>{const t=M.current.material;C.temporal?(t.opacity=Math.min(l,t.opacity+l/C.blend),t.alphaTest=Math.min(h,t.alphaTest+h/C.blend)):(t.opacity=l,t.alphaTest=h),S.current.visible=!0,A.prepare();for(let t=0;t<e;t++)C.lights.forEach((e=>e.update())),A.update(_,C.blend);S.current.visible=!1,A.finish()}})),[A,_,b,t,n,i,l,h]);return a.useLayoutEffect((()=>{C.reset(),C.temporal||C.frames===1/0||C.update(C.blend)})),a.useImperativeHandle(y,(()=>C),[C]),(0,s.A)((()=>{(C.temporal||C.frames===1/0)&&C.count<C.frames&&C.count<r&&(w(),C.update(),C.count++)})),a.createElement("group",v,a.createElement("group",{traverse:()=>null,ref:S},a.createElement(u.Provider,{value:C},e)),a.createElement("mesh",{receiveShadow:!0,ref:M,scale:o,rotation:[-Math.PI/2,0,0]},a.createElement("planeGeometry",null),a.createElement("softShadowMaterial",{transparent:!0,depthWrite:!1,toneMapped:g,color:d,blend:p,map:A.progressiveLightMap2.texture})))})),d=a.forwardRef((({castShadow:e=!0,bias:t=.001,mapSize:n=512,size:s=5,near:o=.5,far:l=500,frames:c=1,position:h=[0,0,0],radius:d=1,amount:f=8,intensity:p=1,ambient:m=.5,...g},v)=>{const y=a.useRef(null),x=new i.Vector3(...h).length(),b=a.useContext(u),_=a.useCallback((()=>{let e;if(y.current)for(let t=0;t<y.current.children.length;t++)if(e=y.current.children[t],Math.random()>m)e.position.set(h[0]+i.MathUtils.randFloatSpread(d),h[1]+i.MathUtils.randFloatSpread(d),h[2]+i.MathUtils.randFloatSpread(d));else{let t=Math.acos(2*Math.random()-1)-Math.PI/2,n=2*Math.PI*Math.random();e.position.set(Math.cos(t)*Math.cos(n)*x,Math.abs(Math.cos(t)*Math.sin(n)*x),Math.sin(t)*x)}}),[d,m,x,...h]),w=a.useMemo((()=>({update:_})),[_]);return a.useImperativeHandle(v,(()=>w),[w]),a.useLayoutEffect((()=>{const e=y.current;return b&&b.lights.set(e.uuid,w),()=>{b.lights.delete(e.uuid)}}),[b,w]),a.createElement("group",(0,r.Z)({ref:y},g),Array.from({length:f},((r,i)=>a.createElement("directionalLight",{key:i,castShadow:e,"shadow-bias":t,"shadow-mapSize":[n,n],intensity:p/f},a.createElement("orthographicCamera",{attach:"shadow-camera",args:[-s,s,s,-s,o,l]})))))}));class f{constructor(e,t,n=1024){this.renderer=e,this.res=n,this.scene=t,this.buffer1Active=!1,this.lights=[],this.meshes=[],this.object=null,this.clearColor=new i.Color,this.clearAlpha=0;const r=/(Android|iPad|iPhone|iPod)/g.test(navigator.userAgent)?i.HalfFloatType:i.FloatType;this.progressiveLightMap1=new i.WebGLRenderTarget(this.res,this.res,{type:r}),this.progressiveLightMap2=new i.WebGLRenderTarget(this.res,this.res,{type:r}),this.discardMat=new l.l,this.targetMat=new i.MeshLambertMaterial({fog:!1}),this.previousShadowMap={value:this.progressiveLightMap1.texture},this.averagingWindow={value:100},this.targetMat.onBeforeCompile=e=>{e.vertexShader="varying vec2 vUv;\n"+e.vertexShader.slice(0,-1)+"vUv = uv; gl_Position = vec4((uv - 0.5) * 2.0, 1.0, 1.0); }";const t=e.fragmentShader.indexOf("void main() {");e.fragmentShader="varying vec2 vUv;\n"+e.fragmentShader.slice(0,t)+"uniform sampler2D previousShadowMap;\n\tuniform float averagingWindow;\n"+e.fragmentShader.slice(t-1,-1)+"\nvec3 texelOld = texture2D(previousShadowMap, vUv).rgb;\n gl_FragColor.rgb = mix(texelOld, gl_FragColor.rgb, 1.0/ averagingWindow);\n }",e.uniforms.previousShadowMap=this.previousShadowMap,e.uniforms.averagingWindow=this.averagingWindow}}clear(){this.renderer.getClearColor(this.clearColor),this.clearAlpha=this.renderer.getClearAlpha(),this.renderer.setClearColor("black",1),this.renderer.setRenderTarget(this.progressiveLightMap1),this.renderer.clear(),this.renderer.setRenderTarget(this.progressiveLightMap2),this.renderer.clear(),this.renderer.setRenderTarget(null),this.renderer.setClearColor(this.clearColor,this.clearAlpha),this.lights=[],this.meshes=[],this.scene.traverse((e=>{!function(e){return!!e.geometry}(e)?function(e){return e.isLight}(e)&&this.lights.push({object:e,intensity:e.intensity}):this.meshes.push({object:e,material:e.material})}))}prepare(){this.lights.forEach((e=>e.object.intensity=0)),this.meshes.forEach((e=>e.object.material=this.discardMat))}finish(){this.lights.forEach((e=>e.object.intensity=e.intensity)),this.meshes.forEach((e=>e.object.material=e.material))}configure(e){this.object=e}update(e,t=100){if(!this.object)return;this.averagingWindow.value=t,this.object.material=this.targetMat;const n=this.buffer1Active?this.progressiveLightMap1:this.progressiveLightMap2,r=this.buffer1Active?this.progressiveLightMap2:this.progressiveLightMap1,i=this.scene.background;this.scene.background=null,this.renderer.setRenderTarget(n),this.previousShadowMap.value=r.texture,this.buffer1Active=!this.buffer1Active,this.renderer.render(this.scene,e),this.renderer.setRenderTarget(null),this.scene.background=i}}},3758:(e,t,n)=>{"use strict";n.d(t,{S:()=>a});var r=n(7294),i=n(8715);function a({pixelated:e}){const t=(0,i.z)((e=>e.gl)),n=(0,i.z)((e=>e.internal.active)),a=(0,i.z)((e=>e.performance.current)),s=(0,i.z)((e=>e.viewport.initialDpr)),o=(0,i.z)((e=>e.setDpr));return r.useEffect((()=>{const r=t.domElement;return()=>{n&&o(s),e&&r&&(r.style.imageRendering="auto")}}),[]),r.useEffect((()=>{o(a*s),e&&t.domElement&&(t.domElement.style.imageRendering=1===a?"auto":"pixelated")}),[a]),null}},3520:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var r=n(7294),i=n(8715);function a(){const e=(0,i.z)((e=>e.get)),t=(0,i.z)((e=>e.setEvents)),n=(0,i.z)((e=>e.performance.current));return r.useEffect((()=>{const n=e().events.enabled;return()=>t({enabled:n})}),[]),r.useEffect((()=>t({enabled:1===n})),[n]),null}},7210:(e,t,n)=>{"use strict";n.d(t,{B:()=>u,Y:()=>l});var r=n(7294),i=n(9477),a=n(8715);const s=e=>e&&e.isOrthographicCamera,o=r.createContext(null);function l({children:e,damping:t=6,fit:n,clip:l,observe:u,margin:c=1.2,eps:h=.01,onFit:d}){const f=r.useRef(null),{camera:p,invalidate:m,size:g,controls:v}=(0,a.z)(),y=v,x=r.useRef(d);function b(e,t){return Math.abs(e.x-t.x)<h&&Math.abs(e.y-t.y)<h&&Math.abs(e.z-t.z)<h}function _(e,t,n,r){e.x=i.MathUtils.damp(e.x,t.x,n,r),e.y=i.MathUtils.damp(e.y,t.y,n,r),e.z=i.MathUtils.damp(e.z,t.z,n,r)}x.current=d;const[w]=r.useState((()=>({animating:!1,focus:new i.Vector3,camera:new i.Vector3,zoom:1}))),[M]=r.useState((()=>({focus:new i.Vector3,camera:new i.Vector3,zoom:1}))),[S]=r.useState((()=>new i.Box3)),A=r.useMemo((()=>{function e(){const e=S.getSize(new i.Vector3),t=S.getCenter(new i.Vector3),n=Math.max(e.x,e.y,e.z),r=s(p)?4*n:n/(2*Math.atan(Math.PI*p.fov/360)),a=s(p)?4*n:r/p.aspect,o=c*Math.max(r,a);return{box:S,size:e,center:t,distance:o}}return{getSize:e,refresh(t){if((n=t)&&n.isBox3)S.copy(t);else{const e=t||f.current;e.updateWorldMatrix(!0,!0),S.setFromObject(e)}var n;if(S.isEmpty()){const e=p.position.length()||10;S.setFromCenterAndSize(new i.Vector3,new i.Vector3(e,e,e))}if("OrthographicTrackballControls"===(null==y?void 0:y.constructor.name)){const{distance:t}=e(),n=p.position.clone().sub(y.target).normalize().multiplyScalar(t),r=y.target.clone().add(n);p.position.copy(r)}return this},clip(){const{distance:t}=e();return y&&(y.maxDistance=10*t),p.near=t/100,p.far=100*t,p.updateProjectionMatrix(),y&&y.update(),m(),this},to({position:n,target:r}){w.camera.copy(p.position);const{center:i}=e();return M.camera.set(...n),r?M.focus.set(...r):M.focus.copy(i),t?w.animating=!0:p.position.set(...n),this},fit(){w.camera.copy(p.position),y&&w.focus.copy(y.target);const{center:n,distance:r}=e(),a=n.clone().sub(p.position).normalize().multiplyScalar(r);if(M.camera.copy(n).sub(a),M.focus.copy(n),s(p)){w.zoom=p.zoom;let e=0,r=0;const a=[new i.Vector3(S.min.x,S.min.y,S.min.z),new i.Vector3(S.min.x,S.max.y,S.min.z),new i.Vector3(S.min.x,S.min.y,S.max.z),new i.Vector3(S.min.x,S.max.y,S.max.z),new i.Vector3(S.max.x,S.max.y,S.max.z),new i.Vector3(S.max.x,S.max.y,S.min.z),new i.Vector3(S.max.x,S.min.y,S.max.z),new i.Vector3(S.max.x,S.min.y,S.min.z)];n.applyMatrix4(p.matrixWorldInverse);for(const t of a)t.applyMatrix4(p.matrixWorldInverse),e=Math.max(e,Math.abs(t.y-n.y)),r=Math.max(r,Math.abs(t.x-n.x));e*=2,r*=2;const s=(p.top-p.bottom)/e,o=(p.right-p.left)/r;M.zoom=Math.min(s,o)/c,t||(p.zoom=M.zoom,p.updateProjectionMatrix())}return t?w.animating=!0:(p.position.copy(M.camera),p.lookAt(M.focus),y&&(y.target.copy(M.focus),y.update())),x.current&&x.current(this.getSize()),m(),this}}}),[S,p,y,c,t,m]);r.useLayoutEffect((()=>{if(y){const e=()=>w.animating=!1;return y.addEventListener("start",e),()=>y.removeEventListener("start",e)}}),[y]);const C=r.useRef(0);return r.useLayoutEffect((()=>{(u||0==C.current++)&&(A.refresh(),n&&A.fit(),l&&A.clip())}),[g,l,n,u,p,y]),(0,a.A)(((e,n)=>{if(w.animating){if(_(w.focus,M.focus,t,n),_(w.camera,M.camera,t,n),w.zoom=i.MathUtils.damp(w.zoom,M.zoom,t,n),p.position.copy(w.camera),s(p)&&(p.zoom=w.zoom,p.updateProjectionMatrix()),y?(y.target.copy(w.focus),y.update()):p.lookAt(w.focus),m(),s(p)&&!(Math.abs(w.zoom-M.zoom)<h))return;if(!s(p)&&!b(w.camera,M.camera))return;if(y&&!b(w.focus,M.focus))return;w.animating=!1}})),r.createElement("group",{ref:f},r.createElement(o.Provider,{value:A},e))}function u(){return r.useContext(o)}},9e3:(e,t,n)=>{"use strict";n.d(t,{M:()=>s});var r=n(7462),i=n(9477),a=n(7294);const s=a.forwardRef((function({children:e,disable:t,disableX:n,disableY:s,disableZ:o,left:l,right:u,top:c,bottom:h,front:d,back:f,onCentered:p,precise:m=!0,cacheKey:g=0,...v},y){const x=a.useRef(null),b=a.useRef(null),_=a.useRef(null);return a.useLayoutEffect((()=>{b.current.matrixWorld.identity();const e=(new i.Box3).setFromObject(_.current,m),r=new i.Vector3,a=new i.Sphere,g=e.max.x-e.min.x,v=e.max.y-e.min.y,y=e.max.z-e.min.z;e.getCenter(r),e.getBoundingSphere(a);const w=c?v/2:h?-v/2:0,M=l?-g/2:u?g/2:0,S=d?y/2:f?-y/2:0;b.current.position.set(t||n?0:-r.x+M,t||s?0:-r.y+w,t||o?0:-r.z+S),void 0!==p&&p({parent:x.current.parent,container:x.current,width:g,height:v,depth:y,boundingBox:e,boundingSphere:a,center:r,verticalAlignment:w,horizontalAlignment:M,depthAlignment:S})}),[g,p,c,l,d,t,n,s,o,m,u,h,f]),a.useImperativeHandle(y,(()=>x.current),[]),a.createElement("group",(0,r.Z)({ref:x},v),a.createElement("group",{ref:b},a.createElement("group",{ref:_},e)))}))},8274:(e,t,n)=>{"use strict";n.d(t,{j:()=>u});var r=n(7462),i=n(7294),a=n(9477),s=n(8715),o=n(8466),l=n(7312);const u=i.forwardRef((({scale:e=10,frames:t=1/0,opacity:n=1,width:u=1,height:c=1,blur:h=1,far:d=10,resolution:f=512,smooth:p=!0,color:m="#000000",depthWrite:g=!1,renderOrder:v,...y},x)=>{const b=i.useRef(null),_=(0,s.z)((e=>e.scene)),w=(0,s.z)((e=>e.gl)),M=i.useRef(null);u*=Array.isArray(e)?e[0]:e||1,c*=Array.isArray(e)?e[1]:e||1;const[S,A,C,E,T,B,P]=i.useMemo((()=>{const e=new a.WebGLRenderTarget(f,f),t=new a.WebGLRenderTarget(f,f);t.texture.generateMipmaps=e.texture.generateMipmaps=!1;const n=new a.PlaneGeometry(u,c).rotateX(Math.PI/2),r=new a.Mesh(n),i=new a.MeshDepthMaterial;i.depthTest=i.depthWrite=!1,i.onBeforeCompile=e=>{e.uniforms={...e.uniforms,ucolor:{value:new a.Color(m)}},e.fragmentShader=e.fragmentShader.replace("void main() {","uniform vec3 ucolor;\n void main() {\n "),e.fragmentShader=e.fragmentShader.replace("vec4( vec3( 1.0 - fragCoordZ ), opacity );","vec4( ucolor * fragCoordZ * 2.0, ( 1.0 - fragCoordZ ) * 1.0 );")};const s=new a.ShaderMaterial(o.P),h=new a.ShaderMaterial(l.Z);return h.depthTest=s.depthTest=!1,[e,n,i,r,s,h,t]}),[f,u,c,e,m]),R=e=>{E.visible=!0,E.material=T,T.uniforms.tDiffuse.value=S.texture,T.uniforms.h.value=1*e/256,w.setRenderTarget(P),w.render(E,M.current),E.material=B,B.uniforms.tDiffuse.value=P.texture,B.uniforms.v.value=1*e/256,w.setRenderTarget(S),w.render(E,M.current),E.visible=!1};let L,D,I=0;return(0,s.A)((()=>{M.current&&(t===1/0||I<t)&&(I++,L=_.background,D=_.overrideMaterial,b.current.visible=!1,_.background=null,_.overrideMaterial=C,w.setRenderTarget(S),w.render(_,M.current),R(h),p&&R(.4*h),w.setRenderTarget(null),b.current.visible=!0,_.overrideMaterial=D,_.background=L)})),i.useImperativeHandle(x,(()=>b.current),[]),i.createElement("group",(0,r.Z)({"rotation-x":Math.PI/2},y,{ref:b}),i.createElement("mesh",{renderOrder:v,geometry:A,scale:[1,-1,1],rotation:[-Math.PI/2,0,0]},i.createElement("meshBasicMaterial",{transparent:!0,map:S.texture,opacity:n,depthWrite:g})),i.createElement("orthographicCamera",{ref:M,args:[-u/2,u/2,c/2,-c/2,0,d]}))}))},6255:(e,t,n)=>{"use strict";n.d(t,{qA:()=>p});var r=n(7462),i=n(7294),a=n(8715),s=n(9477),o=n(5052),l=n(1938);function u(e,t,n,r,i=0){const a=(e=>{return(t=e).current&&t.current.isScene?e.current:e;var t})(t||n),s=a.background,o=a.environment,l=a.backgroundBlurriness||0;return"only"!==e&&(a.environment=r),e&&(a.background=r),e&&void 0!==a.backgroundBlurriness&&(a.backgroundBlurriness=i),()=>{"only"!==e&&(a.environment=o),e&&(a.background=s),e&&void 0!==a.backgroundBlurriness&&(a.backgroundBlurriness=l)}}function c({scene:e,background:t=!1,blur:n,map:r}){const s=(0,a.z)((e=>e.scene));return i.useLayoutEffect((()=>{if(r)return u(t,e,s,r,n)}),[s,e,r,t,n]),null}function h({background:e=!1,scene:t,blur:n,...r}){const s=(0,l.O)(r),o=(0,a.z)((e=>e.scene));return i.useLayoutEffect((()=>u(e,t,o,s,n)),[s,e,t,o,n]),null}function d({children:e,near:t=1,far:n=1e3,resolution:r=256,frames:o=1,map:l,background:d=!1,blur:f,scene:p,files:m,path:g,preset:v,extensions:y}){const x=(0,a.z)((e=>e.gl)),b=(0,a.z)((e=>e.scene)),_=i.useRef(null),[w]=i.useState((()=>new s.Scene)),M=i.useMemo((()=>{const e=new s.WebGLCubeRenderTarget(r);return e.texture.type=s.HalfFloatType,e}),[r]);i.useLayoutEffect((()=>(1===o&&_.current.update(x,w),u(d,p,b,M.texture,f))),[e,w,M.texture,p,b,d,o,x]);let S=1;return(0,a.A)((()=>{(o===1/0||S<o)&&(_.current.update(x,w),S++)})),i.createElement(i.Fragment,null,(0,a.g)(i.createElement(i.Fragment,null,e,i.createElement("cubeCamera",{ref:_,args:[t,n,M]}),m||v?i.createElement(h,{background:!0,files:m,preset:v,path:g,extensions:y}):l?i.createElement(c,{background:!0,map:l,extensions:y}):null),w))}function f(e){var t,n,s,u;const h=(0,l.O)(e),d=e.map||h;i.useMemo((()=>(0,a.e)({GroundProjectedEnvImpl:o.e})),[]);const f=i.useMemo((()=>[d]),[d]),p=null==(t=e.ground)?void 0:t.height,m=null==(n=e.ground)?void 0:n.radius,g=null!==(s=null==(u=e.ground)?void 0:u.scale)&&void 0!==s?s:1e3;return i.createElement(i.Fragment,null,i.createElement(c,(0,r.Z)({},e,{map:d})),i.createElement("groundProjectedEnvImpl",{args:f,scale:g,height:p,radius:m}))}function p(e){return e.ground?i.createElement(f,e):e.map?i.createElement(c,e):e.children?i.createElement(d,e):i.createElement(h,e)}},533:(e,t,n)=>{"use strict";n.d(t,{A:()=>s});var r=n(7294),i=n(8715);const a=(0,r.createContext)(null);function s({iterations:e=10,ms:t=250,threshold:n=.75,step:s=.1,factor:o=.5,flipflops:l=1/0,bounds:u=(e=>e>100?[60,100]:[40,60]),onIncline:c,onDecline:h,onChange:d,onFallback:f,children:p}){const m=Math.pow(10,0),[g,v]=(0,r.useState)((()=>({fps:0,index:0,factor:o,flipped:0,refreshrate:0,fallback:!1,frames:[],averages:[],subscriptions:new Map,subscribe:e=>{const t=Symbol();return g.subscriptions.set(t,e.current),()=>{g.subscriptions.delete(t)}}})));let y=0;return(0,i.A)((()=>{const{frames:r,averages:i}=g;if(!g.fallback&&i.length<e){r.push(performance.now());const a=r[r.length-1]-r[0];if(a>=t){if(g.fps=Math.round(r.length/a*1e3*m)/m,g.refreshrate=Math.max(g.refreshrate,g.fps),i[g.index++%e]=g.fps,i.length===e){const[t,r]=u(g.refreshrate),a=i.filter((e=>e>=r)),o=i.filter((e=>e<t));a.length>e*n&&(g.factor=Math.min(1,g.factor+s),g.flipped++,c&&c(g),g.subscriptions.forEach((e=>e.onIncline&&e.onIncline(g)))),o.length>e*n&&(g.factor=Math.max(0,g.factor-s),g.flipped++,h&&h(g),g.subscriptions.forEach((e=>e.onDecline&&e.onDecline(g)))),y!==g.factor&&(y=g.factor,d&&d(g),g.subscriptions.forEach((e=>e.onChange&&e.onChange(g)))),g.flipped>l&&!g.fallback&&(g.fallback=!0,f&&f(g),g.subscriptions.forEach((e=>e.onFallback&&e.onFallback(g)))),g.averages=[]}g.frames=[]}}})),r.createElement(a.Provider,{value:g},p)}},587:(e,t,n)=>{"use strict";n.d(t,{q:()=>s});var r=n(9477),i=n(7294),a=n(8715);function s({all:e,scene:t,camera:n}){const s=(0,a.z)((({gl:e})=>e)),o=(0,a.z)((({camera:e})=>e)),l=(0,a.z)((({scene:e})=>e));return i.useLayoutEffect((()=>{const i=[];e&&(t||l).traverse((e=>{!1===e.visible&&(i.push(e),e.visible=!0)})),s.compile(t||l,n||o);const a=new r.WebGLCubeRenderTarget(128);new r.CubeCamera(.01,1e5,a).update(s,t||l),a.dispose(),i.forEach((e=>e.visible=!1))}),[]),null}},5696:(e,t,n)=>{"use strict";n.d(t,{H:()=>d});var r=n(7462),i=n(7294),a=n(6255),s=n(8274),o=n(9e3),l=n(3748),u=n(7210);const c={rembrandt:{main:[1,2,1],fill:[-2,-.5,-2]},portrait:{main:[-1,2,.5],fill:[-1,.5,-1.5]},upfront:{main:[0,2,1],fill:[-1,.5,-1.5]},soft:{main:[-2,4,4],fill:[-1,.5,-1.5]}};function h({radius:e,adjustCamera:t}){const n=(0,u.B)();return i.useEffect((()=>{t&&n.refresh().clip().fit()}),[e,t]),null}function d({children:e,center:t,adjustCamera:n=!0,intensity:d=.5,shadows:f="contact",environment:p="city",preset:m="rembrandt",...g}){var v,y,x,b,_,w,M,S;const A="string"==typeof m?c[m]:m,[{radius:C,height:E},T]=i.useState({radius:0,width:0,height:0,depth:0}),B=null!==(v=null==f?void 0:f.bias)&&void 0!==v?v:-1e-4,P=null!==(y=null==f?void 0:f.normalBias)&&void 0!==y?y:0,R=null!==(x=null==f?void 0:f.size)&&void 0!==x?x:1024,L=null!==(b=null==f?void 0:f.offset)&&void 0!==b?b:0,D="contact"===f||"contact"===(null==f?void 0:f.type),I="accumulative"===f||"accumulative"===(null==f?void 0:f.type),k={..."object"==typeof f?f:{}},F=p?"string"==typeof p?{preset:p}:p:null,O=i.useCallback((e=>{const{width:n,height:r,depth:i,boundingSphere:a}=e;T({radius:a.radius,width:n,height:r,depth:i}),null!=t&&t.onCentered&&t.onCentered(e)}),[]);return i.createElement(i.Fragment,null,i.createElement("ambientLight",{intensity:d/3}),i.createElement("spotLight",{penumbra:1,position:[A.main[0]*C,A.main[1]*C,A.main[2]*C],intensity:2*d,castShadow:!!f,"shadow-bias":B,"shadow-normalBias":P,"shadow-mapSize":R}),i.createElement("pointLight",{position:[A.fill[0]*C,A.fill[1]*C,A.fill[2]*C],intensity:d}),i.createElement(u.Y,(0,r.Z)({fit:!!n,clip:!!n,margin:Number(n),observe:!0},g),i.createElement(h,{radius:C,adjustCamera:n}),i.createElement(o.M,(0,r.Z)({},t,{position:[0,L/2,0],onCentered:O}),e)),i.createElement("group",{position:[0,-E/2-L/2,0]},D&&i.createElement(s.j,(0,r.Z)({scale:4*C,far:C,blur:2},k)),I&&i.createElement(l.iA,(0,r.Z)({temporal:!0,frames:100,alphaTest:.9,toneMapped:!0,scale:4*C},k),i.createElement(l.mI,{amount:null!==(_=k.amount)&&void 0!==_?_:8,radius:null!==(w=k.radius)&&void 0!==w?w:C,ambient:null!==(M=k.ambient)&&void 0!==M?M:.5,intensity:null!==(S=k.intensity)&&void 0!==S?S:1,position:[A.main[0]*C,A.main[1]*C,A.main[2]*C],size:4*C,bias:-B,mapSize:R}))),p&&i.createElement(a.qA,F))}},9137:(e,t,n)=>{"use strict";n.d(t,{g:()=>i});var r=n(9477);function i(e,t,n,i){const a=class extends r.ShaderMaterial{constructor(a={}){const s=Object.entries(e);super({uniforms:s.reduce(((e,[t,n])=>({...e,...r.UniformsUtils.clone({[t]:{value:n}})})),{}),vertexShader:t,fragmentShader:n}),this.key="",s.forEach((([e])=>Object.defineProperty(this,e,{get:()=>this.uniforms[e].value,set:t=>this.uniforms[e].value=t}))),Object.assign(this,a),i&&i(this)}};return a.key=r.MathUtils.generateUUID(),a}},1938:(e,t,n)=>{"use strict";n.d(t,{O:()=>u});var r=n(8715),i=n(9477),a=n(8197),s=n(2145),o=n(4526);const l=e=>Array.isArray(e);function u({files:e=["/px.png","/nx.png","/py.png","/ny.png","/pz.png","/nz.png"],path:t="",preset:n,encoding:u,extensions:c}={}){var h;let d,f=null,p=!1;if(n){if(!(n in o.n))throw new Error("Preset must be one of: "+Object.keys(o.n).join(", "));e=o.n[n],t="https://raw.githack.com/pmndrs/drei-assets/456060a26bbeb8fdf79326f224b6d99b8bcce736/hdri/"}if(p=l(e),d=l(e)?"cube":e.startsWith("data:application/exr")?"exr":e.startsWith("data:application/hdr")?"hdr":null==(h=e.split(".").pop())?void 0:h.toLowerCase(),f=p?i.CubeTextureLoader:"hdr"===d?a.x:"exr"===d?s.I:null,!f)throw new Error("useEnvironment: Unrecognized file extension: "+e);const m=(0,r.D)(f,p?[e]:e,(e=>{null==e.setPath||e.setPath(t),c&&c(e)})),g=p?m[0]:m;return g.mapping=p?i.CubeReflectionMapping:i.EquirectangularReflectionMapping,"colorSpace"in g?g.colorSpace=(null!=u?u:p)?"srgb":"srgb-linear":g.encoding=(null!=u?u:p)?3001:3e3,g}},6227:(e,t,n)=>{"use strict";n.d(t,{L:()=>u});var r=n(4976),i=n(6295),a=n(7607),s=n(8715);let o=null;function l(e,t,n){return a=>{n&&n(a),e&&(o||(o=new r._),o.setDecoderPath("string"==typeof e?e:"https://www.gstatic.com/draco/versioned/decoders/1.5.5/"),a.setDRACOLoader(o)),t&&a.setMeshoptDecoder("function"==typeof i.z?(0,i.z)():i.z)}}function u(e,t=!0,n=!0,r){return(0,s.D)(a.E,e,l(t,n,r))}u.preload=(e,t=!0,n=!0,r)=>s.D.preload(a.E,e,l(t,n,r)),u.clear=e=>s.D.clear(a.E,e)},4526:(e,t,n)=>{"use strict";n.d(t,{n:()=>r});const r={apartment:"lebombo_1k.hdr",city:"potsdamer_platz_1k.hdr",dawn:"kiara_1_dawn_1k.hdr",forest:"forest_slope_1k.hdr",lobby:"st_fagans_interior_1k.hdr",night:"dikhololo_night_1k.hdr",park:"rooitou_park_1k.hdr",studio:"studio_small_03_1k.hdr",sunset:"venice_sunset_1k.hdr",warehouse:"empty_warehouse_01_1k.hdr"}},8198:(e,t,n)=>{"use strict";n.d(t,{l:()=>r});const r=(0,n(9137).g)({},"void main() { }","void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); discard; }")},8715:(e,t,n)=>{"use strict";n.d(t,{A:()=>Z,B:()=>v,D:()=>ee,E:()=>y,a:()=>le,b:()=>m,c:()=>k,d:()=>ce,e:()=>O,g:()=>he,i:()=>p,u:()=>g,z:()=>Q});var r,i,a=n(9477),s=n(7294),o=n(2576),l=n(4671),u=n(6525),c=n.n(u),h=n(5431),d=n(4881);const f=e=>e&&e.isOrthographicCamera,p=e=>e&&e.hasOwnProperty("current"),m="undefined"!=typeof window&&(null!=(r=window.document)&&r.createElement||"ReactNative"===(null==(i=window.navigator)?void 0:i.product))?s.useLayoutEffect:s.useEffect;function g(e){const t=s.useRef(e);return m((()=>{t.current=e}),[e]),t}function v({set:e}){return m((()=>(e(new Promise((()=>null))),()=>e(!1))),[e]),null}class y extends s.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}y.getDerivedStateFromError=()=>({error:!0});const x="__default";function b(e){const t="undefined"!=typeof window?window.devicePixelRatio:1;return Array.isArray(e)?Math.min(Math.max(e[0],t),e[1]):e}const _=e=>{var t;return null==(t=e.__r3f)?void 0:t.root.getState()},w={obj:e=>e===Object(e)&&!w.arr(e)&&"function"!=typeof e,fun:e=>"function"==typeof e,str:e=>"string"==typeof e,num:e=>"number"==typeof e,boo:e=>"boolean"==typeof e,und:e=>void 0===e,arr:e=>Array.isArray(e),equ(e,t,{arrays:n="shallow",objects:r="reference",strict:i=!0}={}){if(typeof e!=typeof t||!!e!=!!t)return!1;if(w.str(e)||w.num(e))return e===t;const a=w.obj(e);if(a&&"reference"===r)return e===t;const s=w.arr(e);if(s&&"reference"===n)return e===t;if((s||a)&&e===t)return!0;let o;for(o in e)if(!(o in t))return!1;for(o in i?t:e)if(e[o]!==t[o])return!1;if(w.und(o)){if(s&&0===e.length&&0===t.length)return!0;if(a&&0===Object.keys(e).length&&0===Object.keys(t).length)return!0;if(e!==t)return!1}return!0}};function M(e,t){const n=e;return(null!=t&&t.primitive||!n.__r3f)&&(n.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...t}),e}function S(e,t){let n=e;if(t.includes("-")){const r=t.split("-"),i=r.pop();return n=r.reduce(((e,t)=>e[t]),e),{target:n,key:i}}return{target:n,key:t}}const A=/-\d+$/;function C(e,t,n){if(w.str(n)){if(A.test(n)){const t=n.replace(A,""),{target:r,key:i}=S(e,t);Array.isArray(r[i])||(r[i]=[])}const{target:r,key:i}=S(e,n);t.__r3f.previousAttach=r[i],r[i]=t}else t.__r3f.previousAttach=n(e,t)}function E(e,t,n){var r,i;if(w.str(n)){const{target:r,key:i}=S(e,n),a=t.__r3f.previousAttach;void 0===a?delete r[i]:r[i]=a}else null==(r=t.__r3f)||null==r.previousAttach||r.previousAttach(e,t);null==(i=t.__r3f)||delete i.previousAttach}function T(e,{children:t,key:n,ref:r,...i},{children:a,key:s,ref:o,...l}={},u=!1){var c;const h=null!=(c=null==e?void 0:e.__r3f)?c:{},d=Object.entries(i),f=[];if(u){const e=Object.keys(l);for(let t=0;t<e.length;t++)i.hasOwnProperty(e[t])||d.unshift([e[t],x+"remove"])}d.forEach((([t,n])=>{var r;if(null!=(r=e.__r3f)&&r.primitive&&"object"===t)return;if(w.equ(n,l[t]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(t))return f.push([t,n,!0,[]]);let a=[];t.includes("-")&&(a=t.split("-")),f.push([t,n,!1,a]);for(const e in i){const n=i[e];e.startsWith(`${t}-`)&&f.push([e,n,!1,e.split("-")])}}));const p={...i};return h.memoizedProps&&h.memoizedProps.args&&(p.args=h.memoizedProps.args),h.memoizedProps&&h.memoizedProps.attach&&(p.attach=h.memoizedProps.attach),{memoized:p,changes:f}}function B(e,t){var n,r,i;const s=null!=(n=e.__r3f)?n:{},o=s.root,l=null!=(r=null==o||null==o.getState?void 0:o.getState())?r:{},{memoized:u,changes:c}=(h=t)&&h.memoized&&h.changes?t:T(e,t);var h;const d=s.eventCount;e.__r3f&&(e.__r3f.memoizedProps=u);for(let t=0;t<c.length;t++){let[n,r,i,o]=c[t],h=e,d=h[n];if(o.length&&(d=o.reduce(((e,t)=>e[t]),e),!d||!d.set)){const[t,...r]=o.reverse();h=r.reverse().reduce(((e,t)=>e[t]),e),n=t}var f;if(r===x+"remove")if(d&&d.constructor)r=new d.constructor(...null!=(f=u.args)?f:[]);else if(h.constructor){var p;const e=new h.constructor(...null!=(p=h.__r3f.memoizedProps.args)?p:[]);r=e[d],e.dispose&&e.dispose()}else r=0;if(i)r?s.handlers[n]=r:delete s.handlers[n],s.eventCount=Object.keys(s.handlers).length;else if(d&&d.set&&(d.copy||d instanceof a.Layers)){if(Array.isArray(r))d.fromArray?d.fromArray(r):d.set(...r);else if(d.copy&&r&&r.constructor&&d.constructor.name===r.constructor.name)d.copy(r);else if(void 0!==r){const e=d instanceof a.Color;!e&&d.setScalar?d.setScalar(r):d instanceof a.Layers&&r instanceof a.Layers?d.mask=r.mask:d.set(r)}}else h[n]=r,!l.linear&&h[n]instanceof a.Texture&&(h[n].encoding=a.sRGBEncoding);P(e)}if(s.parent&&l.internal&&e.raycast&&d!==s.eventCount){const t=l.internal.interaction.indexOf(e);t>-1&&l.internal.interaction.splice(t,1),s.eventCount&&l.internal.interaction.push(e)}return c.length&&null!=(i=e.__r3f)&&i.parent&&R(e),e}function P(e){var t,n;const r=null==(t=e.__r3f)||null==(n=t.root)||null==n.getState?void 0:n.getState();r&&0===r.internal.frames&&r.invalidate()}function R(e){null==e.onUpdate||e.onUpdate(e)}function L(e,t){e.manual||(f(e)?(e.left=t.width/-2,e.right=t.width/2,e.top=t.height/2,e.bottom=t.height/-2):e.aspect=t.width/t.height,e.updateProjectionMatrix(),e.updateMatrixWorld())}function D(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function I(e,t,n,r){const i=n.get(t);i&&(n.delete(t),0===n.size&&(e.delete(r),i.target.releasePointerCapture(r)))}function k(e){function t(e){return e.filter((e=>["Move","Over","Enter","Out","Leave"].some((t=>{var n;return null==(n=e.__r3f)?void 0:n.handlers["onPointer"+t]}))))}function n(t){const{internal:n}=e.getState();for(const e of n.hovered.values())if(!t.length||!t.find((t=>t.object===e.object&&t.index===e.index&&t.instanceId===e.instanceId))){const r=e.eventObject.__r3f,i=null==r?void 0:r.handlers;if(n.hovered.delete(D(e)),null!=r&&r.eventCount){const n={...e,intersections:t};null==i.onPointerOut||i.onPointerOut(n),null==i.onPointerLeave||i.onPointerLeave(n)}}}function r(e,t){for(let n=0;n<t.length;n++){const r=t[n].__r3f;null==r||null==r.handlers.onPointerMissed||r.handlers.onPointerMissed(e)}}return{handlePointer:function(i){switch(i){case"onPointerLeave":case"onPointerCancel":return()=>n([]);case"onLostPointerCapture":return t=>{const{internal:r}=e.getState();"pointerId"in t&&r.capturedMap.has(t.pointerId)&&(r.capturedMap.delete(t.pointerId),n([]))}}return function(s){const{onPointerMissed:o,internal:l}=e.getState();l.lastEvent.current=s;const u="onPointerMove"===i,c="onClick"===i||"onContextMenu"===i||"onDoubleClick"===i,h=function(t,n){const r=e.getState(),i=new Set,a=[],s=n?n(r.internal.interaction):r.internal.interaction;for(let e=0;e<s.length;e++){const t=_(s[e]);t&&(t.raycaster.camera=void 0)}r.previousRoot||null==r.events.compute||r.events.compute(t,r);let o=s.flatMap((function(e){const n=_(e);return n&&n.events.enabled&&null!==n.raycaster.camera?(void 0===n.raycaster.camera&&(null==n.events.compute||n.events.compute(t,n,null==(r=n.previousRoot)?void 0:r.getState()),void 0===n.raycaster.camera&&(n.raycaster.camera=null)),n.raycaster.camera?n.raycaster.intersectObject(e,!0):[]):[];var r})).sort(((e,t)=>{const n=_(e.object),r=_(t.object);return n&&r&&r.events.priority-n.events.priority||e.distance-t.distance})).filter((e=>{const t=D(e);return!i.has(t)&&(i.add(t),!0)}));r.events.filter&&(o=r.events.filter(o,r));for(const e of o){let t=e.object;for(;t;){var l;null!=(l=t.__r3f)&&l.eventCount&&a.push({...e,eventObject:t}),t=t.parent}}if("pointerId"in t&&r.internal.capturedMap.has(t.pointerId))for(let e of r.internal.capturedMap.get(t.pointerId).values())i.has(D(e.intersection))||a.push(e.intersection);return a}(s,u?t:void 0),d=c?function(t){const{internal:n}=e.getState(),r=t.offsetX-n.initialClick[0],i=t.offsetY-n.initialClick[1];return Math.round(Math.sqrt(r*r+i*i))}(s):0;"onPointerDown"===i&&(l.initialClick=[s.offsetX,s.offsetY],l.initialHits=h.map((e=>e.eventObject))),c&&!h.length&&d<=2&&(r(s,l.interaction),o&&o(s)),u&&n(h),function(t,r,i,s){const o=e.getState();if(t.length){const e={stopped:!1};for(const l of t){const u=_(l.object)||o,{raycaster:c,pointer:h,camera:d,internal:f}=u,p=new a.Vector3(h.x,h.y,0).unproject(d),m=e=>{var t,n;return null!=(t=null==(n=f.capturedMap.get(e))?void 0:n.has(l.eventObject))&&t},g=e=>{const t={intersection:l,target:r.target};f.capturedMap.has(e)?f.capturedMap.get(e).set(l.eventObject,t):f.capturedMap.set(e,new Map([[l.eventObject,t]])),r.target.setPointerCapture(e)},v=e=>{const t=f.capturedMap.get(e);t&&I(f.capturedMap,l.eventObject,t,e)};let y={};for(let e in r){let t=r[e];"function"!=typeof t&&(y[e]=t)}let x={...l,...y,pointer:h,intersections:t,stopped:e.stopped,delta:i,unprojectedPoint:p,ray:c.ray,camera:d,stopPropagation(){const i="pointerId"in r&&f.capturedMap.get(r.pointerId);(!i||i.has(l.eventObject))&&(x.stopped=e.stopped=!0,f.hovered.size&&Array.from(f.hovered.values()).find((e=>e.eventObject===l.eventObject)))&&n([...t.slice(0,t.indexOf(l)),l])},target:{hasPointerCapture:m,setPointerCapture:g,releasePointerCapture:v},currentTarget:{hasPointerCapture:m,setPointerCapture:g,releasePointerCapture:v},nativeEvent:r};if(s(x),!0===e.stopped)break}}}(h,s,d,(function(e){const t=e.eventObject,n=t.__r3f,a=null==n?void 0:n.handlers;if(null!=n&&n.eventCount)if(u){if(a.onPointerOver||a.onPointerEnter||a.onPointerOut||a.onPointerLeave){const t=D(e),n=l.hovered.get(t);n?n.stopped&&e.stopPropagation():(l.hovered.set(t,e),null==a.onPointerOver||a.onPointerOver(e),null==a.onPointerEnter||a.onPointerEnter(e))}null==a.onPointerMove||a.onPointerMove(e)}else{const n=a[i];n?c&&!l.initialHits.includes(t)||(r(s,l.interaction.filter((e=>!l.initialHits.includes(e)))),n(e)):c&&l.initialHits.includes(t)&&r(s,l.interaction.filter((e=>!l.initialHits.includes(e))))}}))}}}}let F={},O=e=>{F={...F,...e}};const N=["set","get","setSize","setFrameloop","setDpr","events","invalidate","advance","size","viewport"],z=e=>!(null==e||!e.render),U=s.createContext(null);let G,H,V,W=new Set,j=new Set,J=new Set;function X(e,t){if(e.size)for(const{callback:n}of e.values())n(t)}function Y(e,t){switch(e){case"before":return X(W,t);case"after":return X(j,t);case"tail":return X(J,t)}}function K(e,t,n){let r=t.clock.getDelta();for("never"===t.frameloop&&"number"==typeof e&&(r=e-t.clock.elapsedTime,t.clock.oldTime=t.clock.elapsedTime,t.clock.elapsedTime=e),H=t.internal.subscribers,G=0;G<H.length;G++)V=H[G],V.ref.current(V.store.getState(),r,n);return!t.internal.priority&&t.gl.render&&t.gl.render(t.scene,t.camera),t.internal.frames=Math.max(0,t.internal.frames-1),"always"===t.frameloop?1:t.internal.frames}function q(){const e=s.useContext(U);if(!e)throw new Error("R3F: Hooks can only be used within the Canvas component!");return e}function Q(e=(e=>e),t){return q()(e,t)}function Z(e,t=0){const n=q(),r=n.getState().internal.subscribe,i=g(e);return m((()=>r(i,t,n)),[t,r,n]),null}function $(e,t){return function(n,...r){const i=new n;return e&&e(i),Promise.all(r.map((e=>new Promise(((n,r)=>i.load(e,(e=>{e.scene&&Object.assign(e,function(e){const t={nodes:{},materials:{}};return e&&e.traverse((e=>{e.name&&(t.nodes[e.name]=e),e.material&&!t.materials[e.material.name]&&(t.materials[e.material.name]=e.material)})),t}(e.scene)),n(e)}),t,(t=>r(new Error(`Could not load ${e}: ${t.message})`)))))))))}}function ee(e,t,n,r){const i=Array.isArray(t)?t:[t],a=(0,d.Rq)($(n,r),[e,...i],{equal:w.equ});return Array.isArray(t)?a:a[0]}ee.preload=function(e,t,n){const r=Array.isArray(t)?t:[t];return(0,d.MA)($(n),[e,...r])},ee.clear=function(e,t){const n=Array.isArray(t)?t:[t];return(0,d.ZH)([e,...n])};const te=new Map,{invalidate:ne,advance:re}=function(e){let t,n,r,i=!1;function a(s){n=requestAnimationFrame(a),i=!0,t=0,Y("before",s);for(const n of e.values()){var o;r=n.store.getState(),!r.internal.active||!("always"===r.frameloop||r.internal.frames>0)||null!=(o=r.gl.xr)&&o.isPresenting||(t+=K(s,r))}if(Y("after",s),0===t)return Y("tail",s),i=!1,cancelAnimationFrame(n)}return{loop:a,invalidate:function t(n,r=1){var s;if(!n)return e.forEach((e=>t(e.store.getState())),r);null!=(s=n.gl.xr)&&s.isPresenting||!n.internal.active||"never"===n.frameloop||(n.internal.frames=Math.min(60,n.internal.frames+r),i||(i=!0,requestAnimationFrame(a)))},advance:function(t,n=!0,r,i){if(n&&Y("before",t),r)K(t,r,i);else for(const n of e.values())K(t,n.store.getState());n&&Y("after",t)}}}(te),{reconciler:ie,applyProps:ae}=function(e,t){function n(e,{args:t=[],attach:n,...r},i){let s,o=`${e[0].toUpperCase()}${e.slice(1)}`;if("primitive"===e){if(void 0===r.object)throw new Error("R3F: Primitives without 'object' are invalid!");s=M(r.object,{type:e,root:i,attach:n,primitive:!0})}else{const r=F[o];if(!r)throw new Error(`R3F: ${o} is not part of the THREE namespace! Did you forget to extend? See: https://docs.pmnd.rs/react-three-fiber/api/objects#using-3rd-party-objects-declaratively`);if(!Array.isArray(t))throw new Error("R3F: The args prop must be an array!");s=M(new r(...t),{type:e,root:i,attach:n,memoizedProps:{args:t}})}return void 0===s.__r3f.attach&&(s instanceof a.BufferGeometry?s.__r3f.attach="geometry":s instanceof a.Material&&(s.__r3f.attach="material")),"inject"!==o&&B(s,r),s}function r(e,t){let n=!1;var r,i;t&&(null!=(r=t.__r3f)&&r.attach?C(e,t,t.__r3f.attach):t.isObject3D&&e.isObject3D&&(e.add(t),n=!0),n||null==(i=e.__r3f)||i.objects.push(t),t.__r3f||M(t,{}),t.__r3f.parent=e,R(t),P(t))}function i(e,t,n){let r=!1;if(t){var i,a;if(null!=(i=t.__r3f)&&i.attach)C(e,t,t.__r3f.attach);else if(t.isObject3D&&e.isObject3D){t.parent=e,t.dispatchEvent({type:"added"});const i=e.children.filter((e=>e!==t)),a=i.indexOf(n);e.children=[...i.slice(0,a),t,...i.slice(a)],r=!0}r||null==(a=e.__r3f)||a.objects.push(t),t.__r3f||M(t,{}),t.__r3f.parent=e,R(t),P(t)}}function s(e,t,n=!1){e&&[...e].forEach((e=>l(t,e,n)))}function l(e,t,n){if(t){var r,i,a;if(t.__r3f&&(t.__r3f.parent=null),null!=(r=e.__r3f)&&r.objects&&(e.__r3f.objects=e.__r3f.objects.filter((e=>e!==t))),null!=(i=t.__r3f)&&i.attach)E(e,t,t.__r3f.attach);else if(t.isObject3D&&e.isObject3D){var o;e.remove(t),null!=(o=t.__r3f)&&o.root&&function(e,t){const{internal:n}=e.getState();n.interaction=n.interaction.filter((e=>e!==t)),n.initialHits=n.initialHits.filter((e=>e!==t)),n.hovered.forEach(((e,r)=>{e.eventObject!==t&&e.object!==t||n.hovered.delete(r)})),n.capturedMap.forEach(((e,r)=>{I(n.capturedMap,t,e,r)}))}(t.__r3f.root,t)}const u=null==(a=t.__r3f)?void 0:a.primitive,c=void 0===n?null!==t.dispose&&!u:n;var l;u||(s(null==(l=t.__r3f)?void 0:l.objects,t,c),s(t.children,t,c)),t.__r3f&&(delete t.__r3f.root,delete t.__r3f.objects,delete t.__r3f.handlers,delete t.__r3f.memoizedProps,u||delete t.__r3f),c&&t.dispose&&"Scene"!==t.type&&(0,h.unstable_scheduleCallback)(h.unstable_IdlePriority,(()=>{try{t.dispose()}catch(e){}})),P(e)}}const u=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:c()({createInstance:n,removeChild:l,appendChild:r,appendInitialChild:r,insertBefore:i,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(e,t)=>{if(!t)return;const n=e.getState().scene;n.__r3f&&(n.__r3f.root=e,r(n,t))},removeChildFromContainer:(e,t)=>{t&&l(e.getState().scene,t)},insertInContainerBefore:(e,t,n)=>{if(!t||!n)return;const r=e.getState().scene;r.__r3f&&i(r,t,n)},getRootHostContext:()=>null,getChildHostContext:e=>e,finalizeInitialChildren(e){var t;const n=null!=(t=null==e?void 0:e.__r3f)?t:{};return Boolean(n.handlers)},prepareUpdate(e,t,n,r){if(e.__r3f.primitive&&r.object&&r.object!==e)return[!0];{const{args:t=[],children:i,...a}=r,{args:s=[],children:o,...l}=n;if(!Array.isArray(t))throw new Error("R3F: the args prop must be an array!");if(t.some(((e,t)=>e!==s[t])))return[!0];const u=T(e,a,l,!0);return u.changes.length?[!1,u]:null}},commitUpdate(e,[t,i],a,s,o,u){t?function(e,t,i,a){var s;const o=null==(s=e.__r3f)?void 0:s.parent;if(!o)return;const u=n(t,i,e.__r3f.root);if(e.children){for(const t of e.children)t.__r3f&&r(u,t);e.children=e.children.filter((e=>!e.__r3f))}e.__r3f.objects.forEach((e=>r(u,e))),e.__r3f.objects=[],e.__r3f.autoRemovedBeforeAppend||l(o,e),u.parent&&(u.__r3f.autoRemovedBeforeAppend=!0),r(o,u),u.raycast&&u.__r3f.eventCount&&u.__r3f.root.getState().internal.interaction.push(u),[a,a.alternate].forEach((e=>{null!==e&&(e.stateNode=u,e.ref&&("function"==typeof e.ref?e.ref(u):e.ref.current=u))}))}(e,a,o,u):B(e,i)},commitMount(e,t,n,r){var i;const a=null!=(i=e.__r3f)?i:{};e.raycast&&a.handlers&&a.eventCount&&e.__r3f.root.getState().internal.interaction.push(e)},getPublicInstance:e=>e,prepareForCommit:()=>null,preparePortalMount:e=>M(e.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(e){var t;const{attach:n,parent:r}=null!=(t=e.__r3f)?t:{};n&&r&&E(r,e,n),e.isObject3D&&(e.visible=!1),P(e)},unhideInstance(e,t){var n;const{attach:r,parent:i}=null!=(n=e.__r3f)?n:{};r&&i&&C(i,e,r),(e.isObject3D&&null==t.visible||t.visible)&&(e.visible=!0),P(e)},createTextInstance:u,hideTextInstance:u,unhideTextInstance:u,getCurrentEventPriority:()=>t?t():o.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:"undefined"!=typeof performance&&w.fun(performance.now)?performance.now:w.fun(Date.now)?Date.now:()=>0,scheduleTimeout:w.fun(setTimeout)?setTimeout:void 0,cancelTimeout:w.fun(clearTimeout)?clearTimeout:void 0}),applyProps:B}}(0,(function(){var e;const t="undefined"!=typeof self&&self||"undefined"!=typeof window&&window;if(!t)return o.DefaultEventPriority;switch(null==(e=t.event)?void 0:e.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return o.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return o.ContinuousEventPriority;default:return o.DefaultEventPriority}})),se={objects:"shallow",strict:!1},oe=(e,t)=>{const n="function"==typeof e?e(t):e;return z(n)?n:new a.WebGLRenderer({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0,...e})};function le(e){const t=te.get(e),n=null==t?void 0:t.fiber,r=null==t?void 0:t.store;t&&console.warn("R3F.createRoot should only be called once!");const i="function"==typeof reportError?reportError:console.error,u=r||((e,t)=>{const n=(0,l.Z)(((n,r)=>{const i=new a.Vector3,o=new a.Vector3,l=new a.Vector3;function u(e=r().camera,t=o,n=r().size){const{width:s,height:u,top:c,left:h}=n,d=s/u;t instanceof a.Vector3?l.copy(t):l.set(...t);const p=e.getWorldPosition(i).distanceTo(l);if(f(e))return{width:s/e.zoom,height:u/e.zoom,top:c,left:h,factor:1,distance:p,aspect:d};{const t=e.fov*Math.PI/180,n=2*Math.tan(t/2)*p,r=n*(s/u);return{width:r,height:n,top:c,left:h,factor:s/r,distance:p,aspect:d}}}let c;const h=e=>n((t=>({performance:{...t.performance,current:e}}))),d=new a.Vector2,p={set:n,get:r,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,invalidate:(t=1)=>e(r(),t),advance:(e,n)=>t(e,n,r()),legacy:!1,linear:!1,flat:!1,scene:M(new a.Scene),controls:null,clock:new a.Clock,pointer:d,mouse:d,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const e=r();c&&clearTimeout(c),e.performance.current!==e.performance.min&&h(e.performance.min),c=setTimeout((()=>h(r().performance.max)),e.performance.debounce)}},size:{width:0,height:0,top:0,left:0,updateStyle:!1},viewport:{initialDpr:0,dpr:0,width:0,height:0,top:0,left:0,aspect:0,distance:0,factor:0,getCurrentViewport:u},setEvents:e=>n((t=>({...t,events:{...t.events,...e}}))),setSize:(e,t,i,a,s)=>{const l=r().camera,c={width:e,height:t,top:a||0,left:s||0,updateStyle:i};n((e=>({size:c,viewport:{...e.viewport,...u(l,o,c)}})))},setDpr:e=>n((t=>{const n=b(e);return{viewport:{...t.viewport,dpr:n,initialDpr:t.viewport.initialDpr||n}}})),setFrameloop:(e="always")=>{const t=r().clock;t.stop(),t.elapsedTime=0,"never"!==e&&(t.start(),t.elapsedTime=0),n((()=>({frameloop:e})))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:s.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(e,t,n)=>{const i=r().internal;return i.priority=i.priority+(t>0?1:0),i.subscribers.push({ref:e,priority:t,store:n}),i.subscribers=i.subscribers.sort(((e,t)=>e.priority-t.priority)),()=>{const n=r().internal;null!=n&&n.subscribers&&(n.priority=n.priority-(t>0?1:0),n.subscribers=n.subscribers.filter((t=>t.ref!==e)))}}}};return p})),r=n.getState();let i=r.size,o=r.viewport.dpr,u=r.camera;return n.subscribe((()=>{const{camera:e,size:t,viewport:r,gl:a,set:s}=n.getState();t===i&&r.dpr===o||(i=t,o=r.dpr,L(e,t),a.setPixelRatio(r.dpr),a.setSize(t.width,t.height,t.updateStyle)),e!==u&&(u=e,s((t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}}))))})),n.subscribe((t=>e(t))),n})(ne,re),c=n||ie.createContainer(u,o.ConcurrentRoot,null,!1,null,"",i,null);let h;t||te.set(e,{fiber:c,store:u});let d=!1;return{configure(t={}){let{gl:n,size:r,events:i,onCreated:s,shadows:o=!1,linear:l=!1,flat:c=!1,legacy:f=!1,orthographic:p=!1,frameloop:m="always",dpr:g=[1,2],performance:v,raycaster:y,camera:x,onPointerMissed:_}=t,M=u.getState(),S=M.gl;M.gl||M.set({gl:S=oe(n,e)});let A=M.raycaster;A||M.set({raycaster:A=new a.Raycaster});const{params:C,...E}=y||{};if(w.equ(E,A,se)||ae(A,{...E}),w.equ(C,A.params,se)||ae(A,{params:{...A.params,...C}}),!M.camera){const e=x instanceof a.Camera,t=e?x:p?new a.OrthographicCamera(0,0,0,0,.1,1e3):new a.PerspectiveCamera(75,0,.1,1e3);e||(t.position.z=5,x&&ae(t,x),null!=x&&x.rotation||t.lookAt(0,0,0)),M.set({camera:t})}if(!M.xr){const e=(e,t)=>{const n=u.getState();"never"!==n.frameloop&&re(e,!0,n,t)},t=()=>{const t=u.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||ne(t)},n={connect(){const e=u.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){const e=u.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};S.xr&&n.connect(),M.set({xr:n})}if(S.shadowMap){const e=S.shadowMap.enabled,t=S.shadowMap.type;if(S.shadowMap.enabled=!!o,w.boo(o))S.shadowMap.type=a.PCFSoftShadowMap;else if(w.str(o)){var T;const e={basic:a.BasicShadowMap,percentage:a.PCFShadowMap,soft:a.PCFSoftShadowMap,variance:a.VSMShadowMap};S.shadowMap.type=null!=(T=e[o])?T:a.PCFSoftShadowMap}else w.obj(o)&&Object.assign(S.shadowMap,o);e===S.shadowMap.enabled&&t===S.shadowMap.type||(S.shadowMap.needsUpdate=!0)}!function(e,t,n){const r=n.pop(),i=n.reduce(((e,t)=>e[t]),e);i[r]=t}(a,f,["ColorManagement","legacyMode"]);const B=l?a.LinearEncoding:a.sRGBEncoding,P=c?a.NoToneMapping:a.ACESFilmicToneMapping;S.outputEncoding!==B&&(S.outputEncoding=B),S.toneMapping!==P&&(S.toneMapping=P),M.legacy!==f&&M.set((()=>({legacy:f}))),M.linear!==l&&M.set((()=>({linear:l}))),M.flat!==c&&M.set((()=>({flat:c}))),!n||w.fun(n)||z(n)||w.equ(n,S,se)||ae(S,n),i&&!M.events.handlers&&M.set({events:i(u)}),g&&M.viewport.dpr!==b(g)&&M.setDpr(g);const R=function(e,t){if(t)return t;if(e instanceof HTMLCanvasElement&&e.parentElement){const{width:t,height:n,top:r,left:i}=e.parentElement.getBoundingClientRect();return{width:t,height:n,top:r,left:i}}return{width:0,height:0,top:0,left:0}}(e,r);return w.equ(R,M.size,se)||M.setSize(R.width,R.height,R.updateStyle,R.top,R.left),M.frameloop!==m&&M.setFrameloop(m),M.onPointerMissed||M.set({onPointerMissed:_}),v&&!w.equ(v,M.performance,se)&&M.set((e=>({performance:{...e.performance,...v}}))),h=s,d=!0,this},render(t){return d||this.configure(),ie.updateContainer(s.createElement(ue,{store:u,children:t,onCreated:h,rootElement:e}),c,null,(()=>{})),u},unmount(){ce(e)}}}function ue({store:e,children:t,onCreated:n,rootElement:r}){return m((()=>{const t=e.getState();t.set((e=>({internal:{...e.internal,active:!0}}))),n&&n(t),e.getState().events.connected||null==t.events.connect||t.events.connect(r)}),[]),s.createElement(U.Provider,{value:e},t)}function ce(e,t){const n=te.get(e),r=null==n?void 0:n.fiber;if(r){const i=null==n?void 0:n.store.getState();i&&(i.internal.active=!1),ie.updateContainer(null,r,null,(()=>{i&&setTimeout((()=>{try{var n,r,a,s;null==i.events.disconnect||i.events.disconnect(),null==(n=i.gl)||null==(r=n.renderLists)||null==r.dispose||r.dispose(),null==(a=i.gl)||null==a.forceContextLoss||a.forceContextLoss(),null!=(s=i.gl)&&s.xr&&i.xr.disconnect(),function(e){e.dispose&&"Scene"!==e.type&&e.dispose();for(const t in e)null==t.dispose||t.dispose(),delete e[t]}(i),te.delete(e),t&&t(e)}catch(e){}}),500)}))}}function he(e,t,n){return s.createElement(de,{key:t.uuid,children:e,container:t,state:n})}function de({state:e={},children:t,container:n}){const{events:r,size:i,...o}=e,u=q(),[c]=s.useState((()=>new a.Raycaster)),[h]=s.useState((()=>new a.Vector2)),d=s.useCallback(((e,t)=>{const s={...e};let l;if(Object.keys(e).forEach((n=>{(N.includes(n)||e[n]!==t[n])&&delete s[n]})),t&&i){const n=t.camera;l=e.viewport.getCurrentViewport(n,new a.Vector3,i),n!==e.camera&&L(n,i)}return{...s,scene:n,raycaster:c,pointer:h,mouse:h,previousRoot:u,events:{...e.events,...null==t?void 0:t.events,...r},size:{...e.size,...i},viewport:{...e.viewport,...l},...o}}),[e]),[f]=s.useState((()=>{const e=u.getState(),t=(0,l.Z)(((t,a)=>({...e,scene:n,raycaster:c,pointer:h,mouse:h,previousRoot:u,events:{...e.events,...r},size:{...e.size,...i},...o,set:t,get:a,setEvents:e=>t((t=>({...t,events:{...t.events,...e}})))})));return t}));return s.useEffect((()=>{const e=u.subscribe((e=>f.setState((t=>d(e,t)))));return()=>{e(),f.destroy()}}),[]),s.useEffect((()=>{f.setState((e=>d(u.getState(),e)))}),[d]),s.createElement(s.Fragment,null,ie.createPortal(s.createElement(U.Provider,{value:f},t),f,null))}ie.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:s.version}),s.unstable_act},8628:(e,t,n)=>{"use strict";n.d(t,{Xz:()=>d});var r=n(8715),i=n(7462),a=n(7294),s=n(9477),o=n(3460),l=n(3213);n(2576),n(6525),n(5431);const u={onClick:["click",!1],onContextMenu:["contextmenu",!1],onDoubleClick:["dblclick",!1],onWheel:["wheel",!0],onPointerDown:["pointerdown",!0],onPointerUp:["pointerup",!0],onPointerLeave:["pointerleave",!0],onPointerMove:["pointermove",!0],onPointerCancel:["pointercancel",!0],onLostPointerCapture:["lostpointercapture",!0]};function c(e){const{handlePointer:t}=(0,r.c)(e);return{priority:1,enabled:!0,compute(e,t,n){t.pointer.set(e.offsetX/t.size.width*2-1,-e.offsetY/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)},connected:void 0,handlers:Object.keys(u).reduce(((e,n)=>({...e,[n]:t(n)})),{}),connect:t=>{var n;const{set:r,events:i}=e.getState();null==i.disconnect||i.disconnect(),r((e=>({events:{...e.events,connected:t}}))),Object.entries(null!=(n=i.handlers)?n:[]).forEach((([e,n])=>{const[r,i]=u[e];t.addEventListener(r,n,{passive:i})}))},disconnect:()=>{const{set:t,events:n}=e.getState();var r;n.connected&&(Object.entries(null!=(r=n.handlers)?r:[]).forEach((([e,t])=>{if(n&&n.connected instanceof HTMLElement){const[r]=u[e];n.connected.removeEventListener(r,t)}})),t((e=>({events:{...e.events,connected:void 0}}))))}}}const h=a.forwardRef((function({children:e,fallback:t,resize:n,style:u,gl:h,events:d=c,eventSource:f,eventPrefix:p,shadows:m,linear:g,flat:v,legacy:y,orthographic:x,frameloop:b,dpr:_,performance:w,raycaster:M,camera:S,onPointerMissed:A,onCreated:C,...E},T){a.useMemo((()=>(0,r.e)(s)),[]);const B=(0,l.jn)(),[P,R]=(0,o.Z)({scroll:!0,debounce:{scroll:50,resize:0},...n}),L=a.useRef(null),D=a.useRef(null),[I,k]=a.useState(null);a.useImperativeHandle(T,(()=>L.current));const F=(0,r.u)(A),[O,N]=a.useState(!1),[z,U]=a.useState(!1);if(O)throw O;if(z)throw z;const G=a.useRef(null);R.width>0&&R.height>0&&I&&(G.current||(G.current=(0,r.a)(I)),G.current.configure({gl:h,events:d,shadows:m,linear:g,flat:v,legacy:y,orthographic:x,frameloop:b,dpr:_,performance:w,raycaster:M,camera:S,size:R,onPointerMissed:(...e)=>null==F.current?void 0:F.current(...e),onCreated:e=>{null==e.events.connect||e.events.connect(f?(0,r.i)(f)?f.current:f:D.current),p&&e.setEvents({compute:(e,t)=>{const n=e[p+"X"],r=e[p+"Y"];t.pointer.set(n/t.size.width*2-1,-r/t.size.height*2+1),t.raycaster.setFromCamera(t.pointer,t.camera)}}),null==C||C(e)}}),G.current.render(a.createElement(B,null,a.createElement(r.E,{set:U},a.createElement(a.Suspense,{fallback:a.createElement(r.B,{set:N})},e))))),(0,r.b)((()=>{k(L.current)}),[]),a.useEffect((()=>{if(I)return()=>(0,r.d)(I)}),[I]);const H=f?"none":"auto";return a.createElement("div",(0,i.Z)({ref:D,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:H,...u}},E),a.createElement("div",{ref:P,style:{width:"100%",height:"100%"}},a.createElement("canvas",{ref:L,style:{display:"block"}},t)))})),d=a.forwardRef((function(e,t){return a.createElement(l.Hn,null,a.createElement(h,(0,i.Z)({},e,{ref:t})))}))},1906:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var o=2*(r+1)-1,l=e[o],u=o+1,c=e[u];if(0>a(l,n))u<i&&0>a(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[o]=n,r=o);else{if(!(u<i&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var u=[],c=[],h=1,d=null,f=3,p=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function _(e){if(g=!1,b(e),!m)if(null!==r(u))m=!0,D(w);else{var t=r(c);null!==t&&I(_,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,y(C),C=-1),p=!0;var a=f;try{for(b(n),d=r(u);null!==d&&(!(d.expirationTime>n)||e&&!B());){var s=d.callback;if("function"==typeof s){d.callback=null,f=d.priorityLevel;var o=s(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof o?d.callback=o:d===r(u)&&i(u),b(n)}else i(u);d=r(u)}if(null!==d)var l=!0;else{var h=r(c);null!==h&&I(_,h.startTime-n),l=!1}return l}finally{d=null,f=a,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var M,S=!1,A=null,C=-1,E=5,T=-1;function B(){return!(t.unstable_now()-T<E)}function P(){if(null!==A){var e=t.unstable_now();T=e;var n=!0;try{n=A(!0,e)}finally{n?M():(S=!1,A=null)}}else S=!1}if("function"==typeof x)M=function(){x(P)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,L=R.port2;R.port1.onmessage=P,M=function(){L.postMessage(null)}}else M=function(){v(P,0)};function D(e){A=e,S||(S=!0,M())}function I(e,n){C=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,D(w))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:h++,callback:i,priorityLevel:e,startTime:a,expirationTime:o=a+o,sortIndex:-1},a>s?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(g?(y(C),C=-1):g=!0,I(_,a-s))):(e.sortIndex=o,n(u,e),m||p||(m=!0,D(w))),e},t.unstable_shouldYield=B,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},5431:(e,t,n)=>{"use strict";e.exports=n(1906)},296:e=>{function t(e,t,n){var r,i,a,s,o;function l(){var u=Date.now()-s;u<t&&u>=0?r=setTimeout(l,t-u):(r=null,n||(o=e.apply(a,i),a=i=null))}null==t&&(t=100);var u=function(){a=this,i=arguments,s=Date.now();var u=n&&!r;return r||(r=setTimeout(l,t)),u&&(o=e.apply(a,i),a=i=null),o};return u.clear=function(){r&&(clearTimeout(r),r=null)},u.flush=function(){r&&(o=e.apply(a,i),a=i=null,clearTimeout(r),r=null)},u}t.debounce=t,e.exports=t},3778:(e,t,n)=>{"use strict";n.d(t,{HT:()=>T});var r=Uint8Array,i=Uint16Array,a=Uint32Array,s=new r([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,0,0,0]),o=new r([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,0,0]),l=new r([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),u=function(e,t){for(var n=new i(31),r=0;r<31;++r)n[r]=t+=1<<e[r-1];var s=new a(n[30]);for(r=1;r<30;++r)for(var o=n[r];o<n[r+1];++o)s[o]=o-n[r]<<5|r;return[n,s]},c=u(s,2),h=c[0],d=c[1];h[28]=258,d[258]=28;for(var f=u(o,0),p=f[0],m=(f[1],new i(32768)),g=0;g<32768;++g){var v=(43690&g)>>>1|(21845&g)<<1;v=(61680&(v=(52428&v)>>>2|(13107&v)<<2))>>>4|(3855&v)<<4,m[g]=((65280&v)>>>8|(255&v)<<8)>>>1}var y=function(e,t,n){for(var r=e.length,a=0,s=new i(t);a<r;++a)++s[e[a]-1];var o,l=new i(t);for(a=0;a<t;++a)l[a]=l[a-1]+s[a-1]<<1;if(n){o=new i(1<<t);var u=15-t;for(a=0;a<r;++a)if(e[a])for(var c=a<<4|e[a],h=t-e[a],d=l[e[a]-1]++<<h,f=d|(1<<h)-1;d<=f;++d)o[m[d]>>>u]=c}else for(o=new i(r),a=0;a<r;++a)e[a]&&(o[a]=m[l[e[a]-1]++]>>>15-e[a]);return o},x=new r(288);for(g=0;g<144;++g)x[g]=8;for(g=144;g<256;++g)x[g]=9;for(g=256;g<280;++g)x[g]=7;for(g=280;g<288;++g)x[g]=8;var b=new r(32);for(g=0;g<32;++g)b[g]=5;var _=y(x,9,1),w=y(b,5,1),M=function(e){for(var t=e[0],n=1;n<e.length;++n)e[n]>t&&(t=e[n]);return t},S=function(e,t,n){var r=t/8|0;return(e[r]|e[r+1]<<8)>>(7&t)&n},A=function(e,t){var n=t/8|0;return(e[n]|e[n+1]<<8|e[n+2]<<16)>>(7&t)},C=function(e,t,n){var u=e.length;if(!u||n&&!n.l&&u<5)return t||new r(0);var c=!t||n,d=!n||n.i;n||(n={}),t||(t=new r(3*u));var f,m=function(e){var n=t.length;if(e>n){var i=new r(Math.max(2*n,e));i.set(t),t=i}},g=n.f||0,v=n.p||0,x=n.b||0,b=n.l,C=n.d,E=n.m,T=n.n,B=8*u;do{if(!b){n.f=g=S(e,v,1);var P=S(e,v+1,3);if(v+=3,!P){var R=e[(f=v,(H=(f/8|0)+(7&f&&1)+4)-4)]|e[H-3]<<8,L=H+R;if(L>u){if(d)throw"unexpected EOF";break}c&&m(x+R),t.set(e.subarray(H,L),x),n.b=x+=R,n.p=v=8*L;continue}if(1==P)b=_,C=w,E=9,T=5;else{if(2!=P)throw"invalid block type";var D=S(e,v,31)+257,I=S(e,v+10,15)+4,k=D+S(e,v+5,31)+1;v+=14;for(var F=new r(k),O=new r(19),N=0;N<I;++N)O[l[N]]=S(e,v+3*N,7);v+=3*I;var z=M(O),U=(1<<z)-1,G=y(O,z,1);for(N=0;N<k;){var H,V=G[S(e,v,U)];if(v+=15&V,(H=V>>>4)<16)F[N++]=H;else{var W=0,j=0;for(16==H?(j=3+S(e,v,3),v+=2,W=F[N-1]):17==H?(j=3+S(e,v,7),v+=3):18==H&&(j=11+S(e,v,127),v+=7);j--;)F[N++]=W}}var J=F.subarray(0,D),X=F.subarray(D);E=M(J),T=M(X),b=y(J,E,1),C=y(X,T,1)}if(v>B){if(d)throw"unexpected EOF";break}}c&&m(x+131072);for(var Y=(1<<E)-1,K=(1<<T)-1,q=v;;q=v){var Q=(W=b[A(e,v)&Y])>>>4;if((v+=15&W)>B){if(d)throw"unexpected EOF";break}if(!W)throw"invalid length/literal";if(Q<256)t[x++]=Q;else{if(256==Q){q=v,b=null;break}var Z=Q-254;if(Q>264){var $=s[N=Q-257];Z=S(e,v,(1<<$)-1)+h[N],v+=$}var ee=C[A(e,v)&K],te=ee>>>4;if(!ee)throw"invalid distance";if(v+=15&ee,X=p[te],te>3&&($=o[te],X+=A(e,v)&(1<<$)-1,v+=$),v>B){if(d)throw"unexpected EOF";break}c&&m(x+131072);for(var ne=x+Z;x<ne;x+=4)t[x]=t[x-X],t[x+1]=t[x+1-X],t[x+2]=t[x+2-X],t[x+3]=t[x+3-X];x=ne}}n.l=b,n.p=q,n.b=x,b&&(g=1,n.m=E,n.d=C,n.n=T)}while(!g);return x==t.length?t:function(e,t,n){(null==t||t<0)&&(t=0),(null==n||n>e.length)&&(n=e.length);var s=new(e instanceof i?i:e instanceof a?a:r)(n-t);return s.set(e.subarray(t,n)),s}(t,0,x)},E=new r(0);function T(e,t){return C((function(e){if(8!=(15&e[0])||e[0]>>>4>7||(e[0]<<8|e[1])%31)throw"invalid zlib data";if(32&e[1])throw"invalid zlib data: preset dictionaries not supported"}(e),e.subarray(2,-4)),t)}var B="undefined"!=typeof TextDecoder&&new TextDecoder;try{B.decode(E,{stream:!0})}catch(e){}},9975:(e,t,n)=>{"use strict";n.d(t,{_Z:()=>Se});var r,i,a,s,o,l,u,c,h=n(5317),d={},f=180/Math.PI,p=Math.PI/180,m=Math.atan2,g=/([A-Z])/g,v=/(left|right|width|margin|padding|x)/i,y=/[\s,\(]\S/,x={autoAlpha:"opacity,visibility",scale:"scaleX,scaleY",alpha:"opacity"},b=function(e,t){return t.set(t.t,t.p,Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},_=function(e,t){return t.set(t.t,t.p,1===e?t.e:Math.round(1e4*(t.s+t.c*e))/1e4+t.u,t)},w=function(e,t){return t.set(t.t,t.p,e?Math.round(1e4*(t.s+t.c*e))/1e4+t.u:t.b,t)},M=function(e,t){var n=t.s+t.c*e;t.set(t.t,t.p,~~(n+(n<0?-.5:.5))+t.u,t)},S=function(e,t){return t.set(t.t,t.p,e?t.e:t.b,t)},A=function(e,t){return t.set(t.t,t.p,1!==e?t.b:t.e,t)},C=function(e,t,n){return e.style[t]=n},E=function(e,t,n){return e.style.setProperty(t,n)},T=function(e,t,n){return e._gsap[t]=n},B=function(e,t,n){return e._gsap.scaleX=e._gsap.scaleY=n},P=function(e,t,n,r,i){var a=e._gsap;a.scaleX=a.scaleY=n,a.renderTransform(i,a)},R=function(e,t,n,r,i){var a=e._gsap;a[t]=n,a.renderTransform(i,a)},L="transform",D=L+"Origin",I=function(e,t){var n=this,r=this.target,i=r.style;if(e in d){if(this.tfm=this.tfm||{},"transform"!==e&&(~(e=x[e]||e).indexOf(",")?e.split(",").forEach((function(e){return n.tfm[e]=Z(r,e)})):this.tfm[e]=r._gsap.x?r._gsap[e]:Z(r,e)),this.props.indexOf(L)>=0)return;r._gsap.svg&&(this.svgo=r.getAttribute("data-svg-origin"),this.props.push(D,t,"")),e=L}(i||t)&&this.props.push(e,t,i[e])},k=function(e){e.translate&&(e.removeProperty("translate"),e.removeProperty("scale"),e.removeProperty("rotate"))},F=function(){var e,t,n=this.props,r=this.target,i=r.style,a=r._gsap;for(e=0;e<n.length;e+=3)n[e+1]?r[n[e]]=n[e+2]:n[e+2]?i[n[e]]=n[e+2]:i.removeProperty(n[e].replace(g,"-$1").toLowerCase());if(this.tfm){for(t in this.tfm)a[t]=this.tfm[t];a.svg&&(a.renderTransform(),r.setAttribute("data-svg-origin",this.svgo||"")),!(e=u())||e.isStart||i[L]||(k(i),a.uncache=1)}},O=function(e,t){var n={target:e,props:[],revert:F,save:I};return t&&t.split(",").forEach((function(e){return n.save(e)})),n},N=function(e,t){var n=i.createElementNS?i.createElementNS((t||"http://www.w3.org/1999/xhtml").replace(/^https/,"http"),e):i.createElement(e);return n.style?n:i.createElement(e)},z=function e(t,n,r){var i=getComputedStyle(t);return i[n]||i.getPropertyValue(n.replace(g,"-$1").toLowerCase())||i.getPropertyValue(n)||!r&&e(t,G(n)||n,1)||""},U="O,Moz,ms,Ms,Webkit".split(","),G=function(e,t,n){var r=(t||o).style,i=5;if(e in r&&!n)return e;for(e=e.charAt(0).toUpperCase()+e.substr(1);i--&&!(U[i]+e in r););return i<0?null:(3===i?"ms":i>=0?U[i]:"")+e},H=function(){"undefined"!=typeof window&&window.document&&(r=window,i=r.document,a=i.documentElement,o=N("div")||{style:{}},N("div"),L=G(L),D=L+"Origin",o.style.cssText="border-width:0;line-height:0;position:absolute;padding:0",c=!!G("perspective"),u=h.p8.core.reverting,s=1)},V=function e(t){var n,r=N("svg",this.ownerSVGElement&&this.ownerSVGElement.getAttribute("xmlns")||"http://www.w3.org/2000/svg"),i=this.parentNode,s=this.nextSibling,o=this.style.cssText;if(a.appendChild(r),r.appendChild(this),this.style.display="block",t)try{n=this.getBBox(),this._gsapBBox=this.getBBox,this.getBBox=e}catch(e){}else this._gsapBBox&&(n=this._gsapBBox());return i&&(s?i.insertBefore(this,s):i.appendChild(this)),a.removeChild(r),this.style.cssText=o,n},W=function(e,t){for(var n=t.length;n--;)if(e.hasAttribute(t[n]))return e.getAttribute(t[n])},j=function(e){var t;try{t=e.getBBox()}catch(n){t=V.call(e,!0)}return t&&(t.width||t.height)||e.getBBox===V||(t=V.call(e,!0)),!t||t.width||t.x||t.y?t:{x:+W(e,["x","cx","x1"])||0,y:+W(e,["y","cy","y1"])||0,width:0,height:0}},J=function(e){return!(!e.getCTM||e.parentNode&&!e.ownerSVGElement||!j(e))},X=function(e,t){if(t){var n=e.style;t in d&&t!==D&&(t=L),n.removeProperty?("ms"!==t.substr(0,2)&&"webkit"!==t.substr(0,6)||(t="-"+t),n.removeProperty(t.replace(g,"-$1").toLowerCase())):n.removeAttribute(t)}},Y=function(e,t,n,r,i,a){var s=new h.Fo(e._pt,t,n,0,1,a?A:S);return e._pt=s,s.b=r,s.e=i,e._props.push(n),s},K={deg:1,rad:1,turn:1},q={grid:1,flex:1},Q=function e(t,n,r,a){var s,l,u,c,f=parseFloat(r)||0,p=(r+"").trim().substr((f+"").length)||"px",m=o.style,g=v.test(n),y="svg"===t.tagName.toLowerCase(),x=(y?"client":"offset")+(g?"Width":"Height"),b=100,_="px"===a,w="%"===a;return a===p||!f||K[a]||K[p]?f:("px"!==p&&!_&&(f=e(t,n,r,"px")),c=t.getCTM&&J(t),!w&&"%"!==p||!d[n]&&!~n.indexOf("adius")?(m[g?"width":"height"]=b+(_?p:a),l=~n.indexOf("adius")||"em"===a&&t.appendChild&&!y?t:t.parentNode,c&&(l=(t.ownerSVGElement||{}).parentNode),l&&l!==i&&l.appendChild||(l=i.body),(u=l._gsap)&&w&&u.width&&g&&u.time===h.xr.time&&!u.uncache?(0,h.Pr)(f/u.width*b):((w||"%"===p)&&!q[z(l,"display")]&&(m.position=z(t,"position")),l===t&&(m.position="static"),l.appendChild(o),s=o[x],l.removeChild(o),m.position="absolute",g&&w&&((u=(0,h.DY)(l)).time=h.xr.time,u.width=l[x]),(0,h.Pr)(_?s*f/b:s&&f?b/s*f:0))):(s=c?t.getBBox()[g?"width":"height"]:t[x],(0,h.Pr)(w?f/s*b:f/100*s)))},Z=function(e,t,n,r){var i;return s||H(),t in x&&"transform"!==t&&~(t=x[t]).indexOf(",")&&(t=t.split(",")[0]),d[t]&&"transform"!==t?(i=ue(e,r),i="transformOrigin"!==t?i[t]:i.svg?i.origin:ce(z(e,D))+" "+i.zOrigin+"px"):(!(i=e.style[t])||"auto"===i||r||~(i+"").indexOf("calc("))&&(i=ne[t]&&ne[t](e,t,n)||z(e,t)||(0,h.Ok)(e,t)||("opacity"===t?1:0)),n&&!~(i+"").trim().indexOf(" ")?Q(e,t,i,n)+n:i},$=function(e,t,n,r){if(!n||"none"===n){var i=G(t,e,1),a=i&&z(e,i,1);a&&a!==n?(t=i,n=a):"borderColor"===t&&(n=z(e,"borderTopColor"))}var s,o,l,u,c,d,f,p,m,g,v,y=new h.Fo(this._pt,e.style,t,0,1,h.Ks),x=0,b=0;if(y.b=n,y.e=r,n+="","auto"==(r+="")&&(e.style[t]=r,r=z(e,t)||r,e.style[t]=n),s=[n,r],(0,h.kr)(s),r=s[1],l=(n=s[0]).match(h.d4)||[],(r.match(h.d4)||[]).length){for(;o=h.d4.exec(r);)f=o[0],m=r.substring(x,o.index),c?c=(c+1)%5:"rgba("!==m.substr(-5)&&"hsla("!==m.substr(-5)||(c=1),f!==(d=l[b++]||"")&&(u=parseFloat(d)||0,v=d.substr((u+"").length),"="===f.charAt(1)&&(f=(0,h.cy)(u,f)+v),p=parseFloat(f),g=f.substr((p+"").length),x=h.d4.lastIndex-g.length,g||(g=g||h.Fc.units[t]||v,x===r.length&&(r+=g,y.e+=g)),v!==g&&(u=Q(e,t,d,g)||0),y._pt={_next:y._pt,p:m||1===b?m:",",s:u,c:p-u,m:c&&c<4||"zIndex"===t?Math.round:0});y.c=x<r.length?r.substring(x,r.length):""}else y.r="display"===t&&"none"===r?A:S;return h.bQ.test(r)&&(y.e=0),this._pt=y,y},ee={top:"0%",bottom:"100%",left:"0%",right:"100%",center:"50%"},te=function(e,t){if(t.tween&&t.tween._time===t.tween._dur){var n,r,i,a=t.t,s=a.style,o=t.u,l=a._gsap;if("all"===o||!0===o)s.cssText="",r=1;else for(i=(o=o.split(",")).length;--i>-1;)n=o[i],d[n]&&(r=1,n="transformOrigin"===n?D:L),X(a,n);r&&(X(a,L),l&&(l.svg&&a.removeAttribute("transform"),ue(a,1),l.uncache=1,k(s)))}},ne={clearProps:function(e,t,n,r,i){if("isFromStart"!==i.data){var a=e._pt=new h.Fo(e._pt,t,n,0,0,te);return a.u=r,a.pr=-10,a.tween=i,e._props.push(n),1}}},re=[1,0,0,1,0,0],ie={},ae=function(e){return"matrix(1, 0, 0, 1, 0, 0)"===e||"none"===e||!e},se=function(e){var t=z(e,L);return ae(t)?re:t.substr(7).match(h.SI).map(h.Pr)},oe=function(e,t){var n,r,i,s,o=e._gsap||(0,h.DY)(e),l=e.style,u=se(e);return o.svg&&e.getAttribute("transform")?"1,0,0,1,0,0"===(u=[(i=e.transform.baseVal.consolidate().matrix).a,i.b,i.c,i.d,i.e,i.f]).join(",")?re:u:(u!==re||e.offsetParent||e===a||o.svg||(i=l.display,l.display="block",(n=e.parentNode)&&e.offsetParent||(s=1,r=e.nextElementSibling,a.appendChild(e)),u=se(e),i?l.display=i:X(e,"display"),s&&(r?n.insertBefore(e,r):n?n.appendChild(e):a.removeChild(e))),t&&u.length>6?[u[0],u[1],u[4],u[5],u[12],u[13]]:u)},le=function(e,t,n,r,i,a){var s,o,l,u=e._gsap,c=i||oe(e,!0),h=u.xOrigin||0,d=u.yOrigin||0,f=u.xOffset||0,p=u.yOffset||0,m=c[0],g=c[1],v=c[2],y=c[3],x=c[4],b=c[5],_=t.split(" "),w=parseFloat(_[0])||0,M=parseFloat(_[1])||0;n?c!==re&&(o=m*y-g*v)&&(l=w*(-g/o)+M*(m/o)-(m*b-g*x)/o,w=w*(y/o)+M*(-v/o)+(v*b-y*x)/o,M=l):(w=(s=j(e)).x+(~_[0].indexOf("%")?w/100*s.width:w),M=s.y+(~(_[1]||_[0]).indexOf("%")?M/100*s.height:M)),r||!1!==r&&u.smooth?(x=w-h,b=M-d,u.xOffset=f+(x*m+b*v)-x,u.yOffset=p+(x*g+b*y)-b):u.xOffset=u.yOffset=0,u.xOrigin=w,u.yOrigin=M,u.smooth=!!r,u.origin=t,u.originIsAbsolute=!!n,e.style[D]="0px 0px",a&&(Y(a,u,"xOrigin",h,w),Y(a,u,"yOrigin",d,M),Y(a,u,"xOffset",f,u.xOffset),Y(a,u,"yOffset",p,u.yOffset)),e.setAttribute("data-svg-origin",w+" "+M)},ue=function(e,t){var n=e._gsap||new h.l1(e);if("x"in n&&!t&&!n.uncache)return n;var r,i,a,s,o,l,u,d,g,v,y,x,b,_,w,M,S,A,C,E,T,B,P,R,I,k,F,O,N,U,G,H,V=e.style,W=n.scaleX<0,j="px",X="deg",Y=getComputedStyle(e),K=z(e,D)||"0";return r=i=a=l=u=d=g=v=y=0,s=o=1,n.svg=!(!e.getCTM||!J(e)),Y.translate&&("none"===Y.translate&&"none"===Y.scale&&"none"===Y.rotate||(V[L]=("none"!==Y.translate?"translate3d("+(Y.translate+" 0 0").split(" ").slice(0,3).join(", ")+") ":"")+("none"!==Y.rotate?"rotate("+Y.rotate+") ":"")+("none"!==Y.scale?"scale("+Y.scale.split(" ").join(",")+") ":"")+("none"!==Y[L]?Y[L]:"")),V.scale=V.rotate=V.translate="none"),_=oe(e,n.svg),n.svg&&(n.uncache?(I=e.getBBox(),K=n.xOrigin-I.x+"px "+(n.yOrigin-I.y)+"px",R=""):R=!t&&e.getAttribute("data-svg-origin"),le(e,R||K,!!R||n.originIsAbsolute,!1!==n.smooth,_)),x=n.xOrigin||0,b=n.yOrigin||0,_!==re&&(A=_[0],C=_[1],E=_[2],T=_[3],r=B=_[4],i=P=_[5],6===_.length?(s=Math.sqrt(A*A+C*C),o=Math.sqrt(T*T+E*E),l=A||C?m(C,A)*f:0,(g=E||T?m(E,T)*f+l:0)&&(o*=Math.abs(Math.cos(g*p))),n.svg&&(r-=x-(x*A+b*E),i-=b-(x*C+b*T))):(H=_[6],U=_[7],F=_[8],O=_[9],N=_[10],G=_[11],r=_[12],i=_[13],a=_[14],u=(w=m(H,N))*f,w&&(R=B*(M=Math.cos(-w))+F*(S=Math.sin(-w)),I=P*M+O*S,k=H*M+N*S,F=B*-S+F*M,O=P*-S+O*M,N=H*-S+N*M,G=U*-S+G*M,B=R,P=I,H=k),d=(w=m(-E,N))*f,w&&(M=Math.cos(-w),G=T*(S=Math.sin(-w))+G*M,A=R=A*M-F*S,C=I=C*M-O*S,E=k=E*M-N*S),l=(w=m(C,A))*f,w&&(R=A*(M=Math.cos(w))+C*(S=Math.sin(w)),I=B*M+P*S,C=C*M-A*S,P=P*M-B*S,A=R,B=I),u&&Math.abs(u)+Math.abs(l)>359.9&&(u=l=0,d=180-d),s=(0,h.Pr)(Math.sqrt(A*A+C*C+E*E)),o=(0,h.Pr)(Math.sqrt(P*P+H*H)),w=m(B,P),g=Math.abs(w)>2e-4?w*f:0,y=G?1/(G<0?-G:G):0),n.svg&&(R=e.getAttribute("transform"),n.forceCSS=e.setAttribute("transform","")||!ae(z(e,L)),R&&e.setAttribute("transform",R))),Math.abs(g)>90&&Math.abs(g)<270&&(W?(s*=-1,g+=l<=0?180:-180,l+=l<=0?180:-180):(o*=-1,g+=g<=0?180:-180)),t=t||n.uncache,n.x=r-((n.xPercent=r&&(!t&&n.xPercent||(Math.round(e.offsetWidth/2)===Math.round(-r)?-50:0)))?e.offsetWidth*n.xPercent/100:0)+j,n.y=i-((n.yPercent=i&&(!t&&n.yPercent||(Math.round(e.offsetHeight/2)===Math.round(-i)?-50:0)))?e.offsetHeight*n.yPercent/100:0)+j,n.z=a+j,n.scaleX=(0,h.Pr)(s),n.scaleY=(0,h.Pr)(o),n.rotation=(0,h.Pr)(l)+X,n.rotationX=(0,h.Pr)(u)+X,n.rotationY=(0,h.Pr)(d)+X,n.skewX=g+X,n.skewY=v+X,n.transformPerspective=y+j,(n.zOrigin=parseFloat(K.split(" ")[2])||0)&&(V[D]=ce(K)),n.xOffset=n.yOffset=0,n.force3D=h.Fc.force3D,n.renderTransform=n.svg?ve:c?ge:de,n.uncache=0,n},ce=function(e){return(e=e.split(" "))[0]+" "+e[1]},he=function(e,t,n){var r=(0,h.Wy)(t);return(0,h.Pr)(parseFloat(t)+parseFloat(Q(e,"x",n+"px",r)))+r},de=function(e,t){t.z="0px",t.rotationY=t.rotationX="0deg",t.force3D=0,ge(e,t)},fe="0deg",pe="0px",me=") ",ge=function(e,t){var n=t||this,r=n.xPercent,i=n.yPercent,a=n.x,s=n.y,o=n.z,l=n.rotation,u=n.rotationY,c=n.rotationX,h=n.skewX,d=n.skewY,f=n.scaleX,m=n.scaleY,g=n.transformPerspective,v=n.force3D,y=n.target,x=n.zOrigin,b="",_="auto"===v&&e&&1!==e||!0===v;if(x&&(c!==fe||u!==fe)){var w,M=parseFloat(u)*p,S=Math.sin(M),A=Math.cos(M);M=parseFloat(c)*p,w=Math.cos(M),a=he(y,a,S*w*-x),s=he(y,s,-Math.sin(M)*-x),o=he(y,o,A*w*-x+x)}g!==pe&&(b+="perspective("+g+me),(r||i)&&(b+="translate("+r+"%, "+i+"%) "),(_||a!==pe||s!==pe||o!==pe)&&(b+=o!==pe||_?"translate3d("+a+", "+s+", "+o+") ":"translate("+a+", "+s+me),l!==fe&&(b+="rotate("+l+me),u!==fe&&(b+="rotateY("+u+me),c!==fe&&(b+="rotateX("+c+me),h===fe&&d===fe||(b+="skew("+h+", "+d+me),1===f&&1===m||(b+="scale("+f+", "+m+me),y.style[L]=b||"translate(0, 0)"},ve=function(e,t){var n,r,i,a,s,o=t||this,l=o.xPercent,u=o.yPercent,c=o.x,d=o.y,f=o.rotation,m=o.skewX,g=o.skewY,v=o.scaleX,y=o.scaleY,x=o.target,b=o.xOrigin,_=o.yOrigin,w=o.xOffset,M=o.yOffset,S=o.forceCSS,A=parseFloat(c),C=parseFloat(d);f=parseFloat(f),m=parseFloat(m),(g=parseFloat(g))&&(m+=g=parseFloat(g),f+=g),f||m?(f*=p,m*=p,n=Math.cos(f)*v,r=Math.sin(f)*v,i=Math.sin(f-m)*-y,a=Math.cos(f-m)*y,m&&(g*=p,s=Math.tan(m-g),i*=s=Math.sqrt(1+s*s),a*=s,g&&(s=Math.tan(g),n*=s=Math.sqrt(1+s*s),r*=s)),n=(0,h.Pr)(n),r=(0,h.Pr)(r),i=(0,h.Pr)(i),a=(0,h.Pr)(a)):(n=v,a=y,r=i=0),(A&&!~(c+"").indexOf("px")||C&&!~(d+"").indexOf("px"))&&(A=Q(x,"x",c,"px"),C=Q(x,"y",d,"px")),(b||_||w||M)&&(A=(0,h.Pr)(A+b-(b*n+_*i)+w),C=(0,h.Pr)(C+_-(b*r+_*a)+M)),(l||u)&&(s=x.getBBox(),A=(0,h.Pr)(A+l/100*s.width),C=(0,h.Pr)(C+u/100*s.height)),s="matrix("+n+","+r+","+i+","+a+","+A+","+C+")",x.setAttribute("transform",s),S&&(x.style[L]=s)},ye=function(e,t,n,r,i){var a,s,o=360,l=(0,h.r9)(i),u=parseFloat(i)*(l&&~i.indexOf("rad")?f:1)-r,c=r+u+"deg";return l&&("short"===(a=i.split("_")[1])&&(u%=o)!=u%180&&(u+=u<0?o:-360),"cw"===a&&u<0?u=(u+36e9)%o-~~(u/o)*o:"ccw"===a&&u>0&&(u=(u-36e9)%o-~~(u/o)*o)),e._pt=s=new h.Fo(e._pt,t,n,r,u,_),s.e=c,s.u="deg",e._props.push(n),s},xe=function(e,t){for(var n in t)e[n]=t[n];return e},be=function(e,t,n){var r,i,a,s,o,l,u,c=xe({},n._gsap),f=n.style;for(i in c.svg?(a=n.getAttribute("transform"),n.setAttribute("transform",""),f[L]=t,r=ue(n,1),X(n,L),n.setAttribute("transform",a)):(a=getComputedStyle(n)[L],f[L]=t,r=ue(n,1),f[L]=a),d)(a=c[i])!==(s=r[i])&&"perspective,force3D,transformOrigin,svgOrigin".indexOf(i)<0&&(o=(0,h.Wy)(a)!==(u=(0,h.Wy)(s))?Q(n,i,a,u):parseFloat(a),l=parseFloat(s),e._pt=new h.Fo(e._pt,r,i,o,l-o,b),e._pt.u=u||0,e._props.push(i));xe(r,c)};(0,h.fS)("padding,margin,Width,Radius",(function(e,t){var n="Top",r="Right",i="Bottom",a="Left",s=(t<3?[n,r,i,a]:[n+a,n+r,i+r,i+a]).map((function(n){return t<2?e+n:"border"+n+e}));ne[t>1?"border"+e:e]=function(e,t,n,r,i){var a,o;if(arguments.length<4)return a=s.map((function(t){return Z(e,t,n)})),5===(o=a.join(" ")).split(a[0]).length?a[0]:o;a=(r+"").split(" "),o={},s.forEach((function(e,t){return o[e]=a[t]=a[t]||a[(t-1)/2|0]})),e.init(t,o,i)}}));var _e,we,Me,Se={name:"css",register:H,targetTest:function(e){return e.style&&e.nodeType},init:function(e,t,n,r,i){var a,o,l,u,c,f,p,m,g,v,_,S,A,C,E,T,B,P,R,I,k=this._props,F=e.style,N=n.vars.startAt;for(p in s||H(),this.styles=this.styles||O(e),T=this.styles.props,this.tween=n,t)if("autoRound"!==p&&(o=t[p],!h.$i[p]||!(0,h.if)(p,t,n,r,e,i)))if(c=typeof o,f=ne[p],"function"===c&&(c=typeof(o=o.call(n,r,e,i))),"string"===c&&~o.indexOf("random(")&&(o=(0,h.UI)(o)),f)f(this,e,p,o,n)&&(E=1);else if("--"===p.substr(0,2))a=(getComputedStyle(e).getPropertyValue(p)+"").trim(),o+="",h.GN.lastIndex=0,h.GN.test(a)||(m=(0,h.Wy)(a),g=(0,h.Wy)(o)),g?m!==g&&(a=Q(e,p,a,g)+g):m&&(o+=m),this.add(F,"setProperty",a,o,r,i,0,0,p),k.push(p),T.push(p,0,F[p]);else if("undefined"!==c){if(N&&p in N?(a="function"==typeof N[p]?N[p].call(n,r,e,i):N[p],(0,h.r9)(a)&&~a.indexOf("random(")&&(a=(0,h.UI)(a)),(0,h.Wy)(a+"")||(a+=h.Fc.units[p]||(0,h.Wy)(Z(e,p))||""),"="===(a+"").charAt(1)&&(a=Z(e,p))):a=Z(e,p),u=parseFloat(a),(v="string"===c&&"="===o.charAt(1)&&o.substr(0,2))&&(o=o.substr(2)),l=parseFloat(o),p in x&&("autoAlpha"===p&&(1===u&&"hidden"===Z(e,"visibility")&&l&&(u=0),T.push("visibility",0,F.visibility),Y(this,F,"visibility",u?"inherit":"hidden",l?"inherit":"hidden",!l)),"scale"!==p&&"transform"!==p&&~(p=x[p]).indexOf(",")&&(p=p.split(",")[0])),_=p in d)if(this.styles.save(p),S||((A=e._gsap).renderTransform&&!t.parseTransform||ue(e,t.parseTransform),C=!1!==t.smoothOrigin&&A.smooth,(S=this._pt=new h.Fo(this._pt,F,L,0,1,A.renderTransform,A,0,-1)).dep=1),"scale"===p)this._pt=new h.Fo(this._pt,A,"scaleY",A.scaleY,(v?(0,h.cy)(A.scaleY,v+l):l)-A.scaleY||0,b),this._pt.u=0,k.push("scaleY",p),p+="X";else{if("transformOrigin"===p){T.push(D,0,F[D]),P=void 0,R=void 0,I=void 0,R=(P=(B=o).split(" "))[0],I=P[1]||"50%","top"!==R&&"bottom"!==R&&"left"!==I&&"right"!==I||(B=R,R=I,I=B),P[0]=ee[R]||R,P[1]=ee[I]||I,o=P.join(" "),A.svg?le(e,o,0,C,0,this):((g=parseFloat(o.split(" ")[2])||0)!==A.zOrigin&&Y(this,A,"zOrigin",A.zOrigin,g),Y(this,F,p,ce(a),ce(o)));continue}if("svgOrigin"===p){le(e,o,1,C,0,this);continue}if(p in ie){ye(this,A,p,u,v?(0,h.cy)(u,v+o):o);continue}if("smoothOrigin"===p){Y(this,A,"smooth",A.smooth,o);continue}if("force3D"===p){A[p]=o;continue}if("transform"===p){be(this,o,e);continue}}else p in F||(p=G(p)||p);if(_||(l||0===l)&&(u||0===u)&&!y.test(o)&&p in F)l||(l=0),(m=(a+"").substr((u+"").length))!==(g=(0,h.Wy)(o)||(p in h.Fc.units?h.Fc.units[p]:m))&&(u=Q(e,p,a,g)),this._pt=new h.Fo(this._pt,_?A:F,p,u,(v?(0,h.cy)(u,v+l):l)-u,_||"px"!==g&&"zIndex"!==p||!1===t.autoRound?b:M),this._pt.u=g||0,m!==g&&"%"!==g&&(this._pt.b=a,this._pt.r=w);else if(p in F)$.call(this,e,p,a,v?v+o:o);else if(p in e)this.add(e,p,a||e[p],v?v+o:o,r,i);else if("parseTransform"!==p){(0,h.lC)(p,o);continue}_||(p in F?T.push(p,0,F[p]):T.push(p,1,a||e[p])),k.push(p)}E&&(0,h.JV)(this)},render:function(e,t){if(t.tween._time||!u())for(var n=t._pt;n;)n.r(e,n.d),n=n._next;else t.styles.revert()},get:Z,aliases:x,getSetter:function(e,t,n){var r=x[t];return r&&r.indexOf(",")<0&&(t=r),t in d&&t!==D&&(e._gsap.x||Z(e,"x"))?n&&l===n?"scale"===t?B:T:(l=n||{})&&("scale"===t?P:R):e.style&&!(0,h.m2)(e.style[t])?C:~t.indexOf("-")?E:(0,h.S5)(e,t)},core:{_removeProperty:X,_getMatrix:oe}};h.p8.utils.checkPrefix=G,h.p8.core.getStyleSaver=O,_e="x,y,z,scale,scaleX,scaleY,xPercent,yPercent",we="rotation,rotationX,rotationY,skewX,skewY",Me=(0,h.fS)(_e+","+we+",transform,transformOrigin,svgOrigin,force3D,smoothOrigin,transformPerspective",(function(e){d[e]=1})),(0,h.fS)(we,(function(e){h.Fc.units[e]="deg",ie[e]=1})),x[Me[13]]=_e+","+we,(0,h.fS)("0:translateX,1:translateY,2:translateZ,8:rotate,8:rotationZ,8:rotateZ,9:rotateX,10:rotateY",(function(e){var t=e.split(":");x[t[1]]=Me[t[0]]})),(0,h.fS)("x,y,z,top,right,bottom,left,width,height,fontSize,padding,margin,perspective",(function(e){h.Fc.units[e]="px"})),h.p8.registerPlugin(Se)},8361:(e,t,n)=>{"use strict";function r(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}n.d(t,{KM:()=>_,Ki:()=>S,QR:()=>I,Qj:()=>z,ZV:()=>L,iz:()=>P,r1:()=>R,xJ:()=>b,y4:()=>D});var i,a,s,o,l,u,c,h,d,f,p,m,g,v=function(){return i||"undefined"!=typeof window&&(i=window.gsap)&&i.registerPlugin&&i},y=1,x=[],b=[],_=[],w=Date.now,M=function(e,t){return t},S=function(e,t){return~_.indexOf(e)&&_[_.indexOf(e)+1][t]},A=function(e){return!!~f.indexOf(e)},C=function(e,t,n,r,i){return e.addEventListener(t,n,{passive:!r,capture:!!i})},E=function(e,t,n,r){return e.removeEventListener(t,n,!!r)},T=function(){return p&&p.isPressed||b.cache++},B=function(e,t){var n=function n(r){if(r||0===r){y&&(s.history.scrollRestoration="manual");var i=p&&p.isPressed;r=n.v=Math.round(r)||(p&&p.iOS?1:0),e(r),n.cacheID=b.cache,i&&M("ss",r)}else(t||b.cache!==n.cacheID||M("ref"))&&(n.cacheID=b.cache,n.v=e());return n.v+n.offset};return n.offset=0,e&&n},P={s:"scrollLeft",p:"left",p2:"Left",os:"right",os2:"Right",d:"width",d2:"Width",a:"x",sc:B((function(e){return arguments.length?s.scrollTo(e,R.sc()):s.pageXOffset||o.scrollLeft||l.scrollLeft||u.scrollLeft||0}))},R={s:"scrollTop",p:"top",p2:"Top",os:"bottom",os2:"Bottom",d:"height",d2:"Height",a:"y",op:P,sc:B((function(e){return arguments.length?s.scrollTo(P.sc(),e):s.pageYOffset||o.scrollTop||l.scrollTop||u.scrollTop||0}))},L=function(e){return i.utils.toArray(e)[0]||("string"==typeof e&&!1!==i.config().nullTargetWarn?console.warn("Element not found:",e):null)},D=function(e,t){var n=t.s,r=t.sc;A(e)&&(e=o.scrollingElement||l);var a=b.indexOf(e),s=r===R.sc?1:2;!~a&&(a=b.push(e)-1),b[a+s]||e.addEventListener("scroll",T);var u=b[a+s],c=u||(b[a+s]=B(S(e,n),!0)||(A(e)?r:B((function(t){return arguments.length?e[n]=t:e[n]}))));return c.target=e,u||(c.smooth="smooth"===i.getProperty(e,"scrollBehavior")),c},I=function(e,t,n){var r=e,i=e,a=w(),s=a,o=t||50,l=Math.max(500,3*o),u=function(e,t){var l=w();t||l-a>o?(i=r,r=e,s=a,a=l):n?r+=e:r=i+(e-i)/(l-s)*(a-s)};return{update:u,reset:function(){i=r=n?0:r,s=a=0},getVelocity:function(e){var t=s,o=i,c=w();return(e||0===e)&&e!==r&&u(e),a===s||c-s>l?0:(r+(n?o:-o))/((n?c:a)-t)*1e3}}},k=function(e,t){return t&&!e._gsapAllow&&e.preventDefault(),e.changedTouches?e.changedTouches[0]:e},F=function(e){var t=Math.max.apply(Math,e),n=Math.min.apply(Math,e);return Math.abs(t)>=Math.abs(n)?t:n},O=function(){var e,t,n,r;(d=i.core.globals().ScrollTrigger)&&d.core&&(e=d.core,t=e.bridge||{},n=e._scrollers,r=e._proxies,n.push.apply(n,b),r.push.apply(r,_),b=n,_=r,M=function(e,n){return t[e](n)})},N=function(e){return(i=e||v())&&"undefined"!=typeof document&&document.body&&(s=window,o=document,l=o.documentElement,u=o.body,f=[s,o,l,u],i.utils.clamp,g=i.core.context||function(){},h="onpointerenter"in u?"pointer":"mouse",c=z.isTouch=s.matchMedia&&s.matchMedia("(hover: none), (pointer: coarse)").matches?1:"ontouchstart"in s||navigator.maxTouchPoints>0||navigator.msMaxTouchPoints>0?2:0,m=z.eventTypes=("ontouchstart"in l?"touchstart,touchmove,touchcancel,touchend":"onpointerdown"in l?"pointerdown,pointermove,pointercancel,pointerup":"mousedown,mousemove,mouseup,mouseup").split(","),setTimeout((function(){return y=0}),500),O(),a=1),a};P.op=R,b.cache=0;var z=function(){function e(e){this.init(e)}var t,n;return e.prototype.init=function(e){a||N(i)||console.warn("Please gsap.registerPlugin(Observer)"),d||O();var t=e.tolerance,n=e.dragMinimum,r=e.type,f=e.target,v=e.lineHeight,y=e.debounce,b=e.preventDefault,_=e.onStop,M=e.onStopDelay,S=e.ignore,B=e.wheelSpeed,z=e.event,U=e.onDragStart,G=e.onDragEnd,H=e.onDrag,V=e.onPress,W=e.onRelease,j=e.onRight,J=e.onLeft,X=e.onUp,Y=e.onDown,K=e.onChangeX,q=e.onChangeY,Q=e.onChange,Z=e.onToggleX,$=e.onToggleY,ee=e.onHover,te=e.onHoverEnd,ne=e.onMove,re=e.ignoreCheck,ie=e.isNormalizer,ae=e.onGestureStart,se=e.onGestureEnd,oe=e.onWheel,le=e.onEnable,ue=e.onDisable,ce=e.onClick,he=e.scrollSpeed,de=e.capture,fe=e.allowClicks,pe=e.lockAxis,me=e.onLockAxis;this.target=f=L(f)||l,this.vars=e,S&&(S=i.utils.toArray(S)),t=t||1e-9,n=n||0,B=B||1,he=he||1,r=r||"wheel,touch,pointer",y=!1!==y,v||(v=parseFloat(s.getComputedStyle(u).lineHeight)||22);var ge,ve,ye,xe,be,_e,we,Me=this,Se=0,Ae=0,Ce=D(f,P),Ee=D(f,R),Te=Ce(),Be=Ee(),Pe=~r.indexOf("touch")&&!~r.indexOf("pointer")&&"pointerdown"===m[0],Re=A(f),Le=f.ownerDocument||o,De=[0,0,0],Ie=[0,0,0],ke=0,Fe=function(){return ke=w()},Oe=function(e,t){return(Me.event=e)&&S&&~S.indexOf(e.target)||t&&Pe&&"touch"!==e.pointerType||re&&re(e,t)},Ne=function(){var e=Me.deltaX=F(De),n=Me.deltaY=F(Ie),r=Math.abs(e)>=t,i=Math.abs(n)>=t;Q&&(r||i)&&Q(Me,e,n,De,Ie),r&&(j&&Me.deltaX>0&&j(Me),J&&Me.deltaX<0&&J(Me),K&&K(Me),Z&&Me.deltaX<0!=Se<0&&Z(Me),Se=Me.deltaX,De[0]=De[1]=De[2]=0),i&&(Y&&Me.deltaY>0&&Y(Me),X&&Me.deltaY<0&&X(Me),q&&q(Me),$&&Me.deltaY<0!=Ae<0&&$(Me),Ae=Me.deltaY,Ie[0]=Ie[1]=Ie[2]=0),(xe||ye)&&(ne&&ne(Me),ye&&(H(Me),ye=!1),xe=!1),_e&&!(_e=!1)&&me&&me(Me),be&&(oe(Me),be=!1),ge=0},ze=function(e,t,n){De[n]+=e,Ie[n]+=t,Me._vx.update(e),Me._vy.update(t),y?ge||(ge=requestAnimationFrame(Ne)):Ne()},Ue=function(e,t){pe&&!we&&(Me.axis=we=Math.abs(e)>Math.abs(t)?"x":"y",_e=!0),"y"!==we&&(De[2]+=e,Me._vx.update(e,!0)),"x"!==we&&(Ie[2]+=t,Me._vy.update(t,!0)),y?ge||(ge=requestAnimationFrame(Ne)):Ne()},Ge=function(e){if(!Oe(e,1)){var t=(e=k(e,b)).clientX,r=e.clientY,i=t-Me.x,a=r-Me.y,s=Me.isDragging;Me.x=t,Me.y=r,(s||Math.abs(Me.startX-t)>=n||Math.abs(Me.startY-r)>=n)&&(H&&(ye=!0),s||(Me.isDragging=!0),Ue(i,a),s||U&&U(Me))}},He=Me.onPress=function(e){Oe(e,1)||(Me.axis=we=null,ve.pause(),Me.isPressed=!0,e=k(e),Se=Ae=0,Me.startX=Me.x=e.clientX,Me.startY=Me.y=e.clientY,Me._vx.reset(),Me._vy.reset(),C(ie?f:Le,m[1],Ge,b,!0),Me.deltaX=Me.deltaY=0,V&&V(Me))},Ve=function(e){if(!Oe(e,1)){E(ie?f:Le,m[1],Ge,!0);var t=!isNaN(Me.y-Me.startY),n=Me.isDragging&&(Math.abs(Me.x-Me.startX)>3||Math.abs(Me.y-Me.startY)>3),r=k(e);!n&&t&&(Me._vx.reset(),Me._vy.reset(),b&&fe&&i.delayedCall(.08,(function(){if(w()-ke>300&&!e.defaultPrevented)if(e.target.click)e.target.click();else if(Le.createEvent){var t=Le.createEvent("MouseEvents");t.initMouseEvent("click",!0,!0,s,1,r.screenX,r.screenY,r.clientX,r.clientY,!1,!1,!1,!1,0,null),e.target.dispatchEvent(t)}}))),Me.isDragging=Me.isGesturing=Me.isPressed=!1,_&&!ie&&ve.restart(!0),G&&n&&G(Me),W&&W(Me,n)}},We=function(e){return e.touches&&e.touches.length>1&&(Me.isGesturing=!0)&&ae(e,Me.isDragging)},je=function(){return(Me.isGesturing=!1)||se(Me)},Je=function(e){if(!Oe(e)){var t=Ce(),n=Ee();ze((t-Te)*he,(n-Be)*he,1),Te=t,Be=n,_&&ve.restart(!0)}},Xe=function(e){if(!Oe(e)){e=k(e,b),oe&&(be=!0);var t=(1===e.deltaMode?v:2===e.deltaMode?s.innerHeight:1)*B;ze(e.deltaX*t,e.deltaY*t,0),_&&!ie&&ve.restart(!0)}},Ye=function(e){if(!Oe(e)){var t=e.clientX,n=e.clientY,r=t-Me.x,i=n-Me.y;Me.x=t,Me.y=n,xe=!0,(r||i)&&Ue(r,i)}},Ke=function(e){Me.event=e,ee(Me)},qe=function(e){Me.event=e,te(Me)},Qe=function(e){return Oe(e)||k(e,b)&&ce(Me)};ve=Me._dc=i.delayedCall(M||.25,(function(){Me._vx.reset(),Me._vy.reset(),ve.pause(),_&&_(Me)})).pause(),Me.deltaX=Me.deltaY=0,Me._vx=I(0,50,!0),Me._vy=I(0,50,!0),Me.scrollX=Ce,Me.scrollY=Ee,Me.isDragging=Me.isGesturing=Me.isPressed=!1,g(this),Me.enable=function(e){return Me.isEnabled||(C(Re?Le:f,"scroll",T),r.indexOf("scroll")>=0&&C(Re?Le:f,"scroll",Je,b,de),r.indexOf("wheel")>=0&&C(f,"wheel",Xe,b,de),(r.indexOf("touch")>=0&&c||r.indexOf("pointer")>=0)&&(C(f,m[0],He,b,de),C(Le,m[2],Ve),C(Le,m[3],Ve),fe&&C(f,"click",Fe,!1,!0),ce&&C(f,"click",Qe),ae&&C(Le,"gesturestart",We),se&&C(Le,"gestureend",je),ee&&C(f,h+"enter",Ke),te&&C(f,h+"leave",qe),ne&&C(f,h+"move",Ye)),Me.isEnabled=!0,e&&e.type&&He(e),le&&le(Me)),Me},Me.disable=function(){Me.isEnabled&&(x.filter((function(e){return e!==Me&&A(e.target)})).length||E(Re?Le:f,"scroll",T),Me.isPressed&&(Me._vx.reset(),Me._vy.reset(),E(ie?f:Le,m[1],Ge,!0)),E(Re?Le:f,"scroll",Je,de),E(f,"wheel",Xe,de),E(f,m[0],He,de),E(Le,m[2],Ve),E(Le,m[3],Ve),E(f,"click",Fe,!0),E(f,"click",Qe),E(Le,"gesturestart",We),E(Le,"gestureend",je),E(f,h+"enter",Ke),E(f,h+"leave",qe),E(f,h+"move",Ye),Me.isEnabled=Me.isPressed=Me.isDragging=!1,ue&&ue(Me))},Me.kill=Me.revert=function(){Me.disable();var e=x.indexOf(Me);e>=0&&x.splice(e,1),p===Me&&(p=0)},x.push(Me),ie&&A(f)&&(p=Me),Me.enable(z)},t=e,(n=[{key:"velocityX",get:function(){return this._vx.getVelocity()}},{key:"velocityY",get:function(){return this._vy.getVelocity()}}])&&r(t.prototype,n),e}();z.version="3.11.4",z.create=function(e){return new z(e)},z.register=N,z.getAll=function(){return x.slice()},z.getById=function(e){return x.filter((function(t){return t.vars.id===e}))[0]},v()&&i.registerPlugin(z)},7082:(e,t,n)=>{"use strict";n.d(t,{i:()=>st});var r,i,a,s,o,l,u,c,h,d,f,p,m,g,v,y,x,b,_,w,M,S,A,C,E,T,B,P,R,L,D,I,k,F,O=n(8361),N=1,z=Date.now,U=z(),G=0,H=0,V=function(){return g=1},W=function(){return g=0},j=function(e){return e},J=function(e){return Math.round(1e5*e)/1e5||0},X=function(){return"undefined"!=typeof window},Y=function(){return r||X()&&(r=window.gsap)&&r.registerPlugin&&r},K=function(e){return!!~u.indexOf(e)},q=function(e){return(0,O.Ki)(e,"getBoundingClientRect")||(K(e)?function(){return tt.width=a.innerWidth,tt.height=a.innerHeight,tt}:function(){return ge(e)})},Q=function(e,t){var n=t.s,r=t.d2,i=t.d,s=t.a;return(n="scroll"+r)&&(s=(0,O.Ki)(e,n))?s()-q(e)()[i]:K(e)?(o[n]||l[n])-(a["inner"+r]||o["client"+r]||l["client"+r]):e[n]-e["offset"+r]},Z=function(e,t){for(var n=0;n<_.length;n+=3)(!t||~t.indexOf(_[n+1]))&&e(_[n],_[n+1],_[n+2])},$=function(e){return"string"==typeof e},ee=function(e){return"function"==typeof e},te=function(e){return"number"==typeof e},ne=function(e){return"object"==typeof e},re=function(e,t,n){return e&&e.progress(t?0:1)&&n&&e.pause()},ie=function(e,t){if(e.enabled){var n=t(e);n&&n.totalTime&&(e.callbackAnimation=n)}},ae=Math.abs,se="right",oe="bottom",le="width",ue="height",ce="padding",he="margin",de="Width",fe="px",pe=function(e){return a.getComputedStyle(e)},me=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},ge=function(e,t){var n=t&&"matrix(1, 0, 0, 1, 0, 0)"!==pe(e)[v]&&r.to(e,{x:0,y:0,xPercent:0,yPercent:0,rotation:0,rotationX:0,rotationY:0,scale:1,skewX:0,skewY:0}).progress(1),i=e.getBoundingClientRect();return n&&n.progress(0).kill(),i},ve=function(e,t){var n=t.d2;return e["offset"+n]||e["client"+n]||0},ye=function(e){var t,n=[],r=e.labels,i=e.duration();for(t in r)n.push(r[t]/i);return n},xe=function(e){var t=r.utils.snap(e),n=Array.isArray(e)&&e.slice(0).sort((function(e,t){return e-t}));return n?function(e,r,i){var a;if(void 0===i&&(i=.001),!r)return t(e);if(r>0){for(e-=i,a=0;a<n.length;a++)if(n[a]>=e)return n[a];return n[a-1]}for(a=n.length,e+=i;a--;)if(n[a]<=e)return n[a];return n[0]}:function(n,r,i){void 0===i&&(i=.001);var a=t(n);return!r||Math.abs(a-n)<i||a-n<0==r<0?a:t(r<0?n-e:n+e)}},be=function(e,t,n,r){return n.split(",").forEach((function(n){return e(t,n,r)}))},_e=function(e,t,n,r,i){return e.addEventListener(t,n,{passive:!r,capture:!!i})},we=function(e,t,n,r){return e.removeEventListener(t,n,!!r)},Me=function(e,t,n){return n&&n.wheelHandler&&e(t,"wheel",n)},Se={startColor:"green",endColor:"red",indent:0,fontSize:"16px",fontWeight:"normal"},Ae={toggleActions:"play",anticipatePin:0},Ce={top:0,left:0,center:.5,bottom:1,right:1},Ee=function(e,t){if($(e)){var n=e.indexOf("="),r=~n?+(e.charAt(n-1)+1)*parseFloat(e.substr(n+1)):0;~n&&(e.indexOf("%")>n&&(r*=t/100),e=e.substr(0,n-1)),e=r+(e in Ce?Ce[e]*t:~e.indexOf("%")?parseFloat(e)*t/100:parseFloat(e)||0)}return e},Te=function(e,t,n,r,i,a,o,u){var c=i.startColor,h=i.endColor,d=i.fontSize,f=i.indent,p=i.fontWeight,m=s.createElement("div"),g=K(n)||"fixed"===(0,O.Ki)(n,"pinType"),v=-1!==e.indexOf("scroller"),y=g?l:n,x=-1!==e.indexOf("start"),b=x?c:h,_="border-color:"+b+";font-size:"+d+";color:"+b+";font-weight:"+p+";pointer-events:none;white-space:nowrap;font-family:sans-serif,Arial;z-index:1000;padding:4px 8px;border-width:0;border-style:solid;";return _+="position:"+((v||u)&&g?"fixed;":"absolute;"),(v||u||!g)&&(_+=(r===O.r1?se:oe)+":"+(a+parseFloat(f))+"px;"),o&&(_+="box-sizing:border-box;text-align:left;width:"+o.offsetWidth+"px;"),m._isStart=x,m.setAttribute("class","gsap-marker-"+e+(t?" marker-"+t:"")),m.style.cssText=_,m.innerText=t||0===t?e+"-"+t:e,y.children[0]?y.insertBefore(m,y.children[0]):y.appendChild(m),m._offset=m["offset"+r.op.d2],Be(m,0,r,x),m},Be=function(e,t,n,i){var a={display:"block"},s=n[i?"os2":"p2"],o=n[i?"p2":"os2"];e._isFlipped=i,a[n.a+"Percent"]=i?-100:0,a[n.a]=i?"1px":0,a["border"+s+de]=1,a["border"+o+de]=0,a[n.p]=t+"px",r.set(e,a)},Pe=[],Re={},Le=function(){return z()-G>34&&(D||(D=requestAnimationFrame(Ye)))},De=function(){(!A||!A.isPressed||A.startX>l.clientWidth)&&(O.xJ.cache++,A?D||(D=requestAnimationFrame(Ye)):Ye(),G||ze("scrollStart"),G=z())},Ie=function(){T=a.innerWidth,E=a.innerHeight},ke=function(){O.xJ.cache++,!m&&!S&&!s.fullscreenElement&&!s.webkitFullscreenElement&&(!C||T!==a.innerWidth||Math.abs(a.innerHeight-E)>.25*a.innerHeight)&&c.restart(!0)},Fe={},Oe=[],Ne=function e(){return we(st,"scrollEnd",e)||je(!0)},ze=function(e){return Fe[e]&&Fe[e].map((function(e){return e()}))||Oe},Ue=[],Ge=function(e){for(var t=0;t<Ue.length;t+=5)(!e||Ue[t+4]&&Ue[t+4].query===e)&&(Ue[t].style.cssText=Ue[t+1],Ue[t].getBBox&&Ue[t].setAttribute("transform",Ue[t+2]||""),Ue[t+3].uncache=1)},He=function(e,t){var n;for(y=0;y<Pe.length;y++)!(n=Pe[y])||t&&n._ctx!==t||(e?n.kill(1):n.revert(!0,!0));t&&Ge(t),t||ze("revert")},Ve=function(e,t){O.xJ.cache++,(t||!I)&&O.xJ.forEach((function(e){return ee(e)&&e.cacheID++&&(e.rec=0)})),$(e)&&(a.history.scrollRestoration=R=e)},We=0,je=function(e,t){if(!G||e){I=st.isRefreshing=!0,O.xJ.forEach((function(e){return ee(e)&&e.cacheID++&&(e.rec=e())}));var n=ze("refreshInit");w&&st.sort(),t||He(),O.xJ.forEach((function(e){ee(e)&&(e.smooth&&(e.target.style.scrollBehavior="auto"),e(0))})),Pe.slice(0).forEach((function(e){return e.refresh()})),Pe.forEach((function(e,t){if(e._subPinOffset&&e.pin){var n=e.vars.horizontal?"offsetWidth":"offsetHeight",r=e.pin[n];e.revert(!0,1),e.adjustPinSpacing(e.pin[n]-r),e.revert(!1,1)}})),Pe.forEach((function(e){return"max"===e.vars.end&&e.setPositions(e.start,Math.max(e.start+1,Q(e.scroller,e._dir)))})),n.forEach((function(e){return e&&e.render&&e.render(-1)})),O.xJ.forEach((function(e){ee(e)&&(e.smooth&&requestAnimationFrame((function(){return e.target.style.scrollBehavior="smooth"})),e.rec&&e(e.rec))})),Ve(R,1),c.pause(),We++,Ye(2),Pe.forEach((function(e){return ee(e.vars.onRefresh)&&e.vars.onRefresh(e)})),I=st.isRefreshing=!1,ze("refresh")}else _e(st,"scrollEnd",Ne)},Je=0,Xe=1,Ye=function(e){if(!I||2===e){st.isUpdating=!0,F&&F.update(0);var t=Pe.length,n=z(),r=n-U>=50,i=t&&Pe[0].scroll();if(Xe=Je>i?-1:1,Je=i,r&&(G&&!g&&n-G>200&&(G=0,ze("scrollEnd")),f=U,U=n),Xe<0){for(y=t;y-- >0;)Pe[y]&&Pe[y].update(0,r);Xe=1}else for(y=0;y<t;y++)Pe[y]&&Pe[y].update(0,r);st.isUpdating=!1}D=0},Ke=["left","top",oe,se,"marginBottom","marginRight","marginTop","marginLeft","display","flexShrink","float","zIndex","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","gridArea","justifySelf","alignSelf","placeSelf","order"],qe=Ke.concat([le,ue,"boxSizing","maxWidth","maxHeight","position",he,ce,"paddingTop","paddingRight","paddingBottom","paddingLeft"]),Qe=function(e,t,n,r){if(!e._gsap.swappedIn){for(var i,a=Ke.length,s=t.style,o=e.style;a--;)s[i=Ke[a]]=n[i];s.position="absolute"===n.position?"absolute":"relative","inline"===n.display&&(s.display="inline-block"),o.bottom=o.right="auto",s.flexBasis=n.flexBasis||"auto",s.overflow="visible",s.boxSizing="border-box",s.width=ve(e,O.iz)+fe,s.height=ve(e,O.r1)+fe,s.padding=o.margin=o.top=o.left="0",$e(r),o.width=o.maxWidth=n.width,o.height=o.maxHeight=n.height,o.padding=n.padding,e.parentNode!==t&&(e.parentNode.insertBefore(t,e),t.appendChild(e)),e._gsap.swappedIn=!0}},Ze=/([A-Z])/g,$e=function(e){if(e){var t,n,i=e.t.style,a=e.length,s=0;for((e.t._gsap||r.core.getCache(e.t)).uncache=1;s<a;s+=2)n=e[s+1],t=e[s],n?i[t]=n:i[t]&&i.removeProperty(t.replace(Ze,"-$1").toLowerCase())}},et=function(e){for(var t=qe.length,n=e.style,r=[],i=0;i<t;i++)r.push(qe[i],n[qe[i]]);return r.t=e,r},tt={left:0,top:0},nt=function(e,t,n,r,i,a,s,u,c,h,d,f,p){ee(e)&&(e=e(u)),$(e)&&"max"===e.substr(0,3)&&(e=f+("="===e.charAt(4)?Ee("0"+e.substr(3),n):0));var m,g,v,y=p?p.time():0;if(p&&p.seek(0),te(e))s&&Be(s,n,r,!0);else{ee(t)&&(t=t(u));var x,b,_,w,M=(e||"0").split(" ");v=(0,O.ZV)(t)||l,(x=ge(v)||{})&&(x.left||x.top)||"none"!==pe(v).display||(w=v.style.display,v.style.display="block",x=ge(v),w?v.style.display=w:v.style.removeProperty("display")),b=Ee(M[0],x[r.d]),_=Ee(M[1]||"0",n),e=x[r.p]-c[r.p]-h+b+i-_,s&&Be(s,_,r,n-_<20||s._isStart&&_>20),n-=n-_}if(a){var S=e+n,A=a._isStart;m="scroll"+r.d2,Be(a,S,r,A&&S>20||!A&&(d?Math.max(l[m],o[m]):a.parentNode[m])<=S+1),d&&(c=ge(s),d&&(a.style[r.op.p]=c[r.op.p]-r.op.m-a._offset+fe))}return p&&v&&(m=ge(v),p.seek(f),g=ge(v),p._caScrollDist=m[r.p]-g[r.p],e=e/p._caScrollDist*f),p&&p.seek(y),p?e:Math.round(e)},rt=/(webkit|moz|length|cssText|inset)/i,it=function(e,t,n,i){if(e.parentNode!==t){var a,s,o=e.style;if(t===l){for(a in e._stOrig=o.cssText,s=pe(e))+a||rt.test(a)||!s[a]||"string"!=typeof o[a]||"0"===a||(o[a]=s[a]);o.top=n,o.left=i}else o.cssText=e._stOrig;r.core.getCache(e).uncache=1,t.appendChild(e)}},at=function(e,t){var n,i,a=(0,O.y4)(e,t),s="_scroll"+t.p2,o=function t(o,l,u,c,h){var d=t.tween,f=l.onComplete,p={};return u=u||a(),h=c&&h||0,c=c||o-u,d&&d.kill(),n=Math.round(u),l[s]=o,l.modifiers=p,p[s]=function(e){return(e=Math.round(a()))!==n&&e!==i&&Math.abs(e-n)>3&&Math.abs(e-i)>3?(d.kill(),t.tween=0):e=u+c*d.ratio+h*d.ratio*d.ratio,i=n,n=Math.round(e)},l.onUpdate=function(){O.xJ.cache++,Ye()},l.onComplete=function(){t.tween=0,f&&f.call(d)},d=t.tween=r.to(e,l)};return e[s]=a,a.wheelHandler=function(){return o.tween&&o.tween.kill()&&(o.tween=0)},_e(e,"wheel",a.wheelHandler),o},st=function(){function e(t,n){i||e.register(r)||console.warn("Please gsap.registerPlugin(ScrollTrigger)"),this.init(t,n)}return e.prototype.init=function(t,n){if(this.progress=this.start=0,this.vars&&this.kill(!0,!0),H){var i,u,c,p,v,x,b,_,S,A,C,E,T,B,R,D,U,V,W,X,Y,Z,se,oe,le,ue,be,Me,Ce,Be,Le,Ie,Fe,Oe,ze,Ue,Ge,He,Ve,Je,Ye,Ke,qe=t=me($(t)||te(t)||t.nodeType?{trigger:t}:t,Ae),Ze=qe.onUpdate,rt=qe.toggleClass,st=qe.id,ot=qe.onToggle,lt=qe.onRefresh,ut=qe.scrub,ct=qe.trigger,ht=qe.pin,dt=qe.pinSpacing,ft=qe.invalidateOnRefresh,pt=qe.anticipatePin,mt=qe.onScrubComplete,gt=qe.onSnapComplete,vt=qe.once,yt=qe.snap,xt=qe.pinReparent,bt=qe.pinSpacer,_t=qe.containerAnimation,wt=qe.fastScrollEnd,Mt=qe.preventOverlaps,St=t.horizontal||t.containerAnimation&&!1!==t.horizontal?O.iz:O.r1,At=!ut&&0!==ut,Ct=(0,O.ZV)(t.scroller||a),Et=r.core.getCache(Ct),Tt=K(Ct),Bt="fixed"===("pinType"in t?t.pinType:(0,O.Ki)(Ct,"pinType")||Tt&&"fixed"),Pt=[t.onEnter,t.onLeave,t.onEnterBack,t.onLeaveBack],Rt=At&&t.toggleActions.split(" "),Lt="markers"in t?t.markers:Ae.markers,Dt=Tt?0:parseFloat(pe(Ct)["border"+St.p2+de])||0,It=this,kt=t.onRefreshInit&&function(){return t.onRefreshInit(It)},Ft=function(e,t,n){var r=n.d,i=n.d2,s=n.a;return(s=(0,O.Ki)(e,"getBoundingClientRect"))?function(){return s()[r]}:function(){return(t?a["inner"+i]:e["client"+i])||0}}(Ct,Tt,St),Ot=function(e,t){return!t||~O.KM.indexOf(e)?q(e):function(){return tt}}(Ct,Tt),Nt=0,zt=0,Ut=(0,O.y4)(Ct,St);if(P(It),It._dir=St,pt*=45,It.scroller=Ct,It.scroll=_t?_t.time.bind(_t):Ut,p=Ut(),It.vars=t,n=n||t.animation,"refreshPriority"in t&&(w=1,-9999===t.refreshPriority&&(F=It)),Et.tweenScroll=Et.tweenScroll||{top:at(Ct,O.r1),left:at(Ct,O.iz)},It.tweenTo=i=Et.tweenScroll[St.p],It.scrubDuration=function(e){(Ie=te(e)&&e)?Le?Le.duration(e):Le=r.to(n,{ease:"expo",totalProgress:"+=0.001",duration:Ie,paused:!0,onComplete:function(){return mt&&mt(It)}}):(Le&&Le.progress(1).kill(),Le=0)},n&&(n.vars.lazy=!1,n._initted||!1!==n.vars.immediateRender&&!1!==t.immediateRender&&n.duration()&&n.render(0,!0,!0),It.animation=n.pause(),n.scrollTrigger=It,It.scrubDuration(ut),Ce=0,st||(st=n.vars.id)),Pe.push(It),yt&&(ne(yt)&&!yt.push||(yt={snapTo:yt}),"scrollBehavior"in l.style&&r.set(Tt?[l,o]:Ct,{scrollBehavior:"auto"}),O.xJ.forEach((function(e){return ee(e)&&e.target===(Tt?s.scrollingElement||o:Ct)&&(e.smooth=!1)})),c=ee(yt.snapTo)?yt.snapTo:"labels"===yt.snapTo?function(e){return function(t){return r.utils.snap(ye(e),t)}}(n):"labelsDirectional"===yt.snapTo?(Je=n,function(e,t){return xe(ye(Je))(e,t.direction)}):!1!==yt.directional?function(e,t){return xe(yt.snapTo)(e,z()-zt<500?0:t.direction)}:r.utils.snap(yt.snapTo),Fe=yt.duration||{min:.1,max:2},Fe=ne(Fe)?d(Fe.min,Fe.max):d(Fe,Fe),Oe=r.delayedCall(yt.delay||Ie/2||.1,(function(){var e=Ut(),t=z()-zt<500,a=i.tween;if(!(t||Math.abs(It.getVelocity())<10)||a||g||Nt===e)It.isActive&&Nt!==e&&Oe.restart(!0);else{var s=(e-x)/T,o=n&&!At?n.totalProgress():s,l=t?0:(o-Be)/(z()-f)*1e3||0,u=r.utils.clamp(-s,1-s,ae(l/2)*l/.185),h=s+(!1===yt.inertia?0:u),p=d(0,1,c(h,It)),m=Math.round(x+p*T),v=yt,y=v.onStart,_=v.onInterrupt,w=v.onComplete;if(e<=b&&e>=x&&m!==e){if(a&&!a._initted&&a.data<=ae(m-e))return;!1===yt.inertia&&(u=p-s),i(m,{duration:Fe(ae(.185*Math.max(ae(h-o),ae(p-o))/l/.05||0)),ease:yt.ease||"power3",data:ae(m-e),onInterrupt:function(){return Oe.restart(!0)&&_&&_(It)},onComplete:function(){It.update(),Nt=Ut(),Ce=Be=n&&!At?n.totalProgress():It.progress,gt&>(It),w&&w(It)}},e,u*T,m-e-u*T),y&&y(It,i.tween)}}})).pause()),st&&(Re[st]=It),(Ve=(ct=It.trigger=(0,O.ZV)(ct||ht))&&ct._gsap&&ct._gsap.stRevert)&&(Ve=Ve(It)),ht=!0===ht?ct:(0,O.ZV)(ht),$(rt)&&(rt={targets:ct,className:rt}),ht&&(!1===dt||dt===he||(dt=!(!dt&&ht.parentNode&&ht.parentNode.style&&"flex"===pe(ht.parentNode).display)&&ce),It.pin=ht,(u=r.core.getCache(ht)).spacer?B=u.pinState:(bt&&((bt=(0,O.ZV)(bt))&&!bt.nodeType&&(bt=bt.current||bt.nativeElement),u.spacerIsNative=!!bt,bt&&(u.spacerState=et(bt))),u.spacer=U=bt||s.createElement("div"),U.classList.add("pin-spacer"),st&&U.classList.add("pin-spacer-"+st),u.pinState=B=et(ht)),!1!==t.force3D&&r.set(ht,{force3D:!0}),It.spacer=U=u.spacer,Me=pe(ht),se=Me[dt+St.os2],W=r.getProperty(ht),X=r.quickSetter(ht,St.a,fe),Qe(ht,U,Me),D=et(ht)),Lt){E=ne(Lt)?me(Lt,Se):Se,A=Te("scroller-start",st,Ct,St,E,0),C=Te("scroller-end",st,Ct,St,E,0,A),V=A["offset"+St.op.d2];var Gt=(0,O.ZV)((0,O.Ki)(Ct,"content")||Ct);_=this.markerStart=Te("start",st,Gt,St,E,V,0,_t),S=this.markerEnd=Te("end",st,Gt,St,E,V,0,_t),_t&&(He=r.quickSetter([_,S],St.a,fe)),Bt||O.KM.length&&!0===(0,O.Ki)(Ct,"fixedMarkers")||(Ke=pe(Ye=Tt?l:Ct).position,Ye.style.position="absolute"===Ke||"fixed"===Ke?Ke:"relative",r.set([A,C],{force3D:!0}),le=r.quickSetter(A,St.a,fe),be=r.quickSetter(C,St.a,fe))}if(_t){var Ht=_t.vars.onUpdate,Vt=_t.vars.onUpdateParams;_t.eventCallback("onUpdate",(function(){It.update(0,0,1),Ht&&Ht.apply(Vt||[])}))}It.previous=function(){return Pe[Pe.indexOf(It)-1]},It.next=function(){return Pe[Pe.indexOf(It)+1]},It.revert=function(e,t){if(!t)return It.kill(!0);var r=!1!==e||!It.enabled,i=m;r!==It.isReverted&&(r&&(Ue=Math.max(Ut(),It.scroll.rec||0),ze=It.progress,Ge=n&&n.progress()),_&&[_,S,A,C].forEach((function(e){return e.style.display=r?"none":"block"})),r&&(m=1,It.update(r)),!ht||xt&&It.isActive||(r?function(e,t,n){$e(n);var r=e._gsap;if(r.spacerIsNative)$e(r.spacerState);else if(e._gsap.swappedIn){var i=t.parentNode;i&&(i.insertBefore(e,t),i.removeChild(t))}e._gsap.swappedIn=!1}(ht,U,B):Qe(ht,U,pe(ht),oe)),r||It.update(r),m=i,It.isReverted=r)},It.refresh=function(a,u){if(!m&&It.enabled||u)if(ht&&a&&G)_e(e,"scrollEnd",Ne);else{!I&&kt&&kt(It),m=1,zt=z(),i.tween&&(i.tween.kill(),i.tween=0),Le&&Le.pause(),ft&&n&&n.revert({kill:!1}).invalidate(),It.isReverted||It.revert(!0,!0),It._subPinOffset=!1;for(var c,h,d,f,g,y,w,E,P,L,k,F=Ft(),N=Ot(),H=_t?_t.duration():Q(Ct,St),V=0,j=0,J=t.end,X=t.endTrigger||ct,K=t.start||(0!==t.start&&ct?ht?"0 0":"0 100%":0),q=It.pinnedContainer=t.pinnedContainer&&(0,O.ZV)(t.pinnedContainer),ne=ct&&Math.max(0,Pe.indexOf(It))||0,re=ne;re--;)(y=Pe[re]).end||y.refresh(0,1)||(m=1),!(w=y.pin)||w!==ct&&w!==ht||y.isReverted||(L||(L=[]),L.unshift(y),y.revert(!0,!0)),y!==Pe[re]&&(ne--,re--);for(ee(K)&&(K=K(It)),x=nt(K,ct,F,St,Ut(),_,A,It,N,Dt,Bt,H,_t)||(ht?-.001:0),ee(J)&&(J=J(It)),$(J)&&!J.indexOf("+=")&&(~J.indexOf(" ")?J=($(K)?K.split(" ")[0]:"")+J:(V=Ee(J.substr(2),F),J=$(K)?K:x+V,X=ct)),b=Math.max(x,nt(J||(X?"100% 0":H),X,F,St,Ut()+V,S,C,It,N,Dt,Bt,H,_t))||-.001,T=b-x||(x-=.01)&&.001,V=0,re=ne;re--;)(w=(y=Pe[re]).pin)&&y.start-y._pinPush<=x&&!_t&&y.end>0&&(c=y.end-y.start,(w===ct&&y.start-y._pinPush<x||w===q)&&!te(K)&&(V+=c*(1-y.progress)),w===ht&&(j+=c));if(x+=V,b+=V,It._pinPush=j,_&&V&&((c={})[St.a]="+="+V,q&&(c[St.p]="-="+Ut()),r.set([_,S],c)),ht)c=pe(ht),f=St===O.r1,d=Ut(),Y=parseFloat(W(St.a))+j,!H&&b>1&&((k={style:k=(Tt?s.scrollingElement||o:Ct).style,value:k["overflow"+St.a.toUpperCase()]})["overflow"+St.a.toUpperCase()]="scroll"),Qe(ht,U,c),D=et(ht),h=ge(ht,!0),E=Bt&&(0,O.y4)(Ct,f?O.iz:O.r1)(),dt&&((oe=[dt+St.os2,T+j+fe]).t=U,(re=dt===ce?ve(ht,St)+T+j:0)&&oe.push(St.d,re+fe),$e(oe),q&&Pe.forEach((function(e){e.pin===q&&!1!==e.vars.pinSpacing&&(e._subPinOffset=!0)})),Bt&&Ut(Ue)),Bt&&((g={top:h.top+(f?d-x:E)+fe,left:h.left+(f?E:d-x)+fe,boxSizing:"border-box",position:"fixed"}).width=g.maxWidth=Math.ceil(h.width)+fe,g.height=g.maxHeight=Math.ceil(h.height)+fe,g.margin=g.marginTop=g.marginRight=g.marginBottom=g.marginLeft="0",g.padding=c.padding,g.paddingTop=c.paddingTop,g.paddingRight=c.paddingRight,g.paddingBottom=c.paddingBottom,g.paddingLeft=c.paddingLeft,R=function(e,t,n){for(var r,i=[],a=e.length,s=n?8:0;s<a;s+=2)r=e[s],i.push(r,r in t?t[r]:e[s+1]);return i.t=e.t,i}(B,g,xt),I&&Ut(0)),n?(P=n._initted,M(1),n.render(n.duration(),!0,!0),Z=W(St.a)-Y+T+j,ue=Math.abs(T-Z)>1,Bt&&ue&&R.splice(R.length-2,2),n.render(0,!0,!0),P||n.invalidate(!0),n.parent||n.totalTime(n.totalTime()),M(0)):Z=T,k&&(k.value?k.style["overflow"+St.a.toUpperCase()]=k.value:k.style.removeProperty("overflow-"+St.a));else if(ct&&Ut()&&!_t)for(h=ct.parentNode;h&&h!==l;)h._pinOffset&&(x-=h._pinOffset,b-=h._pinOffset),h=h.parentNode;L&&L.forEach((function(e){return e.revert(!1,!0)})),It.start=x,It.end=b,p=v=I?Ue:Ut(),_t||I||(p<Ue&&Ut(Ue),It.scroll.rec=0),It.revert(!1,!0),Oe&&(Nt=-1,It.isActive&&Ut(x+T*ze),Oe.restart(!0)),m=0,n&&At&&(n._initted||Ge)&&n.progress()!==Ge&&n.progress(Ge,!0).render(n.time(),!0,!0),(ze!==It.progress||_t)&&(n&&!At&&n.totalProgress(ze,!0),It.progress=(p-x)/T===ze?0:ze),ht&&dt&&(U._pinOffset=Math.round(It.progress*Z)),lt&&!I&<(It)}},It.getVelocity=function(){return(Ut()-v)/(z()-f)*1e3||0},It.endAnimation=function(){re(It.callbackAnimation),n&&(Le?Le.progress(1):n.paused()?At||re(n,It.direction<0,1):re(n,n.reversed()))},It.labelToScroll=function(e){return n&&n.labels&&(x||It.refresh()||x)+n.labels[e]/n.duration()*T||0},It.getTrailing=function(e){var t=Pe.indexOf(It),n=It.direction>0?Pe.slice(0,t).reverse():Pe.slice(t+1);return($(e)?n.filter((function(t){return t.vars.preventOverlaps===e})):n).filter((function(e){return It.direction>0?e.end<=x:e.start>=b}))},It.update=function(e,t,r){if(!_t||r||e){var a,s,o,u,c,d,g,y=I?Ue:It.scroll(),_=e?0:(y-x)/T,w=_<0?0:_>1?1:_||0,M=It.progress;if(t&&(v=p,p=_t?Ut():y,yt&&(Be=Ce,Ce=n&&!At?n.totalProgress():w)),pt&&!w&&ht&&!m&&!N&&G&&x<y+(y-v)/(z()-f)*pt&&(w=1e-4),w!==M&&It.enabled){if(u=(c=(a=It.isActive=!!w&&w<1)!=(!!M&&M<1))||!!w!=!!M,It.direction=w>M?1:-1,It.progress=w,u&&!m&&(s=w&&!M?0:1===w?1:1===M?2:3,At&&(o=!c&&"none"!==Rt[s+1]&&Rt[s+1]||Rt[s],g=n&&("complete"===o||"reset"===o||o in n))),Mt&&(c||g)&&(g||ut||!n)&&(ee(Mt)?Mt(It):It.getTrailing(Mt).forEach((function(e){return e.endAnimation()}))),At||(!Le||m||N?n&&n.totalProgress(w,!!m):(Le._dp._time-Le._start!==Le._time&&Le.render(Le._dp._time-Le._start),Le.resetTo?Le.resetTo("totalProgress",w,n._tTime/n._tDur):(Le.vars.totalProgress=w,Le.invalidate().restart()))),ht)if(e&&dt&&(U.style[dt+St.os2]=se),Bt){if(u){if(d=!e&&w>M&&b+1>y&&y+1>=Q(Ct,St),xt)if(e||!a&&!d)it(ht,U);else{var S=ge(ht,!0),C=y-x;it(ht,l,S.top+(St===O.r1?C:0)+fe,S.left+(St===O.r1?0:C)+fe)}$e(a||d?R:D),ue&&w<1&&a||X(Y+(1!==w||d?0:Z))}}else X(J(Y+Z*w));yt&&!i.tween&&!m&&!N&&Oe.restart(!0),rt&&(c||vt&&w&&(w<1||!L))&&h(rt.targets).forEach((function(e){return e.classList[a||vt?"add":"remove"](rt.className)})),Ze&&!At&&!e&&Ze(It),u&&!m?(At&&(g&&("complete"===o?n.pause().totalProgress(1):"reset"===o?n.restart(!0).pause():"restart"===o?n.restart(!0):n[o]()),Ze&&Ze(It)),!c&&L||(ot&&c&&ie(It,ot),Pt[s]&&ie(It,Pt[s]),vt&&(1===w?It.kill(!1,1):Pt[s]=0),c||Pt[s=1===w?1:3]&&ie(It,Pt[s])),wt&&!a&&Math.abs(It.getVelocity())>(te(wt)?wt:2500)&&(re(It.callbackAnimation),Le?Le.progress(1):re(n,"reverse"===o?1:!w,1))):At&&Ze&&!m&&Ze(It)}if(be){var E=_t?y/_t.duration()*(_t._caScrollDist||0):y;le(E+(A._isFlipped?1:0)),be(E)}He&&He(-y/_t.duration()*(_t._caScrollDist||0))}},It.enable=function(t,n){It.enabled||(It.enabled=!0,_e(Ct,"resize",ke),_e(Tt?s:Ct,"scroll",De),kt&&_e(e,"refreshInit",kt),!1!==t&&(It.progress=ze=0,p=v=Nt=Ut()),!1!==n&&It.refresh())},It.getTween=function(e){return e&&i?i.tween:Le},It.setPositions=function(e,t){ht&&(Y+=e-x,Z+=t-e-T,dt===ce&&It.adjustPinSpacing(t-e-T)),It.start=x=e,It.end=b=t,T=t-e,It.update()},It.adjustPinSpacing=function(e){if(oe){var t=oe.indexOf(St.d)+1;oe[t]=parseFloat(oe[t])+e+fe,oe[1]=parseFloat(oe[1])+e+fe,$e(oe)}},It.disable=function(t,n){if(It.enabled&&(!1!==t&&It.revert(!0,!0),It.enabled=It.isActive=!1,n||Le&&Le.pause(),Ue=0,u&&(u.uncache=1),kt&&we(e,"refreshInit",kt),Oe&&(Oe.pause(),i.tween&&i.tween.kill()&&(i.tween=0)),!Tt)){for(var r=Pe.length;r--;)if(Pe[r].scroller===Ct&&Pe[r]!==It)return;we(Ct,"resize",ke),we(Ct,"scroll",De)}},It.kill=function(e,r){It.disable(e,r),Le&&!r&&Le.kill(),st&&delete Re[st];var i=Pe.indexOf(It);i>=0&&Pe.splice(i,1),i===y&&Xe>0&&y--,i=0,Pe.forEach((function(e){return e.scroller===It.scroller&&(i=1)})),i||I||(It.scroll.rec=0),n&&(n.scrollTrigger=null,e&&n.revert({kill:!1}),r||n.kill()),_&&[_,S,A,C].forEach((function(e){return e.parentNode&&e.parentNode.removeChild(e)})),F===It&&(F=0),ht&&(u&&(u.uncache=1),i=0,Pe.forEach((function(e){return e.pin===ht&&i++})),i||(u.spacer=0)),t.onKill&&t.onKill(It)},It.enable(!1,!1),Ve&&Ve(It),n&&n.add&&!T?r.delayedCall(.01,(function(){return x||b||It.refresh()}))&&(T=.01)&&(x=b=0):It.refresh(),ht&&function(){if(k!==We){var e=k=We;requestAnimationFrame((function(){return e===We&&je(!0)}))}}()}else this.update=this.refresh=this.kill=j},e.register=function(t){return i||(r=t||Y(),X()&&window.document&&e.enable(),i=H),i},e.defaults=function(e){if(e)for(var t in e)Ae[t]=e[t];return Ae},e.disable=function(e,t){H=0,Pe.forEach((function(n){return n[t?"kill":"disable"](e)})),we(a,"wheel",De),we(s,"scroll",De),clearInterval(p),we(s,"touchcancel",j),we(l,"touchstart",j),be(we,s,"pointerdown,touchstart,mousedown",V),be(we,s,"pointerup,touchend,mouseup",W),c.kill(),Z(we);for(var n=0;n<O.xJ.length;n+=3)Me(we,O.xJ[n],O.xJ[n+1]),Me(we,O.xJ[n],O.xJ[n+2])},e.enable=function(){if(a=window,s=document,o=s.documentElement,l=s.body,r&&(h=r.utils.toArray,d=r.utils.clamp,P=r.core.context||j,M=r.core.suppressOverwrites||j,R=a.history.scrollRestoration||"auto",r.core.globals("ScrollTrigger",e),l)){H=1,O.Qj.register(r),e.isTouch=O.Qj.isTouch,B=O.Qj.isTouch&&/(iPad|iPhone|iPod|Mac)/g.test(navigator.userAgent),_e(a,"wheel",De),u=[a,s,o,l],r.matchMedia?(e.matchMedia=function(e){var t,n=r.matchMedia();for(t in e)n.add(t,e[t]);return n},r.addEventListener("matchMediaInit",(function(){return He()})),r.addEventListener("matchMediaRevert",(function(){return Ge()})),r.addEventListener("matchMedia",(function(){je(0,1),ze("matchMedia")})),r.matchMedia("(orientation: portrait)",(function(){return Ie(),Ie}))):console.warn("Requires GSAP 3.11.0 or later"),Ie(),_e(s,"scroll",De);var t,n,f=l.style,m=f.borderTopStyle,g=r.core.Animation.prototype;for(g.revert||Object.defineProperty(g,"revert",{value:function(){return this.time(-.01,!0)}}),f.borderTopStyle="solid",t=ge(l),O.r1.m=Math.round(t.top+O.r1.sc())||0,O.iz.m=Math.round(t.left+O.iz.sc())||0,m?f.borderTopStyle=m:f.removeProperty("border-top-style"),p=setInterval(Le,250),r.delayedCall(.5,(function(){return N=0})),_e(s,"touchcancel",j),_e(l,"touchstart",j),be(_e,s,"pointerdown,touchstart,mousedown",V),be(_e,s,"pointerup,touchend,mouseup",W),v=r.utils.checkPrefix("transform"),qe.push(v),i=z(),c=r.delayedCall(.2,je).pause(),_=[s,"visibilitychange",function(){var e=a.innerWidth,t=a.innerHeight;s.hidden?(x=e,b=t):x===e&&b===t||ke()},s,"DOMContentLoaded",je,a,"load",je,a,"resize",ke],Z(_e),Pe.forEach((function(e){return e.enable(0,1)})),n=0;n<O.xJ.length;n+=3)Me(we,O.xJ[n],O.xJ[n+1]),Me(we,O.xJ[n],O.xJ[n+2])}},e.config=function(t){"limitCallbacks"in t&&(L=!!t.limitCallbacks);var n=t.syncInterval;n&&clearInterval(p)||(p=n)&&setInterval(Le,n),"ignoreMobileResize"in t&&(C=1===e.isTouch&&t.ignoreMobileResize),"autoRefreshEvents"in t&&(Z(we)||Z(_e,t.autoRefreshEvents||"none"),S=-1===(t.autoRefreshEvents+"").indexOf("resize"))},e.scrollerProxy=function(e,t){var n=(0,O.ZV)(e),r=O.xJ.indexOf(n),i=K(n);~r&&O.xJ.splice(r,i?6:2),t&&(i?O.KM.unshift(a,t,l,t,o,t):O.KM.unshift(n,t))},e.clearMatchMedia=function(e){Pe.forEach((function(t){return t._ctx&&t._ctx.query===e&&t._ctx.kill(!0,!0)}))},e.isInViewport=function(e,t,n){var r=($(e)?(0,O.ZV)(e):e).getBoundingClientRect(),i=r[n?le:ue]*t||0;return n?r.right-i>0&&r.left+i<a.innerWidth:r.bottom-i>0&&r.top+i<a.innerHeight},e.positionInViewport=function(e,t,n){$(e)&&(e=(0,O.ZV)(e));var r=e.getBoundingClientRect(),i=r[n?le:ue],s=null==t?i/2:t in Ce?Ce[t]*i:~t.indexOf("%")?parseFloat(t)*i/100:parseFloat(t)||0;return n?(r.left+s)/a.innerWidth:(r.top+s)/a.innerHeight},e.killAll=function(e){if(Pe.slice(0).forEach((function(e){return"ScrollSmoother"!==e.vars.id&&e.kill()})),!0!==e){var t=Fe.killAll||[];Fe={},t.forEach((function(e){return e()}))}},e}();st.version="3.11.4",st.saveStyles=function(e){return e?h(e).forEach((function(e){if(e&&e.style){var t=Ue.indexOf(e);t>=0&&Ue.splice(t,5),Ue.push(e,e.style.cssText,e.getBBox&&e.getAttribute("transform"),r.core.getCache(e),P())}})):Ue},st.revert=function(e,t){return He(!e,t)},st.create=function(e,t){return new st(e,t)},st.refresh=function(e){return e?ke():(i||st.register())&&je(!0)},st.update=function(e){return++O.xJ.cache&&Ye(!0===e?2:0)},st.clearScrollMemory=Ve,st.maxScroll=function(e,t){return Q(e,t?O.iz:O.r1)},st.getScrollFunc=function(e,t){return(0,O.y4)((0,O.ZV)(e),t?O.iz:O.r1)},st.getById=function(e){return Re[e]},st.getAll=function(){return Pe.filter((function(e){return"ScrollSmoother"!==e.vars.id}))},st.isScrolling=function(){return!!G},st.snapDirectional=xe,st.addEventListener=function(e,t){var n=Fe[e]||(Fe[e]=[]);~n.indexOf(t)||n.push(t)},st.removeEventListener=function(e,t){var n=Fe[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},st.batch=function(e,t){var n,i=[],a={},s=t.interval||.016,o=t.batchMax||1e9,l=function(e,t){var n=[],i=[],a=r.delayedCall(s,(function(){t(n,i),n=[],i=[]})).pause();return function(e){n.length||a.restart(!0),n.push(e.trigger),i.push(e),o<=n.length&&a.progress(1)}};for(n in t)a[n]="on"===n.substr(0,2)&&ee(t[n])&&"onRefreshInit"!==n?l(0,t[n]):t[n];return ee(o)&&(o=o(),_e(st,"refresh",(function(){return o=t.batchMax()}))),h(e).forEach((function(e){var t={};for(n in a)t[n]=a[n];t.trigger=e,i.push(st.create(t))})),i};var ot,lt=function(e,t,n,r){return t>r?e(r):t<0&&e(0),n>r?(r-t)/(n-t):n<0?t/(t-n):1},ut=function e(t,n){!0===n?t.style.removeProperty("touch-action"):t.style.touchAction=!0===n?"auto":n?"pan-"+n+(O.Qj.isTouch?" pinch-zoom":""):"none",t===o&&e(l,n)},ct={auto:1,scroll:1},ht=function(e){var t,n=e.event,i=e.target,a=e.axis,s=(n.changedTouches?n.changedTouches[0]:n).target,o=s._gsap||r.core.getCache(s),u=z();if(!o._isScrollT||u-o._isScrollT>2e3){for(;s&&s!==l&&(s.scrollHeight<=s.clientHeight&&s.scrollWidth<=s.clientWidth||!ct[(t=pe(s)).overflowY]&&!ct[t.overflowX]);)s=s.parentNode;o._isScroll=s&&s!==i&&!K(s)&&(ct[(t=pe(s)).overflowY]||ct[t.overflowX]),o._isScrollT=u}(o._isScroll||"x"===a)&&(n.stopPropagation(),n._gsapAllow=!0)},dt=function(e,t,n,r){return O.Qj.create({target:e,capture:!0,debounce:!1,lockAxis:!0,type:t,onWheel:r=r&&ht,onPress:r,onDrag:r,onScroll:r,onEnable:function(){return n&&_e(s,O.Qj.eventTypes[0],pt,!1,!0)},onDisable:function(){return we(s,O.Qj.eventTypes[0],pt,!0)}})},ft=/(input|label|select|textarea)/i,pt=function(e){var t=ft.test(e.target.tagName);(t||ot)&&(e._gsapAllow=!0,ot=t)};st.sort=function(e){return Pe.sort(e||function(e,t){return-1e6*(e.vars.refreshPriority||0)+e.start-(t.start+-1e6*(t.vars.refreshPriority||0))})},st.observe=function(e){return new O.Qj(e)},st.normalizeScroll=function(e){if(void 0===e)return A;if(!0===e&&A)return A.enable();if(!1===e)return A&&A.kill();var t=e instanceof O.Qj?e:function(e){ne(e)||(e={}),e.preventDefault=e.isNormalizer=e.allowClicks=!0,e.type||(e.type="wheel,touch"),e.debounce=!!e.debounce,e.id=e.id||"normalizer";var t,n,i,s,l,u,c,h,f=e,p=f.normalizeScrollX,m=f.momentum,g=f.allowNestedScroll,v=(0,O.ZV)(e.target)||o,y=r.core.globals().ScrollSmoother,x=y&&y.get(),b=B&&(e.content&&(0,O.ZV)(e.content)||x&&!1!==e.content&&!x.smooth()&&x.content()),_=(0,O.y4)(v,O.r1),w=(0,O.y4)(v,O.iz),M=1,S=(O.Qj.isTouch&&a.visualViewport?a.visualViewport.scale*a.visualViewport.width:a.outerWidth)/a.innerWidth,A=0,C=ee(m)?function(){return m(t)}:function(){return m||2.8},E=dt(v,e.type,!0,g),T=function(){return s=!1},P=j,R=j,L=function(){n=Q(v,O.r1),R=d(B?1:0,n),p&&(P=d(0,Q(v,O.iz))),i=We},D=function(){b._gsap.y=J(parseFloat(b._gsap.y)+_.offset)+"px",b.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+parseFloat(b._gsap.y)+", 0, 1)",_.offset=_.cacheID=0},I=function(){L(),l.isActive()&&l.vars.scrollY>n&&(_()>n?l.progress(1)&&_(n):l.resetTo("scrollY",n))};return b&&r.set(b,{y:"+=0"}),e.ignoreCheck=function(e){return B&&"touchmove"===e.type&&function(){if(s){requestAnimationFrame(T);var e=J(t.deltaY/2),n=R(_.v-e);if(b&&n!==_.v+_.offset){_.offset=n-_.v;var r=J((parseFloat(b&&b._gsap.y)||0)-_.offset);b.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+r+", 0, 1)",b._gsap.y=r+"px",_.cacheID=O.xJ.cache,Ye()}return!0}_.offset&&D(),s=!0}()||M>1.05&&"touchstart"!==e.type||t.isGesturing||e.touches&&e.touches.length>1},e.onPress=function(){var e=M;M=J((a.visualViewport&&a.visualViewport.scale||1)/S),l.pause(),e!==M&&ut(v,M>1.01||!p&&"x"),u=w(),c=_(),L(),i=We},e.onRelease=e.onGestureStart=function(e,t){if(_.offset&&D(),t){O.xJ.cache++;var i,a,s=C();p&&(a=(i=w())+.05*s*-e.velocityX/.227,s*=lt(w,i,a,Q(v,O.iz)),l.vars.scrollX=P(a)),a=(i=_())+.05*s*-e.velocityY/.227,s*=lt(_,i,a,Q(v,O.r1)),l.vars.scrollY=R(a),l.invalidate().duration(s).play(.01),(B&&l.vars.scrollY>=n||i>=n-1)&&r.to({},{onUpdate:I,duration:s})}else h.restart(!0)},e.onWheel=function(){l._ts&&l.pause(),z()-A>1e3&&(i=0,A=z())},e.onChange=function(e,t,n,r,a){if(We!==i&&L(),t&&p&&w(P(r[2]===t?u+(e.startX-e.x):w()+t-r[1])),n){_.offset&&D();var s=a[2]===n,o=s?c+e.startY-e.y:_()+n-a[1],l=R(o);s&&o!==l&&(c+=l-o),_(l)}(n||t)&&Ye()},e.onEnable=function(){ut(v,!p&&"x"),st.addEventListener("refresh",I),_e(a,"resize",I),_.smooth&&(_.target.style.scrollBehavior="auto",_.smooth=w.smooth=!1),E.enable()},e.onDisable=function(){ut(v,!0),we(a,"resize",I),st.removeEventListener("refresh",I),E.kill()},e.lockAxis=!1!==e.lockAxis,(t=new O.Qj(e)).iOS=B,B&&!_()&&_(1),B&&r.ticker.add(j),h=t._dc,l=r.to(t,{ease:"power4",paused:!0,scrollX:p?"+=0.1":"+=0",scrollY:"+=0.1",onComplete:h.vars.onComplete}),t}(e);return A&&A.target===t.target&&A.kill(),K(t.target)&&(A=t),t},st.core={_getVelocityProp:O.QR,_inputObserver:dt,_scrollers:O.xJ,_proxies:O.KM,bridge:{ss:function(){G||ze("scrollStart"),G=z()},ref:function(){return m}}},Y()&&r.registerPlugin(st)},5317:(e,t,n)=>{"use strict";function r(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function i(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,e.__proto__=t}n.d(t,{$i:()=>se,DY:()=>de,Fc:()=>b,Fo:()=>dn,GN:()=>wt,JV:()=>hn,Ks:()=>sn,Ok:()=>fe,Pr:()=>me,S5:()=>nn,SI:()=>G,UI:()=>ct,Wy:()=>$e,bQ:()=>W,cy:()=>ve,d4:()=>H,fS:()=>pe,if:()=>jt,kr:()=>St,l1:()=>Nt,lC:()=>q,m2:()=>D,p8:()=>Sn,r9:()=>P,xr:()=>At});var a,s,o,l,u,c,h,d,f,p,m,g,v,y,x,b={autoSleep:120,force3D:"auto",nullTargetWarn:1,units:{lineHeight:""}},_={duration:.5,overwrite:!1,delay:0},w=1e8,M=1e-8,S=2*Math.PI,A=S/4,C=0,E=Math.sqrt,T=Math.cos,B=Math.sin,P=function(e){return"string"==typeof e},R=function(e){return"function"==typeof e},L=function(e){return"number"==typeof e},D=function(e){return void 0===e},I=function(e){return"object"==typeof e},k=function(e){return!1!==e},F=function(){return"undefined"!=typeof window},O=function(e){return R(e)||P(e)},N="function"==typeof ArrayBuffer&&ArrayBuffer.isView||function(){},z=Array.isArray,U=/(?:-?\.?\d|\.)+/gi,G=/[-+=.]*\d+[.e\-+]*\d*[e\-+]*\d*/g,H=/[-+=.]*\d+[.e-]*\d*[a-z%]*/g,V=/[-+=.]*\d+\.?\d*(?:e-|e\+)?\d*/gi,W=/[+-]=-?[.\d]+/,j=/[^,'"\[\]\s]+/gi,J=/^[+\-=e\s\d]*\d+[.\d]*([a-z]*|%)\s*$/i,X={},Y={},K=function(e){return(Y=Se(e,X))&&Sn},q=function(e,t){return console.warn("Invalid property",e,"set to",t,"Missing plugin? gsap.registerPlugin()")},Q=function(e,t){return!t&&console.warn(e)},Z=function(e,t){return e&&(X[e]=t)&&Y&&(Y[e]=t)||X},$=function(){return 0},ee={suppressEvents:!0,isStart:!0,kill:!1},te={suppressEvents:!0,kill:!1},ne={suppressEvents:!0},re={},ie=[],ae={},se={},oe={},le=30,ue=[],ce="",he=function(e){var t,n,r=e[0];if(I(r)||R(r)||(e=[e]),!(t=(r._gsap||{}).harness)){for(n=ue.length;n--&&!ue[n].targetTest(r););t=ue[n]}for(n=e.length;n--;)e[n]&&(e[n]._gsap||(e[n]._gsap=new Nt(e[n],t)))||e.splice(n,1);return e},de=function(e){return e._gsap||he(nt(e))[0]._gsap},fe=function(e,t,n){return(n=e[t])&&R(n)?e[t]():D(n)&&e.getAttribute&&e.getAttribute(t)||n},pe=function(e,t){return(e=e.split(",")).forEach(t)||e},me=function(e){return Math.round(1e5*e)/1e5||0},ge=function(e){return Math.round(1e7*e)/1e7||0},ve=function(e,t){var n=t.charAt(0),r=parseFloat(t.substr(2));return e=parseFloat(e),"+"===n?e+r:"-"===n?e-r:"*"===n?e*r:e/r},ye=function(e,t){for(var n=t.length,r=0;e.indexOf(t[r])<0&&++r<n;);return r<n},xe=function(){var e,t,n=ie.length,r=ie.slice(0);for(ae={},ie.length=0,e=0;e<n;e++)(t=r[e])&&t._lazy&&(t.render(t._lazy[0],t._lazy[1],!0)._lazy=0)},be=function(e,t,n,r){ie.length&&!s&&xe(),e.render(t,n,r||s&&t<0&&(e._initted||e._startAt)),ie.length&&!s&&xe()},_e=function(e){var t=parseFloat(e);return(t||0===t)&&(e+"").match(j).length<2?t:P(e)?e.trim():e},we=function(e){return e},Me=function(e,t){for(var n in t)n in e||(e[n]=t[n]);return e},Se=function(e,t){for(var n in t)e[n]=t[n];return e},Ae=function e(t,n){for(var r in n)"__proto__"!==r&&"constructor"!==r&&"prototype"!==r&&(t[r]=I(n[r])?e(t[r]||(t[r]={}),n[r]):n[r]);return t},Ce=function(e,t){var n,r={};for(n in e)n in t||(r[n]=e[n]);return r},Ee=function(e){var t,n=e.parent||l,r=e.keyframes?(t=z(e.keyframes),function(e,n){for(var r in n)r in e||"duration"===r&&t||"ease"===r||(e[r]=n[r])}):Me;if(k(e.inherit))for(;n;)r(e,n.vars.defaults),n=n.parent||n._dp;return e},Te=function(e,t,n,r,i){void 0===n&&(n="_first"),void 0===r&&(r="_last");var a,s=e[r];if(i)for(a=t[i];s&&s[i]>a;)s=s._prev;return s?(t._next=s._next,s._next=t):(t._next=e[n],e[n]=t),t._next?t._next._prev=t:e[r]=t,t._prev=s,t.parent=t._dp=e,t},Be=function(e,t,n,r){void 0===n&&(n="_first"),void 0===r&&(r="_last");var i=t._prev,a=t._next;i?i._next=a:e[n]===t&&(e[n]=a),a?a._prev=i:e[r]===t&&(e[r]=i),t._next=t._prev=t.parent=null},Pe=function(e,t){e.parent&&(!t||e.parent.autoRemoveChildren)&&e.parent.remove(e),e._act=0},Re=function(e,t){if(e&&(!t||t._end>e._dur||t._start<0))for(var n=e;n;)n._dirty=1,n=n.parent;return e},Le=function(e){for(var t=e.parent;t&&t.parent;)t._dirty=1,t.totalDuration(),t=t.parent;return e},De=function(e,t,n,r){return e._startAt&&(s?e._startAt.revert(te):e.vars.immediateRender&&!e.vars.autoRevert||e._startAt.render(t,!0,r))},Ie=function e(t){return!t||t._ts&&e(t.parent)},ke=function(e){return e._repeat?Fe(e._tTime,e=e.duration()+e._rDelay)*e:0},Fe=function(e,t){var n=Math.floor(e/=t);return e&&n===e?n-1:n},Oe=function(e,t){return(e-t._start)*t._ts+(t._ts>=0?0:t._dirty?t.totalDuration():t._tDur)},Ne=function(e){return e._end=ge(e._start+(e._tDur/Math.abs(e._ts||e._rts||M)||0))},ze=function(e,t){var n=e._dp;return n&&n.smoothChildTiming&&e._ts&&(e._start=ge(n._time-(e._ts>0?t/e._ts:((e._dirty?e.totalDuration():e._tDur)-t)/-e._ts)),Ne(e),n._dirty||Re(n,e)),e},Ue=function(e,t){var n;if((t._time||t._initted&&!t._dur)&&(n=Oe(e.rawTime(),t),(!t._dur||Ze(0,t.totalDuration(),n)-t._tTime>M)&&t.render(n,!0)),Re(e,t)._dp&&e._initted&&e._time>=e._dur&&e._ts){if(e._dur<e.duration())for(n=e;n._dp;)n.rawTime()>=0&&n.totalTime(n._tTime),n=n._dp;e._zTime=-1e-8}},Ge=function(e,t,n,r){return t.parent&&Pe(t),t._start=ge((L(n)?n:n||e!==l?Ke(e,n,t):e._time)+t._delay),t._end=ge(t._start+(t.totalDuration()/Math.abs(t.timeScale())||0)),Te(e,t,"_first","_last",e._sort?"_start":0),je(t)||(e._recent=t),r||Ue(e,t),e._ts<0&&ze(e,e._tTime),e},He=function(e,t){return(X.ScrollTrigger||q("scrollTrigger",t))&&X.ScrollTrigger.create(t,e)},Ve=function(e,t,n,r,i){return Jt(e,t,i),e._initted?!n&&e._pt&&!s&&(e._dur&&!1!==e.vars.lazy||!e._dur&&e.vars.lazy)&&f!==At.frame?(ie.push(e),e._lazy=[i,r],1):void 0:1},We=function e(t){var n=t.parent;return n&&n._ts&&n._initted&&!n._lock&&(n.rawTime()<0||e(n))},je=function(e){var t=e.data;return"isFromStart"===t||"isStart"===t},Je=function(e,t,n,r){var i=e._repeat,a=ge(t)||0,s=e._tTime/e._tDur;return s&&!r&&(e._time*=a/e._dur),e._dur=a,e._tDur=i?i<0?1e10:ge(a*(i+1)+e._rDelay*i):a,s>0&&!r&&ze(e,e._tTime=e._tDur*s),e.parent&&Ne(e),n||Re(e.parent,e),e},Xe=function(e){return e instanceof Ut?Re(e):Je(e,e._dur)},Ye={_start:0,endTime:$,totalDuration:$},Ke=function e(t,n,r){var i,a,s,o=t.labels,l=t._recent||Ye,u=t.duration()>=w?l.endTime(!1):t._dur;return P(n)&&(isNaN(n)||n in o)?(a=n.charAt(0),s="%"===n.substr(-1),i=n.indexOf("="),"<"===a||">"===a?(i>=0&&(n=n.replace(/=/,"")),("<"===a?l._start:l.endTime(l._repeat>=0))+(parseFloat(n.substr(1))||0)*(s?(i<0?l:r).totalDuration()/100:1)):i<0?(n in o||(o[n]=u),o[n]):(a=parseFloat(n.charAt(i-1)+n.substr(i+1)),s&&r&&(a=a/100*(z(r)?r[0]:r).totalDuration()),i>1?e(t,n.substr(0,i-1),r)+a:u+a)):null==n?u:+n},qe=function(e,t,n){var r,i,a=L(t[1]),s=(a?2:1)+(e<2?0:1),o=t[s];if(a&&(o.duration=t[1]),o.parent=n,e){for(r=o,i=n;i&&!("immediateRender"in r);)r=i.vars.defaults||{},i=k(i.vars.inherit)&&i.parent;o.immediateRender=k(r.immediateRender),e<2?o.runBackwards=1:o.startAt=t[s-1]}return new Qt(t[0],o,t[s+1])},Qe=function(e,t){return e||0===e?t(e):t},Ze=function(e,t,n){return n<e?e:n>t?t:n},$e=function(e,t){return P(e)&&(t=J.exec(e))?t[1]:""},et=[].slice,tt=function(e,t){return e&&I(e)&&"length"in e&&(!t&&!e.length||e.length-1 in e&&I(e[0]))&&!e.nodeType&&e!==u},nt=function(e,t,n){return o&&!t&&o.selector?o.selector(e):!P(e)||n||!c&&Ct()?z(e)?function(e,t,n){return void 0===n&&(n=[]),e.forEach((function(e){var r;return P(e)&&!t||tt(e,1)?(r=n).push.apply(r,nt(e)):n.push(e)}))||n}(e,n):tt(e)?et.call(e,0):e?[e]:[]:et.call((t||h).querySelectorAll(e),0)},rt=function(e){return e=nt(e)[0]||Q("Invalid scope")||{},function(t){var n=e.current||e.nativeElement||e;return nt(t,n.querySelectorAll?n:n===e?Q("Invalid scope")||h.createElement("div"):e)}},it=function(e){return e.sort((function(){return.5-Math.random()}))},at=function(e){if(R(e))return e;var t=I(e)?e:{each:e},n=Dt(t.ease),r=t.from||0,i=parseFloat(t.base)||0,a={},s=r>0&&r<1,o=isNaN(r)||s,l=t.axis,u=r,c=r;return P(r)?u=c={center:.5,edges:.5,end:1}[r]||0:!s&&o&&(u=r[0],c=r[1]),function(e,s,h){var d,f,p,m,g,v,y,x,b,_=(h||t).length,M=a[_];if(!M){if(!(b="auto"===t.grid?0:(t.grid||[1,w])[1])){for(y=-w;y<(y=h[b++].getBoundingClientRect().left)&&b<_;);b--}for(M=a[_]=[],d=o?Math.min(b,_)*u-.5:r%b,f=b===w?0:o?_*c/b-.5:r/b|0,y=0,x=w,v=0;v<_;v++)p=v%b-d,m=f-(v/b|0),M[v]=g=l?Math.abs("y"===l?m:p):E(p*p+m*m),g>y&&(y=g),g<x&&(x=g);"random"===r&&it(M),M.max=y-x,M.min=x,M.v=_=(parseFloat(t.amount)||parseFloat(t.each)*(b>_?_-1:l?"y"===l?_/b:b:Math.max(b,_/b))||0)*("edges"===r?-1:1),M.b=_<0?i-_:i,M.u=$e(t.amount||t.each)||0,n=n&&_<0?Rt(n):n}return _=(M[e]-M.min)/M.max||0,ge(M.b+(n?n(_):_)*M.v)+M.u}},st=function(e){var t=Math.pow(10,((e+"").split(".")[1]||"").length);return function(n){var r=ge(Math.round(parseFloat(n)/e)*e*t);return(r-r%1)/t+(L(n)?0:$e(n))}},ot=function(e,t){var n,r,i=z(e);return!i&&I(e)&&(n=i=e.radius||w,e.values?(e=nt(e.values),(r=!L(e[0]))&&(n*=n)):e=st(e.increment)),Qe(t,i?R(e)?function(t){return r=e(t),Math.abs(r-t)<=n?r:t}:function(t){for(var i,a,s=parseFloat(r?t.x:t),o=parseFloat(r?t.y:0),l=w,u=0,c=e.length;c--;)(i=r?(i=e[c].x-s)*i+(a=e[c].y-o)*a:Math.abs(e[c]-s))<l&&(l=i,u=c);return u=!n||l<=n?e[u]:t,r||u===t||L(t)?u:u+$e(t)}:st(e))},lt=function(e,t,n,r){return Qe(z(e)?!t:!0===n?!!(n=0):!r,(function(){return z(e)?e[~~(Math.random()*e.length)]:(n=n||1e-5)&&(r=n<1?Math.pow(10,(n+"").length-2):1)&&Math.floor(Math.round((e-n/2+Math.random()*(t-e+.99*n))/n)*n*r)/r}))},ut=function(e,t,n){return Qe(n,(function(n){return e[~~t(n)]}))},ct=function(e){for(var t,n,r,i,a=0,s="";~(t=e.indexOf("random(",a));)r=e.indexOf(")",t),i="["===e.charAt(t+7),n=e.substr(t+7,r-t-7).match(i?j:U),s+=e.substr(a,t-a)+lt(i?n:+n[0],i?0:+n[1],+n[2]||1e-5),a=r+1;return s+e.substr(a,e.length-a)},ht=function(e,t,n,r,i){var a=t-e,s=r-n;return Qe(i,(function(t){return n+((t-e)/a*s||0)}))},dt=function(e,t,n){var r,i,a,s=e.labels,o=w;for(r in s)(i=s[r]-t)<0==!!n&&i&&o>(i=Math.abs(i))&&(a=r,o=i);return a},ft=function(e,t,n){var r,i,a,s=e.vars,l=s[t],u=o,c=e._ctx;if(l)return r=s[t+"Params"],i=s.callbackScope||e,n&&ie.length&&xe(),c&&(o=c),a=r?l.apply(i,r):l.call(i),o=u,a},pt=function(e){return Pe(e),e.scrollTrigger&&e.scrollTrigger.kill(!!s),e.progress()<1&&ft(e,"onInterrupt"),e},mt=function(e){var t=(e=!e.name&&e.default||e).name,n=R(e),r=t&&!n&&e.init?function(){this._props=[]}:e,i={init:$,render:on,add:Wt,kill:un,modifier:ln,rawVars:0},a={targetTest:0,get:0,getSetter:nn,aliases:{},register:0};if(Ct(),e!==r){if(se[t])return;Me(r,Me(Ce(e,i),a)),Se(r.prototype,Se(i,Ce(e,a))),se[r.prop=t]=r,e.targetTest&&(ue.push(r),re[t]=1),t=("css"===t?"CSS":t.charAt(0).toUpperCase()+t.substr(1))+"Plugin"}Z(t,r),e.register&&e.register(Sn,r,dn)},gt=255,vt={aqua:[0,gt,gt],lime:[0,gt,0],silver:[192,192,192],black:[0,0,0],maroon:[128,0,0],teal:[0,128,128],blue:[0,0,gt],navy:[0,0,128],white:[gt,gt,gt],olive:[128,128,0],yellow:[gt,gt,0],orange:[gt,165,0],gray:[128,128,128],purple:[128,0,128],green:[0,128,0],red:[gt,0,0],pink:[gt,192,203],cyan:[0,gt,gt],transparent:[gt,gt,gt,0]},yt=function(e,t,n){return(6*(e+=e<0?1:e>1?-1:0)<1?t+(n-t)*e*6:e<.5?n:3*e<2?t+(n-t)*(2/3-e)*6:t)*gt+.5|0},xt=function(e,t,n){var r,i,a,s,o,l,u,c,h,d,f=e?L(e)?[e>>16,e>>8>,e>]:0:vt.black;if(!f){if(","===e.substr(-1)&&(e=e.substr(0,e.length-1)),vt[e])f=vt[e];else if("#"===e.charAt(0)){if(e.length<6&&(r=e.charAt(1),i=e.charAt(2),a=e.charAt(3),e="#"+r+r+i+i+a+a+(5===e.length?e.charAt(4)+e.charAt(4):"")),9===e.length)return[(f=parseInt(e.substr(1,6),16))>>16,f>>8>,f>,parseInt(e.substr(7),16)/255];f=[(e=parseInt(e.substr(1),16))>>16,e>>8>,e>]}else if("hsl"===e.substr(0,3))if(f=d=e.match(U),t){if(~e.indexOf("="))return f=e.match(G),n&&f.length<4&&(f[3]=1),f}else s=+f[0]%360/360,o=+f[1]/100,r=2*(l=+f[2]/100)-(i=l<=.5?l*(o+1):l+o-l*o),f.length>3&&(f[3]*=1),f[0]=yt(s+1/3,r,i),f[1]=yt(s,r,i),f[2]=yt(s-1/3,r,i);else f=e.match(U)||vt.transparent;f=f.map(Number)}return t&&!d&&(r=f[0]/gt,i=f[1]/gt,a=f[2]/gt,l=((u=Math.max(r,i,a))+(c=Math.min(r,i,a)))/2,u===c?s=o=0:(h=u-c,o=l>.5?h/(2-u-c):h/(u+c),s=u===r?(i-a)/h+(i<a?6:0):u===i?(a-r)/h+2:(r-i)/h+4,s*=60),f[0]=~~(s+.5),f[1]=~~(100*o+.5),f[2]=~~(100*l+.5)),n&&f.length<4&&(f[3]=1),f},bt=function(e){var t=[],n=[],r=-1;return e.split(wt).forEach((function(e){var i=e.match(H)||[];t.push.apply(t,i),n.push(r+=i.length+1)})),t.c=n,t},_t=function(e,t,n){var r,i,a,s,o="",l=(e+o).match(wt),u=t?"hsla(":"rgba(",c=0;if(!l)return e;if(l=l.map((function(e){return(e=xt(e,t,1))&&u+(t?e[0]+","+e[1]+"%,"+e[2]+"%,"+e[3]:e.join(","))+")"})),n&&(a=bt(e),(r=n.c).join(o)!==a.c.join(o)))for(s=(i=e.replace(wt,"1").split(H)).length-1;c<s;c++)o+=i[c]+(~r.indexOf(c)?l.shift()||u+"0,0,0,0)":(a.length?a:l.length?l:n).shift());if(!i)for(s=(i=e.split(wt)).length-1;c<s;c++)o+=i[c]+l[c];return o+i[s]},wt=function(){var e,t="(?:\\b(?:(?:rgb|rgba|hsl|hsla)\\(.+?\\))|\\B#(?:[0-9a-f]{3,4}){1,2}\\b";for(e in vt)t+="|"+e+"\\b";return new RegExp(t+")","gi")}(),Mt=/hsl[a]?\(/,St=function(e){var t,n=e.join(" ");if(wt.lastIndex=0,wt.test(n))return t=Mt.test(n),e[1]=_t(e[1],t),e[0]=_t(e[0],t,bt(e[1])),!0},At=function(){var e,t,n,r,i,a,s=Date.now,o=500,l=33,f=s(),p=f,g=1e3/240,v=g,y=[],x=function n(u){var c,h,d,m,x=s()-p,b=!0===u;if(x>o&&(f+=x-l),((c=(d=(p+=x)-f)-v)>0||b)&&(m=++r.frame,i=d-1e3*r.time,r.time=d/=1e3,v+=c+(c>=g?4:g-c),h=1),b||(e=t(n)),h)for(a=0;a<y.length;a++)y[a](d,i,m,u)};return r={time:0,frame:0,tick:function(){x(!0)},deltaRatio:function(e){return i/(1e3/(e||60))},wake:function(){d&&(!c&&F()&&(u=c=window,h=u.document||{},X.gsap=Sn,(u.gsapVersions||(u.gsapVersions=[])).push(Sn.version),K(Y||u.GreenSockGlobals||!u.gsap&&u||{}),n=u.requestAnimationFrame),e&&r.sleep(),t=n||function(e){return setTimeout(e,v-1e3*r.time+1|0)},m=1,x(2))},sleep:function(){(n?u.cancelAnimationFrame:clearTimeout)(e),m=0,t=$},lagSmoothing:function(e,t){o=e||1/0,l=Math.min(t||33,o)},fps:function(e){g=1e3/(e||240),v=1e3*r.time+g},add:function(e,t,n){var i=t?function(t,n,a,s){e(t,n,a,s),r.remove(i)}:e;return r.remove(e),y[n?"unshift":"push"](i),Ct(),i},remove:function(e,t){~(t=y.indexOf(e))&&y.splice(t,1)&&a>=t&&a--},_listeners:y}}(),Ct=function(){return!m&&At.wake()},Et={},Tt=/^[\d.\-M][\d.\-,\s]/,Bt=/["']/g,Pt=function(e){for(var t,n,r,i={},a=e.substr(1,e.length-3).split(":"),s=a[0],o=1,l=a.length;o<l;o++)n=a[o],t=o!==l-1?n.lastIndexOf(","):n.length,r=n.substr(0,t),i[s]=isNaN(r)?r.replace(Bt,"").trim():+r,s=n.substr(t+1).trim();return i},Rt=function(e){return function(t){return 1-e(1-t)}},Lt=function e(t,n){for(var r,i=t._first;i;)i instanceof Ut?e(i,n):!i.vars.yoyoEase||i._yoyo&&i._repeat||i._yoyo===n||(i.timeline?e(i.timeline,n):(r=i._ease,i._ease=i._yEase,i._yEase=r,i._yoyo=n)),i=i._next},Dt=function(e,t){return e&&(R(e)?e:Et[e]||function(e){var t,n,r,i,a=(e+"").split("("),s=Et[a[0]];return s&&a.length>1&&s.config?s.config.apply(null,~e.indexOf("{")?[Pt(a[1])]:(t=e,n=t.indexOf("(")+1,r=t.indexOf(")"),i=t.indexOf("(",n),t.substring(n,~i&&i<r?t.indexOf(")",r+1):r)).split(",").map(_e)):Et._CE&&Tt.test(e)?Et._CE("",e):s}(e))||t},It=function(e,t,n,r){void 0===n&&(n=function(e){return 1-t(1-e)}),void 0===r&&(r=function(e){return e<.5?t(2*e)/2:1-t(2*(1-e))/2});var i,a={easeIn:t,easeOut:n,easeInOut:r};return pe(e,(function(e){for(var t in Et[e]=X[e]=a,Et[i=e.toLowerCase()]=n,a)Et[i+("easeIn"===t?".in":"easeOut"===t?".out":".inOut")]=Et[e+"."+t]=a[t]})),a},kt=function(e){return function(t){return t<.5?(1-e(1-2*t))/2:.5+e(2*(t-.5))/2}},Ft=function e(t,n,r){var i=n>=1?n:1,a=(r||(t?.3:.45))/(n<1?n:1),s=a/S*(Math.asin(1/i)||0),o=function(e){return 1===e?1:i*Math.pow(2,-10*e)*B((e-s)*a)+1},l="out"===t?o:"in"===t?function(e){return 1-o(1-e)}:kt(o);return a=S/a,l.config=function(n,r){return e(t,n,r)},l},Ot=function e(t,n){void 0===n&&(n=1.70158);var r=function(e){return e?--e*e*((n+1)*e+n)+1:0},i="out"===t?r:"in"===t?function(e){return 1-r(1-e)}:kt(r);return i.config=function(n){return e(t,n)},i};pe("Linear,Quad,Cubic,Quart,Quint,Strong",(function(e,t){var n=t<5?t+1:t;It(e+",Power"+(n-1),t?function(e){return Math.pow(e,n)}:function(e){return e},(function(e){return 1-Math.pow(1-e,n)}),(function(e){return e<.5?Math.pow(2*e,n)/2:1-Math.pow(2*(1-e),n)/2}))})),Et.Linear.easeNone=Et.none=Et.Linear.easeIn,It("Elastic",Ft("in"),Ft("out"),Ft()),g=7.5625,y=1/(v=2.75),It("Bounce",(function(e){return 1-x(1-e)}),x=function(e){return e<y?g*e*e:e<.7272727272727273?g*Math.pow(e-1.5/v,2)+.75:e<.9090909090909092?g*(e-=2.25/v)*e+.9375:g*Math.pow(e-2.625/v,2)+.984375}),It("Expo",(function(e){return e?Math.pow(2,10*(e-1)):0})),It("Circ",(function(e){return-(E(1-e*e)-1)})),It("Sine",(function(e){return 1===e?1:1-T(e*A)})),It("Back",Ot("in"),Ot("out"),Ot()),Et.SteppedEase=Et.steps=X.SteppedEase={config:function(e,t){void 0===e&&(e=1);var n=1/e,r=e+(t?0:1),i=t?1:0;return function(e){return((r*Ze(0,.99999999,e)|0)+i)*n}}},_.ease=Et["quad.out"],pe("onComplete,onUpdate,onStart,onRepeat,onReverseComplete,onInterrupt",(function(e){return ce+=e+","+e+"Params,"}));var Nt=function(e,t){this.id=C++,e._gsap=this,this.target=e,this.harness=t,this.get=t?t.get:fe,this.set=t?t.getSetter:nn},zt=function(){function e(e){this.vars=e,this._delay=+e.delay||0,(this._repeat=e.repeat===1/0?-2:e.repeat||0)&&(this._rDelay=e.repeatDelay||0,this._yoyo=!!e.yoyo||!!e.yoyoEase),this._ts=1,Je(this,+e.duration,1,1),this.data=e.data,o&&(this._ctx=o,o.data.push(this)),m||At.wake()}var t=e.prototype;return t.delay=function(e){return e||0===e?(this.parent&&this.parent.smoothChildTiming&&this.startTime(this._start+e-this._delay),this._delay=e,this):this._delay},t.duration=function(e){return arguments.length?this.totalDuration(this._repeat>0?e+(e+this._rDelay)*this._repeat:e):this.totalDuration()&&this._dur},t.totalDuration=function(e){return arguments.length?(this._dirty=0,Je(this,this._repeat<0?e:(e-this._repeat*this._rDelay)/(this._repeat+1))):this._tDur},t.totalTime=function(e,t){if(Ct(),!arguments.length)return this._tTime;var n=this._dp;if(n&&n.smoothChildTiming&&this._ts){for(ze(this,e),!n._dp||n.parent||Ue(n,this);n&&n.parent;)n.parent._time!==n._start+(n._ts>=0?n._tTime/n._ts:(n.totalDuration()-n._tTime)/-n._ts)&&n.totalTime(n._tTime,!0),n=n.parent;!this.parent&&this._dp.autoRemoveChildren&&(this._ts>0&&e<this._tDur||this._ts<0&&e>0||!this._tDur&&!e)&&Ge(this._dp,this,this._start-this._delay)}return(this._tTime!==e||!this._dur&&!t||this._initted&&Math.abs(this._zTime)===M||!e&&!this._initted&&(this.add||this._ptLookup))&&(this._ts||(this._pTime=e),be(this,e,t)),this},t.time=function(e,t){return arguments.length?this.totalTime(Math.min(this.totalDuration(),e+ke(this))%(this._dur+this._rDelay)||(e?this._dur:0),t):this._time},t.totalProgress=function(e,t){return arguments.length?this.totalTime(this.totalDuration()*e,t):this.totalDuration()?Math.min(1,this._tTime/this._tDur):this.ratio},t.progress=function(e,t){return arguments.length?this.totalTime(this.duration()*(!this._yoyo||1&this.iteration()?e:1-e)+ke(this),t):this.duration()?Math.min(1,this._time/this._dur):this.ratio},t.iteration=function(e,t){var n=this.duration()+this._rDelay;return arguments.length?this.totalTime(this._time+(e-1)*n,t):this._repeat?Fe(this._tTime,n)+1:1},t.timeScale=function(e){if(!arguments.length)return-1e-8===this._rts?0:this._rts;if(this._rts===e)return this;var t=this.parent&&this._ts?Oe(this.parent._time,this):this._tTime;return this._rts=+e||0,this._ts=this._ps||-1e-8===e?0:this._rts,this.totalTime(Ze(-this._delay,this._tDur,t),!0),Ne(this),Le(this)},t.paused=function(e){return arguments.length?(this._ps!==e&&(this._ps=e,e?(this._pTime=this._tTime||Math.max(-this._delay,this.rawTime()),this._ts=this._act=0):(Ct(),this._ts=this._rts,this.totalTime(this.parent&&!this.parent.smoothChildTiming?this.rawTime():this._tTime||this._pTime,1===this.progress()&&Math.abs(this._zTime)!==M&&(this._tTime-=M)))),this):this._ps},t.startTime=function(e){if(arguments.length){this._start=e;var t=this.parent||this._dp;return t&&(t._sort||!this.parent)&&Ge(t,this,e-this._delay),this}return this._start},t.endTime=function(e){return this._start+(k(e)?this.totalDuration():this.duration())/Math.abs(this._ts||1)},t.rawTime=function(e){var t=this.parent||this._dp;return t?e&&(!this._ts||this._repeat&&this._time&&this.totalProgress()<1)?this._tTime%(this._dur+this._rDelay):this._ts?Oe(t.rawTime(e),this):this._tTime:this._tTime},t.revert=function(e){void 0===e&&(e=ne);var t=s;return s=e,(this._initted||this._startAt)&&(this.timeline&&this.timeline.revert(e),this.totalTime(-.01,e.suppressEvents)),"nested"!==this.data&&!1!==e.kill&&this.kill(),s=t,this},t.globalTime=function(e){for(var t=this,n=arguments.length?e:t.rawTime();t;)n=t._start+n/(t._ts||1),t=t._dp;return!this.parent&&this._sat?this._sat.vars.immediateRender?-1:this._sat.globalTime(e):n},t.repeat=function(e){return arguments.length?(this._repeat=e===1/0?-2:e,Xe(this)):-2===this._repeat?1/0:this._repeat},t.repeatDelay=function(e){if(arguments.length){var t=this._time;return this._rDelay=e,Xe(this),t?this.time(t):this}return this._rDelay},t.yoyo=function(e){return arguments.length?(this._yoyo=e,this):this._yoyo},t.seek=function(e,t){return this.totalTime(Ke(this,e),k(t))},t.restart=function(e,t){return this.play().totalTime(e?-this._delay:0,k(t))},t.play=function(e,t){return null!=e&&this.seek(e,t),this.reversed(!1).paused(!1)},t.reverse=function(e,t){return null!=e&&this.seek(e||this.totalDuration(),t),this.reversed(!0).paused(!1)},t.pause=function(e,t){return null!=e&&this.seek(e,t),this.paused(!0)},t.resume=function(){return this.paused(!1)},t.reversed=function(e){return arguments.length?(!!e!==this.reversed()&&this.timeScale(-this._rts||(e?-1e-8:0)),this):this._rts<0},t.invalidate=function(){return this._initted=this._act=0,this._zTime=-1e-8,this},t.isActive=function(){var e,t=this.parent||this._dp,n=this._start;return!(t&&!(this._ts&&this._initted&&t.isActive()&&(e=t.rawTime(!0))>=n&&e<this.endTime(!0)-M))},t.eventCallback=function(e,t,n){var r=this.vars;return arguments.length>1?(t?(r[e]=t,n&&(r[e+"Params"]=n),"onUpdate"===e&&(this._onUpdate=t)):delete r[e],this):r[e]},t.then=function(e){var t=this;return new Promise((function(n){var r=R(e)?e:we,i=function(){var e=t.then;t.then=null,R(r)&&(r=r(t))&&(r.then||r===t)&&(t.then=e),n(r),t.then=e};t._initted&&1===t.totalProgress()&&t._ts>=0||!t._tTime&&t._ts<0?i():t._prom=i}))},t.kill=function(){pt(this)},e}();Me(zt.prototype,{_time:0,_start:0,_end:0,_tTime:0,_tDur:0,_dirty:0,_repeat:0,_yoyo:!1,parent:null,_initted:!1,_rDelay:0,_ts:1,_dp:0,ratio:0,_zTime:-1e-8,_prom:0,_ps:!1,_rts:1});var Ut=function(e){function t(t,n){var i;return void 0===t&&(t={}),(i=e.call(this,t)||this).labels={},i.smoothChildTiming=!!t.smoothChildTiming,i.autoRemoveChildren=!!t.autoRemoveChildren,i._sort=k(t.sortChildren),l&&Ge(t.parent||l,r(i),n),t.reversed&&i.reverse(),t.paused&&i.paused(!0),t.scrollTrigger&&He(r(i),t.scrollTrigger),i}i(t,e);var n=t.prototype;return n.to=function(e,t,n){return qe(0,arguments,this),this},n.from=function(e,t,n){return qe(1,arguments,this),this},n.fromTo=function(e,t,n,r){return qe(2,arguments,this),this},n.set=function(e,t,n){return t.duration=0,t.parent=this,Ee(t).repeatDelay||(t.repeat=0),t.immediateRender=!!t.immediateRender,new Qt(e,t,Ke(this,n),1),this},n.call=function(e,t,n){return Ge(this,Qt.delayedCall(0,e,t),n)},n.staggerTo=function(e,t,n,r,i,a,s){return n.duration=t,n.stagger=n.stagger||r,n.onComplete=a,n.onCompleteParams=s,n.parent=this,new Qt(e,n,Ke(this,i)),this},n.staggerFrom=function(e,t,n,r,i,a,s){return n.runBackwards=1,Ee(n).immediateRender=k(n.immediateRender),this.staggerTo(e,t,n,r,i,a,s)},n.staggerFromTo=function(e,t,n,r,i,a,s,o){return r.startAt=n,Ee(r).immediateRender=k(r.immediateRender),this.staggerTo(e,t,r,i,a,s,o)},n.render=function(e,t,n){var r,i,a,o,u,c,h,d,f,p,m,g,v=this._time,y=this._dirty?this.totalDuration():this._tDur,x=this._dur,b=e<=0?0:ge(e),_=this._zTime<0!=e<0&&(this._initted||!x);if(this!==l&&b>y&&e>=0&&(b=y),b!==this._tTime||n||_){if(v!==this._time&&x&&(b+=this._time-v,e+=this._time-v),r=b,f=this._start,c=!(d=this._ts),_&&(x||(v=this._zTime),(e||!t)&&(this._zTime=e)),this._repeat){if(m=this._yoyo,u=x+this._rDelay,this._repeat<-1&&e<0)return this.totalTime(100*u+e,t,n);if(r=ge(b%u),b===y?(o=this._repeat,r=x):((o=~~(b/u))&&o===b/u&&(r=x,o--),r>x&&(r=x)),p=Fe(this._tTime,u),!v&&this._tTime&&p!==o&&(p=o),m&&1&o&&(r=x-r,g=1),o!==p&&!this._lock){var w=m&&1&p,S=w===(m&&1&o);if(o<p&&(w=!w),v=w?0:x,this._lock=1,this.render(v||(g?0:ge(o*u)),t,!x)._lock=0,this._tTime=b,!t&&this.parent&&ft(this,"onRepeat"),this.vars.repeatRefresh&&!g&&(this.invalidate()._lock=1),v&&v!==this._time||c!==!this._ts||this.vars.onRepeat&&!this.parent&&!this._act)return this;if(x=this._dur,y=this._tDur,S&&(this._lock=2,v=w?x:-1e-4,this.render(v,!0),this.vars.repeatRefresh&&!g&&this.invalidate()),this._lock=0,!this._ts&&!c)return this;Lt(this,g)}}if(this._hasPause&&!this._forcing&&this._lock<2&&(h=function(e,t,n){var r;if(n>t)for(r=e._first;r&&r._start<=n;){if("isPause"===r.data&&r._start>t)return r;r=r._next}else for(r=e._last;r&&r._start>=n;){if("isPause"===r.data&&r._start<t)return r;r=r._prev}}(this,ge(v),ge(r)),h&&(b-=r-(r=h._start))),this._tTime=b,this._time=r,this._act=!d,this._initted||(this._onUpdate=this.vars.onUpdate,this._initted=1,this._zTime=e,v=0),!v&&r&&!t&&(ft(this,"onStart"),this._tTime!==b))return this;if(r>=v&&e>=0)for(i=this._first;i;){if(a=i._next,(i._act||r>=i._start)&&i._ts&&h!==i){if(i.parent!==this)return this.render(e,t,n);if(i.render(i._ts>0?(r-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(r-i._start)*i._ts,t,n),r!==this._time||!this._ts&&!c){h=0,a&&(b+=this._zTime=-1e-8);break}}i=a}else{i=this._last;for(var A=e<0?e:r;i;){if(a=i._prev,(i._act||A<=i._end)&&i._ts&&h!==i){if(i.parent!==this)return this.render(e,t,n);if(i.render(i._ts>0?(A-i._start)*i._ts:(i._dirty?i.totalDuration():i._tDur)+(A-i._start)*i._ts,t,n||s&&(i._initted||i._startAt)),r!==this._time||!this._ts&&!c){h=0,a&&(b+=this._zTime=A?-1e-8:M);break}}i=a}}if(h&&!t&&(this.pause(),h.render(r>=v?0:-1e-8)._zTime=r>=v?1:-1,this._ts))return this._start=f,Ne(this),this.render(e,t,n);this._onUpdate&&!t&&ft(this,"onUpdate",!0),(b===y&&this._tTime>=this.totalDuration()||!b&&v)&&(f!==this._start&&Math.abs(d)===Math.abs(this._ts)||this._lock||((e||!x)&&(b===y&&this._ts>0||!b&&this._ts<0)&&Pe(this,1),t||e<0&&!v||!b&&!v&&y||(ft(this,b===y&&e>=0?"onComplete":"onReverseComplete",!0),this._prom&&!(b<y&&this.timeScale()>0)&&this._prom())))}return this},n.add=function(e,t){var n=this;if(L(t)||(t=Ke(this,t,e)),!(e instanceof zt)){if(z(e))return e.forEach((function(e){return n.add(e,t)})),this;if(P(e))return this.addLabel(e,t);if(!R(e))return this;e=Qt.delayedCall(0,e)}return this!==e?Ge(this,e,t):this},n.getChildren=function(e,t,n,r){void 0===e&&(e=!0),void 0===t&&(t=!0),void 0===n&&(n=!0),void 0===r&&(r=-w);for(var i=[],a=this._first;a;)a._start>=r&&(a instanceof Qt?t&&i.push(a):(n&&i.push(a),e&&i.push.apply(i,a.getChildren(!0,t,n)))),a=a._next;return i},n.getById=function(e){for(var t=this.getChildren(1,1,1),n=t.length;n--;)if(t[n].vars.id===e)return t[n]},n.remove=function(e){return P(e)?this.removeLabel(e):R(e)?this.killTweensOf(e):(Be(this,e),e===this._recent&&(this._recent=this._last),Re(this))},n.totalTime=function(t,n){return arguments.length?(this._forcing=1,!this._dp&&this._ts&&(this._start=ge(At.time-(this._ts>0?t/this._ts:(this.totalDuration()-t)/-this._ts))),e.prototype.totalTime.call(this,t,n),this._forcing=0,this):this._tTime},n.addLabel=function(e,t){return this.labels[e]=Ke(this,t),this},n.removeLabel=function(e){return delete this.labels[e],this},n.addPause=function(e,t,n){var r=Qt.delayedCall(0,t||$,n);return r.data="isPause",this._hasPause=1,Ge(this,r,Ke(this,e))},n.removePause=function(e){var t=this._first;for(e=Ke(this,e);t;)t._start===e&&"isPause"===t.data&&Pe(t),t=t._next},n.killTweensOf=function(e,t,n){for(var r=this.getTweensOf(e,n),i=r.length;i--;)Gt!==r[i]&&r[i].kill(e,t);return this},n.getTweensOf=function(e,t){for(var n,r=[],i=nt(e),a=this._first,s=L(t);a;)a instanceof Qt?ye(a._targets,i)&&(s?(!Gt||a._initted&&a._ts)&&a.globalTime(0)<=t&&a.globalTime(a.totalDuration())>t:!t||a.isActive())&&r.push(a):(n=a.getTweensOf(i,t)).length&&r.push.apply(r,n),a=a._next;return r},n.tweenTo=function(e,t){t=t||{};var n,r=this,i=Ke(r,e),a=t,s=a.startAt,o=a.onStart,l=a.onStartParams,u=a.immediateRender,c=Qt.to(r,Me({ease:t.ease||"none",lazy:!1,immediateRender:!1,time:i,overwrite:"auto",duration:t.duration||Math.abs((i-(s&&"time"in s?s.time:r._time))/r.timeScale())||M,onStart:function(){if(r.pause(),!n){var e=t.duration||Math.abs((i-(s&&"time"in s?s.time:r._time))/r.timeScale());c._dur!==e&&Je(c,e,0,1).render(c._time,!0,!0),n=1}o&&o.apply(c,l||[])}},t));return u?c.render(0):c},n.tweenFromTo=function(e,t,n){return this.tweenTo(t,Me({startAt:{time:Ke(this,e)}},n))},n.recent=function(){return this._recent},n.nextLabel=function(e){return void 0===e&&(e=this._time),dt(this,Ke(this,e))},n.previousLabel=function(e){return void 0===e&&(e=this._time),dt(this,Ke(this,e),1)},n.currentLabel=function(e){return arguments.length?this.seek(e,!0):this.previousLabel(this._time+M)},n.shiftChildren=function(e,t,n){void 0===n&&(n=0);for(var r,i=this._first,a=this.labels;i;)i._start>=n&&(i._start+=e,i._end+=e),i=i._next;if(t)for(r in a)a[r]>=n&&(a[r]+=e);return Re(this)},n.invalidate=function(t){var n=this._first;for(this._lock=0;n;)n.invalidate(t),n=n._next;return e.prototype.invalidate.call(this,t)},n.clear=function(e){void 0===e&&(e=!0);for(var t,n=this._first;n;)t=n._next,this.remove(n),n=t;return this._dp&&(this._time=this._tTime=this._pTime=0),e&&(this.labels={}),Re(this)},n.totalDuration=function(e){var t,n,r,i=0,a=this,s=a._last,o=w;if(arguments.length)return a.timeScale((a._repeat<0?a.duration():a.totalDuration())/(a.reversed()?-e:e));if(a._dirty){for(r=a.parent;s;)t=s._prev,s._dirty&&s.totalDuration(),(n=s._start)>o&&a._sort&&s._ts&&!a._lock?(a._lock=1,Ge(a,s,n-s._delay,1)._lock=0):o=n,n<0&&s._ts&&(i-=n,(!r&&!a._dp||r&&r.smoothChildTiming)&&(a._start+=n/a._ts,a._time-=n,a._tTime-=n),a.shiftChildren(-n,!1,-Infinity),o=0),s._end>i&&s._ts&&(i=s._end),s=t;Je(a,a===l&&a._time>i?a._time:i,1,1),a._dirty=0}return a._tDur},t.updateRoot=function(e){if(l._ts&&(be(l,Oe(e,l)),f=At.frame),At.frame>=le){le+=b.autoSleep||120;var t=l._first;if((!t||!t._ts)&&b.autoSleep&&At._listeners.length<2){for(;t&&!t._ts;)t=t._next;t||At.sleep()}}},t}(zt);Me(Ut.prototype,{_lock:0,_hasPause:0,_forcing:0});var Gt,Ht,Vt=function(e,t,n,r,i,a,s){var o,l,u,c,h,d,f,p,m=new dn(this._pt,e,t,0,1,sn,null,i),g=0,v=0;for(m.b=n,m.e=r,n+="",(f=~(r+="").indexOf("random("))&&(r=ct(r)),a&&(a(p=[n,r],e,t),n=p[0],r=p[1]),l=n.match(V)||[];o=V.exec(r);)c=o[0],h=r.substring(g,o.index),u?u=(u+1)%5:"rgba("===h.substr(-5)&&(u=1),c!==l[v++]&&(d=parseFloat(l[v-1])||0,m._pt={_next:m._pt,p:h||1===v?h:",",s:d,c:"="===c.charAt(1)?ve(d,c)-d:parseFloat(c)-d,m:u&&u<4?Math.round:0},g=V.lastIndex);return m.c=g<r.length?r.substring(g,r.length):"",m.fp=s,(W.test(r)||f)&&(m.e=0),this._pt=m,m},Wt=function(e,t,n,r,i,a,s,o,l,u){R(r)&&(r=r(i||0,e,a));var c,h=e[t],d="get"!==n?n:R(h)?l?e[t.indexOf("set")||!R(e["get"+t.substr(3)])?t:"get"+t.substr(3)](l):e[t]():h,f=R(h)?l?en:$t:Zt;if(P(r)&&(~r.indexOf("random(")&&(r=ct(r)),"="===r.charAt(1)&&((c=ve(d,r)+($e(d)||0))||0===c)&&(r=c)),!u||d!==r||Ht)return isNaN(d*r)||""===r?(!h&&!(t in e)&&q(t,r),Vt.call(this,e,t,d,r,f,o||b.stringFilter,l)):(c=new dn(this._pt,e,t,+d||0,r-(d||0),"boolean"==typeof h?an:rn,0,f),l&&(c.fp=l),s&&c.modifier(s,this,e),this._pt=c)},jt=function(e,t,n,r,i,a){var s,o,l,u;if(se[e]&&!1!==(s=new se[e]).init(i,s.rawVars?t[e]:function(e,t,n,r,i){if(R(e)&&(e=Yt(e,i,t,n,r)),!I(e)||e.style&&e.nodeType||z(e)||N(e))return P(e)?Yt(e,i,t,n,r):e;var a,s={};for(a in e)s[a]=Yt(e[a],i,t,n,r);return s}(t[e],r,i,a,n),n,r,a)&&(n._pt=o=new dn(n._pt,i,e,0,1,s.render,s,0,s.priority),n!==p))for(l=n._ptLookup[n._targets.indexOf(i)],u=s._props.length;u--;)l[s._props[u]]=o;return s},Jt=function e(t,n,r){var i,o,u,c,h,d,f,p,m,g,v,y,x,b=t.vars,S=b.ease,A=b.startAt,C=b.immediateRender,E=b.lazy,T=b.onUpdate,B=b.onUpdateParams,P=b.callbackScope,R=b.runBackwards,L=b.yoyoEase,D=b.keyframes,I=b.autoRevert,F=t._dur,O=t._startAt,N=t._targets,z=t.parent,U=z&&"nested"===z.data?z.vars.targets:N,G="auto"===t._overwrite&&!a,H=t.timeline;if(H&&(!D||!S)&&(S="none"),t._ease=Dt(S,_.ease),t._yEase=L?Rt(Dt(!0===L?S:L,_.ease)):0,L&&t._yoyo&&!t._repeat&&(L=t._yEase,t._yEase=t._ease,t._ease=L),t._from=!H&&!!b.runBackwards,!H||D&&!b.stagger){if(y=(p=N[0]?de(N[0]).harness:0)&&b[p.prop],i=Ce(b,re),O&&(O._zTime<0&&O.progress(1),n<0&&R&&C&&!I?O.render(-1,!0):O.revert(R&&F?te:ee),O._lazy=0),A){if(Pe(t._startAt=Qt.set(N,Me({data:"isStart",overwrite:!1,parent:z,immediateRender:!0,lazy:!O&&k(E),startAt:null,delay:0,onUpdate:T,onUpdateParams:B,callbackScope:P,stagger:0},A))),t._startAt._dp=0,t._startAt._sat=t,n<0&&(s||!C&&!I)&&t._startAt.revert(te),C&&F&&n<=0&&r<=0)return void(n&&(t._zTime=n))}else if(R&&F&&!O)if(n&&(C=!1),u=Me({overwrite:!1,data:"isFromStart",lazy:C&&!O&&k(E),immediateRender:C,stagger:0,parent:z},i),y&&(u[p.prop]=y),Pe(t._startAt=Qt.set(N,u)),t._startAt._dp=0,t._startAt._sat=t,n<0&&(s?t._startAt.revert(te):t._startAt.render(-1,!0)),t._zTime=n,C){if(!n)return}else e(t._startAt,M,M);for(t._pt=t._ptCache=0,E=F&&k(E)||E&&!F,o=0;o<N.length;o++){if(f=(h=N[o])._gsap||he(N)[o]._gsap,t._ptLookup[o]=g={},ae[f.id]&&ie.length&&xe(),v=U===N?o:U.indexOf(h),p&&!1!==(m=new p).init(h,y||i,t,v,U)&&(t._pt=c=new dn(t._pt,h,m.name,0,1,m.render,m,0,m.priority),m._props.forEach((function(e){g[e]=c})),m.priority&&(d=1)),!p||y)for(u in i)se[u]&&(m=jt(u,i,t,v,h,U))?m.priority&&(d=1):g[u]=c=Wt.call(t,h,u,"get",i[u],v,U,0,b.stringFilter);t._op&&t._op[o]&&t.kill(h,t._op[o]),G&&t._pt&&(Gt=t,l.killTweensOf(h,g,t.globalTime(n)),x=!t.parent,Gt=0),t._pt&&E&&(ae[f.id]=1)}d&&hn(t),t._onInit&&t._onInit(t)}t._onUpdate=T,t._initted=(!t._op||t._pt)&&!x,D&&n<=0&&H.render(w,!0,!0)},Xt=function(e,t,n,r){var i,a,s=t.ease||r||"power1.inOut";if(z(t))a=n[e]||(n[e]=[]),t.forEach((function(e,n){return a.push({t:n/(t.length-1)*100,v:e,e:s})}));else for(i in t)a=n[i]||(n[i]=[]),"ease"===i||a.push({t:parseFloat(e),v:t[i],e:s})},Yt=function(e,t,n,r,i){return R(e)?e.call(t,n,r,i):P(e)&&~e.indexOf("random(")?ct(e):e},Kt=ce+"repeat,repeatDelay,yoyo,repeatRefresh,yoyoEase,autoRevert",qt={};pe(Kt+",id,stagger,delay,duration,paused,scrollTrigger",(function(e){return qt[e]=1}));var Qt=function(e){function t(t,n,i,s){var o;"number"==typeof n&&(i.duration=n,n=i,i=null);var u,c,h,d,f,p,m,g,v=(o=e.call(this,s?n:Ee(n))||this).vars,y=v.duration,x=v.delay,_=v.immediateRender,w=v.stagger,M=v.overwrite,S=v.keyframes,A=v.defaults,C=v.scrollTrigger,E=v.yoyoEase,T=n.parent||l,B=(z(t)||N(t)?L(t[0]):"length"in n)?[t]:nt(t);if(o._targets=B.length?he(B):Q("GSAP target "+t+" not found. https://greensock.com",!b.nullTargetWarn)||[],o._ptLookup=[],o._overwrite=M,S||w||O(y)||O(x)){if(n=o.vars,(u=o.timeline=new Ut({data:"nested",defaults:A||{},targets:T&&"nested"===T.data?T.vars.targets:B})).kill(),u.parent=u._dp=r(o),u._start=0,w||O(y)||O(x)){if(d=B.length,m=w&&at(w),I(w))for(f in w)~Kt.indexOf(f)&&(g||(g={}),g[f]=w[f]);for(c=0;c<d;c++)(h=Ce(n,qt)).stagger=0,E&&(h.yoyoEase=E),g&&Se(h,g),p=B[c],h.duration=+Yt(y,r(o),c,p,B),h.delay=(+Yt(x,r(o),c,p,B)||0)-o._delay,!w&&1===d&&h.delay&&(o._delay=x=h.delay,o._start+=x,h.delay=0),u.to(p,h,m?m(c,p,B):0),u._ease=Et.none;u.duration()?y=x=0:o.timeline=0}else if(S){Ee(Me(u.vars.defaults,{ease:"none"})),u._ease=Dt(S.ease||n.ease||"none");var P,R,D,F=0;if(z(S))S.forEach((function(e){return u.to(B,e,">")})),u.duration();else{for(f in h={},S)"ease"===f||"easeEach"===f||Xt(f,S[f],h,S.easeEach);for(f in h)for(P=h[f].sort((function(e,t){return e.t-t.t})),F=0,c=0;c<P.length;c++)(D={ease:(R=P[c]).e,duration:(R.t-(c?P[c-1].t:0))/100*y})[f]=R.v,u.to(B,D,F),F+=D.duration;u.duration()<y&&u.to({},{duration:y-u.duration()})}}y||o.duration(y=u.duration())}else o.timeline=0;return!0!==M||a||(Gt=r(o),l.killTweensOf(B),Gt=0),Ge(T,r(o),i),n.reversed&&o.reverse(),n.paused&&o.paused(!0),(_||!y&&!S&&o._start===ge(T._time)&&k(_)&&Ie(r(o))&&"nested"!==T.data)&&(o._tTime=-1e-8,o.render(Math.max(0,-x)||0)),C&&He(r(o),C),o}i(t,e);var n=t.prototype;return n.render=function(e,t,n){var r,i,a,o,l,u,c,h,d,f=this._time,p=this._tDur,m=this._dur,g=e<0,v=e>p-M&&!g?p:e<M?0:e;if(m){if(v!==this._tTime||!e||n||!this._initted&&this._tTime||this._startAt&&this._zTime<0!==g){if(r=v,h=this.timeline,this._repeat){if(o=m+this._rDelay,this._repeat<-1&&g)return this.totalTime(100*o+e,t,n);if(r=ge(v%o),v===p?(a=this._repeat,r=m):((a=~~(v/o))&&a===v/o&&(r=m,a--),r>m&&(r=m)),(u=this._yoyo&&1&a)&&(d=this._yEase,r=m-r),l=Fe(this._tTime,o),r===f&&!n&&this._initted)return this._tTime=v,this;a!==l&&(h&&this._yEase&&Lt(h,u),!this.vars.repeatRefresh||u||this._lock||(this._lock=n=1,this.render(ge(o*a),!0).invalidate()._lock=0))}if(!this._initted){if(Ve(this,g?e:r,n,t,v))return this._tTime=0,this;if(f!==this._time)return this;if(m!==this._dur)return this.render(e,t,n)}if(this._tTime=v,this._time=r,!this._act&&this._ts&&(this._act=1,this._lazy=0),this.ratio=c=(d||this._ease)(r/m),this._from&&(this.ratio=c=1-c),r&&!f&&!t&&(ft(this,"onStart"),this._tTime!==v))return this;for(i=this._pt;i;)i.r(c,i.d),i=i._next;h&&h.render(e<0?e:!r&&u?-1e-8:h._dur*h._ease(r/this._dur),t,n)||this._startAt&&(this._zTime=e),this._onUpdate&&!t&&(g&&De(this,e,0,n),ft(this,"onUpdate")),this._repeat&&a!==l&&this.vars.onRepeat&&!t&&this.parent&&ft(this,"onRepeat"),v!==this._tDur&&v||this._tTime!==v||(g&&!this._onUpdate&&De(this,e,0,!0),(e||!m)&&(v===this._tDur&&this._ts>0||!v&&this._ts<0)&&Pe(this,1),t||g&&!f||!(v||f||u)||(ft(this,v===p?"onComplete":"onReverseComplete",!0),this._prom&&!(v<p&&this.timeScale()>0)&&this._prom()))}}else!function(e,t,n,r){var i,a,o,l=e.ratio,u=t<0||!t&&(!e._start&&We(e)&&(e._initted||!je(e))||(e._ts<0||e._dp._ts<0)&&!je(e))?0:1,c=e._rDelay,h=0;if(c&&e._repeat&&(h=Ze(0,e._tDur,t),a=Fe(h,c),e._yoyo&&1&a&&(u=1-u),a!==Fe(e._tTime,c)&&(l=1-u,e.vars.repeatRefresh&&e._initted&&e.invalidate())),u!==l||s||r||e._zTime===M||!t&&e._zTime){if(!e._initted&&Ve(e,t,r,n,h))return;for(o=e._zTime,e._zTime=t||(n?M:0),n||(n=t&&!o),e.ratio=u,e._from&&(u=1-u),e._time=0,e._tTime=h,i=e._pt;i;)i.r(u,i.d),i=i._next;t<0&&De(e,t,0,!0),e._onUpdate&&!n&&ft(e,"onUpdate"),h&&e._repeat&&!n&&e.parent&&ft(e,"onRepeat"),(t>=e._tDur||t<0)&&e.ratio===u&&(u&&Pe(e,1),n||s||(ft(e,u?"onComplete":"onReverseComplete",!0),e._prom&&e._prom()))}else e._zTime||(e._zTime=t)}(this,e,t,n);return this},n.targets=function(){return this._targets},n.invalidate=function(t){return(!t||!this.vars.runBackwards)&&(this._startAt=0),this._pt=this._op=this._onUpdate=this._lazy=this.ratio=0,this._ptLookup=[],this.timeline&&this.timeline.invalidate(t),e.prototype.invalidate.call(this,t)},n.resetTo=function(e,t,n,r){m||At.wake(),this._ts||this.play();var i=Math.min(this._dur,(this._dp._time-this._start)*this._ts);return this._initted||Jt(this,i),function(e,t,n,r,i,a,s){var o,l,u,c,h=(e._pt&&e._ptCache||(e._ptCache={}))[t];if(!h)for(h=e._ptCache[t]=[],u=e._ptLookup,c=e._targets.length;c--;){if((o=u[c][t])&&o.d&&o.d._pt)for(o=o.d._pt;o&&o.p!==t&&o.fp!==t;)o=o._next;if(!o)return Ht=1,e.vars[t]="+=0",Jt(e,s),Ht=0,1;h.push(o)}for(c=h.length;c--;)(o=(l=h[c])._pt||l).s=!r&&0!==r||i?o.s+(r||0)+a*o.c:r,o.c=n-o.s,l.e&&(l.e=me(n)+$e(l.e)),l.b&&(l.b=o.s+$e(l.b))}(this,e,t,n,r,this._ease(i/this._dur),i)?this.resetTo(e,t,n,r):(ze(this,0),this.parent||Te(this._dp,this,"_first","_last",this._dp._sort?"_start":0),this.render(0))},n.kill=function(e,t){if(void 0===t&&(t="all"),!(e||t&&"all"!==t))return this._lazy=this._pt=0,this.parent?pt(this):this;if(this.timeline){var n=this.timeline.totalDuration();return this.timeline.killTweensOf(e,t,Gt&&!0!==Gt.vars.overwrite)._first||pt(this),this.parent&&n!==this.timeline.totalDuration()&&Je(this,this._dur*this.timeline._tDur/n,0,1),this}var r,i,a,s,o,l,u,c=this._targets,h=e?nt(e):c,d=this._ptLookup,f=this._pt;if((!t||"all"===t)&&function(e,t){for(var n=e.length,r=n===t.length;r&&n--&&e[n]===t[n];);return n<0}(c,h))return"all"===t&&(this._pt=0),pt(this);for(r=this._op=this._op||[],"all"!==t&&(P(t)&&(o={},pe(t,(function(e){return o[e]=1})),t=o),t=function(e,t){var n,r,i,a,s=e[0]?de(e[0]).harness:0,o=s&&s.aliases;if(!o)return t;for(r in n=Se({},t),o)if(r in n)for(i=(a=o[r].split(",")).length;i--;)n[a[i]]=n[r];return n}(c,t)),u=c.length;u--;)if(~h.indexOf(c[u]))for(o in i=d[u],"all"===t?(r[u]=t,s=i,a={}):(a=r[u]=r[u]||{},s=t),s)(l=i&&i[o])&&("kill"in l.d&&!0!==l.d.kill(o)||Be(this,l,"_pt"),delete i[o]),"all"!==a&&(a[o]=1);return this._initted&&!this._pt&&f&&pt(this),this},t.to=function(e,n){return new t(e,n,arguments[2])},t.from=function(e,t){return qe(1,arguments)},t.delayedCall=function(e,n,r,i){return new t(n,0,{immediateRender:!1,lazy:!1,overwrite:!1,delay:e,onComplete:n,onReverseComplete:n,onCompleteParams:r,onReverseCompleteParams:r,callbackScope:i})},t.fromTo=function(e,t,n){return qe(2,arguments)},t.set=function(e,n){return n.duration=0,n.repeatDelay||(n.repeat=0),new t(e,n)},t.killTweensOf=function(e,t,n){return l.killTweensOf(e,t,n)},t}(zt);Me(Qt.prototype,{_targets:[],_lazy:0,_startAt:0,_op:0,_onInit:0}),pe("staggerTo,staggerFrom,staggerFromTo",(function(e){Qt[e]=function(){var t=new Ut,n=et.call(arguments,0);return n.splice("staggerFromTo"===e?5:4,0,0),t[e].apply(t,n)}}));var Zt=function(e,t,n){return e[t]=n},$t=function(e,t,n){return e[t](n)},en=function(e,t,n,r){return e[t](r.fp,n)},tn=function(e,t,n){return e.setAttribute(t,n)},nn=function(e,t){return R(e[t])?$t:D(e[t])&&e.setAttribute?tn:Zt},rn=function(e,t){return t.set(t.t,t.p,Math.round(1e6*(t.s+t.c*e))/1e6,t)},an=function(e,t){return t.set(t.t,t.p,!!(t.s+t.c*e),t)},sn=function(e,t){var n=t._pt,r="";if(!e&&t.b)r=t.b;else if(1===e&&t.e)r=t.e;else{for(;n;)r=n.p+(n.m?n.m(n.s+n.c*e):Math.round(1e4*(n.s+n.c*e))/1e4)+r,n=n._next;r+=t.c}t.set(t.t,t.p,r,t)},on=function(e,t){for(var n=t._pt;n;)n.r(e,n.d),n=n._next},ln=function(e,t,n,r){for(var i,a=this._pt;a;)i=a._next,a.p===r&&a.modifier(e,t,n),a=i},un=function(e){for(var t,n,r=this._pt;r;)n=r._next,r.p===e&&!r.op||r.op===e?Be(this,r,"_pt"):r.dep||(t=1),r=n;return!t},cn=function(e,t,n,r){r.mSet(e,t,r.m.call(r.tween,n,r.mt),r)},hn=function(e){for(var t,n,r,i,a=e._pt;a;){for(t=a._next,n=r;n&&n.pr>a.pr;)n=n._next;(a._prev=n?n._prev:i)?a._prev._next=a:r=a,(a._next=n)?n._prev=a:i=a,a=t}e._pt=r},dn=function(){function e(e,t,n,r,i,a,s,o,l){this.t=t,this.s=r,this.c=i,this.p=n,this.r=a||rn,this.d=s||this,this.set=o||Zt,this.pr=l||0,this._next=e,e&&(e._prev=this)}return e.prototype.modifier=function(e,t,n){this.mSet=this.mSet||this.set,this.set=cn,this.m=e,this.mt=n,this.tween=t},e}();pe(ce+"parent,duration,ease,delay,overwrite,runBackwards,startAt,yoyo,immediateRender,repeat,repeatDelay,data,paused,reversed,lazy,callbackScope,stringFilter,id,yoyoEase,stagger,inherit,repeatRefresh,keyframes,autoRevert,scrollTrigger",(function(e){return re[e]=1})),X.TweenMax=X.TweenLite=Qt,X.TimelineLite=X.TimelineMax=Ut,l=new Ut({sortChildren:!1,defaults:_,autoRemoveChildren:!0,id:"root",smoothChildTiming:!0}),b.stringFilter=St;var fn=[],pn={},mn=[],gn=0,vn=function(e){return(pn[e]||mn).map((function(e){return e()}))},yn=function(){var e=Date.now(),t=[];e-gn>2&&(vn("matchMediaInit"),fn.forEach((function(e){var n,r,i,a,s=e.queries,o=e.conditions;for(r in s)(n=u.matchMedia(s[r]).matches)&&(i=1),n!==o[r]&&(o[r]=n,a=1);a&&(e.revert(),i&&t.push(e))})),vn("matchMediaRevert"),t.forEach((function(e){return e.onMatch(e)})),gn=e,vn("matchMedia"))},xn=function(){function e(e,t){this.selector=t&&rt(t),this.data=[],this._r=[],this.isReverted=!1,e&&this.add(e)}var t=e.prototype;return t.add=function(e,t,n){R(e)&&(n=t,t=e,e=R);var r=this,i=function(){var e,i=o,a=r.selector;return i&&i!==r&&i.data.push(r),n&&(r.selector=rt(n)),o=r,e=t.apply(r,arguments),R(e)&&r._r.push(e),o=i,r.selector=a,r.isReverted=!1,e};return r.last=i,e===R?i(r):e?r[e]=i:i},t.ignore=function(e){var t=o;o=null,e(this),o=t},t.getTweens=function(){var t=[];return this.data.forEach((function(n){return n instanceof e?t.push.apply(t,n.getTweens()):n instanceof Qt&&!(n.parent&&"nested"===n.parent.data)&&t.push(n)})),t},t.clear=function(){this._r.length=this.data.length=0},t.kill=function(e,t){var n=this;if(e){var r=this.getTweens();this.data.forEach((function(e){"isFlip"===e.data&&(e.revert(),e.getChildren(!0,!0,!1).forEach((function(e){return r.splice(r.indexOf(e),1)})))})),r.map((function(e){return{g:e.globalTime(0),t:e}})).sort((function(e,t){return t.g-e.g||-1})).forEach((function(t){return t.t.revert(e)})),this.data.forEach((function(t){return!(t instanceof zt)&&t.revert&&t.revert(e)})),this._r.forEach((function(t){return t(e,n)})),this.isReverted=!0}else this.data.forEach((function(e){return e.kill&&e.kill()}));if(this.clear(),t){var i=fn.indexOf(this);~i&&fn.splice(i,1)}},t.revert=function(e){this.kill(e||{})},e}(),bn=function(){function e(e){this.contexts=[],this.scope=e}var t=e.prototype;return t.add=function(e,t,n){I(e)||(e={matches:e});var r,i,a,s=new xn(0,n||this.scope),o=s.conditions={};for(i in this.contexts.push(s),t=s.add("onMatch",t),s.queries=e,e)"all"===i?a=1:(r=u.matchMedia(e[i]))&&(fn.indexOf(s)<0&&fn.push(s),(o[i]=r.matches)&&(a=1),r.addListener?r.addListener(yn):r.addEventListener("change",yn));return a&&t(s),this},t.revert=function(e){this.kill(e||{})},t.kill=function(e){this.contexts.forEach((function(t){return t.kill(e,!0)}))},e}(),_n={registerPlugin:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];t.forEach((function(e){return mt(e)}))},timeline:function(e){return new Ut(e)},getTweensOf:function(e,t){return l.getTweensOf(e,t)},getProperty:function(e,t,n,r){P(e)&&(e=nt(e)[0]);var i=de(e||{}).get,a=n?we:_e;return"native"===n&&(n=""),e?t?a((se[t]&&se[t].get||i)(e,t,n,r)):function(t,n,r){return a((se[t]&&se[t].get||i)(e,t,n,r))}:e},quickSetter:function(e,t,n){if((e=nt(e)).length>1){var r=e.map((function(e){return Sn.quickSetter(e,t,n)})),i=r.length;return function(e){for(var t=i;t--;)r[t](e)}}e=e[0]||{};var a=se[t],s=de(e),o=s.harness&&(s.harness.aliases||{})[t]||t,l=a?function(t){var r=new a;p._pt=0,r.init(e,n?t+n:t,p,0,[e]),r.render(1,r),p._pt&&on(1,p)}:s.set(e,o);return a?l:function(t){return l(e,o,n?t+n:t,s,1)}},quickTo:function(e,t,n){var r,i=Sn.to(e,Se(((r={})[t]="+=0.1",r.paused=!0,r),n||{})),a=function(e,n,r){return i.resetTo(t,e,n,r)};return a.tween=i,a},isTweening:function(e){return l.getTweensOf(e,!0).length>0},defaults:function(e){return e&&e.ease&&(e.ease=Dt(e.ease,_.ease)),Ae(_,e||{})},config:function(e){return Ae(b,e||{})},registerEffect:function(e){var t=e.name,n=e.effect,r=e.plugins,i=e.defaults,a=e.extendTimeline;(r||"").split(",").forEach((function(e){return e&&!se[e]&&!X[e]&&Q(t+" effect requires "+e+" plugin.")})),oe[t]=function(e,t,r){return n(nt(e),Me(t||{},i),r)},a&&(Ut.prototype[t]=function(e,n,r){return this.add(oe[t](e,I(n)?n:(r=n)&&{},this),r)})},registerEase:function(e,t){Et[e]=Dt(t)},parseEase:function(e,t){return arguments.length?Dt(e,t):Et},getById:function(e){return l.getById(e)},exportRoot:function(e,t){void 0===e&&(e={});var n,r,i=new Ut(e);for(i.smoothChildTiming=k(e.smoothChildTiming),l.remove(i),i._dp=0,i._time=i._tTime=l._time,n=l._first;n;)r=n._next,!t&&!n._dur&&n instanceof Qt&&n.vars.onComplete===n._targets[0]||Ge(i,n,n._start-n._delay),n=r;return Ge(l,i,0),i},context:function(e,t){return e?new xn(e,t):o},matchMedia:function(e){return new bn(e)},matchMediaRefresh:function(){return fn.forEach((function(e){var t,n,r=e.conditions;for(n in r)r[n]&&(r[n]=!1,t=1);t&&e.revert()}))||yn()},addEventListener:function(e,t){var n=pn[e]||(pn[e]=[]);~n.indexOf(t)||n.push(t)},removeEventListener:function(e,t){var n=pn[e],r=n&&n.indexOf(t);r>=0&&n.splice(r,1)},utils:{wrap:function e(t,n,r){var i=n-t;return z(t)?ut(t,e(0,t.length),n):Qe(r,(function(e){return(i+(e-t)%i)%i+t}))},wrapYoyo:function e(t,n,r){var i=n-t,a=2*i;return z(t)?ut(t,e(0,t.length-1),n):Qe(r,(function(e){return t+((e=(a+(e-t)%a)%a||0)>i?a-e:e)}))},distribute:at,random:lt,snap:ot,normalize:function(e,t,n){return ht(e,t,0,1,n)},getUnit:$e,clamp:function(e,t,n){return Qe(n,(function(n){return Ze(e,t,n)}))},splitColor:xt,toArray:nt,selector:rt,mapRange:ht,pipe:function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];return function(e){return t.reduce((function(e,t){return t(e)}),e)}},unitize:function(e,t){return function(n){return e(parseFloat(n))+(t||$e(n))}},interpolate:function e(t,n,r,i){var a=isNaN(t+n)?0:function(e){return(1-e)*t+e*n};if(!a){var s,o,l,u,c,h=P(t),d={};if(!0===r&&(i=1)&&(r=null),h)t={p:t},n={p:n};else if(z(t)&&!z(n)){for(l=[],u=t.length,c=u-2,o=1;o<u;o++)l.push(e(t[o-1],t[o]));u--,a=function(e){e*=u;var t=Math.min(c,~~e);return l[t](e-t)},r=n}else i||(t=Se(z(t)?[]:{},t));if(!l){for(s in n)Wt.call(d,t,s,"get",n[s]);a=function(e){return on(e,d)||(h?t.p:t)}}}return Qe(r,a)},shuffle:it},install:K,effects:oe,ticker:At,updateRoot:Ut.updateRoot,plugins:se,globalTimeline:l,core:{PropTween:dn,globals:Z,Tween:Qt,Timeline:Ut,Animation:zt,getCache:de,_removeLinkedListItem:Be,reverting:function(){return s},context:function(e){return e&&o&&(o.data.push(e),e._ctx=o),o},suppressOverwrites:function(e){return a=e}}};pe("to,from,fromTo,delayedCall,set,killTweensOf",(function(e){return _n[e]=Qt[e]})),At.add(Ut.updateRoot),p=_n.to({},{duration:0});var wn=function(e,t){for(var n=e._pt;n&&n.p!==t&&n.op!==t&&n.fp!==t;)n=n._next;return n},Mn=function(e,t){return{name:e,rawVars:1,init:function(e,n,r){r._onInit=function(e){var r,i;if(P(n)&&(r={},pe(n,(function(e){return r[e]=1})),n=r),t){for(i in r={},n)r[i]=t(n[i]);n=r}!function(e,t){var n,r,i,a=e._targets;for(n in t)for(r=a.length;r--;)(i=e._ptLookup[r][n])&&(i=i.d)&&(i._pt&&(i=wn(i,n)),i&&i.modifier&&i.modifier(t[n],e,a[r],n))}(e,n)}}}},Sn=_n.registerPlugin({name:"attr",init:function(e,t,n,r,i){var a,s,o;for(a in this.tween=n,t)o=e.getAttribute(a)||"",(s=this.add(e,"setAttribute",(o||0)+"",t[a],r,i,0,0,a)).op=a,s.b=o,this._props.push(a)},render:function(e,t){for(var n=t._pt;n;)s?n.set(n.t,n.p,n.b,n):n.r(e,n.d),n=n._next}},{name:"endArray",init:function(e,t){for(var n=t.length;n--;)this.add(e,n,e[n]||0,t[n],0,0,0,0,0,1)}},Mn("roundProps",st),Mn("modifiers"),Mn("snap",ot))||_n;Qt.version=Ut.version=Sn.version="3.11.4",d=1,F()&&Ct(),Et.Power0,Et.Power1,Et.Power2,Et.Power3,Et.Power4,Et.Linear,Et.Quad,Et.Cubic,Et.Quart,Et.Quint,Et.Strong,Et.Elastic,Et.Back,Et.SteppedEase,Et.Bounce,Et.Sine,Et.Expo,Et.Circ},2642:(e,t,n)=>{"use strict";n.d(t,{p8:()=>a});var r=n(5317),i=n(9975),a=r.p8.registerPlugin(i._Z)||r.p8;a.core.Tween},4448:(e,t,n)=>{"use strict";var r=n(7294),i=n(3840);function a(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var s=new Set,o={};function l(e,t){u(e,t),u(e+"Capture",t)}function u(e,t){for(o[e]=t,e=0;e<t.length;e++)s.add(t[e])}var c=!("undefined"==typeof window||void 0===window.document||void 0===window.document.createElement),h=Object.prototype.hasOwnProperty,d=/^[:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD][:A-Z_a-z\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02FF\u0370-\u037D\u037F-\u1FFF\u200C-\u200D\u2070-\u218F\u2C00-\u2FEF\u3001-\uD7FF\uF900-\uFDCF\uFDF0-\uFFFD\-.0-9\u00B7\u0300-\u036F\u203F-\u2040]*$/,f={},p={};function m(e,t,n,r,i,a,s){this.acceptsBooleans=2===t||3===t||4===t,this.attributeName=r,this.attributeNamespace=i,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=a,this.removeEmptyString=s}var g={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach((function(e){g[e]=new m(e,0,!1,e,null,!1,!1)})),[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach((function(e){var t=e[0];g[t]=new m(t,1,!1,e[1],null,!1,!1)})),["contentEditable","draggable","spellCheck","value"].forEach((function(e){g[e]=new m(e,2,!1,e.toLowerCase(),null,!1,!1)})),["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach((function(e){g[e]=new m(e,2,!1,e,null,!1,!1)})),"allowFullScreen async autoFocus autoPlay controls default defer disabled disablePictureInPicture disableRemotePlayback formNoValidate hidden loop noModule noValidate open playsInline readOnly required reversed scoped seamless itemScope".split(" ").forEach((function(e){g[e]=new m(e,3,!1,e.toLowerCase(),null,!1,!1)})),["checked","multiple","muted","selected"].forEach((function(e){g[e]=new m(e,3,!0,e,null,!1,!1)})),["capture","download"].forEach((function(e){g[e]=new m(e,4,!1,e,null,!1,!1)})),["cols","rows","size","span"].forEach((function(e){g[e]=new m(e,6,!1,e,null,!1,!1)})),["rowSpan","start"].forEach((function(e){g[e]=new m(e,5,!1,e.toLowerCase(),null,!1,!1)}));var v=/[\-:]([a-z])/g;function y(e){return e[1].toUpperCase()}function x(e,t,n,r){var i=g.hasOwnProperty(t)?g[t]:null;(null!==i?0!==i.type:r||!(2<t.length)||"o"!==t[0]&&"O"!==t[0]||"n"!==t[1]&&"N"!==t[1])&&(function(e,t,n,r){if(null==t||function(e,t,n,r){if(null!==n&&0===n.type)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return!r&&(null!==n?!n.acceptsBooleans:"data-"!==(e=e.toLowerCase().slice(0,5))&&"aria-"!==e);default:return!1}}(e,t,n,r))return!0;if(r)return!1;if(null!==n)switch(n.type){case 3:return!t;case 4:return!1===t;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}(t,n,i,r)&&(n=null),r||null===i?function(e){return!!h.call(p,e)||!h.call(f,e)&&(d.test(e)?p[e]=!0:(f[e]=!0,!1))}(t)&&(null===n?e.removeAttribute(t):e.setAttribute(t,""+n)):i.mustUseProperty?e[i.propertyName]=null===n?3!==i.type&&"":n:(t=i.attributeName,r=i.attributeNamespace,null===n?e.removeAttribute(t):(n=3===(i=i.type)||4===i&&!0===n?"":""+n,r?e.setAttributeNS(r,t,n):e.setAttribute(t,n))))}"accent-height alignment-baseline arabic-form baseline-shift cap-height clip-path clip-rule color-interpolation color-interpolation-filters color-profile color-rendering dominant-baseline enable-background fill-opacity fill-rule flood-color flood-opacity font-family font-size font-size-adjust font-stretch font-style font-variant font-weight glyph-name glyph-orientation-horizontal glyph-orientation-vertical horiz-adv-x horiz-origin-x image-rendering letter-spacing lighting-color marker-end marker-mid marker-start overline-position overline-thickness paint-order panose-1 pointer-events rendering-intent shape-rendering stop-color stop-opacity strikethrough-position strikethrough-thickness stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width text-anchor text-decoration text-rendering underline-position underline-thickness unicode-bidi unicode-range units-per-em v-alphabetic v-hanging v-ideographic v-mathematical vector-effect vert-adv-y vert-origin-x vert-origin-y word-spacing writing-mode xmlns:xlink x-height".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,null,!1,!1)})),"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/1999/xlink",!1,!1)})),["xml:base","xml:lang","xml:space"].forEach((function(e){var t=e.replace(v,y);g[t]=new m(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)})),["tabIndex","crossOrigin"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!1,!1)})),g.xlinkHref=new m("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1),["src","href","action","formAction"].forEach((function(e){g[e]=new m(e,1,!1,e.toLowerCase(),null,!0,!0)}));var b=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,_=Symbol.for("react.element"),w=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),A=Symbol.for("react.profiler"),C=Symbol.for("react.provider"),E=Symbol.for("react.context"),T=Symbol.for("react.forward_ref"),B=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),R=Symbol.for("react.memo"),L=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var D=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var I=Symbol.iterator;function k(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=I&&e[I]||e["@@iterator"])?e:null}var F,O=Object.assign;function N(e){if(void 0===F)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);F=t&&t[1]||""}return"\n"+F+e}var z=!1;function U(e,t){if(!e||z)return"";z=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),a=r.stack.split("\n"),s=i.length-1,o=a.length-1;1<=s&&0<=o&&i[s]!==a[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==a[o]){if(1!==s||1!==o)do{if(s--,0>--o||i[s]!==a[o]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=o);break}}}finally{z=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?N(e):""}function G(e){switch(e.tag){case 5:return N(e.type);case 16:return N("Lazy");case 13:return N("Suspense");case 19:return N("SuspenseList");case 0:case 2:case 15:return U(e.type,!1);case 11:return U(e.type.render,!1);case 1:return U(e.type,!0);default:return""}}function H(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case M:return"Fragment";case w:return"Portal";case A:return"Profiler";case S:return"StrictMode";case B:return"Suspense";case P:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case E:return(e.displayName||"Context")+".Consumer";case C:return(e._context.displayName||"Context")+".Provider";case T:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case R:return null!==(t=e.displayName||null)?t:H(e.type)||"Memo";case L:t=e._payload,e=e._init;try{return H(e(t))}catch(e){}}return null}function V(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return H(t);case 8:return t===S?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function W(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":case"object":return e;default:return""}}function j(e){var t=e.type;return(e=e.nodeName)&&"input"===e.toLowerCase()&&("checkbox"===t||"radio"===t)}function J(e){e._valueTracker||(e._valueTracker=function(e){var t=j(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&void 0!==n&&"function"==typeof n.get&&"function"==typeof n.set){var i=n.get,a=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return i.call(this)},set:function(e){r=""+e,a.call(this,e)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(e){r=""+e},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}(e))}function X(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=j(e)?e.checked?"true":"false":e.value),(e=r)!==n&&(t.setValue(e),!0)}function Y(e){if(void 0===(e=e||("undefined"!=typeof document?document:void 0)))return null;try{return e.activeElement||e.body}catch(t){return e.body}}function K(e,t){var n=t.checked;return O({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:null!=n?n:e._wrapperState.initialChecked})}function q(e,t){var n=null==t.defaultValue?"":t.defaultValue,r=null!=t.checked?t.checked:t.defaultChecked;n=W(null!=t.value?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:"checkbox"===t.type||"radio"===t.type?null!=t.checked:null!=t.value}}function Q(e,t){null!=(t=t.checked)&&x(e,"checked",t,!1)}function Z(e,t){Q(e,t);var n=W(t.value),r=t.type;if(null!=n)"number"===r?(0===n&&""===e.value||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if("submit"===r||"reset"===r)return void e.removeAttribute("value");t.hasOwnProperty("value")?ee(e,t.type,n):t.hasOwnProperty("defaultValue")&&ee(e,t.type,W(t.defaultValue)),null==t.checked&&null!=t.defaultChecked&&(e.defaultChecked=!!t.defaultChecked)}function $(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!("submit"!==r&&"reset"!==r||void 0!==t.value&&null!==t.value))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}""!==(n=e.name)&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,""!==n&&(e.name=n)}function ee(e,t,n){"number"===t&&Y(e.ownerDocument)===e||(null==n?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var te=Array.isArray;function ne(e,t,n,r){if(e=e.options,t){t={};for(var i=0;i<n.length;i++)t["$"+n[i]]=!0;for(n=0;n<e.length;n++)i=t.hasOwnProperty("$"+e[n].value),e[n].selected!==i&&(e[n].selected=i),i&&r&&(e[n].defaultSelected=!0)}else{for(n=""+W(n),t=null,i=0;i<e.length;i++){if(e[i].value===n)return e[i].selected=!0,void(r&&(e[i].defaultSelected=!0));null!==t||e[i].disabled||(t=e[i])}null!==t&&(t.selected=!0)}}function re(e,t){if(null!=t.dangerouslySetInnerHTML)throw Error(a(91));return O({},t,{value:void 0,defaultValue:void 0,children:""+e._wrapperState.initialValue})}function ie(e,t){var n=t.value;if(null==n){if(n=t.children,t=t.defaultValue,null!=n){if(null!=t)throw Error(a(92));if(te(n)){if(1<n.length)throw Error(a(93));n=n[0]}t=n}null==t&&(t=""),n=t}e._wrapperState={initialValue:W(n)}}function ae(e,t){var n=W(t.value),r=W(t.defaultValue);null!=n&&((n=""+n)!==e.value&&(e.value=n),null==t.defaultValue&&e.defaultValue!==n&&(e.defaultValue=n)),null!=r&&(e.defaultValue=""+r)}function se(e){var t=e.textContent;t===e._wrapperState.initialValue&&""!==t&&null!==t&&(e.value=t)}function oe(e){switch(e){case"svg":return"http://www.w3.org/2000/svg";case"math":return"http://www.w3.org/1998/Math/MathML";default:return"http://www.w3.org/1999/xhtml"}}function le(e,t){return null==e||"http://www.w3.org/1999/xhtml"===e?oe(t):"http://www.w3.org/2000/svg"===e&&"foreignObject"===t?"http://www.w3.org/1999/xhtml":e}var ue,ce,he=(ce=function(e,t){if("http://www.w3.org/2000/svg"!==e.namespaceURI||"innerHTML"in e)e.innerHTML=t;else{for((ue=ue||document.createElement("div")).innerHTML="<svg>"+t.valueOf().toString()+"</svg>",t=ue.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}},"undefined"!=typeof MSApp&&MSApp.execUnsafeLocalFunction?function(e,t,n,r){MSApp.execUnsafeLocalFunction((function(){return ce(e,t)}))}:ce);function de(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&3===n.nodeType)return void(n.nodeValue=t)}e.textContent=t}var fe={animationIterationCount:!0,aspectRatio:!0,borderImageOutset:!0,borderImageSlice:!0,borderImageWidth:!0,boxFlex:!0,boxFlexGroup:!0,boxOrdinalGroup:!0,columnCount:!0,columns:!0,flex:!0,flexGrow:!0,flexPositive:!0,flexShrink:!0,flexNegative:!0,flexOrder:!0,gridArea:!0,gridRow:!0,gridRowEnd:!0,gridRowSpan:!0,gridRowStart:!0,gridColumn:!0,gridColumnEnd:!0,gridColumnSpan:!0,gridColumnStart:!0,fontWeight:!0,lineClamp:!0,lineHeight:!0,opacity:!0,order:!0,orphans:!0,tabSize:!0,widows:!0,zIndex:!0,zoom:!0,fillOpacity:!0,floodOpacity:!0,stopOpacity:!0,strokeDasharray:!0,strokeDashoffset:!0,strokeMiterlimit:!0,strokeOpacity:!0,strokeWidth:!0},pe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||fe.hasOwnProperty(e)&&fe[e]?(""+t).trim():t+"px"}function ge(e,t){for(var n in e=e.style,t)if(t.hasOwnProperty(n)){var r=0===n.indexOf("--"),i=me(n,t[n],r);"float"===n&&(n="cssFloat"),r?e.setProperty(n,i):e[n]=i}}Object.keys(fe).forEach((function(e){pe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),fe[t]=fe[e]}))}));var ve=O({menuitem:!0},{area:!0,base:!0,br:!0,col:!0,embed:!0,hr:!0,img:!0,input:!0,keygen:!0,link:!0,meta:!0,param:!0,source:!0,track:!0,wbr:!0});function ye(e,t){if(t){if(ve[e]&&(null!=t.children||null!=t.dangerouslySetInnerHTML))throw Error(a(137,e));if(null!=t.dangerouslySetInnerHTML){if(null!=t.children)throw Error(a(60));if("object"!=typeof t.dangerouslySetInnerHTML||!("__html"in t.dangerouslySetInnerHTML))throw Error(a(61))}if(null!=t.style&&"object"!=typeof t.style)throw Error(a(62))}}function xe(e,t){if(-1===e.indexOf("-"))return"string"==typeof t.is;switch(e){case"annotation-xml":case"color-profile":case"font-face":case"font-face-src":case"font-face-uri":case"font-face-format":case"font-face-name":case"missing-glyph":return!1;default:return!0}}var be=null;function _e(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var we=null,Me=null,Se=null;function Ae(e){if(e=xi(e)){if("function"!=typeof we)throw Error(a(280));var t=e.stateNode;t&&(t=_i(t),we(e.stateNode,e.type,t))}}function Ce(e){Me?Se?Se.push(e):Se=[e]:Me=e}function Ee(){if(Me){var e=Me,t=Se;if(Se=Me=null,Ae(e),t)for(e=0;e<t.length;e++)Ae(t[e])}}function Te(e,t){return e(t)}function Be(){}var Pe=!1;function Re(e,t,n){if(Pe)return e(t,n);Pe=!0;try{return Te(e,t,n)}finally{Pe=!1,(null!==Me||null!==Se)&&(Be(),Ee())}}function Le(e,t){var n=e.stateNode;if(null===n)return null;var r=_i(n);if(null===r)return null;n=r[t];e:switch(t){case"onClick":case"onClickCapture":case"onDoubleClick":case"onDoubleClickCapture":case"onMouseDown":case"onMouseDownCapture":case"onMouseMove":case"onMouseMoveCapture":case"onMouseUp":case"onMouseUpCapture":case"onMouseEnter":(r=!r.disabled)||(r=!("button"===(e=e.type)||"input"===e||"select"===e||"textarea"===e)),e=!r;break e;default:e=!1}if(e)return null;if(n&&"function"!=typeof n)throw Error(a(231,t,typeof n));return n}var De=!1;if(c)try{var Ie={};Object.defineProperty(Ie,"passive",{get:function(){De=!0}}),window.addEventListener("test",Ie,Ie),window.removeEventListener("test",Ie,Ie)}catch(ce){De=!1}function ke(e,t,n,r,i,a,s,o,l){var u=Array.prototype.slice.call(arguments,3);try{t.apply(n,u)}catch(e){this.onError(e)}}var Fe=!1,Oe=null,Ne=!1,ze=null,Ue={onError:function(e){Fe=!0,Oe=e}};function Ge(e,t,n,r,i,a,s,o,l){Fe=!1,Oe=null,ke.apply(Ue,arguments)}function He(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function Ve(e){if(13===e.tag){var t=e.memoizedState;if(null===t&&null!==(e=e.alternate)&&(t=e.memoizedState),null!==t)return t.dehydrated}return null}function We(e){if(He(e)!==e)throw Error(a(188))}function je(e){return null!==(e=function(e){var t=e.alternate;if(!t){if(null===(t=He(e)))throw Error(a(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var s=i.alternate;if(null===s){if(null!==(r=i.return)){n=r;continue}break}if(i.child===s.child){for(s=i.child;s;){if(s===n)return We(i),e;if(s===r)return We(i),t;s=s.sibling}throw Error(a(188))}if(n.return!==r.return)n=i,r=s;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=s;break}if(l===r){o=!0,r=i,n=s;break}l=l.sibling}if(!o){for(l=s.child;l;){if(l===n){o=!0,n=s,r=i;break}if(l===r){o=!0,r=s,n=i;break}l=l.sibling}if(!o)throw Error(a(189))}}if(n.alternate!==r)throw Error(a(190))}if(3!==n.tag)throw Error(a(188));return n.stateNode.current===n?e:t}(e))?Je(e):null}function Je(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Je(e);if(null!==t)return t;e=e.sibling}return null}var Xe=i.unstable_scheduleCallback,Ye=i.unstable_cancelCallback,Ke=i.unstable_shouldYield,qe=i.unstable_requestPaint,Qe=i.unstable_now,Ze=i.unstable_getCurrentPriorityLevel,$e=i.unstable_ImmediatePriority,et=i.unstable_UserBlockingPriority,tt=i.unstable_NormalPriority,nt=i.unstable_LowPriority,rt=i.unstable_IdlePriority,it=null,at=null,st=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(ot(e)/lt|0)|0},ot=Math.log,lt=Math.LN2,ut=64,ct=4194304;function ht(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function dt(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=268435455&n;if(0!==s){var o=s&~i;0!==o?r=ht(o):0!=(a&=s)&&(r=ht(a))}else 0!=(s=n&~i)?r=ht(s):0!==a&&(r=ht(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!=(4194240&a)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-st(t)),r|=e[n],t&=~i;return r}function ft(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function pt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function mt(){var e=ut;return 0==(4194240&(ut<<=1))&&(ut=64),e}function gt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function vt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-st(t)]=n}function yt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-st(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var xt=0;function bt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var _t,wt,Mt,St,At,Ct=!1,Et=[],Tt=null,Bt=null,Pt=null,Rt=new Map,Lt=new Map,Dt=[],It="mousedown mouseup touchcancel touchend touchstart auxclick dblclick pointercancel pointerdown pointerup dragend dragstart drop compositionend compositionstart keydown keypress keyup input textInput copy cut paste click change contextmenu reset submit".split(" ");function kt(e,t){switch(e){case"focusin":case"focusout":Tt=null;break;case"dragenter":case"dragleave":Bt=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":Rt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lt.delete(t.pointerId)}}function Ft(e,t,n,r,i,a){return null===e||e.nativeEvent!==a?(e={blockedOn:t,domEventName:n,eventSystemFlags:r,nativeEvent:a,targetContainers:[i]},null!==t&&null!==(t=xi(t))&&wt(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Ot(e){var t=yi(e.target);if(null!==t){var n=He(t);if(null!==n)if(13===(t=n.tag)){if(null!==(t=Ve(n)))return e.blockedOn=t,void At(e.priority,(function(){Mt(n)}))}else if(3===t&&n.stateNode.current.memoizedState.isDehydrated)return void(e.blockedOn=3===n.tag?n.stateNode.containerInfo:null)}e.blockedOn=null}function Nt(e){if(null!==e.blockedOn)return!1;for(var t=e.targetContainers;0<t.length;){var n=Kt(e.domEventName,e.eventSystemFlags,t[0],e.nativeEvent);if(null!==n)return null!==(t=xi(n))&&wt(t),e.blockedOn=n,!1;var r=new(n=e.nativeEvent).constructor(n.type,n);be=r,n.target.dispatchEvent(r),be=null,t.shift()}return!0}function zt(e,t,n){Nt(e)&&n.delete(t)}function Ut(){Ct=!1,null!==Tt&&Nt(Tt)&&(Tt=null),null!==Bt&&Nt(Bt)&&(Bt=null),null!==Pt&&Nt(Pt)&&(Pt=null),Rt.forEach(zt),Lt.forEach(zt)}function Gt(e,t){e.blockedOn===t&&(e.blockedOn=null,Ct||(Ct=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,Ut)))}function Ht(e){function t(t){return Gt(t,e)}if(0<Et.length){Gt(Et[0],e);for(var n=1;n<Et.length;n++){var r=Et[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Tt&&Gt(Tt,e),null!==Bt&&Gt(Bt,e),null!==Pt&&Gt(Pt,e),Rt.forEach(t),Lt.forEach(t),n=0;n<Dt.length;n++)(r=Dt[n]).blockedOn===e&&(r.blockedOn=null);for(;0<Dt.length&&null===(n=Dt[0]).blockedOn;)Ot(n),null===n.blockedOn&&Dt.shift()}var Vt=b.ReactCurrentBatchConfig,Wt=!0;function jt(e,t,n,r){var i=xt,a=Vt.transition;Vt.transition=null;try{xt=1,Xt(e,t,n,r)}finally{xt=i,Vt.transition=a}}function Jt(e,t,n,r){var i=xt,a=Vt.transition;Vt.transition=null;try{xt=4,Xt(e,t,n,r)}finally{xt=i,Vt.transition=a}}function Xt(e,t,n,r){if(Wt){var i=Kt(e,t,n,r);if(null===i)Wr(e,t,r,Yt,n),kt(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Tt=Ft(Tt,e,t,n,r,i),!0;case"dragenter":return Bt=Ft(Bt,e,t,n,r,i),!0;case"mouseover":return Pt=Ft(Pt,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Rt.set(a,Ft(Rt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Lt.set(a,Ft(Lt.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(kt(e,r),4&t&&-1<It.indexOf(e)){for(;null!==i;){var a=xi(i);if(null!==a&&_t(a),null===(a=Kt(e,t,n,r))&&Wr(e,t,r,Yt,n),a===i)break;i=a}null!==i&&r.stopPropagation()}else Wr(e,t,r,null,n)}}var Yt=null;function Kt(e,t,n,r){if(Yt=null,null!==(e=yi(e=_e(r))))if(null===(t=He(e)))e=null;else if(13===(n=t.tag)){if(null!==(e=Ve(t)))return e;e=null}else if(3===n){if(t.stateNode.current.memoizedState.isDehydrated)return 3===t.tag?t.stateNode.containerInfo:null;e=null}else t!==e&&(e=null);return Yt=e,null}function qt(e){switch(e){case"cancel":case"click":case"close":case"contextmenu":case"copy":case"cut":case"auxclick":case"dblclick":case"dragend":case"dragstart":case"drop":case"focusin":case"focusout":case"input":case"invalid":case"keydown":case"keypress":case"keyup":case"mousedown":case"mouseup":case"paste":case"pause":case"play":case"pointercancel":case"pointerdown":case"pointerup":case"ratechange":case"reset":case"resize":case"seeked":case"submit":case"touchcancel":case"touchend":case"touchstart":case"volumechange":case"change":case"selectionchange":case"textInput":case"compositionstart":case"compositionend":case"compositionupdate":case"beforeblur":case"afterblur":case"beforeinput":case"blur":case"fullscreenchange":case"focus":case"hashchange":case"popstate":case"select":case"selectstart":return 1;case"drag":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"mousemove":case"mouseout":case"mouseover":case"pointermove":case"pointerout":case"pointerover":case"scroll":case"toggle":case"touchmove":case"wheel":case"mouseenter":case"mouseleave":case"pointerenter":case"pointerleave":return 4;case"message":switch(Ze()){case $e:return 1;case et:return 4;case tt:case nt:return 16;case rt:return 536870912;default:return 16}default:return 16}}var Qt=null,Zt=null,$t=null;function en(){if($t)return $t;var e,t,n=Zt,r=n.length,i="value"in Qt?Qt.value:Qt.textContent,a=i.length;for(e=0;e<r&&n[e]===i[e];e++);var s=r-e;for(t=1;t<=s&&n[r-t]===i[a-t];t++);return $t=i.slice(e,1<t?1-t:void 0)}function tn(e){var t=e.keyCode;return"charCode"in e?0===(e=e.charCode)&&13===t&&(e=13):e=t,10===e&&(e=13),32<=e||13===e?e:0}function nn(){return!0}function rn(){return!1}function an(e){function t(t,n,r,i,a){for(var s in this._reactName=t,this._targetInst=r,this.type=n,this.nativeEvent=i,this.target=a,this.currentTarget=null,e)e.hasOwnProperty(s)&&(t=e[s],this[s]=t?t(i):i[s]);return this.isDefaultPrevented=(null!=i.defaultPrevented?i.defaultPrevented:!1===i.returnValue)?nn:rn,this.isPropagationStopped=rn,this}return O(t.prototype,{preventDefault:function(){this.defaultPrevented=!0;var e=this.nativeEvent;e&&(e.preventDefault?e.preventDefault():"unknown"!=typeof e.returnValue&&(e.returnValue=!1),this.isDefaultPrevented=nn)},stopPropagation:function(){var e=this.nativeEvent;e&&(e.stopPropagation?e.stopPropagation():"unknown"!=typeof e.cancelBubble&&(e.cancelBubble=!0),this.isPropagationStopped=nn)},persist:function(){},isPersistent:nn}),t}var sn,on,ln,un={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},cn=an(un),hn=O({},un,{view:0,detail:0}),dn=an(hn),fn=O({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:An,button:0,buttons:0,relatedTarget:function(e){return void 0===e.relatedTarget?e.fromElement===e.srcElement?e.toElement:e.fromElement:e.relatedTarget},movementX:function(e){return"movementX"in e?e.movementX:(e!==ln&&(ln&&"mousemove"===e.type?(sn=e.screenX-ln.screenX,on=e.screenY-ln.screenY):on=sn=0,ln=e),sn)},movementY:function(e){return"movementY"in e?e.movementY:on}}),pn=an(fn),mn=an(O({},fn,{dataTransfer:0})),gn=an(O({},hn,{relatedTarget:0})),vn=an(O({},un,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=O({},un,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=an(yn),bn=an(O({},un,{data:0})),_n={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},wn={8:"Backspace",9:"Tab",12:"Clear",13:"Enter",16:"Shift",17:"Control",18:"Alt",19:"Pause",20:"CapsLock",27:"Escape",32:" ",33:"PageUp",34:"PageDown",35:"End",36:"Home",37:"ArrowLeft",38:"ArrowUp",39:"ArrowRight",40:"ArrowDown",45:"Insert",46:"Delete",112:"F1",113:"F2",114:"F3",115:"F4",116:"F5",117:"F6",118:"F7",119:"F8",120:"F9",121:"F10",122:"F11",123:"F12",144:"NumLock",145:"ScrollLock",224:"Meta"},Mn={Alt:"altKey",Control:"ctrlKey",Meta:"metaKey",Shift:"shiftKey"};function Sn(e){var t=this.nativeEvent;return t.getModifierState?t.getModifierState(e):!!(e=Mn[e])&&!!t[e]}function An(){return Sn}var Cn=O({},hn,{key:function(e){if(e.key){var t=_n[e.key]||e.key;if("Unidentified"!==t)return t}return"keypress"===e.type?13===(e=tn(e))?"Enter":String.fromCharCode(e):"keydown"===e.type||"keyup"===e.type?wn[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:An,charCode:function(e){return"keypress"===e.type?tn(e):0},keyCode:function(e){return"keydown"===e.type||"keyup"===e.type?e.keyCode:0},which:function(e){return"keypress"===e.type?tn(e):"keydown"===e.type||"keyup"===e.type?e.keyCode:0}}),En=an(Cn),Tn=an(O({},fn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Bn=an(O({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:An})),Pn=an(O({},un,{propertyName:0,elapsedTime:0,pseudoElement:0})),Rn=O({},fn,{deltaX:function(e){return"deltaX"in e?e.deltaX:"wheelDeltaX"in e?-e.wheelDeltaX:0},deltaY:function(e){return"deltaY"in e?e.deltaY:"wheelDeltaY"in e?-e.wheelDeltaY:"wheelDelta"in e?-e.wheelDelta:0},deltaZ:0,deltaMode:0}),Ln=an(Rn),Dn=[9,13,27,32],In=c&&"CompositionEvent"in window,kn=null;c&&"documentMode"in document&&(kn=document.documentMode);var Fn=c&&"TextEvent"in window&&!kn,On=c&&(!In||kn&&8<kn&&11>=kn),Nn=String.fromCharCode(32),zn=!1;function Un(e,t){switch(e){case"keyup":return-1!==Dn.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Gn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Hn=!1,Vn={color:!0,date:!0,datetime:!0,"datetime-local":!0,email:!0,month:!0,number:!0,password:!0,range:!0,search:!0,tel:!0,text:!0,time:!0,url:!0,week:!0};function Wn(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return"input"===t?!!Vn[e.type]:"textarea"===t}function jn(e,t,n,r){Ce(r),0<(t=Jr(t,"onChange")).length&&(n=new cn("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Jn=null,Xn=null;function Yn(e){Nr(e,0)}function Kn(e){if(X(bi(e)))return e}function qn(e,t){if("change"===e)return t}var Qn=!1;if(c){var Zn;if(c){var $n="oninput"in document;if(!$n){var er=document.createElement("div");er.setAttribute("oninput","return;"),$n="function"==typeof er.oninput}Zn=$n}else Zn=!1;Qn=Zn&&(!document.documentMode||9<document.documentMode)}function tr(){Jn&&(Jn.detachEvent("onpropertychange",nr),Xn=Jn=null)}function nr(e){if("value"===e.propertyName&&Kn(Xn)){var t=[];jn(t,Xn,e,_e(e)),Re(Yn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Xn=n,(Jn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Xn)}function ar(e,t){if("click"===e)return Kn(t)}function sr(e,t){if("input"===e||"change"===e)return Kn(t)}var or="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t};function lr(e,t){if(or(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!h.call(t,i)||!or(e[i],t[i]))return!1}return!0}function ur(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function cr(e,t){var n,r=ur(e);for(e=0;r;){if(3===r.nodeType){if(n=e+r.textContent.length,e<=t&&n>=t)return{node:r,offset:t-e};e=n}e:{for(;r;){if(r.nextSibling){r=r.nextSibling;break e}r=r.parentNode}r=void 0}r=ur(r)}}function hr(e,t){return!(!e||!t)&&(e===t||(!e||3!==e.nodeType)&&(t&&3===t.nodeType?hr(e,t.parentNode):"contains"in e?e.contains(t):!!e.compareDocumentPosition&&!!(16&e.compareDocumentPosition(t))))}function dr(){for(var e=window,t=Y();t instanceof e.HTMLIFrameElement;){try{var n="string"==typeof t.contentWindow.location.href}catch(e){n=!1}if(!n)break;t=Y((e=t.contentWindow).document)}return t}function fr(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&("input"===t&&("text"===e.type||"search"===e.type||"tel"===e.type||"url"===e.type||"password"===e.type)||"textarea"===t||"true"===e.contentEditable)}function pr(e){var t=dr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hr(n.ownerDocument.documentElement,n)){if(null!==r&&fr(n))if(t=r.start,void 0===(e=r.end)&&(e=t),"selectionStart"in n)n.selectionStart=t,n.selectionEnd=Math.min(e,n.value.length);else if((e=(t=n.ownerDocument||document)&&t.defaultView||window).getSelection){e=e.getSelection();var i=n.textContent.length,a=Math.min(r.start,i);r=void 0===r.end?a:Math.min(r.end,i),!e.extend&&a>r&&(i=r,r=a,a=i),i=cr(n,a);var s=cr(n,r);i&&s&&(1!==e.rangeCount||e.anchorNode!==i.node||e.anchorOffset!==i.offset||e.focusNode!==s.node||e.focusOffset!==s.offset)&&((t=t.createRange()).setStart(i.node,i.offset),e.removeAllRanges(),a>r?(e.addRange(t),e.extend(s.node,s.offset)):(t.setEnd(s.node,s.offset),e.addRange(t)))}for(t=[],e=n;e=e.parentNode;)1===e.nodeType&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for("function"==typeof n.focus&&n.focus(),n=0;n<t.length;n++)(e=t[n]).element.scrollLeft=e.left,e.element.scrollTop=e.top}}var mr=c&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,yr=null,xr=!1;function br(e,t,n){var r=n.window===n?n.document:9===n.nodeType?n:n.ownerDocument;xr||null==gr||gr!==Y(r)||(r="selectionStart"in(r=gr)&&fr(r)?{start:r.selectionStart,end:r.selectionEnd}:{anchorNode:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection()).anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset},yr&&lr(yr,r)||(yr=r,0<(r=Jr(vr,"onSelect")).length&&(t=new cn("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function _r(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var wr={animationend:_r("Animation","AnimationEnd"),animationiteration:_r("Animation","AnimationIteration"),animationstart:_r("Animation","AnimationStart"),transitionend:_r("Transition","TransitionEnd")},Mr={},Sr={};function Ar(e){if(Mr[e])return Mr[e];if(!wr[e])return e;var t,n=wr[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return Mr[e]=n[t];return e}c&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete wr.animationend.animation,delete wr.animationiteration.animation,delete wr.animationstart.animation),"TransitionEvent"in window||delete wr.transitionend.transition);var Cr=Ar("animationend"),Er=Ar("animationiteration"),Tr=Ar("animationstart"),Br=Ar("transitionend"),Pr=new Map,Rr="abort auxClick cancel canPlay canPlayThrough click close contextMenu copy cut drag dragEnd dragEnter dragExit dragLeave dragOver dragStart drop durationChange emptied encrypted ended error gotPointerCapture input invalid keyDown keyPress keyUp load loadedData loadedMetadata loadStart lostPointerCapture mouseDown mouseMove mouseOut mouseOver mouseUp paste pause play playing pointerCancel pointerDown pointerMove pointerOut pointerOver pointerUp progress rateChange reset resize seeked seeking stalled submit suspend timeUpdate touchCancel touchEnd touchStart volumeChange scroll toggle touchMove waiting wheel".split(" ");function Lr(e,t){Pr.set(e,t),l(t,[e])}for(var Dr=0;Dr<Rr.length;Dr++){var Ir=Rr[Dr];Lr(Ir.toLowerCase(),"on"+(Ir[0].toUpperCase()+Ir.slice(1)))}Lr(Cr,"onAnimationEnd"),Lr(Er,"onAnimationIteration"),Lr(Tr,"onAnimationStart"),Lr("dblclick","onDoubleClick"),Lr("focusin","onFocus"),Lr("focusout","onBlur"),Lr(Br,"onTransitionEnd"),u("onMouseEnter",["mouseout","mouseover"]),u("onMouseLeave",["mouseout","mouseover"]),u("onPointerEnter",["pointerout","pointerover"]),u("onPointerLeave",["pointerout","pointerover"]),l("onChange","change click focusin focusout input keydown keyup selectionchange".split(" ")),l("onSelect","focusout contextmenu dragend focusin keydown keyup mousedown mouseup selectionchange".split(" ")),l("onBeforeInput",["compositionend","keypress","textInput","paste"]),l("onCompositionEnd","compositionend focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionStart","compositionstart focusout keydown keypress keyup mousedown".split(" ")),l("onCompositionUpdate","compositionupdate focusout keydown keypress keyup mousedown".split(" "));var kr="abort canplay canplaythrough durationchange emptied encrypted ended error loadeddata loadedmetadata loadstart pause play playing progress ratechange resize seeked seeking stalled suspend timeupdate volumechange waiting".split(" "),Fr=new Set("cancel close invalid load scroll toggle".split(" ").concat(kr));function Or(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,s,o,l,u){if(Ge.apply(this,arguments),Fe){if(!Fe)throw Error(a(198));var c=Oe;Fe=!1,Oe=null,Ne||(Ne=!0,ze=c)}}(r,t,void 0,e),e.currentTarget=null}function Nr(e,t){t=0!=(4&t);for(var n=0;n<e.length;n++){var r=e[n],i=r.event;r=r.listeners;e:{var a=void 0;if(t)for(var s=r.length-1;0<=s;s--){var o=r[s],l=o.instance,u=o.currentTarget;if(o=o.listener,l!==a&&i.isPropagationStopped())break e;Or(i,o,u),a=l}else for(s=0;s<r.length;s++){if(l=(o=r[s]).instance,u=o.currentTarget,o=o.listener,l!==a&&i.isPropagationStopped())break e;Or(i,o,u),a=l}}}if(Ne)throw e=ze,Ne=!1,ze=null,e}function zr(e,t){var n=t[mi];void 0===n&&(n=t[mi]=new Set);var r=e+"__bubble";n.has(r)||(Vr(t,e,2,!1),n.add(r))}function Ur(e,t,n){var r=0;t&&(r|=4),Vr(n,e,r,t)}var Gr="_reactListening"+Math.random().toString(36).slice(2);function Hr(e){if(!e[Gr]){e[Gr]=!0,s.forEach((function(t){"selectionchange"!==t&&(Fr.has(t)||Ur(t,!1,e),Ur(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Gr]||(t[Gr]=!0,Ur("selectionchange",!1,t))}}function Vr(e,t,n,r){switch(qt(t)){case 1:var i=jt;break;case 4:i=Jt;break;default:i=Xt}n=i.bind(null,t,n,e),i=void 0,!De||"touchstart"!==t&&"touchmove"!==t&&"wheel"!==t||(i=!0),r?void 0!==i?e.addEventListener(t,n,{capture:!0,passive:i}):e.addEventListener(t,n,!0):void 0!==i?e.addEventListener(t,n,{passive:i}):e.addEventListener(t,n,!1)}function Wr(e,t,n,r,i){var a=r;if(0==(1&t)&&0==(2&t)&&null!==r)e:for(;;){if(null===r)return;var s=r.tag;if(3===s||4===s){var o=r.stateNode.containerInfo;if(o===i||8===o.nodeType&&o.parentNode===i)break;if(4===s)for(s=r.return;null!==s;){var l=s.tag;if((3===l||4===l)&&((l=s.stateNode.containerInfo)===i||8===l.nodeType&&l.parentNode===i))return;s=s.return}for(;null!==o;){if(null===(s=yi(o)))return;if(5===(l=s.tag)||6===l){r=a=s;continue e}o=o.parentNode}}r=r.return}Re((function(){var r=a,i=_e(n),s=[];e:{var o=Pr.get(e);if(void 0!==o){var l=cn,u=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=En;break;case"focusin":u="focus",l=gn;break;case"focusout":u="blur",l=gn;break;case"beforeblur":case"afterblur":l=gn;break;case"click":if(2===n.button)break e;case"auxclick":case"dblclick":case"mousedown":case"mousemove":case"mouseup":case"mouseout":case"mouseover":case"contextmenu":l=pn;break;case"drag":case"dragend":case"dragenter":case"dragexit":case"dragleave":case"dragover":case"dragstart":case"drop":l=mn;break;case"touchcancel":case"touchend":case"touchmove":case"touchstart":l=Bn;break;case Cr:case Er:case Tr:l=vn;break;case Br:l=Pn;break;case"scroll":l=dn;break;case"wheel":l=Ln;break;case"copy":case"cut":case"paste":l=xn;break;case"gotpointercapture":case"lostpointercapture":case"pointercancel":case"pointerdown":case"pointermove":case"pointerout":case"pointerover":case"pointerup":l=Tn}var c=0!=(4&t),h=!c&&"scroll"===e,d=c?null!==o?o+"Capture":null:o;c=[];for(var f,p=r;null!==p;){var m=(f=p).stateNode;if(5===f.tag&&null!==m&&(f=m,null!==d&&null!=(m=Le(p,d))&&c.push(jr(p,m,f))),h)break;p=p.return}0<c.length&&(o=new l(o,u,null,n,i),s.push({event:o,listeners:c}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||n===be||!(u=n.relatedTarget||n.fromElement)||!yi(u)&&!u[pi])&&(l||o)&&(o=i.window===i?i:(o=i.ownerDocument)?o.defaultView||o.parentWindow:window,l?(l=r,null!==(u=(u=n.relatedTarget||n.toElement)?yi(u):null)&&(u!==(h=He(u))||5!==u.tag&&6!==u.tag)&&(u=null)):(l=null,u=r),l!==u)){if(c=pn,m="onMouseLeave",d="onMouseEnter",p="mouse","pointerout"!==e&&"pointerover"!==e||(c=Tn,m="onPointerLeave",d="onPointerEnter",p="pointer"),h=null==l?o:bi(l),f=null==u?o:bi(u),(o=new c(m,p+"leave",l,n,i)).target=h,o.relatedTarget=f,m=null,yi(i)===r&&((c=new c(d,p+"enter",u,n,i)).target=f,c.relatedTarget=h,m=c),h=m,l&&u)e:{for(d=u,p=0,f=c=l;f;f=Xr(f))p++;for(f=0,m=d;m;m=Xr(m))f++;for(;0<p-f;)c=Xr(c),p--;for(;0<f-p;)d=Xr(d),f--;for(;p--;){if(c===d||null!==d&&c===d.alternate)break e;c=Xr(c),d=Xr(d)}c=null}else c=null;null!==l&&Yr(s,o,l,c,!1),null!==u&&null!==h&&Yr(s,h,u,c,!0)}if("select"===(l=(o=r?bi(r):window).nodeName&&o.nodeName.toLowerCase())||"input"===l&&"file"===o.type)var g=qn;else if(Wn(o))if(Qn)g=sr;else{g=ir;var v=rr}else(l=o.nodeName)&&"input"===l.toLowerCase()&&("checkbox"===o.type||"radio"===o.type)&&(g=ar);switch(g&&(g=g(e,r))?jn(s,g,n,i):(v&&v(e,o,r),"focusout"===e&&(v=o._wrapperState)&&v.controlled&&"number"===o.type&&ee(o,"number",o.value)),v=r?bi(r):window,e){case"focusin":(Wn(v)||"true"===v.contentEditable)&&(gr=v,vr=r,yr=null);break;case"focusout":yr=vr=gr=null;break;case"mousedown":xr=!0;break;case"contextmenu":case"mouseup":case"dragend":xr=!1,br(s,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":br(s,n,i)}var y;if(In)e:{switch(e){case"compositionstart":var x="onCompositionStart";break e;case"compositionend":x="onCompositionEnd";break e;case"compositionupdate":x="onCompositionUpdate";break e}x=void 0}else Hn?Un(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(On&&"ko"!==n.locale&&(Hn||"onCompositionStart"!==x?"onCompositionEnd"===x&&Hn&&(y=en()):(Zt="value"in(Qt=i)?Qt.value:Qt.textContent,Hn=!0)),0<(v=Jr(r,x)).length&&(x=new bn(x,e,null,n,i),s.push({event:x,listeners:v}),(y||null!==(y=Gn(n)))&&(x.data=y))),(y=Fn?function(e,t){switch(e){case"compositionend":return Gn(t);case"keypress":return 32!==t.which?null:(zn=!0,Nn);case"textInput":return(e=t.data)===Nn&&zn?null:e;default:return null}}(e,n):function(e,t){if(Hn)return"compositionend"===e||!In&&Un(e,t)?(e=en(),$t=Zt=Qt=null,Hn=!1,e):null;switch(e){case"paste":default:return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1<t.char.length)return t.char;if(t.which)return String.fromCharCode(t.which)}return null;case"compositionend":return On&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Jr(r,"onBeforeInput")).length&&(i=new bn("onBeforeInput","beforeinput",null,n,i),s.push({event:i,listeners:r}),i.data=y)}Nr(s,t)}))}function jr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Jr(e,t){for(var n=t+"Capture",r=[];null!==e;){var i=e,a=i.stateNode;5===i.tag&&null!==a&&(i=a,null!=(a=Le(e,n))&&r.unshift(jr(e,a,i)),null!=(a=Le(e,t))&&r.push(jr(e,a,i))),e=e.return}return r}function Xr(e){if(null===e)return null;do{e=e.return}while(e&&5!==e.tag);return e||null}function Yr(e,t,n,r,i){for(var a=t._reactName,s=[];null!==n&&n!==r;){var o=n,l=o.alternate,u=o.stateNode;if(null!==l&&l===r)break;5===o.tag&&null!==u&&(o=u,i?null!=(l=Le(n,a))&&s.unshift(jr(n,l,o)):i||null!=(l=Le(n,a))&&s.push(jr(n,l,o))),n=n.return}0!==s.length&&e.push({event:t,listeners:s})}var Kr=/\r\n?/g,qr=/\u0000|\uFFFD/g;function Qr(e){return("string"==typeof e?e:""+e).replace(Kr,"\n").replace(qr,"")}function Zr(e,t,n){if(t=Qr(t),Qr(e)!==t&&n)throw Error(a(425))}function $r(){}var ei=null,ti=null;function ni(e,t){return"textarea"===e||"noscript"===e||"string"==typeof t.children||"number"==typeof t.children||"object"==typeof t.dangerouslySetInnerHTML&&null!==t.dangerouslySetInnerHTML&&null!=t.dangerouslySetInnerHTML.__html}var ri="function"==typeof setTimeout?setTimeout:void 0,ii="function"==typeof clearTimeout?clearTimeout:void 0,ai="function"==typeof Promise?Promise:void 0,si="function"==typeof queueMicrotask?queueMicrotask:void 0!==ai?function(e){return ai.resolve(null).then(e).catch(oi)}:ri;function oi(e){setTimeout((function(){throw e}))}function li(e,t){var n=t,r=0;do{var i=n.nextSibling;if(e.removeChild(n),i&&8===i.nodeType)if("/$"===(n=i.data)){if(0===r)return e.removeChild(i),void Ht(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Ht(t)}function ui(e){for(;null!=e;e=e.nextSibling){var t=e.nodeType;if(1===t||3===t)break;if(8===t){if("$"===(t=e.data)||"$!"===t||"$?"===t)break;if("/$"===t)return null}}return e}function ci(e){e=e.previousSibling;for(var t=0;e;){if(8===e.nodeType){var n=e.data;if("$"===n||"$!"===n||"$?"===n){if(0===t)return e;t--}else"/$"===n&&t++}e=e.previousSibling}return null}var hi=Math.random().toString(36).slice(2),di="__reactFiber$"+hi,fi="__reactProps$"+hi,pi="__reactContainer$"+hi,mi="__reactEvents$"+hi,gi="__reactListeners$"+hi,vi="__reactHandles$"+hi;function yi(e){var t=e[di];if(t)return t;for(var n=e.parentNode;n;){if(t=n[pi]||n[di]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ci(e);null!==e;){if(n=e[di])return n;e=ci(e)}return t}n=(e=n).parentNode}return null}function xi(e){return!(e=e[di]||e[pi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function bi(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function _i(e){return e[fi]||null}var wi=[],Mi=-1;function Si(e){return{current:e}}function Ai(e){0>Mi||(e.current=wi[Mi],wi[Mi]=null,Mi--)}function Ci(e,t){Mi++,wi[Mi]=e.current,e.current=t}var Ei={},Ti=Si(Ei),Bi=Si(!1),Pi=Ei;function Ri(e,t){var n=e.type.contextTypes;if(!n)return Ei;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function Li(e){return null!=e.childContextTypes}function Di(){Ai(Bi),Ai(Ti)}function Ii(e,t,n){if(Ti.current!==Ei)throw Error(a(168));Ci(Ti,t),Ci(Bi,n)}function ki(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(a(108,V(e)||"Unknown",i));return O({},n,r)}function Fi(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ei,Pi=Ti.current,Ci(Ti,e),Ci(Bi,Bi.current),!0}function Oi(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=ki(e,t,Pi),r.__reactInternalMemoizedMergedChildContext=e,Ai(Bi),Ai(Ti),Ci(Ti,e)):Ai(Bi),Ci(Bi,n)}var Ni=null,zi=!1,Ui=!1;function Gi(e){null===Ni?Ni=[e]:Ni.push(e)}function Hi(){if(!Ui&&null!==Ni){Ui=!0;var e=0,t=xt;try{var n=Ni;for(xt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Ni=null,zi=!1}catch(t){throw null!==Ni&&(Ni=Ni.slice(e+1)),Xe($e,Hi),t}finally{xt=t,Ui=!1}}return null}var Vi=[],Wi=0,ji=null,Ji=0,Xi=[],Yi=0,Ki=null,qi=1,Qi="";function Zi(e,t){Vi[Wi++]=Ji,Vi[Wi++]=ji,ji=e,Ji=t}function $i(e,t,n){Xi[Yi++]=qi,Xi[Yi++]=Qi,Xi[Yi++]=Ki,Ki=e;var r=qi;e=Qi;var i=32-st(r)-1;r&=~(1<<i),n+=1;var a=32-st(t)+i;if(30<a){var s=i-i%5;a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,qi=1<<32-st(t)+i|n<<i|r,Qi=a+e}else qi=1<<a|n<<i|r,Qi=e}function ea(e){null!==e.return&&(Zi(e,1),$i(e,1,0))}function ta(e){for(;e===ji;)ji=Vi[--Wi],Vi[Wi]=null,Ji=Vi[--Wi],Vi[Wi]=null;for(;e===Ki;)Ki=Xi[--Yi],Xi[Yi]=null,Qi=Xi[--Yi],Xi[Yi]=null,qi=Xi[--Yi],Xi[Yi]=null}var na=null,ra=null,ia=!1,aa=null;function sa(e,t){var n=Ru(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function oa(e,t){switch(e.tag){case 5:var n=e.type;return null!==(t=1!==t.nodeType||n.toLowerCase()!==t.nodeName.toLowerCase()?null:t)&&(e.stateNode=t,na=e,ra=ui(t.firstChild),!0);case 6:return null!==(t=""===e.pendingProps||3!==t.nodeType?null:t)&&(e.stateNode=t,na=e,ra=null,!0);case 13:return null!==(t=8!==t.nodeType?null:t)&&(n=null!==Ki?{id:qi,overflow:Qi}:null,e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Ru(18,null,null,0)).stateNode=t,n.return=e,e.child=n,na=e,ra=null,!0);default:return!1}}function la(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function ua(e){if(ia){var t=ra;if(t){var n=t;if(!oa(e,t)){if(la(e))throw Error(a(418));t=ui(n.nextSibling);var r=na;t&&oa(e,t)?sa(r,n):(e.flags=-4097&e.flags|2,ia=!1,na=e)}}else{if(la(e))throw Error(a(418));e.flags=-4097&e.flags|2,ia=!1,na=e}}}function ca(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;na=e}function ha(e){if(e!==na)return!1;if(!ia)return ca(e),ia=!0,!1;var t;if((t=3!==e.tag)&&!(t=5!==e.tag)&&(t="head"!==(t=e.type)&&"body"!==t&&!ni(e.type,e.memoizedProps)),t&&(t=ra)){if(la(e))throw da(),Error(a(418));for(;t;)sa(e,t),t=ui(t.nextSibling)}if(ca(e),13===e.tag){if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(a(317));e:{for(e=e.nextSibling,t=0;e;){if(8===e.nodeType){var n=e.data;if("/$"===n){if(0===t){ra=ui(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?ui(e.stateNode.nextSibling):null;return!0}function da(){for(var e=ra;e;)e=ui(e.nextSibling)}function fa(){ra=na=null,ia=!1}function pa(e){null===aa?aa=[e]:aa.push(e)}var ma=b.ReactCurrentBatchConfig;function ga(e,t){if(e&&e.defaultProps){for(var n in t=O({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var va=Si(null),ya=null,xa=null,ba=null;function _a(){ba=xa=ya=null}function wa(e){var t=va.current;Ai(va),e._currentValue=t}function Ma(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function Sa(e,t){ya=e,ba=xa=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(bo=!0),e.firstContext=null)}function Aa(e){var t=e._currentValue;if(ba!==e)if(e={context:e,memoizedValue:t,next:null},null===xa){if(null===ya)throw Error(a(308));xa=e,ya.dependencies={lanes:0,firstContext:e}}else xa=xa.next=e;return t}var Ca=null;function Ea(e){null===Ca?Ca=[e]:Ca.push(e)}function Ta(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ea(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ba(e,r)}function Ba(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}var Pa=!1;function Ra(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function La(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function Da(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Ia(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Tl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ba(e,n)}return null===(i=r.interleaved)?(t.next=t,Ea(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ba(e,n)}function ka(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}function Fa(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=s:a=a.next=s,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function Oa(e,t,n,r){var i=e.updateQueue;Pa=!1;var a=i.firstBaseUpdate,s=i.lastBaseUpdate,o=i.shared.pending;if(null!==o){i.shared.pending=null;var l=o,u=l.next;l.next=null,null===s?a=u:s.next=u,s=l;var c=e.alternate;null!==c&&(o=(c=c.updateQueue).lastBaseUpdate)!==s&&(null===o?c.firstBaseUpdate=u:o.next=u,c.lastBaseUpdate=l)}if(null!==a){var h=i.baseState;for(s=0,c=u=l=null,o=a;;){var d=o.lane,f=o.eventTime;if((r&d)===d){null!==c&&(c=c.next={eventTime:f,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var p=e,m=o;switch(d=t,f=n,m.tag){case 1:if("function"==typeof(p=m.payload)){h=p.call(f,h,d);break e}h=p;break e;case 3:p.flags=-65537&p.flags|128;case 0:if(null==(d="function"==typeof(p=m.payload)?p.call(f,h,d):p))break e;h=O({},h,d);break e;case 2:Pa=!0}}null!==o.callback&&0!==o.lane&&(e.flags|=64,null===(d=i.effects)?i.effects=[o]:d.push(o))}else f={eventTime:f,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===c?(u=c=f,l=h):c=c.next=f,s|=d;if(null===(o=o.next)){if(null===(o=i.shared.pending))break;o=(d=o).next,d.next=null,i.lastBaseUpdate=d,i.shared.pending=null}}if(null===c&&(l=h),i.baseState=l,i.firstBaseUpdate=u,i.lastBaseUpdate=c,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);Fl|=s,e.lanes=s,e.memoizedState=h}}function Na(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(a(191,i));i.call(r)}}}var za=(new r.Component).refs;function Ua(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:O({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Ga={isMounted:function(e){return!!(e=e._reactInternals)&&He(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),a=Da(r,i);a.payload=t,null!=n&&(a.callback=n),null!==(t=Ia(e,a,i))&&(nu(t,e,i,r),ka(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=eu(),i=tu(e),a=Da(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Ia(e,a,i))&&(nu(t,e,i,r),ka(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=eu(),r=tu(e),i=Da(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Ia(e,i,r))&&(nu(t,e,r,n),ka(t,e,r))}};function Ha(e,t,n,r,i,a,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,s):!(t.prototype&&t.prototype.isPureReactComponent&&lr(n,r)&&lr(i,a))}function Va(e,t,n){var r=!1,i=Ei,a=t.contextType;return"object"==typeof a&&null!==a?a=Aa(a):(i=Li(t)?Pi:Ti.current,a=(r=null!=(r=t.contextTypes))?Ri(e,i):Ei),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ga,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function Wa(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Ga.enqueueReplaceState(t,t.state,null)}function ja(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=za,Ra(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=Aa(a):(a=Li(t)?Pi:Ti.current,i.context=Ri(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Ua(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Ga.enqueueReplaceState(i,i.state,null),Oa(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Ja(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(a(309));var r=n.stateNode}if(!r)throw Error(a(147,e));var i=r,s=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===s?t.ref:(t=function(e){var t=i.refs;t===za&&(t=i.refs={}),null===e?delete t[s]:t[s]=e},t._stringRef=s,t)}if("string"!=typeof e)throw Error(a(284));if(!n._owner)throw Error(a(290,e))}return e}function Xa(e,t){throw e=Object.prototype.toString.call(t),Error(a(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function Ya(e){return(0,e._init)(e._payload)}function Ka(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=Du(e,t)).index=0,e.sibling=null,e}function s(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=2),t}function l(e,t,n,r){return null===t||6!==t.tag?((t=Ou(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function u(e,t,n,r){var a=n.type;return a===M?h(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===L&&Ya(a)===t.type)?((r=i(t,n.props)).ref=Ja(e,t,n),r.return=e,r):((r=Iu(n.type,n.key,n.props,null,e.mode,r)).ref=Ja(e,t,n),r.return=e,r)}function c(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=Nu(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function h(e,t,n,r,a){return null===t||7!==t.tag?((t=ku(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=Ou(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case _:return(n=Iu(t.type,t.key,t.props,null,e.mode,n)).ref=Ja(e,null,t),n.return=e,n;case w:return(t=Nu(t,e.mode,n)).return=e,t;case L:return d(e,(0,t._init)(t._payload),n)}if(te(t)||k(t))return(t=ku(t,e.mode,n,null)).return=e,t;Xa(e,t)}return null}function f(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:l(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case _:return n.key===i?u(e,t,n,r):null;case w:return n.key===i?c(e,t,n,r):null;case L:return f(e,t,(i=n._init)(n._payload),r)}if(te(n)||k(n))return null!==i?null:h(e,t,n,r,null);Xa(e,n)}return null}function p(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return l(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case _:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case w:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case L:return p(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||k(r))return h(t,e=e.get(n)||null,r,i,null);Xa(t,r)}return null}function m(i,a,o,l){for(var u=null,c=null,h=a,m=a=0,g=null;null!==h&&m<o.length;m++){h.index>m?(g=h,h=null):g=h.sibling;var v=f(i,h,o[m],l);if(null===v){null===h&&(h=g);break}e&&h&&null===v.alternate&&t(i,h),a=s(v,a,m),null===c?u=v:c.sibling=v,c=v,h=g}if(m===o.length)return n(i,h),ia&&Zi(i,m),u;if(null===h){for(;m<o.length;m++)null!==(h=d(i,o[m],l))&&(a=s(h,a,m),null===c?u=h:c.sibling=h,c=h);return ia&&Zi(i,m),u}for(h=r(i,h);m<o.length;m++)null!==(g=p(h,i,m,o[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),a=s(g,a,m),null===c?u=g:c.sibling=g,c=g);return e&&h.forEach((function(e){return t(i,e)})),ia&&Zi(i,m),u}function g(i,o,l,u){var c=k(l);if("function"!=typeof c)throw Error(a(150));if(null==(l=c.call(l)))throw Error(a(151));for(var h=c=null,m=o,g=o=0,v=null,y=l.next();null!==m&&!y.done;g++,y=l.next()){m.index>g?(v=m,m=null):v=m.sibling;var x=f(i,m,y.value,u);if(null===x){null===m&&(m=v);break}e&&m&&null===x.alternate&&t(i,m),o=s(x,o,g),null===h?c=x:h.sibling=x,h=x,m=v}if(y.done)return n(i,m),ia&&Zi(i,g),c;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=d(i,y.value,u))&&(o=s(y,o,g),null===h?c=y:h.sibling=y,h=y);return ia&&Zi(i,g),c}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=p(m,i,g,y.value,u))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),o=s(y,o,g),null===h?c=y:h.sibling=y,h=y);return e&&m.forEach((function(e){return t(i,e)})),ia&&Zi(i,g),c}return function e(r,a,s,l){if("object"==typeof s&&null!==s&&s.type===M&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case _:e:{for(var u=s.key,c=a;null!==c;){if(c.key===u){if((u=s.type)===M){if(7===c.tag){n(r,c.sibling),(a=i(c,s.props.children)).return=r,r=a;break e}}else if(c.elementType===u||"object"==typeof u&&null!==u&&u.$$typeof===L&&Ya(u)===c.type){n(r,c.sibling),(a=i(c,s.props)).ref=Ja(r,c,s),a.return=r,r=a;break e}n(r,c);break}t(r,c),c=c.sibling}s.type===M?((a=ku(s.props.children,r.mode,l,s.key)).return=r,r=a):((l=Iu(s.type,s.key,s.props,null,r.mode,l)).ref=Ja(r,a,s),l.return=r,r=l)}return o(r);case w:e:{for(c=s.key;null!==a;){if(a.key===c){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){n(r,a.sibling),(a=i(a,s.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=Nu(s,r.mode,l)).return=r,r=a}return o(r);case L:return e(r,a,(c=s._init)(s._payload),l)}if(te(s))return m(r,a,s,l);if(k(s))return g(r,a,s,l);Xa(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,s)).return=r,r=a):(n(r,a),(a=Ou(s,r.mode,l)).return=r,r=a),o(r)):n(r,a)}}var qa=Ka(!0),Qa=Ka(!1),Za={},$a=Si(Za),es=Si(Za),ts=Si(Za);function ns(e){if(e===Za)throw Error(a(174));return e}function rs(e,t){switch(Ci(ts,t),Ci(es,e),Ci($a,Za),e=t.nodeType){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:le(null,"");break;default:t=le(t=(e=8===e?t.parentNode:t).namespaceURI||null,e=e.tagName)}Ai($a),Ci($a,t)}function is(){Ai($a),Ai(es),Ai(ts)}function as(e){ns(ts.current);var t=ns($a.current),n=le(t,e.type);t!==n&&(Ci(es,e),Ci($a,n))}function ss(e){es.current===e&&(Ai($a),Ai(es))}var os=Si(0);function ls(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||"$?"===n.data||"$!"===n.data))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var us=[];function cs(){for(var e=0;e<us.length;e++)us[e]._workInProgressVersionPrimary=null;us.length=0}var hs=b.ReactCurrentDispatcher,ds=b.ReactCurrentBatchConfig,fs=0,ps=null,ms=null,gs=null,vs=!1,ys=!1,xs=0,bs=0;function _s(){throw Error(a(321))}function ws(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!or(e[n],t[n]))return!1;return!0}function Ms(e,t,n,r,i,s){if(fs=s,ps=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,hs.current=null===e||null===e.memoizedState?so:oo,e=n(r,i),ys){s=0;do{if(ys=!1,xs=0,25<=s)throw Error(a(301));s+=1,gs=ms=null,t.updateQueue=null,hs.current=lo,e=n(r,i)}while(ys)}if(hs.current=ao,t=null!==ms&&null!==ms.next,fs=0,gs=ms=ps=null,vs=!1,t)throw Error(a(300));return e}function Ss(){var e=0!==xs;return xs=0,e}function As(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===gs?ps.memoizedState=gs=e:gs=gs.next=e,gs}function Cs(){if(null===ms){var e=ps.alternate;e=null!==e?e.memoizedState:null}else e=ms.next;var t=null===gs?ps.memoizedState:gs.next;if(null!==t)gs=t,ms=e;else{if(null===e)throw Error(a(310));e={memoizedState:(ms=e).memoizedState,baseState:ms.baseState,baseQueue:ms.baseQueue,queue:ms.queue,next:null},null===gs?ps.memoizedState=gs=e:gs=gs.next=e}return gs}function Es(e,t){return"function"==typeof t?t(e):t}function Ts(e){var t=Cs(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=ms,i=r.baseQueue,s=n.pending;if(null!==s){if(null!==i){var o=i.next;i.next=s.next,s.next=o}r.baseQueue=i=s,n.pending=null}if(null!==i){s=i.next,r=r.baseState;var l=o=null,u=null,c=s;do{var h=c.lane;if((fs&h)===h)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=d,o=r):u=u.next=d,ps.lanes|=h,Fl|=h}c=c.next}while(null!==c&&c!==s);null===u?o=r:u.next=l,or(r,t.memoizedState)||(bo=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{s=i.lane,ps.lanes|=s,Fl|=s,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Bs(e){var t=Cs(),n=t.queue;if(null===n)throw Error(a(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,s=t.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do{s=e(s,o.action),o=o.next}while(o!==i);or(s,t.memoizedState)||(bo=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Ps(){}function Rs(e,t){var n=ps,r=Cs(),i=t(),s=!or(r.memoizedState,i);if(s&&(r.memoizedState=i,bo=!0),r=r.queue,Vs(Is.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||null!==gs&&1&gs.memoizedState.tag){if(n.flags|=2048,Ns(9,Ds.bind(null,n,r,i,t),void 0,null),null===Bl)throw Error(a(349));0!=(30&fs)||Ls(n,t,i)}return i}function Ls(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=ps.updateQueue)?(t={lastEffect:null,stores:null},ps.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Ds(e,t,n,r){t.value=n,t.getSnapshot=r,ks(t)&&Fs(e)}function Is(e,t,n){return n((function(){ks(t)&&Fs(e)}))}function ks(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch(e){return!0}}function Fs(e){var t=Ba(e,1);null!==t&&nu(t,e,1,-1)}function Os(e){var t=As();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Es,lastRenderedState:e},t.queue=e,e=e.dispatch=to.bind(null,ps,e),[t.memoizedState,e]}function Ns(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=ps.updateQueue)?(t={lastEffect:null,stores:null},ps.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function zs(){return Cs().memoizedState}function Us(e,t,n,r){var i=As();ps.flags|=e,i.memoizedState=Ns(1|t,n,void 0,void 0===r?null:r)}function Gs(e,t,n,r){var i=Cs();r=void 0===r?null:r;var a=void 0;if(null!==ms){var s=ms.memoizedState;if(a=s.destroy,null!==r&&ws(r,s.deps))return void(i.memoizedState=Ns(t,n,a,r))}ps.flags|=e,i.memoizedState=Ns(1|t,n,a,r)}function Hs(e,t){return Us(8390656,8,e,t)}function Vs(e,t){return Gs(2048,8,e,t)}function Ws(e,t){return Gs(4,2,e,t)}function js(e,t){return Gs(4,4,e,t)}function Js(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function Xs(e,t,n){return n=null!=n?n.concat([e]):null,Gs(4,4,Js.bind(null,t,e),n)}function Ys(){}function Ks(e,t){var n=Cs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ws(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=Cs();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&ws(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Qs(e,t,n){return 0==(21&fs)?(e.baseState&&(e.baseState=!1,bo=!0),e.memoizedState=n):(or(n,t)||(n=mt(),ps.lanes|=n,Fl|=n,e.baseState=!0),t)}function Zs(e,t){var n=xt;xt=0!==n&&4>n?n:4,e(!0);var r=ds.transition;ds.transition={};try{e(!1),t()}finally{xt=n,ds.transition=r}}function $s(){return Cs().memoizedState}function eo(e,t,n){var r=tu(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},no(e)?ro(t,n):null!==(n=Ta(e,t,n,r))&&(nu(n,e,r,eu()),io(n,t,r))}function to(e,t,n){var r=tu(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(no(e))ro(t,i);else{var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,or(o,s)){var l=t.interleaved;return null===l?(i.next=i,Ea(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Ta(e,t,i,r))&&(nu(n,e,r,i=eu()),io(n,t,r))}}function no(e){var t=e.alternate;return e===ps||null!==t&&t===ps}function ro(e,t){ys=vs=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function io(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,yt(e,n)}}var ao={readContext:Aa,useCallback:_s,useContext:_s,useEffect:_s,useImperativeHandle:_s,useInsertionEffect:_s,useLayoutEffect:_s,useMemo:_s,useReducer:_s,useRef:_s,useState:_s,useDebugValue:_s,useDeferredValue:_s,useTransition:_s,useMutableSource:_s,useSyncExternalStore:_s,useId:_s,unstable_isNewReconciler:!1},so={readContext:Aa,useCallback:function(e,t){return As().memoizedState=[e,void 0===t?null:t],e},useContext:Aa,useEffect:Hs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Us(4194308,4,Js.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Us(4194308,4,e,t)},useInsertionEffect:function(e,t){return Us(4,2,e,t)},useMemo:function(e,t){var n=As();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=As();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=eo.bind(null,ps,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},As().memoizedState=e},useState:Os,useDebugValue:Ys,useDeferredValue:function(e){return As().memoizedState=e},useTransition:function(){var e=Os(!1),t=e[0];return e=Zs.bind(null,e[1]),As().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=ps,i=As();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Bl)throw Error(a(349));0!=(30&fs)||Ls(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Hs(Is.bind(null,r,s,e),[e]),r.flags|=2048,Ns(9,Ds.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=As(),t=Bl.identifierPrefix;if(ia){var n=Qi;t=":"+t+"R"+(n=(qi&~(1<<32-st(qi)-1)).toString(32)+n),0<(n=xs++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=bs++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},oo={readContext:Aa,useCallback:Ks,useContext:Aa,useEffect:Vs,useImperativeHandle:Xs,useInsertionEffect:Ws,useLayoutEffect:js,useMemo:qs,useReducer:Ts,useRef:zs,useState:function(){return Ts(Es)},useDebugValue:Ys,useDeferredValue:function(e){return Qs(Cs(),ms.memoizedState,e)},useTransition:function(){return[Ts(Es)[0],Cs().memoizedState]},useMutableSource:Ps,useSyncExternalStore:Rs,useId:$s,unstable_isNewReconciler:!1},lo={readContext:Aa,useCallback:Ks,useContext:Aa,useEffect:Vs,useImperativeHandle:Xs,useInsertionEffect:Ws,useLayoutEffect:js,useMemo:qs,useReducer:Bs,useRef:zs,useState:function(){return Bs(Es)},useDebugValue:Ys,useDeferredValue:function(e){var t=Cs();return null===ms?t.memoizedState=e:Qs(t,ms.memoizedState,e)},useTransition:function(){return[Bs(Es)[0],Cs().memoizedState]},useMutableSource:Ps,useSyncExternalStore:Rs,useId:$s,unstable_isNewReconciler:!1};function uo(e,t){try{var n="",r=t;do{n+=G(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i,digest:null}}function co(e,t,n){return{value:e,source:null,stack:null!=n?n:null,digest:null!=t?t:null}}function ho(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var fo="function"==typeof WeakMap?WeakMap:Map;function po(e,t,n){(n=Da(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){Wl||(Wl=!0,jl=r),ho(0,t)},n}function mo(e,t,n){(n=Da(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){ho(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){ho(0,t),"function"!=typeof r&&(null===Jl?Jl=new Set([this]):Jl.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function go(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new fo;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=Au.bind(null,e,t,n),t.then(e,e))}function vo(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function yo(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=Da(-1,1)).tag=2,Ia(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var xo=b.ReactCurrentOwner,bo=!1;function _o(e,t,n,r){t.child=null===e?Qa(t,null,n,r):qa(t,e.child,n,r)}function wo(e,t,n,r,i){n=n.render;var a=t.ref;return Sa(t,i),r=Ms(e,t,n,r,a,i),n=Ss(),null===e||bo?(ia&&n&&ea(t),t.flags|=1,_o(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wo(e,t,i))}function Mo(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Lu(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Iu(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,So(e,t,a,r,i))}if(a=e.child,0==(e.lanes&i)){var s=a.memoizedProps;if((n=null!==(n=n.compare)?n:lr)(s,r)&&e.ref===t.ref)return Wo(e,t,i)}return t.flags|=1,(e=Du(a,r)).ref=t.ref,e.return=t,t.child=e}function So(e,t,n,r,i){if(null!==e){var a=e.memoizedProps;if(lr(a,r)&&e.ref===t.ref){if(bo=!1,t.pendingProps=r=a,0==(e.lanes&i))return t.lanes=e.lanes,Wo(e,t,i);0!=(131072&e.flags)&&(bo=!0)}}return Eo(e,t,n,r,i)}function Ao(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null,transitions:null},Ci(Dl,Ll),Ll|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null,transitions:null},t.updateQueue=null,Ci(Dl,Ll),Ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,Ci(Dl,Ll),Ll|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,Ci(Dl,Ll),Ll|=r;return _o(e,t,i,n),t.child}function Co(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Eo(e,t,n,r,i){var a=Li(n)?Pi:Ti.current;return a=Ri(t,a),Sa(t,i),n=Ms(e,t,n,r,a,i),r=Ss(),null===e||bo?(ia&&r&&ea(t),t.flags|=1,_o(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wo(e,t,i))}function To(e,t,n,r,i){if(Li(n)){var a=!0;Fi(t)}else a=!1;if(Sa(t,i),null===t.stateNode)Vo(e,t),Va(t,n,r),ja(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,o=t.memoizedProps;s.props=o;var l=s.context,u=n.contextType;u="object"==typeof u&&null!==u?Aa(u):Ri(t,u=Li(n)?Pi:Ti.current);var c=n.getDerivedStateFromProps,h="function"==typeof c||"function"==typeof s.getSnapshotBeforeUpdate;h||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(o!==r||l!==u)&&Wa(t,s,r,u),Pa=!1;var d=t.memoizedState;s.state=d,Oa(t,r,s,i),l=t.memoizedState,o!==r||d!==l||Bi.current||Pa?("function"==typeof c&&(Ua(t,n,c,r),l=t.memoizedState),(o=Pa||Ha(t,n,o,r,d,l,u))?(h||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=o):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,La(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:ga(t.type,o),s.props=u,h=t.pendingProps,d=s.context,l="object"==typeof(l=n.contextType)&&null!==l?Aa(l):Ri(t,l=Li(n)?Pi:Ti.current);var f=n.getDerivedStateFromProps;(c="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(o!==h||d!==l)&&Wa(t,s,r,l),Pa=!1,d=t.memoizedState,s.state=d,Oa(t,r,s,i);var p=t.memoizedState;o!==h||d!==p||Bi.current||Pa?("function"==typeof f&&(Ua(t,n,f,r),p=t.memoizedState),(u=Pa||Ha(t,n,u,r,d,p,l)||!1)?(c||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,p,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=l,r=u):("function"!=typeof s.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return Bo(e,t,n,r,a,i)}function Bo(e,t,n,r,i,a){Co(e,t);var s=0!=(128&t.flags);if(!r&&!s)return i&&Oi(t,n,!1),Wo(e,t,a);r=t.stateNode,xo.current=t;var o=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=qa(t,e.child,null,a),t.child=qa(t,null,o,a)):_o(e,t,o,a),t.memoizedState=r.state,i&&Oi(t,n,!0),t.child}function Po(e){var t=e.stateNode;t.pendingContext?Ii(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Ii(0,t.context,!1),rs(e,t.containerInfo)}function Ro(e,t,n,r,i){return fa(),pa(i),t.flags|=256,_o(e,t,n,r),t.child}var Lo,Do,Io,ko={dehydrated:null,treeContext:null,retryLane:0};function Fo(e){return{baseLanes:e,cachePool:null,transitions:null}}function Oo(e,t,n){var r,i=t.pendingProps,s=os.current,o=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&s)),r?(o=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(s|=1),Ci(os,1&s),null===e)return ua(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:"$!"===e.data?t.lanes=8:t.lanes=1073741824,null):(l=i.children,e=i.fallback,o?(i=t.mode,o=t.child,l={mode:"hidden",children:l},0==(1&i)&&null!==o?(o.childLanes=0,o.pendingProps=l):o=Fu(l,i,0,null),e=ku(e,i,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Fo(n),t.memoizedState=ko,e):No(t,l));if(null!==(s=e.memoizedState)&&null!==(r=s.dehydrated))return function(e,t,n,r,i,s,o){if(n)return 256&t.flags?(t.flags&=-257,zo(e,t,o,r=co(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Fu({mode:"visible",children:r.children},i,0,null),(s=ku(s,i,o,null)).flags|=2,r.return=t,s.return=t,r.sibling=s,t.child=r,0!=(1&t.mode)&&qa(t,e.child,null,o),t.child.memoizedState=Fo(o),t.memoizedState=ko,s);if(0==(1&t.mode))return zo(e,t,o,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,zo(e,t,o,r=co(s=Error(a(419)),r,void 0))}if(l=0!=(o&e.childLanes),bo||l){if(null!==(r=Bl)){switch(o&-o){case 4:i=2;break;case 16:i=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:i=32;break;case 536870912:i=268435456;break;default:i=0}0!==(i=0!=(i&(r.suspendedLanes|o))?0:i)&&i!==s.retryLane&&(s.retryLane=i,Ba(e,i),nu(r,e,i,-1))}return mu(),zo(e,t,o,r=co(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Eu.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,ra=ui(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Xi[Yi++]=qi,Xi[Yi++]=Qi,Xi[Yi++]=Ki,qi=e.id,Qi=e.overflow,Ki=t),(t=No(t,r.children)).flags|=4096,t)}(e,t,l,i,r,s,n);if(o){o=i.fallback,l=t.mode,r=(s=e.child).sibling;var u={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==s?((i=t.child).childLanes=0,i.pendingProps=u,t.deletions=null):(i=Du(s,u)).subtreeFlags=14680064&s.subtreeFlags,null!==r?o=Du(r,o):(o=ku(o,l,n,null)).flags|=2,o.return=t,i.return=t,i.sibling=o,t.child=i,i=o,o=t.child,l=null===(l=e.child.memoizedState)?Fo(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=ko,i}return e=(o=e.child).sibling,i=Du(o,{mode:"visible",children:i.children}),0==(1&t.mode)&&(i.lanes=n),i.return=t,i.sibling=null,null!==e&&(null===(n=t.deletions)?(t.deletions=[e],t.flags|=16):n.push(e)),t.child=i,t.memoizedState=null,i}function No(e,t){return(t=Fu({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function zo(e,t,n,r){return null!==r&&pa(r),qa(t,e.child,null,n),(e=No(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function Uo(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ma(e.return,t,n)}function Go(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function Ho(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(_o(e,t,r.children,n),0!=(2&(r=os.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&Uo(e,n,t);else if(19===e.tag)Uo(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(Ci(os,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===ls(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),Go(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===ls(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}Go(t,!0,n,null,a);break;case"together":Go(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function Vo(e,t){0==(1&t.mode)&&null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2)}function Wo(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),Fl|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(a(153));if(null!==t.child){for(n=Du(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Du(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function jo(e,t){if(!ia)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Jo(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Xo(e,t,n){var r=t.pendingProps;switch(ta(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Jo(t),null;case 1:case 17:return Li(t.type)&&Di(),Jo(t),null;case 3:return r=t.stateNode,is(),Ai(Bi),Ai(Ti),cs(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(ha(t)?t.flags|=4:null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==aa&&(su(aa),aa=null))),Jo(t),null;case 5:ss(t);var i=ns(ts.current);if(n=t.type,null!==e&&null!=t.stateNode)Do(e,t,n,r),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(a(166));return Jo(t),null}if(e=ns($a.current),ha(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[di]=t,r[fi]=s,e=0!=(1&t.mode),n){case"dialog":zr("cancel",r),zr("close",r);break;case"iframe":case"object":case"embed":zr("load",r);break;case"video":case"audio":for(i=0;i<kr.length;i++)zr(kr[i],r);break;case"source":zr("error",r);break;case"img":case"image":case"link":zr("error",r),zr("load",r);break;case"details":zr("toggle",r);break;case"input":q(r,s),zr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},zr("invalid",r);break;case"textarea":ie(r,s),zr("invalid",r)}for(var l in ye(n,s),i=null,s)if(s.hasOwnProperty(l)){var u=s[l];"children"===l?"string"==typeof u?r.textContent!==u&&(!0!==s.suppressHydrationWarning&&Zr(r.textContent,u,e),i=["children",u]):"number"==typeof u&&r.textContent!==""+u&&(!0!==s.suppressHydrationWarning&&Zr(r.textContent,u,e),i=["children",""+u]):o.hasOwnProperty(l)&&null!=u&&"onScroll"===l&&zr("scroll",r)}switch(n){case"input":J(r),$(r,s,!0);break;case"textarea":J(r),se(r);break;case"select":case"option":break;default:"function"==typeof s.onClick&&(r.onclick=$r)}r=i,t.updateQueue=r,null!==r&&(t.flags|=4)}else{l=9===i.nodeType?i:i.ownerDocument,"http://www.w3.org/1999/xhtml"===e&&(e=oe(n)),"http://www.w3.org/1999/xhtml"===e?"script"===n?((e=l.createElement("div")).innerHTML="<script><\/script>",e=e.removeChild(e.firstChild)):"string"==typeof r.is?e=l.createElement(n,{is:r.is}):(e=l.createElement(n),"select"===n&&(l=e,r.multiple?l.multiple=!0:r.size&&(l.size=r.size))):e=l.createElementNS(e,n),e[di]=t,e[fi]=r,Lo(e,t),t.stateNode=e;e:{switch(l=xe(n,r),n){case"dialog":zr("cancel",e),zr("close",e),i=r;break;case"iframe":case"object":case"embed":zr("load",e),i=r;break;case"video":case"audio":for(i=0;i<kr.length;i++)zr(kr[i],e);i=r;break;case"source":zr("error",e),i=r;break;case"img":case"image":case"link":zr("error",e),zr("load",e),i=r;break;case"details":zr("toggle",e),i=r;break;case"input":q(e,r),i=K(e,r),zr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=O({},r,{value:void 0}),zr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),zr("invalid",e)}for(s in ye(n,i),u=i)if(u.hasOwnProperty(s)){var c=u[s];"style"===s?ge(e,c):"dangerouslySetInnerHTML"===s?null!=(c=c?c.__html:void 0)&&he(e,c):"children"===s?"string"==typeof c?("textarea"!==n||""!==c)&&de(e,c):"number"==typeof c&&de(e,""+c):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(o.hasOwnProperty(s)?null!=c&&"onScroll"===s&&zr("scroll",e):null!=c&&x(e,s,c,l))}switch(n){case"input":J(e),$(e,r,!1);break;case"textarea":J(e),se(e);break;case"option":null!=r.value&&e.setAttribute("value",""+W(r.value));break;case"select":e.multiple=!!r.multiple,null!=(s=r.value)?ne(e,!!r.multiple,s,!1):null!=r.defaultValue&&ne(e,!!r.multiple,r.defaultValue,!0);break;default:"function"==typeof i.onClick&&(e.onclick=$r)}switch(n){case"button":case"input":case"select":case"textarea":r=!!r.autoFocus;break e;case"img":r=!0;break e;default:r=!1}}r&&(t.flags|=4)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Jo(t),null;case 6:if(e&&null!=t.stateNode)Io(0,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(a(166));if(n=ns(ts.current),ns($a.current),ha(t)){if(r=t.stateNode,n=t.memoizedProps,r[di]=t,(s=r.nodeValue!==n)&&null!==(e=na))switch(e.tag){case 3:Zr(r.nodeValue,n,0!=(1&e.mode));break;case 5:!0!==e.memoizedProps.suppressHydrationWarning&&Zr(r.nodeValue,n,0!=(1&e.mode))}s&&(t.flags|=4)}else(r=(9===n.nodeType?n:n.ownerDocument).createTextNode(r))[di]=t,t.stateNode=r}return Jo(t),null;case 13:if(Ai(os),r=t.memoizedState,null===e||null!==e.memoizedState&&null!==e.memoizedState.dehydrated){if(ia&&null!==ra&&0!=(1&t.mode)&&0==(128&t.flags))da(),fa(),t.flags|=98560,s=!1;else if(s=ha(t),null!==r&&null!==r.dehydrated){if(null===e){if(!s)throw Error(a(318));if(!(s=null!==(s=t.memoizedState)?s.dehydrated:null))throw Error(a(317));s[di]=t}else fa(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Jo(t),s=!1}else null!==aa&&(su(aa),aa=null),s=!0;if(!s)return 65536&t.flags?t:null}return 0!=(128&t.flags)?(t.lanes=n,t):((r=null!==r)!=(null!==e&&null!==e.memoizedState)&&r&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&os.current)?0===Il&&(Il=3):mu())),null!==t.updateQueue&&(t.flags|=4),Jo(t),null);case 4:return is(),null===e&&Hr(t.stateNode.containerInfo),Jo(t),null;case 10:return wa(t.type._context),Jo(t),null;case 19:if(Ai(os),null===(s=t.memoizedState))return Jo(t),null;if(r=0!=(128&t.flags),null===(l=s.rendering))if(r)jo(s,!1);else{if(0!==Il||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(l=ls(e))){for(t.flags|=128,jo(s,!1),null!==(r=l.updateQueue)&&(t.updateQueue=r,t.flags|=4),t.subtreeFlags=0,r=n,n=t.child;null!==n;)e=r,(s=n).flags&=14680066,null===(l=s.alternate)?(s.childLanes=0,s.lanes=e,s.child=null,s.subtreeFlags=0,s.memoizedProps=null,s.memoizedState=null,s.updateQueue=null,s.dependencies=null,s.stateNode=null):(s.childLanes=l.childLanes,s.lanes=l.lanes,s.child=l.child,s.subtreeFlags=0,s.deletions=null,s.memoizedProps=l.memoizedProps,s.memoizedState=l.memoizedState,s.updateQueue=l.updateQueue,s.type=l.type,e=l.dependencies,s.dependencies=null===e?null:{lanes:e.lanes,firstContext:e.firstContext}),n=n.sibling;return Ci(os,1&os.current|2),t.child}e=e.sibling}null!==s.tail&&Qe()>Hl&&(t.flags|=128,r=!0,jo(s,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=ls(l))){if(t.flags|=128,r=!0,null!==(n=e.updateQueue)&&(t.updateQueue=n,t.flags|=4),jo(s,!0),null===s.tail&&"hidden"===s.tailMode&&!l.alternate&&!ia)return Jo(t),null}else 2*Qe()-s.renderingStartTime>Hl&&1073741824!==n&&(t.flags|=128,r=!0,jo(s,!1),t.lanes=4194304);s.isBackwards?(l.sibling=t.child,t.child=l):(null!==(n=s.last)?n.sibling=l:t.child=l,s.last=l)}return null!==s.tail?(t=s.tail,s.rendering=t,s.tail=t.sibling,s.renderingStartTime=Qe(),t.sibling=null,n=os.current,Ci(os,r?1&n|2:1&n),t):(Jo(t),null);case 22:case 23:return hu(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Ll)&&(Jo(t),6&t.subtreeFlags&&(t.flags|=8192)):Jo(t),null;case 24:case 25:return null}throw Error(a(156,t.tag))}function Yo(e,t){switch(ta(t),t.tag){case 1:return Li(t.type)&&Di(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return is(),Ai(Bi),Ai(Ti),cs(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ss(t),null;case 13:if(Ai(os),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));fa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ai(os),null;case 4:return is(),null;case 10:return wa(t.type._context),null;case 22:case 23:return hu(),null;default:return null}}Lo=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)e.appendChild(n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},Do=function(e,t,n,r){var i=e.memoizedProps;if(i!==r){e=t.stateNode,ns($a.current);var a,s=null;switch(n){case"input":i=K(e,i),r=K(e,r),s=[];break;case"select":i=O({},i,{value:void 0}),r=O({},r,{value:void 0}),s=[];break;case"textarea":i=re(e,i),r=re(e,r),s=[];break;default:"function"!=typeof i.onClick&&"function"==typeof r.onClick&&(e.onclick=$r)}for(c in ye(n,r),n=null,i)if(!r.hasOwnProperty(c)&&i.hasOwnProperty(c)&&null!=i[c])if("style"===c){var l=i[c];for(a in l)l.hasOwnProperty(a)&&(n||(n={}),n[a]="")}else"dangerouslySetInnerHTML"!==c&&"children"!==c&&"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&"autoFocus"!==c&&(o.hasOwnProperty(c)?s||(s=[]):(s=s||[]).push(c,null));for(c in r){var u=r[c];if(l=null!=i?i[c]:void 0,r.hasOwnProperty(c)&&u!==l&&(null!=u||null!=l))if("style"===c)if(l){for(a in l)!l.hasOwnProperty(a)||u&&u.hasOwnProperty(a)||(n||(n={}),n[a]="");for(a in u)u.hasOwnProperty(a)&&l[a]!==u[a]&&(n||(n={}),n[a]=u[a])}else n||(s||(s=[]),s.push(c,n)),n=u;else"dangerouslySetInnerHTML"===c?(u=u?u.__html:void 0,l=l?l.__html:void 0,null!=u&&l!==u&&(s=s||[]).push(c,u)):"children"===c?"string"!=typeof u&&"number"!=typeof u||(s=s||[]).push(c,""+u):"suppressContentEditableWarning"!==c&&"suppressHydrationWarning"!==c&&(o.hasOwnProperty(c)?(null!=u&&"onScroll"===c&&zr("scroll",e),s||l===u||(s=[])):(s=s||[]).push(c,u))}n&&(s=s||[]).push("style",n);var c=s;(t.updateQueue=c)&&(t.flags|=4)}},Io=function(e,t,n,r){n!==r&&(t.flags|=4)};var Ko=!1,qo=!1,Qo="function"==typeof WeakSet?WeakSet:Set,Zo=null;function $o(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Su(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){Su(e,t,n)}}var tl=!1;function nl(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&el(t,n,a)}i=i.next}while(i!==r)}}function rl(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function il(e){var t=e.ref;if(null!==t){var n=e.stateNode;e.tag,e=n,"function"==typeof t?t(e):t.current=e}}function al(e){var t=e.alternate;null!==t&&(e.alternate=null,al(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&(delete t[di],delete t[fi],delete t[mi],delete t[gi],delete t[vi]),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function sl(e){return 5===e.tag||3===e.tag||4===e.tag}function ol(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||sl(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function ll(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?8===n.nodeType?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(8===n.nodeType?(t=n.parentNode).insertBefore(e,n):(t=n).appendChild(e),null!=(n=n._reactRootContainer)||null!==t.onclick||(t.onclick=$r));else if(4!==r&&null!==(e=e.child))for(ll(e,t,n),e=e.sibling;null!==e;)ll(e,t,n),e=e.sibling}function ul(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(4!==r&&null!==(e=e.child))for(ul(e,t,n),e=e.sibling;null!==e;)ul(e,t,n),e=e.sibling}var cl=null,hl=!1;function dl(e,t,n){for(n=n.child;null!==n;)fl(e,t,n),n=n.sibling}function fl(e,t,n){if(at&&"function"==typeof at.onCommitFiberUnmount)try{at.onCommitFiberUnmount(it,n)}catch(e){}switch(n.tag){case 5:qo||$o(n,t);case 6:var r=cl,i=hl;cl=null,dl(e,t,n),hl=i,null!==(cl=r)&&(hl?(e=cl,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):cl.removeChild(n.stateNode));break;case 18:null!==cl&&(hl?(e=cl,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Ht(e)):li(cl,n.stateNode));break;case 4:r=cl,i=hl,cl=n.stateNode.containerInfo,hl=!0,dl(e,t,n),cl=r,hl=i;break;case 0:case 11:case 14:case 15:if(!qo&&null!==(r=n.updateQueue)&&null!==(r=r.lastEffect)){i=r=r.next;do{var a=i,s=a.destroy;a=a.tag,void 0!==s&&(0!=(2&a)||0!=(4&a))&&el(n,t,s),i=i.next}while(i!==r)}dl(e,t,n);break;case 1:if(!qo&&($o(n,t),"function"==typeof(r=n.stateNode).componentWillUnmount))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(e){Su(n,t,e)}dl(e,t,n);break;case 21:dl(e,t,n);break;case 22:1&n.mode?(qo=(r=qo)||null!==n.memoizedState,dl(e,t,n),qo=r):dl(e,t,n);break;default:dl(e,t,n)}}function pl(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new Qo),t.forEach((function(t){var r=Tu.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function ml(e,t){var n=t.deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var s=e,o=t,l=o;e:for(;null!==l;){switch(l.tag){case 5:cl=l.stateNode,hl=!1;break e;case 3:case 4:cl=l.stateNode.containerInfo,hl=!0;break e}l=l.return}if(null===cl)throw Error(a(160));fl(s,o,i),cl=null,hl=!1;var u=i.alternate;null!==u&&(u.return=null),i.return=null}catch(e){Su(i,t,e)}}if(12854&t.subtreeFlags)for(t=t.child;null!==t;)gl(t,e),t=t.sibling}function gl(e,t){var n=e.alternate,r=e.flags;switch(e.tag){case 0:case 11:case 14:case 15:if(ml(t,e),vl(e),4&r){try{nl(3,e,e.return),rl(3,e)}catch(t){Su(e,e.return,t)}try{nl(5,e,e.return)}catch(t){Su(e,e.return,t)}}break;case 1:ml(t,e),vl(e),512&r&&null!==n&&$o(n,n.return);break;case 5:if(ml(t,e),vl(e),512&r&&null!==n&&$o(n,n.return),32&e.flags){var i=e.stateNode;try{de(i,"")}catch(t){Su(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var s=e.memoizedProps,o=null!==n?n.memoizedProps:s,l=e.type,u=e.updateQueue;if(e.updateQueue=null,null!==u)try{"input"===l&&"radio"===s.type&&null!=s.name&&Q(i,s),xe(l,o);var c=xe(l,s);for(o=0;o<u.length;o+=2){var h=u[o],d=u[o+1];"style"===h?ge(i,d):"dangerouslySetInnerHTML"===h?he(i,d):"children"===h?de(i,d):x(i,h,d,c)}switch(l){case"input":Z(i,s);break;case"textarea":ae(i,s);break;case"select":var f=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var p=s.value;null!=p?ne(i,!!s.multiple,p,!1):f!==!!s.multiple&&(null!=s.defaultValue?ne(i,!!s.multiple,s.defaultValue,!0):ne(i,!!s.multiple,s.multiple?[]:"",!1))}i[fi]=s}catch(t){Su(e,e.return,t)}}break;case 6:if(ml(t,e),vl(e),4&r){if(null===e.stateNode)throw Error(a(162));i=e.stateNode,s=e.memoizedProps;try{i.nodeValue=s}catch(t){Su(e,e.return,t)}}break;case 3:if(ml(t,e),vl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Ht(t.containerInfo)}catch(t){Su(e,e.return,t)}break;case 4:default:ml(t,e),vl(e);break;case 13:ml(t,e),vl(e),8192&(i=e.child).flags&&(s=null!==i.memoizedState,i.stateNode.isHidden=s,!s||null!==i.alternate&&null!==i.alternate.memoizedState||(Gl=Qe())),4&r&&pl(e);break;case 22:if(h=null!==n&&null!==n.memoizedState,1&e.mode?(qo=(c=qo)||h,ml(t,e),qo=c):ml(t,e),vl(e),8192&r){if(c=null!==e.memoizedState,(e.stateNode.isHidden=c)&&!h&&0!=(1&e.mode))for(Zo=e,h=e.child;null!==h;){for(d=Zo=h;null!==Zo;){switch(p=(f=Zo).child,f.tag){case 0:case 11:case 14:case 15:nl(4,f,f.return);break;case 1:$o(f,f.return);var m=f.stateNode;if("function"==typeof m.componentWillUnmount){r=f,n=f.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){Su(r,n,e)}}break;case 5:$o(f,f.return);break;case 22:if(null!==f.memoizedState){_l(d);continue}}null!==p?(p.return=f,Zo=p):_l(d)}h=h.sibling}e:for(h=null,d=e;;){if(5===d.tag){if(null===h){h=d;try{i=d.stateNode,c?"function"==typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=d.stateNode,o=null!=(u=d.memoizedProps.style)&&u.hasOwnProperty("display")?u.display:null,l.style.display=me("display",o))}catch(t){Su(e,e.return,t)}}}else if(6===d.tag){if(null===h)try{d.stateNode.nodeValue=c?"":d.memoizedProps}catch(t){Su(e,e.return,t)}}else if((22!==d.tag&&23!==d.tag||null===d.memoizedState||d===e)&&null!==d.child){d.child.return=d,d=d.child;continue}if(d===e)break e;for(;null===d.sibling;){if(null===d.return||d.return===e)break e;h===d&&(h=null),d=d.return}h===d&&(h=null),d.sibling.return=d.return,d=d.sibling}}break;case 19:ml(t,e),vl(e),4&r&&pl(e);case 21:}}function vl(e){var t=e.flags;if(2&t){try{e:{for(var n=e.return;null!==n;){if(sl(n)){var r=n;break e}n=n.return}throw Error(a(160))}switch(r.tag){case 5:var i=r.stateNode;32&r.flags&&(de(i,""),r.flags&=-33),ul(e,ol(e),i);break;case 3:case 4:var s=r.stateNode.containerInfo;ll(e,ol(e),s);break;default:throw Error(a(161))}}catch(t){Su(e,e.return,t)}e.flags&=-3}4096&t&&(e.flags&=-4097)}function yl(e,t,n){Zo=e,xl(e,t,n)}function xl(e,t,n){for(var r=0!=(1&e.mode);null!==Zo;){var i=Zo,a=i.child;if(22===i.tag&&r){var s=null!==i.memoizedState||Ko;if(!s){var o=i.alternate,l=null!==o&&null!==o.memoizedState||qo;o=Ko;var u=qo;if(Ko=s,(qo=l)&&!u)for(Zo=i;null!==Zo;)l=(s=Zo).child,22===s.tag&&null!==s.memoizedState?wl(i):null!==l?(l.return=s,Zo=l):wl(i);for(;null!==a;)Zo=a,xl(a,t,n),a=a.sibling;Zo=i,Ko=o,qo=u}bl(e)}else 0!=(8772&i.subtreeFlags)&&null!==a?(a.return=i,Zo=a):bl(e)}}function bl(e){for(;null!==Zo;){var t=Zo;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:qo||rl(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!qo)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:ga(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var s=t.updateQueue;null!==s&&Na(t,s,r);break;case 3:var o=t.updateQueue;if(null!==o){if(n=null,null!==t.child)switch(t.child.tag){case 5:case 1:n=t.child.stateNode}Na(t,o,n)}break;case 5:var l=t.stateNode;if(null===n&&4&t.flags){n=l;var u=t.memoizedProps;switch(t.type){case"button":case"input":case"select":case"textarea":u.autoFocus&&n.focus();break;case"img":u.src&&(n.src=u.src)}}break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:case 25:break;case 13:if(null===t.memoizedState){var c=t.alternate;if(null!==c){var h=c.memoizedState;if(null!==h){var d=h.dehydrated;null!==d&&Ht(d)}}}break;default:throw Error(a(163))}qo||512&t.flags&&il(t)}catch(e){Su(t,t.return,e)}}if(t===e){Zo=null;break}if(null!==(n=t.sibling)){n.return=t.return,Zo=n;break}Zo=t.return}}function _l(e){for(;null!==Zo;){var t=Zo;if(t===e){Zo=null;break}var n=t.sibling;if(null!==n){n.return=t.return,Zo=n;break}Zo=t.return}}function wl(e){for(;null!==Zo;){var t=Zo;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{rl(4,t)}catch(e){Su(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Su(t,i,e)}}var a=t.return;try{il(t)}catch(e){Su(t,a,e)}break;case 5:var s=t.return;try{il(t)}catch(e){Su(t,s,e)}}}catch(e){Su(t,t.return,e)}if(t===e){Zo=null;break}var o=t.sibling;if(null!==o){o.return=t.return,Zo=o;break}Zo=t.return}}var Ml,Sl=Math.ceil,Al=b.ReactCurrentDispatcher,Cl=b.ReactCurrentOwner,El=b.ReactCurrentBatchConfig,Tl=0,Bl=null,Pl=null,Rl=0,Ll=0,Dl=Si(0),Il=0,kl=null,Fl=0,Ol=0,Nl=0,zl=null,Ul=null,Gl=0,Hl=1/0,Vl=null,Wl=!1,jl=null,Jl=null,Xl=!1,Yl=null,Kl=0,ql=0,Ql=null,Zl=-1,$l=0;function eu(){return 0!=(6&Tl)?Qe():-1!==Zl?Zl:Zl=Qe()}function tu(e){return 0==(1&e.mode)?1:0!=(2&Tl)&&0!==Rl?Rl&-Rl:null!==ma.transition?(0===$l&&($l=mt()),$l):0!==(e=xt)?e:e=void 0===(e=window.event)?16:qt(e.type)}function nu(e,t,n,r){if(50<ql)throw ql=0,Ql=null,Error(a(185));vt(e,n,r),0!=(2&Tl)&&e===Bl||(e===Bl&&(0==(2&Tl)&&(Ol|=n),4===Il&&ou(e,Rl)),ru(e,r),1===n&&0===Tl&&0==(1&t.mode)&&(Hl=Qe()+500,zi&&Hi()))}function ru(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var s=31-st(a),o=1<<s,l=i[s];-1===l?0!=(o&n)&&0==(o&r)||(i[s]=ft(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}}(e,t);var r=dt(e,e===Bl?Rl:0);if(0===r)null!==n&&Ye(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ye(n),1===t)0===e.tag?function(e){zi=!0,Gi(e)}(lu.bind(null,e)):Gi(lu.bind(null,e)),si((function(){0==(6&Tl)&&Hi()})),n=null;else{switch(bt(r)){case 1:n=$e;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Bu(n,iu.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function iu(e,t){if(Zl=-1,$l=0,0!=(6&Tl))throw Error(a(327));var n=e.callbackNode;if(wu()&&e.callbackNode!==n)return null;var r=dt(e,e===Bl?Rl:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=gu(e,r);else{t=r;var i=Tl;Tl|=2;var s=pu();for(Bl===e&&Rl===t||(Vl=null,Hl=Qe()+500,du(e,t));;)try{yu();break}catch(t){fu(e,t)}_a(),Al.current=s,Tl=i,null!==Pl?t=0:(Bl=null,Rl=0,t=Il)}if(0!==t){if(2===t&&0!==(i=pt(e))&&(r=i,t=au(e,i)),1===t)throw n=kl,du(e,0),ou(e,r),ru(e,Qe()),n;if(6===t)ou(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!or(a(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=gu(e,r))&&0!==(s=pt(e))&&(r=s,t=au(e,s)),1===t))throw n=kl,du(e,0),ou(e,r),ru(e,Qe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:_u(e,Ul,Vl);break;case 3:if(ou(e,r),(130023424&r)===r&&10<(t=Gl+500-Qe())){if(0!==dt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){eu(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(_u.bind(null,e,Ul,Vl),t);break}_u(e,Ul,Vl);break;case 4:if(ou(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-st(r);s=1<<o,(o=t[o])>i&&(i=o),r&=~s}if(r=i,10<(r=(120>(r=Qe()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Sl(r/1960))-r)){e.timeoutHandle=ri(_u.bind(null,e,Ul,Vl),r);break}_u(e,Ul,Vl);break;default:throw Error(a(329))}}}return ru(e,Qe()),e.callbackNode===n?iu.bind(null,e):null}function au(e,t){var n=zl;return e.current.memoizedState.isDehydrated&&(du(e,t).flags|=256),2!==(e=gu(e,t))&&(t=Ul,Ul=n,null!==t&&su(t)),e}function su(e){null===Ul?Ul=e:Ul.push.apply(Ul,e)}function ou(e,t){for(t&=~Nl,t&=~Ol,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-st(t),r=1<<n;e[n]=-1,t&=~r}}function lu(e){if(0!=(6&Tl))throw Error(a(327));wu();var t=dt(e,0);if(0==(1&t))return ru(e,Qe()),null;var n=gu(e,t);if(0!==e.tag&&2===n){var r=pt(e);0!==r&&(t=r,n=au(e,r))}if(1===n)throw n=kl,du(e,0),ou(e,t),ru(e,Qe()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,_u(e,Ul,Vl),ru(e,Qe()),null}function uu(e,t){var n=Tl;Tl|=1;try{return e(t)}finally{0===(Tl=n)&&(Hl=Qe()+500,zi&&Hi())}}function cu(e){null!==Yl&&0===Yl.tag&&0==(6&Tl)&&wu();var t=Tl;Tl|=1;var n=El.transition,r=xt;try{if(El.transition=null,xt=1,e)return e()}finally{xt=r,El.transition=n,0==(6&(Tl=t))&&Hi()}}function hu(){Ll=Dl.current,Ai(Dl)}function du(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(-1!==n&&(e.timeoutHandle=-1,ii(n)),null!==Pl)for(n=Pl.return;null!==n;){var r=n;switch(ta(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&Di();break;case 3:is(),Ai(Bi),Ai(Ti),cs();break;case 5:ss(r);break;case 4:is();break;case 13:case 19:Ai(os);break;case 10:wa(r.type._context);break;case 22:case 23:hu()}n=n.return}if(Bl=e,Pl=e=Du(e.current,null),Rl=Ll=t,Il=0,kl=null,Nl=Ol=Fl=0,Ul=zl=null,null!==Ca){for(t=0;t<Ca.length;t++)if(null!==(r=(n=Ca[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var s=a.next;a.next=i,r.next=s}n.pending=r}Ca=null}return e}function fu(e,t){for(;;){var n=Pl;try{if(_a(),hs.current=ao,vs){for(var r=ps.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}vs=!1}if(fs=0,gs=ms=ps=null,ys=!1,xs=0,Cl.current=null,null===n||null===n.return){Il=1,kl=t,Pl=null;break}e:{var s=e,o=n.return,l=n,u=t;if(t=Rl,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,h=l,d=h.tag;if(0==(1&h.mode)&&(0===d||11===d||15===d)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=vo(o);if(null!==p){p.flags&=-257,yo(p,o,l,0,t),1&p.mode&&go(s,c,t),u=c;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(u),t.updateQueue=g}else m.add(u);break e}if(0==(1&t)){go(s,c,t),mu();break e}u=Error(a(426))}else if(ia&&1&l.mode){var v=vo(o);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),yo(v,o,l,0,t),pa(uo(u,l));break e}}s=u=uo(u,l),4!==Il&&(Il=2),null===zl?zl=[s]:zl.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Fa(s,po(0,u,t));break e;case 1:l=u;var y=s.type,x=s.stateNode;if(0==(128&s.flags)&&("function"==typeof y.getDerivedStateFromError||null!==x&&"function"==typeof x.componentDidCatch&&(null===Jl||!Jl.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t,Fa(s,mo(s,l,t));break e}}s=s.return}while(null!==s)}bu(n)}catch(e){t=e,Pl===n&&null!==n&&(Pl=n=n.return);continue}break}}function pu(){var e=Al.current;return Al.current=ao,null===e?ao:e}function mu(){0!==Il&&3!==Il&&2!==Il||(Il=4),null===Bl||0==(268435455&Fl)&&0==(268435455&Ol)||ou(Bl,Rl)}function gu(e,t){var n=Tl;Tl|=2;var r=pu();for(Bl===e&&Rl===t||(Vl=null,du(e,t));;)try{vu();break}catch(t){fu(e,t)}if(_a(),Tl=n,Al.current=r,null!==Pl)throw Error(a(261));return Bl=null,Rl=0,Il}function vu(){for(;null!==Pl;)xu(Pl)}function yu(){for(;null!==Pl&&!Ke();)xu(Pl)}function xu(e){var t=Ml(e.alternate,e,Ll);e.memoizedProps=e.pendingProps,null===t?bu(e):Pl=t,Cl.current=null}function bu(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Xo(n,t,Ll)))return void(Pl=n)}else{if(null!==(n=Yo(n,t)))return n.flags&=32767,void(Pl=n);if(null===e)return Il=6,void(Pl=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Pl=t);Pl=t=e}while(null!==t);0===Il&&(Il=5)}function _u(e,t,n){var r=xt,i=El.transition;try{El.transition=null,xt=1,function(e,t,n,r){do{wu()}while(null!==Yl);if(0!=(6&Tl))throw Error(a(327));n=e.finishedWork;var i=e.finishedLanes;if(null===n)return null;if(e.finishedWork=null,e.finishedLanes=0,n===e.current)throw Error(a(177));e.callbackNode=null,e.callbackPriority=0;var s=n.lanes|n.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-st(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,s),e===Bl&&(Pl=Bl=null,Rl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Xl||(Xl=!0,Bu(tt,(function(){return wu(),null}))),s=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||s){s=El.transition,El.transition=null;var o=xt;xt=1;var l=Tl;Tl|=4,Cl.current=null,function(e,t){if(ei=Wt,fr(e=dr())){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{var r=(n=(n=e.ownerDocument)&&n.defaultView||window).getSelection&&n.getSelection();if(r&&0!==r.rangeCount){n=r.anchorNode;var i=r.anchorOffset,s=r.focusNode;r=r.focusOffset;try{n.nodeType,s.nodeType}catch(e){n=null;break e}var o=0,l=-1,u=-1,c=0,h=0,d=e,f=null;t:for(;;){for(var p;d!==n||0!==i&&3!==d.nodeType||(l=o+i),d!==s||0!==r&&3!==d.nodeType||(u=o+r),3===d.nodeType&&(o+=d.nodeValue.length),null!==(p=d.firstChild);)f=d,d=p;for(;;){if(d===e)break t;if(f===n&&++c===i&&(l=o),f===s&&++h===r&&(u=o),null!==(p=d.nextSibling))break;f=(d=f).parentNode}d=p}n=-1===l||-1===u?null:{start:l,end:u}}else n=null}n=n||{start:0,end:0}}else n=null;for(ti={focusedElem:e,selectionRange:n},Wt=!1,Zo=t;null!==Zo;)if(e=(t=Zo).child,0!=(1028&t.subtreeFlags)&&null!==e)e.return=t,Zo=e;else for(;null!==Zo;){t=Zo;try{var m=t.alternate;if(0!=(1024&t.flags))switch(t.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==m){var g=m.memoizedProps,v=m.memoizedState,y=t.stateNode,x=y.getSnapshotBeforeUpdate(t.elementType===t.type?g:ga(t.type,g),v);y.__reactInternalSnapshotBeforeUpdate=x}break;case 3:var b=t.stateNode.containerInfo;1===b.nodeType?b.textContent="":9===b.nodeType&&b.documentElement&&b.removeChild(b.documentElement);break;default:throw Error(a(163))}}catch(e){Su(t,t.return,e)}if(null!==(e=t.sibling)){e.return=t.return,Zo=e;break}Zo=t.return}m=tl,tl=!1}(e,n),gl(n,e),pr(ti),Wt=!!ei,ti=ei=null,e.current=n,yl(n,e,i),qe(),Tl=l,xt=o,El.transition=s}else e.current=n;if(Xl&&(Xl=!1,Yl=e,Kl=i),0===(s=e.pendingLanes)&&(Jl=null),function(e){if(at&&"function"==typeof at.onCommitFiberRoot)try{at.onCommitFiberRoot(it,e,void 0,128==(128&e.current.flags))}catch(e){}}(n.stateNode),ru(e,Qe()),null!==t)for(r=e.onRecoverableError,n=0;n<t.length;n++)r((i=t[n]).value,{componentStack:i.stack,digest:i.digest});if(Wl)throw Wl=!1,e=jl,jl=null,e;0!=(1&Kl)&&0!==e.tag&&wu(),0!=(1&(s=e.pendingLanes))?e===Ql?ql++:(ql=0,Ql=e):ql=0,Hi()}(e,t,n,r)}finally{El.transition=i,xt=r}return null}function wu(){if(null!==Yl){var e=bt(Kl),t=El.transition,n=xt;try{if(El.transition=null,xt=16>e?16:e,null===Yl)var r=!1;else{if(e=Yl,Yl=null,Kl=0,0!=(6&Tl))throw Error(a(331));var i=Tl;for(Tl|=4,Zo=e.current;null!==Zo;){var s=Zo,o=s.child;if(0!=(16&Zo.flags)){var l=s.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(Zo=c;null!==Zo;){var h=Zo;switch(h.tag){case 0:case 11:case 15:nl(8,h,s)}var d=h.child;if(null!==d)d.return=h,Zo=d;else for(;null!==Zo;){var f=(h=Zo).sibling,p=h.return;if(al(h),h===c){Zo=null;break}if(null!==f){f.return=p,Zo=f;break}Zo=p}}}var m=s.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}Zo=s}}if(0!=(2064&s.subtreeFlags)&&null!==o)o.return=s,Zo=o;else e:for(;null!==Zo;){if(0!=(2048&(s=Zo).flags))switch(s.tag){case 0:case 11:case 15:nl(9,s,s.return)}var y=s.sibling;if(null!==y){y.return=s.return,Zo=y;break e}Zo=s.return}}var x=e.current;for(Zo=x;null!==Zo;){var b=(o=Zo).child;if(0!=(2064&o.subtreeFlags)&&null!==b)b.return=o,Zo=b;else e:for(o=x;null!==Zo;){if(0!=(2048&(l=Zo).flags))try{switch(l.tag){case 0:case 11:case 15:rl(9,l)}}catch(e){Su(l,l.return,e)}if(l===o){Zo=null;break e}var _=l.sibling;if(null!==_){_.return=l.return,Zo=_;break e}Zo=l.return}}if(Tl=i,Hi(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{xt=n,El.transition=t}}return!1}function Mu(e,t,n){e=Ia(e,t=po(0,t=uo(n,t),1),1),t=eu(),null!==e&&(vt(e,1,t),ru(e,t))}function Su(e,t,n){if(3===e.tag)Mu(e,e,n);else for(;null!==t;){if(3===t.tag){Mu(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Jl||!Jl.has(r))){t=Ia(t,e=mo(t,e=uo(n,e),1),1),e=eu(),null!==t&&(vt(t,1,e),ru(t,e));break}}t=t.return}}function Au(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=eu(),e.pingedLanes|=e.suspendedLanes&n,Bl===e&&(Rl&n)===n&&(4===Il||3===Il&&(130023424&Rl)===Rl&&500>Qe()-Gl?du(e,0):Nl|=n),ru(e,t)}function Cu(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ct,0==(130023424&(ct<<=1))&&(ct=4194304)));var n=eu();null!==(e=Ba(e,t))&&(vt(e,t,n),ru(e,n))}function Eu(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Cu(e,n)}function Tu(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(a(314))}null!==r&&r.delete(t),Cu(e,n)}function Bu(e,t){return Xe(e,t)}function Pu(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Ru(e,t,n,r){return new Pu(e,t,n,r)}function Lu(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Du(e,t){var n=e.alternate;return null===n?((n=Ru(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Iu(e,t,n,r,i,s){var o=2;if(r=e,"function"==typeof e)Lu(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case M:return ku(n.children,i,s,t);case S:o=8,i|=8;break;case A:return(e=Ru(12,n,t,2|i)).elementType=A,e.lanes=s,e;case B:return(e=Ru(13,n,t,i)).elementType=B,e.lanes=s,e;case P:return(e=Ru(19,n,t,i)).elementType=P,e.lanes=s,e;case D:return Fu(n,i,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case C:o=10;break e;case E:o=9;break e;case T:o=11;break e;case R:o=14;break e;case L:o=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Ru(o,n,t,i)).elementType=e,t.type=r,t.lanes=s,t}function ku(e,t,n,r){return(e=Ru(7,e,r,t)).lanes=n,e}function Fu(e,t,n,r){return(e=Ru(22,e,r,t)).elementType=D,e.lanes=n,e.stateNode={isHidden:!1},e}function Ou(e,t,n){return(e=Ru(6,e,null,t)).lanes=n,e}function Nu(e,t,n){return(t=Ru(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function zu(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=gt(0),this.expirationTimes=gt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=gt(0),this.identifierPrefix=r,this.onRecoverableError=i,this.mutableSourceEagerHydrationData=null}function Uu(e,t,n,r,i,a,s,o,l){return e=new zu(e,t,n,o,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Ru(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ra(a),e}function Gu(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:w,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Hu(e){if(!e)return Ei;e:{if(He(e=e._reactInternals)!==e||1!==e.tag)throw Error(a(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(Li(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(a(171))}if(1===e.tag){var n=e.type;if(Li(n))return ki(e,n,t)}return t}function Vu(e,t,n,r,i,a,s,o,l){return(e=Uu(n,r,!0,e,0,a,0,o,l)).context=Hu(null),n=e.current,(a=Da(r=eu(),i=tu(n))).callback=null!=t?t:null,Ia(n,a,i),e.current.lanes=i,vt(e,i,r),ru(e,r),e}function Wu(e,t,n,r){var i=t.current,a=eu(),s=tu(i);return n=Hu(n),null===t.context?t.context=n:t.pendingContext=n,(t=Da(a,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Ia(i,t,s))&&(nu(e,i,s,a),ka(e,i,s)),s}function ju(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Ju(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function Xu(e,t){Ju(e,t),(e=e.alternate)&&Ju(e,t)}Ml=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Bi.current)bo=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return bo=!1,function(e,t,n){switch(t.tag){case 3:Po(t),fa();break;case 5:as(t);break;case 1:Li(t.type)&&Fi(t);break;case 4:rs(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;Ci(va,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(Ci(os,1&os.current),t.flags|=128,null):0!=(n&t.child.childLanes)?Oo(e,t,n):(Ci(os,1&os.current),null!==(e=Wo(e,t,n))?e.sibling:null);Ci(os,1&os.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Ho(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),Ci(os,os.current),r)break;return null;case 22:case 23:return t.lanes=0,Ao(e,t,n)}return Wo(e,t,n)}(e,t,n);bo=0!=(131072&e.flags)}else bo=!1,ia&&0!=(1048576&t.flags)&&$i(t,Ji,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vo(e,t),e=t.pendingProps;var i=Ri(t,Ti.current);Sa(t,n),i=Ms(null,t,r,e,i,n);var s=Ss();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,Li(r)?(s=!0,Fi(t)):s=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ra(t),i.updater=Ga,t.stateNode=i,i._reactInternals=t,ja(t,r,e,n),t=Bo(null,t,r,!0,s,n)):(t.tag=0,ia&&s&&ea(t),_o(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(Vo(e,t),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Lu(e)?1:0;if(null!=e){if((e=e.$$typeof)===T)return 11;if(e===R)return 14}return 2}(r),e=ga(r,e),i){case 0:t=Eo(null,t,r,e,n);break e;case 1:t=To(null,t,r,e,n);break e;case 11:t=wo(null,t,r,e,n);break e;case 14:t=Mo(null,t,r,ga(r.type,e),n);break e}throw Error(a(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Eo(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 1:return r=t.type,i=t.pendingProps,To(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 3:e:{if(Po(t),null===e)throw Error(a(387));r=t.pendingProps,i=(s=t.memoizedState).element,La(e,t),Oa(t,r,null,n);var o=t.memoizedState;if(r=o.element,s.isDehydrated){if(s={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=s,t.memoizedState=s,256&t.flags){t=Ro(e,t,r,n,i=uo(Error(a(423)),t));break e}if(r!==i){t=Ro(e,t,r,n,i=uo(Error(a(424)),t));break e}for(ra=ui(t.stateNode.containerInfo.firstChild),na=t,ia=!0,aa=null,n=Qa(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if(fa(),r===i){t=Wo(e,t,n);break e}_o(e,t,r,n)}t=t.child}return t;case 5:return as(t),null===e&&ua(t),r=t.type,i=t.pendingProps,s=null!==e?e.memoizedProps:null,o=i.children,ni(r,i)?o=null:null!==s&&ni(r,s)&&(t.flags|=32),Co(e,t),_o(e,t,o,n),t.child;case 6:return null===e&&ua(t),null;case 13:return Oo(e,t,n);case 4:return rs(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=qa(t,null,r,n):_o(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,wo(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 7:return _o(e,t,t.pendingProps,n),t.child;case 8:case 12:return _o(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,s=t.memoizedProps,o=i.value,Ci(va,r._currentValue),r._currentValue=o,null!==s)if(or(s.value,o)){if(s.children===i.children&&!Bi.current){t=Wo(e,t,n);break e}}else for(null!==(s=t.child)&&(s.return=t);null!==s;){var l=s.dependencies;if(null!==l){o=s.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===s.tag){(u=Da(-1,n&-n)).tag=2;var c=s.updateQueue;if(null!==c){var h=(c=c.shared).pending;null===h?u.next=u:(u.next=h.next,h.next=u),c.pending=u}}s.lanes|=n,null!==(u=s.alternate)&&(u.lanes|=n),Ma(s.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===s.tag)o=s.type===t.type?null:s.child;else if(18===s.tag){if(null===(o=s.return))throw Error(a(341));o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),Ma(o,n,t),o=s.sibling}else o=s.child;if(null!==o)o.return=s;else for(o=s;null!==o;){if(o===t){o=null;break}if(null!==(s=o.sibling)){s.return=o.return,o=s;break}o=o.return}s=o}_o(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,Sa(t,n),r=r(i=Aa(i)),t.flags|=1,_o(e,t,r,n),t.child;case 14:return i=ga(r=t.type,t.pendingProps),Mo(e,t,r,i=ga(r.type,i),n);case 15:return So(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:ga(r,i),Vo(e,t),t.tag=1,Li(r)?(e=!0,Fi(t)):e=!1,Sa(t,n),Va(t,r,i),ja(t,r,i,n),Bo(null,t,r,!0,e,n);case 19:return Ho(e,t,n);case 22:return Ao(e,t,n)}throw Error(a(156,t.tag))};var Yu="function"==typeof reportError?reportError:function(e){console.error(e)};function Ku(e){this._internalRoot=e}function qu(e){this._internalRoot=e}function Qu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Zu(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function $u(){}function ec(e,t,n,r,i){var a=n._reactRootContainer;if(a){var s=a;if("function"==typeof i){var o=i;i=function(){var e=ju(s);o.call(e)}}Wu(t,s,e,i)}else s=function(e,t,n,r,i){if(i){if("function"==typeof r){var a=r;r=function(){var e=ju(s);a.call(e)}}var s=Vu(t,r,e,0,null,!1,0,"",$u);return e._reactRootContainer=s,e[pi]=s.current,Hr(8===e.nodeType?e.parentNode:e),cu(),s}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var o=r;r=function(){var e=ju(l);o.call(e)}}var l=Uu(e,0,!1,null,0,!1,0,"",$u);return e._reactRootContainer=l,e[pi]=l.current,Hr(8===e.nodeType?e.parentNode:e),cu((function(){Wu(t,l,n,r)})),l}(n,t,e,i,r);return ju(s)}qu.prototype.render=Ku.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Wu(e,t,null,null)},qu.prototype.unmount=Ku.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;cu((function(){Wu(null,e,null,null)})),t[pi]=null}},qu.prototype.unstable_scheduleHydration=function(e){if(e){var t=St();e={blockedOn:null,target:e,priority:t};for(var n=0;n<Dt.length&&0!==t&&t<Dt[n].priority;n++);Dt.splice(n,0,e),0===n&&Ot(e)}},_t=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=ht(t.pendingLanes);0!==n&&(yt(t,1|n),ru(t,Qe()),0==(6&Tl)&&(Hl=Qe()+500,Hi()))}break;case 13:cu((function(){var t=Ba(e,1);if(null!==t){var n=eu();nu(t,e,1,n)}})),Xu(e,1)}},wt=function(e){if(13===e.tag){var t=Ba(e,134217728);null!==t&&nu(t,e,134217728,eu()),Xu(e,134217728)}},Mt=function(e){if(13===e.tag){var t=tu(e),n=Ba(e,t);null!==n&&nu(n,e,t,eu()),Xu(e,t)}},St=function(){return xt},At=function(e,t){var n=xt;try{return xt=e,t()}finally{xt=n}},we=function(e,t,n){switch(t){case"input":if(Z(e,n),t=n.name,"radio"===n.type&&null!=t){for(n=e;n.parentNode;)n=n.parentNode;for(n=n.querySelectorAll("input[name="+JSON.stringify(""+t)+'][type="radio"]'),t=0;t<n.length;t++){var r=n[t];if(r!==e&&r.form===e.form){var i=_i(r);if(!i)throw Error(a(90));X(r),Z(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Te=uu,Be=cu;var tc={usingClientEntryPoint:!1,Events:[xi,bi,_i,Ce,Ee,uu]},nc={findFiberByHostInstance:yi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},rc={bundleType:nc.bundleType,version:nc.version,rendererPackageName:nc.rendererPackageName,rendererConfig:nc.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:b.ReactCurrentDispatcher,findHostInstanceByFiber:function(e){return null===(e=je(e))?null:e.stateNode},findFiberByHostInstance:nc.findFiberByHostInstance||function(){return null},findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.2.0-next-9e3b772b8-20220608"};if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__){var ic=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!ic.isDisabled&&ic.supportsFiber)try{it=ic.inject(rc),at=ic}catch(ce){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tc,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Qu(t))throw Error(a(200));return Gu(e,t,null,n)},t.createRoot=function(e,t){if(!Qu(e))throw Error(a(299));var n=!1,r="",i=Yu;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=Uu(e,1,!1,null,0,n,0,r,i),e[pi]=t.current,Hr(8===e.nodeType?e.parentNode:e),new Ku(t)},t.findDOMNode=function(e){if(null==e)return null;if(1===e.nodeType)return e;var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(a(188));throw e=Object.keys(e).join(","),Error(a(268,e))}return null===(e=je(t))?null:e.stateNode},t.flushSync=function(e){return cu(e)},t.hydrate=function(e,t,n){if(!Zu(t))throw Error(a(200));return ec(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Qu(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,s="",o=Yu;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(o=n.onRecoverableError)),t=Vu(t,null,e,1,null!=n?n:null,i,0,s,o),e[pi]=t.current,Hr(e),r)for(e=0;e<r.length;e++)i=(i=(n=r[e])._getVersion)(n._source),null==t.mutableSourceEagerHydrationData?t.mutableSourceEagerHydrationData=[n,i]:t.mutableSourceEagerHydrationData.push(n,i);return new qu(t)},t.render=function(e,t,n){if(!Zu(t))throw Error(a(200));return ec(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Zu(e))throw Error(a(40));return!!e._reactRootContainer&&(cu((function(){ec(null,null,e,!1,(function(){e._reactRootContainer=null,e[pi]=null}))})),!0)},t.unstable_batchedUpdates=uu,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zu(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return ec(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},745:(e,t,n)=>{"use strict";var r=n(3935);t.s=r.createRoot,r.hydrateRoot},3935:(e,t,n)=>{"use strict";!function e(){if("undefined"!=typeof __REACT_DEVTOOLS_GLOBAL_HOOK__&&"function"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE)try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(e)}catch(e){console.error(e)}}(),e.exports=n(4448)},6511:(e,t)=>{"use strict";t.ConcurrentRoot=1,t.ContinuousEventPriority=4,t.DefaultEventPriority=16,t.DiscreteEventPriority=1},7287:(e,t,n)=>{e.exports=function(e){var t={},r=n(7294),i=n(373),a=Object.assign;function s(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n<arguments.length;n++)t+="&args[]="+encodeURIComponent(arguments[n]);return"Minified React error #"+e+"; visit "+t+" for the full message or use the non-minified dev environment for full errors and additional helpful warnings."}var o=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED,l=Symbol.for("react.element"),u=Symbol.for("react.portal"),c=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),f=Symbol.for("react.provider"),p=Symbol.for("react.context"),m=Symbol.for("react.forward_ref"),g=Symbol.for("react.suspense"),v=Symbol.for("react.suspense_list"),y=Symbol.for("react.memo"),x=Symbol.for("react.lazy");Symbol.for("react.scope"),Symbol.for("react.debug_trace_mode");var b=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var _=Symbol.iterator;function w(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=_&&e[_]||e["@@iterator"])?e:null}function M(e){if(null==e)return null;if("function"==typeof e)return e.displayName||e.name||null;if("string"==typeof e)return e;switch(e){case c:return"Fragment";case u:return"Portal";case d:return"Profiler";case h:return"StrictMode";case g:return"Suspense";case v:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case p:return(e.displayName||"Context")+".Consumer";case f:return(e._context.displayName||"Context")+".Provider";case m:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case y:return null!==(t=e.displayName||null)?t:M(e.type)||"Memo";case x:t=e._payload,e=e._init;try{return M(e(t))}catch(e){}}return null}function S(e){var t=e.type;switch(e.tag){case 24:return"Cache";case 9:return(t.displayName||"Context")+".Consumer";case 10:return(t._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return e=(e=t.render).displayName||e.name||"",t.displayName||(""!==e?"ForwardRef("+e+")":"ForwardRef");case 7:return"Fragment";case 5:return t;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return M(t);case 8:return t===h?"StrictMode":"Mode";case 22:return"Offscreen";case 12:return"Profiler";case 21:return"Scope";case 13:return"Suspense";case 19:return"SuspenseList";case 25:return"TracingMarker";case 1:case 0:case 17:case 2:case 14:case 15:if("function"==typeof t)return t.displayName||t.name||null;if("string"==typeof t)return t}return null}function A(e){var t=e,n=e;if(e.alternate)for(;t.return;)t=t.return;else{e=t;do{0!=(4098&(t=e).flags)&&(n=t.return),e=t.return}while(e)}return 3===t.tag?n:null}function C(e){if(A(e)!==e)throw Error(s(188))}function E(e){var t=e.alternate;if(!t){if(null===(t=A(e)))throw Error(s(188));return t!==e?null:e}for(var n=e,r=t;;){var i=n.return;if(null===i)break;var a=i.alternate;if(null===a){if(null!==(r=i.return)){n=r;continue}break}if(i.child===a.child){for(a=i.child;a;){if(a===n)return C(i),e;if(a===r)return C(i),t;a=a.sibling}throw Error(s(188))}if(n.return!==r.return)n=i,r=a;else{for(var o=!1,l=i.child;l;){if(l===n){o=!0,n=i,r=a;break}if(l===r){o=!0,r=i,n=a;break}l=l.sibling}if(!o){for(l=a.child;l;){if(l===n){o=!0,n=a,r=i;break}if(l===r){o=!0,r=a,n=i;break}l=l.sibling}if(!o)throw Error(s(189))}}if(n.alternate!==r)throw Error(s(190))}if(3!==n.tag)throw Error(s(188));return n.stateNode.current===n?e:t}function T(e){return null!==(e=E(e))?B(e):null}function B(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=B(e);if(null!==t)return t;e=e.sibling}return null}function P(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){if(4!==e.tag){var t=P(e);if(null!==t)return t}e=e.sibling}return null}var R,L=Array.isArray,D=e.getPublicInstance,I=e.getRootHostContext,k=e.getChildHostContext,F=e.prepareForCommit,O=e.resetAfterCommit,N=e.createInstance,z=e.appendInitialChild,U=e.finalizeInitialChildren,G=e.prepareUpdate,H=e.shouldSetTextContent,V=e.createTextInstance,W=e.scheduleTimeout,j=e.cancelTimeout,J=e.noTimeout,X=e.isPrimaryRenderer,Y=e.supportsMutation,K=e.supportsPersistence,q=e.supportsHydration,Q=e.getInstanceFromNode,Z=e.preparePortalMount,$=e.getCurrentEventPriority,ee=e.detachDeletedInstance,te=e.supportsMicrotasks,ne=e.scheduleMicrotask,re=e.supportsTestSelectors,ie=e.findFiberRoot,ae=e.getBoundingRect,se=e.getTextContent,oe=e.isHiddenSubtree,le=e.matchAccessibilityRole,ue=e.setFocusIfFocusable,ce=e.setupIntersectionObserver,he=e.appendChild,de=e.appendChildToContainer,fe=e.commitTextUpdate,pe=e.commitMount,me=e.commitUpdate,ge=e.insertBefore,ve=e.insertInContainerBefore,ye=e.removeChild,xe=e.removeChildFromContainer,be=e.resetTextContent,_e=e.hideInstance,we=e.hideTextInstance,Me=e.unhideInstance,Se=e.unhideTextInstance,Ae=e.clearContainer,Ce=e.cloneInstance,Ee=e.createContainerChildSet,Te=e.appendChildToContainerChildSet,Be=e.finalizeContainerChildren,Pe=e.replaceContainerChildren,Re=e.cloneHiddenInstance,Le=e.cloneHiddenTextInstance,De=e.canHydrateInstance,Ie=e.canHydrateTextInstance,ke=e.canHydrateSuspenseInstance,Fe=e.isSuspenseInstancePending,Oe=e.isSuspenseInstanceFallback,Ne=e.registerSuspenseInstanceRetry,ze=e.getNextHydratableSibling,Ue=e.getFirstHydratableChild,Ge=e.getFirstHydratableChildWithinContainer,He=e.getFirstHydratableChildWithinSuspenseInstance,Ve=e.hydrateInstance,We=e.hydrateTextInstance,je=e.hydrateSuspenseInstance,Je=e.getNextHydratableInstanceAfterSuspenseInstance,Xe=e.commitHydratedContainer,Ye=e.commitHydratedSuspenseInstance,Ke=e.clearSuspenseBoundary,qe=e.clearSuspenseBoundaryFromContainer,Qe=e.shouldDeleteUnhydratedTailInstances,Ze=e.didNotMatchHydratedContainerTextInstance,$e=e.didNotMatchHydratedTextInstance;function et(e){if(void 0===R)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);R=t&&t[1]||""}return"\n"+R+e}var tt=!1;function nt(e,t){if(!e||tt)return"";tt=!0;var n=Error.prepareStackTrace;Error.prepareStackTrace=void 0;try{if(t)if(t=function(){throw Error()},Object.defineProperty(t.prototype,"props",{set:function(){throw Error()}}),"object"==typeof Reflect&&Reflect.construct){try{Reflect.construct(t,[])}catch(e){var r=e}Reflect.construct(e,[],t)}else{try{t.call()}catch(e){r=e}e.call(t.prototype)}else{try{throw Error()}catch(e){r=e}e()}}catch(t){if(t&&r&&"string"==typeof t.stack){for(var i=t.stack.split("\n"),a=r.stack.split("\n"),s=i.length-1,o=a.length-1;1<=s&&0<=o&&i[s]!==a[o];)o--;for(;1<=s&&0<=o;s--,o--)if(i[s]!==a[o]){if(1!==s||1!==o)do{if(s--,0>--o||i[s]!==a[o]){var l="\n"+i[s].replace(" at new "," at ");return e.displayName&&l.includes("<anonymous>")&&(l=l.replace("<anonymous>",e.displayName)),l}}while(1<=s&&0<=o);break}}}finally{tt=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?et(e):""}var rt=Object.prototype.hasOwnProperty,it=[],at=-1;function st(e){return{current:e}}function ot(e){0>at||(e.current=it[at],it[at]=null,at--)}function lt(e,t){at++,it[at]=e.current,e.current=t}var ut={},ct=st(ut),ht=st(!1),dt=ut;function ft(e,t){var n=e.type.contextTypes;if(!n)return ut;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var i,a={};for(i in n)a[i]=t[i];return r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=a),a}function pt(e){return null!=e.childContextTypes}function mt(){ot(ht),ot(ct)}function gt(e,t,n){if(ct.current!==ut)throw Error(s(168));lt(ct,t),lt(ht,n)}function vt(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,"function"!=typeof r.getChildContext)return n;for(var i in r=r.getChildContext())if(!(i in t))throw Error(s(108,S(e)||"Unknown",i));return a({},n,r)}function yt(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||ut,dt=ct.current,lt(ct,e),lt(ht,ht.current),!0}function xt(e,t,n){var r=e.stateNode;if(!r)throw Error(s(169));n?(e=vt(e,t,dt),r.__reactInternalMemoizedMergedChildContext=e,ot(ht),ot(ct),lt(ct,e)):ot(ht),lt(ht,n)}var bt=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(_t(e)/wt|0)|0},_t=Math.log,wt=Math.LN2,Mt=64,St=4194304;function At(e){switch(e&-e){case 1:return 1;case 2:return 2;case 4:return 4;case 8:return 8;case 16:return 16;case 32:return 32;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return 4194240&e;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return 130023424&e;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ct(e,t){var n=e.pendingLanes;if(0===n)return 0;var r=0,i=e.suspendedLanes,a=e.pingedLanes,s=268435455&n;if(0!==s){var o=s&~i;0!==o?r=At(o):0!=(a&=s)&&(r=At(a))}else 0!=(s=n&~i)?r=At(s):0!==a&&(r=At(a));if(0===r)return 0;if(0!==t&&t!==r&&0==(t&i)&&((i=r&-r)>=(a=t&-t)||16===i&&0!=(4194240&a)))return t;if(0!=(4&r)&&(r|=16&n),0!==(t=e.entangledLanes))for(e=e.entanglements,t&=r;0<t;)i=1<<(n=31-bt(t)),r|=e[n],t&=~i;return r}function Et(e,t){switch(e){case 1:case 2:case 4:return t+250;case 8:case 16:case 32:case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:return t+5e3;default:return-1}}function Tt(e){return 0!=(e=-1073741825&e.pendingLanes)?e:1073741824&e?1073741824:0}function Bt(e){for(var t=[],n=0;31>n;n++)t.push(e);return t}function Pt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-bt(t)]=n}function Rt(e,t){var n=e.entangledLanes|=t;for(e=e.entanglements;n;){var r=31-bt(n),i=1<<r;i&t|e[r]&t&&(e[r]|=t),n&=~i}}var Lt=0;function Dt(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var It=i.unstable_scheduleCallback,kt=i.unstable_cancelCallback,Ft=i.unstable_shouldYield,Ot=i.unstable_requestPaint,Nt=i.unstable_now,zt=i.unstable_ImmediatePriority,Ut=i.unstable_UserBlockingPriority,Gt=i.unstable_NormalPriority,Ht=i.unstable_IdlePriority,Vt=null,Wt=null,jt="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},Jt=null,Xt=!1,Yt=!1;function Kt(e){null===Jt?Jt=[e]:Jt.push(e)}function qt(){if(!Yt&&null!==Jt){Yt=!0;var e=0,t=Lt;try{var n=Jt;for(Lt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Jt=null,Xt=!1}catch(t){throw null!==Jt&&(Jt=Jt.slice(e+1)),It(zt,qt),t}finally{Lt=t,Yt=!1}}return null}var Qt=o.ReactCurrentBatchConfig;function Zt(e,t){if(jt(e,t))return!0;if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return!1;var n=Object.keys(e),r=Object.keys(t);if(n.length!==r.length)return!1;for(r=0;r<n.length;r++){var i=n[r];if(!rt.call(t,i)||!jt(e[i],t[i]))return!1}return!0}function $t(e){switch(e.tag){case 5:return et(e.type);case 16:return et("Lazy");case 13:return et("Suspense");case 19:return et("SuspenseList");case 0:case 2:case 15:return nt(e.type,!1);case 11:return nt(e.type.render,!1);case 1:return nt(e.type,!0);default:return""}}function en(e,t){if(e&&e.defaultProps){for(var n in t=a({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var tn=st(null),nn=null,rn=null,an=null;function sn(){an=rn=nn=null}function on(e,t,n){X?(lt(tn,t._currentValue),t._currentValue=n):(lt(tn,t._currentValue2),t._currentValue2=n)}function ln(e){var t=tn.current;ot(tn),X?e._currentValue=t:e._currentValue2=t}function un(e,t,n){for(;null!==e;){var r=e.alternate;if((e.childLanes&t)!==t?(e.childLanes|=t,null!==r&&(r.childLanes|=t)):null!==r&&(r.childLanes&t)!==t&&(r.childLanes|=t),e===n)break;e=e.return}}function cn(e,t){nn=e,an=rn=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(Fi=!0),e.firstContext=null)}function hn(e){var t=X?e._currentValue:e._currentValue2;if(an!==e)if(e={context:e,memoizedValue:t,next:null},null===rn){if(null===nn)throw Error(s(308));rn=e,nn.dependencies={lanes:0,firstContext:e}}else rn=rn.next=e;return t}var dn=null,fn=!1;function pn(e){e.updateQueue={baseState:e.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mn(e,t){e=e.updateQueue,t.updateQueue===e&&(t.updateQueue={baseState:e.baseState,firstBaseUpdate:e.firstBaseUpdate,lastBaseUpdate:e.lastBaseUpdate,shared:e.shared,effects:e.effects})}function gn(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function vn(e,t){var n=e.updateQueue;null!==n&&(n=n.shared,null!==Ya&&0!=(1&e.mode)&&0==(2&Xa)?(null===(e=n.interleaved)?(t.next=t,null===dn?dn=[n]:dn.push(n)):(t.next=e.next,e.next=t),n.interleaved=t):(null===(e=n.pending)?t.next=t:(t.next=e.next,e.next=t),n.pending=t))}function yn(e,t,n){if(null!==(t=t.updateQueue)&&(t=t.shared,0!=(4194240&n))){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Rt(e,n)}}function xn(e,t){var n=e.updateQueue,r=e.alternate;if(null!==r&&n===(r=r.updateQueue)){var i=null,a=null;if(null!==(n=n.firstBaseUpdate)){do{var s={eventTime:n.eventTime,lane:n.lane,tag:n.tag,payload:n.payload,callback:n.callback,next:null};null===a?i=a=s:a=a.next=s,n=n.next}while(null!==n);null===a?i=a=t:a=a.next=t}else i=a=t;return n={baseState:r.baseState,firstBaseUpdate:i,lastBaseUpdate:a,shared:r.shared,effects:r.effects},void(e.updateQueue=n)}null===(e=n.lastBaseUpdate)?n.firstBaseUpdate=t:e.next=t,n.lastBaseUpdate=t}function bn(e,t,n,r){var i=e.updateQueue;fn=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var u=l,c=u.next;u.next=null,null===o?s=c:o.next=c,o=u;var h=e.alternate;null!==h&&(l=(h=h.updateQueue).lastBaseUpdate)!==o&&(null===l?h.firstBaseUpdate=c:l.next=c,h.lastBaseUpdate=u)}if(null!==s){var d=i.baseState;for(o=0,h=c=u=null,l=s;;){var f=l.lane,p=l.eventTime;if((r&f)===f){null!==h&&(h=h.next={eventTime:p,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,g=l;switch(f=t,p=n,g.tag){case 1:if("function"==typeof(m=g.payload)){d=m.call(p,d,f);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(f="function"==typeof(m=g.payload)?m.call(p,d,f):m))break e;d=a({},d,f);break e;case 2:fn=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(f=i.effects)?i.effects=[l]:f.push(l))}else p={eventTime:p,lane:f,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===h?(c=h=p,u=d):h=h.next=p,o|=f;if(null===(l=l.next)){if(null===(l=i.shared.pending))break;l=(f=l).next,f.next=null,i.lastBaseUpdate=f,i.shared.pending=null}}if(null===h&&(u=d),i.baseState=u,i.firstBaseUpdate=c,i.lastBaseUpdate=h,null!==(t=i.shared.interleaved)){i=t;do{o|=i.lane,i=i.next}while(i!==t)}else null===s&&(i.shared.lanes=0);ts|=o,e.lanes=o,e.memoizedState=d}}function _n(e,t,n){if(e=t.effects,t.effects=null,null!==e)for(t=0;t<e.length;t++){var r=e[t],i=r.callback;if(null!==i){if(r.callback=null,r=n,"function"!=typeof i)throw Error(s(191,i));i.call(r)}}}var wn=(new r.Component).refs;function Mn(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:a({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Sn={isMounted:function(e){return!!(e=e._reactInternals)&&A(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=bs(),i=_s(e),a=gn(r,i);a.payload=t,null!=n&&(a.callback=n),vn(e,a),null!==(t=ws(e,i,r))&&yn(t,e,i)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=bs(),i=_s(e),a=gn(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),vn(e,a),null!==(t=ws(e,i,r))&&yn(t,e,i)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=bs(),r=_s(e),i=gn(n,r);i.tag=2,null!=t&&(i.callback=t),vn(e,i),null!==(t=ws(e,r,n))&&yn(t,e,r)}};function An(e,t,n,r,i,a,s){return"function"==typeof(e=e.stateNode).shouldComponentUpdate?e.shouldComponentUpdate(r,a,s):!(t.prototype&&t.prototype.isPureReactComponent&&Zt(n,r)&&Zt(i,a))}function Cn(e,t,n){var r=!1,i=ut,a=t.contextType;return"object"==typeof a&&null!==a?a=hn(a):(i=pt(t)?dt:ct.current,a=(r=null!=(r=t.contextTypes))?ft(e,i):ut),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Sn,e.stateNode=t,t._reactInternals=e,r&&((e=e.stateNode).__reactInternalMemoizedUnmaskedChildContext=i,e.__reactInternalMemoizedMaskedChildContext=a),t}function En(e,t,n,r){e=t.state,"function"==typeof t.componentWillReceiveProps&&t.componentWillReceiveProps(n,r),"function"==typeof t.UNSAFE_componentWillReceiveProps&&t.UNSAFE_componentWillReceiveProps(n,r),t.state!==e&&Sn.enqueueReplaceState(t,t.state,null)}function Tn(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=wn,pn(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=hn(a):(a=pt(t)?dt:ct.current,i.context=ft(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(Mn(e,t,a,n),i.state=e.memoizedState),"function"==typeof t.getDerivedStateFromProps||"function"==typeof i.getSnapshotBeforeUpdate||"function"!=typeof i.UNSAFE_componentWillMount&&"function"!=typeof i.componentWillMount||(t=i.state,"function"==typeof i.componentWillMount&&i.componentWillMount(),"function"==typeof i.UNSAFE_componentWillMount&&i.UNSAFE_componentWillMount(),t!==i.state&&Sn.enqueueReplaceState(i,i.state,null),bn(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}var Bn=[],Pn=0,Rn=null,Ln=0,Dn=[],In=0,kn=null,Fn=1,On="";function Nn(e,t){Bn[Pn++]=Ln,Bn[Pn++]=Rn,Rn=e,Ln=t}function zn(e,t,n){Dn[In++]=Fn,Dn[In++]=On,Dn[In++]=kn,kn=e;var r=Fn;e=On;var i=32-bt(r)-1;r&=~(1<<i),n+=1;var a=32-bt(t)+i;if(30<a){var s=i-i%5;a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Fn=1<<32-bt(t)+i|n<<i|r,On=a+e}else Fn=1<<a|n<<i|r,On=e}function Un(e){null!==e.return&&(Nn(e,1),zn(e,1,0))}function Gn(e){for(;e===Rn;)Rn=Bn[--Pn],Bn[Pn]=null,Ln=Bn[--Pn],Bn[Pn]=null;for(;e===kn;)kn=Dn[--In],Dn[In]=null,On=Dn[--In],Dn[In]=null,Fn=Dn[--In],Dn[In]=null}var Hn=null,Vn=null,Wn=!1,jn=!1,Jn=null;function Xn(e,t){var n=Qs(5,null,null,0);n.elementType="DELETED",n.stateNode=t,n.return=e,null===(t=e.deletions)?(e.deletions=[n],e.flags|=16):t.push(n)}function Yn(e,t){switch(e.tag){case 5:return null!==(t=De(t,e.type,e.pendingProps))&&(e.stateNode=t,Hn=e,Vn=Ue(t),!0);case 6:return null!==(t=Ie(t,e.pendingProps))&&(e.stateNode=t,Hn=e,Vn=null,!0);case 13:if(null!==(t=ke(t))){var n=null!==kn?{id:Fn,overflow:On}:null;return e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Qs(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Hn=e,Vn=null,!0}return!1;default:return!1}}function Kn(e){return 0!=(1&e.mode)&&0==(128&e.flags)}function qn(e){if(Wn){var t=Vn;if(t){var n=t;if(!Yn(e,t)){if(Kn(e))throw Error(s(418));t=ze(n);var r=Hn;t&&Yn(e,t)?Xn(r,n):(e.flags=-4097&e.flags|2,Wn=!1,Hn=e)}}else{if(Kn(e))throw Error(s(418));e.flags=-4097&e.flags|2,Wn=!1,Hn=e}}}function Qn(e){for(e=e.return;null!==e&&5!==e.tag&&3!==e.tag&&13!==e.tag;)e=e.return;Hn=e}function Zn(e){if(!q||e!==Hn)return!1;if(!Wn)return Qn(e),Wn=!0,!1;if(3!==e.tag&&(5!==e.tag||Qe(e.type)&&!H(e.type,e.memoizedProps))){var t=Vn;if(t){if(Kn(e)){for(e=Vn;e;)e=ze(e);throw Error(s(418))}for(;t;)Xn(e,t),t=ze(t)}}if(Qn(e),13===e.tag){if(!q)throw Error(s(316));if(!(e=null!==(e=e.memoizedState)?e.dehydrated:null))throw Error(s(317));Vn=Je(e)}else Vn=Hn?ze(e.stateNode):null;return!0}function $n(){q&&(Vn=Hn=null,jn=Wn=!1)}function er(e){null===Jn?Jn=[e]:Jn.push(e)}function tr(e,t,n){if(null!==(e=n.ref)&&"function"!=typeof e&&"object"!=typeof e){if(n._owner){if(n=n._owner){if(1!==n.tag)throw Error(s(309));var r=n.stateNode}if(!r)throw Error(s(147,e));var i=r,a=""+e;return null!==t&&null!==t.ref&&"function"==typeof t.ref&&t.ref._stringRef===a?t.ref:(t=function(e){var t=i.refs;t===wn&&(t=i.refs={}),null===e?delete t[a]:t[a]=e},t._stringRef=a,t)}if("string"!=typeof e)throw Error(s(284));if(!n._owner)throw Error(s(290,e))}return e}function nr(e,t){throw e=Object.prototype.toString.call(t),Error(s(31,"[object Object]"===e?"object with keys {"+Object.keys(t).join(", ")+"}":e))}function rr(e){return(0,e._init)(e._payload)}function ir(e){function t(t,n){if(e){var r=t.deletions;null===r?(t.deletions=[n],t.flags|=16):r.push(n)}}function n(n,r){if(!e)return null;for(;null!==r;)t(n,r),r=r.sibling;return null}function r(e,t){for(e=new Map;null!==t;)null!==t.key?e.set(t.key,t):e.set(t.index,t),t=t.sibling;return e}function i(e,t){return(e=$s(e,t)).index=0,e.sibling=null,e}function a(t,n,r){return t.index=r,e?null!==(r=t.alternate)?(r=r.index)<n?(t.flags|=2,n):r:(t.flags|=2,n):(t.flags|=1048576,n)}function o(t){return e&&null===t.alternate&&(t.flags|=2),t}function h(e,t,n,r){return null===t||6!==t.tag?((t=ro(n,e.mode,r)).return=e,t):((t=i(t,n)).return=e,t)}function d(e,t,n,r){var a=n.type;return a===c?p(e,t,n.props.children,r,n.key):null!==t&&(t.elementType===a||"object"==typeof a&&null!==a&&a.$$typeof===x&&rr(a)===t.type)?((r=i(t,n.props)).ref=tr(e,t,n),r.return=e,r):((r=eo(n.type,n.key,n.props,null,e.mode,r)).ref=tr(e,t,n),r.return=e,r)}function f(e,t,n,r){return null===t||4!==t.tag||t.stateNode.containerInfo!==n.containerInfo||t.stateNode.implementation!==n.implementation?((t=io(n,e.mode,r)).return=e,t):((t=i(t,n.children||[])).return=e,t)}function p(e,t,n,r,a){return null===t||7!==t.tag?((t=to(n,e.mode,r,a)).return=e,t):((t=i(t,n)).return=e,t)}function m(e,t,n){if("string"==typeof t&&""!==t||"number"==typeof t)return(t=ro(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case l:return(n=eo(t.type,t.key,t.props,null,e.mode,n)).ref=tr(e,null,t),n.return=e,n;case u:return(t=io(t,e.mode,n)).return=e,t;case x:return m(e,(0,t._init)(t._payload),n)}if(L(t)||w(t))return(t=to(t,e.mode,n,null)).return=e,t;nr(e,t)}return null}function g(e,t,n,r){var i=null!==t?t.key:null;if("string"==typeof n&&""!==n||"number"==typeof n)return null!==i?null:h(e,t,""+n,r);if("object"==typeof n&&null!==n){switch(n.$$typeof){case l:return n.key===i?d(e,t,n,r):null;case u:return n.key===i?f(e,t,n,r):null;case x:return g(e,t,(i=n._init)(n._payload),r)}if(L(n)||w(n))return null!==i?null:p(e,t,n,r,null);nr(e,n)}return null}function v(e,t,n,r,i){if("string"==typeof r&&""!==r||"number"==typeof r)return h(t,e=e.get(n)||null,""+r,i);if("object"==typeof r&&null!==r){switch(r.$$typeof){case l:return d(t,e=e.get(null===r.key?n:r.key)||null,r,i);case u:return f(t,e=e.get(null===r.key?n:r.key)||null,r,i);case x:return v(e,t,n,(0,r._init)(r._payload),i)}if(L(r)||w(r))return p(t,e=e.get(n)||null,r,i,null);nr(t,r)}return null}function y(i,s,o,l){for(var u=null,c=null,h=s,d=s=0,f=null;null!==h&&d<o.length;d++){h.index>d?(f=h,h=null):f=h.sibling;var p=g(i,h,o[d],l);if(null===p){null===h&&(h=f);break}e&&h&&null===p.alternate&&t(i,h),s=a(p,s,d),null===c?u=p:c.sibling=p,c=p,h=f}if(d===o.length)return n(i,h),Wn&&Nn(i,d),u;if(null===h){for(;d<o.length;d++)null!==(h=m(i,o[d],l))&&(s=a(h,s,d),null===c?u=h:c.sibling=h,c=h);return Wn&&Nn(i,d),u}for(h=r(i,h);d<o.length;d++)null!==(f=v(h,i,d,o[d],l))&&(e&&null!==f.alternate&&h.delete(null===f.key?d:f.key),s=a(f,s,d),null===c?u=f:c.sibling=f,c=f);return e&&h.forEach((function(e){return t(i,e)})),Wn&&Nn(i,d),u}function b(i,o,l,u){var c=w(l);if("function"!=typeof c)throw Error(s(150));if(null==(l=c.call(l)))throw Error(s(151));for(var h=c=null,d=o,f=o=0,p=null,y=l.next();null!==d&&!y.done;f++,y=l.next()){d.index>f?(p=d,d=null):p=d.sibling;var x=g(i,d,y.value,u);if(null===x){null===d&&(d=p);break}e&&d&&null===x.alternate&&t(i,d),o=a(x,o,f),null===h?c=x:h.sibling=x,h=x,d=p}if(y.done)return n(i,d),Wn&&Nn(i,f),c;if(null===d){for(;!y.done;f++,y=l.next())null!==(y=m(i,y.value,u))&&(o=a(y,o,f),null===h?c=y:h.sibling=y,h=y);return Wn&&Nn(i,f),c}for(d=r(i,d);!y.done;f++,y=l.next())null!==(y=v(d,i,f,y.value,u))&&(e&&null!==y.alternate&&d.delete(null===y.key?f:y.key),o=a(y,o,f),null===h?c=y:h.sibling=y,h=y);return e&&d.forEach((function(e){return t(i,e)})),Wn&&Nn(i,f),c}return function e(r,a,s,h){if("object"==typeof s&&null!==s&&s.type===c&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case l:e:{for(var d=s.key,f=a;null!==f;){if(f.key===d){if((d=s.type)===c){if(7===f.tag){n(r,f.sibling),(a=i(f,s.props.children)).return=r,r=a;break e}}else if(f.elementType===d||"object"==typeof d&&null!==d&&d.$$typeof===x&&rr(d)===f.type){n(r,f.sibling),(a=i(f,s.props)).ref=tr(r,f,s),a.return=r,r=a;break e}n(r,f);break}t(r,f),f=f.sibling}s.type===c?((a=to(s.props.children,r.mode,h,s.key)).return=r,r=a):((h=eo(s.type,s.key,s.props,null,r.mode,h)).ref=tr(r,a,s),h.return=r,r=h)}return o(r);case u:e:{for(f=s.key;null!==a;){if(a.key===f){if(4===a.tag&&a.stateNode.containerInfo===s.containerInfo&&a.stateNode.implementation===s.implementation){n(r,a.sibling),(a=i(a,s.children||[])).return=r,r=a;break e}n(r,a);break}t(r,a),a=a.sibling}(a=io(s,r.mode,h)).return=r,r=a}return o(r);case x:return e(r,a,(f=s._init)(s._payload),h)}if(L(s))return y(r,a,s,h);if(w(s))return b(r,a,s,h);nr(r,s)}return"string"==typeof s&&""!==s||"number"==typeof s?(s=""+s,null!==a&&6===a.tag?(n(r,a.sibling),(a=i(a,s)).return=r,r=a):(n(r,a),(a=ro(s,r.mode,h)).return=r,r=a),o(r)):n(r,a)}}var ar=ir(!0),sr=ir(!1),or={},lr=st(or),ur=st(or),cr=st(or);function hr(e){if(e===or)throw Error(s(174));return e}function dr(e,t){lt(cr,t),lt(ur,e),lt(lr,or),e=I(t),ot(lr),lt(lr,e)}function fr(){ot(lr),ot(ur),ot(cr)}function pr(e){var t=hr(cr.current),n=hr(lr.current);n!==(t=k(n,e.type,t))&&(lt(ur,e),lt(lr,t))}function mr(e){ur.current===e&&(ot(lr),ot(ur))}var gr=st(0);function vr(e){for(var t=e;null!==t;){if(13===t.tag){var n=t.memoizedState;if(null!==n&&(null===(n=n.dehydrated)||Fe(n)||Oe(n)))return t}else if(19===t.tag&&void 0!==t.memoizedProps.revealOrder){if(0!=(128&t.flags))return t}else if(null!==t.child){t.child.return=t,t=t.child;continue}if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var yr=[];function xr(){for(var e=0;e<yr.length;e++){var t=yr[e];X?t._workInProgressVersionPrimary=null:t._workInProgressVersionSecondary=null}yr.length=0}var br=o.ReactCurrentDispatcher,_r=o.ReactCurrentBatchConfig,wr=0,Mr=null,Sr=null,Ar=null,Cr=!1,Er=!1,Tr=0,Br=0;function Pr(){throw Error(s(321))}function Rr(e,t){if(null===t)return!1;for(var n=0;n<t.length&&n<e.length;n++)if(!jt(e[n],t[n]))return!1;return!0}function Lr(e,t,n,r,i,a){if(wr=a,Mr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,br.current=null===e||null===e.memoizedState?pi:mi,e=n(r,i),Er){a=0;do{if(Er=!1,Tr=0,25<=a)throw Error(s(301));a+=1,Ar=Sr=null,t.updateQueue=null,br.current=gi,e=n(r,i)}while(Er)}if(br.current=fi,t=null!==Sr&&null!==Sr.next,wr=0,Ar=Sr=Mr=null,Cr=!1,t)throw Error(s(300));return e}function Dr(){var e=0!==Tr;return Tr=0,e}function Ir(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Ar?Mr.memoizedState=Ar=e:Ar=Ar.next=e,Ar}function kr(){if(null===Sr){var e=Mr.alternate;e=null!==e?e.memoizedState:null}else e=Sr.next;var t=null===Ar?Mr.memoizedState:Ar.next;if(null!==t)Ar=t,Sr=e;else{if(null===e)throw Error(s(310));e={memoizedState:(Sr=e).memoizedState,baseState:Sr.baseState,baseQueue:Sr.baseQueue,queue:Sr.queue,next:null},null===Ar?Mr.memoizedState=Ar=e:Ar=Ar.next=e}return Ar}function Fr(e,t){return"function"==typeof t?t(e):t}function Or(e){var t=kr(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=Sr,i=r.baseQueue,a=n.pending;if(null!==a){if(null!==i){var o=i.next;i.next=a.next,a.next=o}r.baseQueue=i=a,n.pending=null}if(null!==i){a=i.next,r=r.baseState;var l=o=null,u=null,c=a;do{var h=c.lane;if((wr&h)===h)null!==u&&(u=u.next={lane:0,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null}),r=c.hasEagerState?c.eagerState:e(r,c.action);else{var d={lane:h,action:c.action,hasEagerState:c.hasEagerState,eagerState:c.eagerState,next:null};null===u?(l=u=d,o=r):u=u.next=d,Mr.lanes|=h,ts|=h}c=c.next}while(null!==c&&c!==a);null===u?o=r:u.next=l,jt(r,t.memoizedState)||(Fi=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=u,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{a=i.lane,Mr.lanes|=a,ts|=a,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Nr(e){var t=kr(),n=t.queue;if(null===n)throw Error(s(311));n.lastRenderedReducer=e;var r=n.dispatch,i=n.pending,a=t.memoizedState;if(null!==i){n.pending=null;var o=i=i.next;do{a=e(a,o.action),o=o.next}while(o!==i);jt(a,t.memoizedState)||(Fi=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function zr(){}function Ur(e,t){var n=Mr,r=kr(),i=t(),a=!jt(r.memoizedState,i);if(a&&(r.memoizedState=i,Fi=!0),r=r.queue,Qr(Vr.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==Ar&&1&Ar.memoizedState.tag){if(n.flags|=2048,Jr(9,Hr.bind(null,n,r,i,t),void 0,null),null===Ya)throw Error(s(349));0!=(30&wr)||Gr(n,t,i)}return i}function Gr(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=Mr.updateQueue)?(t={lastEffect:null,stores:null},Mr.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Hr(e,t,n,r){t.value=n,t.getSnapshot=r,Wr(t)&&ws(e,1,-1)}function Vr(e,t,n){return n((function(){Wr(t)&&ws(e,1,-1)}))}function Wr(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!jt(e,n)}catch(e){return!0}}function jr(e){var t=Ir();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Fr,lastRenderedState:e},t.queue=e,e=e.dispatch=li.bind(null,Mr,e),[t.memoizedState,e]}function Jr(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=Mr.updateQueue)?(t={lastEffect:null,stores:null},Mr.updateQueue=t,t.lastEffect=e.next=e):null===(n=t.lastEffect)?t.lastEffect=e.next=e:(r=n.next,n.next=e,e.next=r,t.lastEffect=e),e}function Xr(){return kr().memoizedState}function Yr(e,t,n,r){var i=Ir();Mr.flags|=e,i.memoizedState=Jr(1|t,n,void 0,void 0===r?null:r)}function Kr(e,t,n,r){var i=kr();r=void 0===r?null:r;var a=void 0;if(null!==Sr){var s=Sr.memoizedState;if(a=s.destroy,null!==r&&Rr(r,s.deps))return void(i.memoizedState=Jr(t,n,a,r))}Mr.flags|=e,i.memoizedState=Jr(1|t,n,a,r)}function qr(e,t){return Yr(8390656,8,e,t)}function Qr(e,t){return Kr(2048,8,e,t)}function Zr(e,t){return Kr(4,2,e,t)}function $r(e,t){return Kr(4,4,e,t)}function ei(e,t){return"function"==typeof t?(e=e(),t(e),function(){t(null)}):null!=t?(e=e(),t.current=e,function(){t.current=null}):void 0}function ti(e,t,n){return n=null!=n?n.concat([e]):null,Kr(4,4,ei.bind(null,t,e),n)}function ni(){}function ri(e,t){var n=kr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Rr(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ii(e,t){var n=kr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Rr(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function ai(e,t){var n=Lt;Lt=0!==n&&4>n?n:4,e(!0);var r=_r.transition;_r.transition={};try{e(!1),t()}finally{Lt=n,_r.transition=r}}function si(){return kr().memoizedState}function oi(e,t,n){var r=_s(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ui(e)?ci(t,n):(hi(e,t,n),null!==(e=ws(e,r,n=bs()))&&di(e,t,r))}function li(e,t,n){var r=_s(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ui(e))ci(t,i);else{hi(e,t,i);var a=e.alternate;if(0===e.lanes&&(null===a||0===a.lanes)&&null!==(a=t.lastRenderedReducer))try{var s=t.lastRenderedState,o=a(s,n);if(i.hasEagerState=!0,i.eagerState=o,jt(o,s))return}catch(e){}null!==(e=ws(e,r,n=bs()))&&di(e,t,r)}}function ui(e){var t=e.alternate;return e===Mr||null!==t&&t===Mr}function ci(e,t){Er=Cr=!0;var n=e.pending;null===n?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function hi(e,t,n){null!==Ya&&0!=(1&e.mode)&&0==(2&Xa)?(null===(e=t.interleaved)?(n.next=n,null===dn?dn=[t]:dn.push(t)):(n.next=e.next,e.next=n),t.interleaved=n):(null===(e=t.pending)?n.next=n:(n.next=e.next,e.next=n),t.pending=n)}function di(e,t,n){if(0!=(4194240&n)){var r=t.lanes;n|=r&=e.pendingLanes,t.lanes=n,Rt(e,n)}}var fi={readContext:hn,useCallback:Pr,useContext:Pr,useEffect:Pr,useImperativeHandle:Pr,useInsertionEffect:Pr,useLayoutEffect:Pr,useMemo:Pr,useReducer:Pr,useRef:Pr,useState:Pr,useDebugValue:Pr,useDeferredValue:Pr,useTransition:Pr,useMutableSource:Pr,useSyncExternalStore:Pr,useId:Pr,unstable_isNewReconciler:!1},pi={readContext:hn,useCallback:function(e,t){return Ir().memoizedState=[e,void 0===t?null:t],e},useContext:hn,useEffect:qr,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,Yr(4194308,4,ei.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Yr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Yr(4,2,e,t)},useMemo:function(e,t){var n=Ir();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Ir();return t=void 0!==n?n(t):t,r.memoizedState=r.baseState=t,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:e,lastRenderedState:t},r.queue=e,e=e.dispatch=oi.bind(null,Mr,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Ir().memoizedState=e},useState:jr,useDebugValue:ni,useDeferredValue:function(e){var t=jr(e),n=t[0],r=t[1];return qr((function(){var t=_r.transition;_r.transition={};try{r(e)}finally{_r.transition=t}}),[e]),n},useTransition:function(){var e=jr(!1),t=e[0];return e=ai.bind(null,e[1]),Ir().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Mr,i=Ir();if(Wn){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===Ya)throw Error(s(349));0!=(30&wr)||Gr(r,t,n)}i.memoizedState=n;var a={value:n,getSnapshot:t};return i.queue=a,qr(Vr.bind(null,r,a,e),[e]),r.flags|=2048,Jr(9,Hr.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Ir(),t=Ya.identifierPrefix;if(Wn){var n=On;t=":"+t+"R"+(n=(Fn&~(1<<32-bt(Fn)-1)).toString(32)+n),0<(n=Tr++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Br++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},mi={readContext:hn,useCallback:ri,useContext:hn,useEffect:Qr,useImperativeHandle:ti,useInsertionEffect:Zr,useLayoutEffect:$r,useMemo:ii,useReducer:Or,useRef:Xr,useState:function(){return Or(Fr)},useDebugValue:ni,useDeferredValue:function(e){var t=Or(Fr),n=t[0],r=t[1];return Qr((function(){var t=_r.transition;_r.transition={};try{r(e)}finally{_r.transition=t}}),[e]),n},useTransition:function(){return[Or(Fr)[0],kr().memoizedState]},useMutableSource:zr,useSyncExternalStore:Ur,useId:si,unstable_isNewReconciler:!1},gi={readContext:hn,useCallback:ri,useContext:hn,useEffect:Qr,useImperativeHandle:ti,useInsertionEffect:Zr,useLayoutEffect:$r,useMemo:ii,useReducer:Nr,useRef:Xr,useState:function(){return Nr(Fr)},useDebugValue:ni,useDeferredValue:function(e){var t=Nr(Fr),n=t[0],r=t[1];return Qr((function(){var t=_r.transition;_r.transition={};try{r(e)}finally{_r.transition=t}}),[e]),n},useTransition:function(){return[Nr(Fr)[0],kr().memoizedState]},useMutableSource:zr,useSyncExternalStore:Ur,useId:si,unstable_isNewReconciler:!1};function vi(e,t){try{var n="",r=t;do{n+=$t(r),r=r.return}while(r);var i=n}catch(e){i="\nError generating stack: "+e.message+"\n"+e.stack}return{value:e,source:t,stack:i}}function yi(e,t){try{console.error(t.value)}catch(e){setTimeout((function(){throw e}))}}var xi,bi,_i,wi,Mi="function"==typeof WeakMap?WeakMap:Map;function Si(e,t,n){(n=gn(-1,n)).tag=3,n.payload={element:null};var r=t.value;return n.callback=function(){cs||(cs=!0,hs=r),yi(0,t)},n}function Ai(e,t,n){(n=gn(-1,n)).tag=3;var r=e.type.getDerivedStateFromError;if("function"==typeof r){var i=t.value;n.payload=function(){return r(i)},n.callback=function(){yi(0,t)}}var a=e.stateNode;return null!==a&&"function"==typeof a.componentDidCatch&&(n.callback=function(){yi(0,t),"function"!=typeof r&&(null===ds?ds=new Set([this]):ds.add(this));var e=t.stack;this.componentDidCatch(t.value,{componentStack:null!==e?e:""})}),n}function Ci(e,t,n){var r=e.pingCache;if(null===r){r=e.pingCache=new Mi;var i=new Set;r.set(t,i)}else void 0===(i=r.get(t))&&(i=new Set,r.set(t,i));i.has(n)||(i.add(n),e=js.bind(null,e,t,n),t.then(e,e))}function Ei(e){do{var t;if((t=13===e.tag)&&(t=null===(t=e.memoizedState)||null!==t.dehydrated),t)return e;e=e.return}while(null!==e);return null}function Ti(e,t,n,r,i){return 0==(1&e.mode)?(e===t?e.flags|=65536:(e.flags|=128,n.flags|=131072,n.flags&=-52805,1===n.tag&&(null===n.alternate?n.tag=17:((t=gn(-1,1)).tag=2,vn(n,t))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}function Bi(e){e.flags|=4}function Pi(e,t){if(null!==e&&e.child===t.child)return!0;if(0!=(16&t.flags))return!1;for(e=t.child;null!==e;){if(0!=(12854&e.flags)||0!=(12854&e.subtreeFlags))return!1;e=e.sibling}return!0}if(Y)xi=function(e,t){for(var n=t.child;null!==n;){if(5===n.tag||6===n.tag)z(e,n.stateNode);else if(4!==n.tag&&null!==n.child){n.child.return=n,n=n.child;continue}if(n===t)break;for(;null===n.sibling;){if(null===n.return||n.return===t)return;n=n.return}n.sibling.return=n.return,n=n.sibling}},bi=function(){},_i=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var a=t.stateNode,s=hr(lr.current);n=G(a,n,e,r,i,s),(t.updateQueue=n)&&Bi(t)}},wi=function(e,t,n,r){n!==r&&Bi(t)};else if(K){xi=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=Re(a,i.type,i.memoizedProps,i)),z(e,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=Le(a,i.memoizedProps,i)),z(e,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),xi(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};var Ri=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=Re(a,i.type,i.memoizedProps,i)),Te(e,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=Le(a,i.memoizedProps,i)),Te(e,a);else if(4!==i.tag)if(22===i.tag&&null!==i.memoizedState)null!==(a=i.child)&&(a.return=i),Ri(e,i,!0,!0);else if(null!==i.child){i.child.return=i,i=i.child;continue}if(i===t)break;for(;null===i.sibling;){if(null===i.return||i.return===t)return;i=i.return}i.sibling.return=i.return,i=i.sibling}};bi=function(e,t){var n=t.stateNode;if(!Pi(e,t)){e=n.containerInfo;var r=Ee(e);Ri(r,t,!1,!1),n.pendingChildren=r,Bi(t),Be(e,r)}},_i=function(e,t,n,r,i){var a=e.stateNode,s=e.memoizedProps;if((e=Pi(e,t))&&s===r)t.stateNode=a;else{var o=t.stateNode,l=hr(lr.current),u=null;s!==r&&(u=G(o,n,s,r,i,l)),e&&null===u?t.stateNode=a:(a=Ce(a,u,n,s,r,t,e,o),U(a,n,r,i,l)&&Bi(t),t.stateNode=a,e?Bi(t):xi(a,t,!1,!1))}},wi=function(e,t,n,r){n!==r?(e=hr(cr.current),n=hr(lr.current),t.stateNode=V(r,e,n,t),Bi(t)):t.stateNode=e.stateNode}}else bi=function(){},_i=function(){},wi=function(){};function Li(e,t){if(!Wn)switch(e.tailMode){case"hidden":t=e.tail;for(var n=null;null!==t;)null!==t.alternate&&(n=t),t=t.sibling;null===n?e.tail=null:n.sibling=null;break;case"collapsed":n=e.tail;for(var r=null;null!==n;)null!==n.alternate&&(r=n),n=n.sibling;null===r?t||null===e.tail?e.tail=null:e.tail.sibling=null:r.sibling=null}}function Di(e){var t=null!==e.alternate&&e.alternate.child===e.child,n=0,r=0;if(t)for(var i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=14680064&i.subtreeFlags,r|=14680064&i.flags,i.return=e,i=i.sibling;else for(i=e.child;null!==i;)n|=i.lanes|i.childLanes,r|=i.subtreeFlags,r|=i.flags,i.return=e,i=i.sibling;return e.subtreeFlags|=r,e.childLanes=n,t}function Ii(e,t,n){var r=t.pendingProps;switch(Gn(t),t.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Di(t),null;case 1:case 17:return pt(t.type)&&mt(),Di(t),null;case 3:return r=t.stateNode,fr(),ot(ht),ot(ct),xr(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Zn(t)?Bi(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==Jn&&(Es(Jn),Jn=null))),bi(e,t),Di(t),null;case 5:mr(t),n=hr(cr.current);var i=t.type;if(null!==e&&null!=t.stateNode)_i(e,t,i,r,n),e.ref!==t.ref&&(t.flags|=512,t.flags|=2097152);else{if(!r){if(null===t.stateNode)throw Error(s(166));return Di(t),null}if(e=hr(lr.current),Zn(t)){if(!q)throw Error(s(175));e=Ve(t.stateNode,t.type,t.memoizedProps,n,e,t,!jn),t.updateQueue=e,null!==e&&Bi(t)}else{var a=N(i,r,n,e,t);xi(a,t,!1,!1),t.stateNode=a,U(a,i,r,n,e)&&Bi(t)}null!==t.ref&&(t.flags|=512,t.flags|=2097152)}return Di(t),null;case 6:if(e&&null!=t.stateNode)wi(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(s(166));if(e=hr(cr.current),n=hr(lr.current),Zn(t)){if(!q)throw Error(s(176));if(e=t.stateNode,r=t.memoizedProps,(n=We(e,r,t,!jn))&&null!==(i=Hn))switch(a=0!=(1&i.mode),i.tag){case 3:Ze(i.stateNode.containerInfo,e,r,a);break;case 5:$e(i.type,i.memoizedProps,i.stateNode,e,r,a)}n&&Bi(t)}else t.stateNode=V(r,e,n,t)}return Di(t),null;case 13:if(ot(gr),r=t.memoizedState,Wn&&null!==Vn&&0!=(1&t.mode)&&0==(128&t.flags)){for(e=Vn;e;)e=ze(e);return $n(),t.flags|=98560,t}if(null!==r&&null!==r.dehydrated){if(r=Zn(t),null===e){if(!r)throw Error(s(318));if(!q)throw Error(s(344));if(!(e=null!==(e=t.memoizedState)?e.dehydrated:null))throw Error(s(317));je(e,t)}else $n(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;return Di(t),null}return null!==Jn&&(Es(Jn),Jn=null),0!=(128&t.flags)?(t.lanes=n,t):(r=null!==r,n=!1,null===e?Zn(t):n=null!==e.memoizedState,r&&!n&&(t.child.flags|=8192,0!=(1&t.mode)&&(null===e||0!=(1&gr.current)?0===$a&&($a=3):ks())),null!==t.updateQueue&&(t.flags|=4),Di(t),null);case 4:return fr(),bi(e,t),null===e&&Z(t.stateNode.containerInfo),Di(t),null;case 10:return ln(t.type._context),Di(t),null;case 19:if(ot(gr),null===(i=t.memoizedState))return Di(t),null;if(r=0!=(128&t.flags),null===(a=i.rendering))if(r)Li(i,!1);else{if(0!==$a||null!==e&&0!=(128&e.flags))for(e=t.child;null!==e;){if(null!==(a=vr(e))){for(t.flags|=128,Li(i,!1),null!==(e=a.updateQueue)&&(t.updateQueue=e,t.flags|=4),t.subtreeFlags=0,e=n,r=t.child;null!==r;)i=e,(n=r).flags&=14680066,null===(a=n.alternate)?(n.childLanes=0,n.lanes=i,n.child=null,n.subtreeFlags=0,n.memoizedProps=null,n.memoizedState=null,n.updateQueue=null,n.dependencies=null,n.stateNode=null):(n.childLanes=a.childLanes,n.lanes=a.lanes,n.child=a.child,n.subtreeFlags=0,n.deletions=null,n.memoizedProps=a.memoizedProps,n.memoizedState=a.memoizedState,n.updateQueue=a.updateQueue,n.type=a.type,i=a.dependencies,n.dependencies=null===i?null:{lanes:i.lanes,firstContext:i.firstContext}),r=r.sibling;return lt(gr,1&gr.current|2),t.child}e=e.sibling}null!==i.tail&&Nt()>os&&(t.flags|=128,r=!0,Li(i,!1),t.lanes=4194304)}else{if(!r)if(null!==(e=vr(a))){if(t.flags|=128,r=!0,null!==(e=e.updateQueue)&&(t.updateQueue=e,t.flags|=4),Li(i,!0),null===i.tail&&"hidden"===i.tailMode&&!a.alternate&&!Wn)return Di(t),null}else 2*Nt()-i.renderingStartTime>os&&1073741824!==n&&(t.flags|=128,r=!0,Li(i,!1),t.lanes=4194304);i.isBackwards?(a.sibling=t.child,t.child=a):(null!==(e=i.last)?e.sibling=a:t.child=a,i.last=a)}return null!==i.tail?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Nt(),t.sibling=null,e=gr.current,lt(gr,r?1&e|2:1&e),t):(Di(t),null);case 22:case 23:return Rs(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Qa)&&(Di(t),Y&&6&t.subtreeFlags&&(t.flags|=8192)):Di(t),null;case 24:case 25:return null}throw Error(s(156,t.tag))}var ki=o.ReactCurrentOwner,Fi=!1;function Oi(e,t,n,r){t.child=null===e?sr(t,null,n,r):ar(t,e.child,n,r)}function Ni(e,t,n,r,i){n=n.render;var a=t.ref;return cn(t,i),r=Lr(e,t,n,r,a,i),n=Dr(),null===e||Fi?(Wn&&n&&Un(t),t.flags|=1,Oi(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ia(e,t,i))}function zi(e,t,n,r,i){if(null===e){var a=n.type;return"function"!=typeof a||Zs(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=eo(n.type,null,r,t,t.mode,i)).ref=t.ref,e.return=t,t.child=e):(t.tag=15,t.type=a,Ui(e,t,a,r,i))}if(a=e.child,0==(e.lanes&i)){var s=a.memoizedProps;if((n=null!==(n=n.compare)?n:Zt)(s,r)&&e.ref===t.ref)return ia(e,t,i)}return t.flags|=1,(e=$s(a,r)).ref=t.ref,e.return=t,t.child=e}function Ui(e,t,n,r,i){if(null!==e&&Zt(e.memoizedProps,r)&&e.ref===t.ref){if(Fi=!1,0==(e.lanes&i))return t.lanes=e.lanes,ia(e,t,i);0!=(131072&e.flags)&&(Fi=!0)}return Vi(e,t,n,r,i)}function Gi(e,t,n){var r=t.pendingProps,i=r.children,a=null!==e?e.memoizedState:null;if("hidden"===r.mode)if(0==(1&t.mode))t.memoizedState={baseLanes:0,cachePool:null},lt(Za,Qa),Qa|=n;else{if(0==(1073741824&n))return e=null!==a?a.baseLanes|n:n,t.lanes=t.childLanes=1073741824,t.memoizedState={baseLanes:e,cachePool:null},t.updateQueue=null,lt(Za,Qa),Qa|=e,null;t.memoizedState={baseLanes:0,cachePool:null},r=null!==a?a.baseLanes:n,lt(Za,Qa),Qa|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,lt(Za,Qa),Qa|=r;return Oi(e,t,i,n),t.child}function Hi(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function Vi(e,t,n,r,i){var a=pt(n)?dt:ct.current;return a=ft(t,a),cn(t,i),n=Lr(e,t,n,r,a,i),r=Dr(),null===e||Fi?(Wn&&r&&Un(t),t.flags|=1,Oi(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ia(e,t,i))}function Wi(e,t,n,r,i){if(pt(n)){var a=!0;yt(t)}else a=!1;if(cn(t,i),null===t.stateNode)null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),Cn(t,n,r),Tn(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,o=t.memoizedProps;s.props=o;var l=s.context,u=n.contextType;u="object"==typeof u&&null!==u?hn(u):ft(t,u=pt(n)?dt:ct.current);var c=n.getDerivedStateFromProps,h="function"==typeof c||"function"==typeof s.getSnapshotBeforeUpdate;h||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(o!==r||l!==u)&&En(t,s,r,u),fn=!1;var d=t.memoizedState;s.state=d,bn(t,r,s,i),l=t.memoizedState,o!==r||d!==l||ht.current||fn?("function"==typeof c&&(Mn(t,n,c,r),l=t.memoizedState),(o=fn||An(t,n,o,r,d,l,u))?(h||"function"!=typeof s.UNSAFE_componentWillMount&&"function"!=typeof s.componentWillMount||("function"==typeof s.componentWillMount&&s.componentWillMount(),"function"==typeof s.UNSAFE_componentWillMount&&s.UNSAFE_componentWillMount()),"function"==typeof s.componentDidMount&&(t.flags|=4194308)):("function"==typeof s.componentDidMount&&(t.flags|=4194308),t.memoizedProps=r,t.memoizedState=l),s.props=r,s.state=l,s.context=u,r=o):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,mn(e,t),o=t.memoizedProps,u=t.type===t.elementType?o:en(t.type,o),s.props=u,h=t.pendingProps,d=s.context,l="object"==typeof(l=n.contextType)&&null!==l?hn(l):ft(t,l=pt(n)?dt:ct.current);var f=n.getDerivedStateFromProps;(c="function"==typeof f||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(o!==h||d!==l)&&En(t,s,r,l),fn=!1,d=t.memoizedState,s.state=d,bn(t,r,s,i);var p=t.memoizedState;o!==h||d!==p||ht.current||fn?("function"==typeof f&&(Mn(t,n,f,r),p=t.memoizedState),(u=fn||An(t,n,u,r,d,p,l)||!1)?(c||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,p,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,p,l)),"function"==typeof s.componentDidUpdate&&(t.flags|=4),"function"==typeof s.getSnapshotBeforeUpdate&&(t.flags|=1024)):("function"!=typeof s.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),t.memoizedProps=r,t.memoizedState=p),s.props=r,s.state=p,s.context=l,r=u):("function"!=typeof s.componentDidUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=4),"function"!=typeof s.getSnapshotBeforeUpdate||o===e.memoizedProps&&d===e.memoizedState||(t.flags|=1024),r=!1)}return ji(e,t,n,r,a,i)}function ji(e,t,n,r,i,a){Hi(e,t);var s=0!=(128&t.flags);if(!r&&!s)return i&&xt(t,n,!1),ia(e,t,a);r=t.stateNode,ki.current=t;var o=s&&"function"!=typeof n.getDerivedStateFromError?null:r.render();return t.flags|=1,null!==e&&s?(t.child=ar(t,e.child,null,a),t.child=ar(t,null,o,a)):Oi(e,t,o,a),t.memoizedState=r.state,i&&xt(t,n,!0),t.child}function Ji(e){var t=e.stateNode;t.pendingContext?gt(0,t.pendingContext,t.pendingContext!==t.context):t.context&>(0,t.context,!1),dr(e,t.containerInfo)}function Xi(e,t,n,r,i){return $n(),er(i),t.flags|=256,Oi(e,t,n,r),t.child}var Yi={dehydrated:null,treeContext:null,retryLane:0};function Ki(e){return{baseLanes:e,cachePool:null}}function qi(e,t,n){var r,i=t.pendingProps,a=gr.current,o=!1,l=0!=(128&t.flags);if((r=l)||(r=(null===e||null!==e.memoizedState)&&0!=(2&a)),r?(o=!0,t.flags&=-129):null!==e&&null===e.memoizedState||(a|=1),lt(gr,1&a),null===e)return qn(t),null!==(e=t.memoizedState)&&null!==(e=e.dehydrated)?(0==(1&t.mode)?t.lanes=1:Oe(e)?t.lanes=8:t.lanes=1073741824,null):(a=i.children,e=i.fallback,o?(i=t.mode,o=t.child,a={mode:"hidden",children:a},0==(1&i)&&null!==o?(o.childLanes=0,o.pendingProps=a):o=no(a,i,0,null),e=to(e,i,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Ki(n),t.memoizedState=Yi,e):Qi(t,a));if(null!==(a=e.memoizedState)){if(null!==(r=a.dehydrated)){if(l)return 256&t.flags?(t.flags&=-257,ea(e,t,n,Error(s(422)))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(o=i.fallback,a=t.mode,i=no({mode:"visible",children:i.children},a,0,null),(o=to(o,a,n,null)).flags|=2,i.return=t,o.return=t,i.sibling=o,t.child=i,0!=(1&t.mode)&&ar(t,e.child,null,n),t.child.memoizedState=Ki(n),t.memoizedState=Yi,o);if(0==(1&t.mode))t=ea(e,t,n,null);else if(Oe(r))t=ea(e,t,n,Error(s(419)));else if(i=0!=(n&e.childLanes),Fi||i){if(null!==(i=Ya)){switch(n&-n){case 4:o=2;break;case 16:o=8;break;case 64:case 128:case 256:case 512:case 1024:case 2048:case 4096:case 8192:case 16384:case 32768:case 65536:case 131072:case 262144:case 524288:case 1048576:case 2097152:case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:o=32;break;case 536870912:o=268435456;break;default:o=0}0!==(i=0!=(o&(i.suspendedLanes|n))?0:o)&&i!==a.retryLane&&(a.retryLane=i,ws(e,i,-1))}ks(),t=ea(e,t,n,Error(s(421)))}else Fe(r)?(t.flags|=128,t.child=e.child,t=Xs.bind(null,e),Ne(r,t),t=null):(n=a.treeContext,q&&(Vn=He(r),Hn=t,Wn=!0,Jn=null,jn=!1,null!==n&&(Dn[In++]=Fn,Dn[In++]=On,Dn[In++]=kn,Fn=n.id,On=n.overflow,kn=t)),(t=Qi(t,t.pendingProps.children)).flags|=4096);return t}return o?(i=$i(e,t,i.children,i.fallback,n),o=t.child,a=e.child.memoizedState,o.memoizedState=null===a?Ki(n):{baseLanes:a.baseLanes|n,cachePool:null},o.childLanes=e.childLanes&~n,t.memoizedState=Yi,i):(n=Zi(e,t,i.children,n),t.memoizedState=null,n)}return o?(i=$i(e,t,i.children,i.fallback,n),o=t.child,a=e.child.memoizedState,o.memoizedState=null===a?Ki(n):{baseLanes:a.baseLanes|n,cachePool:null},o.childLanes=e.childLanes&~n,t.memoizedState=Yi,i):(n=Zi(e,t,i.children,n),t.memoizedState=null,n)}function Qi(e,t){return(t=no({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function Zi(e,t,n,r){var i=e.child;return e=i.sibling,n=$s(i,{mode:"visible",children:n}),0==(1&t.mode)&&(n.lanes=r),n.return=t,n.sibling=null,null!==e&&(null===(r=t.deletions)?(t.deletions=[e],t.flags|=16):r.push(e)),t.child=n}function $i(e,t,n,r,i){var a=t.mode,s=(e=e.child).sibling,o={mode:"hidden",children:n};return 0==(1&a)&&t.child!==e?((n=t.child).childLanes=0,n.pendingProps=o,t.deletions=null):(n=$s(e,o)).subtreeFlags=14680064&e.subtreeFlags,null!==s?r=$s(s,r):(r=to(r,a,i,null)).flags|=2,r.return=t,n.return=t,n.sibling=r,t.child=n,r}function ea(e,t,n,r){return null!==r&&er(r),ar(t,e.child,null,n),(e=Qi(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function ta(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),un(e.return,t,n)}function na(e,t,n,r,i){var a=e.memoizedState;null===a?e.memoizedState={isBackwards:t,rendering:null,renderingStartTime:0,last:r,tail:n,tailMode:i}:(a.isBackwards=t,a.rendering=null,a.renderingStartTime=0,a.last=r,a.tail=n,a.tailMode=i)}function ra(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(Oi(e,t,r.children,n),0!=(2&(r=gr.current)))r=1&r|2,t.flags|=128;else{if(null!==e&&0!=(128&e.flags))e:for(e=t.child;null!==e;){if(13===e.tag)null!==e.memoizedState&&ta(e,n,t);else if(19===e.tag)ta(e,n,t);else if(null!==e.child){e.child.return=e,e=e.child;continue}if(e===t)break e;for(;null===e.sibling;){if(null===e.return||e.return===t)break e;e=e.return}e.sibling.return=e.return,e=e.sibling}r&=1}if(lt(gr,r),0==(1&t.mode))t.memoizedState=null;else switch(i){case"forwards":for(n=t.child,i=null;null!==n;)null!==(e=n.alternate)&&null===vr(e)&&(i=n),n=n.sibling;null===(n=i)?(i=t.child,t.child=null):(i=n.sibling,n.sibling=null),na(t,!1,i,n,a);break;case"backwards":for(n=null,i=t.child,t.child=null;null!==i;){if(null!==(e=i.alternate)&&null===vr(e)){t.child=i;break}e=i.sibling,i.sibling=n,n=i,i=e}na(t,!0,n,null,a);break;case"together":na(t,!1,null,null,void 0);break;default:t.memoizedState=null}return t.child}function ia(e,t,n){if(null!==e&&(t.dependencies=e.dependencies),ts|=t.lanes,0==(n&t.childLanes))return null;if(null!==e&&t.child!==e.child)throw Error(s(153));if(null!==t.child){for(n=$s(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=$s(e,e.pendingProps)).return=t;n.sibling=null}return t.child}function aa(e,t){switch(Gn(t),t.tag){case 1:return pt(t.type)&&mt(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return fr(),ot(ht),ot(ct),xr(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return mr(t),null;case 13:if(ot(gr),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(s(340));$n()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return ot(gr),null;case 4:return fr(),null;case 10:return ln(t.type._context),null;case 22:case 23:return Rs(),null;default:return null}}var sa=!1,oa=!1,la="function"==typeof WeakSet?WeakSet:Set,ua=null;function ca(e,t){var n=e.ref;if(null!==n)if("function"==typeof n)try{n(null)}catch(n){Ws(e,t,n)}else n.current=null}function ha(e,t,n){try{n()}catch(n){Ws(e,t,n)}}var da=!1;function fa(e,t,n){var r=t.updateQueue;if(null!==(r=null!==r?r.lastEffect:null)){var i=r=r.next;do{if((i.tag&e)===e){var a=i.destroy;i.destroy=void 0,void 0!==a&&ha(t,n,a)}i=i.next}while(i!==r)}}function pa(e,t){if(null!==(t=null!==(t=t.updateQueue)?t.lastEffect:null)){var n=t=t.next;do{if((n.tag&e)===e){var r=n.create;n.destroy=r()}n=n.next}while(n!==t)}}function ma(e){var t=e.ref;if(null!==t){var n=e.stateNode;e=5===e.tag?D(n):n,"function"==typeof t?t(e):t.current=e}}function ga(e,t,n){if(Wt&&"function"==typeof Wt.onCommitFiberUnmount)try{Wt.onCommitFiberUnmount(Vt,t)}catch(e){}switch(t.tag){case 0:case 11:case 14:case 15:if(null!==(e=t.updateQueue)&&null!==(e=e.lastEffect)){var r=e=e.next;do{var i=r,a=i.destroy;i=i.tag,void 0!==a&&(0!=(2&i)||0!=(4&i))&&ha(t,n,a),r=r.next}while(r!==e)}break;case 1:if(ca(t,n),"function"==typeof(e=t.stateNode).componentWillUnmount)try{e.props=t.memoizedProps,e.state=t.memoizedState,e.componentWillUnmount()}catch(e){Ws(t,n,e)}break;case 5:ca(t,n);break;case 4:Y?Sa(e,t,n):K&&K&&(t=t.stateNode.containerInfo,n=Ee(t),Pe(t,n))}}function va(e,t,n){for(var r=t;;)if(ga(e,r,n),null===r.child||Y&&4===r.tag){if(r===t)break;for(;null===r.sibling;){if(null===r.return||r.return===t)return;r=r.return}r.sibling.return=r.return,r=r.sibling}else r.child.return=r,r=r.child}function ya(e){var t=e.alternate;null!==t&&(e.alternate=null,ya(t)),e.child=null,e.deletions=null,e.sibling=null,5===e.tag&&null!==(t=e.stateNode)&&ee(t),e.stateNode=null,e.return=null,e.dependencies=null,e.memoizedProps=null,e.memoizedState=null,e.pendingProps=null,e.stateNode=null,e.updateQueue=null}function xa(e){return 5===e.tag||3===e.tag||4===e.tag}function ba(e){e:for(;;){for(;null===e.sibling;){if(null===e.return||xa(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;5!==e.tag&&6!==e.tag&&18!==e.tag;){if(2&e.flags)continue e;if(null===e.child||4===e.tag)continue e;e.child.return=e,e=e.child}if(!(2&e.flags))return e.stateNode}}function _a(e){if(Y){e:{for(var t=e.return;null!==t;){if(xa(t))break e;t=t.return}throw Error(s(160))}var n=t;switch(n.tag){case 5:t=n.stateNode,32&n.flags&&(be(t),n.flags&=-33),Ma(e,n=ba(e),t);break;case 3:case 4:t=n.stateNode.containerInfo,wa(e,n=ba(e),t);break;default:throw Error(s(161))}}}function wa(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ve(n,e,t):de(n,e);else if(4!==r&&null!==(e=e.child))for(wa(e,t,n),e=e.sibling;null!==e;)wa(e,t,n),e=e.sibling}function Ma(e,t,n){var r=e.tag;if(5===r||6===r)e=e.stateNode,t?ge(n,e,t):he(n,e);else if(4!==r&&null!==(e=e.child))for(Ma(e,t,n),e=e.sibling;null!==e;)Ma(e,t,n),e=e.sibling}function Sa(e,t,n){for(var r,i,a=t,o=!1;;){if(!o){o=a.return;e:for(;;){if(null===o)throw Error(s(160));switch(r=o.stateNode,o.tag){case 5:i=!1;break e;case 3:case 4:r=r.containerInfo,i=!0;break e}o=o.return}o=!0}if(5===a.tag||6===a.tag)va(e,a,n),i?xe(r,a.stateNode):ye(r,a.stateNode);else if(18===a.tag)i?qe(r,a.stateNode):Ke(r,a.stateNode);else if(4===a.tag){if(null!==a.child){r=a.stateNode.containerInfo,i=!0,a.child.return=a,a=a.child;continue}}else if(ga(e,a,n),null!==a.child){a.child.return=a,a=a.child;continue}if(a===t)break;for(;null===a.sibling;){if(null===a.return||a.return===t)return;4===(a=a.return).tag&&(o=!1)}a.sibling.return=a.return,a=a.sibling}}function Aa(e,t){if(Y){switch(t.tag){case 0:case 11:case 14:case 15:return fa(3,t,t.return),pa(3,t),void fa(5,t,t.return);case 1:case 12:case 17:return;case 5:var n=t.stateNode;if(null!=n){var r=t.memoizedProps;e=null!==e?e.memoizedProps:r;var i=t.type,a=t.updateQueue;t.updateQueue=null,null!==a&&me(n,a,i,e,r,t)}return;case 6:if(null===t.stateNode)throw Error(s(162));return n=t.memoizedProps,void fe(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(q&&null!==e&&e.memoizedState.isDehydrated&&Xe(t.stateNode.containerInfo));case 13:case 19:return void Ca(t)}throw Error(s(163))}switch(t.tag){case 0:case 11:case 14:case 15:return fa(3,t,t.return),pa(3,t),void fa(5,t,t.return);case 12:case 22:case 23:return;case 13:case 19:return void Ca(t);case 3:q&&null!==e&&e.memoizedState.isDehydrated&&Xe(t.stateNode.containerInfo)}e:if(K){switch(t.tag){case 1:case 5:case 6:break e;case 3:case 4:t=t.stateNode,Pe(t.containerInfo,t.pendingChildren);break e}throw Error(s(163))}}function Ca(e){var t=e.updateQueue;if(null!==t){e.updateQueue=null;var n=e.stateNode;null===n&&(n=e.stateNode=new la),t.forEach((function(t){var r=Ys.bind(null,e,t);n.has(t)||(n.add(t),t.then(r,r))}))}}function Ea(e,t,n){ua=e,Ta(e,t,n)}function Ta(e,t,n){for(var r=0!=(1&e.mode);null!==ua;){var i=ua,a=i.child;if(22===i.tag&&r){var s=null!==i.memoizedState||sa;if(!s){var o=i.alternate,l=null!==o&&null!==o.memoizedState||oa;o=sa;var u=oa;if(sa=s,(oa=l)&&!u)for(ua=i;null!==ua;)l=(s=ua).child,22===s.tag&&null!==s.memoizedState?Ra(i):null!==l?(l.return=s,ua=l):Ra(i);for(;null!==a;)ua=a,Ta(a,t,n),a=a.sibling;ua=i,sa=o,oa=u}Ba(e)}else 0!=(8772&i.subtreeFlags)&&null!==a?(a.return=i,ua=a):Ba(e)}}function Ba(e){for(;null!==ua;){var t=ua;if(0!=(8772&t.flags)){var n=t.alternate;try{if(0!=(8772&t.flags))switch(t.tag){case 0:case 11:case 15:oa||pa(5,t);break;case 1:var r=t.stateNode;if(4&t.flags&&!oa)if(null===n)r.componentDidMount();else{var i=t.elementType===t.type?n.memoizedProps:en(t.type,n.memoizedProps);r.componentDidUpdate(i,n.memoizedState,r.__reactInternalSnapshotBeforeUpdate)}var a=t.updateQueue;null!==a&&_n(t,a,r);break;case 3:var o=t.updateQueue;if(null!==o){if(n=null,null!==t.child)switch(t.child.tag){case 5:n=D(t.child.stateNode);break;case 1:n=t.child.stateNode}_n(t,o,n)}break;case 5:var l=t.stateNode;null===n&&4&t.flags&&pe(l,t.type,t.memoizedProps,t);break;case 6:case 4:case 12:case 19:case 17:case 21:case 22:case 23:break;case 13:if(q&&null===t.memoizedState){var u=t.alternate;if(null!==u){var c=u.memoizedState;if(null!==c){var h=c.dehydrated;null!==h&&Ye(h)}}}break;default:throw Error(s(163))}oa||512&t.flags&&ma(t)}catch(e){Ws(t,t.return,e)}}if(t===e){ua=null;break}if(null!==(n=t.sibling)){n.return=t.return,ua=n;break}ua=t.return}}function Pa(e){for(;null!==ua;){var t=ua;if(t===e){ua=null;break}var n=t.sibling;if(null!==n){n.return=t.return,ua=n;break}ua=t.return}}function Ra(e){for(;null!==ua;){var t=ua;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{pa(4,t)}catch(e){Ws(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Ws(t,i,e)}}var a=t.return;try{ma(t)}catch(e){Ws(t,a,e)}break;case 5:var s=t.return;try{ma(t)}catch(e){Ws(t,s,e)}}}catch(e){Ws(t,t.return,e)}if(t===e){ua=null;break}var o=t.sibling;if(null!==o){o.return=t.return,ua=o;break}ua=t.return}}var La=0,Da=1,Ia=2,ka=3,Fa=4;if("function"==typeof Symbol&&Symbol.for){var Oa=Symbol.for;La=Oa("selector.component"),Da=Oa("selector.has_pseudo_class"),Ia=Oa("selector.role"),ka=Oa("selector.test_id"),Fa=Oa("selector.text")}function Na(e){var t=Q(e);if(null!=t){if("string"!=typeof t.memoizedProps["data-testname"])throw Error(s(364));return t}if(null===(e=ie(e)))throw Error(s(362));return e.stateNode.current}function za(e,t){switch(t.$$typeof){case La:if(e.type===t.value)return!0;break;case Da:e:{t=t.value,e=[e,0];for(var n=0;n<e.length;){var r=e[n++],i=e[n++],a=t[i];if(5!==r.tag||!oe(r)){for(;null!=a&&za(r,a);)a=t[++i];if(i===t.length){t=!0;break e}for(r=r.child;null!==r;)e.push(r,i),r=r.sibling}}t=!1}return t;case Ia:if(5===e.tag&&le(e.stateNode,t.value))return!0;break;case Fa:if((5===e.tag||6===e.tag)&&null!==(e=se(e))&&0<=e.indexOf(t.value))return!0;break;case ka:if(5===e.tag&&"string"==typeof(e=e.memoizedProps["data-testname"])&&e.toLowerCase()===t.value.toLowerCase())return!0;break;default:throw Error(s(365))}return!1}function Ua(e){switch(e.$$typeof){case La:return"<"+(M(e.value)||"Unknown")+">";case Da:return":has("+(Ua(e)||"")+")";case Ia:return'[role="'+e.value+'"]';case Fa:return'"'+e.value+'"';case ka:return'[data-testname="'+e.value+'"]';default:throw Error(s(365))}}function Ga(e,t){var n=[];e=[e,0];for(var r=0;r<e.length;){var i=e[r++],a=e[r++],s=t[a];if(5!==i.tag||!oe(i)){for(;null!=s&&za(i,s);)s=t[++a];if(a===t.length)n.push(i);else for(i=i.child;null!==i;)e.push(i,a),i=i.sibling}}return n}function Ha(e,t){if(!re)throw Error(s(363));e=Ga(e=Na(e),t),t=[],e=Array.from(e);for(var n=0;n<e.length;){var r=e[n++];if(5===r.tag)oe(r)||t.push(r.stateNode);else for(r=r.child;null!==r;)e.push(r),r=r.sibling}return t}var Va=Math.ceil,Wa=o.ReactCurrentDispatcher,ja=o.ReactCurrentOwner,Ja=o.ReactCurrentBatchConfig,Xa=0,Ya=null,Ka=null,qa=0,Qa=0,Za=st(0),$a=0,es=null,ts=0,ns=0,rs=0,is=null,as=null,ss=0,os=1/0;function ls(){os=Nt()+500}var us,cs=!1,hs=null,ds=null,fs=!1,ps=null,ms=0,gs=0,vs=null,ys=-1,xs=0;function bs(){return 0!=(6&Xa)?Nt():-1!==ys?ys:ys=Nt()}function _s(e){return 0==(1&e.mode)?1:0!=(2&Xa)&&0!==qa?qa&-qa:null!==Qt.transition?(0===xs&&(e=Mt,0==(4194240&(Mt<<=1))&&(Mt=64),xs=e),xs):0!==(e=Lt)?e:$()}function ws(e,t,n){if(50<gs)throw gs=0,vs=null,Error(s(185));var r=Ms(e,t);return null===r?null:(Pt(r,t,n),0!=(2&Xa)&&r===Ya||(r===Ya&&(0==(2&Xa)&&(ns|=t),4===$a&&Ts(r,qa)),Ss(r,n),1===t&&0===Xa&&0==(1&e.mode)&&(ls(),Xt&&qt())),r)}function Ms(e,t){e.lanes|=t;var n=e.alternate;for(null!==n&&(n.lanes|=t),n=e,e=e.return;null!==e;)e.childLanes|=t,null!==(n=e.alternate)&&(n.childLanes|=t),n=e,e=e.return;return 3===n.tag?n.stateNode:null}function Ss(e,t){var n=e.callbackNode;!function(e,t){for(var n=e.suspendedLanes,r=e.pingedLanes,i=e.expirationTimes,a=e.pendingLanes;0<a;){var s=31-bt(a),o=1<<s,l=i[s];-1===l?0!=(o&n)&&0==(o&r)||(i[s]=Et(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}}(e,t);var r=Ct(e,e===Ya?qa:0);if(0===r)null!==n&&kt(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&kt(n),1===t)0===e.tag?function(e){Xt=!0,Kt(e)}(Bs.bind(null,e)):Kt(Bs.bind(null,e)),te?ne((function(){0===Xa&&qt()})):It(zt,qt),n=null;else{switch(Dt(r)){case 1:n=zt;break;case 4:n=Ut;break;case 16:default:n=Gt;break;case 536870912:n=Ht}n=Ks(n,As.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function As(e,t){if(ys=-1,xs=0,0!=(6&Xa))throw Error(s(327));var n=e.callbackNode;if(Hs()&&e.callbackNode!==n)return null;var r=Ct(e,e===Ya?qa:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=Fs(e,r);else{t=r;var i=Xa;Xa|=2;var a=Is();for(Ya===e&&qa===t||(ls(),Ls(e,t));;)try{Ns();break}catch(t){Ds(e,t)}sn(),Wa.current=a,Xa=i,null!==Ka?t=0:(Ya=null,qa=0,t=$a)}if(0!==t){if(2===t&&0!==(i=Tt(e))&&(r=i,t=Cs(e,i)),1===t)throw n=es,Ls(e,0),Ts(e,r),Ss(e,Nt()),n;if(6===t)Ts(e,r);else{if(i=e.current.alternate,0==(30&r)&&!function(e){for(var t=e;;){if(16384&t.flags){var n=t.updateQueue;if(null!==n&&null!==(n=n.stores))for(var r=0;r<n.length;r++){var i=n[r],a=i.getSnapshot;i=i.value;try{if(!jt(a(),i))return!1}catch(e){return!1}}}if(n=t.child,16384&t.subtreeFlags&&null!==n)n.return=t,t=n;else{if(t===e)break;for(;null===t.sibling;){if(null===t.return||t.return===e)return!0;t=t.return}t.sibling.return=t.return,t=t.sibling}}return!0}(i)&&(2===(t=Fs(e,r))&&0!==(a=Tt(e))&&(r=a,t=Cs(e,a)),1===t))throw n=es,Ls(e,0),Ts(e,r),Ss(e,Nt()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(s(345));case 2:case 5:Gs(e,as);break;case 3:if(Ts(e,r),(130023424&r)===r&&10<(t=ss+500-Nt())){if(0!==Ct(e,0))break;if(((i=e.suspendedLanes)&r)!==r){bs(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=W(Gs.bind(null,e,as),t);break}Gs(e,as);break;case 4:if(Ts(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-bt(r);a=1<<o,(o=t[o])>i&&(i=o),r&=~a}if(r=i,10<(r=(120>(r=Nt()-r)?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Va(r/1960))-r)){e.timeoutHandle=W(Gs.bind(null,e,as),r);break}Gs(e,as);break;default:throw Error(s(329))}}}return Ss(e,Nt()),e.callbackNode===n?As.bind(null,e):null}function Cs(e,t){var n=is;return e.current.memoizedState.isDehydrated&&(Ls(e,t).flags|=256),2!==(e=Fs(e,t))&&(t=as,as=n,null!==t&&Es(t)),e}function Es(e){null===as?as=e:as.push.apply(as,e)}function Ts(e,t){for(t&=~rs,t&=~ns,e.suspendedLanes|=t,e.pingedLanes&=~t,e=e.expirationTimes;0<t;){var n=31-bt(t),r=1<<n;e[n]=-1,t&=~r}}function Bs(e){if(0!=(6&Xa))throw Error(s(327));Hs();var t=Ct(e,0);if(0==(1&t))return Ss(e,Nt()),null;var n=Fs(e,t);if(0!==e.tag&&2===n){var r=Tt(e);0!==r&&(t=r,n=Cs(e,r))}if(1===n)throw n=es,Ls(e,0),Ts(e,t),Ss(e,Nt()),n;if(6===n)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Gs(e,as),Ss(e,Nt()),null}function Ps(e){null!==ps&&0===ps.tag&&0==(6&Xa)&&Hs();var t=Xa;Xa|=1;var n=Ja.transition,r=Lt;try{if(Ja.transition=null,Lt=1,e)return e()}finally{Lt=r,Ja.transition=n,0==(6&(Xa=t))&&qt()}}function Rs(){Qa=Za.current,ot(Za)}function Ls(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==J&&(e.timeoutHandle=J,j(n)),null!==Ka)for(n=Ka.return;null!==n;){var r=n;switch(Gn(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&mt();break;case 3:fr(),ot(ht),ot(ct),xr();break;case 5:mr(r);break;case 4:fr();break;case 13:case 19:ot(gr);break;case 10:ln(r.type._context);break;case 22:case 23:Rs()}n=n.return}if(Ya=e,Ka=e=$s(e.current,null),qa=Qa=t,$a=0,es=null,rs=ns=ts=0,as=is=null,null!==dn){for(t=0;t<dn.length;t++)if(null!==(r=(n=dn[t]).interleaved)){n.interleaved=null;var i=r.next,a=n.pending;if(null!==a){var s=a.next;a.next=i,r.next=s}n.pending=r}dn=null}return e}function Ds(e,t){for(;;){var n=Ka;try{if(sn(),br.current=fi,Cr){for(var r=Mr.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}Cr=!1}if(wr=0,Ar=Sr=Mr=null,Er=!1,Tr=0,ja.current=null,null===n||null===n.return){$a=1,es=t,Ka=null;break}e:{var a=e,o=n.return,l=n,u=t;if(t=qa,l.flags|=32768,null!==u&&"object"==typeof u&&"function"==typeof u.then){var c=u,h=l,d=h.tag;if(0==(1&h.mode)&&(0===d||11===d||15===d)){var f=h.alternate;f?(h.updateQueue=f.updateQueue,h.memoizedState=f.memoizedState,h.lanes=f.lanes):(h.updateQueue=null,h.memoizedState=null)}var p=Ei(o);if(null!==p){p.flags&=-257,Ti(p,o,l,0,t),1&p.mode&&Ci(a,c,t),u=c;var m=(t=p).updateQueue;if(null===m){var g=new Set;g.add(u),t.updateQueue=g}else m.add(u);break e}if(0==(1&t)){Ci(a,c,t),ks();break e}u=Error(s(426))}else if(Wn&&1&l.mode){var v=Ei(o);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),Ti(v,o,l,0,t),er(u);break e}}a=u,4!==$a&&($a=2),null===is?is=[a]:is.push(a),u=vi(u,l),l=o;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t,xn(l,Si(0,u,t));break e;case 1:a=u;var y=l.type,x=l.stateNode;if(0==(128&l.flags)&&("function"==typeof y.getDerivedStateFromError||null!==x&&"function"==typeof x.componentDidCatch&&(null===ds||!ds.has(x)))){l.flags|=65536,t&=-t,l.lanes|=t,xn(l,Ai(l,a,t));break e}}l=l.return}while(null!==l)}Us(n)}catch(e){t=e,Ka===n&&null!==n&&(Ka=n=n.return);continue}break}}function Is(){var e=Wa.current;return Wa.current=fi,null===e?fi:e}function ks(){0!==$a&&3!==$a&&2!==$a||($a=4),null===Ya||0==(268435455&ts)&&0==(268435455&ns)||Ts(Ya,qa)}function Fs(e,t){var n=Xa;Xa|=2;var r=Is();for(Ya===e&&qa===t||Ls(e,t);;)try{Os();break}catch(t){Ds(e,t)}if(sn(),Xa=n,Wa.current=r,null!==Ka)throw Error(s(261));return Ya=null,qa=0,$a}function Os(){for(;null!==Ka;)zs(Ka)}function Ns(){for(;null!==Ka&&!Ft();)zs(Ka)}function zs(e){var t=us(e.alternate,e,Qa);e.memoizedProps=e.pendingProps,null===t?Us(e):Ka=t,ja.current=null}function Us(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Ii(n,t,Qa)))return void(Ka=n)}else{if(null!==(n=aa(n,t)))return n.flags&=32767,void(Ka=n);if(null===e)return $a=6,void(Ka=null);e.flags|=32768,e.subtreeFlags=0,e.deletions=null}if(null!==(t=t.sibling))return void(Ka=t);Ka=t=e}while(null!==t);0===$a&&($a=5)}function Gs(e,t){var n=Lt,r=Ja.transition;try{Ja.transition=null,Lt=1,function(e,t,n){do{Hs()}while(null!==ps);if(0!=(6&Xa))throw Error(s(327));var r=e.finishedWork,i=e.finishedLanes;if(null===r)return null;if(e.finishedWork=null,e.finishedLanes=0,r===e.current)throw Error(s(177));e.callbackNode=null,e.callbackPriority=0;var a=r.lanes|r.childLanes;if(function(e,t){var n=e.pendingLanes&~t;e.pendingLanes=t,e.suspendedLanes=0,e.pingedLanes=0,e.expiredLanes&=t,e.mutableReadLanes&=t,e.entangledLanes&=t,t=e.entanglements;var r=e.eventTimes;for(e=e.expirationTimes;0<n;){var i=31-bt(n),a=1<<i;t[i]=0,r[i]=-1,e[i]=-1,n&=~a}}(e,a),e===Ya&&(Ka=Ya=null,qa=0),0==(2064&r.subtreeFlags)&&0==(2064&r.flags)||fs||(fs=!0,Ks(Gt,(function(){return Hs(),null}))),a=0!=(15990&r.flags),0!=(15990&r.subtreeFlags)||a){a=Ja.transition,Ja.transition=null;var o=Lt;Lt=1;var l=Xa;Xa|=4,ja.current=null,function(e,t){for(F(e.containerInfo),ua=t;null!==ua;)if(t=(e=ua).child,0!=(1028&e.subtreeFlags)&&null!==t)t.return=e,ua=t;else for(;null!==ua;){e=ua;try{var n=e.alternate;if(0!=(1024&e.flags))switch(e.tag){case 0:case 11:case 15:case 5:case 6:case 4:case 17:break;case 1:if(null!==n){var r=n.memoizedProps,i=n.memoizedState,a=e.stateNode,o=a.getSnapshotBeforeUpdate(e.elementType===e.type?r:en(e.type,r),i);a.__reactInternalSnapshotBeforeUpdate=o}break;case 3:Y&&Ae(e.stateNode.containerInfo);break;default:throw Error(s(163))}}catch(t){Ws(e,e.return,t)}if(null!==(t=e.sibling)){t.return=e.return,ua=t;break}ua=e.return}n=da,da=!1}(e,r),function(e,t){for(ua=t;null!==ua;){var n=(t=ua).deletions;if(null!==n)for(var r=0;r<n.length;r++){var i=n[r];try{var a=e;Y?Sa(a,i,t):va(a,i,t);var s=i.alternate;null!==s&&(s.return=null),i.return=null}catch(e){Ws(i,t,e)}}if(n=t.child,0!=(12854&t.subtreeFlags)&&null!==n)n.return=t,ua=n;else for(;null!==ua;){t=ua;try{var o=t.flags;if(32&o&&Y&&be(t.stateNode),512&o){var l=t.alternate;if(null!==l){var u=l.ref;null!==u&&("function"==typeof u?u(null):u.current=null)}}if(8192&o)switch(t.tag){case 13:if(null!==t.memoizedState){var c=t.alternate;null!==c&&null!==c.memoizedState||(ss=Nt())}break;case 22:var h=null!==t.memoizedState,d=t.alternate,f=null!==d&&null!==d.memoizedState;if(n=t,Y)e:if(r=n,i=h,a=null,Y)for(var p=r;;){if(5===p.tag){if(null===a){a=p;var m=p.stateNode;i?_e(m):Me(p.stateNode,p.memoizedProps)}}else if(6===p.tag){if(null===a){var g=p.stateNode;i?we(g):Se(g,p.memoizedProps)}}else if((22!==p.tag&&23!==p.tag||null===p.memoizedState||p===r)&&null!==p.child){p.child.return=p,p=p.child;continue}if(p===r)break;for(;null===p.sibling;){if(null===p.return||p.return===r)break e;a===p&&(a=null),p=p.return}a===p&&(a=null),p.sibling.return=p.return,p=p.sibling}if(h&&!f&&0!=(1&n.mode)){ua=n;for(var v=n.child;null!==v;){for(n=ua=v;null!==ua;){var y=(r=ua).child;switch(r.tag){case 0:case 11:case 14:case 15:fa(4,r,r.return);break;case 1:ca(r,r.return);var x=r.stateNode;if("function"==typeof x.componentWillUnmount){var b=r.return;try{x.props=r.memoizedProps,x.state=r.memoizedState,x.componentWillUnmount()}catch(e){Ws(r,b,e)}}break;case 5:ca(r,r.return);break;case 22:if(null!==r.memoizedState){Pa(n);continue}}null!==y?(y.return=r,ua=y):Pa(n)}v=v.sibling}}}switch(4102&o){case 2:_a(t),t.flags&=-3;break;case 6:_a(t),t.flags&=-3,Aa(t.alternate,t);break;case 4096:t.flags&=-4097;break;case 4100:t.flags&=-4097,Aa(t.alternate,t);break;case 4:Aa(t.alternate,t)}}catch(e){Ws(t,t.return,e)}if(null!==(n=t.sibling)){n.return=t.return,ua=n;break}ua=t.return}}}(e,r),O(e.containerInfo),e.current=r,Ea(r,e,i),Ot(),Xa=l,Lt=o,Ja.transition=a}else e.current=r;if(fs&&(fs=!1,ps=e,ms=i),0===(a=e.pendingLanes)&&(ds=null),function(e){if(Wt&&"function"==typeof Wt.onCommitFiberRoot)try{Wt.onCommitFiberRoot(Vt,e,void 0,128==(128&e.current.flags))}catch(e){}}(r.stateNode),Ss(e,Nt()),null!==t)for(n=e.onRecoverableError,r=0;r<t.length;r++)n(t[r]);if(cs)throw cs=!1,e=hs,hs=null,e;0!=(1&ms)&&0!==e.tag&&Hs(),0!=(1&(a=e.pendingLanes))?e===vs?gs++:(gs=0,vs=e):gs=0,qt()}(e,t,n)}finally{Ja.transition=r,Lt=n}return null}function Hs(){if(null!==ps){var e=Dt(ms),t=Ja.transition,n=Lt;try{if(Ja.transition=null,Lt=16>e?16:e,null===ps)var r=!1;else{if(e=ps,ps=null,ms=0,0!=(6&Xa))throw Error(s(331));var i=Xa;for(Xa|=4,ua=e.current;null!==ua;){var a=ua,o=a.child;if(0!=(16&ua.flags)){var l=a.deletions;if(null!==l){for(var u=0;u<l.length;u++){var c=l[u];for(ua=c;null!==ua;){var h=ua;switch(h.tag){case 0:case 11:case 15:fa(8,h,a)}var d=h.child;if(null!==d)d.return=h,ua=d;else for(;null!==ua;){var f=(h=ua).sibling,p=h.return;if(ya(h),h===c){ua=null;break}if(null!==f){f.return=p,ua=f;break}ua=p}}}var m=a.alternate;if(null!==m){var g=m.child;if(null!==g){m.child=null;do{var v=g.sibling;g.sibling=null,g=v}while(null!==g)}}ua=a}}if(0!=(2064&a.subtreeFlags)&&null!==o)o.return=a,ua=o;else e:for(;null!==ua;){if(0!=(2048&(a=ua).flags))switch(a.tag){case 0:case 11:case 15:fa(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,ua=y;break e}ua=a.return}}var x=e.current;for(ua=x;null!==ua;){var b=(o=ua).child;if(0!=(2064&o.subtreeFlags)&&null!==b)b.return=o,ua=b;else e:for(o=x;null!==ua;){if(0!=(2048&(l=ua).flags))try{switch(l.tag){case 0:case 11:case 15:pa(9,l)}}catch(e){Ws(l,l.return,e)}if(l===o){ua=null;break e}var _=l.sibling;if(null!==_){_.return=l.return,ua=_;break e}ua=l.return}}if(Xa=i,qt(),Wt&&"function"==typeof Wt.onPostCommitFiberRoot)try{Wt.onPostCommitFiberRoot(Vt,e)}catch(e){}r=!0}return r}finally{Lt=n,Ja.transition=t}}return!1}function Vs(e,t,n){vn(e,t=Si(0,t=vi(n,t),1)),t=bs(),null!==(e=Ms(e,1))&&(Pt(e,1,t),Ss(e,t))}function Ws(e,t,n){if(3===e.tag)Vs(e,e,n);else for(;null!==t;){if(3===t.tag){Vs(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===ds||!ds.has(r))){vn(t,e=Ai(t,e=vi(n,e),1)),e=bs(),null!==(t=Ms(t,1))&&(Pt(t,1,e),Ss(t,e));break}}t=t.return}}function js(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=bs(),e.pingedLanes|=e.suspendedLanes&n,Ya===e&&(qa&n)===n&&(4===$a||3===$a&&(130023424&qa)===qa&&500>Nt()-ss?Ls(e,0):rs|=n),Ss(e,t)}function Js(e,t){0===t&&(0==(1&e.mode)?t=1:(t=St,0==(130023424&(St<<=1))&&(St=4194304)));var n=bs();null!==(e=Ms(e,t))&&(Pt(e,t,n),Ss(e,n))}function Xs(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Js(e,n)}function Ys(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,i=e.memoizedState;null!==i&&(n=i.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(s(314))}null!==r&&r.delete(t),Js(e,n)}function Ks(e,t){return It(e,t)}function qs(e,t,n,r){this.tag=e,this.key=n,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=t,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=r,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function Qs(e,t,n,r){return new qs(e,t,n,r)}function Zs(e){return!(!(e=e.prototype)||!e.isReactComponent)}function $s(e,t){var n=e.alternate;return null===n?((n=Qs(e.tag,t,e.key,e.mode)).elementType=e.elementType,n.type=e.type,n.stateNode=e.stateNode,n.alternate=e,e.alternate=n):(n.pendingProps=t,n.type=e.type,n.flags=0,n.subtreeFlags=0,n.deletions=null),n.flags=14680064&e.flags,n.childLanes=e.childLanes,n.lanes=e.lanes,n.child=e.child,n.memoizedProps=e.memoizedProps,n.memoizedState=e.memoizedState,n.updateQueue=e.updateQueue,t=e.dependencies,n.dependencies=null===t?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function eo(e,t,n,r,i,a){var o=2;if(r=e,"function"==typeof e)Zs(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case c:return to(n.children,i,a,t);case h:o=8,i|=8;break;case d:return(e=Qs(12,n,t,2|i)).elementType=d,e.lanes=a,e;case g:return(e=Qs(13,n,t,i)).elementType=g,e.lanes=a,e;case v:return(e=Qs(19,n,t,i)).elementType=v,e.lanes=a,e;case b:return no(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case f:o=10;break e;case p:o=9;break e;case m:o=11;break e;case y:o=14;break e;case x:o=16,r=null;break e}throw Error(s(130,null==e?e:typeof e,""))}return(t=Qs(o,n,t,i)).elementType=e,t.type=r,t.lanes=a,t}function to(e,t,n,r){return(e=Qs(7,e,r,t)).lanes=n,e}function no(e,t,n,r){return(e=Qs(22,e,r,t)).elementType=b,e.lanes=n,e.stateNode={},e}function ro(e,t,n){return(e=Qs(6,e,null,t)).lanes=n,e}function io(e,t,n){return(t=Qs(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function ao(e,t,n,r,i){this.tag=t,this.containerInfo=e,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=J,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Bt(0),this.expirationTimes=Bt(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Bt(0),this.identifierPrefix=r,this.onRecoverableError=i,q&&(this.mutableSourceEagerHydrationData=null)}function so(e,t,n,r,i,a,s,o,l){return e=new ao(e,t,n,o,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Qs(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null},pn(a),e}function oo(e){if(!e)return ut;e:{if(A(e=e._reactInternals)!==e||1!==e.tag)throw Error(s(170));var t=e;do{switch(t.tag){case 3:t=t.stateNode.context;break e;case 1:if(pt(t.type)){t=t.stateNode.__reactInternalMemoizedMergedChildContext;break e}}t=t.return}while(null!==t);throw Error(s(171))}if(1===e.tag){var n=e.type;if(pt(n))return vt(e,n,t)}return t}function lo(e){var t=e._reactInternals;if(void 0===t){if("function"==typeof e.render)throw Error(s(188));throw e=Object.keys(e).join(","),Error(s(268,e))}return null===(e=T(t))?null:e.stateNode}function uo(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function co(e,t){uo(e,t),(e=e.alternate)&&uo(e,t)}function ho(e){return null===(e=T(e))?null:e.stateNode}function fo(){return null}return us=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||ht.current)Fi=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return Fi=!1,function(e,t,n){switch(t.tag){case 3:Ji(t),$n();break;case 5:pr(t);break;case 1:pt(t.type)&&yt(t);break;case 4:dr(t,t.stateNode.containerInfo);break;case 10:on(0,t.type._context,t.memoizedProps.value);break;case 13:var r=t.memoizedState;if(null!==r)return null!==r.dehydrated?(lt(gr,1&gr.current),t.flags|=128,null):0!=(n&t.child.childLanes)?qi(e,t,n):(lt(gr,1&gr.current),null!==(e=ia(e,t,n))?e.sibling:null);lt(gr,1&gr.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return ra(e,t,n);t.flags|=128}var i=t.memoizedState;if(null!==i&&(i.rendering=null,i.tail=null,i.lastEffect=null),lt(gr,gr.current),r)break;return null;case 22:case 23:return t.lanes=0,Gi(e,t,n)}return ia(e,t,n)}(e,t,n);Fi=0!=(131072&e.flags)}else Fi=!1,Wn&&0!=(1048576&t.flags)&&zn(t,Ln,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps;var i=ft(t,ct.current);cn(t,n),i=Lr(null,t,r,e,i,n);var a=Dr();return t.flags|=1,"object"==typeof i&&null!==i&&"function"==typeof i.render&&void 0===i.$$typeof?(t.tag=1,t.memoizedState=null,t.updateQueue=null,pt(r)?(a=!0,yt(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,pn(t),i.updater=Sn,t.stateNode=i,i._reactInternals=t,Tn(t,r,e,n),t=ji(null,t,r,!0,a,n)):(t.tag=0,Wn&&a&&Un(t),Oi(null,t,i,n),t=t.child),t;case 16:r=t.elementType;e:{switch(null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),e=t.pendingProps,r=(i=r._init)(r._payload),t.type=r,i=t.tag=function(e){if("function"==typeof e)return Zs(e)?1:0;if(null!=e){if((e=e.$$typeof)===m)return 11;if(e===y)return 14}return 2}(r),e=en(r,e),i){case 0:t=Vi(null,t,r,e,n);break e;case 1:t=Wi(null,t,r,e,n);break e;case 11:t=Ni(null,t,r,e,n);break e;case 14:t=zi(null,t,r,en(r.type,e),n);break e}throw Error(s(306,r,""))}return t;case 0:return r=t.type,i=t.pendingProps,Vi(e,t,r,i=t.elementType===r?i:en(r,i),n);case 1:return r=t.type,i=t.pendingProps,Wi(e,t,r,i=t.elementType===r?i:en(r,i),n);case 3:e:{if(Ji(t),null===e)throw Error(s(387));r=t.pendingProps,i=(a=t.memoizedState).element,mn(e,t),bn(t,r,null,n);var o=t.memoizedState;if(r=o.element,q&&a.isDehydrated){if(a={element:r,isDehydrated:!1,cache:o.cache,transitions:o.transitions},t.updateQueue.baseState=a,t.memoizedState=a,256&t.flags){t=Xi(e,t,r,n,i=Error(s(423)));break e}if(r!==i){t=Xi(e,t,r,n,i=Error(s(424)));break e}for(q&&(Vn=Ge(t.stateNode.containerInfo),Hn=t,Wn=!0,Jn=null,jn=!1),n=sr(t,null,r,n),t.child=n;n;)n.flags=-3&n.flags|4096,n=n.sibling}else{if($n(),r===i){t=ia(e,t,n);break e}Oi(e,t,r,n)}t=t.child}return t;case 5:return pr(t),null===e&&qn(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,o=i.children,H(r,i)?o=null:null!==a&&H(r,a)&&(t.flags|=32),Hi(e,t),Oi(e,t,o,n),t.child;case 6:return null===e&&qn(t),null;case 13:return qi(e,t,n);case 4:return dr(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=ar(t,null,r,n):Oi(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ni(e,t,r,i=t.elementType===r?i:en(r,i),n);case 7:return Oi(e,t,t.pendingProps,n),t.child;case 8:case 12:return Oi(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,i=t.pendingProps,a=t.memoizedProps,on(0,r,o=i.value),null!==a)if(jt(a.value,o)){if(a.children===i.children&&!ht.current){t=ia(e,t,n);break e}}else for(null!==(a=t.child)&&(a.return=t);null!==a;){var l=a.dependencies;if(null!==l){o=a.child;for(var u=l.firstContext;null!==u;){if(u.context===r){if(1===a.tag){(u=gn(-1,n&-n)).tag=2;var c=a.updateQueue;if(null!==c){var h=(c=c.shared).pending;null===h?u.next=u:(u.next=h.next,h.next=u),c.pending=u}}a.lanes|=n,null!==(u=a.alternate)&&(u.lanes|=n),un(a.return,n,t),l.lanes|=n;break}u=u.next}}else if(10===a.tag)o=a.type===t.type?null:a.child;else if(18===a.tag){if(null===(o=a.return))throw Error(s(341));o.lanes|=n,null!==(l=o.alternate)&&(l.lanes|=n),un(o,n,t),o=a.sibling}else o=a.child;if(null!==o)o.return=a;else for(o=a;null!==o;){if(o===t){o=null;break}if(null!==(a=o.sibling)){a.return=o.return,o=a;break}o=o.return}a=o}Oi(e,t,i.children,n),t=t.child}return t;case 9:return i=t.type,r=t.pendingProps.children,cn(t,n),r=r(i=hn(i)),t.flags|=1,Oi(e,t,r,n),t.child;case 14:return i=en(r=t.type,t.pendingProps),zi(e,t,r,i=en(r.type,i),n);case 15:return Ui(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,i=t.pendingProps,i=t.elementType===r?i:en(r,i),null!==e&&(e.alternate=null,t.alternate=null,t.flags|=2),t.tag=1,pt(r)?(e=!0,yt(t)):e=!1,cn(t,n),Cn(t,r,i),Tn(t,r,i,n),ji(null,t,r,!0,e,n);case 19:return ra(e,t,n);case 22:return Gi(e,t,n)}throw Error(s(156,t.tag))},t.attemptContinuousHydration=function(e){13===e.tag&&(ws(e,134217728,bs()),co(e,134217728))},t.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=bs(),n=_s(e);ws(e,n,t),co(e,n)}},t.attemptSynchronousHydration=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=At(t.pendingLanes);0!==n&&(Rt(t,1|n),Ss(t,Nt()),0==(6&Xa)&&(ls(),qt()))}break;case 13:var r=bs();Ps((function(){return ws(e,1,r)})),co(e,1)}},t.batchedUpdates=function(e,t){var n=Xa;Xa|=1;try{return e(t)}finally{0===(Xa=n)&&(ls(),Xt&&qt())}},t.createComponentSelector=function(e){return{$$typeof:La,value:e}},t.createContainer=function(e,t,n,r,i,a,s){return so(e,t,!1,null,0,r,0,a,s)},t.createHasPseudoClassSelector=function(e){return{$$typeof:Da,value:e}},t.createHydrationContainer=function(e,t,n,r,i,a,s,o,l){return(e=so(n,r,!0,e,0,a,0,o,l)).context=oo(null),n=e.current,(a=gn(r=bs(),i=_s(n))).callback=null!=t?t:null,vn(n,a),e.current.lanes=i,Pt(e,i,r),Ss(e,r),e},t.createPortal=function(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:u,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},t.createRoleSelector=function(e){return{$$typeof:Ia,value:e}},t.createTestNameSelector=function(e){return{$$typeof:ka,value:e}},t.createTextSelector=function(e){return{$$typeof:Fa,value:e}},t.deferredUpdates=function(e){var t=Lt,n=Ja.transition;try{return Ja.transition=null,Lt=16,e()}finally{Lt=t,Ja.transition=n}},t.discreteUpdates=function(e,t,n,r,i){var a=Lt,s=Ja.transition;try{return Ja.transition=null,Lt=1,e(t,n,r,i)}finally{Lt=a,Ja.transition=s,0===Xa&&ls()}},t.findAllNodes=Ha,t.findBoundingRects=function(e,t){if(!re)throw Error(s(363));t=Ha(e,t),e=[];for(var n=0;n<t.length;n++)e.push(ae(t[n]));for(t=e.length-1;0<t;t--)for(var r=(n=e[t]).x,i=r+n.width,a=n.y,o=a+n.height,l=t-1;0<=l;l--)if(t!==l){var u=e[l],c=u.x,h=c+u.width,d=u.y,f=d+u.height;if(r>=c&&a>=d&&i<=h&&o<=f){e.splice(t,1);break}if(!(r!==c||n.width!==u.width||f<a||d>o)){d>a&&(u.height+=d-a,u.y=a),f<o&&(u.height=o-d),e.splice(t,1);break}if(!(a!==d||n.height!==u.height||h<r||c>i)){c>r&&(u.width+=c-r,u.x=r),h<i&&(u.width=i-c),e.splice(t,1);break}}return e},t.findHostInstance=lo,t.findHostInstanceWithNoPortals=function(e){return null===(e=null!==(e=E(e))?P(e):null)?null:e.stateNode},t.findHostInstanceWithWarning=function(e){return lo(e)},t.flushControlled=function(e){var t=Xa;Xa|=1;var n=Ja.transition,r=Lt;try{Ja.transition=null,Lt=1,e()}finally{Lt=r,Ja.transition=n,0===(Xa=t)&&(ls(),qt())}},t.flushPassiveEffects=Hs,t.flushSync=Ps,t.focusWithin=function(e,t){if(!re)throw Error(s(363));for(t=Ga(e=Na(e),t),t=Array.from(t),e=0;e<t.length;){var n=t[e++];if(!oe(n)){if(5===n.tag&&ue(n.stateNode))return!0;for(n=n.child;null!==n;)t.push(n),n=n.sibling}}return!1},t.getCurrentUpdatePriority=function(){return Lt},t.getFindAllNodesFailureDescription=function(e,t){if(!re)throw Error(s(363));var n=0,r=[];e=[Na(e),0];for(var i=0;i<e.length;){var a=e[i++],o=e[i++],l=t[o];if((5!==a.tag||!oe(a))&&(za(a,l)&&(r.push(Ua(l)),++o>n&&(n=o)),o<t.length))for(a=a.child;null!==a;)e.push(a,o),a=a.sibling}if(n<t.length){for(e=[];n<t.length;n++)e.push(Ua(t[n]));return"findAllNodes was able to match part of the selector:\n "+r.join(" > ")+"\n\nNo matching component was found for:\n "+e.join(" > ")}return null},t.getPublicRootInstance=function(e){return(e=e.current).child?5===e.child.tag?D(e.child.stateNode):e.child.stateNode:null},t.injectIntoDevTools=function(e){if(e={bundleType:e.bundleType,version:e.version,rendererPackageName:e.rendererPackageName,rendererConfig:e.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:o.ReactCurrentDispatcher,findHostInstanceByFiber:ho,findFiberByHostInstance:e.findFiberByHostInstance||fo,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},"undefined"==typeof __REACT_DEVTOOLS_GLOBAL_HOOK__)e=!1;else{var t=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(t.isDisabled||!t.supportsFiber)e=!0;else{try{Vt=t.inject(e),Wt=t}catch(e){}e=!!t.checkDCE}}return e},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(e,t,n,r){if(!re)throw Error(s(363));e=Ha(e,t);var i=ce(e,n,r).disconnect;return{disconnect:function(){i()}}},t.registerMutableSourceForHydration=function(e,t){var n=t._getVersion;n=n(t._source),null==e.mutableSourceEagerHydrationData?e.mutableSourceEagerHydrationData=[t,n]:e.mutableSourceEagerHydrationData.push(t,n)},t.runWithPriority=function(e,t){var n=Lt;try{return Lt=e,t()}finally{Lt=n}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(e,t,n,r){var i=t.current,a=bs(),s=_s(i);return n=oo(n),null===t.context?t.context=n:t.pendingContext=n,(t=gn(a,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),vn(i,t),null!==(e=ws(i,s,a))&&yn(e,i,s),s},t}},2576:(e,t,n)=>{"use strict";e.exports=n(6511)},6525:(e,t,n)=>{"use strict";e.exports=n(7287)},2546:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var o=2*(r+1)-1,l=e[o],u=o+1,c=e[u];if(0>a(l,n))u<i&&0>a(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[o]=n,r=o);else{if(!(u<i&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var u=[],c=[],h=1,d=null,f=3,p=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function _(e){if(g=!1,b(e),!m)if(null!==r(u))m=!0,D(w);else{var t=r(c);null!==t&&I(_,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,y(C),C=-1),p=!0;var a=f;try{for(b(n),d=r(u);null!==d&&(!(d.expirationTime>n)||e&&!B());){var s=d.callback;if("function"==typeof s){d.callback=null,f=d.priorityLevel;var o=s(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof o?d.callback=o:d===r(u)&&i(u),b(n)}else i(u);d=r(u)}if(null!==d)var l=!0;else{var h=r(c);null!==h&&I(_,h.startTime-n),l=!1}return l}finally{d=null,f=a,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var M,S=!1,A=null,C=-1,E=5,T=-1;function B(){return!(t.unstable_now()-T<E)}function P(){if(null!==A){var e=t.unstable_now();T=e;var n=!0;try{n=A(!0,e)}finally{n?M():(S=!1,A=null)}}else S=!1}if("function"==typeof x)M=function(){x(P)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,L=R.port2;R.port1.onmessage=P,M=function(){L.postMessage(null)}}else M=function(){v(P,0)};function D(e){A=e,S||(S=!0,M())}function I(e,n){C=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,D(w))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:h++,callback:i,priorityLevel:e,startTime:a,expirationTime:o=a+o,sortIndex:-1},a>s?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(g?(y(C),C=-1):g=!0,I(_,a-s))):(e.sortIndex=o,n(u,e),m||p||(m=!0,D(w))),e},t.unstable_shouldYield=B,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},373:(e,t,n)=>{"use strict";e.exports=n(2546)},3460:(e,t,n)=>{"use strict";n.d(t,{Z:()=>s});var r=n(7294),i=n(296),a=n.n(i);function s(e){let{debounce:t,scroll:n,polyfill:i,offsetSize:s}=void 0===e?{debounce:0,scroll:!1,offsetSize:!1}:e;const l=i||("undefined"==typeof window?class{}:window.ResizeObserver);if(!l)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[c,h]=(0,r.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),d=(0,r.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:c}),f=t?"number"==typeof t?t:t.scroll:null,p=t?"number"==typeof t?t:t.resize:null,m=(0,r.useRef)(!1);(0,r.useEffect)((()=>(m.current=!0,()=>{m.current=!1})));const[g,v,y]=(0,r.useMemo)((()=>{const e=()=>{if(!d.current.element)return;const{left:e,top:t,width:n,height:r,bottom:i,right:a,x:o,y:l}=d.current.element.getBoundingClientRect(),c={left:e,top:t,width:n,height:r,bottom:i,right:a,x:o,y:l};d.current.element instanceof HTMLElement&&s&&(c.height=d.current.element.offsetHeight,c.width=d.current.element.offsetWidth),Object.freeze(c),m.current&&!u(d.current.lastBounds,c)&&h(d.current.lastBounds=c)};return[e,p?a()(e,p):e,f?a()(e,f):e]}),[h,s,f,p]);function x(){d.current.scrollContainers&&(d.current.scrollContainers.forEach((e=>e.removeEventListener("scroll",y,!0))),d.current.scrollContainers=null),d.current.resizeObserver&&(d.current.resizeObserver.disconnect(),d.current.resizeObserver=null)}function b(){d.current.element&&(d.current.resizeObserver=new l(y),d.current.resizeObserver.observe(d.current.element),n&&d.current.scrollContainers&&d.current.scrollContainers.forEach((e=>e.addEventListener("scroll",y,{capture:!0,passive:!0}))))}var _,w,M;return _=y,w=Boolean(n),(0,r.useEffect)((()=>{if(w){const e=_;return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",e,!0)}}}),[_,w]),M=v,(0,r.useEffect)((()=>{const e=M;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[M]),(0,r.useEffect)((()=>{x(),b()}),[n,y,v]),(0,r.useEffect)((()=>x),[]),[e=>{e&&e!==d.current.element&&(x(),d.current.element=e,d.current.scrollContainers=o(e),b())},c,g]}function o(e){const t=[];if(!e||e===document.body)return t;const{overflow:n,overflowX:r,overflowY:i}=window.getComputedStyle(e);return[n,r,i].some((e=>"auto"===e||"scroll"===e))&&t.push(e),[...t,...o(e.parentElement)]}const l=["x","y","top","bottom","left","right","width","height"],u=(e,t)=>l.every((n=>e[n]===t[n]))},2408:(e,t)=>{"use strict";var n=Symbol.for("react.element"),r=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),a=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),o=Symbol.for("react.provider"),l=Symbol.for("react.context"),u=Symbol.for("react.forward_ref"),c=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),f=Symbol.iterator,p={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},m=Object.assign,g={};function v(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}function y(){}function x(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||p}v.prototype.isReactComponent={},v.prototype.setState=function(e,t){if("object"!=typeof e&&"function"!=typeof e&&null!=e)throw Error("setState(...): takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,t,"setState")},v.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")},y.prototype=v.prototype;var b=x.prototype=new y;b.constructor=x,m(b,v.prototype),b.isPureReactComponent=!0;var _=Array.isArray,w=Object.prototype.hasOwnProperty,M={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function A(e,t,r){var i,a={},s=null,o=null;if(null!=t)for(i in void 0!==t.ref&&(o=t.ref),void 0!==t.key&&(s=""+t.key),t)w.call(t,i)&&!S.hasOwnProperty(i)&&(a[i]=t[i]);var l=arguments.length-2;if(1===l)a.children=r;else if(1<l){for(var u=Array(l),c=0;c<l;c++)u[c]=arguments[c+2];a.children=u}if(e&&e.defaultProps)for(i in l=e.defaultProps)void 0===a[i]&&(a[i]=l[i]);return{$$typeof:n,type:e,key:s,ref:o,props:a,_owner:M.current}}function C(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var E=/\/+/g;function T(e,t){return"object"==typeof e&&null!==e&&null!=e.key?function(e){var t={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,(function(e){return t[e]}))}(""+e.key):t.toString(36)}function B(e,t,i,a,s){var o=typeof e;"undefined"!==o&&"boolean"!==o||(e=null);var l=!1;if(null===e)l=!0;else switch(o){case"string":case"number":l=!0;break;case"object":switch(e.$$typeof){case n:case r:l=!0}}if(l)return s=s(l=e),e=""===a?"."+T(l,0):a,_(s)?(i="",null!=e&&(i=e.replace(E,"$&/")+"/"),B(s,t,i,"",(function(e){return e}))):null!=s&&(C(s)&&(s=function(e,t){return{$$typeof:n,type:e.type,key:t,ref:e.ref,props:e.props,_owner:e._owner}}(s,i+(!s.key||l&&l.key===s.key?"":(""+s.key).replace(E,"$&/")+"/")+e)),t.push(s)),1;if(l=0,a=""===a?".":a+":",_(e))for(var u=0;u<e.length;u++){var c=a+T(o=e[u],u);l+=B(o,t,i,c,s)}else if(c=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=f&&e[f]||e["@@iterator"])?e:null}(e),"function"==typeof c)for(e=c.call(e),u=0;!(o=e.next()).done;)l+=B(o=o.value,t,i,c=a+T(o,u++),s);else if("object"===o)throw t=String(e),Error("Objects are not valid as a React child (found: "+("[object Object]"===t?"object with keys {"+Object.keys(e).join(", ")+"}":t)+"). If you meant to render a collection of children, use an array instead.");return l}function P(e,t,n){if(null==e)return e;var r=[],i=0;return B(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function R(e){if(-1===e._status){var t=e._result;(t=t()).then((function(t){0!==e._status&&-1!==e._status||(e._status=1,e._result=t)}),(function(t){0!==e._status&&-1!==e._status||(e._status=2,e._result=t)})),-1===e._status&&(e._status=0,e._result=t)}if(1===e._status)return e._result.default;throw e._result}var L={current:null},D={transition:null},I={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:D,ReactCurrentOwner:M};t.Children={map:P,forEach:function(e,t,n){P(e,(function(){t.apply(this,arguments)}),n)},count:function(e){var t=0;return P(e,(function(){t++})),t},toArray:function(e){return P(e,(function(e){return e}))||[]},only:function(e){if(!C(e))throw Error("React.Children.only expected to receive a single React element child.");return e}},t.Component=v,t.Fragment=i,t.Profiler=s,t.PureComponent=x,t.StrictMode=a,t.Suspense=c,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=I,t.cloneElement=function(e,t,r){if(null==e)throw Error("React.cloneElement(...): The argument must be a React element, but you passed "+e+".");var i=m({},e.props),a=e.key,s=e.ref,o=e._owner;if(null!=t){if(void 0!==t.ref&&(s=t.ref,o=M.current),void 0!==t.key&&(a=""+t.key),e.type&&e.type.defaultProps)var l=e.type.defaultProps;for(u in t)w.call(t,u)&&!S.hasOwnProperty(u)&&(i[u]=void 0===t[u]&&void 0!==l?l[u]:t[u])}var u=arguments.length-2;if(1===u)i.children=r;else if(1<u){l=Array(u);for(var c=0;c<u;c++)l[c]=arguments[c+2];i.children=l}return{$$typeof:n,type:e.type,key:a,ref:s,props:i,_owner:o}},t.createContext=function(e){return(e={$$typeof:l,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null,_defaultValue:null,_globalName:null}).Provider={$$typeof:o,_context:e},e.Consumer=e},t.createElement=A,t.createFactory=function(e){var t=A.bind(null,e);return t.type=e,t},t.createRef=function(){return{current:null}},t.forwardRef=function(e){return{$$typeof:u,render:e}},t.isValidElement=C,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:R}},t.memo=function(e,t){return{$$typeof:h,type:e,compare:void 0===t?null:t}},t.startTransition=function(e){var t=D.transition;D.transition={};try{e()}finally{D.transition=t}},t.unstable_act=function(){throw Error("act(...) is not supported in production builds of React.")},t.useCallback=function(e,t){return L.current.useCallback(e,t)},t.useContext=function(e){return L.current.useContext(e)},t.useDebugValue=function(){},t.useDeferredValue=function(e){return L.current.useDeferredValue(e)},t.useEffect=function(e,t){return L.current.useEffect(e,t)},t.useId=function(){return L.current.useId()},t.useImperativeHandle=function(e,t,n){return L.current.useImperativeHandle(e,t,n)},t.useInsertionEffect=function(e,t){return L.current.useInsertionEffect(e,t)},t.useLayoutEffect=function(e,t){return L.current.useLayoutEffect(e,t)},t.useMemo=function(e,t){return L.current.useMemo(e,t)},t.useReducer=function(e,t,n){return L.current.useReducer(e,t,n)},t.useRef=function(e){return L.current.useRef(e)},t.useState=function(e){return L.current.useState(e)},t.useSyncExternalStore=function(e,t,n){return L.current.useSyncExternalStore(e,t,n)},t.useTransition=function(){return L.current.useTransition()},t.version="18.2.0"},7294:(e,t,n)=>{"use strict";e.exports=n(2408)},53:(e,t)=>{"use strict";function n(e,t){var n=e.length;e.push(t);e:for(;0<n;){var r=n-1>>>1,i=e[r];if(!(0<a(i,t)))break e;e[r]=t,e[n]=i,n=r}}function r(e){return 0===e.length?null:e[0]}function i(e){if(0===e.length)return null;var t=e[0],n=e.pop();if(n!==t){e[0]=n;e:for(var r=0,i=e.length,s=i>>>1;r<s;){var o=2*(r+1)-1,l=e[o],u=o+1,c=e[u];if(0>a(l,n))u<i&&0>a(c,l)?(e[r]=c,e[u]=n,r=u):(e[r]=l,e[o]=n,r=o);else{if(!(u<i&&0>a(c,n)))break e;e[r]=c,e[u]=n,r=u}}}return t}function a(e,t){var n=e.sortIndex-t.sortIndex;return 0!==n?n:e.id-t.id}if("object"==typeof performance&&"function"==typeof performance.now){var s=performance;t.unstable_now=function(){return s.now()}}else{var o=Date,l=o.now();t.unstable_now=function(){return o.now()-l}}var u=[],c=[],h=1,d=null,f=3,p=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,x="undefined"!=typeof setImmediate?setImmediate:null;function b(e){for(var t=r(c);null!==t;){if(null===t.callback)i(c);else{if(!(t.startTime<=e))break;i(c),t.sortIndex=t.expirationTime,n(u,t)}t=r(c)}}function _(e){if(g=!1,b(e),!m)if(null!==r(u))m=!0,D(w);else{var t=r(c);null!==t&&I(_,t.startTime-e)}}function w(e,n){m=!1,g&&(g=!1,y(C),C=-1),p=!0;var a=f;try{for(b(n),d=r(u);null!==d&&(!(d.expirationTime>n)||e&&!B());){var s=d.callback;if("function"==typeof s){d.callback=null,f=d.priorityLevel;var o=s(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof o?d.callback=o:d===r(u)&&i(u),b(n)}else i(u);d=r(u)}if(null!==d)var l=!0;else{var h=r(c);null!==h&&I(_,h.startTime-n),l=!1}return l}finally{d=null,f=a,p=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var M,S=!1,A=null,C=-1,E=5,T=-1;function B(){return!(t.unstable_now()-T<E)}function P(){if(null!==A){var e=t.unstable_now();T=e;var n=!0;try{n=A(!0,e)}finally{n?M():(S=!1,A=null)}}else S=!1}if("function"==typeof x)M=function(){x(P)};else if("undefined"!=typeof MessageChannel){var R=new MessageChannel,L=R.port2;R.port1.onmessage=P,M=function(){L.postMessage(null)}}else M=function(){v(P,0)};function D(e){A=e,S||(S=!0,M())}function I(e,n){C=v((function(){e(t.unstable_now())}),n)}t.unstable_IdlePriority=5,t.unstable_ImmediatePriority=1,t.unstable_LowPriority=4,t.unstable_NormalPriority=3,t.unstable_Profiling=null,t.unstable_UserBlockingPriority=2,t.unstable_cancelCallback=function(e){e.callback=null},t.unstable_continueExecution=function(){m||p||(m=!0,D(w))},t.unstable_forceFrameRate=function(e){0>e||125<e?console.error("forceFrameRate takes a positive int between 0 and 125, forcing frame rates higher than 125 fps is not supported"):E=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return f},t.unstable_getFirstCallbackNode=function(){return r(u)},t.unstable_next=function(e){switch(f){case 1:case 2:case 3:var t=3;break;default:t=f}var n=f;f=t;try{return e()}finally{f=n}},t.unstable_pauseExecution=function(){},t.unstable_requestPaint=function(){},t.unstable_runWithPriority=function(e,t){switch(e){case 1:case 2:case 3:case 4:case 5:break;default:e=3}var n=f;f=e;try{return t()}finally{f=n}},t.unstable_scheduleCallback=function(e,i,a){var s=t.unstable_now();switch(a="object"==typeof a&&null!==a&&"number"==typeof(a=a.delay)&&0<a?s+a:s,e){case 1:var o=-1;break;case 2:o=250;break;case 5:o=1073741823;break;case 4:o=1e4;break;default:o=5e3}return e={id:h++,callback:i,priorityLevel:e,startTime:a,expirationTime:o=a+o,sortIndex:-1},a>s?(e.sortIndex=a,n(c,e),null===r(u)&&e===r(c)&&(g?(y(C),C=-1):g=!0,I(_,a-s))):(e.sortIndex=o,n(u,e),m||p||(m=!0,D(w))),e},t.unstable_shouldYield=B,t.unstable_wrapCallback=function(e){var t=f;return function(){var n=f;f=t;try{return e.apply(this,arguments)}finally{f=n}}}},3840:(e,t,n)=>{"use strict";e.exports=n(53)},4881:(e,t,n)=>{"use strict";function r(e,t,n=((e,t)=>e===t)){if(e===t)return!0;if(!e||!t)return!1;const r=e.length;if(t.length!==r)return!1;for(let i=0;i<r;i++)if(!n(e[i],t[i]))return!1;return!0}n.d(t,{MA:()=>o,Rq:()=>s,ZH:()=>l});const i=[];function a(e,t,n=!1,a={}){for(const e of i)if(r(t,e.keys,e.equal)){if(n)return;if(Object.prototype.hasOwnProperty.call(e,"error"))throw e.error;if(Object.prototype.hasOwnProperty.call(e,"response"))return e.response;if(!n)throw e.promise}const s={keys:t,equal:a.equal,promise:e(...t).then((e=>s.response=e)).then((()=>{a.lifespan&&a.lifespan>0&&setTimeout((()=>{const e=i.indexOf(s);-1!==e&&i.splice(e,1)}),a.lifespan)})).catch((e=>s.error=e))};if(i.push(s),!n)throw s.promise}const s=(e,t,n)=>a(e,t,!1,n),o=(e,t,n)=>{a(e,t,!0,n)},l=e=>{if(void 0===e||0===e.length)i.splice(0,i.length);else{const t=i.find((t=>r(e,t.keys,t.equal)));if(t){const e=i.indexOf(t);-1!==e&&i.splice(e,1)}}}},6295:(e,t,n)=>{"use strict";let r;n.d(t,{z:()=>i});const i=()=>{if(r)return r;const e=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),t=new Uint8Array([32,0,65,253,3,1,2,34,4,106,6,5,11,8,7,20,13,33,12,16,128,9,116,64,19,113,127,15,10,21,22,14,255,66,24,54,136,107,18,23,192,26,114,118,132,17,77,101,130,144,27,87,131,44,45,74,156,154,70,167]);if("object"!=typeof WebAssembly)return{supported:!1};let n,i="B9h9z9tFBBBF8fL9gBB9gLaaaaaFa9gEaaaB9gFaFa9gEaaaFaEMcBFFFGGGEIIILF9wFFFLEFBFKNFaFCx/IFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBF8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBGy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBEn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBIi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBKI9z9iqlBOc+x8ycGBM/qQFTa8jUUUUBCU/EBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAGTkUUUBRNCUoBAG9uC/wgBZHKCUGAKCUG9JyRVAECFJRICBRcGXEXAcAF9PQFAVAFAclAcAVJAF9JyRMGXGXAG9FQBAMCbJHKC9wZRSAKCIrCEJCGrRQANCUGJRfCBRbAIRTEXGXAOATlAQ9PQBCBRISEMATAQJRIGXAS9FQBCBRtCBREEXGXAOAIlCi9PQBCBRISLMANCU/CBJAEJRKGXGXGXGXGXATAECKrJ2BBAtCKZrCEZfIBFGEBMAKhB83EBAKCNJhB83EBSEMAKAI2BIAI2BBHmCKrHYAYCE6HYy86BBAKCFJAICIJAYJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCGJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCEJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCIJAYAmJHY2BBAI2BFHmCKrHPAPCE6HPy86BBAKCLJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCKJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCOJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCNJAYAmJHY2BBAI2BGHmCKrHPAPCE6HPy86BBAKCVJAYAPJHY2BBAmCIrCEZHPAPCE6HPy86BBAKCcJAYAPJHY2BBAmCGrCEZHPAPCE6HPy86BBAKCMJAYAPJHY2BBAmCEZHmAmCE6Hmy86BBAKCSJAYAmJHm2BBAI2BEHICKrHYAYCE6HYy86BBAKCQJAmAYJHm2BBAICIrCEZHYAYCE6HYy86BBAKCfJAmAYJHm2BBAICGrCEZHYAYCE6HYy86BBAKCbJAmAYJHK2BBAICEZHIAICE6HIy86BBAKAIJRISGMAKAI2BNAI2BBHmCIrHYAYCb6HYy86BBAKCFJAICNJAYJHY2BBAmCbZHmAmCb6Hmy86BBAKCGJAYAmJHm2BBAI2BFHYCIrHPAPCb6HPy86BBAKCEJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCIJAmAYJHm2BBAI2BGHYCIrHPAPCb6HPy86BBAKCLJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCKJAmAYJHm2BBAI2BEHYCIrHPAPCb6HPy86BBAKCOJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCNJAmAYJHm2BBAI2BIHYCIrHPAPCb6HPy86BBAKCVJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCcJAmAYJHm2BBAI2BLHYCIrHPAPCb6HPy86BBAKCMJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCSJAmAYJHm2BBAI2BKHYCIrHPAPCb6HPy86BBAKCQJAmAPJHm2BBAYCbZHYAYCb6HYy86BBAKCfJAmAYJHm2BBAI2BOHICIrHYAYCb6HYy86BBAKCbJAmAYJHK2BBAICbZHIAICb6HIy86BBAKAIJRISFMAKAI8pBB83BBAKCNJAICNJ8pBB83BBAICTJRIMAtCGJRtAECTJHEAS9JQBMMGXAIQBCBRISEMGXAM9FQBANAbJ2BBRtCBRKAfREEXAEANCU/CBJAKJ2BBHTCFrCBATCFZl9zAtJHt86BBAEAGJREAKCFJHKAM9HQBMMAfCFJRfAIRTAbCFJHbAG9HQBMMABAcAG9sJANCUGJAMAG9sTkUUUBpANANCUGJAMCaJAG9sJAGTkUUUBpMAMCBAIyAcJRcAIQBMC9+RKSFMCBC99AOAIlAGCAAGCA9Ly6yRKMALCU/EBJ8kUUUUBAKM+OmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUFT+JUUUBpALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM+lLKFaF99GaG99FaG99GXGXAGCI9HQBAF9FQFEXGXGX9DBBB8/9DBBB+/ABCGJHG1BB+yAB1BBHE+yHI+L+TABCFJHL1BBHK+yHO+L+THN9DBBBB9gHVyAN9DBB/+hANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE86BBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG86BBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG86BBABCIJRBAFCaJHFQBSGMMAF9FQBEXGXGX9DBBB8/9DBBB+/ABCIJHG8uFB+yAB8uFBHE+yHI+L+TABCGJHL8uFBHK+yHO+L+THN9DBBBB9gHVyAN9DB/+g6ANAN+U9DBBBBANAVyHcAc+MHMAECa3yAI+SHIAI+UAcAMAKCa3yAO+SHcAc+U+S+S+R+VHO+U+SHN+L9DBBB9P9d9FQBAN+oRESFMCUUUU94REMAGAE87FBGXGX9DBBB8/9DBBB+/Ac9DBBBB9gyAcAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMALAG87FBGXGX9DBBB8/9DBBB+/AI9DBBBB9gyAIAO+U+SHN+L9DBBB9P9d9FQBAN+oRGSFMCUUUU94RGMABAG87FBABCNJRBAFCaJHFQBMMM/SEIEaE99EaF99GXAF9FQBCBREABRIEXGXGX9D/zI818/AICKJ8uFBHLCEq+y+VHKAI8uFB+y+UHO9DB/+g6+U9DBBB8/9DBBB+/AO9DBBBB9gy+SHN+L9DBBB9P9d9FQBAN+oRVSFMCUUUU94RVMAICIJ8uFBRcAICGJ8uFBRMABALCFJCEZAEqCFWJAV87FBGXGXAKAM+y+UHN9DB/+g6+U9DBBB8/9DBBB+/AN9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRMSFMCUUUU94RMMABALCGJCEZAEqCFWJAM87FBGXGXAKAc+y+UHK9DB/+g6+U9DBBB8/9DBBB+/AK9DBBBB9gy+SHS+L9DBBB9P9d9FQBAS+oRcSFMCUUUU94RcMABALCaJCEZAEqCFWJAc87FBGXGX9DBBU8/AOAO+U+TANAN+U+TAKAK+U+THO9DBBBBAO9DBBBB9gy+R9DB/+g6+U9DBBB8/+SHO+L9DBBB9P9d9FQBAO+oRcSFMCUUUU94RcMABALCEZAEqCFWJAc87FBAICNJRIAECIJREAFCaJHFQBMMM9JBGXAGCGrAF9sHF9FQBEXABAB8oGBHGCNWCN91+yAGCi91CnWCUUU/8EJ+++U84GBABCIJRBAFCaJHFQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEM/lFFFaGXGXAFABqCEZ9FQBABRESFMGXGXAGCT9PQBABRESFMABREEXAEAF8oGBjGBAECIJAFCIJ8oGBjGBAECNJAFCNJ8oGBjGBAECSJAFCSJ8oGBjGBAECTJREAFCTJRFAGC9wJHGCb9LQBMMAGCI9JQBEXAEAF8oGBjGBAFCIJRFAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF2BB86BBAECFJREAFCFJRFAGCaJHGQBMMABMoFFGaGXGXABCEZ9FQBABRESFMAFCgFZC+BwsN9sRIGXGXAGCT9PQBABRESFMABREEXAEAIjGBAECSJAIjGBAECNJAIjGBAECIJAIjGBAECTJREAGC9wJHGCb9LQBMMAGCI9JQBEXAEAIjGBAECIJREAGC98JHGCE9LQBMMGXAG9FQBEXAEAF86BBAECFJREAGCaJHGQBMMABMMMFBCUNMIT9kBB";WebAssembly.validate(e)&&(i="B9h9z9tFBBBFiI9gBB9gLaaaaaFa9gEaaaB9gFaFaEMcBBFBFFGGGEILF9wFFFLEFBFKNFaFCx/aFMO/LFVK9tv9t9vq95GBt9f9f939h9z9t9f9j9h9s9s9f9jW9vq9zBBp9tv9z9o9v9wW9f9kv9j9v9kv9WvqWv94h919m9mvqBG8Z9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv94h919m9mvqBIy9tv9z9o9v9wW9f9kv9j9v9kv9J9u9kv949TvZ91v9u9jvBLn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9P9jWBKi9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9R919hWBOn9tv9z9o9v9wW9f9kv9j9v9kv69p9sWvq9F949wBNI9z9iqlBVc+N9IcIBTEM9+FLa8jUUUUBCTlRBCBRFEXCBRGCBREEXABCNJAGJAECUaAFAGrCFZHIy86BBAEAIJREAGCFJHGCN9HQBMAFCx+YUUBJAE86BBAFCEWCxkUUBJAB8pEN83EBAFCFJHFCUG9HQBMMk8lLbaE97F9+FaL978jUUUUBCU/KBlHL8kUUUUBC9+RKGXAGCFJAI9LQBCaRKAE2BBC+gF9HQBALAEAIJHOAGlAG/8cBBCUoBAG9uC/wgBZHKCUGAKCUG9JyRNAECFJRKCBRVGXEXAVAF9PQFANAFAVlAVANJAF9JyRcGXGXAG9FQBAcCbJHIC9wZHMCE9sRSAMCFWRQAICIrCEJCGrRfCBRbEXAKRTCBRtGXEXGXAOATlAf9PQBCBRKSLMALCU/CBJAtAM9sJRmATAfJRKCBREGXAMCoB9JQBAOAKlC/gB9JQBCBRIEXAmAIJREGXGXGXGXGXATAICKrJ2BBHYCEZfIBFGEBMAECBDtDMIBSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIBAKCTJRKMGXGXGXGXGXAYCGrCEZfIBFGEBMAECBDtDMITSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMITAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMITAKCTJRKMGXGXGXGXGXAYCIrCEZfIBFGEBMAECBDtDMIASEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIAAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAEAKDBBBDMIAAKCTJRKMGXGXGXGXGXAYCKrfIBFGEBMAECBDtDMI8wSEMAEAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCIJAeDeBJAYCx+YUUBJ2BBJRKSGMAEAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHYCEWCxkUUBJDBEBAYCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHYCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMI8wAKCNJAeDeBJAYCx+YUUBJ2BBJRKSFMAEAKDBBBDMI8wAKCTJRKMAICoBJREAICUFJAM9LQFAERIAOAKlC/fB9LQBMMGXAEAM9PQBAECErRIEXGXAOAKlCi9PQBCBRKSOMAmAEJRYGXGXGXGXGXATAECKrJ2BBAICKZrCEZfIBFGEBMAYCBDtDMIBSEMAYAKDBBIAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnHPCGD+MFAPDQBTFtGmEYIPLdKeOnC0+G+MiDtD9OHdCEDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCIJAeDeBJAiCx+YUUBJ2BBJRKSGMAYAKDBBNAKDBBBHPCID+MFAPDQBTFtGmEYIPLdKeOnC+P+e+8/4BDtD9OHdCbDbD8jHPAPDQBFGENVcMILKOSQfbHeD8dBh+BsxoxoUwN0AeD8dFhxoUwkwk+gUa0sHnhTkAnsHnhNkAnsHn7CgFZHiCEWCxkUUBJDBEBAiCx+YUUBJDBBBHeAeDQBBBBBBBBBBBBBBBBAnhAk7CgFZHiCEWCxkUUBJDBEBD9uDQBFGEILKOTtmYPdenDfAdAPD9SDMIBAKCNJAeDeBJAiCx+YUUBJ2BBJRKSFMAYAKDBBBDMIBAKCTJRKMAICGJRIAECTJHEAM9JQBMMGXAK9FQBAKRTAtCFJHtCI6QGSFMMCBRKSEMGXAM9FQBALCUGJAbJREALAbJDBGBReCBRYEXAEALCU/CBJAYJHIDBIBHdCFD9tAdCFDbHPD9OD9hD9RHdAIAMJDBIBH8ZCFD9tA8ZAPD9OD9hD9RH8ZDQBTFtGmEYIPLdKeOnHpAIAQJDBIBHyCFD9tAyAPD9OD9hD9RHyAIASJDBIBH8cCFD9tA8cAPD9OD9hD9RH8cDQBTFtGmEYIPLdKeOnH8dDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGEAeD9uHeDyBjGBAEAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeApA8dDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNiV8ZcpMyS8cQ8df8eb8fHdAyA8cDQNiV8ZcpMyS8cQ8df8eb8fH8ZDQBFTtGEmYILPdKOenHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJHIAeAdA8ZDQNVi8ZcMpySQ8c8dfb8e8fHPAPDQBFGEBFGEBFGEBFGED9uHeDyBjGBAIAGJHIAeAPAPDQILKOILKOILKOILKOD9uHeDyBjGBAIAGJHIAeAPAPDQNVcMNVcMNVcMNVcMD9uHeDyBjGBAIAGJHIAeAPAPDQSQfbSQfbSQfbSQfbD9uHeDyBjGBAIAGJREAYCTJHYAM9JQBMMAbCIJHbAG9JQBMMABAVAG9sJALCUGJAcAG9s/8cBBALALCUGJAcCaJAG9sJAG/8cBBMAcCBAKyAVJRVAKQBMC9+RKSFMCBC99AOAKlAGCAAGCA9Ly6yRKMALCU/KBJ8kUUUUBAKMNBT+BUUUBM+KmFTa8jUUUUBCoFlHL8kUUUUBC9+RKGXAFCE9uHOCtJAI9LQBCaRKAE2BBHNC/wFZC/gF9HQBANCbZHVCF9LQBALCoBJCgFCUF/8MBALC84Jha83EBALC8wJha83EBALC8oJha83EBALCAJha83EBALCiJha83EBALCTJha83EBALha83ENALha83EBAEAIJC9wJRcAECFJHNAOJRMGXAF9FQBCQCbAVCF6yRSABRECBRVCBRQCBRfCBRICBRKEXGXAMAcuQBC9+RKSEMGXGXAN2BBHOC/vF9LQBALCoBJAOCIrCa9zAKJCbZCEWJHb8oGIRTAb8oGBRtGXAOCbZHbAS9PQBALAOCa9zAIJCbZCGWJ8oGBAVAbyROAb9FRbGXGXAGCG9HQBABAt87FBABCIJAO87FBABCGJAT87FBSFMAEAtjGBAECNJAOjGBAECIJATjGBMAVAbJRVALCoBJAKCEWJHmAOjGBAmATjGIALAICGWJAOjGBALCoBJAKCFJCbZHKCEWJHTAtjGBATAOjGIAIAbJRIAKCFJRKSGMGXGXAbCb6QBAQAbJAbC989zJCFJRQSFMAM1BBHbCgFZROGXGXAbCa9MQBAMCFJRMSFMAM1BFHbCgBZCOWAOCgBZqROGXAbCa9MQBAMCGJRMSFMAM1BGHbCgBZCfWAOqROGXAbCa9MQBAMCEJRMSFMAM1BEHbCgBZCdWAOqROGXAbCa9MQBAMCIJRMSFMAM2BIC8cWAOqROAMCLJRMMAOCFrCBAOCFZl9zAQJRQMGXGXAGCG9HQBABAt87FBABCIJAQ87FBABCGJAT87FBSFMAEAtjGBAECNJAQjGBAECIJATjGBMALCoBJAKCEWJHOAQjGBAOATjGIALAICGWJAQjGBALCoBJAKCFJCbZHKCEWJHOAtjGBAOAQjGIAICFJRIAKCFJRKSFMGXAOCDF9LQBALAIAcAOCbZJ2BBHbCIrHTlCbZCGWJ8oGBAVCFJHtATyROALAIAblCbZCGWJ8oGBAtAT9FHmJHtAbCbZHTyRbAT9FRTGXGXAGCG9HQBABAV87FBABCIJAb87FBABCGJAO87FBSFMAEAVjGBAECNJAbjGBAECIJAOjGBMALAICGWJAVjGBALCoBJAKCEWJHYAOjGBAYAVjGIALAICFJHICbZCGWJAOjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAIAmJCbZHICGWJAbjGBALCoBJAKCGJCbZHKCEWJHOAVjGBAOAbjGIAKCFJRKAIATJRIAtATJRVSFMAVCBAM2BBHYyHTAOC/+F6HPJROAYCbZRtGXGXAYCIrHmQBAOCFJRbSFMAORbALAIAmlCbZCGWJ8oGBROMGXGXAtQBAbCFJRVSFMAbRVALAIAYlCbZCGWJ8oGBRbMGXGXAP9FQBAMCFJRYSFMAM1BFHYCgFZRTGXGXAYCa9MQBAMCGJRYSFMAM1BGHYCgBZCOWATCgBZqRTGXAYCa9MQBAMCEJRYSFMAM1BEHYCgBZCfWATqRTGXAYCa9MQBAMCIJRYSFMAM1BIHYCgBZCdWATqRTGXAYCa9MQBAMCLJRYSFMAMCKJRYAM2BLC8cWATqRTMATCFrCBATCFZl9zAQJHQRTMGXGXAmCb6QBAYRPSFMAY1BBHMCgFZROGXGXAMCa9MQBAYCFJRPSFMAY1BFHMCgBZCOWAOCgBZqROGXAMCa9MQBAYCGJRPSFMAY1BGHMCgBZCfWAOqROGXAMCa9MQBAYCEJRPSFMAY1BEHMCgBZCdWAOqROGXAMCa9MQBAYCIJRPSFMAYCLJRPAY2BIC8cWAOqROMAOCFrCBAOCFZl9zAQJHQROMGXGXAtCb6QBAPRMSFMAP1BBHMCgFZRbGXGXAMCa9MQBAPCFJRMSFMAP1BFHMCgBZCOWAbCgBZqRbGXAMCa9MQBAPCGJRMSFMAP1BGHMCgBZCfWAbqRbGXAMCa9MQBAPCEJRMSFMAP1BEHMCgBZCdWAbqRbGXAMCa9MQBAPCIJRMSFMAPCLJRMAP2BIC8cWAbqRbMAbCFrCBAbCFZl9zAQJHQRbMGXGXAGCG9HQBABAT87FBABCIJAb87FBABCGJAO87FBSFMAEATjGBAECNJAbjGBAECIJAOjGBMALCoBJAKCEWJHYAOjGBAYATjGIALAICGWJATjGBALCoBJAKCFJCbZCEWJHYAbjGBAYAOjGIALAICFJHICbZCGWJAOjGBALCoBJAKCGJCbZCEWJHOATjGBAOAbjGIALAIAm9FAmCb6qJHICbZCGWJAbjGBAIAt9FAtCb6qJRIAKCEJRKMANCFJRNABCKJRBAECSJREAKCbZRKAICbZRIAfCEJHfAF9JQBMMCBC99AMAc6yRKMALCoFJ8kUUUUBAKM/tIFGa8jUUUUBCTlRLC9+RKGXAFCLJAI9LQBCaRKAE2BBC/+FZC/QF9HQBALhB83ENAECFJRKAEAIJC98JREGXAF9FQBGXAGCG6QBEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMALCNJAICFZCGWqHGAICGrCBAICFrCFZl9zAG8oGBJHIjGBABAIjGBABCIJRBAFCaJHFQBSGMMEXGXAKAE9JQBC9+bMAK1BBHGCgFZRIGXGXAGCa9MQBAKCFJRKSFMAK1BFHGCgBZCOWAICgBZqRIGXAGCa9MQBAKCGJRKSFMAK1BGHGCgBZCfWAIqRIGXAGCa9MQBAKCEJRKSFMAK1BEHGCgBZCdWAIqRIGXAGCa9MQBAKCIJRKSFMAK2BIC8cWAIqRIAKCLJRKMABAICGrCBAICFrCFZl9zALCNJAICFZCGWqHI8oGBJHG87FBAIAGjGBABCGJRBAFCaJHFQBMMCBC99AKAE6yRKMAKM/dLEK97FaF97GXGXAGCI9HQBAF9FQFCBRGEXABABDBBBHECiD+rFCiD+sFD/6FHIAECND+rFCiD+sFD/6FAID/gFAECTD+rFCiD+sFD/6FHLD/gFD/kFD/lFHKCBDtD+2FHOAICUUUU94DtHND9OD9RD/kFHI9DBB/+hDYAIAID/mFAKAKD/mFALAOALAND9OD9RD/kFHIAID/mFD/kFD/kFD/jFD/nFHLD/mF9DBBX9LDYHOD/kFCgFDtD9OAECUUU94DtD9OD9QAIALD/mFAOD/kFCND+rFCU/+EDtD9OD9QAKALD/mFAOD/kFCTD+rFCUU/8ODtD9OD9QDMBBABCTJRBAGCIJHGAF9JQBSGMMAF9FQBCBRGEXABCTJHVAVDBBBHECBDtHOCUU98D8cFCUU98D8cEHND9OABDBBBHKAEDQILKOSQfbPden8c8d8e8fCggFDtD9OD/6FAKAEDQBFGENVcMTtmYi8ZpyHECTD+sFD/6FHID/gFAECTD+rFCTD+sFD/6FHLD/gFD/kFD/lFHE9DB/+g6DYALAEAOD+2FHOALCUUUU94DtHcD9OD9RD/kFHLALD/mFAEAED/mFAIAOAIAcD9OD9RD/kFHEAED/mFD/kFD/kFD/jFD/nFHID/mF9DBBX9LDYHOD/kFCTD+rFALAID/mFAOD/kFCggEDtD9OD9QHLAEAID/mFAOD/kFCaDbCBDnGCBDnECBDnKCBDnOCBDncCBDnMCBDnfCBDnbD9OHEDQNVi8ZcMpySQ8c8dfb8e8fD9QDMBBABAKAND9OALAEDQBFTtGEmYILPdKOenD9QDMBBABCAJRBAGCIJHGAF9JQBMMM/hEIGaF97FaL978jUUUUBCTlREGXAF9FQBCBRIEXAEABDBBBHLABCTJHKDBBBHODQILKOSQfbPden8c8d8e8fHNCTD+sFHVCID+rFDMIBAB9DBBU8/DY9D/zI818/DYAVCEDtD9QD/6FD/nFHVALAODQBFGENVcMTtmYi8ZpyHLCTD+rFCTD+sFD/6FD/mFHOAOD/mFAVALCTD+sFD/6FD/mFHcAcD/mFAVANCTD+rFCTD+sFD/6FD/mFHNAND/mFD/kFD/kFD/lFCBDtD+4FD/jF9DB/+g6DYHVD/mF9DBBX9LDYHLD/kFCggEDtHMD9OAcAVD/mFALD/kFCTD+rFD9QHcANAVD/mFALD/kFCTD+rFAOAVD/mFALD/kFAMD9OD9QHVDQBFTtGEmYILPdKOenHLD8dBAEDBIBDyB+t+J83EBABCNJALD8dFAEDBIBDyF+t+J83EBAKAcAVDQNVi8ZcMpySQ8c8dfb8e8fHVD8dBAEDBIBDyG+t+J83EBABCiJAVD8dFAEDBIBDyE+t+J83EBABCAJRBAICIJHIAF9JQBMMM9jFF97GXAGCGrAF9sHG9FQBCBRFEXABABDBBBHECND+rFCND+sFD/6FAECiD+sFCnD+rFCUUU/8EDtD+uFD/mFDMBBABCTJRBAFCIJHFAG9JQBMMM9TFEaCBCB8oGUkUUBHFABCEJC98ZJHBjGUkUUBGXGXAB8/BCTWHGuQBCaREABAGlCggEJCTrXBCa6QFMAFREMAEMMMFBCUNMIT9tBB");const a=WebAssembly.instantiate(function(e){const n=new Uint8Array(e.length);for(let t=0;t<e.length;++t){const r=e.charCodeAt(t);n[t]=r>96?r-71:r>64?r-65:r>47?r+4:r>46?63:62}let r=0;for(let i=0;i<e.length;++i)n[r++]=n[i]<60?t[n[i]]:64*(n[i]-60)+n[++i];return n.buffer.slice(0,r)}(i),{}).then((e=>{n=e.instance,n.exports.__wasm_call_ctors()}));function s(e,t,r,i,a,s){const o=n.exports.sbrk,l=r+3&-4,u=o(l*i),c=o(a.length),h=new Uint8Array(n.exports.memory.buffer);h.set(a,c);const d=e(u,r,i,c,a.length);if(0===d&&s&&s(u,l,i),t.set(h.subarray(u,u+r*i)),o(u-o(0)),0!==d)throw new Error(`Malformed buffer data: ${d}`)}const o={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},l={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return r={ready:a,supported:!0,decodeVertexBuffer(e,t,r,i,a){s(n.exports.meshopt_decodeVertexBuffer,e,t,r,i,n.exports[o[a]])},decodeIndexBuffer(e,t,r,i){s(n.exports.meshopt_decodeIndexBuffer,e,t,r,i)},decodeIndexSequence(e,t,r,i){s(n.exports.meshopt_decodeIndexSequence,e,t,r,i)},decodeGltfBuffer(e,t,r,i,a,u){s(n.exports[l[a]],e,t,r,i,n.exports[o[u]])}},r}},4976:(e,t,n)=>{"use strict";n.d(t,{_:()=>a});var r=n(9477);const i=new WeakMap;class a extends r.Loader{constructor(e){super(e),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(e){return this.decoderPath=e,this}setDecoderConfig(e){return this.decoderConfig=e,this}setWorkerLimit(e){return this.workerLimit=e,this}load(e,t,n,i){const a=new r.FileLoader(this.manager);a.setPath(this.path),a.setResponseType("arraybuffer"),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(e=>{const n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(i)}),n,i)}decodeDracoFile(e,t,n,r){const i={attributeIDs:n||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!n};this.decodeGeometry(e,i).then(t)}decodeGeometry(e,t){for(const e in t.attributeTypes){const n=t.attributeTypes[e];void 0!==n.BYTES_PER_ELEMENT&&(t.attributeTypes[e]=n.name)}const n=JSON.stringify(t);if(i.has(e)){const t=i.get(e);if(t.key===n)return t.promise;if(0===e.byteLength)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const a=this.workerNextTaskID++,s=e.byteLength,o=this._getWorker(a,s).then((n=>(r=n,new Promise(((n,i)=>{r._callbacks[a]={resolve:n,reject:i},r.postMessage({type:"decode",id:a,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return o.catch((()=>!0)).then((()=>{r&&a&&this._releaseTask(r,a)})),i.set(e,{key:n,promise:o}),o}_createGeometry(e){const t=new r.BufferGeometry;e.index&&t.setIndex(new r.BufferAttribute(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const i=e.attributes[n],a=i.name,s=i.array,o=i.itemSize;t.setAttribute(a,new r.BufferAttribute(s,o))}return t}_loadLibrary(e,t){const n=new r.FileLoader(this.manager);return n.setPath(this.decoderPath),n.setResponseType(t),n.setWithCredentials(this.withCredentials),new Promise(((t,r)=>{n.load(e,t,void 0,r)}))}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e="object"!=typeof WebAssembly||"js"===this.decoderConfig.type,t=[];return e?t.push(this._loadLibrary("draco_decoder.js","text")):(t.push(this._loadLibrary("draco_wasm_wrapper.js","text")),t.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(t).then((t=>{const n=t[0];e||(this.decoderConfig.wasmBinary=t[1]);const r=s.toString(),i=["/* draco decoder */",n,"","/* worker */",r.substring(r.indexOf("{")+1,r.lastIndexOf("}"))].join("\n");this.workerSourceURL=URL.createObjectURL(new Blob([i]))})),this.decoderPending}_getWorker(e,t){return this._initDecoder().then((()=>{if(this.workerPool.length<this.workerLimit){const e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:"init",decoderConfig:this.decoderConfig}),e.onmessage=function(t){const n=t.data;switch(n.type){case"decode":e._callbacks[n.id].resolve(n);break;case"error":e._callbacks[n.id].reject(n);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+n.type+'"')}},this.workerPool.push(e)}else this.workerPool.sort((function(e,t){return e._taskLoad>t._taskLoad?-1:1}));const n=this.workerPool[this.workerPool.length-1];return n._taskCosts[e]=t,n._taskLoad+=t,n}))}_releaseTask(e,t){e._taskLoad-=e._taskCosts[t],delete e._callbacks[t],delete e._taskCosts[t]}debug(){console.log("Task load: ",this.workerPool.map((e=>e._taskLoad)))}dispose(){for(let e=0;e<this.workerPool.length;++e)this.workerPool[e].terminate();return this.workerPool.length=0,this}}function s(){let e,t;function n(e,t,n,r,i,a){const s=a.num_components(),o=n.num_points()*s,l=o*i.BYTES_PER_ELEMENT,u=function(e,t){switch(t){case Float32Array:return e.DT_FLOAT32;case Int8Array:return e.DT_INT8;case Int16Array:return e.DT_INT16;case Int32Array:return e.DT_INT32;case Uint8Array:return e.DT_UINT8;case Uint16Array:return e.DT_UINT16;case Uint32Array:return e.DT_UINT32}}(e,i),c=e._malloc(l);t.GetAttributeDataArrayForAllPoints(n,a,u,l,c);const h=new i(e.HEAPF32.buffer,c,o).slice();return e._free(c),{name:r,array:h,itemSize:s}}onmessage=function(r){const i=r.data;switch(i.type){case"init":e=i.decoderConfig,t=new Promise((function(t){e.onModuleLoaded=function(e){t({draco:e})},DracoDecoderModule(e)}));break;case"decode":const r=i.buffer,a=i.taskConfig;t.then((e=>{const t=e.draco,s=new t.Decoder,o=new t.DecoderBuffer;o.Init(new Int8Array(r),r.byteLength);try{const e=function(e,t,r,i){const a=i.attributeIDs,s=i.attributeTypes;let o,l;const u=t.GetEncodedGeometryType(r);if(u===e.TRIANGULAR_MESH)o=new e.Mesh,l=t.DecodeBufferToMesh(r,o);else{if(u!==e.POINT_CLOUD)throw new Error("THREE.DRACOLoader: Unexpected geometry type.");o=new e.PointCloud,l=t.DecodeBufferToPointCloud(r,o)}if(!l.ok()||0===o.ptr)throw new Error("THREE.DRACOLoader: Decoding failed: "+l.error_msg());const c={index:null,attributes:[]};for(const r in a){const l=self[s[r]];let u,h;if(i.useUniqueIDs)h=a[r],u=t.GetAttributeByUniqueId(o,h);else{if(h=t.GetAttributeId(o,e[a[r]]),-1===h)continue;u=t.GetAttribute(o,h)}c.attributes.push(n(e,t,o,r,l,u))}return u===e.TRIANGULAR_MESH&&(c.index=function(e,t,n){const r=3*n.num_faces(),i=4*r,a=e._malloc(i);t.GetTrianglesUInt32Array(n,i,a);const s=new Uint32Array(e.HEAPF32.buffer,a,r).slice();return e._free(a),{array:s,itemSize:1}}(e,t,o)),e.destroy(o),c}(t,s,o,a),r=e.attributes.map((e=>e.array.buffer));e.index&&r.push(e.index.array.buffer),self.postMessage({type:"decode",id:i.id,geometry:e},r)}catch(e){console.error(e),self.postMessage({type:"error",id:i.id,error:e.message})}finally{t.destroy(o),t.destroy(s)}}))}}}},2145:(e,t,n)=>{"use strict";n.d(t,{I:()=>s});var r=n(9477),i=n(3778);const a="colorSpace"in new r.Texture;class s extends r.DataTextureLoader{constructor(e){super(e),this.type=r.HalfFloatType}parse(e){const t=65536,n=14,s=65537,o=Math.pow(2.7182818,2.2),l={l:0,c:0,lc:0};function u(e,t,n,r,i){for(;n<e;)t=t<<8|U(r,i),n+=8;n-=e,l.l=t>>n&(1<<e)-1,l.c=t,l.lc=n}const c=new Array(59);function h(e){return 63&e}function d(e){return e>>6}const f={c:0,lc:0};function p(e,t,n,r){e=e<<8|U(n,r),t+=8,f.c=e,f.lc=t}const m={c:0,lc:0};function g(e,t,n,r,i,a,s,o,l,u){if(e==t){r<8&&(p(n,r,i,s),n=f.c,r=f.lc);var c=n>>(r-=8);if(c=new Uint8Array([c])[0],l.value+c>u)return!1;for(var h=o[l.value-1];c-- >0;)o[l.value++]=h}else{if(!(l.value<u))return!1;o[l.value++]=e}m.c=n,m.lc=r}function v(e){return 65535&e}function y(e){var t=v(e);return t>32767?t-65536:t}const x={a:0,b:0};function b(e,t){var n=y(e),r=y(t),i=n+(1&r)+(r>>1),a=i,s=i-r;x.a=a,x.b=s}function _(e,t){var n=v(e),r=v(t),i=n-(r>>1)&65535,a=r+i-32768&65535;x.a=a,x.b=i}function w(e,t,n,r,i,a,s){for(var o,l=s<16384,u=n>i?i:n,c=1;c<=u;)c<<=1;for(o=c>>=1,c>>=1;c>=1;){for(var h,d,f,p,m=0,g=m+a*(i-o),v=a*c,y=a*o,w=r*c,M=r*o;m<=g;m+=y){for(var S=m,A=m+r*(n-o);S<=A;S+=M){var C=S+w,E=(T=S+v)+w;l?(b(e[S+t],e[T+t]),h=x.a,f=x.b,b(e[C+t],e[E+t]),d=x.a,p=x.b,b(h,d),e[S+t]=x.a,e[C+t]=x.b,b(f,p),e[T+t]=x.a,e[E+t]=x.b):(_(e[S+t],e[T+t]),h=x.a,f=x.b,_(e[C+t],e[E+t]),d=x.a,p=x.b,_(h,d),e[S+t]=x.a,e[C+t]=x.b,_(f,p),e[T+t]=x.a,e[E+t]=x.b)}if(n&c){var T=S+v;l?b(e[S+t],e[T+t]):_(e[S+t],e[T+t]),h=x.a,e[T+t]=x.b,e[S+t]=h}}if(i&c)for(S=m,A=m+r*(n-o);S<=A;S+=M)C=S+w,l?b(e[S+t],e[C+t]):_(e[S+t],e[C+t]),h=x.a,e[C+t]=x.b,e[S+t]=h;o=c,c>>=1}return m}function M(e,t,r,i,a,o){var v=r.value,y=z(t,r),x=z(t,r);r.value+=4;var b=z(t,r);if(r.value+=4,y<0||y>=s||x<0||x>=s)throw"Something wrong with HUF_ENCSIZE";var _=new Array(s),w=new Array(16384);if(function(e){for(var t=0;t<16384;t++)e[t]={},e[t].len=0,e[t].lit=0,e[t].p=null}(w),function(e,t,n,r,i,a,o){for(var h=n,d=0,f=0;i<=a;i++){if(h.value-n.value>r)return!1;u(6,d,f,e,h);var p=l.l;if(d=l.c,f=l.lc,o[i]=p,63==p){if(h.value-n.value>r)throw"Something wrong with hufUnpackEncTable";u(8,d,f,e,h);var m=l.l+6;if(d=l.c,f=l.lc,i+m>a+1)throw"Something wrong with hufUnpackEncTable";for(;m--;)o[i++]=0;i--}else if(p>=59){if(i+(m=p-59+2)>a+1)throw"Something wrong with hufUnpackEncTable";for(;m--;)o[i++]=0;i--}}!function(e){for(var t=0;t<=58;++t)c[t]=0;for(t=0;t<s;++t)c[e[t]]+=1;var n=0;for(t=58;t>0;--t){var r=n+c[t]>>1;c[t]=n,n=r}for(t=0;t<s;++t){var i=e[t];i>0&&(e[t]=i|c[i]++<<6)}}(o)}(e,0,r,i-(r.value-v),y,x,_),b>8*(i-(r.value-v)))throw"Something wrong with hufUncompress";!function(e,t,r,i){for(;t<=r;t++){var a=d(e[t]),s=h(e[t]);if(a>>s)throw"Invalid table entry";if(s>n){if((c=i[a>>s-n]).len)throw"Invalid table entry";if(c.lit++,c.p){var o=c.p;c.p=new Array(c.lit);for(var l=0;l<c.lit-1;++l)c.p[l]=o[l]}else c.p=new Array(1);c.p[c.lit-1]=t}else if(s){var u=0;for(l=1<<n-s;l>0;l--){var c;if((c=i[(a<<n-s)+u]).len||c.p)throw"Invalid table entry";c.len=s,c.lit=t,u++}}}}(_,y,x,w),function(e,t,r,i,a,s,o,l,u,c){for(var v=0,y=0,x=l,b=Math.trunc(a.value+(s+7)/8);a.value<b;)for(p(v,y,r,a),v=f.c,y=f.lc;y>=n;)if((S=t[v>>y-n&16383]).len)y-=S.len,g(S.lit,o,v,y,r,0,a,u,c,x),v=m.c,y=m.lc;else{if(!S.p)throw"hufDecode issues";var _;for(_=0;_<S.lit;_++){for(var w=h(e[S.p[_]]);y<w&&a.value<b;)p(v,y,r,a),v=f.c,y=f.lc;if(y>=w&&d(e[S.p[_]])==(v>>y-w&(1<<w)-1)){y-=w,g(S.p[_],o,v,y,r,0,a,u,c,x),v=m.c,y=m.lc;break}}if(_==S.lit)throw"hufDecode issues"}var M=8-s&7;for(v>>=M,y-=M;y>0;){var S;if(!(S=t[v<<n-y&16383]).len)throw"hufDecode issues";y-=S.len,g(S.lit,o,v,y,r,0,a,u,c,x),v=m.c,y=m.lc}}(_,w,e,0,r,b,x,o,a,{value:0})}function S(e){for(var t=1;t<e.length;t++){var n=e[t-1]+e[t]-128;e[t]=n}}function A(e,t){for(var n=0,r=Math.floor((e.length+1)/2),i=0,a=e.length-1;!(i>a||(t[i++]=e[n++],i>a));)t[i++]=e[r++]}function C(e){for(var t=e.byteLength,n=new Array,r=0,i=new DataView(e);t>0;){var a=i.getInt8(r++);if(a<0){t-=1+(o=-a);for(var s=0;s<o;s++)n.push(i.getUint8(r++))}else{var o=a;t-=2;var l=i.getUint8(r++);for(s=0;s<o+1;s++)n.push(l)}}return n}function E(e,t,n){for(var r,i=1;i<64;)65280==(r=t[e.value])?i=64:r>>8==255?i+=255&r:(n[i]=r,i++),e.value++}function T(e){const t=.5*Math.cos(.7853975),n=.5*Math.cos(3.14159/16),r=.5*Math.cos(3.14159/8),i=.5*Math.cos(3*3.14159/16),a=.5*Math.cos(.981746875),s=.5*Math.cos(3*3.14159/8),o=.5*Math.cos(1.374445625);for(var l=new Array(4),u=new Array(4),c=new Array(4),h=new Array(4),d=0;d<8;++d){var f=8*d;l[0]=r*e[f+2],l[1]=s*e[f+2],l[2]=r*e[f+6],l[3]=s*e[f+6],u[0]=n*e[f+1]+i*e[f+3]+a*e[f+5]+o*e[f+7],u[1]=i*e[f+1]-o*e[f+3]-n*e[f+5]-a*e[f+7],u[2]=a*e[f+1]-n*e[f+3]+o*e[f+5]+i*e[f+7],u[3]=o*e[f+1]-a*e[f+3]+i*e[f+5]-n*e[f+7],c[0]=t*(e[f+0]+e[f+4]),c[3]=t*(e[f+0]-e[f+4]),c[1]=l[0]+l[3],c[2]=l[1]-l[2],h[0]=c[0]+c[1],h[1]=c[3]+c[2],h[2]=c[3]-c[2],h[3]=c[0]-c[1],e[f+0]=h[0]+u[0],e[f+1]=h[1]+u[1],e[f+2]=h[2]+u[2],e[f+3]=h[3]+u[3],e[f+4]=h[3]-u[3],e[f+5]=h[2]-u[2],e[f+6]=h[1]-u[1],e[f+7]=h[0]-u[0]}for(var p=0;p<8;++p)l[0]=r*e[16+p],l[1]=s*e[16+p],l[2]=r*e[48+p],l[3]=s*e[48+p],u[0]=n*e[8+p]+i*e[24+p]+a*e[40+p]+o*e[56+p],u[1]=i*e[8+p]-o*e[24+p]-n*e[40+p]-a*e[56+p],u[2]=a*e[8+p]-n*e[24+p]+o*e[40+p]+i*e[56+p],u[3]=o*e[8+p]-a*e[24+p]+i*e[40+p]-n*e[56+p],c[0]=t*(e[p]+e[32+p]),c[3]=t*(e[p]-e[32+p]),c[1]=l[0]+l[3],c[2]=l[1]-l[2],h[0]=c[0]+c[1],h[1]=c[3]+c[2],h[2]=c[3]-c[2],h[3]=c[0]-c[1],e[0+p]=h[0]+u[0],e[8+p]=h[1]+u[1],e[16+p]=h[2]+u[2],e[24+p]=h[3]+u[3],e[32+p]=h[3]-u[3],e[40+p]=h[2]-u[2],e[48+p]=h[1]-u[1],e[56+p]=h[0]-u[0]}function B(e){for(var t=0;t<64;++t){var n=e[0][t],r=e[1][t],i=e[2][t];e[0][t]=n+1.5747*i,e[1][t]=n-.1873*r-.4682*i,e[2][t]=n+1.8556*r}}function P(e,t,n){for(var i=0;i<64;++i)t[n+i]=r.DataUtils.toHalfFloat((a=e[i])<=1?Math.sign(a)*Math.pow(Math.abs(a),2.2):Math.sign(a)*Math.pow(o,Math.abs(a)-1));var a}function R(e){return new DataView(e.array.buffer,e.offset.value,e.size)}function L(e){var t=e.viewer.buffer.slice(e.offset.value,e.offset.value+e.size),n=new Uint8Array(C(t)),r=new Uint8Array(n.length);return S(n),A(n,r),new DataView(r.buffer)}function D(e){var t=e.array.slice(e.offset.value,e.offset.value+e.size),n=(0,i.HT)(t),r=new Uint8Array(n.length);return S(n),A(n,r),new DataView(r.buffer)}function I(e){for(var n=e.viewer,r={value:e.offset.value},i=new Uint16Array(e.width*e.scanlineBlockSize*(e.channels*e.type)),a=new Uint8Array(8192),s=0,o=new Array(e.channels),l=0;l<e.channels;l++)o[l]={},o[l].start=s,o[l].end=o[l].start,o[l].nx=e.width,o[l].ny=e.lines,o[l].size=e.type,s+=o[l].nx*o[l].ny*o[l].size;var u=J(n,r),c=J(n,r);if(c>=8192)throw"Something is wrong with PIZ_COMPRESSION BITMAP_SIZE";if(u<=c)for(l=0;l<c-u+1;l++)a[l+u]=G(n,r);var h=new Uint16Array(t),d=function(e,n){for(var r=0,i=0;i<t;++i)(0==i||e[i>>3]&1<<(7&i))&&(n[r++]=i);for(var a=r-1;r<t;)n[r++]=0;return a}(a,h),f=z(n,r);for(M(e.array,n,r,f,i,s),l=0;l<e.channels;++l)for(var p=o[l],m=0;m<o[l].size;++m)w(i,p.start+m,p.nx,p.size,p.ny,p.nx*p.size,d);!function(e,t,n){for(var r=0;r<n;++r)t[r]=e[t[r]]}(h,i,s);for(var g=0,v=new Uint8Array(i.buffer.byteLength),y=0;y<e.lines;y++)for(var x=0;x<e.channels;x++){var b=(p=o[x]).nx*p.size,_=new Uint8Array(i.buffer,2*p.end,2*b);v.set(_,g),g+=2*b,p.end+=b}return new DataView(v.buffer)}function k(e){var t=e.array.slice(e.offset.value,e.offset.value+e.size),n=(0,i.HT)(t);const r=e.lines*e.channels*e.width,a=1==e.type?new Uint16Array(r):new Uint32Array(r);let s=0,o=0;const l=new Array(4);for(let t=0;t<e.lines;t++)for(let t=0;t<e.channels;t++){let t=0;switch(e.type){case 1:l[0]=s,l[1]=l[0]+e.width,s=l[1]+e.width;for(let r=0;r<e.width;++r)t+=n[l[0]++]<<8|n[l[1]++],a[o]=t,o++;break;case 2:l[0]=s,l[1]=l[0]+e.width,l[2]=l[1]+e.width,s=l[2]+e.width;for(let r=0;r<e.width;++r)t+=n[l[0]++]<<24|n[l[1]++]<<16|n[l[2]++]<<8,a[o]=t,o++}}return new DataView(a.buffer)}function F(e){var t=e.viewer,n={value:e.offset.value},r=new Uint8Array(e.width*e.lines*(e.channels*e.type*2)),a={version:H(t,n),unknownUncompressedSize:H(t,n),unknownCompressedSize:H(t,n),acCompressedSize:H(t,n),dcCompressedSize:H(t,n),rleCompressedSize:H(t,n),rleUncompressedSize:H(t,n),rleRawSize:H(t,n),totalAcUncompressedCount:H(t,n),totalDcUncompressedCount:H(t,n),acCompression:H(t,n)};if(a.version<2)throw"EXRLoader.parse: "+Z.compression+" version "+a.version+" is unsupported";for(var s=new Array,o=J(t,n)-2;o>0;){var l=O(t.buffer,n),u=G(t,n),c=u>>2&3,h=new Int8Array([(u>>4)-1])[0],d=G(t,n);s.push({name:l,index:h,type:d,compression:c}),o-=l.length+3}for(var f=Z.channels,p=new Array(e.channels),m=0;m<e.channels;++m){var g=p[m]={},v=f[m];g.name=v.name,g.compression=0,g.decoded=!1,g.type=v.pixelType,g.pLinear=v.pLinear,g.width=e.width,g.height=e.lines}for(var y={idx:new Array(3)},x=0;x<e.channels;++x)for(g=p[x],m=0;m<s.length;++m){var b=s[m];g.name==b.name&&(g.compression=b.compression,b.index>=0&&(y.idx[b.index]=x),g.offset=x)}if(a.acCompressedSize>0)switch(a.acCompression){case 0:var _=new Uint16Array(a.totalAcUncompressedCount);M(e.array,t,n,a.acCompressedSize,_,a.totalAcUncompressedCount);break;case 1:var w=e.array.slice(n.value,n.value+a.totalAcUncompressedCount),S=(0,i.HT)(w);_=new Uint16Array(S.buffer),n.value+=a.totalAcUncompressedCount}if(a.dcCompressedSize>0){var A={array:e.array,offset:n,size:a.dcCompressedSize},R=new Uint16Array(D(A).buffer);n.value+=a.dcCompressedSize}if(a.rleRawSize>0){w=e.array.slice(n.value,n.value+a.rleCompressedSize);var L=C((S=(0,i.HT)(w)).buffer);n.value+=a.rleCompressedSize}var I=0,k=new Array(p.length);for(m=0;m<k.length;++m)k[m]=new Array;for(var F=0;F<e.lines;++F)for(var N=0;N<p.length;++N)k[N].push(I),I+=p[N].width*e.type*2;for(function(e,t,n,r,i,a){var s,o,l=new DataView(a.buffer),u=n[e.idx[0]].width,c=n[e.idx[0]].height,h=Math.floor(u/8),d=Math.ceil(u/8),f=Math.ceil(c/8),p=u-8*(d-1),m=c-8*(f-1),g={value:0},v=new Array(3),y=new Array(3),x=new Array(3),b=new Array(3),_=new Array(3);for(let n=0;n<3;++n)_[n]=t[e.idx[n]],v[n]=n<1?0:v[n-1]+d*f,y[n]=new Float32Array(64),x[n]=new Uint16Array(64),b[n]=new Uint16Array(64*d);for(let t=0;t<f;++t){var w=8;t==f-1&&(w=m);var M=8;for(let e=0;e<d;++e){e==d-1&&(M=p);for(let e=0;e<3;++e)x[e].fill(0),x[e][0]=i[v[e]++],E(g,r,x[e]),s=x[e],(o=y[e])[0]=j(s[0]),o[1]=j(s[1]),o[2]=j(s[5]),o[3]=j(s[6]),o[4]=j(s[14]),o[5]=j(s[15]),o[6]=j(s[27]),o[7]=j(s[28]),o[8]=j(s[2]),o[9]=j(s[4]),o[10]=j(s[7]),o[11]=j(s[13]),o[12]=j(s[16]),o[13]=j(s[26]),o[14]=j(s[29]),o[15]=j(s[42]),o[16]=j(s[3]),o[17]=j(s[8]),o[18]=j(s[12]),o[19]=j(s[17]),o[20]=j(s[25]),o[21]=j(s[30]),o[22]=j(s[41]),o[23]=j(s[43]),o[24]=j(s[9]),o[25]=j(s[11]),o[26]=j(s[18]),o[27]=j(s[24]),o[28]=j(s[31]),o[29]=j(s[40]),o[30]=j(s[44]),o[31]=j(s[53]),o[32]=j(s[10]),o[33]=j(s[19]),o[34]=j(s[23]),o[35]=j(s[32]),o[36]=j(s[39]),o[37]=j(s[45]),o[38]=j(s[52]),o[39]=j(s[54]),o[40]=j(s[20]),o[41]=j(s[22]),o[42]=j(s[33]),o[43]=j(s[38]),o[44]=j(s[46]),o[45]=j(s[51]),o[46]=j(s[55]),o[47]=j(s[60]),o[48]=j(s[21]),o[49]=j(s[34]),o[50]=j(s[37]),o[51]=j(s[47]),o[52]=j(s[50]),o[53]=j(s[56]),o[54]=j(s[59]),o[55]=j(s[61]),o[56]=j(s[35]),o[57]=j(s[36]),o[58]=j(s[48]),o[59]=j(s[49]),o[60]=j(s[57]),o[61]=j(s[58]),o[62]=j(s[62]),o[63]=j(s[63]),T(y[e]);B(y);for(let t=0;t<3;++t)P(y[t],b[t],64*e)}let a=0;for(let r=0;r<3;++r){const i=n[e.idx[r]].type;for(let e=8*t;e<8*t+w;++e){a=_[r][e];for(let t=0;t<h;++t){const n=64*t+8*(7&e);l.setUint16(a+0*i,b[r][n+0],!0),l.setUint16(a+2*i,b[r][n+1],!0),l.setUint16(a+4*i,b[r][n+2],!0),l.setUint16(a+6*i,b[r][n+3],!0),l.setUint16(a+8*i,b[r][n+4],!0),l.setUint16(a+10*i,b[r][n+5],!0),l.setUint16(a+12*i,b[r][n+6],!0),l.setUint16(a+14*i,b[r][n+7],!0),a+=16*i}}if(h!=d)for(let e=8*t;e<8*t+w;++e){const t=_[r][e]+8*h*2*i,n=64*h+8*(7&e);for(let e=0;e<M;++e)l.setUint16(t+2*e*i,b[r][n+e],!0)}}}for(var S=new Uint16Array(u),A=(l=new DataView(a.buffer),0);A<3;++A){n[e.idx[A]].decoded=!0;var C=n[e.idx[A]].type;if(2==n[A].type)for(var R=0;R<c;++R){const e=_[A][R];for(var L=0;L<u;++L)S[L]=l.getUint16(e+2*L*C,!0);for(L=0;L<u;++L)l.setFloat32(e+2*L*C,j(S[L]),!0)}}}(y,k,p,_,R,r),m=0;m<p.length;++m)if(!(g=p[m]).decoded){if(2!==g.compression)throw"EXRLoader.parse: unsupported channel compression";var z=0,U=0;for(F=0;F<e.lines;++F){for(var V=k[m][z],W=0;W<g.width;++W){for(var X=0;X<2*g.type;++X)r[V++]=L[U+X*g.width*g.height];U++}z++}}return new DataView(r.buffer)}function O(e,t){for(var n=new Uint8Array(e),r=0;0!=n[t.value+r];)r+=1;var i=(new TextDecoder).decode(n.slice(t.value,t.value+r));return t.value=t.value+r+1,i}function N(e,t){var n=e.getInt32(t.value,!0);return t.value=t.value+4,n}function z(e,t){var n=e.getUint32(t.value,!0);return t.value=t.value+4,n}function U(e,t){var n=e[t.value];return t.value=t.value+1,n}function G(e,t){var n=e.getUint8(t.value);return t.value=t.value+1,n}const H=function(e,t){let n;return n="getBigInt64"in DataView.prototype?Number(e.getBigInt64(t.value,!0)):e.getUint32(t.value+4,!0)+Number(e.getUint32(t.value,!0)<<32),t.value+=8,n};function V(e,t){var n=e.getFloat32(t.value,!0);return t.value+=4,n}function W(e,t){return r.DataUtils.toHalfFloat(V(e,t))}function j(e){var t=(31744&e)>>10,n=1023&e;return(e>>15?-1:1)*(t?31===t?n?NaN:1/0:Math.pow(2,t-15)*(1+n/1024):n/1024*6103515625e-14)}function J(e,t){var n=e.getUint16(t.value,!0);return t.value+=2,n}function X(e,t){return j(J(e,t))}function Y(e,t,n,r,i){return"string"===r||"stringvector"===r||"iccProfile"===r?function(e,t,n){var r=(new TextDecoder).decode(new Uint8Array(e).slice(t.value,t.value+n));return t.value=t.value+n,r}(t,n,i):"chlist"===r?function(e,t,n,r){for(var i=n.value,a=[];n.value<i+r-1;){var s=O(t,n),o=N(e,n),l=G(e,n);n.value+=3;var u=N(e,n),c=N(e,n);a.push({name:s,pixelType:o,pLinear:l,xSampling:u,ySampling:c})}return n.value+=1,a}(e,t,n,i):"chromaticities"===r?function(e,t){return{redX:V(e,t),redY:V(e,t),greenX:V(e,t),greenY:V(e,t),blueX:V(e,t),blueY:V(e,t),whiteX:V(e,t),whiteY:V(e,t)}}(e,n):"compression"===r?function(e,t){return["NO_COMPRESSION","RLE_COMPRESSION","ZIPS_COMPRESSION","ZIP_COMPRESSION","PIZ_COMPRESSION","PXR24_COMPRESSION","B44_COMPRESSION","B44A_COMPRESSION","DWAA_COMPRESSION","DWAB_COMPRESSION"][G(e,t)]}(e,n):"box2i"===r?function(e,t){return{xMin:z(e,t),yMin:z(e,t),xMax:z(e,t),yMax:z(e,t)}}(e,n):"lineOrder"===r?function(e,t){return["INCREASING_Y"][G(e,t)]}(e,n):"float"===r?V(e,n):"v2f"===r?function(e,t){return[V(e,t),V(e,t)]}(e,n):"v3f"===r?function(e,t){return[V(e,t),V(e,t),V(e,t)]}(e,n):"int"===r?N(e,n):"rational"===r?function(e,t){return[N(e,t),z(e,t)]}(e,n):"timecode"===r?function(e,t){return[z(e,t),z(e,t)]}(e,n):"preview"===r?(n.value+=i,"skipped"):void(n.value+=i)}const K=new DataView(e),q=new Uint8Array(e),Q={value:0},Z=function(e,t,n){const r={};if(20000630!=e.getUint32(0,!0))throw"THREE.EXRLoader: provided file doesn't appear to be in OpenEXR format.";r.version=e.getUint8(4);const i=e.getUint8(5);r.spec={singleTile:!!(2&i),longName:!!(4&i),deepFormat:!!(8&i),multiPart:!!(16&i)},n.value=8;for(var a=!0;a;){var s=O(t,n);if(0==s)a=!1;else{var o=O(t,n),l=Y(e,t,n,o,z(e,n));void 0===l?console.warn(`EXRLoader.parse: skipped unknown header attribute type '${o}'.`):r[s]=l}}if(0!=i)throw console.error("EXRHeader:",r),"THREE.EXRLoader: provided file is currently unsupported.";return r}(K,e,Q),$=function(e,t,n,i,s){const o={size:0,viewer:t,array:n,offset:i,width:e.dataWindow.xMax-e.dataWindow.xMin+1,height:e.dataWindow.yMax-e.dataWindow.yMin+1,channels:e.channels.length,bytesPerLine:null,lines:null,inputSize:null,type:e.channels[0].pixelType,uncompress:null,getter:null,format:null,[a?"colorSpace":"encoding"]:null};switch(e.compression){case"NO_COMPRESSION":o.lines=1,o.uncompress=R;break;case"RLE_COMPRESSION":o.lines=1,o.uncompress=L;break;case"ZIPS_COMPRESSION":o.lines=1,o.uncompress=D;break;case"ZIP_COMPRESSION":o.lines=16,o.uncompress=D;break;case"PIZ_COMPRESSION":o.lines=32,o.uncompress=I;break;case"PXR24_COMPRESSION":o.lines=16,o.uncompress=k;break;case"DWAA_COMPRESSION":o.lines=32,o.uncompress=F;break;case"DWAB_COMPRESSION":o.lines=256,o.uncompress=F;break;default:throw"EXRLoader.parse: "+e.compression+" is unsupported"}if(o.scanlineBlockSize=o.lines,1==o.type)switch(s){case r.FloatType:o.getter=X,o.inputSize=2;break;case r.HalfFloatType:o.getter=J,o.inputSize=2}else{if(2!=o.type)throw"EXRLoader.parse: unsupported pixelType "+o.type+" for "+e.compression+".";switch(s){case r.FloatType:o.getter=V,o.inputSize=4;break;case r.HalfFloatType:o.getter=W,o.inputSize=4}}o.blockCount=(e.dataWindow.yMax+1)/o.scanlineBlockSize;for(var l=0;l<o.blockCount;l++)H(t,i);o.outputChannels=3==o.channels?4:o.channels;const u=o.width*o.height*o.outputChannels;switch(s){case r.FloatType:o.byteArray=new Float32Array(u),o.channels<o.outputChannels&&o.byteArray.fill(1,0,u);break;case r.HalfFloatType:o.byteArray=new Uint16Array(u),o.channels<o.outputChannels&&o.byteArray.fill(15360,0,u);break;default:console.error("THREE.EXRLoader: unsupported type: ",s)}return o.bytesPerLine=o.width*o.inputSize*o.channels,4==o.outputChannels?o.format=r.RGBAFormat:o.format=r.RedFormat,a?o.colorSpace="srgb-linear":o.encoding=3e3,o}(Z,K,q,Q,this.type),ee={value:0},te={R:0,G:1,B:2,A:3,Y:0};for(let e=0;e<$.height/$.scanlineBlockSize;e++){const t=z(K,Q);$.size=z(K,Q),$.lines=t+$.scanlineBlockSize>$.height?$.height-t:$.scanlineBlockSize;const n=$.size<$.lines*$.bytesPerLine?$.uncompress($):R($);Q.value+=$.size;for(let t=0;t<$.scanlineBlockSize;t++){const r=t+e*$.scanlineBlockSize;if(r>=$.height)break;for(let e=0;e<$.channels;e++){const i=te[Z.channels[e].name];for(let a=0;a<$.width;a++){ee.value=(t*($.channels*$.width)+e*$.width+a)*$.inputSize;const s=($.height-1-r)*($.width*$.outputChannels)+a*$.outputChannels+i;$.byteArray[s]=$.getter(n,ee)}}}}return{header:Z,width:$.width,height:$.height,data:$.byteArray,format:$.format,[a?"colorSpace":"encoding"]:$[a?"colorSpace":"encoding"],type:this.type}}setDataType(e){return this.type=e,this}load(e,t,n,i){return super.load(e,(function(e,n){a?e.colorSpace=n.colorSpace:e.encoding=n.encoding,e.minFilter=r.LinearFilter,e.magFilter=r.LinearFilter,e.generateMipmaps=!1,e.flipY=!1,t&&t(e,n)}),n,i)}}},7607:(e,t,n)=>{"use strict";n.d(t,{E:()=>a});var r=n(9477),i=n(8667);class a extends r.Loader{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new h(e)})),this.register((function(e){return new x(e)})),this.register((function(e){return new b(e)})),this.register((function(e){return new _(e)})),this.register((function(e){return new f(e)})),this.register((function(e){return new p(e)})),this.register((function(e){return new m(e)})),this.register((function(e){return new g(e)})),this.register((function(e){return new c(e)})),this.register((function(e){return new v(e)})),this.register((function(e){return new d(e)})),this.register((function(e){return new y(e)})),this.register((function(e){return new l(e)})),this.register((function(e){return new w(e)})),this.register((function(e){return new M(e)}))}load(e,t,n,i){const a=this;let s;s=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:r.LoaderUtils.extractUrlBase(e),this.manager.itemStart(e);const o=function(t){i?i(t):console.error(t),a.manager.itemError(e),a.manager.itemEnd(e)},l=new r.FileLoader(this.manager);l.setPath(this.path),l.setResponseType("arraybuffer"),l.setRequestHeader(this.requestHeader),l.setWithCredentials(this.withCredentials),l.load(e,(function(n){try{a.parse(n,s,(function(n){t(n),a.manager.itemEnd(e)}),o)}catch(e){o(e)}}),n,o)}setDRACOLoader(e){return this.dracoLoader=e,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(e){return this.ktx2Loader=e,this}setMeshoptDecoder(e){return this.meshoptDecoder=e,this}register(e){return-1===this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.push(e),this}unregister(e){return-1!==this.pluginCallbacks.indexOf(e)&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(e),1),this}parse(e,t,n,i){let a;const s={},l={};if("string"==typeof e)a=JSON.parse(e);else if(e instanceof ArrayBuffer)if(r.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4)))===S){try{s[o.KHR_BINARY_GLTF]=new A(e)}catch(e){return void(i&&i(e))}a=JSON.parse(s[o.KHR_BINARY_GLTF].content)}else a=JSON.parse(r.LoaderUtils.decodeText(new Uint8Array(e)));else a=e;if(void 0===a.asset||a.asset.version[0]<2)return void(i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const c=new X(a,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});c.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){const t=this.pluginCallbacks[e](c);l[t.name]=t,s[t.name]=!0}if(a.extensionsUsed)for(let e=0;e<a.extensionsUsed.length;++e){const t=a.extensionsUsed[e],n=a.extensionsRequired||[];switch(t){case o.KHR_MATERIALS_UNLIT:s[t]=new u;break;case o.KHR_DRACO_MESH_COMPRESSION:s[t]=new C(a,this.dracoLoader);break;case o.KHR_TEXTURE_TRANSFORM:s[t]=new E;break;case o.KHR_MESH_QUANTIZATION:s[t]=new T;break;default:n.indexOf(t)>=0&&void 0===l[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}c.setExtensions(s),c.setPlugins(l),c.parse(n,i)}parseAsync(e,t){const n=this;return new Promise((function(r,i){n.parse(e,t,r,i)}))}}function s(){let e={};return{get:function(t){return e[t]},add:function(t,n){e[t]=n},remove:function(t){delete e[t]},removeAll:function(){e={}}}}const o={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class l{constructor(e){this.parser=e,this.name=o.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n];r.extensions&&r.extensions[this.name]&&void 0!==r.extensions[this.name].light&&e._addNodeRef(this.cache,r.extensions[this.name].light)}}_loadLight(e){const t=this.parser,n="light:"+e;let i=t.cache.get(n);if(i)return i;const a=t.json,s=((a.extensions&&a.extensions[this.name]||{}).lights||[])[e];let o;const l=new r.Color(16777215);void 0!==s.color&&l.fromArray(s.color);const u=void 0!==s.range?s.range:0;switch(s.type){case"directional":o=new r.DirectionalLight(l),o.target.position.set(0,0,-1),o.add(o.target);break;case"point":o=new r.PointLight(l),o.distance=u;break;case"spot":o=new r.SpotLight(l),o.distance=u,s.spot=s.spot||{},s.spot.innerConeAngle=void 0!==s.spot.innerConeAngle?s.spot.innerConeAngle:0,s.spot.outerConeAngle=void 0!==s.spot.outerConeAngle?s.spot.outerConeAngle:Math.PI/4,o.angle=s.spot.outerConeAngle,o.penumbra=1-s.spot.innerConeAngle/s.spot.outerConeAngle,o.target.position.set(0,0,-1),o.add(o.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+s.type)}return o.position.set(0,0,0),o.decay=2,G(o,s),void 0!==s.intensity&&(o.intensity=s.intensity),o.name=t.createUniqueName(s.name||"light_"+e),i=Promise.resolve(o),t.cache.add(n,i),i}getDependency(e,t){if("light"===e)return this._loadLight(t)}createNodeAttachment(e){const t=this,n=this.parser,r=n.json.nodes[e],i=(r.extensions&&r.extensions[this.name]||{}).light;return void 0===i?null:this._loadLight(i).then((function(e){return n._getNodeRef(t.cache,i,e)}))}}class u{constructor(){this.name=o.KHR_MATERIALS_UNLIT}getMaterialType(){return r.MeshBasicMaterial}extendParams(e,t,n){const i=[];e.color=new r.Color(1,1,1),e.opacity=1;const a=t.pbrMetallicRoughness;if(a){if(Array.isArray(a.baseColorFactor)){const t=a.baseColorFactor;e.color.fromArray(t),e.opacity=t[3]}void 0!==a.baseColorTexture&&i.push(n.assignTexture(e,"map",a.baseColorTexture,3001))}return Promise.all(i)}}class c{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name].emissiveStrength;return void 0!==r&&(t.emissiveIntensity=r),Promise.resolve()}}class h{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],s=i.extensions[this.name];if(void 0!==s.clearcoatFactor&&(t.clearcoat=s.clearcoatFactor),void 0!==s.clearcoatTexture&&a.push(n.assignTexture(t,"clearcoatMap",s.clearcoatTexture)),void 0!==s.clearcoatRoughnessFactor&&(t.clearcoatRoughness=s.clearcoatRoughnessFactor),void 0!==s.clearcoatRoughnessTexture&&a.push(n.assignTexture(t,"clearcoatRoughnessMap",s.clearcoatRoughnessTexture)),void 0!==s.clearcoatNormalTexture&&(a.push(n.assignTexture(t,"clearcoatNormalMap",s.clearcoatNormalTexture)),void 0!==s.clearcoatNormalTexture.scale)){const e=s.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new r.Vector2(e,e)}return Promise.all(a)}}class d{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];return void 0!==a.iridescenceFactor&&(t.iridescence=a.iridescenceFactor),void 0!==a.iridescenceTexture&&i.push(n.assignTexture(t,"iridescenceMap",a.iridescenceTexture)),void 0!==a.iridescenceIor&&(t.iridescenceIOR=a.iridescenceIor),void 0===t.iridescenceThicknessRange&&(t.iridescenceThicknessRange=[100,400]),void 0!==a.iridescenceThicknessMinimum&&(t.iridescenceThicknessRange[0]=a.iridescenceThicknessMinimum),void 0!==a.iridescenceThicknessMaximum&&(t.iridescenceThicknessRange[1]=a.iridescenceThicknessMaximum),void 0!==a.iridescenceThicknessTexture&&i.push(n.assignTexture(t,"iridescenceThicknessMap",a.iridescenceThicknessTexture)),Promise.all(i)}}class f{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[];t.sheenColor=new r.Color(0,0,0),t.sheenRoughness=0,t.sheen=1;const s=i.extensions[this.name];return void 0!==s.sheenColorFactor&&t.sheenColor.fromArray(s.sheenColorFactor),void 0!==s.sheenRoughnessFactor&&(t.sheenRoughness=s.sheenRoughnessFactor),void 0!==s.sheenColorTexture&&a.push(n.assignTexture(t,"sheenColorMap",s.sheenColorTexture,3001)),void 0!==s.sheenRoughnessTexture&&a.push(n.assignTexture(t,"sheenRoughnessMap",s.sheenRoughnessTexture)),Promise.all(a)}}class p{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];return void 0!==a.transmissionFactor&&(t.transmission=a.transmissionFactor),void 0!==a.transmissionTexture&&i.push(n.assignTexture(t,"transmissionMap",a.transmissionTexture)),Promise.all(i)}}class m{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],s=i.extensions[this.name];t.thickness=void 0!==s.thicknessFactor?s.thicknessFactor:0,void 0!==s.thicknessTexture&&a.push(n.assignTexture(t,"thicknessMap",s.thicknessTexture)),t.attenuationDistance=s.attenuationDistance||1/0;const o=s.attenuationColor||[1,1,1];return t.attenuationColor=new r.Color(o[0],o[1],o[2]),Promise.all(a)}}class g{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser.json.materials[e];if(!n.extensions||!n.extensions[this.name])return Promise.resolve();const r=n.extensions[this.name];return t.ior=void 0!==r.ior?r.ior:1.5,Promise.resolve()}}class v{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,i=n.json.materials[e];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const a=[],s=i.extensions[this.name];t.specularIntensity=void 0!==s.specularFactor?s.specularFactor:1,void 0!==s.specularTexture&&a.push(n.assignTexture(t,"specularIntensityMap",s.specularTexture));const o=s.specularColorFactor||[1,1,1];return t.specularColor=new r.Color(o[0],o[1],o[2]),void 0!==s.specularColorTexture&&a.push(n.assignTexture(t,"specularColorMap",s.specularColorTexture,3001)),Promise.all(a)}}class y{constructor(e){this.parser=e,this.name=o.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?r.MeshPhysicalMaterial:null}extendMaterialParams(e,t){const n=this.parser,r=n.json.materials[e];if(!r.extensions||!r.extensions[this.name])return Promise.resolve();const i=[],a=r.extensions[this.name];return void 0!==a.anisotropyStrength&&(t.anisotropy=a.anisotropyStrength),void 0!==a.anisotropyRotation&&(t.anisotropyRotation=a.anisotropyRotation),void 0!==a.anisotropyTexture&&i.push(n.assignTexture(t,"anisotropyMap",a.anisotropyTexture)),Promise.all(i)}}class x{constructor(e){this.parser=e,this.name=o.KHR_TEXTURE_BASISU}loadTexture(e){const t=this.parser,n=t.json,r=n.textures[e];if(!r.extensions||!r.extensions[this.name])return null;const i=r.extensions[this.name],a=t.options.ktx2Loader;if(!a){if(n.extensionsRequired&&n.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,i.source,a)}}class b{constructor(e){this.parser=e,this.name=o.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const a=i.extensions[t],s=r.images[a.source];let o=n.textureLoader;if(s.uri){const e=n.options.manager.getHandler(s.uri);null!==e&&(o=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,a.source,o);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class _{constructor(e){this.parser=e,this.name=o.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,n=this.parser,r=n.json,i=r.textures[e];if(!i.extensions||!i.extensions[t])return null;const a=i.extensions[t],s=r.images[a.source];let o=n.textureLoader;if(s.uri){const e=n.options.manager.getHandler(s.uri);null!==e&&(o=e)}return this.detectSupport().then((function(i){if(i)return n.loadTextureImage(e,a.source,o);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return n.loadTexture(e)}))}detectSupport(){return this.isSupported||(this.isSupported=new Promise((function(e){const t=new Image;t.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",t.onload=t.onerror=function(){e(1===t.height)}}))),this.isSupported}}class w{constructor(e){this.name=o.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,n=t.bufferViews[e];if(n.extensions&&n.extensions[this.name]){const e=n.extensions[this.name],r=this.parser.getDependency("buffer",e.buffer),i=this.parser.options.meshoptDecoder;if(!i||!i.supported){if(t.extensionsRequired&&t.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return r.then((function(t){const n=e.byteOffset||0,r=e.byteLength||0,a=e.count,s=e.byteStride,o=new Uint8Array(t,n,r);return i.decodeGltfBufferAsync?i.decodeGltfBufferAsync(a,s,o,e.mode,e.filter).then((function(e){return e.buffer})):i.ready.then((function(){const t=new ArrayBuffer(a*s);return i.decodeGltfBuffer(new Uint8Array(t),a,s,o,e.mode,e.filter),t}))}))}return null}}class M{constructor(e){this.name=o.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,n=t.nodes[e];if(!n.extensions||!n.extensions[this.name]||void 0===n.mesh)return null;const i=t.meshes[n.mesh];for(const e of i.primitives)if(e.mode!==L.TRIANGLES&&e.mode!==L.TRIANGLE_STRIP&&e.mode!==L.TRIANGLE_FAN&&void 0!==e.mode)return null;const a=n.extensions[this.name].attributes,s=[],o={};for(const e in a)s.push(this.parser.getDependency("accessor",a[e]).then((t=>(o[e]=t,o[e]))));return s.length<1?null:(s.push(this.parser.createNodeMesh(e)),Promise.all(s).then((e=>{const t=e.pop(),n=t.isGroup?t.children:[t],i=e[0].count,a=[];for(const e of n){const t=new r.Matrix4,n=new r.Vector3,s=new r.Quaternion,l=new r.Vector3(1,1,1),u=new r.InstancedMesh(e.geometry,e.material,i);for(let e=0;e<i;e++)o.TRANSLATION&&n.fromBufferAttribute(o.TRANSLATION,e),o.ROTATION&&s.fromBufferAttribute(o.ROTATION,e),o.SCALE&&l.fromBufferAttribute(o.SCALE,e),u.setMatrixAt(e,t.compose(n,s,l));for(const t in o)"TRANSLATION"!==t&&"ROTATION"!==t&&"SCALE"!==t&&e.geometry.setAttribute(t,o[t]);r.Object3D.prototype.copy.call(u,e),this.parser.assignFinalMaterial(u),a.push(u)}return t.isGroup?(t.clear(),t.add(...a),t):a[0]})))}}const S="glTF";class A{constructor(e){this.name=o.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12);if(this.header={magic:r.LoaderUtils.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==S)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const n=this.header.length-12,i=new DataView(e,12);let a=0;for(;a<n;){const t=i.getUint32(a,!0);a+=4;const n=i.getUint32(a,!0);if(a+=4,1313821514===n){const n=new Uint8Array(e,12+a,t);this.content=r.LoaderUtils.decodeText(n)}else if(5130562===n){const n=12+a;this.body=e.slice(n,n+t)}a+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class C{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=o.KHR_DRACO_MESH_COMPRESSION,this.json=e,this.dracoLoader=t,this.dracoLoader.preload()}decodePrimitive(e,t){const n=this.json,r=this.dracoLoader,i=e.extensions[this.name].bufferView,a=e.extensions[this.name].attributes,s={},o={},l={};for(const e in a){const t=O[e]||e.toLowerCase();s[t]=a[e]}for(const t in e.attributes){const r=O[t]||t.toLowerCase();if(void 0!==a[t]){const i=n.accessors[e.attributes[t]],a=D[i.componentType];l[r]=a.name,o[r]=!0===i.normalized}}return t.getDependency("bufferView",i).then((function(e){return new Promise((function(t){r.decodeDracoFile(e,(function(e){for(const t in e.attributes){const n=e.attributes[t],r=o[t];void 0!==r&&(n.normalized=r)}t(e)}),s,l)}))}))}}class E{constructor(){this.name=o.KHR_TEXTURE_TRANSFORM}extendTexture(e,t){return void 0!==t.texCoord&&t.texCoord!==e.channel||void 0!==t.offset||void 0!==t.rotation||void 0!==t.scale?(e=e.clone(),void 0!==t.texCoord&&(e.channel=t.texCoord),void 0!==t.offset&&e.offset.fromArray(t.offset),void 0!==t.rotation&&(e.rotation=t.rotation),void 0!==t.scale&&e.repeat.fromArray(t.scale),e.needsUpdate=!0,e):e}}class T{constructor(){this.name=o.KHR_MESH_QUANTIZATION}}class B extends r.Interpolant{constructor(e,t,n,r){super(e,t,n,r)}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r*3+r;for(let e=0;e!==r;e++)t[e]=n[i+e];return t}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=2*s,l=3*s,u=r-t,c=(n-t)/u,h=c*c,d=h*c,f=e*l,p=f-l,m=-2*d+3*h,g=d-h,v=1-m,y=g-h+c;for(let e=0;e!==s;e++){const t=a[p+e+s],n=a[p+e+o]*u,r=a[f+e+s],l=a[f+e]*u;i[e]=v*t+y*n+m*r+g*l}return i}}const P=new r.Quaternion;class R extends B{interpolate_(e,t,n,r){const i=super.interpolate_(e,t,n,r);return P.fromArray(i).normalize().toArray(i),i}}const L={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},D={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},I={9728:r.NearestFilter,9729:r.LinearFilter,9984:r.NearestMipmapNearestFilter,9985:r.LinearMipmapNearestFilter,9986:r.NearestMipmapLinearFilter,9987:r.LinearMipmapLinearFilter},k={33071:r.ClampToEdgeWrapping,33648:r.MirroredRepeatWrapping,10497:r.RepeatWrapping},F={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},O={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...r.REVISION.replace(/\D+/g,"")>=152?{TEXCOORD_0:"uv",TEXCOORD_1:"uv1",TEXCOORD_2:"uv2",TEXCOORD_3:"uv3"}:{TEXCOORD_0:"uv",TEXCOORD_1:"uv2"},COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},N={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},z={CUBICSPLINE:void 0,LINEAR:r.InterpolateLinear,STEP:r.InterpolateDiscrete};function U(e,t,n){for(const r in n.extensions)void 0===e[r]&&(t.userData.gltfExtensions=t.userData.gltfExtensions||{},t.userData.gltfExtensions[r]=n.extensions[r])}function G(e,t){void 0!==t.extras&&("object"==typeof t.extras?Object.assign(e.userData,t.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+t.extras))}function H(e,t){if(e.updateMorphTargets(),void 0!==t.weights)for(let n=0,r=t.weights.length;n<r;n++)e.morphTargetInfluences[n]=t.weights[n];if(t.extras&&Array.isArray(t.extras.targetNames)){const n=t.extras.targetNames;if(e.morphTargetInfluences.length===n.length){e.morphTargetDictionary={};for(let t=0,r=n.length;t<r;t++)e.morphTargetDictionary[n[t]]=t}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function V(e){let t;const n=e.extensions&&e.extensions[o.KHR_DRACO_MESH_COMPRESSION];if(t=n?"draco:"+n.bufferView+":"+n.indices+":"+W(n.attributes):e.indices+":"+W(e.attributes)+":"+e.mode,void 0!==e.targets)for(let n=0,r=e.targets.length;n<r;n++)t+=":"+W(e.targets[n]);return t}function W(e){let t="";const n=Object.keys(e).sort();for(let r=0,i=n.length;r<i;r++)t+=n[r]+":"+e[n[r]]+";";return t}function j(e){switch(e){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}const J=new r.Matrix4;class X{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new s,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let n=!1,i=!1,a=-1;"undefined"!=typeof navigator&&(n=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),i=navigator.userAgent.indexOf("Firefox")>-1,a=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||n||i&&a<98?this.textureLoader=new r.TextureLoader(this.options.manager):this.textureLoader=new r.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new r.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),"use-credentials"===this.options.crossOrigin&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const n=this,r=this.json,i=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll((function(e){return e._markDefs&&e._markDefs()})),Promise.all(this._invokeAll((function(e){return e.beforeRoot&&e.beforeRoot()}))).then((function(){return Promise.all([n.getDependencies("scene"),n.getDependencies("animation"),n.getDependencies("camera")])})).then((function(t){const a={scene:t[0][r.scene||0],scenes:t[0],animations:t[1],cameras:t[2],asset:r.asset,parser:n,userData:{}};U(i,a,r),G(a,r),Promise.all(n._invokeAll((function(e){return e.afterRoot&&e.afterRoot(a)}))).then((function(){e(a)}))})).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],n=this.json.meshes||[];for(let n=0,r=t.length;n<r;n++){const r=t[n].joints;for(let t=0,n=r.length;t<n;t++)e[r[t]].isBone=!0}for(let t=0,r=e.length;t<r;t++){const r=e[t];void 0!==r.mesh&&(this._addNodeRef(this.meshCache,r.mesh),void 0!==r.skin&&(n[r.mesh].isSkinnedMesh=!0)),void 0!==r.camera&&this._addNodeRef(this.cameraCache,r.camera)}}_addNodeRef(e,t){void 0!==t&&(void 0===e.refs[t]&&(e.refs[t]=e.uses[t]=0),e.refs[t]++)}_getNodeRef(e,t,n){if(e.refs[t]<=1)return n;const r=n.clone(),i=(e,t)=>{const n=this.associations.get(e);null!=n&&this.associations.set(t,n);for(const[n,r]of e.children.entries())i(r,t.children[n])};return i(n,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let n=0;n<t.length;n++){const r=e(t[n]);if(r)return r}return null}_invokeAll(e){const t=Object.values(this.plugins);t.unshift(this);const n=[];for(let r=0;r<t.length;r++){const i=e(t[r]);i&&n.push(i)}return n}getDependency(e,t){const n=e+":"+t;let r=this.cache.get(n);if(!r){switch(e){case"scene":r=this.loadScene(t);break;case"node":r=this._invokeOne((function(e){return e.loadNode&&e.loadNode(t)}));break;case"mesh":r=this._invokeOne((function(e){return e.loadMesh&&e.loadMesh(t)}));break;case"accessor":r=this.loadAccessor(t);break;case"bufferView":r=this._invokeOne((function(e){return e.loadBufferView&&e.loadBufferView(t)}));break;case"buffer":r=this.loadBuffer(t);break;case"material":r=this._invokeOne((function(e){return e.loadMaterial&&e.loadMaterial(t)}));break;case"texture":r=this._invokeOne((function(e){return e.loadTexture&&e.loadTexture(t)}));break;case"skin":r=this.loadSkin(t);break;case"animation":r=this._invokeOne((function(e){return e.loadAnimation&&e.loadAnimation(t)}));break;case"camera":r=this.loadCamera(t);break;default:if(r=this._invokeOne((function(n){return n!=this&&n.getDependency&&n.getDependency(e,t)})),!r)throw new Error("Unknown type: "+e)}this.cache.add(n,r)}return r}getDependencies(e){let t=this.cache.get(e);if(!t){const n=this,r=this.json[e+("mesh"===e?"es":"s")]||[];t=Promise.all(r.map((function(t,r){return n.getDependency(e,r)}))),this.cache.add(e,t)}return t}loadBuffer(e){const t=this.json.buffers[e],n=this.fileLoader;if(t.type&&"arraybuffer"!==t.type)throw new Error("THREE.GLTFLoader: "+t.type+" buffer type is not supported.");if(void 0===t.uri&&0===e)return Promise.resolve(this.extensions[o.KHR_BINARY_GLTF].body);const i=this.options;return new Promise((function(e,a){n.load(r.LoaderUtils.resolveURL(t.uri,i.path),e,void 0,(function(){a(new Error('THREE.GLTFLoader: Failed to load buffer "'+t.uri+'".'))}))}))}loadBufferView(e){const t=this.json.bufferViews[e];return this.getDependency("buffer",t.buffer).then((function(e){const n=t.byteLength||0,r=t.byteOffset||0;return e.slice(r,r+n)}))}loadAccessor(e){const t=this,n=this.json,i=this.json.accessors[e];if(void 0===i.bufferView&&void 0===i.sparse){const e=F[i.type],t=D[i.componentType],n=!0===i.normalized,a=new t(i.count*e);return Promise.resolve(new r.BufferAttribute(a,e,n))}const a=[];return void 0!==i.bufferView?a.push(this.getDependency("bufferView",i.bufferView)):a.push(null),void 0!==i.sparse&&(a.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),a.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(a).then((function(e){const a=e[0],s=F[i.type],o=D[i.componentType],l=o.BYTES_PER_ELEMENT,u=l*s,c=i.byteOffset||0,h=void 0!==i.bufferView?n.bufferViews[i.bufferView].byteStride:void 0,d=!0===i.normalized;let f,p;if(h&&h!==u){const e=Math.floor(c/h),n="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+e+":"+i.count;let u=t.cache.get(n);u||(f=new o(a,e*h,i.count*h/l),u=new r.InterleavedBuffer(f,h/l),t.cache.add(n,u)),p=new r.InterleavedBufferAttribute(u,s,c%h/l,d)}else f=null===a?new o(i.count*s):new o(a,c,i.count*s),p=new r.BufferAttribute(f,s,d);if(void 0!==i.sparse){const t=F.SCALAR,n=D[i.sparse.indices.componentType],l=i.sparse.indices.byteOffset||0,u=i.sparse.values.byteOffset||0,c=new n(e[1],l,i.sparse.count*t),h=new o(e[2],u,i.sparse.count*s);null!==a&&(p=new r.BufferAttribute(p.array.slice(),p.itemSize,p.normalized));for(let e=0,t=c.length;e<t;e++){const t=c[e];if(p.setX(t,h[e*s]),s>=2&&p.setY(t,h[e*s+1]),s>=3&&p.setZ(t,h[e*s+2]),s>=4&&p.setW(t,h[e*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return p}))}loadTexture(e){const t=this.json,n=this.options,r=t.textures[e].source,i=t.images[r];let a=this.textureLoader;if(i.uri){const e=n.manager.getHandler(i.uri);null!==e&&(a=e)}return this.loadTextureImage(e,r,a)}loadTextureImage(e,t,n){const i=this,a=this.json,s=a.textures[e],o=a.images[t],l=(o.uri||o.bufferView)+":"+s.sampler;if(this.textureCache[l])return this.textureCache[l];const u=this.loadImageSource(t,n).then((function(t){t.flipY=!1,t.name=s.name||o.name||"",""===t.name&&"string"==typeof o.uri&&!1===o.uri.startsWith("data:image/")&&(t.name=o.uri);const n=(a.samplers||{})[s.sampler]||{};return t.magFilter=I[n.magFilter]||r.LinearFilter,t.minFilter=I[n.minFilter]||r.LinearMipmapLinearFilter,t.wrapS=k[n.wrapS]||r.RepeatWrapping,t.wrapT=k[n.wrapT]||r.RepeatWrapping,i.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[l]=u,u}loadImageSource(e,t){const n=this.json,i=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const a=n.images[e],s=self.URL||self.webkitURL;let o=a.uri||"",l=!1;if(void 0!==a.bufferView)o=this.getDependency("bufferView",a.bufferView).then((function(e){l=!0;const t=new Blob([e],{type:a.mimeType});return o=s.createObjectURL(t),o}));else if(void 0===a.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const u=Promise.resolve(o).then((function(e){return new Promise((function(n,a){let s=n;!0===t.isImageBitmapLoader&&(s=function(e){const t=new r.Texture(e);t.needsUpdate=!0,n(t)}),t.load(r.LoaderUtils.resolveURL(e,i.path),s,void 0,a)}))})).then((function(e){var t;return!0===l&&s.revokeObjectURL(o),e.userData.mimeType=a.mimeType||((t=a.uri).search(/\.jpe?g($|\?)/i)>0||0===t.search(/^data\:image\/jpeg/)?"image/jpeg":t.search(/\.webp($|\?)/i)>0||0===t.search(/^data\:image\/webp/)?"image/webp":"image/png"),e})).catch((function(e){throw console.error("THREE.GLTFLoader: Couldn't load texture",o),e}));return this.sourceCache[e]=u,u}assignTexture(e,t,n,r){const i=this;return this.getDependency("texture",n.index).then((function(a){if(!a)return null;if(void 0!==n.texCoord&&n.texCoord>0&&((a=a.clone()).channel=n.texCoord),i.extensions[o.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[o.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=i.associations.get(a);a=i.extensions[o.KHR_TEXTURE_TRANSFORM].extendTexture(a,e),i.associations.set(a,t)}}return void 0!==r&&("colorSpace"in a?a.colorSpace=3001===r?"srgb":"srgb-linear":a.encoding=r),e[t]=a,a}))}assignFinalMaterial(e){const t=e.geometry;let n=e.material;const i=void 0===t.attributes.tangent,a=void 0!==t.attributes.color,s=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new r.PointsMaterial,r.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,t.sizeAttenuation=!1,this.cache.add(e,t)),n=t}else if(e.isLine){const e="LineBasicMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new r.LineBasicMaterial,r.Material.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,this.cache.add(e,t)),n=t}if(i||a||s){let e="ClonedMaterial:"+n.uuid+":";i&&(e+="derivative-tangents:"),a&&(e+="vertex-colors:"),s&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),a&&(t.vertexColors=!0),s&&(t.flatShading=!0),i&&(t.normalScale&&(t.normalScale.y*=-1),t.clearcoatNormalScale&&(t.clearcoatNormalScale.y*=-1)),this.cache.add(e,t),this.associations.set(t,this.associations.get(n))),n=t}e.material=n}getMaterialType(){return r.MeshStandardMaterial}loadMaterial(e){const t=this,n=this.json,i=this.extensions,a=n.materials[e];let s;const l={},u=[];if((a.extensions||{})[o.KHR_MATERIALS_UNLIT]){const e=i[o.KHR_MATERIALS_UNLIT];s=e.getMaterialType(),u.push(e.extendParams(l,a,t))}else{const n=a.pbrMetallicRoughness||{};if(l.color=new r.Color(1,1,1),l.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;l.color.fromArray(e),l.opacity=e[3]}void 0!==n.baseColorTexture&&u.push(t.assignTexture(l,"map",n.baseColorTexture,3001)),l.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,l.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(u.push(t.assignTexture(l,"metalnessMap",n.metallicRoughnessTexture)),u.push(t.assignTexture(l,"roughnessMap",n.metallicRoughnessTexture))),s=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),u.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,l)}))))}!0===a.doubleSided&&(l.side=r.DoubleSide);const c=a.alphaMode||"OPAQUE";if("BLEND"===c?(l.transparent=!0,l.depthWrite=!1):(l.transparent=!1,"MASK"===c&&(l.alphaTest=void 0!==a.alphaCutoff?a.alphaCutoff:.5)),void 0!==a.normalTexture&&s!==r.MeshBasicMaterial&&(u.push(t.assignTexture(l,"normalMap",a.normalTexture)),l.normalScale=new r.Vector2(1,1),void 0!==a.normalTexture.scale)){const e=a.normalTexture.scale;l.normalScale.set(e,e)}return void 0!==a.occlusionTexture&&s!==r.MeshBasicMaterial&&(u.push(t.assignTexture(l,"aoMap",a.occlusionTexture)),void 0!==a.occlusionTexture.strength&&(l.aoMapIntensity=a.occlusionTexture.strength)),void 0!==a.emissiveFactor&&s!==r.MeshBasicMaterial&&(l.emissive=(new r.Color).fromArray(a.emissiveFactor)),void 0!==a.emissiveTexture&&s!==r.MeshBasicMaterial&&u.push(t.assignTexture(l,"emissiveMap",a.emissiveTexture,3001)),Promise.all(u).then((function(){const n=new s(l);return a.name&&(n.name=a.name),G(n,a),t.associations.set(n,{materials:e}),a.extensions&&U(i,n,a),n}))}createUniqueName(e){const t=r.PropertyBinding.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,i=this.primitiveCache;function a(e){return n[o.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return Y(n,e,t)}))}const s=[];for(let n=0,l=e.length;n<l;n++){const l=e[n],u=V(l),c=i[u];if(c)s.push(c.promise);else{let e;e=l.extensions&&l.extensions[o.KHR_DRACO_MESH_COMPRESSION]?a(l):Y(new r.BufferGeometry,l,t),i[u]={primitive:l,promise:e},s.push(e)}}return Promise.all(s)}loadMesh(e){const t=this,n=this.json,a=this.extensions,s=n.meshes[e],o=s.primitives,l=[];for(let e=0,t=o.length;e<t;e++){const t=void 0===o[e].material?(void 0===(u=this.cache).DefaultMaterial&&(u.DefaultMaterial=new r.MeshStandardMaterial({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:r.FrontSide})),u.DefaultMaterial):this.getDependency("material",o[e].material);l.push(t)}var u;return l.push(t.loadGeometries(o)),Promise.all(l).then((function(n){const l=n.slice(0,n.length-1),u=n[n.length-1],c=[];for(let n=0,h=u.length;n<h;n++){const h=u[n],d=o[n];let f;const p=l[n];if(d.mode===L.TRIANGLES||d.mode===L.TRIANGLE_STRIP||d.mode===L.TRIANGLE_FAN||void 0===d.mode)f=!0===s.isSkinnedMesh?new r.SkinnedMesh(h,p):new r.Mesh(h,p),!0===f.isSkinnedMesh&&f.normalizeSkinWeights(),d.mode===L.TRIANGLE_STRIP?f.geometry=(0,i.Vs)(f.geometry,r.TriangleStripDrawMode):d.mode===L.TRIANGLE_FAN&&(f.geometry=(0,i.Vs)(f.geometry,r.TriangleFanDrawMode));else if(d.mode===L.LINES)f=new r.LineSegments(h,p);else if(d.mode===L.LINE_STRIP)f=new r.Line(h,p);else if(d.mode===L.LINE_LOOP)f=new r.LineLoop(h,p);else{if(d.mode!==L.POINTS)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+d.mode);f=new r.Points(h,p)}Object.keys(f.geometry.morphAttributes).length>0&&H(f,s),f.name=t.createUniqueName(s.name||"mesh_"+e),G(f,s),d.extensions&&U(a,f,d),t.assignFinalMaterial(f),c.push(f)}for(let n=0,r=c.length;n<r;n++)t.associations.set(c[n],{meshes:e,primitives:n});if(1===c.length)return s.extensions&&U(a,c[0],s),c[0];const h=new r.Group;s.extensions&&U(a,h,s),t.associations.set(h,{meshes:e});for(let e=0,t=c.length;e<t;e++)h.add(c[e]);return h}))}loadCamera(e){let t;const n=this.json.cameras[e],i=n[n.type];if(i)return"perspective"===n.type?t=new r.PerspectiveCamera(r.MathUtils.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):"orthographic"===n.type&&(t=new r.OrthographicCamera(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),G(t,n),Promise.resolve(t);console.warn("THREE.GLTFLoader: Missing camera parameters.")}loadSkin(e){const t=this.json.skins[e],n=[];for(let e=0,r=t.joints.length;e<r;e++)n.push(this._loadNodeShallow(t.joints[e]));return void 0!==t.inverseBindMatrices?n.push(this.getDependency("accessor",t.inverseBindMatrices)):n.push(null),Promise.all(n).then((function(e){const n=e.pop(),i=e,a=[],s=[];for(let e=0,o=i.length;e<o;e++){const o=i[e];if(o){a.push(o);const t=new r.Matrix4;null!==n&&t.fromArray(n.array,16*e),s.push(t)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[e])}return new r.Skeleton(a,s)}))}loadAnimation(e){const t=this.json.animations[e],n=t.name?t.name:"animation_"+e,i=[],a=[],s=[],o=[],l=[];for(let e=0,n=t.channels.length;e<n;e++){const n=t.channels[e],r=t.samplers[n.sampler],u=n.target,c=u.node,h=void 0!==t.parameters?t.parameters[r.input]:r.input,d=void 0!==t.parameters?t.parameters[r.output]:r.output;void 0!==u.node&&(i.push(this.getDependency("node",c)),a.push(this.getDependency("accessor",h)),s.push(this.getDependency("accessor",d)),o.push(r),l.push(u))}return Promise.all([Promise.all(i),Promise.all(a),Promise.all(s),Promise.all(o),Promise.all(l)]).then((function(e){const t=e[0],i=e[1],a=e[2],s=e[3],o=e[4],l=[];for(let e=0,n=t.length;e<n;e++){const n=t[e],u=i[e],c=a[e],h=s[e],d=o[e];if(void 0===n)continue;let f;switch(n.updateMatrix(),N[d.path]){case N.weights:f=r.NumberKeyframeTrack;break;case N.rotation:f=r.QuaternionKeyframeTrack;break;default:f=r.VectorKeyframeTrack}const p=n.name?n.name:n.uuid,m=void 0!==h.interpolation?z[h.interpolation]:r.InterpolateLinear,g=[];N[d.path]===N.weights?n.traverse((function(e){e.morphTargetInfluences&&g.push(e.name?e.name:e.uuid)})):g.push(p);let v=c.array;if(c.normalized){const e=j(v.constructor),t=new Float32Array(v.length);for(let n=0,r=v.length;n<r;n++)t[n]=v[n]*e;v=t}for(let e=0,t=g.length;e<t;e++){const t=new f(g[e]+"."+N[d.path],u.array,v,m);"CUBICSPLINE"===h.interpolation&&(t.createInterpolant=function(e){return new(this instanceof r.QuaternionKeyframeTrack?R:B)(this.times,this.values,this.getValueSize()/3,e)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),l.push(t)}}return new r.AnimationClip(n,void 0,l)}))}createNodeMesh(e){const t=this.json,n=this,r=t.nodes[e];return void 0===r.mesh?null:n.getDependency("mesh",r.mesh).then((function(e){const t=n._getNodeRef(n.meshCache,r.mesh,e);return void 0!==r.weights&&t.traverse((function(e){if(e.isMesh)for(let t=0,n=r.weights.length;t<n;t++)e.morphTargetInfluences[t]=r.weights[t]})),t}))}loadNode(e){const t=this,n=this.json.nodes[e],r=t._loadNodeShallow(e),i=[],a=n.children||[];for(let e=0,n=a.length;e<n;e++)i.push(t.getDependency("node",a[e]));const s=void 0===n.skin?Promise.resolve(null):t.getDependency("skin",n.skin);return Promise.all([r,Promise.all(i),s]).then((function(e){const t=e[0],n=e[1],r=e[2];null!==r&&t.traverse((function(e){e.isSkinnedMesh&&e.bind(r,J)}));for(let e=0,r=n.length;e<r;e++)t.add(n[e]);return t}))}_loadNodeShallow(e){const t=this.json,n=this.extensions,i=this;if(void 0!==this.nodeCache[e])return this.nodeCache[e];const a=t.nodes[e],s=a.name?i.createUniqueName(a.name):"",o=[],l=i._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));return l&&o.push(l),void 0!==a.camera&&o.push(i.getDependency("camera",a.camera).then((function(e){return i._getNodeRef(i.cameraCache,a.camera,e)}))),i._invokeAll((function(t){return t.createNodeAttachment&&t.createNodeAttachment(e)})).forEach((function(e){o.push(e)})),this.nodeCache[e]=Promise.all(o).then((function(t){let o;if(o=!0===a.isBone?new r.Bone:t.length>1?new r.Group:1===t.length?t[0]:new r.Object3D,o!==t[0])for(let e=0,n=t.length;e<n;e++)o.add(t[e]);if(a.name&&(o.userData.name=a.name,o.name=s),G(o,a),a.extensions&&U(n,o,a),void 0!==a.matrix){const e=new r.Matrix4;e.fromArray(a.matrix),o.applyMatrix4(e)}else void 0!==a.translation&&o.position.fromArray(a.translation),void 0!==a.rotation&&o.quaternion.fromArray(a.rotation),void 0!==a.scale&&o.scale.fromArray(a.scale);return i.associations.has(o)||i.associations.set(o,{}),i.associations.get(o).nodes=e,o})),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],i=this,a=new r.Group;n.name&&(a.name=i.createUniqueName(n.name)),G(a,n),n.extensions&&U(t,a,n);const s=n.nodes||[],o=[];for(let e=0,t=s.length;e<t;e++)o.push(i.getDependency("node",s[e]));return Promise.all(o).then((function(e){for(let t=0,n=e.length;t<n;t++)a.add(e[t]);return i.associations=(e=>{const t=new Map;for(const[e,n]of i.associations)(e instanceof r.Material||e instanceof r.Texture)&&t.set(e,n);return e.traverse((e=>{const n=i.associations.get(e);null!=n&&t.set(e,n)})),t})(a),a}))}}function Y(e,t,n){const i=t.attributes,a=[];function s(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(const t in i){const n=O[t]||t.toLowerCase();n in e.attributes||a.push(s(i[t],n))}if(void 0!==t.indices&&!e.index){const r=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));a.push(r)}return G(e,t),function(e,t,n){const i=t.attributes,a=new r.Box3;if(void 0===i.POSITION)return;{const e=n.json.accessors[i.POSITION],t=e.min,s=e.max;if(void 0===t||void 0===s)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(a.set(new r.Vector3(t[0],t[1],t[2]),new r.Vector3(s[0],s[1],s[2])),e.normalized){const t=j(D[e.componentType]);a.min.multiplyScalar(t),a.max.multiplyScalar(t)}}const s=t.targets;if(void 0!==s){const e=new r.Vector3,t=new r.Vector3;for(let r=0,i=s.length;r<i;r++){const i=s[r];if(void 0!==i.POSITION){const r=n.json.accessors[i.POSITION],a=r.min,s=r.max;if(void 0!==a&&void 0!==s){if(t.setX(Math.max(Math.abs(a[0]),Math.abs(s[0]))),t.setY(Math.max(Math.abs(a[1]),Math.abs(s[1]))),t.setZ(Math.max(Math.abs(a[2]),Math.abs(s[2]))),r.normalized){const e=j(D[r.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}a.expandByVector(e)}e.boundingBox=a;const o=new r.Sphere;a.getCenter(o.center),o.radius=a.min.distanceTo(a.max)/2,e.boundingSphere=o}(e,t,n),Promise.all(a).then((function(){return void 0!==t.targets?function(e,t,n){let r=!1,i=!1,a=!1;for(let e=0,n=t.length;e<n;e++){const n=t[e];if(void 0!==n.POSITION&&(r=!0),void 0!==n.NORMAL&&(i=!0),void 0!==n.COLOR_0&&(a=!0),r&&i&&a)break}if(!r&&!i&&!a)return Promise.resolve(e);const s=[],o=[],l=[];for(let u=0,c=t.length;u<c;u++){const c=t[u];if(r){const t=void 0!==c.POSITION?n.getDependency("accessor",c.POSITION):e.attributes.position;s.push(t)}if(i){const t=void 0!==c.NORMAL?n.getDependency("accessor",c.NORMAL):e.attributes.normal;o.push(t)}if(a){const t=void 0!==c.COLOR_0?n.getDependency("accessor",c.COLOR_0):e.attributes.color;l.push(t)}}return Promise.all([Promise.all(s),Promise.all(o),Promise.all(l)]).then((function(t){const n=t[0],s=t[1],o=t[2];return r&&(e.morphAttributes.position=n),i&&(e.morphAttributes.normal=s),a&&(e.morphAttributes.color=o),e.morphTargetsRelative=!0,e}))}(e,t.targets,n):e}))}},8197:(e,t,n)=>{"use strict";n.d(t,{x:()=>i});var r=n(9477);class i extends r.DataTextureLoader{constructor(e){super(e),this.type=r.HalfFloatType}parse(e){const t=function(e,t){switch(e){case 1:console.error("THREE.RGBELoader Read Error: "+(t||""));break;case 2:console.error("THREE.RGBELoader Write Error: "+(t||""));break;case 3:console.error("THREE.RGBELoader Bad File Format: "+(t||""));break;default:console.error("THREE.RGBELoader: Error: "+(t||""))}return-1},n=function(e,t,n){t=t||1024;let r=e.pos,i=-1,a=0,s="",o=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));for(;0>(i=o.indexOf("\n"))&&a<t&&r<e.byteLength;)s+=o,a+=o.length,r+=128,o+=String.fromCharCode.apply(null,new Uint16Array(e.subarray(r,r+128)));return-1<i&&(!1!==n&&(e.pos+=a+i+1),s+o.slice(0,i))},i=function(e,t,n,r){const i=e[t+3],a=Math.pow(2,i-128)/255;n[r+0]=e[t+0]*a,n[r+1]=e[t+1]*a,n[r+2]=e[t+2]*a,n[r+3]=1},a=function(e,t,n,i){const a=e[t+3],s=Math.pow(2,a-128)/255;n[i+0]=r.DataUtils.toHalfFloat(Math.min(e[t+0]*s,65504)),n[i+1]=r.DataUtils.toHalfFloat(Math.min(e[t+1]*s,65504)),n[i+2]=r.DataUtils.toHalfFloat(Math.min(e[t+2]*s,65504)),n[i+3]=r.DataUtils.toHalfFloat(1)},s=new Uint8Array(e);s.pos=0;const o=function(e){const r=/^\s*GAMMA\s*=\s*(\d+(\.\d+)?)\s*$/,i=/^\s*EXPOSURE\s*=\s*(\d+(\.\d+)?)\s*$/,a=/^\s*FORMAT=(\S+)\s*$/,s=/^\s*\-Y\s+(\d+)\s+\+X\s+(\d+)\s*$/,o={valid:0,string:"",comments:"",programtype:"RGBE",format:"",gamma:1,exposure:1,width:0,height:0};let l,u;if(e.pos>=e.byteLength||!(l=n(e)))return t(1,"no header found");if(!(u=l.match(/^#\?(\S+)/)))return t(3,"bad initial token");for(o.valid|=1,o.programtype=u[1],o.string+=l+"\n";l=n(e),!1!==l;)if(o.string+=l+"\n","#"!==l.charAt(0)){if((u=l.match(r))&&(o.gamma=parseFloat(u[1])),(u=l.match(i))&&(o.exposure=parseFloat(u[1])),(u=l.match(a))&&(o.valid|=2,o.format=u[1]),(u=l.match(s))&&(o.valid|=4,o.height=parseInt(u[1],10),o.width=parseInt(u[2],10)),2&o.valid&&4&o.valid)break}else o.comments+=l+"\n";return 2&o.valid?4&o.valid?o:t(3,"missing image size specifier"):t(3,"missing format specifier")}(s);if(-1!==o){const e=o.width,n=o.height,l=function(e,n,r){const i=n;if(i<8||i>32767||2!==e[0]||2!==e[1]||128&e[2])return new Uint8Array(e);if(i!==(e[2]<<8|e[3]))return t(3,"wrong scanline width");const a=new Uint8Array(4*n*r);if(!a.length)return t(4,"unable to allocate buffer space");let s=0,o=0;const l=4*i,u=new Uint8Array(4),c=new Uint8Array(l);let h=r;for(;h>0&&o<e.byteLength;){if(o+4>e.byteLength)return t(1);if(u[0]=e[o++],u[1]=e[o++],u[2]=e[o++],u[3]=e[o++],2!=u[0]||2!=u[1]||(u[2]<<8|u[3])!=i)return t(3,"bad rgbe scanline format");let n,r=0;for(;r<l&&o<e.byteLength;){n=e[o++];const i=n>128;if(i&&(n-=128),0===n||r+n>l)return t(3,"bad scanline data");if(i){const t=e[o++];for(let e=0;e<n;e++)c[r++]=t}else c.set(e.subarray(o,o+n),r),r+=n,o+=n}const d=i;for(let e=0;e<d;e++){let t=0;a[s]=c[e+t],t+=i,a[s+1]=c[e+t],t+=i,a[s+2]=c[e+t],t+=i,a[s+3]=c[e+t],s+=4}h--}return a}(s.subarray(s.pos),e,n);if(-1!==l){let t,s,u;switch(this.type){case r.FloatType:u=l.length/4;const e=new Float32Array(4*u);for(let t=0;t<u;t++)i(l,4*t,e,4*t);t=e,s=r.FloatType;break;case r.HalfFloatType:u=l.length/4;const n=new Uint16Array(4*u);for(let e=0;e<u;e++)a(l,4*e,n,4*e);t=n,s=r.HalfFloatType;break;default:console.error("THREE.RGBELoader: unsupported type: ",this.type)}return{width:e,height:n,data:t,header:o.string,gamma:o.gamma,exposure:o.exposure,type:s}}}return null}setDataType(e){return this.type=e,this}load(e,t,n,i){return super.load(e,(function(e,n){switch(e.type){case r.FloatType:case r.HalfFloatType:"colorSpace"in e?e.colorSpace="srgb-linear":e.encoding=3e3,e.minFilter=r.LinearFilter,e.magFilter=r.LinearFilter,e.generateMipmaps=!1,e.flipY=!0}t&&t(e,n)}),n,i)}}},5052:(e,t,n)=>{"use strict";n.d(t,{e:()=>i});var r=n(9477);class i extends r.Mesh{constructor(e,t){var n,i;const a=(s=e)&&s.isCubeTexture;var s;const o=(null!=(i=a?null==(n=e.image[0])?void 0:n.width:e.image.width)?i:1024)/4,l=Math.floor(Math.log2(o)),u=Math.pow(2,l),c=[a?"#define ENVMAP_TYPE_CUBE":"","#define CUBEUV_TEXEL_WIDTH "+1/(3*Math.max(u,112)),"#define CUBEUV_TEXEL_HEIGHT "+1/(4*u),`#define CUBEUV_MAX_MIP ${l}.0`].join("\n")+"\n #define ENVMAP_TYPE_CUBE_UV\n varying vec3 vWorldPosition;\n uniform float radius;\n uniform float height;\n uniform float angle;\n #ifdef ENVMAP_TYPE_CUBE\n uniform samplerCube map;\n #else\n uniform sampler2D map;\n #endif\n // From: https://www.shadertoy.com/view/4tsBD7\n float diskIntersectWithBackFaceCulling( vec3 ro, vec3 rd, vec3 c, vec3 n, float r ) \n {\n float d = dot ( rd, n );\n \n if( d > 0.0 ) { return 1e6; }\n \n vec3 o = ro - c;\n float t = - dot( n, o ) / d;\n vec3 q = o + rd * t;\n \n return ( dot( q, q ) < r * r ) ? t : 1e6;\n }\n // From: https://www.iquilezles.org/www/articles/intersectors/intersectors.htm\n float sphereIntersect( vec3 ro, vec3 rd, vec3 ce, float ra ) \n {\n vec3 oc = ro - ce;\n float b = dot( oc, rd );\n float c = dot( oc, oc ) - ra * ra;\n float h = b * b - c;\n \n if( h < 0.0 ) { return -1.0; }\n \n h = sqrt( h );\n \n return - b + h;\n }\n vec3 project() \n {\n vec3 p = normalize( vWorldPosition );\n vec3 camPos = cameraPosition;\n camPos.y -= height;\n float intersection = sphereIntersect( camPos, p, vec3( 0.0 ), radius );\n if( intersection > 0.0 ) {\n \n vec3 h = vec3( 0.0, - height, 0.0 );\n float intersection2 = diskIntersectWithBackFaceCulling( camPos, p, h, vec3( 0.0, 1.0, 0.0 ), radius );\n p = ( camPos + min( intersection, intersection2 ) * p ) / radius;\n } else {\n p = vec3( 0.0, 1.0, 0.0 );\n }\n return p;\n }\n #include <common>\n #include <cube_uv_reflection_fragment>\n void main() \n {\n vec3 projectedWorldPosition = project();\n \n #ifdef ENVMAP_TYPE_CUBE\n vec3 outcolor = textureCube( map, projectedWorldPosition ).rgb;\n #else\n vec3 direction = normalize( projectedWorldPosition );\n vec2 uv = equirectUv( direction );\n vec3 outcolor = texture2D( map, uv ).rgb;\n #endif\n gl_FragColor = vec4( outcolor, 1.0 );\n #include <tonemapping_fragment>\n #include <encodings_fragment>\n }\n ",h={map:{value:e},height:{value:(null==t?void 0:t.height)||15},radius:{value:(null==t?void 0:t.radius)||100}};super(new r.IcosahedronGeometry(1,16),new r.ShaderMaterial({uniforms:h,fragmentShader:c,vertexShader:"\n varying vec3 vWorldPosition;\n void main() \n {\n vec4 worldPosition = ( modelMatrix * vec4( position, 1.0 ) );\n vWorldPosition = worldPosition.xyz;\n \n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n }\n ",side:r.DoubleSide}))}set radius(e){this.material.uniforms.radius.value=e}get radius(){return this.material.uniforms.radius.value}set height(e){this.material.uniforms.height.value=e}get height(){return this.material.uniforms.height.value}}},8466:(e,t,n)=>{"use strict";n.d(t,{P:()=>r});const r={uniforms:{tDiffuse:{value:null},h:{value:1/512}},vertexShader:"\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ",fragmentShader:"\n uniform sampler2D tDiffuse;\n uniform float h;\n\n varying vec2 vUv;\n\n void main() {\n\n \tvec4 sum = vec4( 0.0 );\n\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 4.0 * h, vUv.y ) ) * 0.051;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x - 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 1.0 * h, vUv.y ) ) * 0.1531;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 2.0 * h, vUv.y ) ) * 0.12245;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 3.0 * h, vUv.y ) ) * 0.0918;\n \tsum += texture2D( tDiffuse, vec2( vUv.x + 4.0 * h, vUv.y ) ) * 0.051;\n\n \tgl_FragColor = sum;\n\n }\n "}},7312:(e,t,n)=>{"use strict";n.d(t,{Z:()=>r});const r={uniforms:{tDiffuse:{value:null},v:{value:1/512}},vertexShader:"\n varying vec2 vUv;\n\n void main() {\n\n vUv = uv;\n gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n\n }\n ",fragmentShader:"\n\n uniform sampler2D tDiffuse;\n uniform float v;\n\n varying vec2 vUv;\n\n void main() {\n\n vec4 sum = vec4( 0.0 );\n\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 4.0 * v ) ) * 0.051;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y - 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y ) ) * 0.1633;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 1.0 * v ) ) * 0.1531;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 2.0 * v ) ) * 0.12245;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 3.0 * v ) ) * 0.0918;\n sum += texture2D( tDiffuse, vec2( vUv.x, vUv.y + 4.0 * v ) ) * 0.051;\n\n gl_FragColor = sum;\n\n }\n "}},8667:(e,t,n)=>{"use strict";n.d(t,{Vs:()=>i});var r=n(9477);function i(e,t){if(t===r.TrianglesDrawMode)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===r.TriangleFanDrawMode||t===r.TriangleStripDrawMode){let n=e.getIndex();if(null===n){const t=[],r=e.getAttribute("position");if(void 0===r)return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),e;for(let e=0;e<r.count;e++)t.push(e);e.setIndex(t),n=e.getIndex()}const i=n.count-2,a=[];if(n)if(t===r.TriangleFanDrawMode)for(let e=1;e<=i;e++)a.push(n.getX(0)),a.push(n.getX(e)),a.push(n.getX(e+1));else for(let e=0;e<i;e++)e%2==0?(a.push(n.getX(e)),a.push(n.getX(e+1)),a.push(n.getX(e+2))):(a.push(n.getX(e+2)),a.push(n.getX(e+1)),a.push(n.getX(e)));a.length/3!==i&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const s=e.clone();return s.setIndex(a),s.clearGroups(),s}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e}},4671:(e,t,n)=>{"use strict";n.d(t,{Z:()=>a});var r=n(7294);const i="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?r.useEffect:r.useLayoutEffect;function a(e){const t="function"==typeof e?function(e){let t;const n=new Set,r=(e,r)=>{const i="function"==typeof e?e(t):e;if(i!==t){const e=t;t=r?i:Object.assign({},t,i),n.forEach((n=>n(t,e)))}},i=()=>t,a={setState:r,getState:i,subscribe:(e,r,a)=>r||a?((e,r=i,a=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let s=r(t);function o(){const n=r(t);if(!a(s,n)){const t=s;e(s=n,t)}}return n.add(o),()=>n.delete(o)})(e,r,a):(n.add(e),()=>n.delete(e)),destroy:()=>n.clear()};return t=e(r,i,a),a}(e):e,n=(e=t.getState,n=Object.is)=>{const[,a]=(0,r.useReducer)((e=>e+1),0),s=t.getState(),o=(0,r.useRef)(s),l=(0,r.useRef)(e),u=(0,r.useRef)(n),c=(0,r.useRef)(!1),h=(0,r.useRef)();let d;void 0===h.current&&(h.current=e(s));let f=!1;(o.current!==s||l.current!==e||u.current!==n||c.current)&&(d=e(s),f=!n(h.current,d)),i((()=>{f&&(h.current=d),o.current=s,l.current=e,u.current=n,c.current=!1}));const p=(0,r.useRef)(s);i((()=>{const e=()=>{try{const e=t.getState(),n=l.current(e);u.current(h.current,n)||(o.current=e,h.current=n,a())}catch(e){c.current=!0,a()}},n=t.subscribe(e);return t.getState()!==p.current&&e(),n}),[]);const m=f?d:h.current;return(0,r.useDebugValue)(m),m};return Object.assign(n,t),n[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const e=[n,t];return{next(){const t=e.length<=0;return{value:e.shift(),done:t}}}},n}},7061:(e,t,n)=>{var r=n(8698).default;function i(){"use strict";e.exports=i=function(){return t},e.exports.__esModule=!0,e.exports.default=e.exports;var t={},n=Object.prototype,a=n.hasOwnProperty,s=Object.defineProperty||function(e,t,n){e[t]=n.value},o="function"==typeof Symbol?Symbol:{},l=o.iterator||"@@iterator",u=o.asyncIterator||"@@asyncIterator",c=o.toStringTag||"@@toStringTag";function h(e,t,n){return Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),e[t]}try{h({},"")}catch(e){h=function(e,t,n){return e[t]=n}}function d(e,t,n,r){var i=t&&t.prototype instanceof m?t:m,a=Object.create(i.prototype),o=new T(r||[]);return s(a,"_invoke",{value:S(e,n,o)}),a}function f(e,t,n){try{return{type:"normal",arg:e.call(t,n)}}catch(e){return{type:"throw",arg:e}}}t.wrap=d;var p={};function m(){}function g(){}function v(){}var y={};h(y,l,(function(){return this}));var x=Object.getPrototypeOf,b=x&&x(x(B([])));b&&b!==n&&a.call(b,l)&&(y=b);var _=v.prototype=m.prototype=Object.create(y);function w(e){["next","throw","return"].forEach((function(t){h(e,t,(function(e){return this._invoke(t,e)}))}))}function M(e,t){function n(i,s,o,l){var u=f(e[i],e,s);if("throw"!==u.type){var c=u.arg,h=c.value;return h&&"object"==r(h)&&a.call(h,"__await")?t.resolve(h.__await).then((function(e){n("next",e,o,l)}),(function(e){n("throw",e,o,l)})):t.resolve(h).then((function(e){c.value=e,o(c)}),(function(e){return n("throw",e,o,l)}))}l(u.arg)}var i;s(this,"_invoke",{value:function(e,r){function a(){return new t((function(t,i){n(e,r,t,i)}))}return i=i?i.then(a,a):a()}})}function S(e,t,n){var r="suspendedStart";return function(i,a){if("executing"===r)throw new Error("Generator is already running");if("completed"===r){if("throw"===i)throw a;return{value:void 0,done:!0}}for(n.method=i,n.arg=a;;){var s=n.delegate;if(s){var o=A(s,n);if(o){if(o===p)continue;return o}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===r)throw r="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r="executing";var l=f(e,t,n);if("normal"===l.type){if(r=n.done?"completed":"suspendedYield",l.arg===p)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(r="completed",n.method="throw",n.arg=l.arg)}}}function A(e,t){var n=t.method,r=e.iterator[n];if(void 0===r)return t.delegate=null,"throw"===n&&e.iterator.return&&(t.method="return",t.arg=void 0,A(e,t),"throw"===t.method)||"return"!==n&&(t.method="throw",t.arg=new TypeError("The iterator does not provide a '"+n+"' method")),p;var i=f(r,e.iterator,t.arg);if("throw"===i.type)return t.method="throw",t.arg=i.arg,t.delegate=null,p;var a=i.arg;return a?a.done?(t[e.resultName]=a.value,t.next=e.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,p):a:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,p)}function C(e){var t={tryLoc:e[0]};1 in e&&(t.catchLoc=e[1]),2 in e&&(t.finallyLoc=e[2],t.afterLoc=e[3]),this.tryEntries.push(t)}function E(e){var t=e.completion||{};t.type="normal",delete t.arg,e.completion=t}function T(e){this.tryEntries=[{tryLoc:"root"}],e.forEach(C,this),this.reset(!0)}function B(e){if(e){var t=e[l];if(t)return t.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var n=-1,r=function t(){for(;++n<e.length;)if(a.call(e,n))return t.value=e[n],t.done=!1,t;return t.value=void 0,t.done=!0,t};return r.next=r}}return{next:P}}function P(){return{value:void 0,done:!0}}return g.prototype=v,s(_,"constructor",{value:v,configurable:!0}),s(v,"constructor",{value:g,configurable:!0}),g.displayName=h(v,c,"GeneratorFunction"),t.isGeneratorFunction=function(e){var t="function"==typeof e&&e.constructor;return!!t&&(t===g||"GeneratorFunction"===(t.displayName||t.name))},t.mark=function(e){return Object.setPrototypeOf?Object.setPrototypeOf(e,v):(e.__proto__=v,h(e,c,"GeneratorFunction")),e.prototype=Object.create(_),e},t.awrap=function(e){return{__await:e}},w(M.prototype),h(M.prototype,u,(function(){return this})),t.AsyncIterator=M,t.async=function(e,n,r,i,a){void 0===a&&(a=Promise);var s=new M(d(e,n,r,i),a);return t.isGeneratorFunction(n)?s:s.next().then((function(e){return e.done?e.value:s.next()}))},w(_),h(_,c,"Generator"),h(_,l,(function(){return this})),h(_,"toString",(function(){return"[object Generator]"})),t.keys=function(e){var t=Object(e),n=[];for(var r in t)n.push(r);return n.reverse(),function e(){for(;n.length;){var r=n.pop();if(r in t)return e.value=r,e.done=!1,e}return e.done=!0,e}},t.values=B,T.prototype={constructor:T,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(E),!e)for(var t in this)"t"===t.charAt(0)&&a.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var e=this.tryEntries[0].completion;if("throw"===e.type)throw e.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var t=this;function n(n,r){return s.type="throw",s.arg=e,t.next=n,r&&(t.method="next",t.arg=void 0),!!r}for(var r=this.tryEntries.length-1;r>=0;--r){var i=this.tryEntries[r],s=i.completion;if("root"===i.tryLoc)return n("end");if(i.tryLoc<=this.prev){var o=a.call(i,"catchLoc"),l=a.call(i,"finallyLoc");if(o&&l){if(this.prev<i.catchLoc)return n(i.catchLoc,!0);if(this.prev<i.finallyLoc)return n(i.finallyLoc)}else if(o){if(this.prev<i.catchLoc)return n(i.catchLoc,!0)}else{if(!l)throw new Error("try statement without catch or finally");if(this.prev<i.finallyLoc)return n(i.finallyLoc)}}}},abrupt:function(e,t){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&a.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var i=r;break}}i&&("break"===e||"continue"===e)&&i.tryLoc<=t&&t<=i.finallyLoc&&(i=null);var s=i?i.completion:{};return s.type=e,s.arg=t,i?(this.method="next",this.next=i.finallyLoc,p):this.complete(s)},complete:function(e,t){if("throw"===e.type)throw e.arg;return"break"===e.type||"continue"===e.type?this.next=e.arg:"return"===e.type?(this.rval=this.arg=e.arg,this.method="return",this.next="end"):"normal"===e.type&&t&&(this.next=t),p},finish:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===e)return this.complete(n.completion,n.afterLoc),E(n),p}},catch:function(e){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===e){var r=n.completion;if("throw"===r.type){var i=r.arg;E(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(e,t,n){return this.delegate={iterator:B(e),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),p}},t}e.exports=i,e.exports.__esModule=!0,e.exports.default=e.exports},8698:e=>{function t(n){return e.exports=t="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},e.exports.__esModule=!0,e.exports.default=e.exports,t(n)}e.exports=t,e.exports.__esModule=!0,e.exports.default=e.exports},4687:(e,t,n)=>{var r=n(7061)();e.exports=r;try{regeneratorRuntime=r}catch(e){"object"==typeof globalThis?globalThis.regeneratorRuntime=r:Function("r","regeneratorRuntime = r")(r)}},907:(e,t,n)=>{"use strict";function r(e,t){(null==t||t>e.length)&&(t=e.length);for(var n=0,r=new Array(t);n<t;n++)r[n]=e[n];return r}n.d(t,{Z:()=>r})},3878:(e,t,n)=>{"use strict";function r(e){if(Array.isArray(e))return e}n.d(t,{Z:()=>r})},5057:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(907);function i(e){if(Array.isArray(e))return(0,r.Z)(e)}},7462:(e,t,n)=>{"use strict";function r(){return r=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},r.apply(this,arguments)}n.d(t,{Z:()=>r})},9199:(e,t,n)=>{"use strict";function r(e){if("undefined"!=typeof Symbol&&null!=e[Symbol.iterator]||null!=e["@@iterator"])return Array.from(e)}n.d(t,{Z:()=>r})},1902:(e,t,n)=>{"use strict";function r(e,t){var n=null==e?null:"undefined"!=typeof Symbol&&e[Symbol.iterator]||e["@@iterator"];if(null!=n){var r,i,a,s,o=[],l=!0,u=!1;try{if(a=(n=n.call(e)).next,0===t){if(Object(n)!==n)return;l=!1}else for(;!(l=(r=a.call(n)).done)&&(o.push(r.value),o.length!==t);l=!0);}catch(e){u=!0,i=e}finally{try{if(!l&&null!=n.return&&(s=n.return(),Object(s)!==s))return}finally{if(u)throw i}}return o}}n.d(t,{Z:()=>r})},5267:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:()=>r})},2786:(e,t,n)=>{"use strict";function r(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}n.d(t,{Z:()=>r})},3324:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(3878),i=n(1902),a=n(181),s=n(5267);function o(e,t){return(0,r.Z)(e)||(0,i.Z)(e,t)||(0,a.Z)(e,t)||(0,s.Z)()}},9062:(e,t,n)=>{"use strict";n.d(t,{Z:()=>o});var r=n(5057),i=n(9199),a=n(181),s=n(2786);function o(e){return(0,r.Z)(e)||(0,i.Z)(e)||(0,a.Z)(e)||(0,s.Z)()}},181:(e,t,n)=>{"use strict";n.d(t,{Z:()=>i});var r=n(907);function i(e,t){if(e){if("string"==typeof e)return(0,r.Z)(e,t);var n=Object.prototype.toString.call(e).slice(8,-1);return"Object"===n&&e.constructor&&(n=e.constructor.name),"Map"===n||"Set"===n?Array.from(e):"Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)?(0,r.Z)(e,t):void 0}}},3213:(e,t,n)=>{"use strict";n.d(t,{Hn:()=>m,jn:()=>x});var r=n(7294),i=Object.defineProperty,a=Object.defineProperties,s=Object.getOwnPropertyDescriptors,o=Object.getOwnPropertySymbols,l=Object.prototype.hasOwnProperty,u=Object.prototype.propertyIsEnumerable,c=(e,t,n)=>t in e?i(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,h=(e,t)=>{for(var n in t||(t={}))l.call(t,n)&&c(e,n,t[n]);if(o)for(var n of o(t))u.call(t,n)&&c(e,n,t[n]);return e};function d(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){const e=d(r,t,n);if(e)return e;r=t?null:r.sibling}}function f(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}const p=f(r.createContext(null));class m extends r.Component{render(){return r.createElement(p.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:g,ReactCurrentDispatcher:v}=r.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function y(){const e=r.useContext(p);if(!e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const t=r.useId();return r.useMemo((()=>{var n;return null!=(n=g.current)?n:d(e,!1,(e=>{let n=e.memoizedState;for(;n;){if(n.memoizedState===t)return!0;n=n.next}}))}),[e,t])}function x(){var e,t;const n=y(),[i]=r.useState((()=>new Map));i.clear();let o=n;for(;o;){const n=null==(e=o.type)?void 0:e._context;n&&n!==p&&!i.has(n)&&i.set(n,null==(t=v.current)?void 0:t.readContext(f(n))),o=o.return}return r.useMemo((()=>Array.from(i.keys()).reduce(((e,t)=>n=>{return r.createElement(e,null,r.createElement(t.Provider,(o=h({},n),l={value:i.get(t)},a(o,s(l)))));var o,l}),(e=>r.createElement(m,h({},e))))),[i])}},9477:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ACESFilmicToneMapping:()=>te,AddEquation:()=>S,AddOperation:()=>q,AdditiveAnimationBlendMode:()=>Et,AdditiveBlending:()=>b,AlphaFormat:()=>De,AlwaysDepth:()=>G,AlwaysStencilFunc:()=>tn,AmbientLight:()=>Vh,AmbientLightProbe:()=>sd,AnimationClip:()=>fh,AnimationLoader:()=>wh,AnimationMixer:()=>kd,AnimationObjectGroup:()=>Ld,AnimationUtils:()=>eh,ArcCurve:()=>yu,ArrayCamera:()=>Yo,ArrowHelper:()=>Ef,Audio:()=>yd,AudioAnalyser:()=>Sd,AudioContext:()=>rd,AudioListener:()=>vd,AudioLoader:()=>id,AxesHelper:()=>Tf,BackSide:()=>m,BasicDepthPacking:()=>Dt,BasicShadowMap:()=>c,Bone:()=>kl,BooleanKeyframeTrack:()=>sh,Box2:()=>Xd,Box3:()=>hr,Box3Helper:()=>wf,BoxBufferGeometry:()=>Of,BoxGeometry:()=>sa,BoxHelper:()=>_f,BufferAttribute:()=>Ci,BufferGeometry:()=>Wi,BufferGeometryLoader:()=>qh,ByteType:()=>Me,Cache:()=>mh,Camera:()=>da,CameraHelper:()=>yf,CanvasTexture:()=>mu,CapsuleBufferGeometry:()=>Nf,CapsuleGeometry:()=>zu,CatmullRomCurve3:()=>Su,CineonToneMapping:()=>ee,CircleBufferGeometry:()=>zf,CircleGeometry:()=>Uu,ClampToEdgeWrapping:()=>ce,Clock:()=>hd,Color:()=>Xn,ColorKeyframeTrack:()=>oh,ColorManagement:()=>Un,CompressedArrayTexture:()=>pu,CompressedTexture:()=>fu,CompressedTextureLoader:()=>Mh,ConeBufferGeometry:()=>Uf,ConeGeometry:()=>Hu,CubeCamera:()=>ma,CubeReflectionMapping:()=>ie,CubeRefractionMapping:()=>ae,CubeTexture:()=>ga,CubeTextureLoader:()=>Ah,CubeUVReflectionMapping:()=>le,CubicBezierCurve:()=>Tu,CubicBezierCurve3:()=>Bu,CubicInterpolant:()=>nh,CullFaceBack:()=>o,CullFaceFront:()=>l,CullFaceFrontBack:()=>u,CullFaceNone:()=>s,Curve:()=>gu,CurvePath:()=>Fu,CustomBlending:()=>M,CustomToneMapping:()=>ne,CylinderBufferGeometry:()=>Gf,CylinderGeometry:()=>Gu,Cylindrical:()=>jd,Data3DTexture:()=>ir,DataArrayTexture:()=>nr,DataTexture:()=>Fl,DataTexture2DArray:()=>kf,DataTexture3D:()=>Ff,DataTextureLoader:()=>Ch,DataUtils:()=>Lf,DecrementStencilOp:()=>Wt,DecrementWrapStencilOp:()=>Jt,DefaultLoadingManager:()=>vh,DepthFormat:()=>Ne,DepthStencilFormat:()=>ze,DepthTexture:()=>Zo,DirectionalLight:()=>Hh,DirectionalLightHelper:()=>mf,DiscreteInterpolant:()=>ih,DodecahedronBufferGeometry:()=>Hf,DodecahedronGeometry:()=>Wu,DoubleSide:()=>g,DstAlphaFactor:()=>k,DstColorFactor:()=>O,DynamicCopyUsage:()=>cn,DynamicDrawUsage:()=>rn,DynamicReadUsage:()=>on,EdgesGeometry:()=>Ku,EllipseCurve:()=>vu,EqualDepth:()=>W,EqualStencilFunc:()=>qt,EquirectangularReflectionMapping:()=>se,EquirectangularRefractionMapping:()=>oe,Euler:()=>Yr,EventDispatcher:()=>mn,ExtrudeBufferGeometry:()=>Vf,ExtrudeGeometry:()=>Sc,FileLoader:()=>_h,Float16BufferAttribute:()=>Ii,Float32BufferAttribute:()=>ki,Float64BufferAttribute:()=>Fi,FloatType:()=>Te,Fog:()=>al,FogExp2:()=>il,FramebufferTexture:()=>du,FrontSide:()=>p,Frustum:()=>Sa,GLBufferAttribute:()=>Ud,GLSL1:()=>dn,GLSL3:()=>fn,GreaterDepth:()=>J,GreaterEqualDepth:()=>j,GreaterEqualStencilFunc:()=>en,GreaterStencilFunc:()=>Zt,GridHelper:()=>cf,Group:()=>Ko,HalfFloatType:()=>Be,HemisphereLight:()=>Bh,HemisphereLightHelper:()=>uf,HemisphereLightProbe:()=>ad,IcosahedronBufferGeometry:()=>Wf,IcosahedronGeometry:()=>Cc,ImageBitmapLoader:()=>td,ImageLoader:()=>Sh,ImageUtils:()=>Kn,ImmediateRenderObject:()=>Df,IncrementStencilOp:()=>Vt,IncrementWrapStencilOp:()=>jt,InstancedBufferAttribute:()=>Ul,InstancedBufferGeometry:()=>Kh,InstancedInterleavedBuffer:()=>zd,InstancedMesh:()=>Jl,Int16BufferAttribute:()=>Pi,Int32BufferAttribute:()=>Li,Int8BufferAttribute:()=>Ei,IntType:()=>Ce,InterleavedBuffer:()=>ol,InterleavedBufferAttribute:()=>ul,Interpolant:()=>th,InterpolateDiscrete:()=>bt,InterpolateLinear:()=>_t,InterpolateSmooth:()=>wt,InvertStencilOp:()=>Xt,KeepStencilOp:()=>Gt,KeyframeTrack:()=>ah,LOD:()=>Tl,LatheBufferGeometry:()=>jf,LatheGeometry:()=>Nu,Layers:()=>Kr,LessDepth:()=>H,LessEqualDepth:()=>V,LessEqualStencilFunc:()=>Qt,LessStencilFunc:()=>Kt,Light:()=>Th,LightProbe:()=>Jh,Line:()=>$l,Line3:()=>qd,LineBasicMaterial:()=>Xl,LineCurve:()=>Pu,LineCurve3:()=>Ru,LineDashedMaterial:()=>Xc,LineLoop:()=>ru,LineSegments:()=>nu,LinearEncoding:()=>Rt,LinearFilter:()=>ve,LinearInterpolant:()=>rh,LinearMipMapLinearFilter:()=>_e,LinearMipMapNearestFilter:()=>xe,LinearMipmapLinearFilter:()=>be,LinearMipmapNearestFilter:()=>ye,LinearSRGBColorSpace:()=>zt,LinearToneMapping:()=>Z,Loader:()=>yh,LoaderUtils:()=>Yh,LoadingManager:()=>gh,LoopOnce:()=>vt,LoopPingPong:()=>xt,LoopRepeat:()=>yt,LuminanceAlphaFormat:()=>Oe,LuminanceFormat:()=>Fe,MOUSE:()=>i,Material:()=>wi,MaterialLoader:()=>Xh,MathUtils:()=>Bn,Matrix3:()=>Rn,Matrix4:()=>Nr,MaxEquation:()=>T,Mesh:()=>ia,MeshBasicMaterial:()=>Mi,MeshDepthMaterial:()=>Ho,MeshDistanceMaterial:()=>Vo,MeshLambertMaterial:()=>jc,MeshMatcapMaterial:()=>Jc,MeshNormalMaterial:()=>Wc,MeshPhongMaterial:()=>Hc,MeshPhysicalMaterial:()=>Gc,MeshStandardMaterial:()=>Uc,MeshToonMaterial:()=>Vc,MinEquation:()=>E,MirroredRepeatWrapping:()=>he,MixOperation:()=>K,MultiplyBlending:()=>w,MultiplyOperation:()=>Y,NearestFilter:()=>de,NearestMipMapLinearFilter:()=>ge,NearestMipMapNearestFilter:()=>pe,NearestMipmapLinearFilter:()=>me,NearestMipmapNearestFilter:()=>fe,NeverDepth:()=>U,NeverStencilFunc:()=>Yt,NoBlending:()=>y,NoColorSpace:()=>Ot,NoToneMapping:()=>Q,NormalAnimationBlendMode:()=>Ct,NormalBlending:()=>x,NotEqualDepth:()=>X,NotEqualStencilFunc:()=>$t,NumberKeyframeTrack:()=>lh,Object3D:()=>ui,ObjectLoader:()=>Qh,ObjectSpaceNormalMap:()=>Ft,OctahedronBufferGeometry:()=>Jf,OctahedronGeometry:()=>Ec,OneFactor:()=>P,OneMinusDstAlphaFactor:()=>F,OneMinusDstColorFactor:()=>N,OneMinusSrcAlphaFactor:()=>I,OneMinusSrcColorFactor:()=>L,OrthographicCamera:()=>Na,PCFShadowMap:()=>h,PCFSoftShadowMap:()=>d,PMREMGenerator:()=>Ja,Path:()=>Ou,PerspectiveCamera:()=>fa,Plane:()=>_a,PlaneBufferGeometry:()=>Xf,PlaneGeometry:()=>Ea,PlaneHelper:()=>Mf,PointLight:()=>Uh,PointLightHelper:()=>af,Points:()=>uu,PointsMaterial:()=>iu,PolarGridHelper:()=>hf,PolyhedronBufferGeometry:()=>Yf,PolyhedronGeometry:()=>Vu,PositionalAudio:()=>Md,PropertyBinding:()=>Rd,PropertyMixer:()=>Ad,QuadraticBezierCurve:()=>Lu,QuadraticBezierCurve3:()=>Du,Quaternion:()=>or,QuaternionKeyframeTrack:()=>ch,QuaternionLinearInterpolant:()=>uh,REVISION:()=>r,RGBADepthPacking:()=>It,RGBAFormat:()=>ke,RGBAIntegerFormat:()=>We,RGBA_ASTC_10x10_Format:()=>ft,RGBA_ASTC_10x5_Format:()=>ct,RGBA_ASTC_10x6_Format:()=>ht,RGBA_ASTC_10x8_Format:()=>dt,RGBA_ASTC_12x10_Format:()=>pt,RGBA_ASTC_12x12_Format:()=>mt,RGBA_ASTC_4x4_Format:()=>nt,RGBA_ASTC_5x4_Format:()=>rt,RGBA_ASTC_5x5_Format:()=>it,RGBA_ASTC_6x5_Format:()=>at,RGBA_ASTC_6x6_Format:()=>st,RGBA_ASTC_8x5_Format:()=>ot,RGBA_ASTC_8x6_Format:()=>lt,RGBA_ASTC_8x8_Format:()=>ut,RGBA_BPTC_Format:()=>gt,RGBA_ETC2_EAC_Format:()=>tt,RGBA_PVRTC_2BPPV1_Format:()=>Ze,RGBA_PVRTC_4BPPV1_Format:()=>Qe,RGBA_S3TC_DXT1_Format:()=>Je,RGBA_S3TC_DXT3_Format:()=>Xe,RGBA_S3TC_DXT5_Format:()=>Ye,RGBFormat:()=>Ie,RGB_ETC1_Format:()=>$e,RGB_ETC2_Format:()=>et,RGB_PVRTC_2BPPV1_Format:()=>qe,RGB_PVRTC_4BPPV1_Format:()=>Ke,RGB_S3TC_DXT1_Format:()=>je,RGFormat:()=>He,RGIntegerFormat:()=>Ve,RawShaderMaterial:()=>zc,Ray:()=>Or,Raycaster:()=>Gd,RectAreaLight:()=>Wh,RedFormat:()=>Ue,RedIntegerFormat:()=>Ge,ReinhardToneMapping:()=>$,RepeatWrapping:()=>ue,ReplaceStencilOp:()=>Ht,ReverseSubtractEquation:()=>C,RingBufferGeometry:()=>Kf,RingGeometry:()=>Tc,SRGBColorSpace:()=>Nt,Scene:()=>sl,ShaderChunk:()=>Ta,ShaderLib:()=>Pa,ShaderMaterial:()=>ha,ShadowMaterial:()=>Nc,Shape:()=>qu,ShapeBufferGeometry:()=>qf,ShapeGeometry:()=>Bc,ShapePath:()=>Bf,ShapeUtils:()=>_c,ShortType:()=>Se,Skeleton:()=>zl,SkeletonHelper:()=>nf,SkinnedMesh:()=>Il,Source:()=>qn,Sphere:()=>Br,SphereBufferGeometry:()=>Qf,SphereGeometry:()=>Pc,Spherical:()=>Wd,SphericalHarmonics3:()=>jh,SplineCurve:()=>Iu,SpotLight:()=>kh,SpotLightHelper:()=>Zd,Sprite:()=>Sl,SpriteMaterial:()=>cl,SrcAlphaFactor:()=>D,SrcAlphaSaturateFactor:()=>z,SrcColorFactor:()=>R,StaticCopyUsage:()=>un,StaticDrawUsage:()=>nn,StaticReadUsage:()=>sn,StereoCamera:()=>cd,StreamCopyUsage:()=>hn,StreamDrawUsage:()=>an,StreamReadUsage:()=>ln,StringKeyframeTrack:()=>hh,SubtractEquation:()=>A,SubtractiveBlending:()=>_,TOUCH:()=>a,TangentSpaceNormalMap:()=>kt,TetrahedronBufferGeometry:()=>Zf,TetrahedronGeometry:()=>Rc,Texture:()=>$n,TextureLoader:()=>Eh,TorusBufferGeometry:()=>$f,TorusGeometry:()=>Lc,TorusKnotBufferGeometry:()=>ep,TorusKnotGeometry:()=>Dc,Triangle:()=>bi,TriangleFanDrawMode:()=>Pt,TriangleStripDrawMode:()=>Bt,TrianglesDrawMode:()=>Tt,TubeBufferGeometry:()=>tp,TubeGeometry:()=>Ic,TwoPassDoubleSide:()=>v,UVMapping:()=>re,Uint16BufferAttribute:()=>Ri,Uint32BufferAttribute:()=>Di,Uint8BufferAttribute:()=>Ti,Uint8ClampedBufferAttribute:()=>Bi,Uniform:()=>Fd,UniformsGroup:()=>Nd,UniformsLib:()=>Ba,UniformsUtils:()=>ca,UnsignedByteType:()=>we,UnsignedInt248Type:()=>Le,UnsignedIntType:()=>Ee,UnsignedShort4444Type:()=>Pe,UnsignedShort5551Type:()=>Re,UnsignedShortType:()=>Ae,VSMShadowMap:()=>f,Vector2:()=>Pn,Vector3:()=>lr,Vector4:()=>er,VectorKeyframeTrack:()=>dh,VideoTexture:()=>hu,WebGL1Renderer:()=>rl,WebGL3DRenderTarget:()=>ar,WebGLArrayRenderTarget:()=>rr,WebGLCubeRenderTarget:()=>va,WebGLMultipleRenderTargets:()=>sr,WebGLMultisampleRenderTarget:()=>If,WebGLRenderTarget:()=>tr,WebGLRenderer:()=>nl,WebGLUtils:()=>Xo,WireframeGeometry:()=>kc,WrapAroundEnding:()=>At,ZeroCurvatureEnding:()=>Mt,ZeroFactor:()=>B,ZeroSlopeEnding:()=>St,ZeroStencilOp:()=>Ut,_SRGBAFormat:()=>pn,sRGBEncoding:()=>Lt});const r="148",i={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},a={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},s=0,o=1,l=2,u=3,c=0,h=1,d=2,f=3,p=0,m=1,g=2,v=3,y=0,x=1,b=2,_=3,w=4,M=5,S=100,A=101,C=102,E=103,T=104,B=200,P=201,R=202,L=203,D=204,I=205,k=206,F=207,O=208,N=209,z=210,U=0,G=1,H=2,V=3,W=4,j=5,J=6,X=7,Y=0,K=1,q=2,Q=0,Z=1,$=2,ee=3,te=4,ne=5,re=300,ie=301,ae=302,se=303,oe=304,le=306,ue=1e3,ce=1001,he=1002,de=1003,fe=1004,pe=1004,me=1005,ge=1005,ve=1006,ye=1007,xe=1007,be=1008,_e=1008,we=1009,Me=1010,Se=1011,Ae=1012,Ce=1013,Ee=1014,Te=1015,Be=1016,Pe=1017,Re=1018,Le=1020,De=1021,Ie=1022,ke=1023,Fe=1024,Oe=1025,Ne=1026,ze=1027,Ue=1028,Ge=1029,He=1030,Ve=1031,We=1033,je=33776,Je=33777,Xe=33778,Ye=33779,Ke=35840,qe=35841,Qe=35842,Ze=35843,$e=36196,et=37492,tt=37496,nt=37808,rt=37809,it=37810,at=37811,st=37812,ot=37813,lt=37814,ut=37815,ct=37816,ht=37817,dt=37818,ft=37819,pt=37820,mt=37821,gt=36492,vt=2200,yt=2201,xt=2202,bt=2300,_t=2301,wt=2302,Mt=2400,St=2401,At=2402,Ct=2500,Et=2501,Tt=0,Bt=1,Pt=2,Rt=3e3,Lt=3001,Dt=3200,It=3201,kt=0,Ft=1,Ot="",Nt="srgb",zt="srgb-linear",Ut=0,Gt=7680,Ht=7681,Vt=7682,Wt=7683,jt=34055,Jt=34056,Xt=5386,Yt=512,Kt=513,qt=514,Qt=515,Zt=516,$t=517,en=518,tn=519,nn=35044,rn=35048,an=35040,sn=35045,on=35049,ln=35041,un=35046,cn=35050,hn=35042,dn="100",fn="300 es",pn=1035;class mn{addEventListener(e,t){void 0===this._listeners&&(this._listeners={});const n=this._listeners;void 0===n[e]&&(n[e]=[]),-1===n[e].indexOf(t)&&n[e].push(t)}hasEventListener(e,t){if(void 0===this._listeners)return!1;const n=this._listeners;return void 0!==n[e]&&-1!==n[e].indexOf(t)}removeEventListener(e,t){if(void 0===this._listeners)return;const n=this._listeners[e];if(void 0!==n){const e=n.indexOf(t);-1!==e&&n.splice(e,1)}}dispatchEvent(e){if(void 0===this._listeners)return;const t=this._listeners[e.type];if(void 0!==t){e.target=this;const n=t.slice(0);for(let t=0,r=n.length;t<r;t++)n[t].call(this,e);e.target=null}}}const gn=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"];let vn=1234567;const yn=Math.PI/180,xn=180/Math.PI;function bn(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(gn[255&e]+gn[e>>8&255]+gn[e>>16&255]+gn[e>>24&255]+"-"+gn[255&t]+gn[t>>8&255]+"-"+gn[t>>16&15|64]+gn[t>>24&255]+"-"+gn[63&n|128]+gn[n>>8&255]+"-"+gn[n>>16&255]+gn[n>>24&255]+gn[255&r]+gn[r>>8&255]+gn[r>>16&255]+gn[r>>24&255]).toLowerCase()}function _n(e,t,n){return Math.max(t,Math.min(n,e))}function wn(e,t){return(e%t+t)%t}function Mn(e,t,n){return(1-n)*e+n*t}function Sn(e){return 0==(e&e-1)&&0!==e}function An(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function Cn(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function En(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function Tn(e,t){switch(t.constructor){case Float32Array:return e;case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}var Bn=Object.freeze({__proto__:null,DEG2RAD:yn,RAD2DEG:xn,generateUUID:bn,clamp:_n,euclideanModulo:wn,mapLinear:function(e,t,n,r,i){return r+(e-t)*(i-r)/(n-t)},inverseLerp:function(e,t,n){return e!==t?(n-e)/(t-e):0},lerp:Mn,damp:function(e,t,n,r){return Mn(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(wn(e,2*t)-t)},smoothstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*(3-2*e)},smootherstep:function(e,t,n){return e<=t?0:e>=n?1:(e=(e-t)/(n-t))*e*e*(e*(6*e-15)+10)},randInt:function(e,t){return e+Math.floor(Math.random()*(t-e+1))},randFloat:function(e,t){return e+Math.random()*(t-e)},randFloatSpread:function(e){return e*(.5-Math.random())},seededRandom:function(e){void 0!==e&&(vn=e);let t=vn+=1831565813;return t=Math.imul(t^t>>>15,1|t),t^=t+Math.imul(t^t>>>7,61|t),((t^t>>>14)>>>0)/4294967296},degToRad:function(e){return e*yn},radToDeg:function(e){return e*xn},isPowerOfTwo:Sn,ceilPowerOfTwo:An,floorPowerOfTwo:Cn,setQuaternionFromProperEuler:function(e,t,n,r,i){const a=Math.cos,s=Math.sin,o=a(n/2),l=s(n/2),u=a((t+r)/2),c=s((t+r)/2),h=a((t-r)/2),d=s((t-r)/2),f=a((r-t)/2),p=s((r-t)/2);switch(i){case"XYX":e.set(o*c,l*h,l*d,o*u);break;case"YZY":e.set(l*d,o*c,l*h,o*u);break;case"ZXZ":e.set(l*h,l*d,o*c,o*u);break;case"XZX":e.set(o*c,l*p,l*f,o*u);break;case"YXY":e.set(l*f,o*c,l*p,o*u);break;case"ZYZ":e.set(l*p,l*f,o*c,o*u);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:Tn,denormalize:En});class Pn{constructor(e=0,t=0){Pn.prototype.isVector2=!0,this.x=e,this.y=t}get width(){return this.x}set width(e){this.x=e}get height(){return this.y}set height(e){this.y=e}set(e,t){return this.x=e,this.y=t,this}setScalar(e){return this.x=e,this.y=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y)}copy(e){return this.x=e.x,this.y=e.y,this}add(e){return this.x+=e.x,this.y+=e.y,this}addScalar(e){return this.x+=e,this.y+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this}subScalar(e){return this.x-=e,this.y-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this}multiply(e){return this.x*=e.x,this.y*=e.y,this}multiplyScalar(e){return this.x*=e,this.y*=e,this}divide(e){return this.x/=e.x,this.y/=e.y,this}divideScalar(e){return this.multiplyScalar(1/e)}applyMatrix3(e){const t=this.x,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+r[7],this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(e){return this.x*e.x+this.y*e.y}cross(e){return this.x*e.y-this.y*e.x}lengthSq(){return this.x*this.x+this.y*this.y}length(){return Math.sqrt(this.x*this.x+this.y*this.y)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)}normalize(){return this.divideScalar(this.length()||1)}angle(){return Math.atan2(-this.y,-this.x)+Math.PI}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y;return t*t+n*n}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this}equals(e){return e.x===this.x&&e.y===this.y}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){const n=Math.cos(t),r=Math.sin(t),i=this.x-e.x,a=this.y-e.y;return this.x=i*n-a*r+e.x,this.y=i*r+a*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Rn{constructor(){Rn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1]}set(e,t,n,r,i,a,s,o,l){const u=this.elements;return u[0]=e,u[1]=r,u[2]=s,u[3]=t,u[4]=i,u[5]=o,u[6]=n,u[7]=a,u[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(e){const t=e.elements;return this.set(t[0],t[4],t[8],t[1],t[5],t[9],t[2],t[6],t[10]),this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[3],o=n[6],l=n[1],u=n[4],c=n[7],h=n[2],d=n[5],f=n[8],p=r[0],m=r[3],g=r[6],v=r[1],y=r[4],x=r[7],b=r[2],_=r[5],w=r[8];return i[0]=a*p+s*v+o*b,i[3]=a*m+s*y+o*_,i[6]=a*g+s*x+o*w,i[1]=l*p+u*v+c*b,i[4]=l*m+u*y+c*_,i[7]=l*g+u*x+c*w,i[2]=h*p+d*v+f*b,i[5]=h*m+d*y+f*_,i[8]=h*g+d*x+f*w,this}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}determinant(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8];return t*a*u-t*s*l-n*i*u+n*s*o+r*i*l-r*a*o}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=u*a-s*l,h=s*o-u*i,d=l*i-a*o,f=t*c+n*h+r*d;if(0===f)return this.set(0,0,0,0,0,0,0,0,0);const p=1/f;return e[0]=c*p,e[1]=(r*l-u*n)*p,e[2]=(s*n-r*a)*p,e[3]=h*p,e[4]=(u*t-r*o)*p,e[5]=(r*i-s*t)*p,e[6]=d*p,e[7]=(n*o-l*t)*p,e[8]=(a*t-n*i)*p,this}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}getNormalMatrix(e){return this.setFromMatrix4(e).invert().transpose()}transposeIntoArray(e){const t=this.elements;return e[0]=t[0],e[1]=t[3],e[2]=t[6],e[3]=t[1],e[4]=t[4],e[5]=t[7],e[6]=t[2],e[7]=t[5],e[8]=t[8],this}setUvTransform(e,t,n,r,i,a,s){const o=Math.cos(i),l=Math.sin(i);return this.set(n*o,n*l,-n*(o*a+l*s)+a+e,-r*l,r*o,-r*(-l*a+o*s)+s+t,0,0,1),this}scale(e,t){return this.premultiply(Ln.makeScale(e,t)),this}rotate(e){return this.premultiply(Ln.makeRotation(-e)),this}translate(e,t){return this.premultiply(Ln.makeTranslation(e,t)),this}makeTranslation(e,t){return this.set(1,0,e,0,1,t,0,0,1),this}makeRotation(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,n,t,0,0,0,1),this}makeScale(e,t){return this.set(e,0,0,0,t,0,0,0,1),this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<9;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return(new this.constructor).fromArray(this.elements)}}const Ln=new Rn;function Dn(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const In={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function kn(e,t){return new In[e](t)}function Fn(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}function On(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function Nn(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const zn={[Nt]:{[zt]:On},[zt]:{[Nt]:Nn}},Un={legacyMode:!0,get workingColorSpace(){return zt},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,n){if(this.legacyMode||t===n||!t||!n)return e;if(zn[t]&&void 0!==zn[t][n]){const r=zn[t][n];return e.r=r(e.r),e.g=r(e.g),e.b=r(e.b),e}throw new Error("Unsupported color space conversion.")},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}},Gn={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},Hn={r:0,g:0,b:0},Vn={h:0,s:0,l:0},Wn={h:0,s:0,l:0};function jn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+6*(t-e)*(2/3-n):e}function Jn(e,t){return t.r=e.r,t.g=e.g,t.b=e.b,t}class Xn{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,void 0===t&&void 0===n?this.set(e):this.setRGB(e,t,n)}set(e){return e&&e.isColor?this.copy(e):"number"==typeof e?this.setHex(e):"string"==typeof e&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Nt){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,Un.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r=Un.workingColorSpace){return this.r=e,this.g=t,this.b=n,Un.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r=Un.workingColorSpace){if(e=wn(e,1),t=_n(t,0,1),n=_n(n,0,1),0===t)this.r=this.g=this.b=n;else{const r=n<=.5?n*(1+t):n+t-n*t,i=2*n-r;this.r=jn(i,r,e+1/3),this.g=jn(i,r,e),this.b=jn(i,r,e-1/3)}return Un.toWorkingColorSpace(this,r),this}setStyle(e,t=Nt){function n(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(e)){let e;const i=r[1],a=r[2];switch(i){case"rgb":case"rgba":if(e=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(255,parseInt(e[1],10))/255,this.g=Math.min(255,parseInt(e[2],10))/255,this.b=Math.min(255,parseInt(e[3],10))/255,Un.toWorkingColorSpace(this,t),n(e[4]),this;if(e=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(e[1],10))/100,this.g=Math.min(100,parseInt(e[2],10))/100,this.b=Math.min(100,parseInt(e[3],10))/100,Un.toWorkingColorSpace(this,t),n(e[4]),this;break;case"hsl":case"hsla":if(e=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){const r=parseFloat(e[1])/360,i=parseFloat(e[2])/100,a=parseFloat(e[3])/100;return n(e[4]),this.setHSL(r,i,a,t)}}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const e=r[1],n=e.length;if(3===n)return this.r=parseInt(e.charAt(0)+e.charAt(0),16)/255,this.g=parseInt(e.charAt(1)+e.charAt(1),16)/255,this.b=parseInt(e.charAt(2)+e.charAt(2),16)/255,Un.toWorkingColorSpace(this,t),this;if(6===n)return this.r=parseInt(e.charAt(0)+e.charAt(1),16)/255,this.g=parseInt(e.charAt(2)+e.charAt(3),16)/255,this.b=parseInt(e.charAt(4)+e.charAt(5),16)/255,Un.toWorkingColorSpace(this,t),this}return e&&e.length>0?this.setColorName(e,t):this}setColorName(e,t=Nt){const n=Gn[e.toLowerCase()];return void 0!==n?this.setHex(n,t):console.warn("THREE.Color: Unknown color "+e),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(e){return this.r=e.r,this.g=e.g,this.b=e.b,this}copySRGBToLinear(e){return this.r=On(e.r),this.g=On(e.g),this.b=On(e.b),this}copyLinearToSRGB(e){return this.r=Nn(e.r),this.g=Nn(e.g),this.b=Nn(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Nt){return Un.fromWorkingColorSpace(Jn(this,Hn),e),_n(255*Hn.r,0,255)<<16^_n(255*Hn.g,0,255)<<8^_n(255*Hn.b,0,255)<<0}getHexString(e=Nt){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Un.workingColorSpace){Un.fromWorkingColorSpace(Jn(this,Hn),t);const n=Hn.r,r=Hn.g,i=Hn.b,a=Math.max(n,r,i),s=Math.min(n,r,i);let o,l;const u=(s+a)/2;if(s===a)o=0,l=0;else{const e=a-s;switch(l=u<=.5?e/(a+s):e/(2-a-s),a){case n:o=(r-i)/e+(r<i?6:0);break;case r:o=(i-n)/e+2;break;case i:o=(n-r)/e+4}o/=6}return e.h=o,e.s=l,e.l=u,e}getRGB(e,t=Un.workingColorSpace){return Un.fromWorkingColorSpace(Jn(this,Hn),t),e.r=Hn.r,e.g=Hn.g,e.b=Hn.b,e}getStyle(e=Nt){return Un.fromWorkingColorSpace(Jn(this,Hn),e),e!==Nt?`color(${e} ${Hn.r} ${Hn.g} ${Hn.b})`:`rgb(${255*Hn.r|0},${255*Hn.g|0},${255*Hn.b|0})`}offsetHSL(e,t,n){return this.getHSL(Vn),Vn.h+=e,Vn.s+=t,Vn.l+=n,this.setHSL(Vn.h,Vn.s,Vn.l),this}add(e){return this.r+=e.r,this.g+=e.g,this.b+=e.b,this}addColors(e,t){return this.r=e.r+t.r,this.g=e.g+t.g,this.b=e.b+t.b,this}addScalar(e){return this.r+=e,this.g+=e,this.b+=e,this}sub(e){return this.r=Math.max(0,this.r-e.r),this.g=Math.max(0,this.g-e.g),this.b=Math.max(0,this.b-e.b),this}multiply(e){return this.r*=e.r,this.g*=e.g,this.b*=e.b,this}multiplyScalar(e){return this.r*=e,this.g*=e,this.b*=e,this}lerp(e,t){return this.r+=(e.r-this.r)*t,this.g+=(e.g-this.g)*t,this.b+=(e.b-this.b)*t,this}lerpColors(e,t,n){return this.r=e.r+(t.r-e.r)*n,this.g=e.g+(t.g-e.g)*n,this.b=e.b+(t.b-e.b)*n,this}lerpHSL(e,t){this.getHSL(Vn),e.getHSL(Wn);const n=Mn(Vn.h,Wn.h,t),r=Mn(Vn.s,Wn.s,t),i=Mn(Vn.l,Wn.l,t);return this.setHSL(n,r,i),this}equals(e){return e.r===this.r&&e.g===this.g&&e.b===this.b}fromArray(e,t=0){return this.r=e[t],this.g=e[t+1],this.b=e[t+2],this}toArray(e=[],t=0){return e[t]=this.r,e[t+1]=this.g,e[t+2]=this.b,e}fromBufferAttribute(e,t){return this.r=e.getX(t),this.g=e.getY(t),this.b=e.getZ(t),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}let Yn;Xn.NAMES=Gn;class Kn{static getDataURL(e){if(/^data:/i.test(e.src))return e.src;if("undefined"==typeof HTMLCanvasElement)return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{void 0===Yn&&(Yn=Fn("canvas")),Yn.width=e.width,Yn.height=e.height;const n=Yn.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=Yn}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}static sRGBToLinear(e){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const t=Fn("canvas");t.width=e.width,t.height=e.height;const n=t.getContext("2d");n.drawImage(e,0,0,e.width,e.height);const r=n.getImageData(0,0,e.width,e.height),i=r.data;for(let e=0;e<i.length;e++)i[e]=255*On(i[e]/255);return n.putImageData(r,0,0),t}if(e.data){const t=e.data.slice(0);for(let e=0;e<t.length;e++)t instanceof Uint8Array||t instanceof Uint8ClampedArray?t[e]=Math.floor(255*On(t[e]/255)):t[e]=On(t[e]);return{data:t,width:e.width,height:e.height}}return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),e}}class qn{constructor(e=null){this.isSource=!0,this.uuid=bn(),this.data=e,this.version=0}set needsUpdate(e){!0===e&&this.version++}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.images[this.uuid])return e.images[this.uuid];const n={uuid:this.uuid,url:""},r=this.data;if(null!==r){let e;if(Array.isArray(r)){e=[];for(let t=0,n=r.length;t<n;t++)r[t].isDataTexture?e.push(Qn(r[t].image)):e.push(Qn(r[t]))}else e=Qn(r);n.url=e}return t||(e.images[this.uuid]=n),n}}function Qn(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?Kn.getDataURL(e):e.data?{data:Array.from(e.data),width:e.width,height:e.height,type:e.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}let Zn=0;class $n extends mn{constructor(e=$n.DEFAULT_IMAGE,t=$n.DEFAULT_MAPPING,n=ce,r=ce,i=ve,a=be,s=ke,o=we,l=$n.DEFAULT_ANISOTROPY,u=Rt){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:Zn++}),this.uuid=bn(),this.name="",this.source=new qn(e),this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=i,this.minFilter=a,this.anisotropy=l,this.format=s,this.internalFormat=null,this.type=o,this.offset=new Pn(0,0),this.repeat=new Pn(1,1),this.center=new Pn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Rn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=u,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e){this.source.data=e}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return(new this.constructor).copy(this)}copy(e){return this.name=e.name,this.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){const t=void 0===e||"string"==typeof e;if(!t&&void 0!==e.textures[this.uuid])return e.textures[this.uuid];const n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(n.userData=this.userData),t||(e.textures[this.uuid]=n),n}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==re)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case ue:e.x=e.x-Math.floor(e.x);break;case ce:e.x=e.x<0?0:1;break;case he:1===Math.abs(Math.floor(e.x)%2)?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x)}if(e.y<0||e.y>1)switch(this.wrapT){case ue:e.y=e.y-Math.floor(e.y);break;case ce:e.y=e.y<0?0:1;break;case he:1===Math.abs(Math.floor(e.y)%2)?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y)}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){!0===e&&(this.version++,this.source.needsUpdate=!0)}}$n.DEFAULT_IMAGE=null,$n.DEFAULT_MAPPING=re,$n.DEFAULT_ANISOTROPY=1;class er{constructor(e=0,t=0,n=0,r=1){er.prototype.isVector4=!0,this.x=e,this.y=t,this.z=n,this.w=r}get width(){return this.z}set width(e){this.z=e}get height(){return this.w}set height(e){this.w=e}set(e,t,n,r){return this.x=e,this.y=t,this.z=n,this.w=r,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this.w=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setW(e){return this.w=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;case 3:this.w=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;case 3:return this.w;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(e){return this.x=e.x,this.y=e.y,this.z=e.z,this.w=void 0!==e.w?e.w:1,this}add(e){return this.x+=e.x,this.y+=e.y,this.z+=e.z,this.w+=e.w,this}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this.w+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this.w=e.w+t.w,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this.w+=e.w*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this.w-=e.w,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this.w-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this.w=e.w-t.w,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this.w*=e.w,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this.w*=e,this}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=this.w,a=e.elements;return this.x=a[0]*t+a[4]*n+a[8]*r+a[12]*i,this.y=a[1]*t+a[5]*n+a[9]*r+a[13]*i,this.z=a[2]*t+a[6]*n+a[10]*r+a[14]*i,this.w=a[3]*t+a[7]*n+a[11]*r+a[15]*i,this}divideScalar(e){return this.multiplyScalar(1/e)}setAxisAngleFromQuaternion(e){this.w=2*Math.acos(e.w);const t=Math.sqrt(1-e.w*e.w);return t<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=e.x/t,this.y=e.y/t,this.z=e.z/t),this}setAxisAngleFromRotationMatrix(e){let t,n,r,i;const a=.01,s=.1,o=e.elements,l=o[0],u=o[4],c=o[8],h=o[1],d=o[5],f=o[9],p=o[2],m=o[6],g=o[10];if(Math.abs(u-h)<a&&Math.abs(c-p)<a&&Math.abs(f-m)<a){if(Math.abs(u+h)<s&&Math.abs(c+p)<s&&Math.abs(f+m)<s&&Math.abs(l+d+g-3)<s)return this.set(1,0,0,0),this;t=Math.PI;const e=(l+1)/2,o=(d+1)/2,v=(g+1)/2,y=(u+h)/4,x=(c+p)/4,b=(f+m)/4;return e>o&&e>v?e<a?(n=0,r=.707106781,i=.707106781):(n=Math.sqrt(e),r=y/n,i=x/n):o>v?o<a?(n=.707106781,r=0,i=.707106781):(r=Math.sqrt(o),n=y/r,i=b/r):v<a?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(v),n=x/i,r=b/i),this.set(n,r,i,t),this}let v=Math.sqrt((m-f)*(m-f)+(c-p)*(c-p)+(h-u)*(h-u));return Math.abs(v)<.001&&(v=1),this.x=(m-f)/v,this.y=(c-p)/v,this.z=(h-u)/v,this.w=Math.acos((l+d+g-1)/2),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.w=Math.min(this.w,e.w),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.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this.w=Math.floor(this.w),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this.w=Math.ceil(this.w),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this.w=Math.round(this.w),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z+this.w*e.w}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z+this.w*this.w)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)+Math.abs(this.w)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this.w+=(e.w-this.w)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z&&e.w===this.w}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this.w=e[t+3],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e[t+3]=this.w,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this.w=e.getW(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this.w=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z,yield this.w}}class tr extends mn{constructor(e=1,t=1,n={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new er(0,0,e,t),this.scissorTest=!1,this.viewport=new er(0,0,e,t);const r={width:e,height:t,depth:1};this.texture=new $n(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=void 0!==n.generateMipmaps&&n.generateMipmaps,this.texture.internalFormat=void 0!==n.internalFormat?n.internalFormat:null,this.texture.minFilter=void 0!==n.minFilter?n.minFilter:ve,this.depthBuffer=void 0===n.depthBuffer||n.depthBuffer,this.stencilBuffer=void 0!==n.stencilBuffer&&n.stencilBuffer,this.depthTexture=void 0!==n.depthTexture?n.depthTexture:null,this.samples=void 0!==n.samples?n.samples:0}setSize(e,t,n=1){this.width===e&&this.height===t&&this.depth===n||(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t)}clone(){return(new this.constructor).copy(this)}copy(e){this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.isRenderTargetTexture=!0;const t=Object.assign({},e.texture.image);return this.texture.source=new qn(t),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.samples=e.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class nr extends $n{constructor(e=null,t=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=de,this.minFilter=de,this.wrapR=ce,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class rr extends tr{constructor(e=1,t=1,n=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new nr(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class ir extends $n{constructor(e=null,t=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:e,width:t,height:n,depth:r},this.magFilter=de,this.minFilter=de,this.wrapR=ce,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ar extends tr{constructor(e=1,t=1,n=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new ir(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class sr extends tr{constructor(e=1,t=1,n=1,r={}){super(e,t,r),this.isWebGLMultipleRenderTargets=!0;const i=this.texture;this.texture=[];for(let e=0;e<n;e++)this.texture[e]=i.clone(),this.texture[e].isRenderTargetTexture=!0}setSize(e,t,n=1){if(this.width!==e||this.height!==t||this.depth!==n){this.width=e,this.height=t,this.depth=n;for(let r=0,i=this.texture.length;r<i;r++)this.texture[r].image.width=e,this.texture[r].image.height=t,this.texture[r].image.depth=n;this.dispose()}return this.viewport.set(0,0,e,t),this.scissor.set(0,0,e,t),this}copy(e){this.dispose(),this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.set(0,0,this.width,this.height),this.scissor.set(0,0,this.width,this.height),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,null!==e.depthTexture&&(this.depthTexture=e.depthTexture.clone()),this.texture.length=0;for(let t=0,n=e.texture.length;t<n;t++)this.texture[t]=e.texture[t].clone(),this.texture[t].isRenderTargetTexture=!0;return this}}class or{constructor(e=0,t=0,n=0,r=1){this.isQuaternion=!0,this._x=e,this._y=t,this._z=n,this._w=r}static slerpFlat(e,t,n,r,i,a,s){let o=n[r+0],l=n[r+1],u=n[r+2],c=n[r+3];const h=i[a+0],d=i[a+1],f=i[a+2],p=i[a+3];if(0===s)return e[t+0]=o,e[t+1]=l,e[t+2]=u,void(e[t+3]=c);if(1===s)return e[t+0]=h,e[t+1]=d,e[t+2]=f,void(e[t+3]=p);if(c!==p||o!==h||l!==d||u!==f){let e=1-s;const t=o*h+l*d+u*f+c*p,n=t>=0?1:-1,r=1-t*t;if(r>Number.EPSILON){const i=Math.sqrt(r),a=Math.atan2(i,t*n);e=Math.sin(e*a)/i,s=Math.sin(s*a)/i}const i=s*n;if(o=o*e+h*i,l=l*e+d*i,u=u*e+f*i,c=c*e+p*i,e===1-s){const e=1/Math.sqrt(o*o+l*l+u*u+c*c);o*=e,l*=e,u*=e,c*=e}}e[t]=o,e[t+1]=l,e[t+2]=u,e[t+3]=c}static multiplyQuaternionsFlat(e,t,n,r,i,a){const s=n[r],o=n[r+1],l=n[r+2],u=n[r+3],c=i[a],h=i[a+1],d=i[a+2],f=i[a+3];return e[t]=s*f+u*c+o*d-l*h,e[t+1]=o*f+u*h+l*c-s*d,e[t+2]=l*f+u*d+s*h-o*c,e[t+3]=u*f-s*c-o*h-l*d,e}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get w(){return this._w}set w(e){this._w=e,this._onChangeCallback()}set(e,t,n,r){return this._x=e,this._y=t,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(e){return this._x=e.x,this._y=e.y,this._z=e.z,this._w=e.w,this._onChangeCallback(),this}setFromEuler(e,t){const n=e._x,r=e._y,i=e._z,a=e._order,s=Math.cos,o=Math.sin,l=s(n/2),u=s(r/2),c=s(i/2),h=o(n/2),d=o(r/2),f=o(i/2);switch(a){case"XYZ":this._x=h*u*c+l*d*f,this._y=l*d*c-h*u*f,this._z=l*u*f+h*d*c,this._w=l*u*c-h*d*f;break;case"YXZ":this._x=h*u*c+l*d*f,this._y=l*d*c-h*u*f,this._z=l*u*f-h*d*c,this._w=l*u*c+h*d*f;break;case"ZXY":this._x=h*u*c-l*d*f,this._y=l*d*c+h*u*f,this._z=l*u*f+h*d*c,this._w=l*u*c-h*d*f;break;case"ZYX":this._x=h*u*c-l*d*f,this._y=l*d*c+h*u*f,this._z=l*u*f-h*d*c,this._w=l*u*c+h*d*f;break;case"YZX":this._x=h*u*c+l*d*f,this._y=l*d*c+h*u*f,this._z=l*u*f-h*d*c,this._w=l*u*c-h*d*f;break;case"XZY":this._x=h*u*c-l*d*f,this._y=l*d*c-h*u*f,this._z=l*u*f+h*d*c,this._w=l*u*c+h*d*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return!1!==t&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,n=t[0],r=t[4],i=t[8],a=t[1],s=t[5],o=t[9],l=t[2],u=t[6],c=t[10],h=n+s+c;if(h>0){const e=.5/Math.sqrt(h+1);this._w=.25/e,this._x=(u-o)*e,this._y=(i-l)*e,this._z=(a-r)*e}else if(n>s&&n>c){const e=2*Math.sqrt(1+n-s-c);this._w=(u-o)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+l)/e}else if(s>c){const e=2*Math.sqrt(1+s-n-c);this._w=(i-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(o+u)/e}else{const e=2*Math.sqrt(1+c-n-s);this._w=(a-r)/e,this._x=(i+l)/e,this._y=(o+u)/e,this._z=.25*e}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return n<Number.EPSILON?(n=0,Math.abs(e.x)>Math.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(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._w=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(_n(this.dot(e),-1,1)))}rotateTowards(e,t){const n=this.angleTo(e);if(0===n)return this;const r=Math.min(1,t/n);return this.slerp(e,r),this}identity(){return this.set(0,0,0,1)}invert(){return this.conjugate()}conjugate(){return this._x*=-1,this._y*=-1,this._z*=-1,this._onChangeCallback(),this}dot(e){return this._x*e._x+this._y*e._y+this._z*e._z+this._w*e._w}lengthSq(){return this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w}length(){return Math.sqrt(this._x*this._x+this._y*this._y+this._z*this._z+this._w*this._w)}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=this._x*e,this._y=this._y*e,this._z=this._z*e,this._w=this._w*e),this._onChangeCallback(),this}multiply(e){return this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){const n=e._x,r=e._y,i=e._z,a=e._w,s=t._x,o=t._y,l=t._z,u=t._w;return this._x=n*u+a*s+r*l-i*o,this._y=r*u+a*o+i*s-n*l,this._z=i*u+a*l+n*o-r*s,this._w=a*u-n*s-r*o-i*l,this._onChangeCallback(),this}slerp(e,t){if(0===t)return this;if(1===t)return this.copy(e);const n=this._x,r=this._y,i=this._z,a=this._w;let s=a*e._w+n*e._x+r*e._y+i*e._z;if(s<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,s=-s):this.copy(e),s>=1)return this._w=a,this._x=n,this._y=r,this._z=i,this;const o=1-s*s;if(o<=Number.EPSILON){const e=1-t;return this._w=e*a+t*this._w,this._x=e*n+t*this._x,this._y=e*r+t*this._y,this._z=e*i+t*this._z,this.normalize(),this._onChangeCallback(),this}const l=Math.sqrt(o),u=Math.atan2(l,s),c=Math.sin((1-t)*u)/l,h=Math.sin(t*u)/l;return this._w=a*c+this._w*h,this._x=n*c+this._x*h,this._y=r*c+this._y*h,this._z=i*c+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,n){return this.copy(e).slerp(t,n)}random(){const e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),i=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(i),n*Math.cos(i),t*Math.sin(r))}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._w===this._w}fromArray(e,t=0){return this._x=e[t],this._y=e[t+1],this._z=e[t+2],this._w=e[t+3],this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._w,e}fromBufferAttribute(e,t){return this._x=e.getX(t),this._y=e.getY(t),this._z=e.getZ(t),this._w=e.getW(t),this}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class lr{constructor(e=0,t=0,n=0){lr.prototype.isVector3=!0,this.x=e,this.y=t,this.z=n}set(e,t,n){return void 0===n&&(n=this.z),this.x=e,this.y=t,this.z=n,this}setScalar(e){return this.x=e,this.y=e,this.z=e,this}setX(e){return this.x=e,this}setY(e){return this.y=e,this}setZ(e){return this.z=e,this}setComponent(e,t){switch(e){case 0:this.x=t;break;case 1:this.y=t;break;case 2:this.z=t;break;default:throw new Error("index is out of range: "+e)}return this}getComponent(e){switch(e){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+e)}}clone(){return new this.constructor(this.x,this.y,this.z)}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}addScalar(e){return this.x+=e,this.y+=e,this.z+=e,this}addVectors(e,t){return this.x=e.x+t.x,this.y=e.y+t.y,this.z=e.z+t.z,this}addScaledVector(e,t){return this.x+=e.x*t,this.y+=e.y*t,this.z+=e.z*t,this}sub(e){return this.x-=e.x,this.y-=e.y,this.z-=e.z,this}subScalar(e){return this.x-=e,this.y-=e,this.z-=e,this}subVectors(e,t){return this.x=e.x-t.x,this.y=e.y-t.y,this.z=e.z-t.z,this}multiply(e){return this.x*=e.x,this.y*=e.y,this.z*=e.z,this}multiplyScalar(e){return this.x*=e,this.y*=e,this.z*=e,this}multiplyVectors(e,t){return this.x=e.x*t.x,this.y=e.y*t.y,this.z=e.z*t.z,this}applyEuler(e){return this.applyQuaternion(cr.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(cr.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[3]*n+i[6]*r,this.y=i[1]*t+i[4]*n+i[7]*r,this.z=i[2]*t+i[5]*n+i[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,n=this.y,r=this.z,i=e.elements,a=1/(i[3]*t+i[7]*n+i[11]*r+i[15]);return this.x=(i[0]*t+i[4]*n+i[8]*r+i[12])*a,this.y=(i[1]*t+i[5]*n+i[9]*r+i[13])*a,this.z=(i[2]*t+i[6]*n+i[10]*r+i[14])*a,this}applyQuaternion(e){const t=this.x,n=this.y,r=this.z,i=e.x,a=e.y,s=e.z,o=e.w,l=o*t+a*r-s*n,u=o*n+s*t-i*r,c=o*r+i*n-a*t,h=-i*t-a*n-s*r;return this.x=l*o+h*-i+u*-s-c*-a,this.y=u*o+h*-a+c*-i-l*-s,this.z=c*o+h*-s+l*-a-u*-i,this}project(e){return this.applyMatrix4(e.matrixWorldInverse).applyMatrix4(e.projectionMatrix)}unproject(e){return this.applyMatrix4(e.projectionMatrixInverse).applyMatrix4(e.matrixWorld)}transformDirection(e){const t=this.x,n=this.y,r=this.z,i=e.elements;return this.x=i[0]*t+i[4]*n+i[8]*r,this.y=i[1]*t+i[5]*n+i[9]*r,this.z=i[2]*t+i[6]*n+i[10]*r,this.normalize()}divide(e){return this.x/=e.x,this.y/=e.y,this.z/=e.z,this}divideScalar(e){return this.multiplyScalar(1/e)}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}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}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){const n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}floor(){return this.x=Math.floor(this.x),this.y=Math.floor(this.y),this.z=Math.floor(this.z),this}ceil(){return this.x=Math.ceil(this.x),this.y=Math.ceil(this.y),this.z=Math.ceil(this.z),this}round(){return this.x=Math.round(this.x),this.y=Math.round(this.y),this.z=Math.round(this.z),this}roundToZero(){return this.x=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(e){return this.x*e.x+this.y*e.y+this.z*e.z}lengthSq(){return this.x*this.x+this.y*this.y+this.z*this.z}length(){return Math.sqrt(this.x*this.x+this.y*this.y+this.z*this.z)}manhattanLength(){return Math.abs(this.x)+Math.abs(this.y)+Math.abs(this.z)}normalize(){return this.divideScalar(this.length()||1)}setLength(e){return this.normalize().multiplyScalar(e)}lerp(e,t){return this.x+=(e.x-this.x)*t,this.y+=(e.y-this.y)*t,this.z+=(e.z-this.z)*t,this}lerpVectors(e,t,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const n=e.x,r=e.y,i=e.z,a=t.x,s=t.y,o=t.z;return this.x=r*o-i*s,this.y=i*a-n*o,this.z=n*s-r*a,this}projectOnVector(e){const t=e.lengthSq();if(0===t)return this.set(0,0,0);const n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return ur.copy(this).projectOnVector(e),this.sub(ur)}reflect(e){return this.sub(ur.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(0===t)return Math.PI/2;const n=this.dot(e)/t;return Math.acos(_n(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+r*r}manhattanDistanceTo(e){return Math.abs(this.x-e.x)+Math.abs(this.y-e.y)+Math.abs(this.z-e.z)}setFromSpherical(e){return this.setFromSphericalCoords(e.radius,e.phi,e.theta)}setFromSphericalCoords(e,t,n){const r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,this.z=e*Math.cos(t),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this}setFromMatrixScale(e){const t=this.setFromMatrixColumn(e,0).length(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,4*t)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,3*t)}setFromEuler(e){return this.x=e._x,this.y=e._y,this.z=e._z,this}equals(e){return e.x===this.x&&e.y===this.y&&e.z===this.z}fromArray(e,t=0){return this.x=e[t],this.y=e[t+1],this.z=e[t+2],this}toArray(e=[],t=0){return e[t]=this.x,e[t+1]=this.y,e[t+2]=this.z,e}fromBufferAttribute(e,t){return this.x=e.getX(t),this.y=e.getY(t),this.z=e.getZ(t),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const e=2*(Math.random()-.5),t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const ur=new lr,cr=new or;class hr{constructor(e=new lr(1/0,1/0,1/0),t=new lr(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,s=-1/0;for(let o=0,l=e.length;o<l;o+=3){const l=e[o],u=e[o+1],c=e[o+2];l<t&&(t=l),u<n&&(n=u),c<r&&(r=c),l>i&&(i=l),u>a&&(a=u),c>s&&(s=c)}return this.min.set(t,n,r),this.max.set(i,a,s),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,i=-1/0,a=-1/0,s=-1/0;for(let o=0,l=e.count;o<l;o++){const l=e.getX(o),u=e.getY(o),c=e.getZ(o);l<t&&(t=l),u<n&&(n=u),c<r&&(r=c),l>i&&(i=l),u>a&&(a=u),c>s&&(s=c)}return this.min.set(t,n,r),this.max.set(i,a,s),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=fr.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}setFromObject(e,t=!1){return this.makeEmpty(),this.expandByObject(e,t)}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(e){return this.isEmpty()?e.set(0,0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}expandByObject(e,t=!1){e.updateWorldMatrix(!1,!1);const n=e.geometry;if(void 0!==n)if(t&&null!=n.attributes&&void 0!==n.attributes.position){const t=n.attributes.position;for(let n=0,r=t.count;n<r;n++)fr.fromBufferAttribute(t,n).applyMatrix4(e.matrixWorld),this.expandByPoint(fr)}else null===n.boundingBox&&n.computeBoundingBox(),pr.copy(n.boundingBox),pr.applyMatrix4(e.matrixWorld),this.union(pr);const r=e.children;for(let e=0,n=r.length;e<n;e++)this.expandByObject(r[e],t);return this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y||e.z<this.min.z||e.z>this.max.z)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y&&this.min.z<=e.min.z&&e.max.z<=this.max.z}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y),(e.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y||e.max.z<this.min.z||e.min.z>this.max.z)}intersectsSphere(e){return this.clampPoint(e.center,fr),fr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(_r),wr.subVectors(this.max,_r),mr.subVectors(e.a,_r),gr.subVectors(e.b,_r),vr.subVectors(e.c,_r),yr.subVectors(gr,mr),xr.subVectors(vr,gr),br.subVectors(mr,vr);let t=[0,-yr.z,yr.y,0,-xr.z,xr.y,0,-br.z,br.y,yr.z,0,-yr.x,xr.z,0,-xr.x,br.z,0,-br.x,-yr.y,yr.x,0,-xr.y,xr.x,0,-br.y,br.x,0];return!!Ar(t,mr,gr,vr,wr)&&(t=[1,0,0,0,1,0,0,0,1],!!Ar(t,mr,gr,vr,wr)&&(Mr.crossVectors(yr,xr),t=[Mr.x,Mr.y,Mr.z],Ar(t,mr,gr,vr,wr)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return fr.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=.5*this.getSize(fr).length(),e}intersect(e){return this.min.max(e.min),this.max.min(e.max),this.isEmpty()&&this.makeEmpty(),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}applyMatrix4(e){return this.isEmpty()||(dr[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),dr[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),dr[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),dr[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),dr[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),dr[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),dr[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),dr[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(dr)),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const dr=[new lr,new lr,new lr,new lr,new lr,new lr,new lr,new lr],fr=new lr,pr=new hr,mr=new lr,gr=new lr,vr=new lr,yr=new lr,xr=new lr,br=new lr,_r=new lr,wr=new lr,Mr=new lr,Sr=new lr;function Ar(e,t,n,r,i){for(let a=0,s=e.length-3;a<=s;a+=3){Sr.fromArray(e,a);const s=i.x*Math.abs(Sr.x)+i.y*Math.abs(Sr.y)+i.z*Math.abs(Sr.z),o=t.dot(Sr),l=n.dot(Sr),u=r.dot(Sr);if(Math.max(-Math.max(o,l,u),Math.min(o,l,u))>s)return!1}return!0}const Cr=new hr,Er=new lr,Tr=new lr;class Br{constructor(e=new lr,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const n=this.center;void 0!==t?n.copy(t):Cr.setFromPoints(e).getCenter(n);let r=0;for(let t=0,i=e.length;t<i;t++)r=Math.max(r,n.distanceToSquared(e[t]));return this.radius=Math.sqrt(r),this}copy(e){return this.center.copy(e.center),this.radius=e.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(e){return e.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(e){return e.distanceTo(this.center)-this.radius}intersectsSphere(e){const t=this.radius+e.radius;return e.center.distanceToSquared(this.center)<=t*t}intersectsBox(e){return e.intersectsSphere(this)}intersectsPlane(e){return Math.abs(e.distanceToPoint(this.center))<=this.radius}clampPoint(e,t){const n=this.center.distanceToSquared(e);return t.copy(e),n>this.radius*this.radius&&(t.sub(this.center).normalize(),t.multiplyScalar(this.radius).add(this.center)),t}getBoundingBox(e){return this.isEmpty()?(e.makeEmpty(),e):(e.set(this.center,this.center),e.expandByScalar(this.radius),e)}applyMatrix4(e){return this.center.applyMatrix4(e),this.radius=this.radius*e.getMaxScaleOnAxis(),this}translate(e){return this.center.add(e),this}expandByPoint(e){if(this.isEmpty())return this.center.copy(e),this.radius=0,this;Er.subVectors(e,this.center);const t=Er.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(Er,n/e),this.radius+=n}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(!0===this.center.equals(e.center)?this.radius=Math.max(this.radius,e.radius):(Tr.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Er.copy(e.center).add(Tr)),this.expandByPoint(Er.copy(e.center).sub(Tr))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Pr=new lr,Rr=new lr,Lr=new lr,Dr=new lr,Ir=new lr,kr=new lr,Fr=new lr;class Or{constructor(e=new lr,t=new lr(0,0,-1)){this.origin=e,this.direction=t}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.copy(this.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Pr)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Pr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Pr.copy(this.direction).multiplyScalar(t).add(this.origin),Pr.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Rr.copy(e).add(t).multiplyScalar(.5),Lr.copy(t).sub(e).normalize(),Dr.copy(this.origin).sub(Rr);const i=.5*e.distanceTo(t),a=-this.direction.dot(Lr),s=Dr.dot(this.direction),o=-Dr.dot(Lr),l=Dr.lengthSq(),u=Math.abs(1-a*a);let c,h,d,f;if(u>0)if(c=a*o-s,h=a*s-o,f=i*u,c>=0)if(h>=-f)if(h<=f){const e=1/u;c*=e,h*=e,d=c*(c+a*h+2*s)+h*(a*c+h+2*o)+l}else h=i,c=Math.max(0,-(a*h+s)),d=-c*c+h*(h+2*o)+l;else h=-i,c=Math.max(0,-(a*h+s)),d=-c*c+h*(h+2*o)+l;else h<=-f?(c=Math.max(0,-(-a*i+s)),h=c>0?-i:Math.min(Math.max(-i,-o),i),d=-c*c+h*(h+2*o)+l):h<=f?(c=0,h=Math.min(Math.max(-i,-o),i),d=h*(h+2*o)+l):(c=Math.max(0,-(a*i+s)),h=c>0?i:Math.min(Math.max(-i,-o),i),d=-c*c+h*(h+2*o)+l);else h=a>0?-i:i,c=Math.max(0,-(a*h+s)),d=-c*c+h*(h+2*o)+l;return n&&n.copy(this.direction).multiplyScalar(c).add(this.origin),r&&r.copy(Lr).multiplyScalar(h).add(Rr),d}intersectSphere(e,t){Pr.subVectors(e.center,this.origin);const n=Pr.dot(this.direction),r=Pr.dot(Pr)-n*n,i=e.radius*e.radius;if(r>i)return null;const a=Math.sqrt(i-r),s=n-a,o=n+a;return s<0&&o<0?null:s<0?this.at(o,t):this.at(s,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(0===t)return 0===e.distanceToPoint(this.origin)?0:null;const n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){const n=this.distanceToPlane(e);return null===n?null:this.at(n,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return 0===t||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,i,a,s,o;const l=1/this.direction.x,u=1/this.direction.y,c=1/this.direction.z,h=this.origin;return l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),u>=0?(i=(e.min.y-h.y)*u,a=(e.max.y-h.y)*u):(i=(e.max.y-h.y)*u,a=(e.min.y-h.y)*u),n>a||i>r?null:((i>n||isNaN(n))&&(n=i),(a<r||isNaN(r))&&(r=a),c>=0?(s=(e.min.z-h.z)*c,o=(e.max.z-h.z)*c):(s=(e.max.z-h.z)*c,o=(e.min.z-h.z)*c),n>o||s>r?null:((s>n||n!=n)&&(n=s),(o<r||r!=r)&&(r=o),r<0?null:this.at(n>=0?n:r,t)))}intersectsBox(e){return null!==this.intersectBox(e,Pr)}intersectTriangle(e,t,n,r,i){Ir.subVectors(t,e),kr.subVectors(n,e),Fr.crossVectors(Ir,kr);let a,s=this.direction.dot(Fr);if(s>0){if(r)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}Dr.subVectors(this.origin,e);const o=a*this.direction.dot(kr.crossVectors(Dr,kr));if(o<0)return null;const l=a*this.direction.dot(Ir.cross(Dr));if(l<0)return null;if(o+l>s)return null;const u=-a*Dr.dot(Fr);return u<0?null:this.at(u/s,i)}applyMatrix4(e){return this.origin.applyMatrix4(e),this.direction.transformDirection(e),this}equals(e){return e.origin.equals(this.origin)&&e.direction.equals(this.direction)}clone(){return(new this.constructor).copy(this)}}class Nr{constructor(){Nr.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1]}set(e,t,n,r,i,a,s,o,l,u,c,h,d,f,p,m){const g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=i,g[5]=a,g[9]=s,g[13]=o,g[2]=l,g[6]=u,g[10]=c,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}clone(){return(new Nr).fromArray(this.elements)}copy(e){const t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){const t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[14],this}setFromMatrix3(e){const t=e.elements;return this.set(t[0],t[3],t[6],0,t[1],t[4],t[7],0,t[2],t[5],t[8],0,0,0,0,1),this}extractBasis(e,t,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,n=e.elements,r=1/zr.setFromMatrixColumn(e,0).length(),i=1/zr.setFromMatrixColumn(e,1).length(),a=1/zr.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*i,t[5]=n[5]*i,t[6]=n[6]*i,t[7]=0,t[8]=n[8]*a,t[9]=n[9]*a,t[10]=n[10]*a,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,n=e.x,r=e.y,i=e.z,a=Math.cos(n),s=Math.sin(n),o=Math.cos(r),l=Math.sin(r),u=Math.cos(i),c=Math.sin(i);if("XYZ"===e.order){const e=a*u,n=a*c,r=s*u,i=s*c;t[0]=o*u,t[4]=-o*c,t[8]=l,t[1]=n+r*l,t[5]=e-i*l,t[9]=-s*o,t[2]=i-e*l,t[6]=r+n*l,t[10]=a*o}else if("YXZ"===e.order){const e=o*u,n=o*c,r=l*u,i=l*c;t[0]=e+i*s,t[4]=r*s-n,t[8]=a*l,t[1]=a*c,t[5]=a*u,t[9]=-s,t[2]=n*s-r,t[6]=i+e*s,t[10]=a*o}else if("ZXY"===e.order){const e=o*u,n=o*c,r=l*u,i=l*c;t[0]=e-i*s,t[4]=-a*c,t[8]=r+n*s,t[1]=n+r*s,t[5]=a*u,t[9]=i-e*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){const e=a*u,n=a*c,r=s*u,i=s*c;t[0]=o*u,t[4]=r*l-n,t[8]=e*l+i,t[1]=o*c,t[5]=i*l+e,t[9]=n*l-r,t[2]=-l,t[6]=s*o,t[10]=a*o}else if("YZX"===e.order){const e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*u,t[4]=i-e*c,t[8]=r*c+n,t[1]=c,t[5]=a*u,t[9]=-s*u,t[2]=-l*u,t[6]=n*c+r,t[10]=e-i*c}else if("XZY"===e.order){const e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*u,t[4]=-c,t[8]=l*u,t[1]=e*c+i,t[5]=a*u,t[9]=n*c-r,t[2]=r*c-n,t[6]=s*u,t[10]=i*c+e}return t[3]=0,t[7]=0,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromQuaternion(e){return this.compose(Gr,e,Hr)}lookAt(e,t,n){const r=this.elements;return jr.subVectors(e,t),0===jr.lengthSq()&&(jr.z=1),jr.normalize(),Vr.crossVectors(n,jr),0===Vr.lengthSq()&&(1===Math.abs(n.z)?jr.x+=1e-4:jr.z+=1e-4,jr.normalize(),Vr.crossVectors(n,jr)),Vr.normalize(),Wr.crossVectors(jr,Vr),r[0]=Vr.x,r[4]=Wr.x,r[8]=jr.x,r[1]=Vr.y,r[5]=Wr.y,r[9]=jr.y,r[2]=Vr.z,r[6]=Wr.z,r[10]=jr.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const n=e.elements,r=t.elements,i=this.elements,a=n[0],s=n[4],o=n[8],l=n[12],u=n[1],c=n[5],h=n[9],d=n[13],f=n[2],p=n[6],m=n[10],g=n[14],v=n[3],y=n[7],x=n[11],b=n[15],_=r[0],w=r[4],M=r[8],S=r[12],A=r[1],C=r[5],E=r[9],T=r[13],B=r[2],P=r[6],R=r[10],L=r[14],D=r[3],I=r[7],k=r[11],F=r[15];return i[0]=a*_+s*A+o*B+l*D,i[4]=a*w+s*C+o*P+l*I,i[8]=a*M+s*E+o*R+l*k,i[12]=a*S+s*T+o*L+l*F,i[1]=u*_+c*A+h*B+d*D,i[5]=u*w+c*C+h*P+d*I,i[9]=u*M+c*E+h*R+d*k,i[13]=u*S+c*T+h*L+d*F,i[2]=f*_+p*A+m*B+g*D,i[6]=f*w+p*C+m*P+g*I,i[10]=f*M+p*E+m*R+g*k,i[14]=f*S+p*T+m*L+g*F,i[3]=v*_+y*A+x*B+b*D,i[7]=v*w+y*C+x*P+b*I,i[11]=v*M+y*E+x*R+b*k,i[15]=v*S+y*T+x*L+b*F,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}determinant(){const e=this.elements,t=e[0],n=e[4],r=e[8],i=e[12],a=e[1],s=e[5],o=e[9],l=e[13],u=e[2],c=e[6],h=e[10],d=e[14];return e[3]*(+i*o*c-r*l*c-i*s*h+n*l*h+r*s*d-n*o*d)+e[7]*(+t*o*d-t*l*h+i*a*h-r*a*d+r*l*u-i*o*u)+e[11]*(+t*l*c-t*s*d-i*a*c+n*a*d+i*s*u-n*l*u)+e[15]*(-r*s*u-t*o*c+t*s*h+r*a*c-n*a*h+n*o*u)}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,t,n){const r=this.elements;return e.isVector3?(r[12]=e.x,r[13]=e.y,r[14]=e.z):(r[12]=e,r[13]=t,r[14]=n),this}invert(){const e=this.elements,t=e[0],n=e[1],r=e[2],i=e[3],a=e[4],s=e[5],o=e[6],l=e[7],u=e[8],c=e[9],h=e[10],d=e[11],f=e[12],p=e[13],m=e[14],g=e[15],v=c*m*l-p*h*l+p*o*d-s*m*d-c*o*g+s*h*g,y=f*h*l-u*m*l-f*o*d+a*m*d+u*o*g-a*h*g,x=u*p*l-f*c*l+f*s*d-a*p*d-u*s*g+a*c*g,b=f*c*o-u*p*o-f*s*h+a*p*h+u*s*m-a*c*m,_=t*v+n*y+r*x+i*b;if(0===_)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const w=1/_;return e[0]=v*w,e[1]=(p*h*i-c*m*i-p*r*d+n*m*d+c*r*g-n*h*g)*w,e[2]=(s*m*i-p*o*i+p*r*l-n*m*l-s*r*g+n*o*g)*w,e[3]=(c*o*i-s*h*i-c*r*l+n*h*l+s*r*d-n*o*d)*w,e[4]=y*w,e[5]=(u*m*i-f*h*i+f*r*d-t*m*d-u*r*g+t*h*g)*w,e[6]=(f*o*i-a*m*i-f*r*l+t*m*l+a*r*g-t*o*g)*w,e[7]=(a*h*i-u*o*i+u*r*l-t*h*l-a*r*d+t*o*d)*w,e[8]=x*w,e[9]=(f*c*i-u*p*i-f*n*d+t*p*d+u*n*g-t*c*g)*w,e[10]=(a*p*i-f*s*i+f*n*l-t*p*l-a*n*g+t*s*g)*w,e[11]=(u*s*i-a*c*i-u*n*l+t*c*l+a*n*d-t*s*d)*w,e[12]=b*w,e[13]=(u*p*r-f*c*r+f*n*h-t*p*h-u*n*m+t*c*m)*w,e[14]=(f*s*r-a*p*r-f*n*o+t*p*o+a*n*m-t*s*m)*w,e[15]=(a*c*r-u*s*r+u*n*o-t*c*o-a*n*h+t*s*h)*w,this}scale(e){const t=this.elements,n=e.x,r=e.y,i=e.z;return t[0]*=n,t[4]*=r,t[8]*=i,t[1]*=n,t[5]*=r,t[9]*=i,t[2]*=n,t[6]*=r,t[10]*=i,t[3]*=n,t[7]*=r,t[11]*=i,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],n=e[4]*e[4]+e[5]*e[5]+e[6]*e[6],r=e[8]*e[8]+e[9]*e[9]+e[10]*e[10];return Math.sqrt(Math.max(t,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const n=Math.cos(t),r=Math.sin(t),i=1-n,a=e.x,s=e.y,o=e.z,l=i*a,u=i*s;return this.set(l*a+n,l*s-r*o,l*o+r*s,0,l*s+r*o,u*s+n,u*o-r*a,0,l*o-r*s,u*o+r*a,i*o*o+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,i,a){return this.set(1,n,i,0,e,1,a,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){const r=this.elements,i=t._x,a=t._y,s=t._z,o=t._w,l=i+i,u=a+a,c=s+s,h=i*l,d=i*u,f=i*c,p=a*u,m=a*c,g=s*c,v=o*l,y=o*u,x=o*c,b=n.x,_=n.y,w=n.z;return r[0]=(1-(p+g))*b,r[1]=(d+x)*b,r[2]=(f-y)*b,r[3]=0,r[4]=(d-x)*_,r[5]=(1-(h+g))*_,r[6]=(m+v)*_,r[7]=0,r[8]=(f+y)*w,r[9]=(m-v)*w,r[10]=(1-(h+p))*w,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){const r=this.elements;let i=zr.set(r[0],r[1],r[2]).length();const a=zr.set(r[4],r[5],r[6]).length(),s=zr.set(r[8],r[9],r[10]).length();this.determinant()<0&&(i=-i),e.x=r[12],e.y=r[13],e.z=r[14],Ur.copy(this);const o=1/i,l=1/a,u=1/s;return Ur.elements[0]*=o,Ur.elements[1]*=o,Ur.elements[2]*=o,Ur.elements[4]*=l,Ur.elements[5]*=l,Ur.elements[6]*=l,Ur.elements[8]*=u,Ur.elements[9]*=u,Ur.elements[10]*=u,t.setFromRotationMatrix(Ur),n.x=i,n.y=a,n.z=s,this}makePerspective(e,t,n,r,i,a){const s=this.elements,o=2*i/(t-e),l=2*i/(n-r),u=(t+e)/(t-e),c=(n+r)/(n-r),h=-(a+i)/(a-i),d=-2*a*i/(a-i);return s[0]=o,s[4]=0,s[8]=u,s[12]=0,s[1]=0,s[5]=l,s[9]=c,s[13]=0,s[2]=0,s[6]=0,s[10]=h,s[14]=d,s[3]=0,s[7]=0,s[11]=-1,s[15]=0,this}makeOrthographic(e,t,n,r,i,a){const s=this.elements,o=1/(t-e),l=1/(n-r),u=1/(a-i),c=(t+e)*o,h=(n+r)*l,d=(a+i)*u;return s[0]=2*o,s[4]=0,s[8]=0,s[12]=-c,s[1]=0,s[5]=2*l,s[9]=0,s[13]=-h,s[2]=0,s[6]=0,s[10]=-2*u,s[14]=-d,s[3]=0,s[7]=0,s[11]=0,s[15]=1,this}equals(e){const t=this.elements,n=e.elements;for(let e=0;e<16;e++)if(t[e]!==n[e])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){const n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}}const zr=new lr,Ur=new Nr,Gr=new lr(0,0,0),Hr=new lr(1,1,1),Vr=new lr,Wr=new lr,jr=new lr,Jr=new Nr,Xr=new or;class Yr{constructor(e=0,t=0,n=0,r=Yr.DefaultOrder){this.isEuler=!0,this._x=e,this._y=t,this._z=n,this._order=r}get x(){return this._x}set x(e){this._x=e,this._onChangeCallback()}get y(){return this._y}set y(e){this._y=e,this._onChangeCallback()}get z(){return this._z}set z(e){this._z=e,this._onChangeCallback()}get order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){const r=e.elements,i=r[0],a=r[4],s=r[8],o=r[1],l=r[5],u=r[9],c=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(_n(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-u,d),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-_n(u,-1,1)),Math.abs(u)<.9999999?(this._y=Math.atan2(s,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-c,i),this._z=0);break;case"ZXY":this._x=Math.asin(_n(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-c,d),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-_n(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(h,d),this._z=Math.atan2(o,i)):(this._x=0,this._z=Math.atan2(-a,l));break;case"YZX":this._z=Math.asin(_n(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-u,l),this._y=Math.atan2(-c,i)):(this._x=0,this._y=Math.atan2(s,d));break;case"XZY":this._z=Math.asin(-_n(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-u,d),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,!0===n&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Jr.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Jr,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Xr.setFromEuler(this),this.setFromQuaternion(Xr,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],void 0!==e[3]&&(this._order=e[3]),this._onChangeCallback(),this}toArray(e=[],t=0){return e[t]=this._x,e[t+1]=this._y,e[t+2]=this._z,e[t+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}toVector3(){console.error("THREE.Euler: .toVector3() has been removed. Use Vector3.setFromEuler() instead")}}Yr.DefaultOrder="XYZ",Yr.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];class Kr{constructor(){this.mask=1}set(e){this.mask=(1<<e|0)>>>0}enable(e){this.mask|=1<<e|0}enableAll(){this.mask=-1}toggle(e){this.mask^=1<<e|0}disable(e){this.mask&=~(1<<e|0)}disableAll(){this.mask=0}test(e){return 0!=(this.mask&e.mask)}isEnabled(e){return 0!=(this.mask&(1<<e|0))}}let qr=0;const Qr=new lr,Zr=new or,$r=new Nr,ei=new lr,ti=new lr,ni=new lr,ri=new or,ii=new lr(1,0,0),ai=new lr(0,1,0),si=new lr(0,0,1),oi={type:"added"},li={type:"removed"};class ui extends mn{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:qr++}),this.uuid=bn(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=ui.DefaultUp.clone();const e=new lr,t=new Yr,n=new or,r=new lr(1,1,1);t._onChange((function(){n.setFromEuler(t,!1)})),n._onChange((function(){t.setFromQuaternion(n,void 0,!1)})),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:t},quaternion:{configurable:!0,enumerable:!0,value:n},scale:{configurable:!0,enumerable:!0,value:r},modelViewMatrix:{value:new Nr},normalMatrix:{value:new Rn}}),this.matrix=new Nr,this.matrixWorld=new Nr,this.matrixAutoUpdate=ui.DefaultMatrixAutoUpdate,this.matrixWorldNeedsUpdate=!1,this.matrixWorldAutoUpdate=ui.DefaultMatrixWorldAutoUpdate,this.layers=new Kr,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,t){this.quaternion.setFromAxisAngle(e,t)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,t){return Zr.setFromAxisAngle(e,t),this.quaternion.multiply(Zr),this}rotateOnWorldAxis(e,t){return Zr.setFromAxisAngle(e,t),this.quaternion.premultiply(Zr),this}rotateX(e){return this.rotateOnAxis(ii,e)}rotateY(e){return this.rotateOnAxis(ai,e)}rotateZ(e){return this.rotateOnAxis(si,e)}translateOnAxis(e,t){return Qr.copy(e).applyQuaternion(this.quaternion),this.position.add(Qr.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(ii,e)}translateY(e){return this.translateOnAxis(ai,e)}translateZ(e){return this.translateOnAxis(si,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4($r.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?ei.copy(e):ei.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),ti.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?$r.lookAt(ti,ei,this.up):$r.lookAt(ei,ti,this.up),this.quaternion.setFromRotationMatrix($r),r&&($r.extractRotation(r.matrixWorld),Zr.setFromRotationMatrix($r),this.quaternion.premultiply(Zr.invert()))}add(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.add(arguments[e]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(null!==e.parent&&e.parent.remove(e),e.parent=this,this.children.push(e),e.dispatchEvent(oi)):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let e=0;e<arguments.length;e++)this.remove(arguments[e]);return this}const t=this.children.indexOf(e);return-1!==t&&(e.parent=null,this.children.splice(t,1),e.dispatchEvent(li)),this}removeFromParent(){const e=this.parent;return null!==e&&e.remove(this),this}clear(){for(let e=0;e<this.children.length;e++){const t=this.children[e];t.parent=null,t.dispatchEvent(li)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),$r.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),$r.multiply(e.parent.matrixWorld)),e.applyMatrix4($r),this.add(e),e.updateWorldMatrix(!1,!0),this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,t){if(this[e]===t)return this;for(let n=0,r=this.children.length;n<r;n++){const r=this.children[n].getObjectByProperty(e,t);if(void 0!==r)return r}}getObjectsByProperty(e,t){let n=[];this[e]===t&&n.push(this);for(let r=0,i=this.children.length;r<i;r++){const i=this.children[r].getObjectsByProperty(e,t);i.length>0&&(n=n.concat(i))}return n}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ti,e,ni),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(ti,ri,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(t[8],t[9],t[10]).normalize()}raycast(){}traverse(e){e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverse(e)}traverseVisible(e){if(!1===this.visible)return;e(this);const t=this.children;for(let n=0,r=t.length;n<r;n++)t[n].traverseVisible(e)}traverseAncestors(e){const t=this.parent;null!==t&&(e(t),t.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),this.matrixWorldNeedsUpdate=!1,e=!0);const t=this.children;for(let n=0,r=t.length;n<r;n++){const r=t[n];!0!==r.matrixWorldAutoUpdate&&!0!==e||r.updateMatrixWorld(e)}}updateWorldMatrix(e,t){const n=this.parent;if(!0===e&&null!==n&&!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),null===this.parent?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix),!0===t){const e=this.children;for(let t=0,n=e.length;t<n;t++){const n=e[t];!0===n.matrixWorldAutoUpdate&&n.updateWorldMatrix(!1,!0)}}}toJSON(e){const t=void 0===e||"string"==typeof e,n={};t&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},n.metadata={version:4.5,type:"Object",generator:"Object3D.toJSON"});const r={};function i(t,n){return void 0===t[n.uuid]&&(t[n.uuid]=n.toJSON(e)),n.uuid}if(r.uuid=this.uuid,r.type=this.type,""!==this.name&&(r.name=this.name),!0===this.castShadow&&(r.castShadow=!0),!0===this.receiveShadow&&(r.receiveShadow=!0),!1===this.visible&&(r.visible=!1),!1===this.frustumCulled&&(r.frustumCulled=!1),0!==this.renderOrder&&(r.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),!1===this.matrixAutoUpdate&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),null!==this.instanceColor&&(r.instanceColor=this.instanceColor.toJSON())),this.isScene)this.background&&(this.background.isColor?r.background=this.background.toJSON():this.background.isTexture&&(r.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&!0!==this.environment.isRenderTargetTexture&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=i(e.geometries,this.geometry);const t=this.geometry.parameters;if(void 0!==t&&void 0!==t.shapes){const n=t.shapes;if(Array.isArray(n))for(let t=0,r=n.length;t<r;t++){const r=n[t];i(e.shapes,r)}else i(e.shapes,n)}}if(this.isSkinnedMesh&&(r.bindMode=this.bindMode,r.bindMatrix=this.bindMatrix.toArray(),void 0!==this.skeleton&&(i(e.skeletons,this.skeleton),r.skeleton=this.skeleton.uuid)),void 0!==this.material)if(Array.isArray(this.material)){const t=[];for(let n=0,r=this.material.length;n<r;n++)t.push(i(e.materials,this.material[n]));r.material=t}else r.material=i(e.materials,this.material);if(this.children.length>0){r.children=[];for(let t=0;t<this.children.length;t++)r.children.push(this.children[t].toJSON(e).object)}if(this.animations.length>0){r.animations=[];for(let t=0;t<this.animations.length;t++){const n=this.animations[t];r.animations.push(i(e.animations,n))}}if(t){const t=a(e.geometries),r=a(e.materials),i=a(e.textures),s=a(e.images),o=a(e.shapes),l=a(e.skeletons),u=a(e.animations),c=a(e.nodes);t.length>0&&(n.geometries=t),r.length>0&&(n.materials=r),i.length>0&&(n.textures=i),s.length>0&&(n.images=s),o.length>0&&(n.shapes=o),l.length>0&&(n.skeletons=l),u.length>0&&(n.animations=u),c.length>0&&(n.nodes=c)}return n.object=r,n;function a(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}}clone(e){return(new this.constructor).copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),!0===t)for(let t=0;t<e.children.length;t++){const n=e.children[t];this.add(n.clone())}return this}}ui.DefaultUp=new lr(0,1,0),ui.DefaultMatrixAutoUpdate=!0,ui.DefaultMatrixWorldAutoUpdate=!0;const ci=new lr,hi=new lr,di=new lr,fi=new lr,pi=new lr,mi=new lr,gi=new lr,vi=new lr,yi=new lr,xi=new lr;class bi{constructor(e=new lr,t=new lr,n=new lr){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),ci.subVectors(e,t),r.cross(ci);const i=r.lengthSq();return i>0?r.multiplyScalar(1/Math.sqrt(i)):r.set(0,0,0)}static getBarycoord(e,t,n,r,i){ci.subVectors(r,t),hi.subVectors(n,t),di.subVectors(e,t);const a=ci.dot(ci),s=ci.dot(hi),o=ci.dot(di),l=hi.dot(hi),u=hi.dot(di),c=a*l-s*s;if(0===c)return i.set(-2,-1,-1);const h=1/c,d=(l*o-s*u)*h,f=(a*u-s*o)*h;return i.set(1-d-f,f,d)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,fi),fi.x>=0&&fi.y>=0&&fi.x+fi.y<=1}static getUV(e,t,n,r,i,a,s,o){return this.getBarycoord(e,t,n,r,fi),o.set(0,0),o.addScaledVector(i,fi.x),o.addScaledVector(a,fi.y),o.addScaledVector(s,fi.z),o}static isFrontFacing(e,t,n,r){return ci.subVectors(n,t),hi.subVectors(e,t),ci.cross(hi).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),this.c.fromBufferAttribute(e,r),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.a.copy(e.a),this.b.copy(e.b),this.c.copy(e.c),this}getArea(){return ci.subVectors(this.c,this.b),hi.subVectors(this.a,this.b),.5*ci.cross(hi).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return bi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return bi.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return bi.getUV(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return bi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return bi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const n=this.a,r=this.b,i=this.c;let a,s;pi.subVectors(r,n),mi.subVectors(i,n),vi.subVectors(e,n);const o=pi.dot(vi),l=mi.dot(vi);if(o<=0&&l<=0)return t.copy(n);yi.subVectors(e,r);const u=pi.dot(yi),c=mi.dot(yi);if(u>=0&&c<=u)return t.copy(r);const h=o*c-u*l;if(h<=0&&o>=0&&u<=0)return a=o/(o-u),t.copy(n).addScaledVector(pi,a);xi.subVectors(e,i);const d=pi.dot(xi),f=mi.dot(xi);if(f>=0&&d<=f)return t.copy(i);const p=d*l-o*f;if(p<=0&&l>=0&&f<=0)return s=l/(l-f),t.copy(n).addScaledVector(mi,s);const m=u*f-d*c;if(m<=0&&c-u>=0&&d-f>=0)return gi.subVectors(i,r),s=(c-u)/(c-u+(d-f)),t.copy(r).addScaledVector(gi,s);const g=1/(m+p+h);return a=p*g,s=h*g,t.copy(n).addScaledVector(pi,a).addScaledVector(mi,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let _i=0;class wi extends mn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:_i++}),this.uuid=bn(),this.name="",this.type="Material",this.blending=x,this.side=p,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.blendSrc=D,this.blendDst=I,this.blendEquation=S,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=V,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=tn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Gt,this.stencilZFail=Gt,this.stencilZPass=Gt,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(e){this._alphaTest>0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(void 0!==e)for(const t in e){const n=e[t];if(void 0===n){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}const r=this[t];void 0!==r?r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n:console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.")}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};function r(e){const t=[];for(const n in e){const r=e[n];delete r.metadata,t.push(r)}return t}if(n.uuid=this.uuid,n.type=this.type,""!==this.name&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),void 0!==this.roughness&&(n.roughness=this.roughness),void 0!==this.metalness&&(n.metalness=this.metalness),void 0!==this.sheen&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),void 0!==this.sheenRoughness&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&1!==this.emissiveIntensity&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),void 0!==this.specularIntensity&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),void 0!==this.shininess&&(n.shininess=this.shininess),void 0!==this.clearcoat&&(n.clearcoat=this.clearcoat),void 0!==this.clearcoatRoughness&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),void 0!==this.iridescence&&(n.iridescence=this.iridescence),void 0!==this.iridescenceIOR&&(n.iridescenceIOR=this.iridescenceIOR),void 0!==this.iridescenceThicknessRange&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,void 0!==this.combine&&(n.combine=this.combine)),void 0!==this.envMapIntensity&&(n.envMapIntensity=this.envMapIntensity),void 0!==this.reflectivity&&(n.reflectivity=this.reflectivity),void 0!==this.refractionRatio&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),void 0!==this.transmission&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),void 0!==this.thickness&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),void 0!==this.attenuationDistance&&this.attenuationDistance!==1/0&&(n.attenuationDistance=this.attenuationDistance),void 0!==this.attenuationColor&&(n.attenuationColor=this.attenuationColor.getHex()),void 0!==this.size&&(n.size=this.size),null!==this.shadowSide&&(n.shadowSide=this.shadowSide),void 0!==this.sizeAttenuation&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==x&&(n.blending=this.blending),this.side!==p&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),!0===this.transparent&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,void 0!==this.rotation&&0!==this.rotation&&(n.rotation=this.rotation),!0===this.polygonOffset&&(n.polygonOffset=!0),0!==this.polygonOffsetFactor&&(n.polygonOffsetFactor=this.polygonOffsetFactor),0!==this.polygonOffsetUnits&&(n.polygonOffsetUnits=this.polygonOffsetUnits),void 0!==this.linewidth&&1!==this.linewidth&&(n.linewidth=this.linewidth),void 0!==this.dashSize&&(n.dashSize=this.dashSize),void 0!==this.gapSize&&(n.gapSize=this.gapSize),void 0!==this.scale&&(n.scale=this.scale),!0===this.dithering&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.wireframe&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),"round"!==this.wireframeLinecap&&(n.wireframeLinecap=this.wireframeLinecap),"round"!==this.wireframeLinejoin&&(n.wireframeLinejoin=this.wireframeLinejoin),!0===this.flatShading&&(n.flatShading=this.flatShading),!1===this.visible&&(n.visible=!1),!1===this.toneMapped&&(n.toneMapped=!1),!1===this.fog&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData),t){const t=r(e.textures),i=r(e.images);t.length>0&&(n.textures=t),i.length>0&&(n.images=i)}return n}clone(){return(new this.constructor).copy(this)}copy(e){this.name=e.name,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.transparent=e.transparent,this.blendSrc=e.blendSrc,this.blendDst=e.blendDst,this.blendEquation=e.blendEquation,this.blendSrcAlpha=e.blendSrcAlpha,this.blendDstAlpha=e.blendDstAlpha,this.blendEquationAlpha=e.blendEquationAlpha,this.depthFunc=e.depthFunc,this.depthTest=e.depthTest,this.depthWrite=e.depthWrite,this.stencilWriteMask=e.stencilWriteMask,this.stencilFunc=e.stencilFunc,this.stencilRef=e.stencilRef,this.stencilFuncMask=e.stencilFuncMask,this.stencilFail=e.stencilFail,this.stencilZFail=e.stencilZFail,this.stencilZPass=e.stencilZPass,this.stencilWrite=e.stencilWrite;const t=e.clippingPlanes;let n=null;if(null!==t){const e=t.length;n=new Array(e);for(let r=0;r!==e;++r)n[r]=t[r].clone()}return this.clippingPlanes=n,this.clipIntersection=e.clipIntersection,this.clipShadows=e.clipShadows,this.shadowSide=e.shadowSide,this.colorWrite=e.colorWrite,this.precision=e.precision,this.polygonOffset=e.polygonOffset,this.polygonOffsetFactor=e.polygonOffsetFactor,this.polygonOffsetUnits=e.polygonOffsetUnits,this.dithering=e.dithering,this.alphaTest=e.alphaTest,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.visible=e.visible,this.toneMapped=e.toneMapped,this.userData=JSON.parse(JSON.stringify(e.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(e){!0===e&&this.version++}}class Mi extends wi{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Xn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Y,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}const Si=new lr,Ai=new Pn;class Ci{constructor(e,t,n=!1){if(Array.isArray(e))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=e,this.itemSize=t,this.count=void 0!==e?e.length/t:0,this.normalized=n,this.usage=nn,this.updateRange={offset:0,count:-1},this.version=0}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.name=e.name,this.array=new e.array.constructor(e.array),this.itemSize=e.itemSize,this.count=e.count,this.normalized=e.normalized,this.usage=e.usage,this}copyAt(e,t,n){e*=this.itemSize,n*=t.itemSize;for(let r=0,i=this.itemSize;r<i;r++)this.array[e+r]=t.array[n+r];return this}copyArray(e){return this.array.set(e),this}applyMatrix3(e){if(2===this.itemSize)for(let t=0,n=this.count;t<n;t++)Ai.fromBufferAttribute(this,t),Ai.applyMatrix3(e),this.setXY(t,Ai.x,Ai.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)Si.fromBufferAttribute(this,t),Si.applyMatrix3(e),this.setXYZ(t,Si.x,Si.y,Si.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Si.fromBufferAttribute(this,t),Si.applyMatrix4(e),this.setXYZ(t,Si.x,Si.y,Si.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Si.fromBufferAttribute(this,t),Si.applyNormalMatrix(e),this.setXYZ(t,Si.x,Si.y,Si.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Si.fromBufferAttribute(this,t),Si.transformDirection(e),this.setXYZ(t,Si.x,Si.y,Si.z);return this}set(e,t=0){return this.array.set(e,t),this}getX(e){let t=this.array[e*this.itemSize];return this.normalized&&(t=En(t,this.array)),t}setX(e,t){return this.normalized&&(t=Tn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=En(t,this.array)),t}setY(e,t){return this.normalized&&(t=Tn(t,this.array)),this.array[e*this.itemSize+1]=t,this}getZ(e){let t=this.array[e*this.itemSize+2];return this.normalized&&(t=En(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Tn(t,this.array)),this.array[e*this.itemSize+2]=t,this}getW(e){let t=this.array[e*this.itemSize+3];return this.normalized&&(t=En(t,this.array)),t}setW(e,t){return this.normalized&&(t=Tn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array)),this.array[e+0]=t,this.array[e+1]=n,this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array),r=Tn(r,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array),r=Tn(r,this.array),i=Tn(i,this.array)),this.array[e+0]=t,this.array[e+1]=n,this.array[e+2]=r,this.array[e+3]=i,this}onUpload(e){return this.onUploadCallback=e,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){const e={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return""!==this.name&&(e.name=this.name),this.usage!==nn&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}copyColorsArray(){console.error("THREE.BufferAttribute: copyColorsArray() was removed in r144.")}copyVector2sArray(){console.error("THREE.BufferAttribute: copyVector2sArray() was removed in r144.")}copyVector3sArray(){console.error("THREE.BufferAttribute: copyVector3sArray() was removed in r144.")}copyVector4sArray(){console.error("THREE.BufferAttribute: copyVector4sArray() was removed in r144.")}}class Ei extends Ci{constructor(e,t,n){super(new Int8Array(e),t,n)}}class Ti extends Ci{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class Bi extends Ci{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class Pi extends Ci{constructor(e,t,n){super(new Int16Array(e),t,n)}}class Ri extends Ci{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class Li extends Ci{constructor(e,t,n){super(new Int32Array(e),t,n)}}class Di extends Ci{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class Ii extends Ci{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}}class ki extends Ci{constructor(e,t,n){super(new Float32Array(e),t,n)}}class Fi extends Ci{constructor(e,t,n){super(new Float64Array(e),t,n)}}let Oi=0;const Ni=new Nr,zi=new ui,Ui=new lr,Gi=new hr,Hi=new hr,Vi=new lr;class Wi extends mn{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:Oi++}),this.uuid=bn(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(e){return Array.isArray(e)?this.index=new(Dn(e)?Di:Ri)(e,1):this.index=e,this}getAttribute(e){return this.attributes[e]}setAttribute(e,t){return this.attributes[e]=t,this}deleteAttribute(e){return delete this.attributes[e],this}hasAttribute(e){return void 0!==this.attributes[e]}addGroup(e,t,n=0){this.groups.push({start:e,count:t,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(e,t){this.drawRange.start=e,this.drawRange.count=t}applyMatrix4(e){const t=this.attributes.position;void 0!==t&&(t.applyMatrix4(e),t.needsUpdate=!0);const n=this.attributes.normal;if(void 0!==n){const t=(new Rn).getNormalMatrix(e);n.applyNormalMatrix(t),n.needsUpdate=!0}const r=this.attributes.tangent;return void 0!==r&&(r.transformDirection(e),r.needsUpdate=!0),null!==this.boundingBox&&this.computeBoundingBox(),null!==this.boundingSphere&&this.computeBoundingSphere(),this}applyQuaternion(e){return Ni.makeRotationFromQuaternion(e),this.applyMatrix4(Ni),this}rotateX(e){return Ni.makeRotationX(e),this.applyMatrix4(Ni),this}rotateY(e){return Ni.makeRotationY(e),this.applyMatrix4(Ni),this}rotateZ(e){return Ni.makeRotationZ(e),this.applyMatrix4(Ni),this}translate(e,t,n){return Ni.makeTranslation(e,t,n),this.applyMatrix4(Ni),this}scale(e,t,n){return Ni.makeScale(e,t,n),this.applyMatrix4(Ni),this}lookAt(e){return zi.lookAt(e),zi.updateMatrix(),this.applyMatrix4(zi.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Ui).negate(),this.translate(Ui.x,Ui.y,Ui.z),this}setFromPoints(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n];t.push(r.x,r.y,r.z||0)}return this.setAttribute("position",new ki(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new hr);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingBox.set(new lr(-1/0,-1/0,-1/0),new lr(1/0,1/0,1/0));if(void 0!==e){if(this.boundingBox.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];Gi.setFromBufferAttribute(n),this.morphTargetsRelative?(Vi.addVectors(this.boundingBox.min,Gi.min),this.boundingBox.expandByPoint(Vi),Vi.addVectors(this.boundingBox.max,Gi.max),this.boundingBox.expandByPoint(Vi)):(this.boundingBox.expandByPoint(Gi.min),this.boundingBox.expandByPoint(Gi.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){null===this.boundingSphere&&(this.boundingSphere=new Br);const e=this.attributes.position,t=this.morphAttributes.position;if(e&&e.isGLBufferAttribute)return console.error('THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere. Alternatively set "mesh.frustumCulled" to "false".',this),void this.boundingSphere.set(new lr,1/0);if(e){const n=this.boundingSphere.center;if(Gi.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];Hi.setFromBufferAttribute(n),this.morphTargetsRelative?(Vi.addVectors(Gi.min,Hi.min),Gi.expandByPoint(Vi),Vi.addVectors(Gi.max,Hi.max),Gi.expandByPoint(Vi)):(Gi.expandByPoint(Hi.min),Gi.expandByPoint(Hi.max))}Gi.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)Vi.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(Vi));if(t)for(let i=0,a=t.length;i<a;i++){const a=t[i],s=this.morphTargetsRelative;for(let t=0,i=a.count;t<i;t++)Vi.fromBufferAttribute(a,t),s&&(Ui.fromBufferAttribute(e,t),Vi.add(Ui)),r=Math.max(r,n.distanceToSquared(Vi))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){const e=this.index,t=this.attributes;if(null===e||void 0===t.position||void 0===t.normal||void 0===t.uv)return void console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");const n=e.array,r=t.position.array,i=t.normal.array,a=t.uv.array,s=r.length/3;!1===this.hasAttribute("tangent")&&this.setAttribute("tangent",new Ci(new Float32Array(4*s),4));const o=this.getAttribute("tangent").array,l=[],u=[];for(let e=0;e<s;e++)l[e]=new lr,u[e]=new lr;const c=new lr,h=new lr,d=new lr,f=new Pn,p=new Pn,m=new Pn,g=new lr,v=new lr;function y(e,t,n){c.fromArray(r,3*e),h.fromArray(r,3*t),d.fromArray(r,3*n),f.fromArray(a,2*e),p.fromArray(a,2*t),m.fromArray(a,2*n),h.sub(c),d.sub(c),p.sub(f),m.sub(f);const i=1/(p.x*m.y-m.x*p.y);isFinite(i)&&(g.copy(h).multiplyScalar(m.y).addScaledVector(d,-p.y).multiplyScalar(i),v.copy(d).multiplyScalar(p.x).addScaledVector(h,-m.x).multiplyScalar(i),l[e].add(g),l[t].add(g),l[n].add(g),u[e].add(v),u[t].add(v),u[n].add(v))}let x=this.groups;0===x.length&&(x=[{start:0,count:n.length}]);for(let e=0,t=x.length;e<t;++e){const t=x[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)y(n[e+0],n[e+1],n[e+2])}const b=new lr,_=new lr,w=new lr,M=new lr;function S(e){w.fromArray(i,3*e),M.copy(w);const t=l[e];b.copy(t),b.sub(w.multiplyScalar(w.dot(t))).normalize(),_.crossVectors(M,t);const n=_.dot(u[e])<0?-1:1;o[4*e]=b.x,o[4*e+1]=b.y,o[4*e+2]=b.z,o[4*e+3]=n}for(let e=0,t=x.length;e<t;++e){const t=x[e],r=t.start;for(let e=r,i=r+t.count;e<i;e+=3)S(n[e+0]),S(n[e+1]),S(n[e+2])}}computeVertexNormals(){const e=this.index,t=this.getAttribute("position");if(void 0!==t){let n=this.getAttribute("normal");if(void 0===n)n=new Ci(new Float32Array(3*t.count),3),this.setAttribute("normal",n);else for(let e=0,t=n.count;e<t;e++)n.setXYZ(e,0,0,0);const r=new lr,i=new lr,a=new lr,s=new lr,o=new lr,l=new lr,u=new lr,c=new lr;if(e)for(let h=0,d=e.count;h<d;h+=3){const d=e.getX(h+0),f=e.getX(h+1),p=e.getX(h+2);r.fromBufferAttribute(t,d),i.fromBufferAttribute(t,f),a.fromBufferAttribute(t,p),u.subVectors(a,i),c.subVectors(r,i),u.cross(c),s.fromBufferAttribute(n,d),o.fromBufferAttribute(n,f),l.fromBufferAttribute(n,p),s.add(u),o.add(u),l.add(u),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(f,o.x,o.y,o.z),n.setXYZ(p,l.x,l.y,l.z)}else for(let e=0,s=t.count;e<s;e+=3)r.fromBufferAttribute(t,e+0),i.fromBufferAttribute(t,e+1),a.fromBufferAttribute(t,e+2),u.subVectors(a,i),c.subVectors(r,i),u.cross(c),n.setXYZ(e+0,u.x,u.y,u.z),n.setXYZ(e+1,u.x,u.y,u.z),n.setXYZ(e+2,u.x,u.y,u.z);this.normalizeNormals(),n.needsUpdate=!0}}merge(){return console.error("THREE.BufferGeometry.merge() has been removed. Use THREE.BufferGeometryUtils.mergeBufferGeometries() instead."),this}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)Vi.fromBufferAttribute(e,t),Vi.normalize(),e.setXYZ(t,Vi.x,Vi.y,Vi.z)}toNonIndexed(){function e(e,t){const n=e.array,r=e.itemSize,i=e.normalized,a=new n.constructor(t.length*r);let s=0,o=0;for(let i=0,l=t.length;i<l;i++){s=e.isInterleavedBufferAttribute?t[i]*e.data.stride+e.offset:t[i]*r;for(let e=0;e<r;e++)a[o++]=n[s++]}return new Ci(a,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new Wi,n=this.index.array,r=this.attributes;for(const i in r){const a=e(r[i],n);t.setAttribute(i,a)}const i=this.morphAttributes;for(const r in i){const a=[],s=i[r];for(let t=0,r=s.length;t<r;t++){const r=e(s[t],n);a.push(r)}t.morphAttributes[r]=a}t.morphTargetsRelative=this.morphTargetsRelative;const a=this.groups;for(let e=0,n=a.length;e<n;e++){const n=a[e];t.addGroup(n.start,n.count,n.materialIndex)}return t}toJSON(){const e={metadata:{version:4.5,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(e.uuid=this.uuid,e.type=this.type,""!==this.name&&(e.name=this.name),Object.keys(this.userData).length>0&&(e.userData=this.userData),void 0!==this.parameters){const t=this.parameters;for(const n in t)void 0!==t[n]&&(e[n]=t[n]);return e}e.data={attributes:{}};const t=this.index;null!==t&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const n=this.attributes;for(const t in n){const r=n[t];e.data.attributes[t]=r.toJSON(e.data)}const r={};let i=!1;for(const t in this.morphAttributes){const n=this.morphAttributes[t],a=[];for(let t=0,r=n.length;t<r;t++){const r=n[t];a.push(r.toJSON(e.data))}a.length>0&&(r[t]=a,i=!0)}i&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const a=this.groups;a.length>0&&(e.data.groups=JSON.parse(JSON.stringify(a)));const s=this.boundingSphere;return null!==s&&(e.data.boundingSphere={center:s.center.toArray(),radius:s.radius}),e}clone(){return(new this.constructor).copy(this)}copy(e){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const t={};this.name=e.name;const n=e.index;null!==n&&this.setIndex(n.clone(t));const r=e.attributes;for(const e in r){const n=r[e];this.setAttribute(e,n.clone(t))}const i=e.morphAttributes;for(const e in i){const n=[],r=i[e];for(let e=0,i=r.length;e<i;e++)n.push(r[e].clone(t));this.morphAttributes[e]=n}this.morphTargetsRelative=e.morphTargetsRelative;const a=e.groups;for(let e=0,t=a.length;e<t;e++){const t=a[e];this.addGroup(t.start,t.count,t.materialIndex)}const s=e.boundingBox;null!==s&&(this.boundingBox=s.clone());const o=e.boundingSphere;return null!==o&&(this.boundingSphere=o.clone()),this.drawRange.start=e.drawRange.start,this.drawRange.count=e.drawRange.count,this.userData=e.userData,void 0!==e.parameters&&(this.parameters=Object.assign({},e.parameters)),this}dispose(){this.dispatchEvent({type:"dispose"})}}const ji=new Nr,Ji=new Or,Xi=new Br,Yi=new lr,Ki=new lr,qi=new lr,Qi=new lr,Zi=new lr,$i=new Pn,ea=new Pn,ta=new Pn,na=new lr,ra=new lr;class ia extends ui{constructor(e=new Wi,t=new Mi){super(),this.isMesh=!0,this.type="Mesh",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),void 0!==e.morphTargetInfluences&&(this.morphTargetInfluences=e.morphTargetInfluences.slice()),void 0!==e.morphTargetDictionary&&(this.morphTargetDictionary=Object.assign({},e.morphTargetDictionary)),this.material=e.material,this.geometry=e.geometry,this}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}getVertexPosition(e,t){const n=this.geometry,r=n.attributes.position,i=n.morphAttributes.position,a=n.morphTargetsRelative;t.fromBufferAttribute(r,e);const s=this.morphTargetInfluences;if(i&&s){Zi.set(0,0,0);for(let n=0,r=i.length;n<r;n++){const r=s[n],o=i[n];0!==r&&(Qi.fromBufferAttribute(o,e),a?Zi.addScaledVector(Qi,r):Zi.addScaledVector(Qi.sub(t),r))}t.add(Zi)}return this.isSkinnedMesh&&this.boneTransform(e,t),t}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0===r)return;if(null===n.boundingSphere&&n.computeBoundingSphere(),Xi.copy(n.boundingSphere),Xi.applyMatrix4(i),!1===e.ray.intersectsSphere(Xi))return;if(ji.copy(i).invert(),Ji.copy(e.ray).applyMatrix4(ji),null!==n.boundingBox&&!1===Ji.intersectsBox(n.boundingBox))return;let a;const s=n.index,o=n.attributes.position,l=n.attributes.uv,u=n.attributes.uv2,c=n.groups,h=n.drawRange;if(null!==s)if(Array.isArray(r))for(let n=0,i=c.length;n<i;n++){const i=c[n],o=r[i.materialIndex];for(let n=Math.max(i.start,h.start),r=Math.min(s.count,Math.min(i.start+i.count,h.start+h.count));n<r;n+=3){const r=s.getX(n),c=s.getX(n+1),h=s.getX(n+2);a=aa(this,o,e,Ji,l,u,r,c,h),a&&(a.faceIndex=Math.floor(n/3),a.face.materialIndex=i.materialIndex,t.push(a))}}else for(let n=Math.max(0,h.start),i=Math.min(s.count,h.start+h.count);n<i;n+=3){const i=s.getX(n),o=s.getX(n+1),c=s.getX(n+2);a=aa(this,r,e,Ji,l,u,i,o,c),a&&(a.faceIndex=Math.floor(n/3),t.push(a))}else if(void 0!==o)if(Array.isArray(r))for(let n=0,i=c.length;n<i;n++){const i=c[n],s=r[i.materialIndex];for(let n=Math.max(i.start,h.start),r=Math.min(o.count,Math.min(i.start+i.count,h.start+h.count));n<r;n+=3)a=aa(this,s,e,Ji,l,u,n,n+1,n+2),a&&(a.faceIndex=Math.floor(n/3),a.face.materialIndex=i.materialIndex,t.push(a))}else for(let n=Math.max(0,h.start),i=Math.min(o.count,h.start+h.count);n<i;n+=3)a=aa(this,r,e,Ji,l,u,n,n+1,n+2),a&&(a.faceIndex=Math.floor(n/3),t.push(a))}}function aa(e,t,n,r,i,a,s,o,l){e.getVertexPosition(s,Yi),e.getVertexPosition(o,Ki),e.getVertexPosition(l,qi);const u=function(e,t,n,r,i,a,s,o){let l;if(l=t.side===m?r.intersectTriangle(s,a,i,!0,o):r.intersectTriangle(i,a,s,t.side===p,o),null===l)return null;ra.copy(o),ra.applyMatrix4(e.matrixWorld);const u=n.ray.origin.distanceTo(ra);return u<n.near||u>n.far?null:{distance:u,point:ra.clone(),object:e}}(e,t,n,r,Yi,Ki,qi,na);if(u){i&&($i.fromBufferAttribute(i,s),ea.fromBufferAttribute(i,o),ta.fromBufferAttribute(i,l),u.uv=bi.getUV(na,Yi,Ki,qi,$i,ea,ta,new Pn)),a&&($i.fromBufferAttribute(a,s),ea.fromBufferAttribute(a,o),ta.fromBufferAttribute(a,l),u.uv2=bi.getUV(na,Yi,Ki,qi,$i,ea,ta,new Pn));const e={a:s,b:o,c:l,normal:new lr,materialIndex:0};bi.getNormal(Yi,Ki,qi,e.normal),u.face=e}return u}class sa extends Wi{constructor(e=1,t=1,n=1,r=1,i=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:n,widthSegments:r,heightSegments:i,depthSegments:a};const s=this;r=Math.floor(r),i=Math.floor(i),a=Math.floor(a);const o=[],l=[],u=[],c=[];let h=0,d=0;function f(e,t,n,r,i,a,f,p,m,g,v){const y=a/m,x=f/g,b=a/2,_=f/2,w=p/2,M=m+1,S=g+1;let A=0,C=0;const E=new lr;for(let a=0;a<S;a++){const s=a*x-_;for(let o=0;o<M;o++){const h=o*y-b;E[e]=h*r,E[t]=s*i,E[n]=w,l.push(E.x,E.y,E.z),E[e]=0,E[t]=0,E[n]=p>0?1:-1,u.push(E.x,E.y,E.z),c.push(o/m),c.push(1-a/g),A+=1}}for(let e=0;e<g;e++)for(let t=0;t<m;t++){const n=h+t+M*e,r=h+t+M*(e+1),i=h+(t+1)+M*(e+1),a=h+(t+1)+M*e;o.push(n,r,a),o.push(r,i,a),C+=6}s.addGroup(d,C,v),d+=C,h+=A}f("z","y","x",-1,-1,n,t,e,a,i,0),f("z","y","x",1,-1,n,t,-e,a,i,1),f("x","z","y",1,1,e,n,t,r,a,2),f("x","z","y",1,-1,e,n,-t,r,a,3),f("x","y","z",1,-1,e,t,n,r,i,4),f("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(o),this.setAttribute("position",new ki(l,3)),this.setAttribute("normal",new ki(u,3)),this.setAttribute("uv",new ki(c,2))}static fromJSON(e){return new sa(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function oa(e){const t={};for(const n in e){t[n]={};for(const r in e[n]){const i=e[n][r];i&&(i.isColor||i.isMatrix3||i.isMatrix4||i.isVector2||i.isVector3||i.isVector4||i.isTexture||i.isQuaternion)?t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function la(e){const t={};for(let n=0;n<e.length;n++){const r=oa(e[n]);for(const e in r)t[e]=r[e]}return t}function ua(e){return null===e.getRenderTarget()&&e.outputEncoding===Lt?Nt:zt}const ca={clone:oa,merge:la};class ha extends wi{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader="void main() {\n\tgl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );\n}",this.fragmentShader="void main() {\n\tgl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );\n}",this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv2:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,void 0!==e&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=oa(e.uniforms),this.uniformsGroups=function(e){const t=[];for(let n=0;n<e.length;n++)t.push(e[n].clone());return t}(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const n in this.uniforms){const r=this.uniforms[n].value;r&&r.isTexture?t.uniforms[n]={type:"t",value:r.toJSON(e).uuid}:r&&r.isColor?t.uniforms[n]={type:"c",value:r.getHex()}:r&&r.isVector2?t.uniforms[n]={type:"v2",value:r.toArray()}:r&&r.isVector3?t.uniforms[n]={type:"v3",value:r.toArray()}:r&&r.isVector4?t.uniforms[n]={type:"v4",value:r.toArray()}:r&&r.isMatrix3?t.uniforms[n]={type:"m3",value:r.toArray()}:r&&r.isMatrix4?t.uniforms[n]={type:"m4",value:r.toArray()}:t.uniforms[n]={value:r}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;const n={};for(const e in this.extensions)!0===this.extensions[e]&&(n[e]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}}class da extends ui{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Nr,this.projectionMatrix=new Nr,this.projectionMatrixInverse=new Nr}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);const t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return(new this.constructor).copy(this)}}class fa extends da{constructor(e=50,t=1,n=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=null===e.view?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=2*xn*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*yn*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*xn*Math.atan(Math.tan(.5*yn*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,i,a){this.aspect=e/t,null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(.5*yn*this.fov)/this.zoom,n=2*t,r=this.aspect*n,i=-.5*r;const a=this.view;if(null!==this.view&&this.view.enabled){const e=a.fullWidth,s=a.fullHeight;i+=a.offsetX*r/e,t-=a.offsetY*n/s,r*=a.width/e,n*=a.height/s}const s=this.filmOffset;0!==s&&(i+=e*s/this.getFilmWidth()),this.projectionMatrix.makePerspective(i,i+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,null!==this.view&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const pa=-90;class ma extends ui{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n;const r=new fa(pa,1,e,t);r.layers=this.layers,r.up.set(0,1,0),r.lookAt(1,0,0),this.add(r);const i=new fa(pa,1,e,t);i.layers=this.layers,i.up.set(0,1,0),i.lookAt(-1,0,0),this.add(i);const a=new fa(pa,1,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(0,1,0),this.add(a);const s=new fa(pa,1,e,t);s.layers=this.layers,s.up.set(0,0,1),s.lookAt(0,-1,0),this.add(s);const o=new fa(pa,1,e,t);o.layers=this.layers,o.up.set(0,1,0),o.lookAt(0,0,1),this.add(o);const l=new fa(pa,1,e,t);l.layers=this.layers,l.up.set(0,1,0),l.lookAt(0,0,-1),this.add(l)}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget,[r,i,a,s,o,l]=this.children,u=e.getRenderTarget(),c=e.toneMapping,h=e.xr.enabled;e.toneMapping=Q,e.xr.enabled=!1;const d=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,i),e.setRenderTarget(n,2),e.render(t,a),e.setRenderTarget(n,3),e.render(t,s),e.setRenderTarget(n,4),e.render(t,o),n.texture.generateMipmaps=d,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.toneMapping=c,e.xr.enabled=h,n.texture.needsPMREMUpdate=!0}}class ga extends $n{constructor(e,t,n,r,i,a,s,o,l,u){super(e=void 0!==e?e:[],t=void 0!==t?t:ie,n,r,i,a,s,o,l,u),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class va extends tr{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const n={width:e,height:e,depth:1},r=[n,n,n,n,n,n];this.texture=new ga(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=void 0!==t.generateMipmaps&&t.generateMipmaps,this.texture.minFilter=void 0!==t.minFilter?t.minFilter:ve}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;const n={tEquirect:{value:null}},r="\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\tvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\n\t\t\t\t\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n\n\t\t\t\t}\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvWorldDirection = transformDirection( position, modelMatrix );\n\n\t\t\t\t\t#include <begin_vertex>\n\t\t\t\t\t#include <project_vertex>\n\n\t\t\t\t}\n\t\t\t",i="\n\n\t\t\t\tuniform sampler2D tEquirect;\n\n\t\t\t\tvarying vec3 vWorldDirection;\n\n\t\t\t\t#include <common>\n\n\t\t\t\tvoid main() {\n\n\t\t\t\t\tvec3 direction = normalize( vWorldDirection );\n\n\t\t\t\t\tvec2 sampleUV = equirectUv( direction );\n\n\t\t\t\t\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\n\t\t\t\t}\n\t\t\t",a=new sa(5,5,5),s=new ha({name:"CubemapFromEquirect",uniforms:oa(n),vertexShader:r,fragmentShader:i,side:m,blending:y});s.uniforms.tEquirect.value=t;const o=new ia(a,s),l=t.minFilter;return t.minFilter===be&&(t.minFilter=ve),new ma(1,10,this).update(e,o),t.minFilter=l,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,n,r){const i=e.getRenderTarget();for(let i=0;i<6;i++)e.setRenderTarget(this,i),e.clear(t,n,r);e.setRenderTarget(i)}}const ya=new lr,xa=new lr,ba=new Rn;class _a{constructor(e=new lr(1,0,0),t=0){this.isPlane=!0,this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){const r=ya.subVectors(n,t).cross(xa.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){const e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){const n=e.delta(ya),r=this.normal.dot(n);if(0===r)return 0===this.distanceToPoint(e.start)?t.copy(e.start):null;const i=-(e.start.dot(this.normal)+this.constant)/r;return i<0||i>1?null:t.copy(n).multiplyScalar(i).add(e.start)}intersectsLine(e){const t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){const n=t||ba.getNormalMatrix(e),r=this.coplanarPoint(ya).applyMatrix4(e),i=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(i),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return(new this.constructor).copy(this)}}const wa=new Br,Ma=new lr;class Sa{constructor(e=new _a,t=new _a,n=new _a,r=new _a,i=new _a,a=new _a){this.planes=[e,t,n,r,i,a]}set(e,t,n,r,i,a){const s=this.planes;return s[0].copy(e),s[1].copy(t),s[2].copy(n),s[3].copy(r),s[4].copy(i),s[5].copy(a),this}copy(e){const t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){const t=this.planes,n=e.elements,r=n[0],i=n[1],a=n[2],s=n[3],o=n[4],l=n[5],u=n[6],c=n[7],h=n[8],d=n[9],f=n[10],p=n[11],m=n[12],g=n[13],v=n[14],y=n[15];return t[0].setComponents(s-r,c-o,p-h,y-m).normalize(),t[1].setComponents(s+r,c+o,p+h,y+m).normalize(),t[2].setComponents(s+i,c+l,p+d,y+g).normalize(),t[3].setComponents(s-i,c-l,p-d,y-g).normalize(),t[4].setComponents(s-a,c-u,p-f,y-v).normalize(),t[5].setComponents(s+a,c+u,p+f,y+v).normalize(),this}intersectsObject(e){const t=e.geometry;return null===t.boundingSphere&&t.computeBoundingSphere(),wa.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(wa)}intersectsSprite(e){return wa.center.set(0,0,0),wa.radius=.7071067811865476,wa.applyMatrix4(e.matrixWorld),this.intersectsSphere(wa)}intersectsSphere(e){const t=this.planes,n=e.center,r=-e.radius;for(let e=0;e<6;e++)if(t[e].distanceToPoint(n)<r)return!1;return!0}intersectsBox(e){const t=this.planes;for(let n=0;n<6;n++){const r=t[n];if(Ma.x=r.normal.x>0?e.max.x:e.min.x,Ma.y=r.normal.y>0?e.max.y:e.min.y,Ma.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Ma)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return(new this.constructor).copy(this)}}function Aa(){let e=null,t=!1,n=null,r=null;function i(t,a){n(t,a),r=e.requestAnimationFrame(i)}return{start:function(){!0!==t&&null!==n&&(r=e.requestAnimationFrame(i),t=!0)},stop:function(){e.cancelAnimationFrame(r),t=!1},setAnimationLoop:function(e){n=e},setContext:function(t){e=t}}}function Ca(e,t){const n=t.isWebGL2,r=new WeakMap;return{get:function(e){return e.isInterleavedBufferAttribute&&(e=e.data),r.get(e)},remove:function(t){t.isInterleavedBufferAttribute&&(t=t.data);const n=r.get(t);n&&(e.deleteBuffer(n.buffer),r.delete(t))},update:function(t,i){if(t.isGLBufferAttribute){const e=r.get(t);return void((!e||e.version<t.version)&&r.set(t,{buffer:t.buffer,type:t.type,bytesPerElement:t.elementSize,version:t.version}))}t.isInterleavedBufferAttribute&&(t=t.data);const a=r.get(t);void 0===a?r.set(t,function(t,r){const i=t.array,a=t.usage,s=e.createBuffer();let o;if(e.bindBuffer(r,s),e.bufferData(r,i,a),t.onUploadCallback(),i instanceof Float32Array)o=5126;else if(i instanceof Uint16Array)if(t.isFloat16BufferAttribute){if(!n)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");o=5131}else o=5123;else if(i instanceof Int16Array)o=5122;else if(i instanceof Uint32Array)o=5125;else if(i instanceof Int32Array)o=5124;else if(i instanceof Int8Array)o=5120;else if(i instanceof Uint8Array)o=5121;else{if(!(i instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+i);o=5121}return{buffer:s,type:o,bytesPerElement:i.BYTES_PER_ELEMENT,version:t.version}}(t,i)):a.version<t.version&&(function(t,r,i){const a=r.array,s=r.updateRange;e.bindBuffer(i,t),-1===s.count?e.bufferSubData(i,0,a):(n?e.bufferSubData(i,s.offset*a.BYTES_PER_ELEMENT,a,s.offset,s.count):e.bufferSubData(i,s.offset*a.BYTES_PER_ELEMENT,a.subarray(s.offset,s.offset+s.count)),s.count=-1),r.onUploadCallback()}(a.buffer,t,i),a.version=t.version)}}}class Ea extends Wi{constructor(e=1,t=1,n=1,r=1){super(),this.type="PlaneGeometry",this.parameters={width:e,height:t,widthSegments:n,heightSegments:r};const i=e/2,a=t/2,s=Math.floor(n),o=Math.floor(r),l=s+1,u=o+1,c=e/s,h=t/o,d=[],f=[],p=[],m=[];for(let e=0;e<u;e++){const t=e*h-a;for(let n=0;n<l;n++){const r=n*c-i;f.push(r,-t,0),p.push(0,0,1),m.push(n/s),m.push(1-e/o)}}for(let e=0;e<o;e++)for(let t=0;t<s;t++){const n=t+l*e,r=t+l*(e+1),i=t+1+l*(e+1),a=t+1+l*e;d.push(n,r,a),d.push(r,i,a)}this.setIndex(d),this.setAttribute("position",new ki(f,3)),this.setAttribute("normal",new ki(p,3)),this.setAttribute("uv",new ki(m,2))}static fromJSON(e){return new Ea(e.width,e.height,e.widthSegments,e.heightSegments)}}const Ta={alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vUv ).g;\n#endif",alphamap_pars_fragment:"#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",alphatest_fragment:"#ifdef USE_ALPHATEST\n\tif ( diffuseColor.a < alphaTest ) discard;\n#endif",alphatest_pars_fragment:"#ifdef USE_ALPHATEST\n\tuniform float alphaTest;\n#endif",aomap_fragment:"#ifdef USE_AOMAP\n\tfloat ambientOcclusion = ( texture2D( aoMap, vUv2 ).r - 1.0 ) * aoMapIntensity + 1.0;\n\treflectedLight.indirectDiffuse *= ambientOcclusion;\n\t#if defined( USE_ENVMAP ) && defined( STANDARD )\n\t\tfloat dotNV = saturate( dot( geometry.normal, geometry.viewDir ) );\n\t\treflectedLight.indirectSpecular *= computeSpecularOcclusion( dotNV, ambientOcclusion, material.roughness );\n\t#endif\n#endif",aomap_pars_fragment:"#ifdef USE_AOMAP\n\tuniform sampler2D aoMap;\n\tuniform float aoMapIntensity;\n#endif",begin_vertex:"vec3 transformed = vec3( position );",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"vec3 BRDF_Lambert( const in vec3 diffuseColor ) {\n\treturn RECIPROCAL_PI * diffuseColor;\n}\nvec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nfloat F_Schlick( const in float f0, const in float f90, const in float dotVH ) {\n\tfloat fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH );\n\treturn f0 * ( 1.0 - fresnel ) + ( f90 * fresnel );\n}\nvec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) {\n float x = clamp( 1.0 - dotVH, 0.0, 1.0 );\n float x2 = x * x;\n float x5 = clamp( x * x2 * x2, 0.0, 0.9999 );\n return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 );\n}\nfloat V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) {\n\tfloat a2 = pow2( alpha );\n\tfloat gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) );\n\tfloat gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) );\n\treturn 0.5 / max( gv + gl, EPSILON );\n}\nfloat D_GGX( const in float alpha, const in float dotNH ) {\n\tfloat a2 = pow2( alpha );\n\tfloat denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0;\n\treturn RECIPROCAL_PI * a2 / pow2( denom );\n}\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float roughness ) {\n\tfloat alpha = pow2( roughness );\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( f0, f90, dotVH );\n\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\tfloat D = D_GGX( alpha, dotNH );\n\treturn F * ( V * D );\n}\n#ifdef USE_IRIDESCENCE\n\tvec3 BRDF_GGX_Iridescence( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 f0, const in float f90, const in float iridescence, const in vec3 iridescenceFresnel, const in float roughness ) {\n\t\tfloat alpha = pow2( roughness );\n\t\tvec3 halfDir = normalize( lightDir + viewDir );\n\t\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\t\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\t\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\t\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\t\tvec3 F = mix( F_Schlick( f0, f90, dotVH ), iridescenceFresnel, iridescence );\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t\treturn F * ( V * D );\n\t}\n#endif\nvec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) {\n\tconst float LUT_SIZE = 64.0;\n\tconst float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE;\n\tconst float LUT_BIAS = 0.5 / LUT_SIZE;\n\tfloat dotNV = saturate( dot( N, V ) );\n\tvec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) );\n\tuv = uv * LUT_SCALE + LUT_BIAS;\n\treturn uv;\n}\nfloat LTC_ClippedSphereFormFactor( const in vec3 f ) {\n\tfloat l = length( f );\n\treturn max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 );\n}\nvec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) {\n\tfloat x = dot( v1, v2 );\n\tfloat y = abs( x );\n\tfloat a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y;\n\tfloat b = 3.4175940 + ( 4.1616724 + y ) * y;\n\tfloat v = a / b;\n\tfloat theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v;\n\treturn cross( v1, v2 ) * theta_sintheta;\n}\nvec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) {\n\tvec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ];\n\tvec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ];\n\tvec3 lightNormal = cross( v1, v2 );\n\tif( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 );\n\tvec3 T1, T2;\n\tT1 = normalize( V - N * dot( V, N ) );\n\tT2 = - cross( N, T1 );\n\tmat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) );\n\tvec3 coords[ 4 ];\n\tcoords[ 0 ] = mat * ( rectCoords[ 0 ] - P );\n\tcoords[ 1 ] = mat * ( rectCoords[ 1 ] - P );\n\tcoords[ 2 ] = mat * ( rectCoords[ 2 ] - P );\n\tcoords[ 3 ] = mat * ( rectCoords[ 3 ] - P );\n\tcoords[ 0 ] = normalize( coords[ 0 ] );\n\tcoords[ 1 ] = normalize( coords[ 1 ] );\n\tcoords[ 2 ] = normalize( coords[ 2 ] );\n\tcoords[ 3 ] = normalize( coords[ 3 ] );\n\tvec3 vectorFormFactor = vec3( 0.0 );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] );\n\tvectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] );\n\tfloat result = LTC_ClippedSphereFormFactor( vectorFormFactor );\n\treturn vec3( result );\n}\nfloat G_BlinnPhong_Implicit( ) {\n\treturn 0.25;\n}\nfloat D_BlinnPhong( const in float shininess, const in float dotNH ) {\n\treturn RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess );\n}\nvec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat dotVH = saturate( dot( viewDir, halfDir ) );\n\tvec3 F = F_Schlick( specularColor, 1.0, dotVH );\n\tfloat G = G_BlinnPhong_Implicit( );\n\tfloat D = D_BlinnPhong( shininess, dotNH );\n\treturn F * ( G * D );\n}\n#if defined( USE_SHEEN )\nfloat D_Charlie( float roughness, float dotNH ) {\n\tfloat alpha = pow2( roughness );\n\tfloat invAlpha = 1.0 / alpha;\n\tfloat cos2h = dotNH * dotNH;\n\tfloat sin2h = max( 1.0 - cos2h, 0.0078125 );\n\treturn ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI );\n}\nfloat V_Neubelt( float dotNV, float dotNL ) {\n\treturn saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) );\n}\nvec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) {\n\tvec3 halfDir = normalize( lightDir + viewDir );\n\tfloat dotNL = saturate( dot( normal, lightDir ) );\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat dotNH = saturate( dot( normal, halfDir ) );\n\tfloat D = D_Charlie( sheenRoughness, dotNH );\n\tfloat V = V_Neubelt( dotNV, dotNL );\n\treturn sheenColor * ( D * V );\n}\n#endif",iridescence_fragment:"#ifdef USE_IRIDESCENCE\n\tconst mat3 XYZ_TO_REC709 = mat3(\n\t\t 3.2404542, -0.9692660, 0.0556434,\n\t\t-1.5371385, 1.8760108, -0.2040259,\n\t\t-0.4985314, 0.0415560, 1.0572252\n\t);\n\tvec3 Fresnel0ToIor( vec3 fresnel0 ) {\n\t\tvec3 sqrtF0 = sqrt( fresnel0 );\n\t\treturn ( vec3( 1.0 ) + sqrtF0 ) / ( vec3( 1.0 ) - sqrtF0 );\n\t}\n\tvec3 IorToFresnel0( vec3 transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - vec3( incidentIor ) ) / ( transmittedIor + vec3( incidentIor ) ) );\n\t}\n\tfloat IorToFresnel0( float transmittedIor, float incidentIor ) {\n\t\treturn pow2( ( transmittedIor - incidentIor ) / ( transmittedIor + incidentIor ));\n\t}\n\tvec3 evalSensitivity( float OPD, vec3 shift ) {\n\t\tfloat phase = 2.0 * PI * OPD * 1.0e-9;\n\t\tvec3 val = vec3( 5.4856e-13, 4.4201e-13, 5.2481e-13 );\n\t\tvec3 pos = vec3( 1.6810e+06, 1.7953e+06, 2.2084e+06 );\n\t\tvec3 var = vec3( 4.3278e+09, 9.3046e+09, 6.6121e+09 );\n\t\tvec3 xyz = val * sqrt( 2.0 * PI * var ) * cos( pos * phase + shift ) * exp( - pow2( phase ) * var );\n\t\txyz.x += 9.7470e-14 * sqrt( 2.0 * PI * 4.5282e+09 ) * cos( 2.2399e+06 * phase + shift[ 0 ] ) * exp( - 4.5282e+09 * pow2( phase ) );\n\t\txyz /= 1.0685e-7;\n\t\tvec3 rgb = XYZ_TO_REC709 * xyz;\n\t\treturn rgb;\n\t}\n\tvec3 evalIridescence( float outsideIOR, float eta2, float cosTheta1, float thinFilmThickness, vec3 baseF0 ) {\n\t\tvec3 I;\n\t\tfloat iridescenceIOR = mix( outsideIOR, eta2, smoothstep( 0.0, 0.03, thinFilmThickness ) );\n\t\tfloat sinTheta2Sq = pow2( outsideIOR / iridescenceIOR ) * ( 1.0 - pow2( cosTheta1 ) );\n\t\tfloat cosTheta2Sq = 1.0 - sinTheta2Sq;\n\t\tif ( cosTheta2Sq < 0.0 ) {\n\t\t\t return vec3( 1.0 );\n\t\t}\n\t\tfloat cosTheta2 = sqrt( cosTheta2Sq );\n\t\tfloat R0 = IorToFresnel0( iridescenceIOR, outsideIOR );\n\t\tfloat R12 = F_Schlick( R0, 1.0, cosTheta1 );\n\t\tfloat R21 = R12;\n\t\tfloat T121 = 1.0 - R12;\n\t\tfloat phi12 = 0.0;\n\t\tif ( iridescenceIOR < outsideIOR ) phi12 = PI;\n\t\tfloat phi21 = PI - phi12;\n\t\tvec3 baseIOR = Fresnel0ToIor( clamp( baseF0, 0.0, 0.9999 ) );\t\tvec3 R1 = IorToFresnel0( baseIOR, iridescenceIOR );\n\t\tvec3 R23 = F_Schlick( R1, 1.0, cosTheta2 );\n\t\tvec3 phi23 = vec3( 0.0 );\n\t\tif ( baseIOR[ 0 ] < iridescenceIOR ) phi23[ 0 ] = PI;\n\t\tif ( baseIOR[ 1 ] < iridescenceIOR ) phi23[ 1 ] = PI;\n\t\tif ( baseIOR[ 2 ] < iridescenceIOR ) phi23[ 2 ] = PI;\n\t\tfloat OPD = 2.0 * iridescenceIOR * thinFilmThickness * cosTheta2;\n\t\tvec3 phi = vec3( phi21 ) + phi23;\n\t\tvec3 R123 = clamp( R12 * R23, 1e-5, 0.9999 );\n\t\tvec3 r123 = sqrt( R123 );\n\t\tvec3 Rs = pow2( T121 ) * R23 / ( vec3( 1.0 ) - R123 );\n\t\tvec3 C0 = R12 + Rs;\n\t\tI = C0;\n\t\tvec3 Cm = Rs - T121;\n\t\tfor ( int m = 1; m <= 2; ++ m ) {\n\t\t\tCm *= r123;\n\t\t\tvec3 Sm = 2.0 * evalSensitivity( float( m ) * OPD, float( m ) * phi );\n\t\t\tI += Cm * Sm;\n\t\t}\n\t\treturn max( I, vec3( 0.0 ) );\n\t}\n#endif",bumpmap_pars_fragment:"#ifdef USE_BUMPMAP\n\tuniform sampler2D bumpMap;\n\tuniform float bumpScale;\n\tvec2 dHdxy_fwd() {\n\t\tvec2 dSTdx = dFdx( vUv );\n\t\tvec2 dSTdy = dFdy( vUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll;\n\t\treturn vec2( dBx, dBy );\n\t}\n\tvec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) {\n\t\tvec3 vSigmaX = dFdx( surf_pos.xyz );\n\t\tvec3 vSigmaY = dFdy( surf_pos.xyz );\n\t\tvec3 vN = surf_norm;\n\t\tvec3 R1 = cross( vSigmaY, vN );\n\t\tvec3 R2 = cross( vN, vSigmaX );\n\t\tfloat fDet = dot( vSigmaX, R1 ) * faceDirection;\n\t\tvec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 );\n\t\treturn normalize( abs( fDet ) * surf_norm - vGrad );\n\t}\n#endif",clipping_planes_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvec4 plane;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) {\n\t\tplane = clippingPlanes[ i ];\n\t\tif ( dot( vClipPosition, plane.xyz ) > plane.w ) discard;\n\t}\n\t#pragma unroll_loop_end\n\t#if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES\n\t\tbool clipped = true;\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) {\n\t\t\tplane = clippingPlanes[ i ];\n\t\t\tclipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t\tif ( clipped ) discard;\n\t#endif\n#endif",clipping_planes_pars_fragment:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n\tuniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ];\n#endif",clipping_planes_pars_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvarying vec3 vClipPosition;\n#endif",clipping_planes_vertex:"#if NUM_CLIPPING_PLANES > 0\n\tvClipPosition = - mvPosition.xyz;\n#endif",color_fragment:"#if defined( USE_COLOR_ALPHA )\n\tdiffuseColor *= vColor;\n#elif defined( USE_COLOR )\n\tdiffuseColor.rgb *= vColor;\n#endif",color_pars_fragment:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR )\n\tvarying vec3 vColor;\n#endif",color_pars_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvarying vec4 vColor;\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvarying vec3 vColor;\n#endif",color_vertex:"#if defined( USE_COLOR_ALPHA )\n\tvColor = vec4( 1.0 );\n#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR )\n\tvColor = vec3( 1.0 );\n#endif\n#ifdef USE_COLOR\n\tvColor *= color;\n#endif\n#ifdef USE_INSTANCING_COLOR\n\tvColor.xyz *= instanceColor.xyz;\n#endif",common:"#define PI 3.141592653589793\n#define PI2 6.283185307179586\n#define PI_HALF 1.5707963267948966\n#define RECIPROCAL_PI 0.3183098861837907\n#define RECIPROCAL_PI2 0.15915494309189535\n#define EPSILON 1e-6\n#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\n#define whiteComplement( a ) ( 1.0 - saturate( a ) )\nfloat pow2( const in float x ) { return x*x; }\nvec3 pow2( const in vec3 x ) { return x*x; }\nfloat pow3( const in float x ) { return x*x*x; }\nfloat pow4( const in float x ) { float x2 = x*x; return x2*x2; }\nfloat max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); }\nfloat average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); }\nhighp float rand( const in vec2 uv ) {\n\tconst highp float a = 12.9898, b = 78.233, c = 43758.5453;\n\thighp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI );\n\treturn fract( sin( sn ) * c );\n}\n#ifdef HIGH_PRECISION\n\tfloat precisionSafeLength( vec3 v ) { return length( v ); }\n#else\n\tfloat precisionSafeLength( vec3 v ) {\n\t\tfloat maxComponent = max3( abs( v ) );\n\t\treturn length( v / maxComponent ) * maxComponent;\n\t}\n#endif\nstruct IncidentLight {\n\tvec3 color;\n\tvec3 direction;\n\tbool visible;\n};\nstruct ReflectedLight {\n\tvec3 directDiffuse;\n\tvec3 directSpecular;\n\tvec3 indirectDiffuse;\n\tvec3 indirectSpecular;\n};\nstruct GeometricContext {\n\tvec3 position;\n\tvec3 normal;\n\tvec3 viewDir;\n#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal;\n#endif\n};\nvec3 transformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( matrix * vec4( dir, 0.0 ) ).xyz );\n}\nvec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) {\n\treturn normalize( ( vec4( dir, 0.0 ) * matrix ).xyz );\n}\nmat3 transposeMat3( const in mat3 m ) {\n\tmat3 tmp;\n\ttmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x );\n\ttmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y );\n\ttmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z );\n\treturn tmp;\n}\nfloat luminance( const in vec3 rgb ) {\n\tconst vec3 weights = vec3( 0.2126729, 0.7151522, 0.0721750 );\n\treturn dot( weights, rgb );\n}\nbool isPerspectiveMatrix( mat4 m ) {\n\treturn m[ 2 ][ 3 ] == - 1.0;\n}\nvec2 equirectUv( in vec3 dir ) {\n\tfloat u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5;\n\tfloat v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5;\n\treturn vec2( u, v );\n}",cube_uv_reflection_fragment:"#ifdef ENVMAP_TYPE_CUBE_UV\n\t#define cubeUV_minMipLevel 4.0\n\t#define cubeUV_minTileSize 16.0\n\tfloat getFace( vec3 direction ) {\n\t\tvec3 absDirection = abs( direction );\n\t\tfloat face = - 1.0;\n\t\tif ( absDirection.x > absDirection.z ) {\n\t\t\tif ( absDirection.x > absDirection.y )\n\t\t\t\tface = direction.x > 0.0 ? 0.0 : 3.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t} else {\n\t\t\tif ( absDirection.z > absDirection.y )\n\t\t\t\tface = direction.z > 0.0 ? 2.0 : 5.0;\n\t\t\telse\n\t\t\t\tface = direction.y > 0.0 ? 1.0 : 4.0;\n\t\t}\n\t\treturn face;\n\t}\n\tvec2 getUV( vec3 direction, float face ) {\n\t\tvec2 uv;\n\t\tif ( face == 0.0 ) {\n\t\t\tuv = vec2( direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 1.0 ) {\n\t\t\tuv = vec2( - direction.x, - direction.z ) / abs( direction.y );\n\t\t} else if ( face == 2.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.y ) / abs( direction.z );\n\t\t} else if ( face == 3.0 ) {\n\t\t\tuv = vec2( - direction.z, direction.y ) / abs( direction.x );\n\t\t} else if ( face == 4.0 ) {\n\t\t\tuv = vec2( - direction.x, direction.z ) / abs( direction.y );\n\t\t} else {\n\t\t\tuv = vec2( direction.x, direction.y ) / abs( direction.z );\n\t\t}\n\t\treturn 0.5 * ( uv + 1.0 );\n\t}\n\tvec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) {\n\t\tfloat face = getFace( direction );\n\t\tfloat filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 );\n\t\tmipInt = max( mipInt, cubeUV_minMipLevel );\n\t\tfloat faceSize = exp2( mipInt );\n\t\thighp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0;\n\t\tif ( face > 2.0 ) {\n\t\t\tuv.y += faceSize;\n\t\t\tface -= 3.0;\n\t\t}\n\t\tuv.x += face * faceSize;\n\t\tuv.x += filterInt * 3.0 * cubeUV_minTileSize;\n\t\tuv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize );\n\t\tuv.x *= CUBEUV_TEXEL_WIDTH;\n\t\tuv.y *= CUBEUV_TEXEL_HEIGHT;\n\t\t#ifdef texture2DGradEXT\n\t\t\treturn texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb;\n\t\t#else\n\t\t\treturn texture2D( envMap, uv ).rgb;\n\t\t#endif\n\t}\n\t#define cubeUV_r0 1.0\n\t#define cubeUV_v0 0.339\n\t#define cubeUV_m0 - 2.0\n\t#define cubeUV_r1 0.8\n\t#define cubeUV_v1 0.276\n\t#define cubeUV_m1 - 1.0\n\t#define cubeUV_r4 0.4\n\t#define cubeUV_v4 0.046\n\t#define cubeUV_m4 2.0\n\t#define cubeUV_r5 0.305\n\t#define cubeUV_v5 0.016\n\t#define cubeUV_m5 3.0\n\t#define cubeUV_r6 0.21\n\t#define cubeUV_v6 0.0038\n\t#define cubeUV_m6 4.0\n\tfloat roughnessToMip( float roughness ) {\n\t\tfloat mip = 0.0;\n\t\tif ( roughness >= cubeUV_r1 ) {\n\t\t\tmip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0;\n\t\t} else if ( roughness >= cubeUV_r4 ) {\n\t\t\tmip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1;\n\t\t} else if ( roughness >= cubeUV_r5 ) {\n\t\t\tmip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4;\n\t\t} else if ( roughness >= cubeUV_r6 ) {\n\t\t\tmip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5;\n\t\t} else {\n\t\t\tmip = - 2.0 * log2( 1.16 * roughness );\t\t}\n\t\treturn mip;\n\t}\n\tvec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) {\n\t\tfloat mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP );\n\t\tfloat mipF = fract( mip );\n\t\tfloat mipInt = floor( mip );\n\t\tvec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt );\n\t\tif ( mipF == 0.0 ) {\n\t\t\treturn vec4( color0, 1.0 );\n\t\t} else {\n\t\t\tvec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 );\n\t\t\treturn vec4( mix( color0, color1, mipF ), 1.0 );\n\t\t}\n\t}\n#endif",defaultnormal_vertex:"vec3 transformedNormal = objectNormal;\n#ifdef USE_INSTANCING\n\tmat3 m = mat3( instanceMatrix );\n\ttransformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) );\n\ttransformedNormal = m * transformedNormal;\n#endif\ntransformedNormal = normalMatrix * transformedNormal;\n#ifdef FLIP_SIDED\n\ttransformedNormal = - transformedNormal;\n#endif\n#ifdef USE_TANGENT\n\tvec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#ifdef FLIP_SIDED\n\t\ttransformedTangent = - transformedTangent;\n\t#endif\n#endif",displacementmap_pars_vertex:"#ifdef USE_DISPLACEMENTMAP\n\tuniform sampler2D displacementMap;\n\tuniform float displacementScale;\n\tuniform float displacementBias;\n#endif",displacementmap_vertex:"#ifdef USE_DISPLACEMENTMAP\n\ttransformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",encodings_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",encodings_pars_fragment:"vec4 LinearToLinear( in vec4 value ) {\n\treturn value;\n}\nvec4 LinearTosRGB( in vec4 value ) {\n\treturn vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a );\n}",envmap_fragment:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvec3 cameraToFrag;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToFrag = normalize( vWorldPosition - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvec3 reflectVec = reflect( cameraToFrag, worldNormal );\n\t\t#else\n\t\t\tvec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio );\n\t\t#endif\n\t#else\n\t\tvec3 reflectVec = vReflect;\n\t#endif\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) );\n\t#else\n\t\tvec4 envColor = vec4( 0.0 );\n\t#endif\n\t#ifdef ENVMAP_BLENDING_MULTIPLY\n\t\toutgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_MIX )\n\t\toutgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity );\n\t#elif defined( ENVMAP_BLENDING_ADD )\n\t\toutgoingLight += envColor.xyz * specularStrength * reflectivity;\n\t#endif\n#endif",envmap_common_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float envMapIntensity;\n\tuniform float flipEnvMap;\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tuniform samplerCube envMap;\n\t#else\n\t\tuniform sampler2D envMap;\n\t#endif\n\t\n#endif",envmap_pars_fragment:"#ifdef USE_ENVMAP\n\tuniform float reflectivity;\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\tvarying vec3 vWorldPosition;\n\t\tuniform float refractionRatio;\n\t#else\n\t\tvarying vec3 vReflect;\n\t#endif\n#endif",envmap_pars_vertex:"#ifdef USE_ENVMAP\n\t#if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT )\n\t\t#define ENV_WORLDPOS\n\t#endif\n\t#ifdef ENV_WORLDPOS\n\t\t\n\t\tvarying vec3 vWorldPosition;\n\t#else\n\t\tvarying vec3 vReflect;\n\t\tuniform float refractionRatio;\n\t#endif\n#endif",envmap_physical_pars_fragment:"#if defined( USE_ENVMAP )\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 );\n\t\t\treturn PI * envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n\tvec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) {\n\t\t#if defined( ENVMAP_TYPE_CUBE_UV )\n\t\t\tvec3 reflectVec = reflect( - viewDir, normal );\n\t\t\treflectVec = normalize( mix( reflectVec, normal, roughness * roughness) );\n\t\t\treflectVec = inverseTransformDirection( reflectVec, viewMatrix );\n\t\t\tvec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness );\n\t\t\treturn envMapColor.rgb * envMapIntensity;\n\t\t#else\n\t\t\treturn vec3( 0.0 );\n\t\t#endif\n\t}\n#endif",envmap_vertex:"#ifdef USE_ENVMAP\n\t#ifdef ENV_WORLDPOS\n\t\tvWorldPosition = worldPosition.xyz;\n\t#else\n\t\tvec3 cameraToVertex;\n\t\tif ( isOrthographic ) {\n\t\t\tcameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) );\n\t\t} else {\n\t\t\tcameraToVertex = normalize( worldPosition.xyz - cameraPosition );\n\t\t}\n\t\tvec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\t#ifdef ENVMAP_MODE_REFLECTION\n\t\t\tvReflect = reflect( cameraToVertex, worldNormal );\n\t\t#else\n\t\t\tvReflect = refract( cameraToVertex, worldNormal, refractionRatio );\n\t\t#endif\n\t#endif\n#endif",fog_vertex:"#ifdef USE_FOG\n\tvFogDepth = - mvPosition.z;\n#endif",fog_pars_vertex:"#ifdef USE_FOG\n\tvarying float vFogDepth;\n#endif",fog_fragment:"#ifdef USE_FOG\n\t#ifdef FOG_EXP2\n\t\tfloat fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth );\n\t#else\n\t\tfloat fogFactor = smoothstep( fogNear, fogFar, vFogDepth );\n\t#endif\n\tgl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor );\n#endif",fog_pars_fragment:"#ifdef USE_FOG\n\tuniform vec3 fogColor;\n\tvarying float vFogDepth;\n\t#ifdef FOG_EXP2\n\t\tuniform float fogDensity;\n\t#else\n\t\tuniform float fogNear;\n\t\tuniform float fogFar;\n\t#endif\n#endif",gradientmap_pars_fragment:"#ifdef USE_GRADIENTMAP\n\tuniform sampler2D gradientMap;\n#endif\nvec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) {\n\tfloat dotNL = dot( normal, lightDirection );\n\tvec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 );\n\t#ifdef USE_GRADIENTMAP\n\t\treturn vec3( texture2D( gradientMap, coord ).r );\n\t#else\n\t\tvec2 fw = fwidth( coord ) * 0.5;\n\t\treturn mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) );\n\t#endif\n}",lightmap_fragment:"#ifdef USE_LIGHTMAP\n\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\treflectedLight.indirectDiffuse += lightMapIrradiance;\n#endif",lightmap_pars_fragment:"#ifdef USE_LIGHTMAP\n\tuniform sampler2D lightMap;\n\tuniform float lightMapIntensity;\n#endif",lights_lambert_fragment:"LambertMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularStrength = specularStrength;",lights_lambert_pars_fragment:"varying vec3 vViewPosition;\nstruct LambertMaterial {\n\tvec3 diffuseColor;\n\tfloat specularStrength;\n};\nvoid RE_Direct_Lambert( const in IncidentLight directLight, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in GeometricContext geometry, const in LambertMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Lambert\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Lambert",lights_pars_begin:"uniform bool receiveShadow;\nuniform vec3 ambientLightColor;\nuniform vec3 lightProbe[ 9 ];\nvec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) {\n\tfloat x = normal.x, y = normal.y, z = normal.z;\n\tvec3 result = shCoefficients[ 0 ] * 0.886227;\n\tresult += shCoefficients[ 1 ] * 2.0 * 0.511664 * y;\n\tresult += shCoefficients[ 2 ] * 2.0 * 0.511664 * z;\n\tresult += shCoefficients[ 3 ] * 2.0 * 0.511664 * x;\n\tresult += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y;\n\tresult += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z;\n\tresult += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 );\n\tresult += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z;\n\tresult += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y );\n\treturn result;\n}\nvec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) {\n\tvec3 worldNormal = inverseTransformDirection( normal, viewMatrix );\n\tvec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe );\n\treturn irradiance;\n}\nvec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) {\n\tvec3 irradiance = ambientLightColor;\n\treturn irradiance;\n}\nfloat getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) {\n\t#if defined ( PHYSICALLY_CORRECT_LIGHTS )\n\t\tfloat distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 );\n\t\tif ( cutoffDistance > 0.0 ) {\n\t\t\tdistanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) );\n\t\t}\n\t\treturn distanceFalloff;\n\t#else\n\t\tif ( cutoffDistance > 0.0 && decayExponent > 0.0 ) {\n\t\t\treturn pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent );\n\t\t}\n\t\treturn 1.0;\n\t#endif\n}\nfloat getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) {\n\treturn smoothstep( coneCosine, penumbraCosine, angleCosine );\n}\n#if NUM_DIR_LIGHTS > 0\n\tstruct DirectionalLight {\n\t\tvec3 direction;\n\t\tvec3 color;\n\t};\n\tuniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ];\n\tvoid getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tlight.color = directionalLight.color;\n\t\tlight.direction = directionalLight.direction;\n\t\tlight.visible = true;\n\t}\n#endif\n#if NUM_POINT_LIGHTS > 0\n\tstruct PointLight {\n\t\tvec3 position;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t};\n\tuniform PointLight pointLights[ NUM_POINT_LIGHTS ];\n\tvoid getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = pointLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat lightDistance = length( lVector );\n\t\tlight.color = pointLight.color;\n\t\tlight.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay );\n\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t}\n#endif\n#if NUM_SPOT_LIGHTS > 0\n\tstruct SpotLight {\n\t\tvec3 position;\n\t\tvec3 direction;\n\t\tvec3 color;\n\t\tfloat distance;\n\t\tfloat decay;\n\t\tfloat coneCos;\n\t\tfloat penumbraCos;\n\t};\n\tuniform SpotLight spotLights[ NUM_SPOT_LIGHTS ];\n\tvoid getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) {\n\t\tvec3 lVector = spotLight.position - geometry.position;\n\t\tlight.direction = normalize( lVector );\n\t\tfloat angleCos = dot( light.direction, spotLight.direction );\n\t\tfloat spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos );\n\t\tif ( spotAttenuation > 0.0 ) {\n\t\t\tfloat lightDistance = length( lVector );\n\t\t\tlight.color = spotLight.color * spotAttenuation;\n\t\t\tlight.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay );\n\t\t\tlight.visible = ( light.color != vec3( 0.0 ) );\n\t\t} else {\n\t\t\tlight.color = vec3( 0.0 );\n\t\t\tlight.visible = false;\n\t\t}\n\t}\n#endif\n#if NUM_RECT_AREA_LIGHTS > 0\n\tstruct RectAreaLight {\n\t\tvec3 color;\n\t\tvec3 position;\n\t\tvec3 halfWidth;\n\t\tvec3 halfHeight;\n\t};\n\tuniform sampler2D ltc_1;\tuniform sampler2D ltc_2;\n\tuniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ];\n#endif\n#if NUM_HEMI_LIGHTS > 0\n\tstruct HemisphereLight {\n\t\tvec3 direction;\n\t\tvec3 skyColor;\n\t\tvec3 groundColor;\n\t};\n\tuniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ];\n\tvec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) {\n\t\tfloat dotNL = dot( normal, hemiLight.direction );\n\t\tfloat hemiDiffuseWeight = 0.5 * dotNL + 0.5;\n\t\tvec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight );\n\t\treturn irradiance;\n\t}\n#endif",lights_toon_fragment:"ToonMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;",lights_toon_pars_fragment:"varying vec3 vViewPosition;\nstruct ToonMaterial {\n\tvec3 diffuseColor;\n};\nvoid RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\tvec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_Toon\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Toon",lights_phong_fragment:"BlinnPhongMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb;\nmaterial.specularColor = specular;\nmaterial.specularShininess = shininess;\nmaterial.specularStrength = specularStrength;",lights_phong_pars_fragment:"varying vec3 vViewPosition;\nstruct BlinnPhongMaterial {\n\tvec3 diffuseColor;\n\tvec3 specularColor;\n\tfloat specularShininess;\n\tfloat specularStrength;\n};\nvoid RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n\treflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength;\n}\nvoid RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\n#define RE_Direct\t\t\t\tRE_Direct_BlinnPhong\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_BlinnPhong",lights_physical_fragment:"PhysicalMaterial material;\nmaterial.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor );\nvec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) );\nfloat geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z );\nmaterial.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness;\nmaterial.roughness = min( material.roughness, 1.0 );\n#ifdef IOR\n\tmaterial.ior = ior;\n\t#ifdef SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULARINTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a;\n\t\t#endif\n\t\t#ifdef USE_SPECULARCOLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vUv ).rgb;\n\t\t#endif\n\t\tmaterial.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor );\n\t#else\n\t\tfloat specularIntensityFactor = 1.0;\n\t\tvec3 specularColorFactor = vec3( 1.0 );\n\t\tmaterial.specularF90 = 1.0;\n\t#endif\n\tmaterial.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor );\n#else\n\tmaterial.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor );\n\tmaterial.specularF90 = 1.0;\n#endif\n#ifdef USE_CLEARCOAT\n\tmaterial.clearcoat = clearcoat;\n\tmaterial.clearcoatRoughness = clearcoatRoughness;\n\tmaterial.clearcoatF0 = vec3( 0.04 );\n\tmaterial.clearcoatF90 = 1.0;\n\t#ifdef USE_CLEARCOATMAP\n\t\tmaterial.clearcoat *= texture2D( clearcoatMap, vUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y;\n\t#endif\n\tmaterial.clearcoat = saturate( material.clearcoat );\tmaterial.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 );\n\tmaterial.clearcoatRoughness += geometryRoughness;\n\tmaterial.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 );\n#endif\n#ifdef USE_IRIDESCENCE\n\tmaterial.iridescence = iridescence;\n\tmaterial.iridescenceIOR = iridescenceIOR;\n\t#ifdef USE_IRIDESCENCEMAP\n\t\tmaterial.iridescence *= texture2D( iridescenceMap, vUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vUv ).g + iridescenceThicknessMinimum;\n\t#else\n\t\tmaterial.iridescenceThickness = iridescenceThicknessMaximum;\n\t#endif\n#endif\n#ifdef USE_SHEEN\n\tmaterial.sheenColor = sheenColor;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a;\n\t#endif\n#endif",lights_physical_pars_fragment:"struct PhysicalMaterial {\n\tvec3 diffuseColor;\n\tfloat roughness;\n\tvec3 specularColor;\n\tfloat specularF90;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat clearcoat;\n\t\tfloat clearcoatRoughness;\n\t\tvec3 clearcoatF0;\n\t\tfloat clearcoatF90;\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\tfloat iridescence;\n\t\tfloat iridescenceIOR;\n\t\tfloat iridescenceThickness;\n\t\tvec3 iridescenceFresnel;\n\t\tvec3 iridescenceF0;\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tvec3 sheenColor;\n\t\tfloat sheenRoughness;\n\t#endif\n\t#ifdef IOR\n\t\tfloat ior;\n\t#endif\n\t#ifdef USE_TRANSMISSION\n\t\tfloat transmission;\n\t\tfloat transmissionAlpha;\n\t\tfloat thickness;\n\t\tfloat attenuationDistance;\n\t\tvec3 attenuationColor;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\nfloat IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tfloat r2 = roughness * roughness;\n\tfloat a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95;\n\tfloat b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72;\n\tfloat DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) );\n\treturn saturate( DG * RECIPROCAL_PI );\n}\nvec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) {\n\tfloat dotNV = saturate( dot( normal, viewDir ) );\n\tconst vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 );\n\tconst vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 );\n\tvec4 r = roughness * c0 + c1;\n\tfloat a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y;\n\tvec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw;\n\treturn fab;\n}\nvec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) {\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\treturn specularColor * fab.x + specularF90 * fab.y;\n}\n#ifdef USE_IRIDESCENCE\nvoid computeMultiscatteringIridescence( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float iridescence, const in vec3 iridescenceF0, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#else\nvoid computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) {\n#endif\n\tvec2 fab = DFGApprox( normal, viewDir, roughness );\n\t#ifdef USE_IRIDESCENCE\n\t\tvec3 Fr = mix( specularColor, iridescenceF0, iridescence );\n\t#else\n\t\tvec3 Fr = specularColor;\n\t#endif\n\tvec3 FssEss = Fr * fab.x + specularF90 * fab.y;\n\tfloat Ess = fab.x + fab.y;\n\tfloat Ems = 1.0 - Ess;\n\tvec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619;\tvec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg );\n\tsingleScatter += FssEss;\n\tmultiScatter += Fms * Ems;\n}\n#if NUM_RECT_AREA_LIGHTS > 0\n\tvoid RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\t\tvec3 normal = geometry.normal;\n\t\tvec3 viewDir = geometry.viewDir;\n\t\tvec3 position = geometry.position;\n\t\tvec3 lightPos = rectAreaLight.position;\n\t\tvec3 halfWidth = rectAreaLight.halfWidth;\n\t\tvec3 halfHeight = rectAreaLight.halfHeight;\n\t\tvec3 lightColor = rectAreaLight.color;\n\t\tfloat roughness = material.roughness;\n\t\tvec3 rectCoords[ 4 ];\n\t\trectCoords[ 0 ] = lightPos + halfWidth - halfHeight;\t\trectCoords[ 1 ] = lightPos - halfWidth - halfHeight;\n\t\trectCoords[ 2 ] = lightPos - halfWidth + halfHeight;\n\t\trectCoords[ 3 ] = lightPos + halfWidth + halfHeight;\n\t\tvec2 uv = LTC_Uv( normal, viewDir, roughness );\n\t\tvec4 t1 = texture2D( ltc_1, uv );\n\t\tvec4 t2 = texture2D( ltc_2, uv );\n\t\tmat3 mInv = mat3(\n\t\t\tvec3( t1.x, 0, t1.y ),\n\t\t\tvec3( 0, 1, 0 ),\n\t\t\tvec3( t1.z, 0, t1.w )\n\t\t);\n\t\tvec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y );\n\t\treflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords );\n\t\treflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords );\n\t}\n#endif\nvoid RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\tfloat dotNL = saturate( dot( geometry.normal, directLight.direction ) );\n\tvec3 irradiance = dotNL * directLight.color;\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) );\n\t\tvec3 ccIrradiance = dotNLcc * directLight.color;\n\t\tclearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness );\n\t#endif\n\t#ifdef USE_IRIDESCENCE\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX_Iridescence( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness );\n\t#else\n\t\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness );\n\t#endif\n\treflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) {\n\treflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor );\n}\nvoid RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) {\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness );\n\t#endif\n\t#ifdef USE_SHEEN\n\t\tsheenSpecular += irradiance * material.sheenColor * IBLSheenBRDF( geometry.normal, geometry.viewDir, material.sheenRoughness );\n\t#endif\n\tvec3 singleScattering = vec3( 0.0 );\n\tvec3 multiScattering = vec3( 0.0 );\n\tvec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI;\n\t#ifdef USE_IRIDESCENCE\n\t\tcomputeMultiscatteringIridescence( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering );\n\t#else\n\t\tcomputeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering );\n\t#endif\n\tvec3 totalScattering = singleScattering + multiScattering;\n\tvec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) );\n\treflectedLight.indirectSpecular += radiance * singleScattering;\n\treflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance;\n\treflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance;\n}\n#define RE_Direct\t\t\t\tRE_Direct_Physical\n#define RE_Direct_RectArea\t\tRE_Direct_RectArea_Physical\n#define RE_IndirectDiffuse\t\tRE_IndirectDiffuse_Physical\n#define RE_IndirectSpecular\t\tRE_IndirectSpecular_Physical\nfloat computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) {\n\treturn saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion );\n}",lights_fragment_begin:"\nGeometricContext geometry;\ngeometry.position = - vViewPosition;\ngeometry.normal = normal;\ngeometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition );\n#ifdef USE_CLEARCOAT\n\tgeometry.clearcoatNormal = clearcoatNormal;\n#endif\n#ifdef USE_IRIDESCENCE\n\tfloat dotNVi = saturate( dot( normal, geometry.viewDir ) );\n\tif ( material.iridescenceThickness == 0.0 ) {\n\t\tmaterial.iridescence = 0.0;\n\t} else {\n\t\tmaterial.iridescence = saturate( material.iridescence );\n\t}\n\tif ( material.iridescence > 0.0 ) {\n\t\tmaterial.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor );\n\t\tmaterial.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi );\n\t}\n#endif\nIncidentLight directLight;\n#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct )\n\tPointLight pointLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) {\n\t\tpointLight = pointLights[ i ];\n\t\tgetPointLightInfo( pointLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS )\n\t\tpointLightShadow = pointLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct )\n\tSpotLight spotLight;\n\tvec4 spotColor;\n\tvec3 spotLightCoord;\n\tbool inSpotLightMap;\n\t#if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) {\n\t\tspotLight = spotLights[ i ];\n\t\tgetSpotLightInfo( spotLight, geometry, directLight );\n\t\t#if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX\n\t\t#elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t#define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS\n\t\t#else\n\t\t#define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS )\n\t\t#endif\n\t\t#if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS )\n\t\t\tspotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w;\n\t\t\tinSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) );\n\t\t\tspotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy );\n\t\t\tdirectLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color;\n\t\t#endif\n\t\t#undef SPOT_LIGHT_MAP_INDEX\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\tspotLightShadow = spotLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct )\n\tDirectionalLight directionalLight;\n\t#if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLightShadow;\n\t#endif\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) {\n\t\tdirectionalLight = directionalLights[ i ];\n\t\tgetDirectionalLightInfo( directionalLight, geometry, directLight );\n\t\t#if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS )\n\t\tdirectionalLightShadow = directionalLightShadows[ i ];\n\t\tdirectLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t\t#endif\n\t\tRE_Direct( directLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea )\n\tRectAreaLight rectAreaLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) {\n\t\trectAreaLight = rectAreaLights[ i ];\n\t\tRE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight );\n\t}\n\t#pragma unroll_loop_end\n#endif\n#if defined( RE_IndirectDiffuse )\n\tvec3 iblIrradiance = vec3( 0.0 );\n\tvec3 irradiance = getAmbientLightIrradiance( ambientLightColor );\n\tirradiance += getLightProbeIrradiance( lightProbe, geometry.normal );\n\t#if ( NUM_HEMI_LIGHTS > 0 )\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) {\n\t\t\tirradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal );\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#if defined( RE_IndirectSpecular )\n\tvec3 radiance = vec3( 0.0 );\n\tvec3 clearcoatRadiance = vec3( 0.0 );\n#endif",lights_fragment_maps:"#if defined( RE_IndirectDiffuse )\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\tvec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity;\n\t\tirradiance += lightMapIrradiance;\n\t#endif\n\t#if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV )\n\t\tiblIrradiance += getIBLIrradiance( geometry.normal );\n\t#endif\n#endif\n#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular )\n\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#ifdef USE_CLEARCOAT\n\t\tclearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness );\n\t#endif\n#endif",lights_fragment_end:"#if defined( RE_IndirectDiffuse )\n\tRE_IndirectDiffuse( irradiance, geometry, material, reflectedLight );\n#endif\n#if defined( RE_IndirectSpecular )\n\tRE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight );\n#endif",logdepthbuf_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tgl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5;\n#endif",logdepthbuf_pars_fragment:"#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT )\n\tuniform float logDepthBufFC;\n\tvarying float vFragDepth;\n\tvarying float vIsPerspective;\n#endif",logdepthbuf_pars_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvarying float vFragDepth;\n\t\tvarying float vIsPerspective;\n\t#else\n\t\tuniform float logDepthBufFC;\n\t#endif\n#endif",logdepthbuf_vertex:"#ifdef USE_LOGDEPTHBUF\n\t#ifdef USE_LOGDEPTHBUF_EXT\n\t\tvFragDepth = 1.0 + gl_Position.w;\n\t\tvIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) );\n\t#else\n\t\tif ( isPerspectiveMatrix( projectionMatrix ) ) {\n\t\t\tgl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0;\n\t\t\tgl_Position.z *= gl_Position.w;\n\t\t}\n\t#endif\n#endif",map_fragment:"#ifdef USE_MAP\n\tvec4 sampledDiffuseColor = texture2D( map, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\tsampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w );\n\t#endif\n\tdiffuseColor *= sampledDiffuseColor;\n#endif",map_pars_fragment:"#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif",map_particle_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n#endif\n#ifdef USE_MAP\n\tdiffuseColor *= texture2D( map, uv );\n#endif\n#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, uv ).g;\n#endif",map_particle_pars_fragment:"#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\tuniform mat3 uvTransform;\n#endif\n#ifdef USE_MAP\n\tuniform sampler2D map;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform sampler2D alphaMap;\n#endif",metalnessmap_fragment:"float metalnessFactor = metalness;\n#ifdef USE_METALNESSMAP\n\tvec4 texelMetalness = texture2D( metalnessMap, vUv );\n\tmetalnessFactor *= texelMetalness.b;\n#endif",metalnessmap_pars_fragment:"#ifdef USE_METALNESSMAP\n\tuniform sampler2D metalnessMap;\n#endif",morphcolor_vertex:"#if defined( USE_MORPHCOLORS ) && defined( MORPHTARGETS_TEXTURE )\n\tvColor *= morphTargetBaseInfluence;\n\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t#if defined( USE_COLOR_ALPHA )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ];\n\t\t#elif defined( USE_COLOR )\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ];\n\t\t#endif\n\t}\n#endif",morphnormal_vertex:"#ifdef USE_MORPHNORMALS\n\tobjectNormal *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\tobjectNormal += morphNormal0 * morphTargetInfluences[ 0 ];\n\t\tobjectNormal += morphNormal1 * morphTargetInfluences[ 1 ];\n\t\tobjectNormal += morphNormal2 * morphTargetInfluences[ 2 ];\n\t\tobjectNormal += morphNormal3 * morphTargetInfluences[ 3 ];\n\t#endif\n#endif",morphtarget_pars_vertex:"#ifdef USE_MORPHTARGETS\n\tuniform float morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tuniform float morphTargetInfluences[ MORPHTARGETS_COUNT ];\n\t\tuniform sampler2DArray morphTargetsTexture;\n\t\tuniform ivec2 morphTargetsTextureSize;\n\t\tvec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) {\n\t\t\tint texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset;\n\t\t\tint y = texelIndex / morphTargetsTextureSize.x;\n\t\t\tint x = texelIndex - y * morphTargetsTextureSize.x;\n\t\t\tivec3 morphUV = ivec3( x, y, morphTargetIndex );\n\t\t\treturn texelFetch( morphTargetsTexture, morphUV, 0 );\n\t\t}\n\t#else\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\tuniform float morphTargetInfluences[ 8 ];\n\t\t#else\n\t\t\tuniform float morphTargetInfluences[ 4 ];\n\t\t#endif\n\t#endif\n#endif",morphtarget_vertex:"#ifdef USE_MORPHTARGETS\n\ttransformed *= morphTargetBaseInfluence;\n\t#ifdef MORPHTARGETS_TEXTURE\n\t\tfor ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) {\n\t\t\tif ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ];\n\t\t}\n\t#else\n\t\ttransformed += morphTarget0 * morphTargetInfluences[ 0 ];\n\t\ttransformed += morphTarget1 * morphTargetInfluences[ 1 ];\n\t\ttransformed += morphTarget2 * morphTargetInfluences[ 2 ];\n\t\ttransformed += morphTarget3 * morphTargetInfluences[ 3 ];\n\t\t#ifndef USE_MORPHNORMALS\n\t\t\ttransformed += morphTarget4 * morphTargetInfluences[ 4 ];\n\t\t\ttransformed += morphTarget5 * morphTargetInfluences[ 5 ];\n\t\t\ttransformed += morphTarget6 * morphTargetInfluences[ 6 ];\n\t\t\ttransformed += morphTarget7 * morphTargetInfluences[ 7 ];\n\t\t#endif\n\t#endif\n#endif",normal_fragment_begin:"float faceDirection = gl_FrontFacing ? 1.0 : - 1.0;\n#ifdef FLAT_SHADED\n\tvec3 fdx = dFdx( vViewPosition );\n\tvec3 fdy = dFdy( vViewPosition );\n\tvec3 normal = normalize( cross( fdx, fdy ) );\n#else\n\tvec3 normal = normalize( vNormal );\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\t#ifdef USE_TANGENT\n\t\tvec3 tangent = normalize( vTangent );\n\t\tvec3 bitangent = normalize( vBitangent );\n\t\t#ifdef DOUBLE_SIDED\n\t\t\ttangent = tangent * faceDirection;\n\t\t\tbitangent = bitangent * faceDirection;\n\t\t#endif\n\t\t#if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tmat3 vTBN = mat3( tangent, bitangent, normal );\n\t\t#endif\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef OBJECTSPACE_NORMALMAP\n\tnormal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\t#ifdef FLIP_SIDED\n\t\tnormal = - normal;\n\t#endif\n\t#ifdef DOUBLE_SIDED\n\t\tnormal = normal * faceDirection;\n\t#endif\n\tnormal = normalize( normalMatrix * normal );\n#elif defined( TANGENTSPACE_NORMALMAP )\n\tvec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\t#ifdef USE_TANGENT\n\t\tnormal = normalize( vTBN * mapN );\n\t#else\n\t\tnormal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection );\n\t#endif\n#elif defined( USE_BUMPMAP )\n\tnormal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection );\n#endif",normal_pars_fragment:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_pars_vertex:"#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n\t#ifdef USE_TANGENT\n\t\tvarying vec3 vTangent;\n\t\tvarying vec3 vBitangent;\n\t#endif\n#endif",normal_vertex:"#ifndef FLAT_SHADED\n\tvNormal = normalize( transformedNormal );\n\t#ifdef USE_TANGENT\n\t\tvTangent = normalize( transformedTangent );\n\t\tvBitangent = normalize( cross( vNormal, vTangent ) * tangent.w );\n\t#endif\n#endif",normalmap_pars_fragment:"#ifdef USE_NORMALMAP\n\tuniform sampler2D normalMap;\n\tuniform vec2 normalScale;\n#endif\n#ifdef OBJECTSPACE_NORMALMAP\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) )\n\tvec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( vUv.st );\n\t\tvec2 st1 = dFdy( vUv.st );\n\t\tvec3 N = surf_norm;\n\t\tvec3 q1perp = cross( q1, N );\n\t\tvec3 q0perp = cross( N, q0 );\n\t\tvec3 T = q1perp * st0.x + q0perp * st1.x;\n\t\tvec3 B = q1perp * st0.y + q0perp * st1.y;\n\t\tfloat det = max( dot( T, T ), dot( B, B ) );\n\t\tfloat scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det );\n\t\treturn normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z );\n\t}\n#endif",clearcoat_normal_fragment_begin:"#ifdef USE_CLEARCOAT\n\tvec3 clearcoatNormal = geometryNormal;\n#endif",clearcoat_normal_fragment_maps:"#ifdef USE_CLEARCOAT_NORMALMAP\n\tvec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\t#ifdef USE_TANGENT\n\t\tclearcoatNormal = normalize( vTBN * clearcoatMapN );\n\t#else\n\t\tclearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection );\n\t#endif\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif",iridescence_pars_fragment:"#ifdef USE_IRIDESCENCEMAP\n\tuniform sampler2D iridescenceMap;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform sampler2D iridescenceThicknessMap;\n#endif",output_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha + 0.1;\n#endif\ngl_FragColor = vec4( outgoingLight, diffuseColor.a );",packing:"vec3 packNormalToRGB( const in vec3 normal ) {\n\treturn normalize( normal ) * 0.5 + 0.5;\n}\nvec3 unpackRGBToNormal( const in vec3 rgb ) {\n\treturn 2.0 * rgb.xyz - 1.0;\n}\nconst float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;\nconst vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. );\nconst vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. );\nconst float ShiftRight8 = 1. / 256.;\nvec4 packDepthToRGBA( const in float v ) {\n\tvec4 r = vec4( fract( v * PackFactors ), v );\n\tr.yzw -= r.xyz * ShiftRight8;\treturn r * PackUpscale;\n}\nfloat unpackRGBAToDepth( const in vec4 v ) {\n\treturn dot( v, UnpackFactors );\n}\nvec2 packDepthToRG( in highp float v ) {\n\treturn packDepthToRGBA( v ).yx;\n}\nfloat unpackRGToDepth( const in highp vec2 v ) {\n\treturn unpackRGBAToDepth( vec4( v.xy, 0.0, 0.0 ) );\n}\nvec4 pack2HalfToRGBA( vec2 v ) {\n\tvec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) );\n\treturn vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w );\n}\nvec2 unpackRGBATo2Half( vec4 v ) {\n\treturn vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) );\n}\nfloat viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( viewZ + near ) / ( near - far );\n}\nfloat orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) {\n\treturn linearClipZ * ( near - far ) - near;\n}\nfloat viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) {\n\treturn ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ );\n}\nfloat perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * invClipZ - far );\n}",premultiplied_alpha_fragment:"#ifdef PREMULTIPLIED_ALPHA\n\tgl_FragColor.rgb *= gl_FragColor.a;\n#endif",project_vertex:"vec4 mvPosition = vec4( transformed, 1.0 );\n#ifdef USE_INSTANCING\n\tmvPosition = instanceMatrix * mvPosition;\n#endif\nmvPosition = modelViewMatrix * mvPosition;\ngl_Position = projectionMatrix * mvPosition;",dithering_fragment:"#ifdef DITHERING\n\tgl_FragColor.rgb = dithering( gl_FragColor.rgb );\n#endif",dithering_pars_fragment:"#ifdef DITHERING\n\tvec3 dithering( vec3 color ) {\n\t\tfloat grid_position = rand( gl_FragCoord.xy );\n\t\tvec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 );\n\t\tdither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position );\n\t\treturn color + dither_shift_RGB;\n\t}\n#endif",roughnessmap_fragment:"float roughnessFactor = roughness;\n#ifdef USE_ROUGHNESSMAP\n\tvec4 texelRoughness = texture2D( roughnessMap, vUv );\n\troughnessFactor *= texelRoughness.g;\n#endif",roughnessmap_pars_fragment:"#ifdef USE_ROUGHNESSMAP\n\tuniform sampler2D roughnessMap;\n#endif",shadowmap_pars_fragment:"#if NUM_SPOT_LIGHT_COORDS > 0\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ];\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n\tfloat texture2DCompare( sampler2D depths, vec2 uv, float compare ) {\n\t\treturn step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) );\n\t}\n\tvec2 texture2DDistribution( sampler2D shadow, vec2 uv ) {\n\t\treturn unpackRGBATo2Half( texture2D( shadow, uv ) );\n\t}\n\tfloat VSMShadow (sampler2D shadow, vec2 uv, float compare ){\n\t\tfloat occlusion = 1.0;\n\t\tvec2 distribution = texture2DDistribution( shadow, uv );\n\t\tfloat hard_shadow = step( compare , distribution.x );\n\t\tif (hard_shadow != 1.0 ) {\n\t\t\tfloat distance = compare - distribution.x ;\n\t\t\tfloat variance = max( 0.00000, distribution.y * distribution.y );\n\t\t\tfloat softness_probability = variance / (variance + distance * distance );\t\t\tsoftness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 );\t\t\tocclusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 );\n\t\t}\n\t\treturn occlusion;\n\t}\n\tfloat getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) {\n\t\tfloat shadow = 1.0;\n\t\tshadowCoord.xyz /= shadowCoord.w;\n\t\tshadowCoord.z += shadowBias;\n\t\tbool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0;\n\t\tbool frustumTest = inFrustum && shadowCoord.z <= 1.0;\n\t\tif ( frustumTest ) {\n\t\t#if defined( SHADOWMAP_TYPE_PCF )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx0 = - texelSize.x * shadowRadius;\n\t\t\tfloat dy0 = - texelSize.y * shadowRadius;\n\t\t\tfloat dx1 = + texelSize.x * shadowRadius;\n\t\t\tfloat dy1 = + texelSize.y * shadowRadius;\n\t\t\tfloat dx2 = dx0 / 2.0;\n\t\t\tfloat dy2 = dy0 / 2.0;\n\t\t\tfloat dx3 = dx1 / 2.0;\n\t\t\tfloat dy3 = dy1 / 2.0;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z )\n\t\t\t) * ( 1.0 / 17.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_PCF_SOFT )\n\t\t\tvec2 texelSize = vec2( 1.0 ) / shadowMapSize;\n\t\t\tfloat dx = texelSize.x;\n\t\t\tfloat dy = texelSize.y;\n\t\t\tvec2 uv = shadowCoord.xy;\n\t\t\tvec2 f = fract( uv * shadowMapSize + 0.5 );\n\t\t\tuv -= f * texelSize;\n\t\t\tshadow = (\n\t\t\t\ttexture2DCompare( shadowMap, uv, shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) +\n\t\t\t\ttexture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ),\n\t\t\t\t\t f.x ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t f.y ) +\n\t\t\t\tmix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ),\n\t\t\t\t\t\t f.x ),\n\t\t\t\t\t f.y )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#elif defined( SHADOWMAP_TYPE_VSM )\n\t\t\tshadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#else\n\t\t\tshadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z );\n\t\t#endif\n\t\t}\n\t\treturn shadow;\n\t}\n\tvec2 cubeToUV( vec3 v, float texelSizeY ) {\n\t\tvec3 absV = abs( v );\n\t\tfloat scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) );\n\t\tabsV *= scaleToCube;\n\t\tv *= scaleToCube * ( 1.0 - 2.0 * texelSizeY );\n\t\tvec2 planar = v.xy;\n\t\tfloat almostATexel = 1.5 * texelSizeY;\n\t\tfloat almostOne = 1.0 - almostATexel;\n\t\tif ( absV.z >= almostOne ) {\n\t\t\tif ( v.z > 0.0 )\n\t\t\t\tplanar.x = 4.0 - v.x;\n\t\t} else if ( absV.x >= almostOne ) {\n\t\t\tfloat signX = sign( v.x );\n\t\t\tplanar.x = v.z * signX + 2.0 * signX;\n\t\t} else if ( absV.y >= almostOne ) {\n\t\t\tfloat signY = sign( v.y );\n\t\t\tplanar.x = v.x + 2.0 * signY + 2.0;\n\t\t\tplanar.y = v.z * signY - 2.0;\n\t\t}\n\t\treturn vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 );\n\t}\n\tfloat getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) {\n\t\tvec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) );\n\t\tvec3 lightToPosition = shadowCoord.xyz;\n\t\tfloat dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear );\t\tdp += shadowBias;\n\t\tvec3 bd3D = normalize( lightToPosition );\n\t\t#if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM )\n\t\t\tvec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y;\n\t\t\treturn (\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) +\n\t\t\t\ttexture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp )\n\t\t\t) * ( 1.0 / 9.0 );\n\t\t#else\n\t\t\treturn texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp );\n\t\t#endif\n\t}\n#endif",shadowmap_pars_vertex:"#if NUM_SPOT_LIGHT_COORDS > 0\n uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\tuniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tvarying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ];\n\t\tstruct DirectionalLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\t\tstruct SpotLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t};\n\t\tuniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ];\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\tuniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tvarying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ];\n\t\tstruct PointLightShadow {\n\t\t\tfloat shadowBias;\n\t\t\tfloat shadowNormalBias;\n\t\t\tfloat shadowRadius;\n\t\t\tvec2 shadowMapSize;\n\t\t\tfloat shadowCameraNear;\n\t\t\tfloat shadowCameraFar;\n\t\t};\n\t\tuniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ];\n\t#endif\n#endif",shadowmap_vertex:"#if defined( USE_SHADOWMAP ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_COORDS > 0 || NUM_POINT_LIGHT_SHADOWS > 0\n\t\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\t\tvec4 shadowWorldPosition;\n\t#endif\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_COORDS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition;\n\t\t#if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS )\n\t\t\tshadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias;\n\t\t#endif\n\t\tvSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n#endif",shadowmask_pars_fragment:"float getShadowMask() {\n\tfloat shadow = 1.0;\n\t#ifdef USE_SHADOWMAP\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\tDirectionalLightShadow directionalLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\tdirectionalLight = directionalLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_SPOT_LIGHT_SHADOWS > 0\n\tSpotLightShadow spotLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) {\n\t\tspotLight = spotLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\tPointLightShadow pointLight;\n\t#pragma unroll_loop_start\n\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\tpointLight = pointLightShadows[ i ];\n\t\tshadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0;\n\t}\n\t#pragma unroll_loop_end\n\t#endif\n\t#endif\n\treturn shadow;\n}",skinbase_vertex:"#ifdef USE_SKINNING\n\tmat4 boneMatX = getBoneMatrix( skinIndex.x );\n\tmat4 boneMatY = getBoneMatrix( skinIndex.y );\n\tmat4 boneMatZ = getBoneMatrix( skinIndex.z );\n\tmat4 boneMatW = getBoneMatrix( skinIndex.w );\n#endif",skinning_pars_vertex:"#ifdef USE_SKINNING\n\tuniform mat4 bindMatrix;\n\tuniform mat4 bindMatrixInverse;\n\tuniform highp sampler2D boneTexture;\n\tuniform int boneTextureSize;\n\tmat4 getBoneMatrix( const in float i ) {\n\t\tfloat j = i * 4.0;\n\t\tfloat x = mod( j, float( boneTextureSize ) );\n\t\tfloat y = floor( j / float( boneTextureSize ) );\n\t\tfloat dx = 1.0 / float( boneTextureSize );\n\t\tfloat dy = 1.0 / float( boneTextureSize );\n\t\ty = dy * ( y + 0.5 );\n\t\tvec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) );\n\t\tvec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) );\n\t\tvec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) );\n\t\tvec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) );\n\t\tmat4 bone = mat4( v1, v2, v3, v4 );\n\t\treturn bone;\n\t}\n#endif",skinning_vertex:"#ifdef USE_SKINNING\n\tvec4 skinVertex = bindMatrix * vec4( transformed, 1.0 );\n\tvec4 skinned = vec4( 0.0 );\n\tskinned += boneMatX * skinVertex * skinWeight.x;\n\tskinned += boneMatY * skinVertex * skinWeight.y;\n\tskinned += boneMatZ * skinVertex * skinWeight.z;\n\tskinned += boneMatW * skinVertex * skinWeight.w;\n\ttransformed = ( bindMatrixInverse * skinned ).xyz;\n#endif",skinnormal_vertex:"#ifdef USE_SKINNING\n\tmat4 skinMatrix = mat4( 0.0 );\n\tskinMatrix += skinWeight.x * boneMatX;\n\tskinMatrix += skinWeight.y * boneMatY;\n\tskinMatrix += skinWeight.z * boneMatZ;\n\tskinMatrix += skinWeight.w * boneMatW;\n\tskinMatrix = bindMatrixInverse * skinMatrix * bindMatrix;\n\tobjectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz;\n\t#ifdef USE_TANGENT\n\t\tobjectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz;\n\t#endif\n#endif",specularmap_fragment:"float specularStrength;\n#ifdef USE_SPECULARMAP\n\tvec4 texelSpecular = texture2D( specularMap, vUv );\n\tspecularStrength = texelSpecular.r;\n#else\n\tspecularStrength = 1.0;\n#endif",specularmap_pars_fragment:"#ifdef USE_SPECULARMAP\n\tuniform sampler2D specularMap;\n#endif",tonemapping_fragment:"#if defined( TONE_MAPPING )\n\tgl_FragColor.rgb = toneMapping( gl_FragColor.rgb );\n#endif",tonemapping_pars_fragment:"#ifndef saturate\n#define saturate( a ) clamp( a, 0.0, 1.0 )\n#endif\nuniform float toneMappingExposure;\nvec3 LinearToneMapping( vec3 color ) {\n\treturn toneMappingExposure * color;\n}\nvec3 ReinhardToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\treturn saturate( color / ( vec3( 1.0 ) + color ) );\n}\nvec3 OptimizedCineonToneMapping( vec3 color ) {\n\tcolor *= toneMappingExposure;\n\tcolor = max( vec3( 0.0 ), color - 0.004 );\n\treturn pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) );\n}\nvec3 RRTAndODTFit( vec3 v ) {\n\tvec3 a = v * ( v + 0.0245786 ) - 0.000090537;\n\tvec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081;\n\treturn a / b;\n}\nvec3 ACESFilmicToneMapping( vec3 color ) {\n\tconst mat3 ACESInputMat = mat3(\n\t\tvec3( 0.59719, 0.07600, 0.02840 ),\t\tvec3( 0.35458, 0.90834, 0.13383 ),\n\t\tvec3( 0.04823, 0.01566, 0.83777 )\n\t);\n\tconst mat3 ACESOutputMat = mat3(\n\t\tvec3( 1.60475, -0.10208, -0.00327 ),\t\tvec3( -0.53108, 1.10813, -0.07276 ),\n\t\tvec3( -0.07367, -0.00605, 1.07602 )\n\t);\n\tcolor *= toneMappingExposure / 0.6;\n\tcolor = ACESInputMat * color;\n\tcolor = RRTAndODTFit( color );\n\tcolor = ACESOutputMat * color;\n\treturn saturate( color );\n}\nvec3 CustomToneMapping( vec3 color ) { return color; }",transmission_fragment:"#ifdef USE_TRANSMISSION\n\tmaterial.transmission = transmission;\n\tmaterial.transmissionAlpha = 1.0;\n\tmaterial.thickness = thickness;\n\tmaterial.attenuationDistance = attenuationDistance;\n\tmaterial.attenuationColor = attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tmaterial.transmission *= texture2D( transmissionMap, vUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmission = getIBLVolumeRefraction(\n\t\tn, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90,\n\t\tpos, modelMatrix, viewMatrix, projectionMatrix, material.ior, material.thickness,\n\t\tmaterial.attenuationColor, material.attenuationDistance );\n\tmaterial.transmissionAlpha = mix( material.transmissionAlpha, transmission.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmission.rgb, material.transmission );\n#endif",transmission_pars_fragment:"#ifdef USE_TRANSMISSION\n\tuniform float transmission;\n\tuniform float thickness;\n\tuniform float attenuationDistance;\n\tuniform vec3 attenuationColor;\n\t#ifdef USE_TRANSMISSIONMAP\n\t\tuniform sampler2D transmissionMap;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tuniform sampler2D thicknessMap;\n\t#endif\n\tuniform vec2 transmissionSamplerSize;\n\tuniform sampler2D transmissionSamplerMap;\n\tuniform mat4 modelMatrix;\n\tuniform mat4 projectionMatrix;\n\tvarying vec3 vWorldPosition;\n\tvec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) {\n\t\tvec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior );\n\t\tvec3 modelScale;\n\t\tmodelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) );\n\t\tmodelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) );\n\t\tmodelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) );\n\t\treturn normalize( refractionVector ) * thickness * modelScale;\n\t}\n\tfloat applyIorToRoughness( const in float roughness, const in float ior ) {\n\t\treturn roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 );\n\t}\n\tvec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) {\n\t\tfloat framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\t#ifdef texture2DLodEXT\n\t\t\treturn texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#else\n\t\t\treturn texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod );\n\t\t#endif\n\t}\n\tvec3 applyVolumeAttenuation( const in vec3 radiance, const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn radiance;\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance * radiance;\n\t\t}\n\t}\n\tvec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor,\n\t\tconst in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix,\n\t\tconst in mat4 viewMatrix, const in mat4 projMatrix, const in float ior, const in float thickness,\n\t\tconst in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tvec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix );\n\t\tvec3 refractedRayExit = position + transmissionRay;\n\t\tvec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 );\n\t\tvec2 refractionCoords = ndcPos.xy / ndcPos.w;\n\t\trefractionCoords += 1.0;\n\t\trefractionCoords /= 2.0;\n\t\tvec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior );\n\t\tvec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a );\n\t}\n#endif",uv_pars_fragment:"#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) )\n\tvarying vec2 vUv;\n#endif",uv_pars_vertex:"#ifdef USE_UV\n\t#ifdef UVS_VERTEX_ONLY\n\t\tvec2 vUv;\n\t#else\n\t\tvarying vec2 vUv;\n\t#endif\n\tuniform mat3 uvTransform;\n#endif",uv_vertex:"#ifdef USE_UV\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n#endif",uv2_pars_fragment:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvarying vec2 vUv2;\n#endif",uv2_pars_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tattribute vec2 uv2;\n\tvarying vec2 vUv2;\n\tuniform mat3 uv2Transform;\n#endif",uv2_vertex:"#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP )\n\tvUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy;\n#endif",worldpos_vertex:"#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0\n\tvec4 worldPosition = vec4( transformed, 1.0 );\n\t#ifdef USE_INSTANCING\n\t\tworldPosition = instanceMatrix * worldPosition;\n\t#endif\n\tworldPosition = modelMatrix * worldPosition;\n#endif",background_vert:"varying vec2 vUv;\nuniform mat3 uvTransform;\nvoid main() {\n\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\tgl_Position = vec4( position.xy, 1.0, 1.0 );\n}",background_frag:"uniform sampler2D t2D;\nuniform float backgroundIntensity;\nvarying vec2 vUv;\nvoid main() {\n\tvec4 texColor = texture2D( t2D, vUv );\n\t#ifdef DECODE_VIDEO_TEXTURE\n\t\ttexColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",backgroundCube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",backgroundCube_frag:"#ifdef ENVMAP_TYPE_CUBE\n\tuniform samplerCube envMap;\n#elif defined( ENVMAP_TYPE_CUBE_UV )\n\tuniform sampler2D envMap;\n#endif\nuniform float flipEnvMap;\nuniform float backgroundBlurriness;\nuniform float backgroundIntensity;\nvarying vec3 vWorldDirection;\n#include <cube_uv_reflection_fragment>\nvoid main() {\n\t#ifdef ENVMAP_TYPE_CUBE\n\t\tvec4 texColor = textureCube( envMap, vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) );\n\t#elif defined( ENVMAP_TYPE_CUBE_UV )\n\t\tvec4 texColor = textureCubeUV( envMap, vWorldDirection, backgroundBlurriness );\n\t#else\n\t\tvec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t#endif\n\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",cube_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n\tgl_Position.z = gl_Position.w;\n}",cube_frag:"uniform samplerCube tCube;\nuniform float tFlip;\nuniform float opacity;\nvarying vec3 vWorldDirection;\nvoid main() {\n\tvec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) );\n\tgl_FragColor = texColor;\n\tgl_FragColor.a *= opacity;\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",depth_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvHighPrecisionZW = gl_Position.zw;\n}",depth_frag:"#if DEPTH_PACKING == 3200\n\tuniform float opacity;\n#endif\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvarying vec2 vHighPrecisionZW;\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#if DEPTH_PACKING == 3200\n\t\tdiffuseColor.a = opacity;\n\t#endif\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <logdepthbuf_fragment>\n\tfloat fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5;\n\t#if DEPTH_PACKING == 3200\n\t\tgl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity );\n\t#elif DEPTH_PACKING == 3201\n\t\tgl_FragColor = packDepthToRGBA( fragCoordZ );\n\t#endif\n}",distanceRGBA_vert:"#define DISTANCE\nvarying vec3 vWorldPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <skinbase_vertex>\n\t#ifdef USE_DISPLACEMENTMAP\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <clipping_planes_vertex>\n\tvWorldPosition = worldPosition.xyz;\n}",distanceRGBA_frag:"#define DISTANCE\nuniform vec3 referencePosition;\nuniform float nearDistance;\nuniform float farDistance;\nvarying vec3 vWorldPosition;\n#include <common>\n#include <packing>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main () {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( 1.0 );\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\tfloat dist = length( vWorldPosition - referencePosition );\n\tdist = ( dist - nearDistance ) / ( farDistance - nearDistance );\n\tdist = saturate( dist );\n\tgl_FragColor = packDepthToRGBA( dist );\n}",equirect_vert:"varying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvWorldDirection = transformDirection( position, modelMatrix );\n\t#include <begin_vertex>\n\t#include <project_vertex>\n}",equirect_frag:"uniform sampler2D tEquirect;\nvarying vec3 vWorldDirection;\n#include <common>\nvoid main() {\n\tvec3 direction = normalize( vWorldDirection );\n\tvec2 sampleUV = equirectUv( direction );\n\tgl_FragColor = texture2D( tEquirect, sampleUV );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\tvLineDistance = scale * lineDistance;\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",linedashed_frag:"uniform vec3 diffuse;\nuniform float opacity;\nuniform float dashSize;\nuniform float totalSize;\nvarying float vLineDistance;\n#include <common>\n#include <color_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tif ( mod( vLineDistance, totalSize ) > dashSize ) {\n\t\tdiscard;\n\t}\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#if defined ( USE_ENVMAP ) || defined ( USE_SKINNING )\n\t\t#include <beginnormal_vertex>\n\t\t#include <morphnormal_vertex>\n\t\t#include <skinbase_vertex>\n\t\t#include <skinnormal_vertex>\n\t\t#include <defaultnormal_vertex>\n\t#endif\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <fog_vertex>\n}",meshbasic_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#ifndef FLAT_SHADED\n\tvarying vec3 vNormal;\n#endif\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\t#ifdef USE_LIGHTMAP\n\t\tvec4 lightMapTexel = texture2D( lightMap, vUv2 );\n\t\treflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI;\n\t#else\n\t\treflectedLight.indirectDiffuse += vec3( 1.0 );\n\t#endif\n\t#include <aomap_fragment>\n\treflectedLight.indirectDiffuse *= diffuseColor.rgb;\n\tvec3 outgoingLight = reflectedLight.indirectDiffuse;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshlambert_vert:"#define LAMBERT\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshlambert_frag:"#define LAMBERT\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_lambert_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_lambert_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshmatcap_vert:"#define MATCAP\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <color_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n\tvViewPosition = - mvPosition.xyz;\n}",meshmatcap_frag:"#define MATCAP\nuniform vec3 diffuse;\nuniform float opacity;\nuniform sampler2D matcap;\nvarying vec3 vViewPosition;\n#include <common>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tvec3 viewDir = normalize( vViewPosition );\n\tvec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) );\n\tvec3 y = cross( viewDir, x );\n\tvec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5;\n\t#ifdef USE_MATCAP\n\t\tvec4 matcapColor = texture2D( matcap, uv );\n\t#else\n\t\tvec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 );\n\t#endif\n\tvec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshnormal_vert:"#define NORMAL\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP )\n\tvarying vec3 vViewPosition;\n#endif\n#include <packing>\n#include <uv_pars_fragment>\n#include <normal_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\t#include <logdepthbuf_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\tgl_FragColor = vec4( packNormalToRGB( normal ), opacity );\n\t#ifdef OPAQUE\n\t\tgl_FragColor.a = 1.0;\n\t#endif\n}",meshphong_vert:"#define PHONG\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <envmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <envmap_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshphong_frag:"#define PHONG\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform vec3 specular;\nuniform float shininess;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_phong_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <specularmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <specularmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_phong_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance;\n\t#include <envmap_fragment>\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshphysical_vert:"#define STANDARD\nvarying vec3 vViewPosition;\n#ifdef USE_TRANSMISSION\n\tvarying vec3 vWorldPosition;\n#endif\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n#ifdef USE_TRANSMISSION\n\tvWorldPosition = worldPosition.xyz;\n#endif\n}",meshphysical_frag:"#define STANDARD\n#ifdef PHYSICAL\n\t#define IOR\n\t#define SPECULAR\n#endif\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float roughness;\nuniform float metalness;\nuniform float opacity;\n#ifdef IOR\n\tuniform float ior;\n#endif\n#ifdef SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULARINTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\n\t#endif\n\t#ifdef USE_SPECULARCOLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT\n\tuniform float clearcoat;\n\tuniform float clearcoatRoughness;\n#endif\n#ifdef USE_IRIDESCENCE\n\tuniform float iridescence;\n\tuniform float iridescenceIOR;\n\tuniform float iridescenceThicknessMinimum;\n\tuniform float iridescenceThicknessMaximum;\n#endif\n#ifdef USE_SHEEN\n\tuniform vec3 sheenColor;\n\tuniform float sheenRoughness;\n\t#ifdef USE_SHEENCOLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEENROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\nvarying vec3 vViewPosition;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <bsdfs>\n#include <iridescence_fragment>\n#include <cube_uv_reflection_fragment>\n#include <envmap_common_pars_fragment>\n#include <envmap_physical_pars_fragment>\n#include <fog_pars_fragment>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_physical_pars_fragment>\n#include <transmission_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <clearcoat_pars_fragment>\n#include <iridescence_pars_fragment>\n#include <roughnessmap_pars_fragment>\n#include <metalnessmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <roughnessmap_fragment>\n\t#include <metalnessmap_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <clearcoat_normal_fragment_begin>\n\t#include <clearcoat_normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_physical_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse;\n\tvec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular;\n\t#include <transmission_fragment>\n\tvec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance;\n\t#ifdef USE_SHEEN\n\t\tfloat sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor );\n\t\toutgoingLight = outgoingLight * sheenEnergyComp + sheenSpecular;\n\t#endif\n\t#ifdef USE_CLEARCOAT\n\t\tfloat dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) );\n\t\tvec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc );\n\t\toutgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + clearcoatSpecular * material.clearcoat;\n\t#endif\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",meshtoon_vert:"#define TOON\nvarying vec3 vViewPosition;\n#include <common>\n#include <uv_pars_vertex>\n#include <uv2_pars_vertex>\n#include <displacementmap_pars_vertex>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <normal_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\t#include <uv2_vertex>\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <normal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <displacementmap_vertex>\n\t#include <project_vertex>\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\tvViewPosition = - mvPosition.xyz;\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",meshtoon_frag:"#define TOON\nuniform vec3 diffuse;\nuniform vec3 emissive;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <dithering_pars_fragment>\n#include <color_pars_fragment>\n#include <uv_pars_fragment>\n#include <uv2_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\n#include <gradientmap_pars_fragment>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <normal_pars_fragment>\n#include <lights_toon_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <bumpmap_pars_fragment>\n#include <normalmap_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\tReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) );\n\tvec3 totalEmissiveRadiance = emissive;\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <color_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\t#include <normal_fragment_begin>\n\t#include <normal_fragment_maps>\n\t#include <emissivemap_fragment>\n\t#include <lights_toon_fragment>\n\t#include <lights_fragment_begin>\n\t#include <lights_fragment_maps>\n\t#include <lights_fragment_end>\n\t#include <aomap_fragment>\n\tvec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n\t#include <dithering_fragment>\n}",points_vert:"uniform float size;\nuniform float scale;\n#include <common>\n#include <color_pars_vertex>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <color_vertex>\n\t#include <morphcolor_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <project_vertex>\n\tgl_PointSize = size;\n\t#ifdef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z );\n\t#endif\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <worldpos_vertex>\n\t#include <fog_vertex>\n}",points_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <color_pars_fragment>\n#include <map_particle_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_particle_fragment>\n\t#include <color_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",shadow_vert:"#include <common>\n#include <fog_pars_vertex>\n#include <morphtarget_pars_vertex>\n#include <skinning_pars_vertex>\n#include <shadowmap_pars_vertex>\nvoid main() {\n\t#include <beginnormal_vertex>\n\t#include <morphnormal_vertex>\n\t#include <skinbase_vertex>\n\t#include <skinnormal_vertex>\n\t#include <defaultnormal_vertex>\n\t#include <begin_vertex>\n\t#include <morphtarget_vertex>\n\t#include <skinning_vertex>\n\t#include <project_vertex>\n\t#include <worldpos_vertex>\n\t#include <shadowmap_vertex>\n\t#include <fog_vertex>\n}",shadow_frag:"uniform vec3 color;\nuniform float opacity;\n#include <common>\n#include <packing>\n#include <fog_pars_fragment>\n#include <bsdfs>\n#include <lights_pars_begin>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}",sprite_vert:"uniform float rotation;\nuniform vec2 center;\n#include <common>\n#include <uv_pars_vertex>\n#include <fog_pars_vertex>\n#include <logdepthbuf_pars_vertex>\n#include <clipping_planes_pars_vertex>\nvoid main() {\n\t#include <uv_vertex>\n\tvec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n\tvec2 scale;\n\tscale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n\tscale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\t#ifndef USE_SIZEATTENUATION\n\t\tbool isPerspective = isPerspectiveMatrix( projectionMatrix );\n\t\tif ( isPerspective ) scale *= - mvPosition.z;\n\t#endif\n\tvec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale;\n\tvec2 rotatedPosition;\n\trotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n\trotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n\tmvPosition.xy += rotatedPosition;\n\tgl_Position = projectionMatrix * mvPosition;\n\t#include <logdepthbuf_vertex>\n\t#include <clipping_planes_vertex>\n\t#include <fog_vertex>\n}",sprite_frag:"uniform vec3 diffuse;\nuniform float opacity;\n#include <common>\n#include <uv_pars_fragment>\n#include <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <fog_pars_fragment>\n#include <logdepthbuf_pars_fragment>\n#include <clipping_planes_pars_fragment>\nvoid main() {\n\t#include <clipping_planes_fragment>\n\tvec3 outgoingLight = vec3( 0.0 );\n\tvec4 diffuseColor = vec4( diffuse, opacity );\n\t#include <logdepthbuf_fragment>\n\t#include <map_fragment>\n\t#include <alphamap_fragment>\n\t#include <alphatest_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <output_fragment>\n\t#include <tonemapping_fragment>\n\t#include <encodings_fragment>\n\t#include <fog_fragment>\n}"},Ba={common:{diffuse:{value:new Xn(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Rn},uv2Transform:{value:new Rn},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new Pn(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Xn(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Xn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Rn}},sprite:{diffuse:{value:new Xn(16777215)},opacity:{value:1},center:{value:new Pn(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Rn}}},Pa={basic:{uniforms:la([Ba.common,Ba.specularmap,Ba.envmap,Ba.aomap,Ba.lightmap,Ba.fog]),vertexShader:Ta.meshbasic_vert,fragmentShader:Ta.meshbasic_frag},lambert:{uniforms:la([Ba.common,Ba.specularmap,Ba.envmap,Ba.aomap,Ba.lightmap,Ba.emissivemap,Ba.bumpmap,Ba.normalmap,Ba.displacementmap,Ba.fog,Ba.lights,{emissive:{value:new Xn(0)}}]),vertexShader:Ta.meshlambert_vert,fragmentShader:Ta.meshlambert_frag},phong:{uniforms:la([Ba.common,Ba.specularmap,Ba.envmap,Ba.aomap,Ba.lightmap,Ba.emissivemap,Ba.bumpmap,Ba.normalmap,Ba.displacementmap,Ba.fog,Ba.lights,{emissive:{value:new Xn(0)},specular:{value:new Xn(1118481)},shininess:{value:30}}]),vertexShader:Ta.meshphong_vert,fragmentShader:Ta.meshphong_frag},standard:{uniforms:la([Ba.common,Ba.envmap,Ba.aomap,Ba.lightmap,Ba.emissivemap,Ba.bumpmap,Ba.normalmap,Ba.displacementmap,Ba.roughnessmap,Ba.metalnessmap,Ba.fog,Ba.lights,{emissive:{value:new Xn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Ta.meshphysical_vert,fragmentShader:Ta.meshphysical_frag},toon:{uniforms:la([Ba.common,Ba.aomap,Ba.lightmap,Ba.emissivemap,Ba.bumpmap,Ba.normalmap,Ba.displacementmap,Ba.gradientmap,Ba.fog,Ba.lights,{emissive:{value:new Xn(0)}}]),vertexShader:Ta.meshtoon_vert,fragmentShader:Ta.meshtoon_frag},matcap:{uniforms:la([Ba.common,Ba.bumpmap,Ba.normalmap,Ba.displacementmap,Ba.fog,{matcap:{value:null}}]),vertexShader:Ta.meshmatcap_vert,fragmentShader:Ta.meshmatcap_frag},points:{uniforms:la([Ba.points,Ba.fog]),vertexShader:Ta.points_vert,fragmentShader:Ta.points_frag},dashed:{uniforms:la([Ba.common,Ba.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Ta.linedashed_vert,fragmentShader:Ta.linedashed_frag},depth:{uniforms:la([Ba.common,Ba.displacementmap]),vertexShader:Ta.depth_vert,fragmentShader:Ta.depth_frag},normal:{uniforms:la([Ba.common,Ba.bumpmap,Ba.normalmap,Ba.displacementmap,{opacity:{value:1}}]),vertexShader:Ta.meshnormal_vert,fragmentShader:Ta.meshnormal_frag},sprite:{uniforms:la([Ba.sprite,Ba.fog]),vertexShader:Ta.sprite_vert,fragmentShader:Ta.sprite_frag},background:{uniforms:{uvTransform:{value:new Rn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Ta.background_vert,fragmentShader:Ta.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Ta.backgroundCube_vert,fragmentShader:Ta.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Ta.cube_vert,fragmentShader:Ta.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Ta.equirect_vert,fragmentShader:Ta.equirect_frag},distanceRGBA:{uniforms:la([Ba.common,Ba.displacementmap,{referencePosition:{value:new lr},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Ta.distanceRGBA_vert,fragmentShader:Ta.distanceRGBA_frag},shadow:{uniforms:la([Ba.lights,Ba.fog,{color:{value:new Xn(0)},opacity:{value:1}}]),vertexShader:Ta.shadow_vert,fragmentShader:Ta.shadow_frag}};Pa.physical={uniforms:la([Pa.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new Pn(1,1)},clearcoatNormalMap:{value:null},iridescence:{value:0},iridescenceMap:{value:null},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},sheen:{value:0},sheenColor:{value:new Xn(0)},sheenColorMap:{value:null},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new Pn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Xn(0)},specularIntensity:{value:1},specularIntensityMap:{value:null},specularColor:{value:new Xn(1,1,1)},specularColorMap:{value:null}}]),vertexShader:Ta.meshphysical_vert,fragmentShader:Ta.meshphysical_frag};const Ra={r:0,b:0,g:0};function La(e,t,n,r,i,a,s){const o=new Xn(0);let l,u,c=!0===a?0:1,h=null,d=0,f=null;function g(t,n){t.getRGB(Ra,ua(e)),r.buffers.color.setClear(Ra.r,Ra.g,Ra.b,n,s)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),c=t,g(o,c)},getClearAlpha:function(){return c},setClearAlpha:function(e){c=e,g(o,c)},render:function(r,a){let s=!1,v=!0===a.isScene?a.background:null;v&&v.isTexture&&(v=(a.backgroundBlurriness>0?n:t).get(v));const y=e.xr,x=y.getSession&&y.getSession();x&&"additive"===x.environmentBlendMode&&(v=null),null===v?g(o,c):v&&v.isColor&&(g(v,1),s=!0),(e.autoClear||s)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),v&&(v.isCubeTexture||v.mapping===le)?(void 0===u&&(u=new ia(new sa(1,1,1),new ha({name:"BackgroundCubeMaterial",uniforms:oa(Pa.backgroundCube.uniforms),vertexShader:Pa.backgroundCube.vertexShader,fragmentShader:Pa.backgroundCube.fragmentShader,side:m,depthTest:!1,depthWrite:!1,fog:!1})),u.geometry.deleteAttribute("normal"),u.geometry.deleteAttribute("uv"),u.onBeforeRender=function(e,t,n){this.matrixWorld.copyPosition(n.matrixWorld)},Object.defineProperty(u.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),i.update(u)),u.material.uniforms.envMap.value=v,u.material.uniforms.flipEnvMap.value=v.isCubeTexture&&!1===v.isRenderTargetTexture?-1:1,u.material.uniforms.backgroundBlurriness.value=a.backgroundBlurriness,u.material.uniforms.backgroundIntensity.value=a.backgroundIntensity,u.material.toneMapped=v.encoding!==Lt,h===v&&d===v.version&&f===e.toneMapping||(u.material.needsUpdate=!0,h=v,d=v.version,f=e.toneMapping),u.layers.enableAll(),r.unshift(u,u.geometry,u.material,0,0,null)):v&&v.isTexture&&(void 0===l&&(l=new ia(new Ea(2,2),new ha({name:"BackgroundMaterial",uniforms:oa(Pa.background.uniforms),vertexShader:Pa.background.vertexShader,fragmentShader:Pa.background.fragmentShader,side:p,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),Object.defineProperty(l.material,"map",{get:function(){return this.uniforms.t2D.value}}),i.update(l)),l.material.uniforms.t2D.value=v,l.material.uniforms.backgroundIntensity.value=a.backgroundIntensity,l.material.toneMapped=v.encoding!==Lt,!0===v.matrixAutoUpdate&&v.updateMatrix(),l.material.uniforms.uvTransform.value.copy(v.matrix),h===v&&d===v.version&&f===e.toneMapping||(l.material.needsUpdate=!0,h=v,d=v.version,f=e.toneMapping),l.layers.enableAll(),r.unshift(l,l.geometry,l.material,0,0,null))}}}function Da(e,t,n,r){const i=e.getParameter(34921),a=r.isWebGL2?null:t.get("OES_vertex_array_object"),s=r.isWebGL2||null!==a,o={},l=f(null);let u=l,c=!1;function h(t){return r.isWebGL2?e.bindVertexArray(t):a.bindVertexArrayOES(t)}function d(t){return r.isWebGL2?e.deleteVertexArray(t):a.deleteVertexArrayOES(t)}function f(e){const t=[],n=[],r=[];for(let e=0;e<i;e++)t[e]=0,n[e]=0,r[e]=0;return{geometry:null,program:null,wireframe:!1,newAttributes:t,enabledAttributes:n,attributeDivisors:r,object:e,attributes:{},index:null}}function p(){const e=u.newAttributes;for(let t=0,n=e.length;t<n;t++)e[t]=0}function m(e){g(e,0)}function g(n,i){const a=u.newAttributes,s=u.enabledAttributes,o=u.attributeDivisors;a[n]=1,0===s[n]&&(e.enableVertexAttribArray(n),s[n]=1),o[n]!==i&&((r.isWebGL2?e:t.get("ANGLE_instanced_arrays"))[r.isWebGL2?"vertexAttribDivisor":"vertexAttribDivisorANGLE"](n,i),o[n]=i)}function v(){const t=u.newAttributes,n=u.enabledAttributes;for(let r=0,i=n.length;r<i;r++)n[r]!==t[r]&&(e.disableVertexAttribArray(r),n[r]=0)}function y(t,n,i,a,s,o){!0!==r.isWebGL2||5124!==i&&5125!==i?e.vertexAttribPointer(t,n,i,a,s,o):e.vertexAttribIPointer(t,n,i,s,o)}function x(){b(),c=!0,u!==l&&(u=l,h(u.object))}function b(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,d,x,b){let _=!1;if(s){const t=function(t,n,i){const s=!0===i.wireframe;let l=o[t.id];void 0===l&&(l={},o[t.id]=l);let u=l[n.id];void 0===u&&(u={},l[n.id]=u);let c=u[s];return void 0===c&&(c=f(r.isWebGL2?e.createVertexArray():a.createVertexArrayOES()),u[s]=c),c}(x,d,l);u!==t&&(u=t,h(u.object)),_=function(e,t,n,r){const i=u.attributes,a=t.attributes;let s=0;const o=n.getAttributes();for(const t in o)if(o[t].location>=0){const n=i[t];let r=a[t];if(void 0===r&&("instanceMatrix"===t&&e.instanceMatrix&&(r=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(r=e.instanceColor)),void 0===n)return!0;if(n.attribute!==r)return!0;if(r&&n.data!==r.data)return!0;s++}return u.attributesNum!==s||u.index!==r}(i,x,d,b),_&&function(e,t,n,r){const i={},a=t.attributes;let s=0;const o=n.getAttributes();for(const t in o)if(o[t].location>=0){let n=a[t];void 0===n&&("instanceMatrix"===t&&e.instanceMatrix&&(n=e.instanceMatrix),"instanceColor"===t&&e.instanceColor&&(n=e.instanceColor));const r={};r.attribute=n,n&&n.data&&(r.data=n.data),i[t]=r,s++}u.attributes=i,u.attributesNum=s,u.index=r}(i,x,d,b)}else{const e=!0===l.wireframe;u.geometry===x.id&&u.program===d.id&&u.wireframe===e||(u.geometry=x.id,u.program=d.id,u.wireframe=e,_=!0)}null!==b&&n.update(b,34963),(_||c)&&(c=!1,function(i,a,s,o){if(!1===r.isWebGL2&&(i.isInstancedMesh||o.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;p();const l=o.attributes,u=s.getAttributes(),c=a.defaultAttributeValues;for(const t in u){const r=u[t];if(r.location>=0){let a=l[t];if(void 0===a&&("instanceMatrix"===t&&i.instanceMatrix&&(a=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(a=i.instanceColor)),void 0!==a){const t=a.normalized,s=a.itemSize,l=n.get(a);if(void 0===l)continue;const u=l.buffer,c=l.type,h=l.bytesPerElement;if(a.isInterleavedBufferAttribute){const n=a.data,l=n.stride,d=a.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e<r.locationSize;e++)g(r.location+e,n.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e<r.locationSize;e++)m(r.location+e);e.bindBuffer(34962,u);for(let e=0;e<r.locationSize;e++)y(r.location+e,s/r.locationSize,c,t,l*h,(d+s/r.locationSize*e)*h)}else{if(a.isInstancedBufferAttribute){for(let e=0;e<r.locationSize;e++)g(r.location+e,a.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=a.meshPerAttribute*a.count)}else for(let e=0;e<r.locationSize;e++)m(r.location+e);e.bindBuffer(34962,u);for(let e=0;e<r.locationSize;e++)y(r.location+e,s/r.locationSize,c,t,s*h,s/r.locationSize*e*h)}}else if(void 0!==c){const n=c[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(r.location,n);break;case 3:e.vertexAttrib3fv(r.location,n);break;case 4:e.vertexAttrib4fv(r.location,n);break;default:e.vertexAttrib1fv(r.location,n)}}}}v()}(i,l,d,x),null!==b&&e.bindBuffer(34963,n.get(b).buffer))},reset:x,resetDefaultState:b,dispose:function(){x();for(const e in o){const t=o[e];for(const e in t){const n=t[e];for(const e in n)d(n[e].object),delete n[e];delete t[e]}delete o[e]}},releaseStatesOfGeometry:function(e){if(void 0===o[e.id])return;const t=o[e.id];for(const e in t){const n=t[e];for(const e in n)d(n[e].object),delete n[e];delete t[e]}delete o[e.id]},releaseStatesOfProgram:function(e){for(const t in o){const n=o[t];if(void 0===n[e.id])continue;const r=n[e.id];for(const e in r)d(r[e].object),delete r[e];delete n[e.id]}},initAttributes:p,enableAttribute:m,disableUnusedAttributes:v}}function Ia(e,t,n,r){const i=r.isWebGL2;let a;this.setMode=function(e){a=e},this.render=function(t,r){e.drawArrays(a,t,r),n.update(r,a,1)},this.renderInstances=function(r,s,o){if(0===o)return;let l,u;if(i)l=e,u="drawArraysInstanced";else if(l=t.get("ANGLE_instanced_arrays"),u="drawArraysInstancedANGLE",null===l)return void console.error("THREE.WebGLBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");l[u](a,r,s,o),n.update(s,a,o)}}function ka(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(35633,36338).precision>0&&e.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(35633,36337).precision>0&&e.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}const a="undefined"!=typeof WebGL2RenderingContext&&e instanceof WebGL2RenderingContext||"undefined"!=typeof WebGL2ComputeRenderingContext&&e instanceof WebGL2ComputeRenderingContext;let s=void 0!==n.precision?n.precision:"highp";const o=i(s);o!==s&&(console.warn("THREE.WebGLRenderer:",s,"not supported, using",o,"instead."),s=o);const l=a||t.has("WEBGL_draw_buffers"),u=!0===n.logarithmicDepthBuffer,c=e.getParameter(34930),h=e.getParameter(35660),d=e.getParameter(3379),f=e.getParameter(34076),p=e.getParameter(34921),m=e.getParameter(36347),g=e.getParameter(36348),v=e.getParameter(36349),y=h>0,x=a||t.has("OES_texture_float");return{isWebGL2:a,drawBuffers:l,getMaxAnisotropy:function(){if(void 0!==r)return r;if(!0===t.has("EXT_texture_filter_anisotropic")){const n=t.get("EXT_texture_filter_anisotropic");r=e.getParameter(n.MAX_TEXTURE_MAX_ANISOTROPY_EXT)}else r=0;return r},getMaxPrecision:i,precision:s,logarithmicDepthBuffer:u,maxTextures:c,maxVertexTextures:h,maxTextureSize:d,maxCubemapSize:f,maxAttributes:p,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:x,floatVertexTextures:y&&x,maxSamples:a?e.getParameter(36183):0}}function Fa(e){const t=this;let n=null,r=0,i=!1,a=!1;const s=new _a,o=new Rn,l={value:null,needsUpdate:!1};function u(){l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0}function c(e,n,r,i){const a=null!==e?e.length:0;let u=null;if(0!==a){if(u=l.value,!0!==i||null===u){const t=r+4*a,i=n.matrixWorldInverse;o.getNormalMatrix(i),(null===u||u.length<t)&&(u=new Float32Array(t));for(let t=0,n=r;t!==a;++t,n+=4)s.copy(e[t]).applyMatrix4(i,o),s.normal.toArray(u,n),u[n+3]=s.constant}l.value=u,l.needsUpdate=!0}return t.numPlanes=a,t.numIntersection=0,u}this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(e,t,a){const s=0!==e.length||t||0!==r||i;return i=t,n=c(e,a,0),r=e.length,s},this.beginShadows=function(){a=!0,c(null)},this.endShadows=function(){a=!1,u()},this.setState=function(t,s,o){const h=t.clippingPlanes,d=t.clipIntersection,f=t.clipShadows,p=e.get(t);if(!i||null===h||0===h.length||a&&!f)a?c(null):u();else{const e=a?0:r,t=4*e;let i=p.clippingState||null;l.value=i,i=c(h,s,t,o);for(let e=0;e!==t;++e)i[e]=n[e];p.clippingState=i,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=e}}}function Oa(e){let t=new WeakMap;function n(e,t){return t===se?e.mapping=ie:t===oe&&(e.mapping=ae),e}function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture&&!1===i.isRenderTargetTexture){const a=i.mapping;if(a===se||a===oe){if(t.has(i))return n(t.get(i).texture,i.mapping);{const a=i.image;if(a&&a.height>0){const s=new va(a.height/2);return s.fromEquirectangularTexture(e,i),t.set(i,s),i.addEventListener("dispose",r),n(s.texture,i.mapping)}return null}}}return i},dispose:function(){t=new WeakMap}}}class Na extends da{constructor(e=-1,t=1,n=1,r=-1,i=.1,a=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=i,this.far=a,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=null===e.view?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,i,a){null===this.view&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=i,this.view.height=a,this.updateProjectionMatrix()}clearViewOffset(){null!==this.view&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let i=n-e,a=n+e,s=r+t,o=r-t;if(null!==this.view&&this.view.enabled){const e=(this.right-this.left)/this.view.fullWidth/this.zoom,t=(this.top-this.bottom)/this.view.fullHeight/this.zoom;i+=e*this.view.offsetX,a=i+e*this.view.width,s-=t*this.view.offsetY,o=s-t*this.view.height}this.projectionMatrix.makeOrthographic(i,a,s,o,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){const t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,null!==this.view&&(t.object.view=Object.assign({},this.view)),t}}const za=[.125,.215,.35,.446,.526,.582],Ua=new Na,Ga=new Xn;let Ha=null;const Va=(1+Math.sqrt(5))/2,Wa=1/Va,ja=[new lr(1,1,1),new lr(-1,1,1),new lr(1,1,-1),new lr(-1,1,-1),new lr(0,Va,Wa),new lr(0,Va,-Wa),new lr(Wa,0,Va),new lr(-Wa,0,Va),new lr(Va,Wa,0),new lr(-Va,Wa,0)];class Ja{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._lodMax=0,this._cubeSize=0,this._lodPlanes=[],this._sizeLods=[],this._sigmas=[],this._blurMaterial=null,this._cubemapMaterial=null,this._equirectMaterial=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){Ha=this._renderer.getRenderTarget(),this._setSize(256);const i=this._allocateTargets();return i.depthBuffer=!0,this._sceneToCubeUV(e,n,r,i),t>0&&this._blur(i,0,0,t),this._applyPMREM(i),this._cleanup(i),i}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){null===this._cubemapMaterial&&(this._cubemapMaterial=qa(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Ka(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),null!==this._cubemapMaterial&&this._cubemapMaterial.dispose(),null!==this._equirectMaterial&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){null!==this._blurMaterial&&this._blurMaterial.dispose(),null!==this._pingPongRenderTarget&&this._pingPongRenderTarget.dispose();for(let e=0;e<this._lodPlanes.length;e++)this._lodPlanes[e].dispose()}_cleanup(e){this._renderer.setRenderTarget(Ha),e.scissorTest=!1,Ya(e,0,0,e.width,e.height)}_fromTexture(e,t){e.mapping===ie||e.mapping===ae?this._setSize(0===e.image.length?16:e.image[0].width||e.image[0].image.width):this._setSize(e.image.width/4),Ha=this._renderer.getRenderTarget();const n=t||this._allocateTargets();return this._textureToCubeUV(e,n),this._applyPMREM(n),this._cleanup(n),n}_allocateTargets(){const e=3*Math.max(this._cubeSize,112),t=4*this._cubeSize,n={magFilter:ve,minFilter:ve,generateMipmaps:!1,type:Be,format:ke,encoding:Rt,depthBuffer:!1},r=Xa(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=Xa(e,t,n);const{_lodMax:r}=this;({sizeLods:this._sizeLods,lodPlanes:this._lodPlanes,sigmas:this._sigmas}=function(e){const t=[],n=[],r=[];let i=e;const a=e-4+1+za.length;for(let s=0;s<a;s++){const a=Math.pow(2,i);n.push(a);let o=1/a;s>e-4?o=za[s-e+4-1]:0===s&&(o=0),r.push(o);const l=1/(a-2),u=-l,c=1+l,h=[u,u,c,u,c,c,u,u,c,c,u,c],d=6,f=6,p=3,m=2,g=1,v=new Float32Array(p*f*d),y=new Float32Array(m*f*d),x=new Float32Array(g*f*d);for(let e=0;e<d;e++){const t=e%3*2/3-1,n=e>2?0:-1,r=[t,n,0,t+2/3,n,0,t+2/3,n+1,0,t,n,0,t+2/3,n+1,0,t,n+1,0];v.set(r,p*f*e),y.set(h,m*f*e);const i=[e,e,e,e,e,e];x.set(i,g*f*e)}const b=new Wi;b.setAttribute("position",new Ci(v,p)),b.setAttribute("uv",new Ci(y,m)),b.setAttribute("faceIndex",new Ci(x,g)),t.push(b),i>4&&i--}return{lodPlanes:t,sizeLods:n,sigmas:r}}(r)),this._blurMaterial=function(e,t,n){const r=new Float32Array(20),i=new lr(0,1,0);return new ha({name:"SphericalGaussianBlur",defines:{n:20,CUBEUV_TEXEL_WIDTH:1/t,CUBEUV_TEXEL_HEIGHT:1/n,CUBEUV_MAX_MIP:`${e}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:r},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:i}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\t\t\tuniform int samples;\n\t\t\tuniform float weights[ n ];\n\t\t\tuniform bool latitudinal;\n\t\t\tuniform float dTheta;\n\t\t\tuniform float mipInt;\n\t\t\tuniform vec3 poleAxis;\n\n\t\t\t#define ENVMAP_TYPE_CUBE_UV\n\t\t\t#include <cube_uv_reflection_fragment>\n\n\t\t\tvec3 getSample( float theta, vec3 axis ) {\n\n\t\t\t\tfloat cosTheta = cos( theta );\n\t\t\t\t// Rodrigues' axis-angle rotation\n\t\t\t\tvec3 sampleDirection = vOutputDirection * cosTheta\n\t\t\t\t\t+ cross( axis, vOutputDirection ) * sin( theta )\n\t\t\t\t\t+ axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta );\n\n\t\t\t\treturn bilinearCubeUV( envMap, sampleDirection, mipInt );\n\n\t\t\t}\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection );\n\n\t\t\t\tif ( all( equal( axis, vec3( 0.0 ) ) ) ) {\n\n\t\t\t\t\taxis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x );\n\n\t\t\t\t}\n\n\t\t\t\taxis = normalize( axis );\n\n\t\t\t\tgl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 );\n\t\t\t\tgl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis );\n\n\t\t\t\tfor ( int i = 1; i < n; i++ ) {\n\n\t\t\t\t\tif ( i >= samples ) {\n\n\t\t\t\t\t\tbreak;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tfloat theta = dTheta * float( i );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis );\n\t\t\t\t\tgl_FragColor.rgb += weights[ i ] * getSample( theta, axis );\n\n\t\t\t\t}\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}(r,e,t)}return r}_compileMaterial(e){const t=new ia(this._lodPlanes[0],e);this._renderer.compile(t,Ua)}_sceneToCubeUV(e,t,n,r){const i=new fa(90,1,t,n),a=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],o=this._renderer,l=o.autoClear,u=o.toneMapping;o.getClearColor(Ga),o.toneMapping=Q,o.autoClear=!1;const c=new Mi({name:"PMREM.Background",side:m,depthWrite:!1,depthTest:!1}),h=new ia(new sa,c);let d=!1;const f=e.background;f?f.isColor&&(c.color.copy(f),e.background=null,d=!0):(c.color.copy(Ga),d=!0);for(let t=0;t<6;t++){const n=t%3;0===n?(i.up.set(0,a[t],0),i.lookAt(s[t],0,0)):1===n?(i.up.set(0,0,a[t]),i.lookAt(0,s[t],0)):(i.up.set(0,a[t],0),i.lookAt(0,0,s[t]));const l=this._cubeSize;Ya(r,n*l,t>2?l:0,l,l),o.setRenderTarget(r),d&&o.render(h,i),o.render(e,i)}h.geometry.dispose(),h.material.dispose(),o.toneMapping=u,o.autoClear=l,e.background=f}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===ie||e.mapping===ae;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=qa()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Ka());const i=r?this._cubemapMaterial:this._equirectMaterial,a=new ia(this._lodPlanes[0],i);i.uniforms.envMap.value=e;const s=this._cubeSize;Ya(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,Ua)}_applyPMREM(e){const t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let t=1;t<this._lodPlanes.length;t++){const n=Math.sqrt(this._sigmas[t]*this._sigmas[t]-this._sigmas[t-1]*this._sigmas[t-1]),r=ja[(t-1)%ja.length];this._blur(e,t-1,t,n,r)}t.autoClear=n}_blur(e,t,n,r,i){const a=this._pingPongRenderTarget;this._halfBlur(e,a,t,n,r,"latitudinal",i),this._halfBlur(a,e,n,n,r,"longitudinal",i)}_halfBlur(e,t,n,r,i,a,s){const o=this._renderer,l=this._blurMaterial;"latitudinal"!==a&&"longitudinal"!==a&&console.error("blur direction must be either latitudinal or longitudinal!");const u=new ia(this._lodPlanes[r],l),c=l.uniforms,h=this._sizeLods[n]-1,d=isFinite(i)?Math.PI/(2*h):2*Math.PI/39,f=i/d,p=isFinite(i)?1+Math.floor(3*f):20;p>20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${p} samples when the maximum is set to 20`);const m=[];let g=0;for(let e=0;e<20;++e){const t=e/f,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:e<p&&(g+=2*n)}for(let e=0;e<m.length;e++)m[e]=m[e]/g;c.envMap.value=e.texture,c.samples.value=p,c.weights.value=m,c.latitudinal.value="latitudinal"===a,s&&(c.poleAxis.value=s);const{_lodMax:v}=this;c.dTheta.value=d,c.mipInt.value=v-n;const y=this._sizeLods[r];Ya(t,3*y*(r>v-4?r-v+4:0),4*(this._cubeSize-y),3*y,2*y),o.setRenderTarget(t),o.render(u,Ua)}}function Xa(e,t,n){const r=new tr(e,t,n);return r.texture.mapping=le,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Ya(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function Ka(){return new ha({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform sampler2D envMap;\n\n\t\t\t#include <common>\n\n\t\t\tvoid main() {\n\n\t\t\t\tvec3 outputDirection = normalize( vOutputDirection );\n\t\t\t\tvec2 uv = equirectUv( outputDirection );\n\n\t\t\t\tgl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 );\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}function qa(){return new ha({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:"\n\n\t\tprecision mediump float;\n\t\tprecision mediump int;\n\n\t\tattribute float faceIndex;\n\n\t\tvarying vec3 vOutputDirection;\n\n\t\t// RH coordinate system; PMREM face-indexing convention\n\t\tvec3 getDirection( vec2 uv, float face ) {\n\n\t\t\tuv = 2.0 * uv - 1.0;\n\n\t\t\tvec3 direction = vec3( uv, 1.0 );\n\n\t\t\tif ( face == 0.0 ) {\n\n\t\t\t\tdirection = direction.zyx; // ( 1, v, u ) pos x\n\n\t\t\t} else if ( face == 1.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xz *= -1.0; // ( -u, 1, -v ) pos y\n\n\t\t\t} else if ( face == 2.0 ) {\n\n\t\t\t\tdirection.x *= -1.0; // ( -u, v, 1 ) pos z\n\n\t\t\t} else if ( face == 3.0 ) {\n\n\t\t\t\tdirection = direction.zyx;\n\t\t\t\tdirection.xz *= -1.0; // ( -1, v, -u ) neg x\n\n\t\t\t} else if ( face == 4.0 ) {\n\n\t\t\t\tdirection = direction.xzy;\n\t\t\t\tdirection.xy *= -1.0; // ( -u, -1, v ) neg y\n\n\t\t\t} else if ( face == 5.0 ) {\n\n\t\t\t\tdirection.z *= -1.0; // ( u, v, -1 ) neg z\n\n\t\t\t}\n\n\t\t\treturn direction;\n\n\t\t}\n\n\t\tvoid main() {\n\n\t\t\tvOutputDirection = getDirection( uv, faceIndex );\n\t\t\tgl_Position = vec4( position, 1.0 );\n\n\t\t}\n\t",fragmentShader:"\n\n\t\t\tprecision mediump float;\n\t\t\tprecision mediump int;\n\n\t\t\tuniform float flipEnvMap;\n\n\t\t\tvarying vec3 vOutputDirection;\n\n\t\t\tuniform samplerCube envMap;\n\n\t\t\tvoid main() {\n\n\t\t\t\tgl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) );\n\n\t\t\t}\n\t\t",blending:y,depthTest:!1,depthWrite:!1})}function Qa(e){let t=new WeakMap,n=null;function r(e){const n=e.target;n.removeEventListener("dispose",r);const i=t.get(n);void 0!==i&&(t.delete(n),i.dispose())}return{get:function(i){if(i&&i.isTexture){const a=i.mapping,s=a===se||a===oe,o=a===ie||a===ae;if(s||o){if(i.isRenderTargetTexture&&!0===i.needsPMREMUpdate){i.needsPMREMUpdate=!1;let r=t.get(i);return null===n&&(n=new Ja(e)),r=s?n.fromEquirectangular(i,r):n.fromCubemap(i,r),t.set(i,r),r.texture}if(t.has(i))return t.get(i).texture;{const a=i.image;if(s&&a&&a.height>0||o&&a&&function(e){let t=0;for(let n=0;n<6;n++)void 0!==e[n]&&t++;return 6===t}(a)){null===n&&(n=new Ja(e));const a=s?n.fromEquirectangular(i):n.fromCubemap(i);return t.set(i,a),i.addEventListener("dispose",r),a.texture}return null}}}return i},dispose:function(){t=new WeakMap,null!==n&&(n.dispose(),n=null)}}}function Za(e){const t={};function n(n){if(void 0!==t[n])return t[n];let r;switch(n){case"WEBGL_depth_texture":r=e.getExtension("WEBGL_depth_texture")||e.getExtension("MOZ_WEBGL_depth_texture")||e.getExtension("WEBKIT_WEBGL_depth_texture");break;case"EXT_texture_filter_anisotropic":r=e.getExtension("EXT_texture_filter_anisotropic")||e.getExtension("MOZ_EXT_texture_filter_anisotropic")||e.getExtension("WEBKIT_EXT_texture_filter_anisotropic");break;case"WEBGL_compressed_texture_s3tc":r=e.getExtension("WEBGL_compressed_texture_s3tc")||e.getExtension("MOZ_WEBGL_compressed_texture_s3tc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_s3tc");break;case"WEBGL_compressed_texture_pvrtc":r=e.getExtension("WEBGL_compressed_texture_pvrtc")||e.getExtension("WEBKIT_WEBGL_compressed_texture_pvrtc");break;default:r=e.getExtension(n)}return t[n]=r,r}return{has:function(e){return null!==n(e)},init:function(e){e.isWebGL2?n("EXT_color_buffer_float"):(n("WEBGL_depth_texture"),n("OES_texture_float"),n("OES_texture_half_float"),n("OES_texture_half_float_linear"),n("OES_standard_derivatives"),n("OES_element_index_uint"),n("OES_vertex_array_object"),n("ANGLE_instanced_arrays")),n("OES_texture_float_linear"),n("EXT_color_buffer_half_float"),n("WEBGL_multisampled_render_to_texture")},get:function(e){const t=n(e);return null===t&&console.warn("THREE.WebGLRenderer: "+e+" extension not supported."),t}}}function $a(e,t,n,r){const i={},a=new WeakMap;function s(e){const o=e.target;null!==o.index&&t.remove(o.index);for(const e in o.attributes)t.remove(o.attributes[e]);o.removeEventListener("dispose",s),delete i[o.id];const l=a.get(o);l&&(t.remove(l),a.delete(o)),r.releaseStatesOfGeometry(o),!0===o.isInstancedBufferGeometry&&delete o._maxInstanceCount,n.memory.geometries--}function o(e){const n=[],r=e.index,i=e.attributes.position;let s=0;if(null!==r){const e=r.array;s=r.version;for(let t=0,r=e.length;t<r;t+=3){const r=e[t+0],i=e[t+1],a=e[t+2];n.push(r,i,i,a,a,r)}}else{const e=i.array;s=i.version;for(let t=0,r=e.length/3-1;t<r;t+=3){const e=t+0,r=t+1,i=t+2;n.push(e,r,r,i,i,e)}}const o=new(Dn(n)?Di:Ri)(n,1);o.version=s;const l=a.get(e);l&&t.remove(l),a.set(e,o)}return{get:function(e,t){return!0===i[t.id]||(t.addEventListener("dispose",s),i[t.id]=!0,n.memory.geometries++),t},update:function(e){const n=e.attributes;for(const e in n)t.update(n[e],34962);const r=e.morphAttributes;for(const e in r){const n=r[e];for(let e=0,r=n.length;e<r;e++)t.update(n[e],34962)}},getWireframeAttribute:function(e){const t=a.get(e);if(t){const n=e.index;null!==n&&t.version<n.version&&o(e)}else o(e);return a.get(e)}}}function es(e,t,n,r){const i=r.isWebGL2;let a,s,o;this.setMode=function(e){a=e},this.setIndex=function(e){s=e.type,o=e.bytesPerElement},this.render=function(t,r){e.drawElements(a,r,s,t*o),n.update(r,a,1)},this.renderInstances=function(r,l,u){if(0===u)return;let c,h;if(i)c=e,h="drawElementsInstanced";else if(c=t.get("ANGLE_instanced_arrays"),h="drawElementsInstancedANGLE",null===c)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");c[h](a,l,s,r*o,u),n.update(l,a,u)}}function ts(e){const t={frame:0,calls:0,triangles:0,points:0,lines:0};return{memory:{geometries:0,textures:0},render:t,programs:null,autoReset:!0,reset:function(){t.frame++,t.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(e,n,r){switch(t.calls++,n){case 4:t.triangles+=r*(e/3);break;case 1:t.lines+=r*(e/2);break;case 3:t.lines+=r*(e-1);break;case 2:t.lines+=r*e;break;case 0:t.points+=r*e;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",n)}}}}function ns(e,t){return e[0]-t[0]}function rs(e,t){return Math.abs(t[1])-Math.abs(e[1])}function is(e,t,n){const r={},i=new Float32Array(8),a=new WeakMap,s=new er,o=[];for(let e=0;e<8;e++)o[e]=[e,0];return{update:function(l,u,c,h){const d=l.morphTargetInfluences;if(!0===t.isWebGL2){const f=u.morphAttributes.position||u.morphAttributes.normal||u.morphAttributes.color,p=void 0!==f?f.length:0;let m=a.get(u);if(void 0===m||m.count!==p){void 0!==m&&m.texture.dispose();const y=void 0!==u.morphAttributes.position,x=void 0!==u.morphAttributes.normal,b=void 0!==u.morphAttributes.color,_=u.morphAttributes.position||[],w=u.morphAttributes.normal||[],M=u.morphAttributes.color||[];let S=0;!0===y&&(S=1),!0===x&&(S=2),!0===b&&(S=3);let A=u.attributes.position.count*S,C=1;A>t.maxTextureSize&&(C=Math.ceil(A/t.maxTextureSize),A=t.maxTextureSize);const E=new Float32Array(A*C*4*p),T=new nr(E,A,C,p);T.type=Te,T.needsUpdate=!0;const B=4*S;for(let R=0;R<p;R++){const L=_[R],D=w[R],I=M[R],k=A*C*4*R;for(let F=0;F<L.count;F++){const O=F*B;!0===y&&(s.fromBufferAttribute(L,F),E[k+O+0]=s.x,E[k+O+1]=s.y,E[k+O+2]=s.z,E[k+O+3]=0),!0===x&&(s.fromBufferAttribute(D,F),E[k+O+4]=s.x,E[k+O+5]=s.y,E[k+O+6]=s.z,E[k+O+7]=0),!0===b&&(s.fromBufferAttribute(I,F),E[k+O+8]=s.x,E[k+O+9]=s.y,E[k+O+10]=s.z,E[k+O+11]=4===I.itemSize?s.w:1)}}function P(){T.dispose(),a.delete(u),u.removeEventListener("dispose",P)}m={count:p,texture:T,size:new Pn(A,C)},a.set(u,m),u.addEventListener("dispose",P)}let g=0;for(let N=0;N<d.length;N++)g+=d[N];const v=u.morphTargetsRelative?1:1-g;h.getUniforms().setValue(e,"morphTargetBaseInfluence",v),h.getUniforms().setValue(e,"morphTargetInfluences",d),h.getUniforms().setValue(e,"morphTargetsTexture",m.texture,n),h.getUniforms().setValue(e,"morphTargetsTextureSize",m.size)}else{const z=void 0===d?0:d.length;let U=r[u.id];if(void 0===U||U.length!==z){U=[];for(let j=0;j<z;j++)U[j]=[j,0];r[u.id]=U}for(let J=0;J<z;J++){const X=U[J];X[0]=J,X[1]=d[J]}U.sort(rs);for(let Y=0;Y<8;Y++)Y<z&&U[Y][1]?(o[Y][0]=U[Y][0],o[Y][1]=U[Y][1]):(o[Y][0]=Number.MAX_SAFE_INTEGER,o[Y][1]=0);o.sort(ns);const G=u.morphAttributes.position,H=u.morphAttributes.normal;let V=0;for(let K=0;K<8;K++){const q=o[K],Q=q[0],Z=q[1];Q!==Number.MAX_SAFE_INTEGER&&Z?(G&&u.getAttribute("morphTarget"+K)!==G[Q]&&u.setAttribute("morphTarget"+K,G[Q]),H&&u.getAttribute("morphNormal"+K)!==H[Q]&&u.setAttribute("morphNormal"+K,H[Q]),i[K]=Z,V+=Z):(G&&!0===u.hasAttribute("morphTarget"+K)&&u.deleteAttribute("morphTarget"+K),H&&!0===u.hasAttribute("morphNormal"+K)&&u.deleteAttribute("morphNormal"+K),i[K]=0)}const W=u.morphTargetsRelative?1:1-V;h.getUniforms().setValue(e,"morphTargetBaseInfluence",W),h.getUniforms().setValue(e,"morphTargetInfluences",i)}}}}function as(e,t,n,r){let i=new WeakMap;function a(e){const t=e.target;t.removeEventListener("dispose",a),n.remove(t.instanceMatrix),null!==t.instanceColor&&n.remove(t.instanceColor)}return{update:function(e){const s=r.render.frame,o=e.geometry,l=t.get(e,o);return i.get(l)!==s&&(t.update(l),i.set(l,s)),e.isInstancedMesh&&(!1===e.hasEventListener("dispose",a)&&e.addEventListener("dispose",a),n.update(e.instanceMatrix,34962),null!==e.instanceColor&&n.update(e.instanceColor,34962)),l},dispose:function(){i=new WeakMap}}}const ss=new $n,os=new nr,ls=new ir,us=new ga,cs=[],hs=[],ds=new Float32Array(16),fs=new Float32Array(9),ps=new Float32Array(4);function ms(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let a=cs[i];if(void 0===a&&(a=new Float32Array(i),cs[i]=a),0!==t){r.toArray(a,0);for(let r=1,i=0;r!==t;++r)i+=n,e[r].toArray(a,i)}return a}function gs(e,t){if(e.length!==t.length)return!1;for(let n=0,r=e.length;n<r;n++)if(e[n]!==t[n])return!1;return!0}function vs(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function ys(e,t){let n=hs[t];void 0===n&&(n=new Int32Array(t),hs[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function xs(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function bs(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2f(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(gs(n,t))return;e.uniform2fv(this.addr,t),vs(n,t)}}function _s(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3f(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else if(void 0!==t.r)n[0]===t.r&&n[1]===t.g&&n[2]===t.b||(e.uniform3f(this.addr,t.r,t.g,t.b),n[0]=t.r,n[1]=t.g,n[2]=t.b);else{if(gs(n,t))return;e.uniform3fv(this.addr,t),vs(n,t)}}function ws(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4f(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(gs(n,t))return;e.uniform4fv(this.addr,t),vs(n,t)}}function Ms(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(gs(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),vs(n,t)}else{if(gs(n,r))return;ps.set(r),e.uniformMatrix2fv(this.addr,!1,ps),vs(n,r)}}function Ss(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(gs(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),vs(n,t)}else{if(gs(n,r))return;fs.set(r),e.uniformMatrix3fv(this.addr,!1,fs),vs(n,r)}}function As(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(gs(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),vs(n,t)}else{if(gs(n,r))return;ds.set(r),e.uniformMatrix4fv(this.addr,!1,ds),vs(n,r)}}function Cs(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function Es(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2i(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(gs(n,t))return;e.uniform2iv(this.addr,t),vs(n,t)}}function Ts(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3i(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(gs(n,t))return;e.uniform3iv(this.addr,t),vs(n,t)}}function Bs(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4i(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(gs(n,t))return;e.uniform4iv(this.addr,t),vs(n,t)}}function Ps(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function Rs(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y||(e.uniform2ui(this.addr,t.x,t.y),n[0]=t.x,n[1]=t.y);else{if(gs(n,t))return;e.uniform2uiv(this.addr,t),vs(n,t)}}function Ls(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z||(e.uniform3ui(this.addr,t.x,t.y,t.z),n[0]=t.x,n[1]=t.y,n[2]=t.z);else{if(gs(n,t))return;e.uniform3uiv(this.addr,t),vs(n,t)}}function Ds(e,t){const n=this.cache;if(void 0!==t.x)n[0]===t.x&&n[1]===t.y&&n[2]===t.z&&n[3]===t.w||(e.uniform4ui(this.addr,t.x,t.y,t.z,t.w),n[0]=t.x,n[1]=t.y,n[2]=t.z,n[3]=t.w);else{if(gs(n,t))return;e.uniform4uiv(this.addr,t),vs(n,t)}}function Is(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2D(t||ss,i)}function ks(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||ls,i)}function Fs(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(t||us,i)}function Os(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||os,i)}function Ns(e,t){e.uniform1fv(this.addr,t)}function zs(e,t){const n=ms(t,this.size,2);e.uniform2fv(this.addr,n)}function Us(e,t){const n=ms(t,this.size,3);e.uniform3fv(this.addr,n)}function Gs(e,t){const n=ms(t,this.size,4);e.uniform4fv(this.addr,n)}function Hs(e,t){const n=ms(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function Vs(e,t){const n=ms(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function Ws(e,t){const n=ms(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function js(e,t){e.uniform1iv(this.addr,t)}function Js(e,t){e.uniform2iv(this.addr,t)}function Xs(e,t){e.uniform3iv(this.addr,t)}function Ys(e,t){e.uniform4iv(this.addr,t)}function Ks(e,t){e.uniform1uiv(this.addr,t)}function qs(e,t){e.uniform2uiv(this.addr,t)}function Qs(e,t){e.uniform3uiv(this.addr,t)}function Zs(e,t){e.uniform4uiv(this.addr,t)}function $s(e,t,n){const r=this.cache,i=t.length,a=ys(n,i);gs(r,a)||(e.uniform1iv(this.addr,a),vs(r,a));for(let e=0;e!==i;++e)n.setTexture2D(t[e]||ss,a[e])}function eo(e,t,n){const r=this.cache,i=t.length,a=ys(n,i);gs(r,a)||(e.uniform1iv(this.addr,a),vs(r,a));for(let e=0;e!==i;++e)n.setTexture3D(t[e]||ls,a[e])}function to(e,t,n){const r=this.cache,i=t.length,a=ys(n,i);gs(r,a)||(e.uniform1iv(this.addr,a),vs(r,a));for(let e=0;e!==i;++e)n.setTextureCube(t[e]||us,a[e])}function no(e,t,n){const r=this.cache,i=t.length,a=ys(n,i);gs(r,a)||(e.uniform1iv(this.addr,a),vs(r,a));for(let e=0;e!==i;++e)n.setTexture2DArray(t[e]||os,a[e])}class ro{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return xs;case 35664:return bs;case 35665:return _s;case 35666:return ws;case 35674:return Ms;case 35675:return Ss;case 35676:return As;case 5124:case 35670:return Cs;case 35667:case 35671:return Es;case 35668:case 35672:return Ts;case 35669:case 35673:return Bs;case 5125:return Ps;case 36294:return Rs;case 36295:return Ls;case 36296:return Ds;case 35678:case 36198:case 36298:case 36306:case 35682:return Is;case 35679:case 36299:case 36307:return ks;case 35680:case 36300:case 36308:case 36293:return Fs;case 36289:case 36303:case 36311:case 36292:return Os}}(t.type)}}class io{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.size=t.size,this.setValue=function(e){switch(e){case 5126:return Ns;case 35664:return zs;case 35665:return Us;case 35666:return Gs;case 35674:return Hs;case 35675:return Vs;case 35676:return Ws;case 5124:case 35670:return js;case 35667:case 35671:return Js;case 35668:case 35672:return Xs;case 35669:case 35673:return Ys;case 5125:return Ks;case 36294:return qs;case 36295:return Qs;case 36296:return Zs;case 35678:case 36198:case 36298:case 36306:case 35682:return $s;case 35679:case 36299:case 36307:return eo;case 35680:case 36300:case 36308:case 36293:return to;case 36289:case 36303:case 36311:case 36292:return no}}(t.type)}}class ao{constructor(e){this.id=e,this.seq=[],this.map={}}setValue(e,t,n){const r=this.seq;for(let i=0,a=r.length;i!==a;++i){const a=r[i];a.setValue(e,t[a.id],n)}}}const so=/(\w+)(\])?(\[|\.)?/g;function oo(e,t){e.seq.push(t),e.map[t.id]=t}function lo(e,t,n){const r=e.name,i=r.length;for(so.lastIndex=0;;){const a=so.exec(r),s=so.lastIndex;let o=a[1];const l="]"===a[2],u=a[3];if(l&&(o|=0),void 0===u||"["===u&&s+2===i){oo(n,void 0===u?new ro(o,e,t):new io(o,e,t));break}{let e=n.map[o];void 0===e&&(e=new ao(o),oo(n,e)),n=e}}}class uo{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,35718);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);lo(n,e.getUniformLocation(t,n.name),this)}}setValue(e,t,n,r){const i=this.map[t];void 0!==i&&i.setValue(e,n,r)}setOptional(e,t,n){const r=t[n];void 0!==r&&this.setValue(e,n,r)}static upload(e,t,n,r){for(let i=0,a=t.length;i!==a;++i){const a=t[i],s=n[a.id];!1!==s.needsUpdate&&a.setValue(e,s.value,r)}}static seqWithValue(e,t){const n=[];for(let r=0,i=e.length;r!==i;++r){const i=e[r];i.id in t&&n.push(i)}return n}}function co(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}let ho=0;function fo(e,t,n){const r=e.getShaderParameter(t,35713),i=e.getShaderInfoLog(t).trim();if(r&&""===i)return"";const a=/ERROR: 0:(\d+)/.exec(i);if(a){const r=parseInt(a[1]);return n.toUpperCase()+"\n\n"+i+"\n\n"+function(e,t){const n=e.split("\n"),r=[],i=Math.max(t-6,0),a=Math.min(t+6,n.length);for(let e=i;e<a;e++){const i=e+1;r.push(`${i===t?">":" "} ${i}: ${n[e]}`)}return r.join("\n")}(e.getShaderSource(t),r)}return i}function po(e,t){const n=function(e){switch(e){case Rt:return["Linear","( value )"];case Lt:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported encoding:",e),["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function mo(e,t){let n;switch(t){case Z:n="Linear";break;case $:n="Reinhard";break;case ee:n="OptimizedCineon";break;case te:n="ACESFilmic";break;case ne:n="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",t),n="Linear"}return"vec3 "+e+"( vec3 color ) { return "+n+"ToneMapping( color ); }"}function go(e){return""!==e}function vo(e,t){const n=t.numSpotLightShadows+t.numSpotLightMaps-t.numSpotLightShadowsWithMaps;return e.replace(/NUM_DIR_LIGHTS/g,t.numDirLights).replace(/NUM_SPOT_LIGHTS/g,t.numSpotLights).replace(/NUM_SPOT_LIGHT_MAPS/g,t.numSpotLightMaps).replace(/NUM_SPOT_LIGHT_COORDS/g,n).replace(/NUM_RECT_AREA_LIGHTS/g,t.numRectAreaLights).replace(/NUM_POINT_LIGHTS/g,t.numPointLights).replace(/NUM_HEMI_LIGHTS/g,t.numHemiLights).replace(/NUM_DIR_LIGHT_SHADOWS/g,t.numDirLightShadows).replace(/NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS/g,t.numSpotLightShadowsWithMaps).replace(/NUM_SPOT_LIGHT_SHADOWS/g,t.numSpotLightShadows).replace(/NUM_POINT_LIGHT_SHADOWS/g,t.numPointLightShadows)}function yo(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const xo=/^[ \t]*#include +<([\w\d./]+)>/gm;function bo(e){return e.replace(xo,_o)}function _o(e,t){const n=Ta[t];if(void 0===n)throw new Error("Can not resolve #include <"+t+">");return bo(n)}const wo=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Mo(e){return e.replace(wo,So)}function So(e,t,n,r){let i="";for(let e=parseInt(t);e<parseInt(n);e++)i+=r.replace(/\[\s*i\s*\]/g,"[ "+e+" ]").replace(/UNROLLED_LOOP_INDEX/g,e);return i}function Ao(e){let t="precision "+e.precision+" float;\nprecision "+e.precision+" int;";return"highp"===e.precision?t+="\n#define HIGH_PRECISION":"mediump"===e.precision?t+="\n#define MEDIUM_PRECISION":"lowp"===e.precision&&(t+="\n#define LOW_PRECISION"),t}function Co(e,t,n,r){const i=e.getContext(),a=n.defines;let s=n.vertexShader,o=n.fragmentShader;const l=function(e){let t="SHADOWMAP_TYPE_BASIC";return e.shadowMapType===h?t="SHADOWMAP_TYPE_PCF":e.shadowMapType===d?t="SHADOWMAP_TYPE_PCF_SOFT":e.shadowMapType===f&&(t="SHADOWMAP_TYPE_VSM"),t}(n),u=function(e){let t="ENVMAP_TYPE_CUBE";if(e.envMap)switch(e.envMapMode){case ie:case ae:t="ENVMAP_TYPE_CUBE";break;case le:t="ENVMAP_TYPE_CUBE_UV"}return t}(n),c=function(e){let t="ENVMAP_MODE_REFLECTION";return e.envMap&&e.envMapMode===ae&&(t="ENVMAP_MODE_REFRACTION"),t}(n),p=function(e){let t="ENVMAP_BLENDING_NONE";if(e.envMap)switch(e.combine){case Y:t="ENVMAP_BLENDING_MULTIPLY";break;case K:t="ENVMAP_BLENDING_MIX";break;case q:t="ENVMAP_BLENDING_ADD"}return t}(n),m=function(e){const t=e.envMapCubeUVHeight;if(null===t)return null;const n=Math.log2(t)-2,r=1/t;return{texelWidth:1/(3*Math.max(Math.pow(2,n),112)),texelHeight:r,maxMip:n}}(n),g=n.isWebGL2?"":function(e){return[e.extensionDerivatives||e.envMapCubeUVHeight||e.bumpMap||e.tangentSpaceNormalMap||e.clearcoatNormalMap||e.flatShading||"physical"===e.shaderID?"#extension GL_OES_standard_derivatives : enable":"",(e.extensionFragDepth||e.logarithmicDepthBuffer)&&e.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",e.extensionDrawBuffers&&e.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(e.extensionShaderTextureLOD||e.envMap||e.transmission)&&e.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(go).join("\n")}(n),v=function(e){const t=[];for(const n in e){const r=e[n];!1!==r&&t.push("#define "+n+" "+r)}return t.join("\n")}(a),y=i.createProgram();let x,b,_=n.glslVersion?"#version "+n.glslVersion+"\n":"";n.isRawShaderMaterial?(x=[v].filter(go).join("\n"),x.length>0&&(x+="\n"),b=[g,v].filter(go).join("\n"),b.length>0&&(b+="\n")):(x=[Ao(n),"#define SHADER_NAME "+n.shaderName,v,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",n.supportsVertexTextures?"#define VERTEX_TEXTURES":"",n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+c:"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.displacementMap&&n.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.flatShading?"#define FLAT_SHADED":"",n.skinning?"#define USE_SKINNING":"",n.morphTargets?"#define USE_MORPHTARGETS":"",n.morphNormals&&!1===n.flatShading?"#define USE_MORPHNORMALS":"",n.morphColors&&n.isWebGL2?"#define USE_MORPHCOLORS":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+n.morphTextureStride:"",n.morphTargetsCount>0&&n.isWebGL2?"#define MORPHTARGETS_COUNT "+n.morphTargetsCount:"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.sizeAttenuation?"#define USE_SIZEATTENUATION":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING","\tattribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR","\tattribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT","\tattribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )","\tattribute vec4 color;","#elif defined( USE_COLOR )","\tattribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )","\tattribute vec3 morphTarget0;","\tattribute vec3 morphTarget1;","\tattribute vec3 morphTarget2;","\tattribute vec3 morphTarget3;","\t#ifdef USE_MORPHNORMALS","\t\tattribute vec3 morphNormal0;","\t\tattribute vec3 morphNormal1;","\t\tattribute vec3 morphNormal2;","\t\tattribute vec3 morphNormal3;","\t#else","\t\tattribute vec3 morphTarget4;","\t\tattribute vec3 morphTarget5;","\t\tattribute vec3 morphTarget6;","\t\tattribute vec3 morphTarget7;","\t#endif","#endif","#ifdef USE_SKINNING","\tattribute vec4 skinIndex;","\tattribute vec4 skinWeight;","#endif","\n"].filter(go).join("\n"),b=[g,Ao(n),"#define SHADER_NAME "+n.shaderName,v,n.useFog&&n.fog?"#define USE_FOG":"",n.useFog&&n.fogExp2?"#define FOG_EXP2":"",n.map?"#define USE_MAP":"",n.matcap?"#define USE_MATCAP":"",n.envMap?"#define USE_ENVMAP":"",n.envMap?"#define "+u:"",n.envMap?"#define "+c:"",n.envMap?"#define "+p:"",m?"#define CUBEUV_TEXEL_WIDTH "+m.texelWidth:"",m?"#define CUBEUV_TEXEL_HEIGHT "+m.texelHeight:"",m?"#define CUBEUV_MAX_MIP "+m.maxMip+".0":"",n.lightMap?"#define USE_LIGHTMAP":"",n.aoMap?"#define USE_AOMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMap&&n.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",n.normalMap&&n.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",n.clearcoat?"#define USE_CLEARCOAT":"",n.clearcoatMap?"#define USE_CLEARCOATMAP":"",n.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",n.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",n.iridescence?"#define USE_IRIDESCENCE":"",n.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",n.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",n.specularMap?"#define USE_SPECULARMAP":"",n.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",n.specularColorMap?"#define USE_SPECULARCOLORMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEENCOLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",n.vertexTangents?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUvs?"#define USE_UV":"",n.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",n.gradientMap?"#define USE_GRADIENTMAP":"",n.flatShading?"#define FLAT_SHADED":"",n.doubleSided?"#define DOUBLE_SIDED":"",n.flipSided?"#define FLIP_SIDED":"",n.shadowMapEnabled?"#define USE_SHADOWMAP":"",n.shadowMapEnabled?"#define "+l:"",n.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",n.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",n.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",n.logarithmicDepthBuffer&&n.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",n.toneMapping!==Q?"#define TONE_MAPPING":"",n.toneMapping!==Q?Ta.tonemapping_pars_fragment:"",n.toneMapping!==Q?mo("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",Ta.encodings_pars_fragment,po("linearToOutputTexel",n.outputEncoding),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(go).join("\n")),s=bo(s),s=vo(s,n),s=yo(s,n),o=bo(o),o=vo(o,n),o=yo(o,n),s=Mo(s),o=Mo(o),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(_="#version 300 es\n",x=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+x,b=["#define varying in",n.glslVersion===fn?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===fn?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join("\n")+"\n"+b);const w=_+b+o,M=co(i,35633,_+x+s),S=co(i,35632,w);if(i.attachShader(y,M),i.attachShader(y,S),void 0!==n.index0AttributeName?i.bindAttribLocation(y,0,n.index0AttributeName):!0===n.morphTargets&&i.bindAttribLocation(y,0,"position"),i.linkProgram(y),e.debug.checkShaderErrors){const e=i.getProgramInfoLog(y).trim(),t=i.getShaderInfoLog(M).trim(),n=i.getShaderInfoLog(S).trim();let r=!0,a=!0;if(!1===i.getProgramParameter(y,35714)){r=!1;const t=fo(i,M,"vertex"),n=fo(i,S,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(y,35715)+"\n\nProgram Info Log: "+e+"\n"+t+"\n"+n)}else""!==e?console.warn("THREE.WebGLProgram: Program Info Log:",e):""!==t&&""!==n||(a=!1);a&&(this.diagnostics={runnable:r,programLog:e,vertexShader:{log:t,prefix:x},fragmentShader:{log:n,prefix:b}})}let A,C;return i.deleteShader(M),i.deleteShader(S),this.getUniforms=function(){return void 0===A&&(A=new uo(i,y)),A},this.getAttributes=function(){return void 0===C&&(C=function(e,t){const n={},r=e.getProgramParameter(t,35721);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i),a=r.name;let s=1;35674===r.type&&(s=2),35675===r.type&&(s=3),35676===r.type&&(s=4),n[a]={type:r.type,location:e.getAttribLocation(t,a),locationSize:s}}return n}(i,y)),C},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(y),this.program=void 0},this.name=n.shaderName,this.id=ho++,this.cacheKey=t,this.usedTimes=1,this.program=y,this.vertexShader=M,this.fragmentShader=S,this}let Eo=0;class To{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,n=e.fragmentShader,r=this._getShaderStage(t),i=this._getShaderStage(n),a=this._getShaderCacheForMaterial(e);return!1===a.has(r)&&(a.add(r),r.usedTimes++),!1===a.has(i)&&(a.add(i),i.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const e of t)e.usedTimes--,0===e.usedTimes&&this.shaderCache.delete(e.code);return this.materialCache.delete(e),this}getVertexShaderID(e){return this._getShaderStage(e.vertexShader).id}getFragmentShaderID(e){return this._getShaderStage(e.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(e){const t=this.materialCache;let n=t.get(e);return void 0===n&&(n=new Set,t.set(e,n)),n}_getShaderStage(e){const t=this.shaderCache;let n=t.get(e);return void 0===n&&(n=new Bo(e),t.set(e,n)),n}}class Bo{constructor(e){this.id=Eo++,this.code=e,this.usedTimes=0}}function Po(e,t,n,r,i,a,s){const o=new Kr,l=new To,u=[],c=i.isWebGL2,h=i.logarithmicDepthBuffer,d=i.vertexTextures;let f=i.precision;const p={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"};return{getParameters:function(a,o,u,v,y){const b=v.fog,_=y.geometry,w=a.isMeshStandardMaterial?v.environment:null,M=(a.isMeshStandardMaterial?n:t).get(a.envMap||w),S=M&&M.mapping===le?M.image.height:null,A=p[a.type];null!==a.precision&&(f=i.getMaxPrecision(a.precision),f!==a.precision&&console.warn("THREE.WebGLProgram.getParameters:",a.precision,"not supported, using",f,"instead."));const C=_.morphAttributes.position||_.morphAttributes.normal||_.morphAttributes.color,E=void 0!==C?C.length:0;let T,B,P,R,L=0;if(void 0!==_.morphAttributes.position&&(L=1),void 0!==_.morphAttributes.normal&&(L=2),void 0!==_.morphAttributes.color&&(L=3),A){const e=Pa[A];T=e.vertexShader,B=e.fragmentShader}else T=a.vertexShader,B=a.fragmentShader,l.update(a),P=l.getVertexShaderID(a),R=l.getFragmentShaderID(a);const D=e.getRenderTarget(),I=a.alphaTest>0,k=a.clearcoat>0,F=a.iridescence>0;return{isWebGL2:c,shaderID:A,shaderName:a.type,vertexShader:T,fragmentShader:B,defines:a.defines,customVertexShaderID:P,customFragmentShaderID:R,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:f,instancing:!0===y.isInstancedMesh,instancingColor:!0===y.isInstancedMesh&&null!==y.instanceColor,supportsVertexTextures:d,outputEncoding:null===D?e.outputEncoding:!0===D.isXRRenderTarget?D.texture.encoding:Rt,map:!!a.map,matcap:!!a.matcap,envMap:!!M,envMapMode:M&&M.mapping,envMapCubeUVHeight:S,lightMap:!!a.lightMap,aoMap:!!a.aoMap,emissiveMap:!!a.emissiveMap,bumpMap:!!a.bumpMap,normalMap:!!a.normalMap,objectSpaceNormalMap:a.normalMapType===Ft,tangentSpaceNormalMap:a.normalMapType===kt,decodeVideoTexture:!!a.map&&!0===a.map.isVideoTexture&&a.map.encoding===Lt,clearcoat:k,clearcoatMap:k&&!!a.clearcoatMap,clearcoatRoughnessMap:k&&!!a.clearcoatRoughnessMap,clearcoatNormalMap:k&&!!a.clearcoatNormalMap,iridescence:F,iridescenceMap:F&&!!a.iridescenceMap,iridescenceThicknessMap:F&&!!a.iridescenceThicknessMap,displacementMap:!!a.displacementMap,roughnessMap:!!a.roughnessMap,metalnessMap:!!a.metalnessMap,specularMap:!!a.specularMap,specularIntensityMap:!!a.specularIntensityMap,specularColorMap:!!a.specularColorMap,opaque:!1===a.transparent&&a.blending===x,alphaMap:!!a.alphaMap,alphaTest:I,gradientMap:!!a.gradientMap,sheen:a.sheen>0,sheenColorMap:!!a.sheenColorMap,sheenRoughnessMap:!!a.sheenRoughnessMap,transmission:a.transmission>0,transmissionMap:!!a.transmissionMap,thicknessMap:!!a.thicknessMap,combine:a.combine,vertexTangents:!!a.normalMap&&!!_.attributes.tangent,vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!_.attributes.color&&4===_.attributes.color.itemSize,vertexUvs:!!(a.map||a.bumpMap||a.normalMap||a.specularMap||a.alphaMap||a.emissiveMap||a.roughnessMap||a.metalnessMap||a.clearcoatMap||a.clearcoatRoughnessMap||a.clearcoatNormalMap||a.iridescenceMap||a.iridescenceThicknessMap||a.displacementMap||a.transmissionMap||a.thicknessMap||a.specularIntensityMap||a.specularColorMap||a.sheenColorMap||a.sheenRoughnessMap),uvsVertexOnly:!(a.map||a.bumpMap||a.normalMap||a.specularMap||a.alphaMap||a.emissiveMap||a.roughnessMap||a.metalnessMap||a.clearcoatNormalMap||a.iridescenceMap||a.iridescenceThicknessMap||a.transmission>0||a.transmissionMap||a.thicknessMap||a.specularIntensityMap||a.specularColorMap||a.sheen>0||a.sheenColorMap||a.sheenRoughnessMap||!a.displacementMap),fog:!!b,useFog:!0===a.fog,fogExp2:b&&b.isFogExp2,flatShading:!!a.flatShading,sizeAttenuation:a.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===y.isSkinnedMesh,morphTargets:void 0!==_.morphAttributes.position,morphNormals:void 0!==_.morphAttributes.normal,morphColors:void 0!==_.morphAttributes.color,morphTargetsCount:E,morphTextureStride:L,numDirLights:o.directional.length,numPointLights:o.point.length,numSpotLights:o.spot.length,numSpotLightMaps:o.spotLightMap.length,numRectAreaLights:o.rectArea.length,numHemiLights:o.hemi.length,numDirLightShadows:o.directionalShadowMap.length,numPointLightShadows:o.pointShadowMap.length,numSpotLightShadows:o.spotShadowMap.length,numSpotLightShadowsWithMaps:o.numSpotLightShadowsWithMaps,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,dithering:a.dithering,shadowMapEnabled:e.shadowMap.enabled&&u.length>0,shadowMapType:e.shadowMap.type,toneMapping:a.toneMapped?e.toneMapping:Q,physicallyCorrectLights:e.physicallyCorrectLights,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===g,flipSided:a.side===m,useDepthPacking:!!a.depthPacking,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionDerivatives:a.extensions&&a.extensions.derivatives,extensionFragDepth:a.extensions&&a.extensions.fragDepth,extensionDrawBuffers:a.extensions&&a.extensions.drawBuffers,extensionShaderTextureLOD:a.extensions&&a.extensions.shaderTextureLOD,rendererExtensionFragDepth:c||r.has("EXT_frag_depth"),rendererExtensionDrawBuffers:c||r.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:c||r.has("EXT_shader_texture_lod"),customProgramCacheKey:a.customProgramCacheKey()}},getProgramCacheKey:function(t){const n=[];if(t.shaderID?n.push(t.shaderID):(n.push(t.customVertexShaderID),n.push(t.customFragmentShaderID)),void 0!==t.defines)for(const e in t.defines)n.push(e),n.push(t.defines[e]);return!1===t.isRawShaderMaterial&&(function(e,t){e.push(t.precision),e.push(t.outputEncoding),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.combine),e.push(t.vertexUvs),e.push(t.fogExp2),e.push(t.sizeAttenuation),e.push(t.morphTargetsCount),e.push(t.morphAttributeCount),e.push(t.numDirLights),e.push(t.numPointLights),e.push(t.numSpotLights),e.push(t.numSpotLightMaps),e.push(t.numHemiLights),e.push(t.numRectAreaLights),e.push(t.numDirLightShadows),e.push(t.numPointLightShadows),e.push(t.numSpotLightShadows),e.push(t.numSpotLightShadowsWithMaps),e.push(t.shadowMapType),e.push(t.toneMapping),e.push(t.numClippingPlanes),e.push(t.numClipIntersection),e.push(t.depthPacking)}(n,t),function(e,t){o.disableAll(),t.isWebGL2&&o.enable(0),t.supportsVertexTextures&&o.enable(1),t.instancing&&o.enable(2),t.instancingColor&&o.enable(3),t.map&&o.enable(4),t.matcap&&o.enable(5),t.envMap&&o.enable(6),t.lightMap&&o.enable(7),t.aoMap&&o.enable(8),t.emissiveMap&&o.enable(9),t.bumpMap&&o.enable(10),t.normalMap&&o.enable(11),t.objectSpaceNormalMap&&o.enable(12),t.tangentSpaceNormalMap&&o.enable(13),t.clearcoat&&o.enable(14),t.clearcoatMap&&o.enable(15),t.clearcoatRoughnessMap&&o.enable(16),t.clearcoatNormalMap&&o.enable(17),t.iridescence&&o.enable(18),t.iridescenceMap&&o.enable(19),t.iridescenceThicknessMap&&o.enable(20),t.displacementMap&&o.enable(21),t.specularMap&&o.enable(22),t.roughnessMap&&o.enable(23),t.metalnessMap&&o.enable(24),t.gradientMap&&o.enable(25),t.alphaMap&&o.enable(26),t.alphaTest&&o.enable(27),t.vertexColors&&o.enable(28),t.vertexAlphas&&o.enable(29),t.vertexUvs&&o.enable(30),t.vertexTangents&&o.enable(31),t.uvsVertexOnly&&o.enable(32),e.push(o.mask),o.disableAll(),t.fog&&o.enable(0),t.useFog&&o.enable(1),t.flatShading&&o.enable(2),t.logarithmicDepthBuffer&&o.enable(3),t.skinning&&o.enable(4),t.morphTargets&&o.enable(5),t.morphNormals&&o.enable(6),t.morphColors&&o.enable(7),t.premultipliedAlpha&&o.enable(8),t.shadowMapEnabled&&o.enable(9),t.physicallyCorrectLights&&o.enable(10),t.doubleSided&&o.enable(11),t.flipSided&&o.enable(12),t.useDepthPacking&&o.enable(13),t.dithering&&o.enable(14),t.specularIntensityMap&&o.enable(15),t.specularColorMap&&o.enable(16),t.transmission&&o.enable(17),t.transmissionMap&&o.enable(18),t.thicknessMap&&o.enable(19),t.sheen&&o.enable(20),t.sheenColorMap&&o.enable(21),t.sheenRoughnessMap&&o.enable(22),t.decodeVideoTexture&&o.enable(23),t.opaque&&o.enable(24),e.push(o.mask)}(n,t),n.push(e.outputEncoding)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=p[e.type];let n;if(t){const e=Pa[t];n=ca.clone(e.uniforms)}else n=e.uniforms;return n},acquireProgram:function(t,n){let r;for(let e=0,t=u.length;e<t;e++){const t=u[e];if(t.cacheKey===n){r=t,++r.usedTimes;break}}return void 0===r&&(r=new Co(e,n,t,a),u.push(r)),r},releaseProgram:function(e){if(0==--e.usedTimes){const t=u.indexOf(e);u[t]=u[u.length-1],u.pop(),e.destroy()}},releaseShaderCache:function(e){l.remove(e)},programs:u,dispose:function(){l.dispose()}}}function Ro(){let e=new WeakMap;return{get:function(t){let n=e.get(t);return void 0===n&&(n={},e.set(t,n)),n},remove:function(t){e.delete(t)},update:function(t,n,r){e.get(t)[n]=r},dispose:function(){e=new WeakMap}}}function Lo(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.material.id!==t.material.id?e.material.id-t.material.id:e.z!==t.z?e.z-t.z:e.id-t.id}function Do(e,t){return e.groupOrder!==t.groupOrder?e.groupOrder-t.groupOrder:e.renderOrder!==t.renderOrder?e.renderOrder-t.renderOrder:e.z!==t.z?t.z-e.z:e.id-t.id}function Io(){const e=[];let t=0;const n=[],r=[],i=[];function a(n,r,i,a,s,o){let l=e[t];return void 0===l?(l={id:n.id,object:n,geometry:r,material:i,groupOrder:a,renderOrder:n.renderOrder,z:s,group:o},e[t]=l):(l.id=n.id,l.object=n,l.geometry=r,l.material=i,l.groupOrder=a,l.renderOrder=n.renderOrder,l.z=s,l.group=o),t++,l}return{opaque:n,transmissive:r,transparent:i,init:function(){t=0,n.length=0,r.length=0,i.length=0},push:function(e,t,s,o,l,u){const c=a(e,t,s,o,l,u);s.transmission>0?r.push(c):!0===s.transparent?i.push(c):n.push(c)},unshift:function(e,t,s,o,l,u){const c=a(e,t,s,o,l,u);s.transmission>0?r.unshift(c):!0===s.transparent?i.unshift(c):n.unshift(c)},finish:function(){for(let n=t,r=e.length;n<r;n++){const t=e[n];if(null===t.id)break;t.id=null,t.object=null,t.geometry=null,t.material=null,t.group=null}},sort:function(e,t){n.length>1&&n.sort(e||Lo),r.length>1&&r.sort(t||Do),i.length>1&&i.sort(t||Do)}}}function ko(){let e=new WeakMap;return{get:function(t,n){const r=e.get(t);let i;return void 0===r?(i=new Io,e.set(t,[i])):n>=r.length?(i=new Io,r.push(i)):i=r[n],i},dispose:function(){e=new WeakMap}}}function Fo(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":n={direction:new lr,color:new Xn};break;case"SpotLight":n={position:new lr,direction:new lr,color:new Xn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new lr,color:new Xn,distance:0,decay:0};break;case"HemisphereLight":n={direction:new lr,skyColor:new Xn,groundColor:new Xn};break;case"RectAreaLight":n={color:new Xn,position:new lr,halfWidth:new lr,halfHeight:new lr}}return e[t.id]=n,n}}}let Oo=0;function No(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function zo(e,t){const n=new Fo,r=function(){const e={};return{get:function(t){if(void 0!==e[t.id])return e[t.id];let n;switch(t.type){case"DirectionalLight":case"SpotLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Pn};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Pn,shadowCameraNear:1,shadowCameraFar:1e3}}return e[t.id]=n,n}}}(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotLightMap:[],spotShadow:[],spotShadowMap:[],spotLightMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[],numSpotLightShadowsWithMaps:0};for(let e=0;e<9;e++)i.probe.push(new lr);const a=new lr,s=new Nr,o=new Nr;return{setup:function(a,s){let o=0,l=0,u=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let c=0,h=0,d=0,f=0,p=0,m=0,g=0,v=0,y=0,x=0;a.sort(No);const b=!0!==s?Math.PI:1;for(let e=0,t=a.length;e<t;e++){const t=a[e],s=t.color,_=t.intensity,w=t.distance,M=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)o+=s.r*_*b,l+=s.g*_*b,u+=s.b*_*b;else if(t.isLightProbe)for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],_);else if(t.isDirectionalLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*b),t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,i.directionalShadow[c]=n,i.directionalShadowMap[c]=M,i.directionalShadowMatrix[c]=t.shadow.matrix,m++}i.directional[c]=e,c++}else if(t.isSpotLight){const e=n.get(t);e.position.setFromMatrixPosition(t.matrixWorld),e.color.copy(s).multiplyScalar(_*b),e.distance=w,e.coneCos=Math.cos(t.angle),e.penumbraCos=Math.cos(t.angle*(1-t.penumbra)),e.decay=t.decay,i.spot[d]=e;const a=t.shadow;if(t.map&&(i.spotLightMap[y]=t.map,y++,a.updateMatrices(t),t.castShadow&&x++),i.spotLightMatrix[d]=a.matrix,t.castShadow){const e=r.get(t);e.shadowBias=a.bias,e.shadowNormalBias=a.normalBias,e.shadowRadius=a.radius,e.shadowMapSize=a.mapSize,i.spotShadow[d]=e,i.spotShadowMap[d]=M,v++}d++}else if(t.isRectAreaLight){const e=n.get(t);e.color.copy(s).multiplyScalar(_),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[f]=e,f++}else if(t.isPointLight){const e=n.get(t);if(e.color.copy(t.color).multiplyScalar(t.intensity*b),e.distance=t.distance,e.decay=t.decay,t.castShadow){const e=t.shadow,n=r.get(t);n.shadowBias=e.bias,n.shadowNormalBias=e.normalBias,n.shadowRadius=e.radius,n.shadowMapSize=e.mapSize,n.shadowCameraNear=e.camera.near,n.shadowCameraFar=e.camera.far,i.pointShadow[h]=n,i.pointShadowMap[h]=M,i.pointShadowMatrix[h]=t.shadow.matrix,g++}i.point[h]=e,h++}else if(t.isHemisphereLight){const e=n.get(t);e.skyColor.copy(t.color).multiplyScalar(_*b),e.groundColor.copy(t.groundColor).multiplyScalar(_*b),i.hemi[p]=e,p++}}f>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=Ba.LTC_FLOAT_1,i.rectAreaLTC2=Ba.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=Ba.LTC_HALF_1,i.rectAreaLTC2=Ba.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),i.ambient[0]=o,i.ambient[1]=l,i.ambient[2]=u;const _=i.hash;_.directionalLength===c&&_.pointLength===h&&_.spotLength===d&&_.rectAreaLength===f&&_.hemiLength===p&&_.numDirectionalShadows===m&&_.numPointShadows===g&&_.numSpotShadows===v&&_.numSpotMaps===y||(i.directional.length=c,i.spot.length=d,i.rectArea.length=f,i.point.length=h,i.hemi.length=p,i.directionalShadow.length=m,i.directionalShadowMap.length=m,i.pointShadow.length=g,i.pointShadowMap.length=g,i.spotShadow.length=v,i.spotShadowMap.length=v,i.directionalShadowMatrix.length=m,i.pointShadowMatrix.length=g,i.spotLightMatrix.length=v+y-x,i.spotLightMap.length=y,i.numSpotLightShadowsWithMaps=x,_.directionalLength=c,_.pointLength=h,_.spotLength=d,_.rectAreaLength=f,_.hemiLength=p,_.numDirectionalShadows=m,_.numPointShadows=g,_.numSpotShadows=v,_.numSpotMaps=y,i.version=Oo++)},setupView:function(e,t){let n=0,r=0,l=0,u=0,c=0;const h=t.matrixWorldInverse;for(let t=0,d=e.length;t<d;t++){const d=e[t];if(d.isDirectionalLight){const e=i.directional[n];e.direction.setFromMatrixPosition(d.matrixWorld),a.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(h),n++}else if(d.isSpotLight){const e=i.spot[l];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(h),e.direction.setFromMatrixPosition(d.matrixWorld),a.setFromMatrixPosition(d.target.matrixWorld),e.direction.sub(a),e.direction.transformDirection(h),l++}else if(d.isRectAreaLight){const e=i.rectArea[u];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(h),o.identity(),s.copy(d.matrixWorld),s.premultiply(h),o.extractRotation(s),e.halfWidth.set(.5*d.width,0,0),e.halfHeight.set(0,.5*d.height,0),e.halfWidth.applyMatrix4(o),e.halfHeight.applyMatrix4(o),u++}else if(d.isPointLight){const e=i.point[r];e.position.setFromMatrixPosition(d.matrixWorld),e.position.applyMatrix4(h),r++}else if(d.isHemisphereLight){const e=i.hemi[c];e.direction.setFromMatrixPosition(d.matrixWorld),e.direction.transformDirection(h),c++}}},state:i}}function Uo(e,t){const n=new zo(e,t),r=[],i=[];return{init:function(){r.length=0,i.length=0},state:{lightsArray:r,shadowsArray:i,lights:n},setupLights:function(e){n.setup(r,e)},setupLightsView:function(e){n.setupView(r,e)},pushLight:function(e){r.push(e)},pushShadow:function(e){i.push(e)}}}function Go(e,t){let n=new WeakMap;return{get:function(r,i=0){const a=n.get(r);let s;return void 0===a?(s=new Uo(e,t),n.set(r,[s])):i>=a.length?(s=new Uo(e,t),a.push(s)):s=a[i],s},dispose:function(){n=new WeakMap}}}class Ho extends wi{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Dt,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}}class Vo extends wi{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.referencePosition=new lr,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function Wo(e,t,n){let r=new Sa;const i=new Pn,a=new Pn,s=new er,o=new Ho({depthPacking:It}),l=new Vo,u={},c=n.maxTextureSize,d={0:m,1:p,2:g},v=new ha({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Pn},radius:{value:4}},vertexShader:"void main() {\n\tgl_Position = vec4( position, 1.0 );\n}",fragmentShader:"uniform sampler2D shadow_pass;\nuniform vec2 resolution;\nuniform float radius;\n#include <packing>\nvoid main() {\n\tconst float samples = float( VSM_SAMPLES );\n\tfloat mean = 0.0;\n\tfloat squared_mean = 0.0;\n\tfloat uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 );\n\tfloat uvStart = samples <= 1.0 ? 0.0 : - 1.0;\n\tfor ( float i = 0.0; i < samples; i ++ ) {\n\t\tfloat uvOffset = uvStart + i * uvStride;\n\t\t#ifdef HORIZONTAL_PASS\n\t\t\tvec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) );\n\t\t\tmean += distribution.x;\n\t\t\tsquared_mean += distribution.y * distribution.y + distribution.x * distribution.x;\n\t\t#else\n\t\t\tfloat depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) );\n\t\t\tmean += depth;\n\t\t\tsquared_mean += depth * depth;\n\t\t#endif\n\t}\n\tmean = mean / samples;\n\tsquared_mean = squared_mean / samples;\n\tfloat std_dev = sqrt( squared_mean - mean * mean );\n\tgl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) );\n}"}),x=v.clone();x.defines.HORIZONTAL_PASS=1;const b=new Wi;b.setAttribute("position",new Ci(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new ia(b,v),w=this;function M(n,r){const a=t.update(_);v.defines.VSM_SAMPLES!==n.blurSamples&&(v.defines.VSM_SAMPLES=n.blurSamples,x.defines.VSM_SAMPLES=n.blurSamples,v.needsUpdate=!0,x.needsUpdate=!0),null===n.mapPass&&(n.mapPass=new tr(i.x,i.y)),v.uniforms.shadow_pass.value=n.map.texture,v.uniforms.resolution.value=n.mapSize,v.uniforms.radius.value=n.radius,e.setRenderTarget(n.mapPass),e.clear(),e.renderBufferDirect(r,null,a,v,_,null),x.uniforms.shadow_pass.value=n.mapPass.texture,x.uniforms.resolution.value=n.mapSize,x.uniforms.radius.value=n.radius,e.setRenderTarget(n.map),e.clear(),e.renderBufferDirect(r,null,a,x,_,null)}function S(t,n,r,i,a,s){let c=null;const h=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==h)c=h;else if(c=!0===r.isPointLight?l:o,e.localClippingEnabled&&!0===n.clipShadows&&Array.isArray(n.clippingPlanes)&&0!==n.clippingPlanes.length||n.displacementMap&&0!==n.displacementScale||n.alphaMap&&n.alphaTest>0||n.map&&n.alphaTest>0){const e=c.uuid,t=n.uuid;let r=u[e];void 0===r&&(r={},u[e]=r);let i=r[t];void 0===i&&(i=c.clone(),r[t]=i),c=i}return c.visible=n.visible,c.wireframe=n.wireframe,c.side=s===f?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:d[n.side],c.alphaMap=n.alphaMap,c.alphaTest=n.alphaTest,c.map=n.map,c.clipShadows=n.clipShadows,c.clippingPlanes=n.clippingPlanes,c.clipIntersection=n.clipIntersection,c.displacementMap=n.displacementMap,c.displacementScale=n.displacementScale,c.displacementBias=n.displacementBias,c.wireframeLinewidth=n.wireframeLinewidth,c.linewidth=n.linewidth,!0===r.isPointLight&&!0===c.isMeshDistanceMaterial&&(c.referencePosition.setFromMatrixPosition(r.matrixWorld),c.nearDistance=i,c.farDistance=a),c}function A(n,i,a,s,o){if(!1===n.visible)return;if(n.layers.test(i.layers)&&(n.isMesh||n.isLine||n.isPoints)&&(n.castShadow||n.receiveShadow&&o===f)&&(!n.frustumCulled||r.intersectsObject(n))){n.modelViewMatrix.multiplyMatrices(a.matrixWorldInverse,n.matrixWorld);const r=t.update(n),i=n.material;if(Array.isArray(i)){const t=r.groups;for(let l=0,u=t.length;l<u;l++){const u=t[l],c=i[u.materialIndex];if(c&&c.visible){const t=S(n,c,s,a.near,a.far,o);e.renderBufferDirect(a,null,r,t,n,u)}}}else if(i.visible){const t=S(n,i,s,a.near,a.far,o);e.renderBufferDirect(a,null,r,t,n,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)A(l[e],i,a,s,o)}this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=h,this.render=function(t,n,o){if(!1===w.enabled)return;if(!1===w.autoUpdate&&!1===w.needsUpdate)return;if(0===t.length)return;const l=e.getRenderTarget(),u=e.getActiveCubeFace(),h=e.getActiveMipmapLevel(),d=e.state;d.setBlending(y),d.buffers.color.setClear(1,1,1,1),d.buffers.depth.setTest(!0),d.setScissorTest(!1);for(let l=0,u=t.length;l<u;l++){const u=t[l],h=u.shadow;if(void 0===h){console.warn("THREE.WebGLShadowMap:",u,"has no shadow.");continue}if(!1===h.autoUpdate&&!1===h.needsUpdate)continue;i.copy(h.mapSize);const p=h.getFrameExtents();if(i.multiply(p),a.copy(h.mapSize),(i.x>c||i.y>c)&&(i.x>c&&(a.x=Math.floor(c/p.x),i.x=a.x*p.x,h.mapSize.x=a.x),i.y>c&&(a.y=Math.floor(c/p.y),i.y=a.y*p.y,h.mapSize.y=a.y)),null===h.map){const e=this.type!==f?{minFilter:de,magFilter:de}:{};h.map=new tr(i.x,i.y,e),h.map.texture.name=u.name+".shadowMap",h.camera.updateProjectionMatrix()}e.setRenderTarget(h.map),e.clear();const m=h.getViewportCount();for(let e=0;e<m;e++){const t=h.getViewport(e);s.set(a.x*t.x,a.y*t.y,a.x*t.z,a.y*t.w),d.viewport(s),h.updateMatrices(u,e),r=h.getFrustum(),A(n,o,h.camera,u,this.type)}!0!==h.isPointLightShadow&&this.type===f&&M(h,o),h.needsUpdate=!1}w.needsUpdate=!1,e.setRenderTarget(l,u,h)}}function jo(e,t,n){const r=n.isWebGL2,i=new function(){let t=!1;const n=new er;let r=null;const i=new er(0,0,0,0);return{setMask:function(n){r===n||t||(e.colorMask(n,n,n,n),r=n)},setLocked:function(e){t=e},setClear:function(t,r,a,s,o){!0===o&&(t*=s,r*=s,a*=s),n.set(t,r,a,s),!1===i.equals(n)&&(e.clearColor(t,r,a,s),i.copy(n))},reset:function(){t=!1,r=null,i.set(-1,0,0,0)}}},a=new function(){let t=!1,n=null,r=null,i=null;return{setTest:function(e){e?_e(2929):we(2929)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){switch(t){case U:e.depthFunc(512);break;case G:e.depthFunc(519);break;case H:e.depthFunc(513);break;case V:e.depthFunc(515);break;case W:e.depthFunc(514);break;case j:e.depthFunc(518);break;case J:e.depthFunc(516);break;case X:e.depthFunc(517);break;default:e.depthFunc(515)}r=t}},setLocked:function(e){t=e},setClear:function(t){i!==t&&(e.clearDepth(t),i=t)},reset:function(){t=!1,n=null,r=null,i=null}}},u=new function(){let t=!1,n=null,r=null,i=null,a=null,s=null,o=null,l=null,u=null;return{setTest:function(e){t||(e?_e(2960):we(2960))},setMask:function(r){n===r||t||(e.stencilMask(r),n=r)},setFunc:function(t,n,s){r===t&&i===n&&a===s||(e.stencilFunc(t,n,s),r=t,i=n,a=s)},setOp:function(t,n,r){s===t&&o===n&&l===r||(e.stencilOp(t,n,r),s=t,o=n,l=r)},setLocked:function(e){t=e},setClear:function(t){u!==t&&(e.clearStencil(t),u=t)},reset:function(){t=!1,n=null,r=null,i=null,a=null,s=null,o=null,l=null,u=null}}},c=new WeakMap,h=new WeakMap;let d={},f={},p=new WeakMap,v=[],Y=null,K=!1,q=null,Q=null,Z=null,$=null,ee=null,te=null,ne=null,re=!1,ie=null,ae=null,se=null,oe=null,le=null;const ue=e.getParameter(35661);let ce=!1,he=0;const de=e.getParameter(7938);-1!==de.indexOf("WebGL")?(he=parseFloat(/^WebGL (\d)/.exec(de)[1]),ce=he>=1):-1!==de.indexOf("OpenGL ES")&&(he=parseFloat(/^OpenGL ES (\d)/.exec(de)[1]),ce=he>=2);let fe=null,pe={};const me=e.getParameter(3088),ge=e.getParameter(2978),ve=(new er).fromArray(me),ye=(new er).fromArray(ge);function xe(t,n,r){const i=new Uint8Array(4),a=e.createTexture();e.bindTexture(t,a),e.texParameteri(t,10241,9728),e.texParameteri(t,10240,9728);for(let t=0;t<r;t++)e.texImage2D(n+t,0,6408,1,1,0,6408,5121,i);return a}const be={};function _e(t){!0!==d[t]&&(e.enable(t),d[t]=!0)}function we(t){!1!==d[t]&&(e.disable(t),d[t]=!1)}be[3553]=xe(3553,3553,1),be[34067]=xe(34067,34069,6),i.setClear(0,0,0,1),a.setClear(1),u.setClear(0),_e(2929),a.setFunc(V),Ce(!1),Ee(o),_e(2884),Ae(y);const Me={[S]:32774,[A]:32778,[C]:32779};if(r)Me[E]=32775,Me[T]=32776;else{const e=t.get("EXT_blend_minmax");null!==e&&(Me[E]=e.MIN_EXT,Me[T]=e.MAX_EXT)}const Se={[B]:0,[P]:1,[R]:768,[D]:770,[z]:776,[O]:774,[k]:772,[L]:769,[I]:771,[N]:775,[F]:773};function Ae(t,n,r,i,a,s,o,l){if(t!==y){if(!1===K&&(_e(3042),K=!0),t===M)a=a||n,s=s||r,o=o||i,n===Q&&a===ee||(e.blendEquationSeparate(Me[n],Me[a]),Q=n,ee=a),r===Z&&i===$&&s===te&&o===ne||(e.blendFuncSeparate(Se[r],Se[i],Se[s],Se[o]),Z=r,$=i,te=s,ne=o),q=t,re=!1;else if(t!==q||l!==re){if(Q===S&&ee===S||(e.blendEquation(32774),Q=S,ee=S),l)switch(t){case x:e.blendFuncSeparate(1,771,1,771);break;case b:e.blendFunc(1,1);break;case _:e.blendFuncSeparate(0,769,0,1);break;case w:e.blendFuncSeparate(0,768,0,770);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case x:e.blendFuncSeparate(770,771,1,771);break;case b:e.blendFunc(770,1);break;case _:e.blendFuncSeparate(0,769,0,1);break;case w:e.blendFunc(0,768);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}Z=null,$=null,te=null,ne=null,q=t,re=l}}else!0===K&&(we(3042),K=!1)}function Ce(t){ie!==t&&(t?e.frontFace(2304):e.frontFace(2305),ie=t)}function Ee(t){t!==s?(_e(2884),t!==ae&&(t===o?e.cullFace(1029):t===l?e.cullFace(1028):e.cullFace(1032))):we(2884),ae=t}function Te(t,n,r){t?(_e(32823),oe===n&&le===r||(e.polygonOffset(n,r),oe=n,le=r)):we(32823)}return{buffers:{color:i,depth:a,stencil:u},enable:_e,disable:we,bindFramebuffer:function(t,n){return f[t]!==n&&(e.bindFramebuffer(t,n),f[t]=n,r&&(36009===t&&(f[36160]=n),36160===t&&(f[36009]=n)),!0)},drawBuffers:function(r,i){let a=v,s=!1;if(r)if(a=p.get(i),void 0===a&&(a=[],p.set(i,a)),r.isWebGLMultipleRenderTargets){const e=r.texture;if(a.length!==e.length||36064!==a[0]){for(let t=0,n=e.length;t<n;t++)a[t]=36064+t;a.length=e.length,s=!0}}else 36064!==a[0]&&(a[0]=36064,s=!0);else 1029!==a[0]&&(a[0]=1029,s=!0);s&&(n.isWebGL2?e.drawBuffers(a):t.get("WEBGL_draw_buffers").drawBuffersWEBGL(a))},useProgram:function(t){return Y!==t&&(e.useProgram(t),Y=t,!0)},setBlending:Ae,setMaterial:function(e,t){e.side===g?we(2884):_e(2884);let n=e.side===m;t&&(n=!n),Ce(n),e.blending===x&&!1===e.transparent?Ae(y):Ae(e.blending,e.blendEquation,e.blendSrc,e.blendDst,e.blendEquationAlpha,e.blendSrcAlpha,e.blendDstAlpha,e.premultipliedAlpha),a.setFunc(e.depthFunc),a.setTest(e.depthTest),a.setMask(e.depthWrite),i.setMask(e.colorWrite);const r=e.stencilWrite;u.setTest(r),r&&(u.setMask(e.stencilWriteMask),u.setFunc(e.stencilFunc,e.stencilRef,e.stencilFuncMask),u.setOp(e.stencilFail,e.stencilZFail,e.stencilZPass)),Te(e.polygonOffset,e.polygonOffsetFactor,e.polygonOffsetUnits),!0===e.alphaToCoverage?_e(32926):we(32926)},setFlipSided:Ce,setCullFace:Ee,setLineWidth:function(t){t!==se&&(ce&&e.lineWidth(t),se=t)},setPolygonOffset:Te,setScissorTest:function(e){e?_e(3089):we(3089)},activeTexture:function(t){void 0===t&&(t=33984+ue-1),fe!==t&&(e.activeTexture(t),fe=t)},bindTexture:function(t,n,r){void 0===r&&(r=null===fe?33984+ue-1:fe);let i=pe[r];void 0===i&&(i={type:void 0,texture:void 0},pe[r]=i),i.type===t&&i.texture===n||(fe!==r&&(e.activeTexture(r),fe=r),e.bindTexture(t,n||be[t]),i.type=t,i.texture=n)},unbindTexture:function(){const t=pe[fe];void 0!==t&&void 0!==t.type&&(e.bindTexture(t.type,null),t.type=void 0,t.texture=void 0)},compressedTexImage2D:function(){try{e.compressedTexImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexImage3D:function(){try{e.compressedTexImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage2D:function(){try{e.texImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texImage3D:function(){try{e.texImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},updateUBOMapping:function(t,n){let r=h.get(n);void 0===r&&(r=new WeakMap,h.set(n,r));let i=r.get(t);void 0===i&&(i=e.getUniformBlockIndex(n,t.name),r.set(t,i))},uniformBlockBinding:function(t,n){const r=h.get(n).get(t);c.get(n)!==r&&(e.uniformBlockBinding(n,r,t.__bindingPointIndex),c.set(n,r))},texStorage2D:function(){try{e.texStorage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texStorage3D:function(){try{e.texStorage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage2D:function(){try{e.texSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},texSubImage3D:function(){try{e.texSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage2D:function(){try{e.compressedTexSubImage2D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},compressedTexSubImage3D:function(){try{e.compressedTexSubImage3D.apply(e,arguments)}catch(e){console.error("THREE.WebGLState:",e)}},scissor:function(t){!1===ve.equals(t)&&(e.scissor(t.x,t.y,t.z,t.w),ve.copy(t))},viewport:function(t){!1===ye.equals(t)&&(e.viewport(t.x,t.y,t.z,t.w),ye.copy(t))},reset:function(){e.disable(3042),e.disable(2884),e.disable(2929),e.disable(32823),e.disable(3089),e.disable(2960),e.disable(32926),e.blendEquation(32774),e.blendFunc(1,0),e.blendFuncSeparate(1,0,1,0),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(513),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(519,0,4294967295),e.stencilOp(7680,7680,7680),e.clearStencil(0),e.cullFace(1029),e.frontFace(2305),e.polygonOffset(0,0),e.activeTexture(33984),e.bindFramebuffer(36160,null),!0===r&&(e.bindFramebuffer(36009,null),e.bindFramebuffer(36008,null)),e.useProgram(null),e.lineWidth(1),e.scissor(0,0,e.canvas.width,e.canvas.height),e.viewport(0,0,e.canvas.width,e.canvas.height),d={},fe=null,pe={},f={},p=new WeakMap,v=[],Y=null,K=!1,q=null,Q=null,Z=null,$=null,ee=null,te=null,ne=null,re=!1,ie=null,ae=null,se=null,oe=null,le=null,ve.set(0,0,e.canvas.width,e.canvas.height),ye.set(0,0,e.canvas.width,e.canvas.height),i.reset(),a.reset(),u.reset()}}}function Jo(e,t,n,r,i,a,s){const o=i.isWebGL2,l=i.maxTextures,u=i.maxCubemapSize,c=i.maxTextureSize,h=i.maxSamples,d=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,f="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),p=new WeakMap;let m;const g=new WeakMap;let v=!1;try{v="undefined"!=typeof OffscreenCanvas&&null!==new OffscreenCanvas(1,1).getContext("2d")}catch(e){}function y(e,t){return v?new OffscreenCanvas(e,t):Fn("canvas")}function x(e,t,n,r){let i=1;if((e.width>r||e.height>r)&&(i=r/Math.max(e.width,e.height)),i<1||!0===t){if("undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap){const r=t?Cn:Math.floor,a=r(i*e.width),s=r(i*e.height);void 0===m&&(m=y(a,s));const o=n?y(a,s):m;return o.width=a,o.height=s,o.getContext("2d").drawImage(e,0,0,a,s),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+e.width+"x"+e.height+") to ("+a+"x"+s+")."),o}return"data"in e&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+e.width+"x"+e.height+")."),e}return e}function b(e){return Sn(e.width)&&Sn(e.height)}function _(e,t){return e.generateMipmaps&&t&&e.minFilter!==de&&e.minFilter!==ve}function w(t){e.generateMipmap(t)}function M(n,r,i,a,s=!1){if(!1===o)return r;if(null!==n){if(void 0!==e[n])return e[n];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+n+"'")}let l=r;return 6403===r&&(5126===i&&(l=33326),5131===i&&(l=33325),5121===i&&(l=33321)),33319===r&&(5126===i&&(l=33328),5131===i&&(l=33327),5121===i&&(l=33323)),6408===r&&(5126===i&&(l=34836),5131===i&&(l=34842),5121===i&&(l=a===Lt&&!1===s?35907:32856),32819===i&&(l=32854),32820===i&&(l=32855)),33325!==l&&33326!==l&&33327!==l&&33328!==l&&34842!==l&&34836!==l||t.get("EXT_color_buffer_float"),l}function S(e,t,n){return!0===_(e,n)||e.isFramebufferTexture&&e.minFilter!==de&&e.minFilter!==ve?Math.log2(Math.max(t.width,t.height))+1:void 0!==e.mipmaps&&e.mipmaps.length>0?e.mipmaps.length:e.isCompressedTexture&&Array.isArray(e.image)?t.mipmaps.length:1}function A(e){return e===de||e===fe||e===me?9728:9729}function C(e){const t=e.target;t.removeEventListener("dispose",C),function(e){const t=r.get(e);if(void 0===t.__webglInit)return;const n=e.source,i=g.get(n);if(i){const r=i[t.__cacheKey];r.usedTimes--,0===r.usedTimes&&T(e),0===Object.keys(i).length&&g.delete(n)}r.remove(e)}(t),t.isVideoTexture&&p.delete(t)}function E(t){const n=t.target;n.removeEventListener("dispose",E),function(t){const n=t.texture,i=r.get(t),a=r.get(n);if(void 0!==a.__webglTexture&&(e.deleteTexture(a.__webglTexture),s.memory.textures--),t.depthTexture&&t.depthTexture.dispose(),t.isWebGLCubeRenderTarget)for(let t=0;t<6;t++)e.deleteFramebuffer(i.__webglFramebuffer[t]),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer[t]);else{if(e.deleteFramebuffer(i.__webglFramebuffer),i.__webglDepthbuffer&&e.deleteRenderbuffer(i.__webglDepthbuffer),i.__webglMultisampledFramebuffer&&e.deleteFramebuffer(i.__webglMultisampledFramebuffer),i.__webglColorRenderbuffer)for(let t=0;t<i.__webglColorRenderbuffer.length;t++)i.__webglColorRenderbuffer[t]&&e.deleteRenderbuffer(i.__webglColorRenderbuffer[t]);i.__webglDepthRenderbuffer&&e.deleteRenderbuffer(i.__webglDepthRenderbuffer)}if(t.isWebGLMultipleRenderTargets)for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);i.__webglTexture&&(e.deleteTexture(i.__webglTexture),s.memory.textures--),r.remove(n[t])}r.remove(n),r.remove(t)}(n)}function T(t){const n=r.get(t);e.deleteTexture(n.__webglTexture);const i=t.source;delete g.get(i)[n.__cacheKey],s.memory.textures--}let B=0;function P(e,t){const i=r.get(e);if(e.isVideoTexture&&function(e){const t=s.render.frame;p.get(e)!==t&&(p.set(e,t),e.update())}(e),!1===e.isRenderTargetTexture&&e.version>0&&i.__version!==e.version){const n=e.image;if(null===n)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==n.complete)return void k(i,e,t);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(3553,i.__webglTexture,33984+t)}const R={[ue]:10497,[ce]:33071,[he]:33648},L={[de]:9728,[fe]:9984,[me]:9986,[ve]:9729,[ye]:9985,[be]:9987};function D(n,a,s){if(s?(e.texParameteri(n,10242,R[a.wrapS]),e.texParameteri(n,10243,R[a.wrapT]),32879!==n&&35866!==n||e.texParameteri(n,32882,R[a.wrapR]),e.texParameteri(n,10240,L[a.magFilter]),e.texParameteri(n,10241,L[a.minFilter])):(e.texParameteri(n,10242,33071),e.texParameteri(n,10243,33071),32879!==n&&35866!==n||e.texParameteri(n,32882,33071),a.wrapS===ce&&a.wrapT===ce||console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),e.texParameteri(n,10240,A(a.magFilter)),e.texParameteri(n,10241,A(a.minFilter)),a.minFilter!==de&&a.minFilter!==ve&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),!0===t.has("EXT_texture_filter_anisotropic")){const s=t.get("EXT_texture_filter_anisotropic");if(a.magFilter===de)return;if(a.minFilter!==me&&a.minFilter!==be)return;if(a.type===Te&&!1===t.has("OES_texture_float_linear"))return;if(!1===o&&a.type===Be&&!1===t.has("OES_texture_half_float_linear"))return;(a.anisotropy>1||r.get(a).__currentAnisotropy)&&(e.texParameterf(n,s.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(a.anisotropy,i.getMaxAnisotropy())),r.get(a).__currentAnisotropy=a.anisotropy)}}function I(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",C));const i=n.source;let a=g.get(i);void 0===a&&(a={},g.set(i,a));const o=function(e){const t=[];return t.push(e.wrapS),t.push(e.wrapT),t.push(e.wrapR||0),t.push(e.magFilter),t.push(e.minFilter),t.push(e.anisotropy),t.push(e.internalFormat),t.push(e.format),t.push(e.type),t.push(e.generateMipmaps),t.push(e.premultiplyAlpha),t.push(e.flipY),t.push(e.unpackAlignment),t.push(e.encoding),t.join()}(n);if(o!==t.__cacheKey){void 0===a[o]&&(a[o]={texture:e.createTexture(),usedTimes:0},s.memory.textures++,r=!0),a[o].usedTimes++;const i=a[t.__cacheKey];void 0!==i&&(a[t.__cacheKey].usedTimes--,0===i.usedTimes&&T(n)),t.__cacheKey=o,t.__webglTexture=a[o].texture}return r}function k(t,i,s){let l=3553;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(l=35866),i.isData3DTexture&&(l=32879);const u=I(t,i),h=i.source;n.bindTexture(l,t.__webglTexture,33984+s);const d=r.get(h);if(h.version!==d.__version||!0===u){n.activeTexture(33984+s),e.pixelStorei(37440,i.flipY),e.pixelStorei(37441,i.premultiplyAlpha),e.pixelStorei(3317,i.unpackAlignment),e.pixelStorei(37443,0);const t=function(e){return!o&&(e.wrapS!==ce||e.wrapT!==ce||e.minFilter!==de&&e.minFilter!==ve)}(i)&&!1===b(i.image);let r=x(i.image,t,!1,c);r=G(i,r);const f=b(r)||o,p=a.convert(i.format,i.encoding);let m,g=a.convert(i.type),v=M(i.internalFormat,p,g,i.encoding,i.isVideoTexture);D(l,i,f);const y=i.mipmaps,A=o&&!0!==i.isVideoTexture,C=void 0===d.__version||!0===u,E=S(i,r,f);if(i.isDepthTexture)v=6402,o?v=i.type===Te?36012:i.type===Ee?33190:i.type===Le?35056:33189:i.type===Te&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===Ne&&6402===v&&i.type!==Ae&&i.type!==Ee&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=Ee,g=a.convert(i.type)),i.format===ze&&6402===v&&(v=34041,i.type!==Le&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=Le,g=a.convert(i.type))),C&&(A?n.texStorage2D(3553,1,v,r.width,r.height):n.texImage2D(3553,0,v,r.width,r.height,0,p,g,null));else if(i.isDataTexture)if(y.length>0&&f){A&&C&&n.texStorage2D(3553,E,v,y[0].width,y[0].height);for(let e=0,t=y.length;e<t;e++)m=y[e],A?n.texSubImage2D(3553,e,0,0,m.width,m.height,p,g,m.data):n.texImage2D(3553,e,v,m.width,m.height,0,p,g,m.data);i.generateMipmaps=!1}else A?(C&&n.texStorage2D(3553,E,v,r.width,r.height),n.texSubImage2D(3553,0,0,0,r.width,r.height,p,g,r.data)):n.texImage2D(3553,0,v,r.width,r.height,0,p,g,r.data);else if(i.isCompressedTexture)if(i.isCompressedArrayTexture){A&&C&&n.texStorage3D(35866,E,v,y[0].width,y[0].height,r.depth);for(let e=0,t=y.length;e<t;e++)m=y[e],i.format!==ke?null!==p?A?n.compressedTexSubImage3D(35866,e,0,0,0,m.width,m.height,r.depth,p,m.data,0,0):n.compressedTexImage3D(35866,e,v,m.width,m.height,r.depth,0,m.data,0,0):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):A?n.texSubImage3D(35866,e,0,0,0,m.width,m.height,r.depth,p,g,m.data):n.texImage3D(35866,e,v,m.width,m.height,r.depth,0,p,g,m.data)}else{A&&C&&n.texStorage2D(3553,E,v,y[0].width,y[0].height);for(let e=0,t=y.length;e<t;e++)m=y[e],i.format!==ke?null!==p?A?n.compressedTexSubImage2D(3553,e,0,0,m.width,m.height,p,m.data):n.compressedTexImage2D(3553,e,v,m.width,m.height,0,m.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):A?n.texSubImage2D(3553,e,0,0,m.width,m.height,p,g,m.data):n.texImage2D(3553,e,v,m.width,m.height,0,p,g,m.data)}else if(i.isDataArrayTexture)A?(C&&n.texStorage3D(35866,E,v,r.width,r.height,r.depth),n.texSubImage3D(35866,0,0,0,0,r.width,r.height,r.depth,p,g,r.data)):n.texImage3D(35866,0,v,r.width,r.height,r.depth,0,p,g,r.data);else if(i.isData3DTexture)A?(C&&n.texStorage3D(32879,E,v,r.width,r.height,r.depth),n.texSubImage3D(32879,0,0,0,0,r.width,r.height,r.depth,p,g,r.data)):n.texImage3D(32879,0,v,r.width,r.height,r.depth,0,p,g,r.data);else if(i.isFramebufferTexture){if(C)if(A)n.texStorage2D(3553,E,v,r.width,r.height);else{let e=r.width,t=r.height;for(let r=0;r<E;r++)n.texImage2D(3553,r,v,e,t,0,p,g,null),e>>=1,t>>=1}}else if(y.length>0&&f){A&&C&&n.texStorage2D(3553,E,v,y[0].width,y[0].height);for(let e=0,t=y.length;e<t;e++)m=y[e],A?n.texSubImage2D(3553,e,0,0,p,g,m):n.texImage2D(3553,e,v,p,g,m);i.generateMipmaps=!1}else A?(C&&n.texStorage2D(3553,E,v,r.width,r.height),n.texSubImage2D(3553,0,0,0,p,g,r)):n.texImage2D(3553,0,v,p,g,r);_(i,f)&&w(l),d.__version=h.version,i.onUpdate&&i.onUpdate(i)}t.__version=i.version}function F(t,i,s,o,l){const u=a.convert(s.format,s.encoding),c=a.convert(s.type),h=M(s.internalFormat,u,c,s.encoding);r.get(i).__hasExternalTextures||(32879===l||35866===l?n.texImage3D(l,0,h,i.width,i.height,i.depth,0,u,c,null):n.texImage2D(l,0,h,i.width,i.height,0,u,c,null)),n.bindFramebuffer(36160,t),U(i)?d.framebufferTexture2DMultisampleEXT(36160,o,l,r.get(s).__webglTexture,0,z(i)):(3553===l||l>=34069&&l<=34074)&&e.framebufferTexture2D(36160,o,l,r.get(s).__webglTexture,0),n.bindFramebuffer(36160,null)}function O(t,n,r){if(e.bindRenderbuffer(36161,t),n.depthBuffer&&!n.stencilBuffer){let i=33189;if(r||U(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===Te?i=36012:t.type===Ee&&(i=33190));const r=z(n);U(n)?d.renderbufferStorageMultisampleEXT(36161,r,i,n.width,n.height):e.renderbufferStorageMultisample(36161,r,i,n.width,n.height)}else e.renderbufferStorage(36161,i,n.width,n.height);e.framebufferRenderbuffer(36160,36096,36161,t)}else if(n.depthBuffer&&n.stencilBuffer){const i=z(n);r&&!1===U(n)?e.renderbufferStorageMultisample(36161,i,35056,n.width,n.height):U(n)?d.renderbufferStorageMultisampleEXT(36161,i,35056,n.width,n.height):e.renderbufferStorage(36161,34041,n.width,n.height),e.framebufferRenderbuffer(36160,33306,36161,t)}else{const t=!0===n.isWebGLMultipleRenderTargets?n.texture:[n.texture];for(let i=0;i<t.length;i++){const s=t[i],o=a.convert(s.format,s.encoding),l=a.convert(s.type),u=M(s.internalFormat,o,l,s.encoding),c=z(n);r&&!1===U(n)?e.renderbufferStorageMultisample(36161,c,u,n.width,n.height):U(n)?d.renderbufferStorageMultisampleEXT(36161,c,u,n.width,n.height):e.renderbufferStorage(36161,u,n.width,n.height)}}e.bindRenderbuffer(36161,null)}function N(t){const i=r.get(t),a=!0===t.isWebGLCubeRenderTarget;if(t.depthTexture&&!i.__autoAllocateDepthBuffer){if(a)throw new Error("target.depthTexture not supported in Cube render targets");!function(t,i){if(i&&i.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(n.bindFramebuffer(36160,t),!i.depthTexture||!i.depthTexture.isDepthTexture)throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");r.get(i.depthTexture).__webglTexture&&i.depthTexture.image.width===i.width&&i.depthTexture.image.height===i.height||(i.depthTexture.image.width=i.width,i.depthTexture.image.height=i.height,i.depthTexture.needsUpdate=!0),P(i.depthTexture,0);const a=r.get(i.depthTexture).__webglTexture,s=z(i);if(i.depthTexture.format===Ne)U(i)?d.framebufferTexture2DMultisampleEXT(36160,36096,3553,a,0,s):e.framebufferTexture2D(36160,36096,3553,a,0);else{if(i.depthTexture.format!==ze)throw new Error("Unknown depthTexture format");U(i)?d.framebufferTexture2DMultisampleEXT(36160,33306,3553,a,0,s):e.framebufferTexture2D(36160,33306,3553,a,0)}}(i.__webglFramebuffer,t)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(36160,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),O(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(36160,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),O(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(36160,null)}function z(e){return Math.min(h,e.samples)}function U(e){const n=r.get(e);return o&&e.samples>0&&!0===t.has("WEBGL_multisampled_render_to_texture")&&!1!==n.__useRenderToTexture}function G(e,n){const r=e.encoding,i=e.format,a=e.type;return!0===e.isCompressedTexture||!0===e.isVideoTexture||e.format===pn||r!==Rt&&(r===Lt?!1===o?!0===t.has("EXT_sRGB")&&i===ke?(e.format=pn,e.minFilter=ve,e.generateMipmaps=!1):n=Kn.sRGBToLinear(n):i===ke&&a===we||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture encoding:",r)),n}this.allocateTextureUnit=function(){const e=B;return e>=l&&console.warn("THREE.WebGLTextures: Trying to use "+e+" texture units while this GPU supports only "+l),B+=1,e},this.resetTextureUnits=function(){B=0},this.setTexture2D=P,this.setTexture2DArray=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?k(i,e,t):n.bindTexture(35866,i.__webglTexture,33984+t)},this.setTexture3D=function(e,t){const i=r.get(e);e.version>0&&i.__version!==e.version?k(i,e,t):n.bindTexture(32879,i.__webglTexture,33984+t)},this.setTextureCube=function(t,i){const s=r.get(t);t.version>0&&s.__version!==t.version?function(t,i,s){if(6!==i.image.length)return;const l=I(t,i),c=i.source;n.bindTexture(34067,t.__webglTexture,33984+s);const h=r.get(c);if(c.version!==h.__version||!0===l){n.activeTexture(33984+s),e.pixelStorei(37440,i.flipY),e.pixelStorei(37441,i.premultiplyAlpha),e.pixelStorei(3317,i.unpackAlignment),e.pixelStorei(37443,0);const t=i.isCompressedTexture||i.image[0].isCompressedTexture,r=i.image[0]&&i.image[0].isDataTexture,d=[];for(let e=0;e<6;e++)d[e]=t||r?r?i.image[e].image:i.image[e]:x(i.image[e],!1,!0,u),d[e]=G(i,d[e]);const f=d[0],p=b(f)||o,m=a.convert(i.format,i.encoding),g=a.convert(i.type),v=M(i.internalFormat,m,g,i.encoding),y=o&&!0!==i.isVideoTexture,A=void 0===h.__version||!0===l;let C,E=S(i,f,p);if(D(34067,i,p),t){y&&A&&n.texStorage2D(34067,E,v,f.width,f.height);for(let e=0;e<6;e++){C=d[e].mipmaps;for(let t=0;t<C.length;t++){const r=C[t];i.format!==ke?null!==m?y?n.compressedTexSubImage2D(34069+e,t,0,0,r.width,r.height,m,r.data):n.compressedTexImage2D(34069+e,t,v,r.width,r.height,0,r.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):y?n.texSubImage2D(34069+e,t,0,0,r.width,r.height,m,g,r.data):n.texImage2D(34069+e,t,v,r.width,r.height,0,m,g,r.data)}}}else{C=i.mipmaps,y&&A&&(C.length>0&&E++,n.texStorage2D(34067,E,v,d[0].width,d[0].height));for(let e=0;e<6;e++)if(r){y?n.texSubImage2D(34069+e,0,0,0,d[e].width,d[e].height,m,g,d[e].data):n.texImage2D(34069+e,0,v,d[e].width,d[e].height,0,m,g,d[e].data);for(let t=0;t<C.length;t++){const r=C[t].image[e].image;y?n.texSubImage2D(34069+e,t+1,0,0,r.width,r.height,m,g,r.data):n.texImage2D(34069+e,t+1,v,r.width,r.height,0,m,g,r.data)}}else{y?n.texSubImage2D(34069+e,0,0,0,m,g,d[e]):n.texImage2D(34069+e,0,v,m,g,d[e]);for(let t=0;t<C.length;t++){const r=C[t];y?n.texSubImage2D(34069+e,t+1,0,0,m,g,r.image[e]):n.texImage2D(34069+e,t+1,v,m,g,r.image[e])}}}_(i,p)&&w(34067),h.__version=c.version,i.onUpdate&&i.onUpdate(i)}t.__version=i.version}(s,t,i):n.bindTexture(34067,s.__webglTexture,33984+i)},this.rebindTextures=function(e,t,n){const i=r.get(e);void 0!==t&&F(i.__webglFramebuffer,e,e.texture,36064,3553),void 0!==n&&N(e)},this.setupRenderTarget=function(t){const l=t.texture,u=r.get(t),c=r.get(l);t.addEventListener("dispose",E),!0!==t.isWebGLMultipleRenderTargets&&(void 0===c.__webglTexture&&(c.__webglTexture=e.createTexture()),c.__version=l.version,s.memory.textures++);const h=!0===t.isWebGLCubeRenderTarget,d=!0===t.isWebGLMultipleRenderTargets,f=b(t)||o;if(h){u.__webglFramebuffer=[];for(let t=0;t<6;t++)u.__webglFramebuffer[t]=e.createFramebuffer()}else{if(u.__webglFramebuffer=e.createFramebuffer(),d)if(i.drawBuffers){const n=t.texture;for(let t=0,i=n.length;t<i;t++){const i=r.get(n[t]);void 0===i.__webglTexture&&(i.__webglTexture=e.createTexture(),s.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");if(o&&t.samples>0&&!1===U(t)){const r=d?l:[l];u.__webglMultisampledFramebuffer=e.createFramebuffer(),u.__webglColorRenderbuffer=[],n.bindFramebuffer(36160,u.__webglMultisampledFramebuffer);for(let n=0;n<r.length;n++){const i=r[n];u.__webglColorRenderbuffer[n]=e.createRenderbuffer(),e.bindRenderbuffer(36161,u.__webglColorRenderbuffer[n]);const s=a.convert(i.format,i.encoding),o=a.convert(i.type),l=M(i.internalFormat,s,o,i.encoding,!0===t.isXRRenderTarget),c=z(t);e.renderbufferStorageMultisample(36161,c,l,t.width,t.height),e.framebufferRenderbuffer(36160,36064+n,36161,u.__webglColorRenderbuffer[n])}e.bindRenderbuffer(36161,null),t.depthBuffer&&(u.__webglDepthRenderbuffer=e.createRenderbuffer(),O(u.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(36160,null)}}if(h){n.bindTexture(34067,c.__webglTexture),D(34067,l,f);for(let e=0;e<6;e++)F(u.__webglFramebuffer[e],t,l,36064,34069+e);_(l,f)&&w(34067),n.unbindTexture()}else if(d){const e=t.texture;for(let i=0,a=e.length;i<a;i++){const a=e[i],s=r.get(a);n.bindTexture(3553,s.__webglTexture),D(3553,a,f),F(u.__webglFramebuffer,t,a,36064+i,3553),_(a,f)&&w(3553)}n.unbindTexture()}else{let e=3553;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(o?e=t.isWebGL3DRenderTarget?32879:35866:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(e,c.__webglTexture),D(e,l,f),F(u.__webglFramebuffer,t,l,36064,e),_(l,f)&&w(e),n.unbindTexture()}t.depthBuffer&&N(t)},this.updateRenderTargetMipmap=function(e){const t=b(e)||o,i=!0===e.isWebGLMultipleRenderTargets?e.texture:[e.texture];for(let a=0,s=i.length;a<s;a++){const s=i[a];if(_(s,t)){const t=e.isWebGLCubeRenderTarget?34067:3553,i=r.get(s).__webglTexture;n.bindTexture(t,i),w(t),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(o&&t.samples>0&&!1===U(t)){const i=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],a=t.width,s=t.height;let o=16384;const l=[],u=t.stencilBuffer?33306:36096,c=r.get(t),h=!0===t.isWebGLMultipleRenderTargets;if(h)for(let t=0;t<i.length;t++)n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064+t,36161,null),n.bindFramebuffer(36160,c.__webglFramebuffer),e.framebufferTexture2D(36009,36064+t,3553,null,0);n.bindFramebuffer(36008,c.__webglMultisampledFramebuffer),n.bindFramebuffer(36009,c.__webglFramebuffer);for(let n=0;n<i.length;n++){l.push(36064+n),t.depthBuffer&&l.push(u);const d=void 0!==c.__ignoreDepthValues&&c.__ignoreDepthValues;if(!1===d&&(t.depthBuffer&&(o|=256),t.stencilBuffer&&(o|=1024)),h&&e.framebufferRenderbuffer(36008,36064,36161,c.__webglColorRenderbuffer[n]),!0===d&&(e.invalidateFramebuffer(36008,[u]),e.invalidateFramebuffer(36009,[u])),h){const t=r.get(i[n]).__webglTexture;e.framebufferTexture2D(36009,36064,3553,t,0)}e.blitFramebuffer(0,0,a,s,0,0,a,s,o,9728),f&&e.invalidateFramebuffer(36008,l)}if(n.bindFramebuffer(36008,null),n.bindFramebuffer(36009,null),h)for(let t=0;t<i.length;t++){n.bindFramebuffer(36160,c.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(36160,36064+t,36161,c.__webglColorRenderbuffer[t]);const a=r.get(i[t]).__webglTexture;n.bindFramebuffer(36160,c.__webglFramebuffer),e.framebufferTexture2D(36009,36064+t,3553,a,0)}n.bindFramebuffer(36009,c.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=N,this.setupFrameBufferTexture=F,this.useMultisampledRTT=U}function Xo(e,t,n){const r=n.isWebGL2;return{convert:function(n,i=null){let a;if(n===we)return 5121;if(n===Pe)return 32819;if(n===Re)return 32820;if(n===Me)return 5120;if(n===Se)return 5122;if(n===Ae)return 5123;if(n===Ce)return 5124;if(n===Ee)return 5125;if(n===Te)return 5126;if(n===Be)return r?5131:(a=t.get("OES_texture_half_float"),null!==a?a.HALF_FLOAT_OES:null);if(n===De)return 6406;if(n===ke)return 6408;if(n===Fe)return 6409;if(n===Oe)return 6410;if(n===Ne)return 6402;if(n===ze)return 34041;if(n===Ie)return console.warn("THREE.WebGLRenderer: THREE.RGBFormat has been removed. Use THREE.RGBAFormat instead. https://github.com/mrdoob/three.js/pull/23228"),6408;if(n===pn)return a=t.get("EXT_sRGB"),null!==a?a.SRGB_ALPHA_EXT:null;if(n===Ue)return 6403;if(n===Ge)return 36244;if(n===He)return 33319;if(n===Ve)return 33320;if(n===We)return 36249;if(n===je||n===Je||n===Xe||n===Ye)if(i===Lt){if(a=t.get("WEBGL_compressed_texture_s3tc_srgb"),null===a)return null;if(n===je)return a.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(n===Je)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(n===Xe)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(n===Ye)return a.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else{if(a=t.get("WEBGL_compressed_texture_s3tc"),null===a)return null;if(n===je)return a.COMPRESSED_RGB_S3TC_DXT1_EXT;if(n===Je)return a.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(n===Xe)return a.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(n===Ye)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===Ke||n===qe||n===Qe||n===Ze){if(a=t.get("WEBGL_compressed_texture_pvrtc"),null===a)return null;if(n===Ke)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===qe)return a.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(n===Qe)return a.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(n===Ze)return a.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}if(n===$e)return a=t.get("WEBGL_compressed_texture_etc1"),null!==a?a.COMPRESSED_RGB_ETC1_WEBGL:null;if(n===et||n===tt){if(a=t.get("WEBGL_compressed_texture_etc"),null===a)return null;if(n===et)return i===Lt?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(n===tt)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}if(n===nt||n===rt||n===it||n===at||n===st||n===ot||n===lt||n===ut||n===ct||n===ht||n===dt||n===ft||n===pt||n===mt){if(a=t.get("WEBGL_compressed_texture_astc"),null===a)return null;if(n===nt)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===rt)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===it)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===at)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===st)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===ot)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===lt)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===ut)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===ct)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===ht)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===dt)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===ft)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===pt)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===mt)return i===Lt?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===gt){if(a=t.get("EXT_texture_compression_bptc"),null===a)return null;if(n===gt)return i===Lt?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}return n===Le?r?34042:(a=t.get("WEBGL_depth_texture"),null!==a?a.UNSIGNED_INT_24_8_WEBGL:null):void 0!==e[n]?e[n]:null}}}class Yo extends fa{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Ko extends ui{constructor(){super(),this.isGroup=!0,this.type="Group"}}const qo={type:"move"};class Qo{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new Ko,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return null===this._targetRay&&(this._targetRay=new Ko,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new lr,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new lr),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new Ko,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new lr,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new lr),this._grip}dispatchEvent(e){return null!==this._targetRay&&this._targetRay.dispatchEvent(e),null!==this._grip&&this._grip.dispatchEvent(e),null!==this._hand&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const n of e.hand.values())this._getHandJoint(t,n)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),null!==this._targetRay&&(this._targetRay.visible=!1),null!==this._grip&&(this._grip.visible=!1),null!==this._hand&&(this._hand.visible=!1),this}update(e,t,n){let r=null,i=null,a=null;const s=this._targetRay,o=this._grip,l=this._hand;if(e&&"visible-blurred"!==t.session.visibilityState){if(l&&e.hand){a=!0;for(const r of e.hand.values()){const e=t.getJointPose(r,n),i=this._getHandJoint(l,r);null!==e&&(i.matrix.fromArray(e.transform.matrix),i.matrix.decompose(i.position,i.rotation,i.scale),i.jointRadius=e.radius),i.visible=null!==e}const r=l.joints["index-finger-tip"],i=l.joints["thumb-tip"],s=r.position.distanceTo(i.position),o=.02,u=.005;l.inputState.pinching&&s>o+u?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=o-u&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else null!==o&&e.gripSpace&&(i=t.getPose(e.gripSpace,n),null!==i&&(o.matrix.fromArray(i.transform.matrix),o.matrix.decompose(o.position,o.rotation,o.scale),i.linearVelocity?(o.hasLinearVelocity=!0,o.linearVelocity.copy(i.linearVelocity)):o.hasLinearVelocity=!1,i.angularVelocity?(o.hasAngularVelocity=!0,o.angularVelocity.copy(i.angularVelocity)):o.hasAngularVelocity=!1));null!==s&&(r=t.getPose(e.targetRaySpace,n),null===r&&null!==i&&(r=i),null!==r&&(s.matrix.fromArray(r.transform.matrix),s.matrix.decompose(s.position,s.rotation,s.scale),r.linearVelocity?(s.hasLinearVelocity=!0,s.linearVelocity.copy(r.linearVelocity)):s.hasLinearVelocity=!1,r.angularVelocity?(s.hasAngularVelocity=!0,s.angularVelocity.copy(r.angularVelocity)):s.hasAngularVelocity=!1,this.dispatchEvent(qo)))}return null!==s&&(s.visible=null!==r),null!==o&&(o.visible=null!==i),null!==l&&(l.visible=null!==a),this}_getHandJoint(e,t){if(void 0===e.joints[t.jointName]){const n=new Ko;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Zo extends $n{constructor(e,t,n,r,i,a,s,o,l,u){if((u=void 0!==u?u:Ne)!==Ne&&u!==ze)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&u===Ne&&(n=Ee),void 0===n&&u===ze&&(n=Le),super(null,r,i,a,s,o,u,n,l),this.isDepthTexture=!0,this.image={width:e,height:t},this.magFilter=void 0!==s?s:de,this.minFilter=void 0!==o?o:de,this.flipY=!1,this.generateMipmaps=!1}}class $o extends mn{constructor(e,t){super();const n=this;let r=null,i=1,a=null,s="local-floor",o=null,l=null,u=null,c=null,h=null,d=null;const f=t.getContextAttributes();let p=null,m=null;const g=[],v=[],y=new Set,x=new Map,b=new fa;b.layers.enable(1),b.viewport=new er;const _=new fa;_.layers.enable(2),_.viewport=new er;const w=[b,_],M=new Yo;M.layers.enable(1),M.layers.enable(2);let S=null,A=null;function C(e){const t=v.indexOf(e.inputSource);if(-1===t)return;const n=g[t];void 0!==n&&n.dispatchEvent({type:e.type,data:e.inputSource})}function E(){r.removeEventListener("select",C),r.removeEventListener("selectstart",C),r.removeEventListener("selectend",C),r.removeEventListener("squeeze",C),r.removeEventListener("squeezestart",C),r.removeEventListener("squeezeend",C),r.removeEventListener("end",E),r.removeEventListener("inputsourceschange",T);for(let e=0;e<g.length;e++){const t=v[e];null!==t&&(v[e]=null,g[e].disconnect(t))}S=null,A=null,e.setRenderTarget(p),h=null,c=null,u=null,r=null,m=null,D.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}function T(e){for(let t=0;t<e.removed.length;t++){const n=e.removed[t],r=v.indexOf(n);r>=0&&(v[r]=null,g[r].disconnect(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t];let r=v.indexOf(n);if(-1===r){for(let e=0;e<g.length;e++){if(e>=v.length){v.push(n),r=e;break}if(null===v[e]){v[e]=n,r=e;break}}if(-1===r)break}const i=g[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=g[e];return void 0===t&&(t=new Qo,g[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=g[e];return void 0===t&&(t=new Qo,g[e]=t),t.getGripSpace()},this.getHand=function(e){let t=g[e];return void 0===t&&(t=new Qo,g[e]=t),t.getHandSpace()},this.setFramebufferScaleFactor=function(e){i=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(e){s=e,!0===n.isPresenting&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return o||a},this.setReferenceSpace=function(e){o=e},this.getBaseLayer=function(){return null!==c?c:h},this.getBinding=function(){return u},this.getFrame=function(){return d},this.getSession=function(){return r},this.setSession=async function(l){if(r=l,null!==r){if(p=e.getRenderTarget(),r.addEventListener("select",C),r.addEventListener("selectstart",C),r.addEventListener("selectend",C),r.addEventListener("squeeze",C),r.addEventListener("squeezestart",C),r.addEventListener("squeezeend",C),r.addEventListener("end",E),r.addEventListener("inputsourceschange",T),!0!==f.xrCompatible&&await t.makeXRCompatible(),void 0===r.renderState.layers||!1===e.capabilities.isWebGL2){const n={antialias:void 0!==r.renderState.layers||f.antialias,alpha:f.alpha,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:i};h=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:h}),m=new tr(h.framebufferWidth,h.framebufferHeight,{format:ke,type:we,encoding:e.outputEncoding,stencilBuffer:f.stencil})}else{let n=null,a=null,s=null;f.depth&&(s=f.stencil?35056:33190,n=f.stencil?ze:Ne,a=f.stencil?Le:Ee);const o={colorFormat:32856,depthFormat:s,scaleFactor:i};u=new XRWebGLBinding(r,t),c=u.createProjectionLayer(o),r.updateRenderState({layers:[c]}),m=new tr(c.textureWidth,c.textureHeight,{format:ke,type:we,depthTexture:new Zo(c.textureWidth,c.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:f.stencil,encoding:e.outputEncoding,samples:f.antialias?4:0}),e.properties.get(m).__ignoreDepthValues=c.ignoreDepthValues}m.isXRRenderTarget=!0,this.setFoveation(1),o=null,a=await r.requestReferenceSpace(s),D.setContext(r),D.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}};const B=new lr,P=new lr;function R(e,t){null===t?e.matrixWorld.copy(e.matrix):e.matrixWorld.multiplyMatrices(t.matrixWorld,e.matrix),e.matrixWorldInverse.copy(e.matrixWorld).invert()}this.updateCamera=function(e){if(null===r)return;M.near=_.near=b.near=e.near,M.far=_.far=b.far=e.far,S===M.near&&A===M.far||(r.updateRenderState({depthNear:M.near,depthFar:M.far}),S=M.near,A=M.far);const t=e.parent,n=M.cameras;R(M,t);for(let e=0;e<n.length;e++)R(n[e],t);M.matrixWorld.decompose(M.position,M.quaternion,M.scale),e.matrix.copy(M.matrix),e.matrix.decompose(e.position,e.quaternion,e.scale);const i=e.children;for(let e=0,t=i.length;e<t;e++)i[e].updateMatrixWorld(!0);2===n.length?function(e,t,n){B.setFromMatrixPosition(t.matrixWorld),P.setFromMatrixPosition(n.matrixWorld);const r=B.distanceTo(P),i=t.projectionMatrix.elements,a=n.projectionMatrix.elements,s=i[14]/(i[10]-1),o=i[14]/(i[10]+1),l=(i[9]+1)/i[5],u=(i[9]-1)/i[5],c=(i[8]-1)/i[0],h=(a[8]+1)/a[0],d=s*c,f=s*h,p=r/(-c+h),m=p*-c;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(p),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=s+p,v=o+p,y=d-m,x=f+(r-m),b=l*o/v*g,_=u*o/v*g;e.projectionMatrix.makePerspective(y,x,b,_,g,v)}(M,b,_):M.projectionMatrix.copy(b.projectionMatrix)},this.getCamera=function(){return M},this.getFoveation=function(){return null!==c?c.fixedFoveation:null!==h?h.fixedFoveation:void 0},this.setFoveation=function(e){null!==c&&(c.fixedFoveation=e),null!==h&&void 0!==h.fixedFoveation&&(h.fixedFoveation=e)},this.getPlanes=function(){return y};let L=null;const D=new Aa;D.setAnimationLoop((function(t,r){if(l=r.getViewerPose(o||a),d=r,null!==l){const t=l.views;null!==h&&(e.setRenderTargetFramebuffer(m,h.framebuffer),e.setRenderTarget(m));let n=!1;t.length!==M.cameras.length&&(M.cameras.length=0,n=!0);for(let r=0;r<t.length;r++){const i=t[r];let a=null;if(null!==h)a=h.getViewport(i);else{const t=u.getViewSubImage(c,i);a=t.viewport,0===r&&(e.setRenderTargetTextures(m,t.colorTexture,c.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(m))}let s=w[r];void 0===s&&(s=new fa,s.layers.enable(r),s.viewport=new er,w[r]=s),s.matrix.fromArray(i.transform.matrix),s.projectionMatrix.fromArray(i.projectionMatrix),s.viewport.set(a.x,a.y,a.width,a.height),0===r&&M.matrix.copy(s.matrix),!0===n&&M.cameras.push(s)}}for(let e=0;e<g.length;e++){const t=v[e],n=g[e];null!==t&&void 0!==n&&n.update(t,r,o||a)}if(L&&L(t,r),r.detectedPlanes){n.dispatchEvent({type:"planesdetected",data:r.detectedPlanes});let e=null;for(const t of y)r.detectedPlanes.has(t)||(null===e&&(e=[]),e.push(t));if(null!==e)for(const t of e)y.delete(t),x.delete(t),n.dispatchEvent({type:"planeremoved",data:t});for(const e of r.detectedPlanes)if(y.has(e)){const t=x.get(e);e.lastChangedTime>t&&(x.set(e,e.lastChangedTime),n.dispatchEvent({type:"planechanged",data:e}))}else y.add(e),x.set(e,r.lastChangedTime),n.dispatchEvent({type:"planeadded",data:e})}d=null})),this.setAnimationLoop=function(e){L=e},this.dispose=function(){}}}function el(e,t){function n(n,r){n.opacity.value=r.opacity,r.color&&n.diffuse.value.copy(r.color),r.emissive&&n.emissive.value.copy(r.emissive).multiplyScalar(r.emissiveIntensity),r.map&&(n.map.value=r.map),r.alphaMap&&(n.alphaMap.value=r.alphaMap),r.bumpMap&&(n.bumpMap.value=r.bumpMap,n.bumpScale.value=r.bumpScale,r.side===m&&(n.bumpScale.value*=-1)),r.displacementMap&&(n.displacementMap.value=r.displacementMap,n.displacementScale.value=r.displacementScale,n.displacementBias.value=r.displacementBias),r.emissiveMap&&(n.emissiveMap.value=r.emissiveMap),r.normalMap&&(n.normalMap.value=r.normalMap,n.normalScale.value.copy(r.normalScale),r.side===m&&n.normalScale.value.negate()),r.specularMap&&(n.specularMap.value=r.specularMap),r.alphaTest>0&&(n.alphaTest.value=r.alphaTest);const i=t.get(r).envMap;if(i&&(n.envMap.value=i,n.flipEnvMap.value=i.isCubeTexture&&!1===i.isRenderTargetTexture?-1:1,n.reflectivity.value=r.reflectivity,n.ior.value=r.ior,n.refractionRatio.value=r.refractionRatio),r.lightMap){n.lightMap.value=r.lightMap;const t=!0!==e.physicallyCorrectLights?Math.PI:1;n.lightMapIntensity.value=r.lightMapIntensity*t}let a,s;r.aoMap&&(n.aoMap.value=r.aoMap,n.aoMapIntensity.value=r.aoMapIntensity),r.map?a=r.map:r.specularMap?a=r.specularMap:r.displacementMap?a=r.displacementMap:r.normalMap?a=r.normalMap:r.bumpMap?a=r.bumpMap:r.roughnessMap?a=r.roughnessMap:r.metalnessMap?a=r.metalnessMap:r.alphaMap?a=r.alphaMap:r.emissiveMap?a=r.emissiveMap:r.clearcoatMap?a=r.clearcoatMap:r.clearcoatNormalMap?a=r.clearcoatNormalMap:r.clearcoatRoughnessMap?a=r.clearcoatRoughnessMap:r.iridescenceMap?a=r.iridescenceMap:r.iridescenceThicknessMap?a=r.iridescenceThicknessMap:r.specularIntensityMap?a=r.specularIntensityMap:r.specularColorMap?a=r.specularColorMap:r.transmissionMap?a=r.transmissionMap:r.thicknessMap?a=r.thicknessMap:r.sheenColorMap?a=r.sheenColorMap:r.sheenRoughnessMap&&(a=r.sheenRoughnessMap),void 0!==a&&(a.isWebGLRenderTarget&&(a=a.texture),!0===a.matrixAutoUpdate&&a.updateMatrix(),n.uvTransform.value.copy(a.matrix)),r.aoMap?s=r.aoMap:r.lightMap&&(s=r.lightMap),void 0!==s&&(s.isWebGLRenderTarget&&(s=s.texture),!0===s.matrixAutoUpdate&&s.updateMatrix(),n.uv2Transform.value.copy(s.matrix))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,ua(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,r,i,a,s){r.isMeshBasicMaterial||r.isMeshLambertMaterial?n(e,r):r.isMeshToonMaterial?(n(e,r),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,r)):r.isMeshPhongMaterial?(n(e,r),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,r)):r.isMeshStandardMaterial?(n(e,r),function(e,n){e.roughness.value=n.roughness,e.metalness.value=n.metalness,n.roughnessMap&&(e.roughnessMap.value=n.roughnessMap),n.metalnessMap&&(e.metalnessMap.value=n.metalnessMap),t.get(n).envMap&&(e.envMapIntensity.value=n.envMapIntensity)}(e,r),r.isMeshPhysicalMaterial&&function(e,t,n){e.ior.value=t.ior,t.sheen>0&&(e.sheenColor.value.copy(t.sheenColor).multiplyScalar(t.sheen),e.sheenRoughness.value=t.sheenRoughness,t.sheenColorMap&&(e.sheenColorMap.value=t.sheenColorMap),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap)),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap),t.clearcoatNormalMap&&(e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),e.clearcoatNormalMap.value=t.clearcoatNormalMap,t.side===m&&e.clearcoatNormalScale.value.negate())),t.iridescence>0&&(e.iridescence.value=t.iridescence,e.iridescenceIOR.value=t.iridescenceIOR,e.iridescenceThicknessMinimum.value=t.iridescenceThicknessRange[0],e.iridescenceThicknessMaximum.value=t.iridescenceThicknessRange[1],t.iridescenceMap&&(e.iridescenceMap.value=t.iridescenceMap),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap)),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=n.texture,e.transmissionSamplerSize.value.set(n.width,n.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap)}(e,r,s)):r.isMeshMatcapMaterial?(n(e,r),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,r)):r.isMeshDepthMaterial?n(e,r):r.isMeshDistanceMaterial?(n(e,r),function(e,t){e.referencePosition.value.copy(t.referencePosition),e.nearDistance.value=t.nearDistance,e.farDistance.value=t.farDistance}(e,r)):r.isMeshNormalMaterial?n(e,r):r.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity}(e,r),r.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,r)):r.isPointsMaterial?function(e,t,n,r){let i;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*n,e.scale.value=.5*r,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?i=t.map:t.alphaMap&&(i=t.alphaMap),void 0!==i&&(!0===i.matrixAutoUpdate&&i.updateMatrix(),e.uvTransform.value.copy(i.matrix))}(e,r,i,a):r.isSpriteMaterial?function(e,t){let n;e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map),t.alphaMap&&(e.alphaMap.value=t.alphaMap),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest),t.map?n=t.map:t.alphaMap&&(n=t.alphaMap),void 0!==n&&(!0===n.matrixAutoUpdate&&n.updateMatrix(),e.uvTransform.value.copy(n.matrix))}(e,r):r.isShadowMaterial?(e.color.value.copy(r.color),e.opacity.value=r.opacity):r.isShaderMaterial&&(r.uniformsNeedUpdate=!1)}}}function tl(e,t,n,r){let i={},a={},s=[];const o=n.isWebGL2?e.getParameter(35375):0;function l(e,t,n){const r=e.value;if(void 0===n[t]){if("number"==typeof r)n[t]=r;else{const e=Array.isArray(r)?r:[r],i=[];for(let t=0;t<e.length;t++)i.push(e[t].clone());n[t]=i}return!0}if("number"==typeof r){if(n[t]!==r)return n[t]=r,!0}else{const e=Array.isArray(n[t])?n[t]:[n[t]],i=Array.isArray(r)?r:[r];for(let t=0;t<e.length;t++){const n=e[t];if(!1===n.equals(i[t]))return n.copy(i[t]),!0}}return!1}function u(e){const t={boundary:0,storage:0};return"number"==typeof e?(t.boundary=4,t.storage=4):e.isVector2?(t.boundary=8,t.storage=8):e.isVector3||e.isColor?(t.boundary=16,t.storage=12):e.isVector4?(t.boundary=16,t.storage=16):e.isMatrix3?(t.boundary=48,t.storage=48):e.isMatrix4?(t.boundary=64,t.storage=64):e.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",e),t}function c(t){const n=t.target;n.removeEventListener("dispose",c);const r=s.indexOf(n.__bindingPointIndex);s.splice(r,1),e.deleteBuffer(i[n.id]),delete i[n.id],delete a[n.id]}return{bind:function(e,t){const n=t.program;r.uniformBlockBinding(e,n)},update:function(n,h){let d=i[n.id];void 0===d&&(function(e){const t=e.uniforms;let n=0;let r=0;for(let e=0,i=t.length;e<i;e++){const i=t[e],a={boundary:0,storage:0},s=Array.isArray(i.value)?i.value:[i.value];for(let e=0,t=s.length;e<t;e++){const t=u(s[e]);a.boundary+=t.boundary,a.storage+=t.storage}if(i.__data=new Float32Array(a.storage/Float32Array.BYTES_PER_ELEMENT),i.__offset=n,e>0){r=n%16;const e=16-r;0!==r&&e-a.boundary<0&&(n+=16-r,i.__offset=n)}n+=a.storage}r=n%16,r>0&&(n+=16-r),e.__size=n,e.__cache={}}(n),d=function(t){const n=function(){for(let e=0;e<o;e++)if(-1===s.indexOf(e))return s.push(e),e;return console.error("THREE.WebGLRenderer: Maximum number of simultaneously usable uniforms groups reached."),0}();t.__bindingPointIndex=n;const r=e.createBuffer(),i=t.__size,a=t.usage;return e.bindBuffer(35345,r),e.bufferData(35345,i,a),e.bindBuffer(35345,null),e.bindBufferBase(35345,n,r),r}(n),i[n.id]=d,n.addEventListener("dispose",c));const f=h.program;r.updateUBOMapping(n,f);const p=t.render.frame;a[n.id]!==p&&(function(t){const n=i[t.id],r=t.uniforms,a=t.__cache;e.bindBuffer(35345,n);for(let t=0,n=r.length;t<n;t++){const n=r[t];if(!0===l(n,t,a)){const t=n.__offset,r=Array.isArray(n.value)?n.value:[n.value];let i=0;for(let a=0;a<r.length;a++){const s=r[a],o=u(s);"number"==typeof s?(n.__data[0]=s,e.bufferSubData(35345,t+i,n.__data)):s.isMatrix3?(n.__data[0]=s.elements[0],n.__data[1]=s.elements[1],n.__data[2]=s.elements[2],n.__data[3]=s.elements[0],n.__data[4]=s.elements[3],n.__data[5]=s.elements[4],n.__data[6]=s.elements[5],n.__data[7]=s.elements[0],n.__data[8]=s.elements[6],n.__data[9]=s.elements[7],n.__data[10]=s.elements[8],n.__data[11]=s.elements[0]):(s.toArray(n.__data,i),i+=o.storage/Float32Array.BYTES_PER_ELEMENT)}e.bufferSubData(35345,t,n.__data)}}e.bindBuffer(35345,null)}(n),a[n.id]=p)},dispose:function(){for(const t in i)e.deleteBuffer(i[t]);s=[],i={},a={}}}}function nl(e={}){this.isWebGLRenderer=!0;const t=void 0!==e.canvas?e.canvas:function(){const e=Fn("canvas");return e.style.display="block",e}(),n=void 0!==e.context?e.context:null,i=void 0===e.depth||e.depth,a=void 0===e.stencil||e.stencil,s=void 0!==e.antialias&&e.antialias,o=void 0===e.premultipliedAlpha||e.premultipliedAlpha,l=void 0!==e.preserveDrawingBuffer&&e.preserveDrawingBuffer,u=void 0!==e.powerPreference?e.powerPreference:"default",c=void 0!==e.failIfMajorPerformanceCaveat&&e.failIfMajorPerformanceCaveat;let h;h=null!==n?n.getContextAttributes().alpha:void 0!==e.alpha&&e.alpha;let d=null,f=null;const g=[],y=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputEncoding=Rt,this.physicallyCorrectLights=!1,this.toneMapping=Q,this.toneMappingExposure=1;const x=this;let b=!1,_=0,w=0,M=null,S=-1,A=null;const C=new er,E=new er;let T=null,B=t.width,P=t.height,R=1,L=null,D=null;const I=new er(0,0,B,P),k=new er(0,0,B,P);let F=!1;const O=new Sa;let N=!1,z=!1,U=null;const G=new Nr,H=new Pn,V=new lr,W={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function j(){return null===M?R:1}let J,X,Y,K,q,Z,$,ee,te,ne,re,ie,ae,se,oe,le,ue,ce,he,de,fe,pe,me,ge,ve=n;function ye(e,n){for(let r=0;r<e.length;r++){const i=e[r],a=t.getContext(i,n);if(null!==a)return a}return null}try{const e={alpha:!0,depth:i,stencil:a,antialias:s,premultipliedAlpha:o,preserveDrawingBuffer:l,powerPreference:u,failIfMajorPerformanceCaveat:c};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${r}`),t.addEventListener("webglcontextlost",Me,!1),t.addEventListener("webglcontextrestored",Se,!1),t.addEventListener("webglcontextcreationerror",Ae,!1),null===ve){const t=["webgl2","webgl","experimental-webgl"];if(!0===x.isWebGL1Renderer&&t.shift(),ve=ye(t,e),null===ve)throw ye(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}void 0===ve.getShaderPrecisionFormat&&(ve.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function xe(){J=new Za(ve),X=new ka(ve,J,e),J.init(X),pe=new Xo(ve,J,X),Y=new jo(ve,J,X),K=new ts,q=new Ro,Z=new Jo(ve,J,Y,q,X,pe,K),$=new Oa(x),ee=new Qa(x),te=new Ca(ve,X),me=new Da(ve,J,te,X),ne=new $a(ve,te,K,me),re=new as(ve,ne,te,K),he=new is(ve,X,Z),le=new Fa(q),ie=new Po(x,$,ee,J,X,me,le),ae=new el(x,q),se=new ko,oe=new Go(J,X),ce=new La(x,$,ee,Y,re,h,o),ue=new Wo(x,re,X),ge=new tl(ve,K,X,Y),de=new Ia(ve,J,K,X),fe=new es(ve,J,K,X),K.programs=ie.programs,x.capabilities=X,x.extensions=J,x.properties=q,x.renderLists=se,x.shadowMap=ue,x.state=Y,x.info=K}xe();const _e=new $o(x,ve);function Me(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),b=!0}function Se(){console.log("THREE.WebGLRenderer: Context Restored."),b=!1;const e=K.autoReset,t=ue.enabled,n=ue.autoUpdate,r=ue.needsUpdate,i=ue.type;xe(),K.autoReset=e,ue.enabled=t,ue.autoUpdate=n,ue.needsUpdate=r,ue.type=i}function Ae(e){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function Ce(e){const t=e.target;t.removeEventListener("dispose",Ce),function(e){(function(e){const t=q.get(e).programs;void 0!==t&&(t.forEach((function(e){ie.releaseProgram(e)})),e.isShaderMaterial&&ie.releaseShaderCache(e))})(e),q.remove(e)}(t)}this.xr=_e,this.getContext=function(){return ve},this.getContextAttributes=function(){return ve.getContextAttributes()},this.forceContextLoss=function(){const e=J.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=J.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return R},this.setPixelRatio=function(e){void 0!==e&&(R=e,this.setSize(B,P,!1))},this.getSize=function(e){return e.set(B,P)},this.setSize=function(e,n,r){_e.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(B=e,P=n,t.width=Math.floor(e*R),t.height=Math.floor(n*R),!1!==r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(B*R,P*R).floor()},this.setDrawingBufferSize=function(e,n,r){B=e,P=n,R=r,t.width=Math.floor(e*r),t.height=Math.floor(n*r),this.setViewport(0,0,e,n)},this.getCurrentViewport=function(e){return e.copy(C)},this.getViewport=function(e){return e.copy(I)},this.setViewport=function(e,t,n,r){e.isVector4?I.set(e.x,e.y,e.z,e.w):I.set(e,t,n,r),Y.viewport(C.copy(I).multiplyScalar(R).floor())},this.getScissor=function(e){return e.copy(k)},this.setScissor=function(e,t,n,r){e.isVector4?k.set(e.x,e.y,e.z,e.w):k.set(e,t,n,r),Y.scissor(E.copy(k).multiplyScalar(R).floor())},this.getScissorTest=function(){return F},this.setScissorTest=function(e){Y.setScissorTest(F=e)},this.setOpaqueSort=function(e){L=e},this.setTransparentSort=function(e){D=e},this.getClearColor=function(e){return e.copy(ce.getClearColor())},this.setClearColor=function(){ce.setClearColor.apply(ce,arguments)},this.getClearAlpha=function(){return ce.getClearAlpha()},this.setClearAlpha=function(){ce.setClearAlpha.apply(ce,arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;e&&(r|=16384),t&&(r|=256),n&&(r|=1024),ve.clear(r)},this.clearColor=function(){this.clear(!0,!1,!1)},this.clearDepth=function(){this.clear(!1,!0,!1)},this.clearStencil=function(){this.clear(!1,!1,!0)},this.dispose=function(){t.removeEventListener("webglcontextlost",Me,!1),t.removeEventListener("webglcontextrestored",Se,!1),t.removeEventListener("webglcontextcreationerror",Ae,!1),se.dispose(),oe.dispose(),q.dispose(),$.dispose(),ee.dispose(),re.dispose(),me.dispose(),ge.dispose(),ie.dispose(),_e.dispose(),_e.removeEventListener("sessionstart",Pe),_e.removeEventListener("sessionend",Re),U&&(U.dispose(),U=null),Le.stop()},this.renderBufferDirect=function(e,t,n,r,i,a){null===t&&(t=W);const s=i.isMesh&&i.matrixWorld.determinant()<0,o=function(e,t,n,r,i){!0!==t.isScene&&(t=W),Z.resetTextureUnits();const a=t.fog,s=r.isMeshStandardMaterial?t.environment:null,o=null===M?x.outputEncoding:!0===M.isXRRenderTarget?M.texture.encoding:Rt,l=(r.isMeshStandardMaterial?ee:$).get(r.envMap||s),u=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,c=!!r.normalMap&&!!n.attributes.tangent,h=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,p=!!n.morphAttributes.color,m=r.toneMapped?x.toneMapping:Q,g=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,v=void 0!==g?g.length:0,y=q.get(r),b=f.state.lights;if(!0===N&&(!0===z||e!==A)){const t=e===A&&r.id===S;le.setState(r,e,t)}let _=!1;r.version===y.__version?y.needsLights&&y.lightsStateVersion!==b.state.version||y.outputEncoding!==o||i.isInstancedMesh&&!1===y.instancing?_=!0:i.isInstancedMesh||!0!==y.instancing?i.isSkinnedMesh&&!1===y.skinning?_=!0:i.isSkinnedMesh||!0!==y.skinning?y.envMap!==l||!0===r.fog&&y.fog!==a?_=!0:void 0===y.numClippingPlanes||y.numClippingPlanes===le.numPlanes&&y.numIntersection===le.numIntersection?(y.vertexAlphas!==u||y.vertexTangents!==c||y.morphTargets!==h||y.morphNormals!==d||y.morphColors!==p||y.toneMapping!==m||!0===X.isWebGL2&&y.morphTargetsCount!==v)&&(_=!0):_=!0:_=!0:_=!0:(_=!0,y.__version=r.version);let w=y.currentProgram;!0===_&&(w=Ne(r,t,i));let C=!1,E=!1,T=!1;const B=w.getUniforms(),L=y.uniforms;if(Y.useProgram(w.program)&&(C=!0,E=!0,T=!0),r.id!==S&&(S=r.id,E=!0),C||A!==e){if(B.setValue(ve,"projectionMatrix",e.projectionMatrix),X.logarithmicDepthBuffer&&B.setValue(ve,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),A!==e&&(A=e,E=!0,T=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshStandardMaterial||r.envMap){const t=B.map.cameraPosition;void 0!==t&&t.setValue(ve,V.setFromMatrixPosition(e.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&B.setValue(ve,"isOrthographic",!0===e.isOrthographicCamera),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.isShadowMaterial||i.isSkinnedMesh)&&B.setValue(ve,"viewMatrix",e.matrixWorldInverse)}if(i.isSkinnedMesh){B.setOptional(ve,i,"bindMatrix"),B.setOptional(ve,i,"bindMatrixInverse");const e=i.skeleton;e&&(X.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),B.setValue(ve,"boneTexture",e.boneTexture,Z),B.setValue(ve,"boneTextureSize",e.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const D=n.morphAttributes;var I,k;if((void 0!==D.position||void 0!==D.normal||void 0!==D.color&&!0===X.isWebGL2)&&he.update(i,n,r,w),(E||y.receiveShadow!==i.receiveShadow)&&(y.receiveShadow=i.receiveShadow,B.setValue(ve,"receiveShadow",i.receiveShadow)),r.isMeshGouraudMaterial&&null!==r.envMap&&(L.envMap.value=l,L.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1),E&&(B.setValue(ve,"toneMappingExposure",x.toneMappingExposure),y.needsLights&&(k=T,(I=L).ambientLightColor.needsUpdate=k,I.lightProbe.needsUpdate=k,I.directionalLights.needsUpdate=k,I.directionalLightShadows.needsUpdate=k,I.pointLights.needsUpdate=k,I.pointLightShadows.needsUpdate=k,I.spotLights.needsUpdate=k,I.spotLightShadows.needsUpdate=k,I.rectAreaLights.needsUpdate=k,I.hemisphereLights.needsUpdate=k),a&&!0===r.fog&&ae.refreshFogUniforms(L,a),ae.refreshMaterialUniforms(L,r,R,P,U),uo.upload(ve,y.uniformsList,L,Z)),r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(uo.upload(ve,y.uniformsList,L,Z),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&B.setValue(ve,"center",i.center),B.setValue(ve,"modelViewMatrix",i.modelViewMatrix),B.setValue(ve,"normalMatrix",i.normalMatrix),B.setValue(ve,"modelMatrix",i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){const e=r.uniformsGroups;for(let t=0,n=e.length;t<n;t++)if(X.isWebGL2){const n=e[t];ge.update(n,w),ge.bind(n,w)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return w}(e,t,n,r,i);Y.setMaterial(r,s);let l=n.index,u=1;!0===r.wireframe&&(l=ne.getWireframeAttribute(n),u=2);const c=n.drawRange,h=n.attributes.position;let d=c.start*u,p=(c.start+c.count)*u;null!==a&&(d=Math.max(d,a.start*u),p=Math.min(p,(a.start+a.count)*u)),null!==l?(d=Math.max(d,0),p=Math.min(p,l.count)):null!=h&&(d=Math.max(d,0),p=Math.min(p,h.count));const m=p-d;if(m<0||m===1/0)return;let g;me.setup(i,r,o,n,l);let v=de;if(null!==l&&(g=te.get(l),v=fe,v.setIndex(g)),i.isMesh)!0===r.wireframe?(Y.setLineWidth(r.wireframeLinewidth*j()),v.setMode(1)):v.setMode(4);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),Y.setLineWidth(e*j()),i.isLineSegments?v.setMode(1):i.isLineLoop?v.setMode(2):v.setMode(3)}else i.isPoints?v.setMode(0):i.isSprite&&v.setMode(4);if(i.isInstancedMesh)v.renderInstances(d,m,i.count);else if(n.isInstancedBufferGeometry){const e=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,t=Math.min(n.instanceCount,e);v.renderInstances(d,m,t)}else v.render(d,m)},this.compile=function(e,t){function n(e,t,n){!0===e.transparent&&e.side===v?(e.side=m,e.needsUpdate=!0,Ne(e,t,n),e.side=p,e.needsUpdate=!0,Ne(e,t,n),e.side=v):Ne(e,t,n)}f=oe.get(e),f.init(),y.push(f),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(f.pushLight(e),e.castShadow&&f.pushShadow(e))})),f.setupLights(x.physicallyCorrectLights),e.traverse((function(t){const r=t.material;if(r)if(Array.isArray(r))for(let i=0;i<r.length;i++)n(r[i],e,t);else n(r,e,t)})),y.pop(),f=null};let Ee=null;function Pe(){Le.stop()}function Re(){Le.start()}const Le=new Aa;function De(e,t,n,r){if(!1===e.visible)return;if(e.layers.test(t.layers))if(e.isGroup)n=e.renderOrder;else if(e.isLOD)!0===e.autoUpdate&&e.update(t);else if(e.isLight)f.pushLight(e),e.castShadow&&f.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||O.intersectsSprite(e)){r&&V.setFromMatrixPosition(e.matrixWorld).applyMatrix4(G);const t=re.update(e),i=e.material;i.visible&&d.push(e,t,i,n,V.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(e.isSkinnedMesh&&e.skeleton.frame!==K.render.frame&&(e.skeleton.update(),e.skeleton.frame=K.render.frame),!e.frustumCulled||O.intersectsObject(e))){r&&V.setFromMatrixPosition(e.matrixWorld).applyMatrix4(G);const t=re.update(e),i=e.material;if(Array.isArray(i)){const r=t.groups;for(let a=0,s=r.length;a<s;a++){const s=r[a],o=i[s.materialIndex];o&&o.visible&&d.push(e,t,o,n,V.z,s)}}else i.visible&&d.push(e,t,i,n,V.z,null)}const i=e.children;for(let e=0,a=i.length;e<a;e++)De(i[e],t,n,r)}function Ie(e,t,n,r){const i=e.opaque,a=e.transmissive,o=e.transparent;f.setupLightsView(n),a.length>0&&function(e,t,n){const r=X.isWebGL2;null===U&&(U=new tr(1,1,{generateMipmaps:!0,type:J.has("EXT_color_buffer_half_float")?Be:we,minFilter:be,samples:r&&!0===s?4:0})),x.getDrawingBufferSize(H),r?U.setSize(H.x,H.y):U.setSize(Cn(H.x),Cn(H.y));const i=x.getRenderTarget();x.setRenderTarget(U),x.clear();const a=x.toneMapping;x.toneMapping=Q,Fe(e,t,n),x.toneMapping=a,Z.updateMultisampleRenderTarget(U),Z.updateRenderTargetMipmap(U),x.setRenderTarget(i)}(i,t,n),r&&Y.viewport(C.copy(r)),i.length>0&&Fe(i,t,n),a.length>0&&Fe(a,t,n),o.length>0&&Fe(o,t,n),Y.buffers.depth.setTest(!0),Y.buffers.depth.setMask(!0),Y.buffers.color.setMask(!0),Y.setPolygonOffset(!1)}function Fe(e,t,n){const r=!0===t.isScene?t.overrideMaterial:null;for(let i=0,a=e.length;i<a;i++){const a=e[i],s=a.object,o=a.geometry,l=null===r?a.material:r,u=a.group;s.layers.test(n.layers)&&Oe(s,t,n,o,l,u)}}function Oe(e,t,n,r,i,a){e.onBeforeRender(x,t,n,r,i,a),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(x,t,n,r,e,a),!0===i.transparent&&i.side===v?(i.side=m,i.needsUpdate=!0,x.renderBufferDirect(n,t,r,i,e,a),i.side=p,i.needsUpdate=!0,x.renderBufferDirect(n,t,r,i,e,a),i.side=v):x.renderBufferDirect(n,t,r,i,e,a),e.onAfterRender(x,t,n,r,i,a)}function Ne(e,t,n){!0!==t.isScene&&(t=W);const r=q.get(e),i=f.state.lights,a=f.state.shadowsArray,s=i.state.version,o=ie.getParameters(e,i.state,a,t,n),l=ie.getProgramCacheKey(o);let u=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=(e.isMeshStandardMaterial?ee:$).get(e.envMap||r.environment),void 0===u&&(e.addEventListener("dispose",Ce),u=new Map,r.programs=u);let c=u.get(l);if(void 0!==c){if(r.currentProgram===c&&r.lightsStateVersion===s)return ze(e,o),c}else o.uniforms=ie.getUniforms(e),e.onBuild(n,o,x),e.onBeforeCompile(o,x),c=ie.acquireProgram(o,l),u.set(l,c),r.uniforms=o.uniforms;const h=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(h.clippingPlanes=le.uniform),ze(e,o),r.needsLights=function(e){return e.isMeshLambertMaterial||e.isMeshToonMaterial||e.isMeshPhongMaterial||e.isMeshStandardMaterial||e.isShadowMaterial||e.isShaderMaterial&&!0===e.lights}(e),r.lightsStateVersion=s,r.needsLights&&(h.ambientLightColor.value=i.state.ambient,h.lightProbe.value=i.state.probe,h.directionalLights.value=i.state.directional,h.directionalLightShadows.value=i.state.directionalShadow,h.spotLights.value=i.state.spot,h.spotLightShadows.value=i.state.spotShadow,h.rectAreaLights.value=i.state.rectArea,h.ltc_1.value=i.state.rectAreaLTC1,h.ltc_2.value=i.state.rectAreaLTC2,h.pointLights.value=i.state.point,h.pointLightShadows.value=i.state.pointShadow,h.hemisphereLights.value=i.state.hemi,h.directionalShadowMap.value=i.state.directionalShadowMap,h.directionalShadowMatrix.value=i.state.directionalShadowMatrix,h.spotShadowMap.value=i.state.spotShadowMap,h.spotLightMatrix.value=i.state.spotLightMatrix,h.spotLightMap.value=i.state.spotLightMap,h.pointShadowMap.value=i.state.pointShadowMap,h.pointShadowMatrix.value=i.state.pointShadowMatrix);const d=c.getUniforms(),p=uo.seqWithValue(d.seq,h);return r.currentProgram=c,r.uniformsList=p,c}function ze(e,t){const n=q.get(e);n.outputEncoding=t.outputEncoding,n.instancing=t.instancing,n.skinning=t.skinning,n.morphTargets=t.morphTargets,n.morphNormals=t.morphNormals,n.morphColors=t.morphColors,n.morphTargetsCount=t.morphTargetsCount,n.numClippingPlanes=t.numClippingPlanes,n.numIntersection=t.numClipIntersection,n.vertexAlphas=t.vertexAlphas,n.vertexTangents=t.vertexTangents,n.toneMapping=t.toneMapping}Le.setAnimationLoop((function(e){Ee&&Ee(e)})),"undefined"!=typeof self&&Le.setContext(self),this.setAnimationLoop=function(e){Ee=e,_e.setAnimationLoop(e),null===e?Le.stop():Le.start()},_e.addEventListener("sessionstart",Pe),_e.addEventListener("sessionend",Re),this.render=function(e,t){if(void 0!==t&&!0!==t.isCamera)return void console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");if(!0===b)return;!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===_e.enabled&&!0===_e.isPresenting&&(!0===_e.cameraAutoUpdate&&_e.updateCamera(t),t=_e.getCamera()),!0===e.isScene&&e.onBeforeRender(x,e,t,M),f=oe.get(e,y.length),f.init(),y.push(f),G.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),O.setFromProjectionMatrix(G),z=this.localClippingEnabled,N=le.init(this.clippingPlanes,z,t),d=se.get(e,g.length),d.init(),g.push(d),De(e,t,0,x.sortObjects),d.finish(),!0===x.sortObjects&&d.sort(L,D),!0===N&&le.beginShadows();const n=f.state.shadowsArray;if(ue.render(n,e,t),!0===N&&le.endShadows(),!0===this.info.autoReset&&this.info.reset(),ce.render(d,e),f.setupLights(x.physicallyCorrectLights),t.isArrayCamera){const n=t.cameras;for(let t=0,r=n.length;t<r;t++){const r=n[t];Ie(d,e,r,r.viewport)}}else Ie(d,e,t);null!==M&&(Z.updateMultisampleRenderTarget(M),Z.updateRenderTargetMipmap(M)),!0===e.isScene&&e.onAfterRender(x,e,t),me.resetDefaultState(),S=-1,A=null,y.pop(),f=y.length>0?y[y.length-1]:null,g.pop(),d=g.length>0?g[g.length-1]:null},this.getActiveCubeFace=function(){return _},this.getActiveMipmapLevel=function(){return w},this.getRenderTarget=function(){return M},this.setRenderTargetTextures=function(e,t,n){q.get(e.texture).__webglTexture=t,q.get(e.depthTexture).__webglTexture=n;const r=q.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===J.has("WEBGL_multisampled_render_to_texture")&&(console.warn("THREE.WebGLRenderer: Render-to-texture extension was disabled because an external texture was provided"),r.__useRenderToTexture=!1))},this.setRenderTargetFramebuffer=function(e,t){const n=q.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){M=e,_=t,w=n;let r=!0,i=null,a=!1,s=!1;if(e){const n=q.get(e);void 0!==n.__useDefaultFramebuffer?(Y.bindFramebuffer(36160,null),r=!1):void 0===n.__webglFramebuffer?Z.setupRenderTarget(e):n.__hasExternalTextures&&Z.rebindTextures(e,q.get(e.texture).__webglTexture,q.get(e.depthTexture).__webglTexture);const o=e.texture;(o.isData3DTexture||o.isDataArrayTexture||o.isCompressedArrayTexture)&&(s=!0);const l=q.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=l[t],a=!0):i=X.isWebGL2&&e.samples>0&&!1===Z.useMultisampledRTT(e)?q.get(e).__webglMultisampledFramebuffer:l,C.copy(e.viewport),E.copy(e.scissor),T=e.scissorTest}else C.copy(I).multiplyScalar(R).floor(),E.copy(k).multiplyScalar(R).floor(),T=F;if(Y.bindFramebuffer(36160,i)&&X.drawBuffers&&r&&Y.drawBuffers(e,i),Y.viewport(C),Y.scissor(E),Y.setScissorTest(T),a){const r=q.get(e.texture);ve.framebufferTexture2D(36160,36064,34069+t,r.__webglTexture,n)}else if(s){const r=q.get(e.texture),i=t||0;ve.framebufferTextureLayer(36160,36064,r.__webglTexture,n||0,i)}S=-1},this.readRenderTargetPixels=function(e,t,n,r,i,a,s){if(!e||!e.isWebGLRenderTarget)return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let o=q.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==s&&(o=o[s]),o){Y.bindFramebuffer(36160,o);try{const s=e.texture,o=s.format,l=s.type;if(o!==ke&&pe.convert(o)!==ve.getParameter(35739))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const u=l===Be&&(J.has("EXT_color_buffer_half_float")||X.isWebGL2&&J.has("EXT_color_buffer_float"));if(!(l===we||pe.convert(l)===ve.getParameter(35738)||l===Te&&(X.isWebGL2||J.has("OES_texture_float")||J.has("WEBGL_color_buffer_float"))||u))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");t>=0&&t<=e.width-r&&n>=0&&n<=e.height-i&&ve.readPixels(t,n,r,i,pe.convert(o),pe.convert(l),a)}finally{const e=null!==M?q.get(M).__webglFramebuffer:null;Y.bindFramebuffer(36160,e)}}},this.copyFramebufferToTexture=function(e,t,n=0){const r=Math.pow(2,-n),i=Math.floor(t.image.width*r),a=Math.floor(t.image.height*r);Z.setTexture2D(t,0),ve.copyTexSubImage2D(3553,n,0,0,e.x,e.y,i,a),Y.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,a=t.image.height,s=pe.convert(n.format),o=pe.convert(n.type);Z.setTexture2D(n,0),ve.pixelStorei(37440,n.flipY),ve.pixelStorei(37441,n.premultiplyAlpha),ve.pixelStorei(3317,n.unpackAlignment),t.isDataTexture?ve.texSubImage2D(3553,r,e.x,e.y,i,a,s,o,t.image.data):t.isCompressedTexture?ve.compressedTexSubImage2D(3553,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,s,t.mipmaps[0].data):ve.texSubImage2D(3553,r,e.x,e.y,s,o,t.image),0===r&&n.generateMipmaps&&ve.generateMipmap(3553),Y.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(x.isWebGL1Renderer)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");const a=e.max.x-e.min.x+1,s=e.max.y-e.min.y+1,o=e.max.z-e.min.z+1,l=pe.convert(r.format),u=pe.convert(r.type);let c;if(r.isData3DTexture)Z.setTexture3D(r,0),c=32879;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");Z.setTexture2DArray(r,0),c=35866}ve.pixelStorei(37440,r.flipY),ve.pixelStorei(37441,r.premultiplyAlpha),ve.pixelStorei(3317,r.unpackAlignment);const h=ve.getParameter(3314),d=ve.getParameter(32878),f=ve.getParameter(3316),p=ve.getParameter(3315),m=ve.getParameter(32877),g=n.isCompressedTexture?n.mipmaps[0]:n.image;ve.pixelStorei(3314,g.width),ve.pixelStorei(32878,g.height),ve.pixelStorei(3316,e.min.x),ve.pixelStorei(3315,e.min.y),ve.pixelStorei(32877,e.min.z),n.isDataTexture||n.isData3DTexture?ve.texSubImage3D(c,i,t.x,t.y,t.z,a,s,o,l,u,g.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ve.compressedTexSubImage3D(c,i,t.x,t.y,t.z,a,s,o,l,g.data)):ve.texSubImage3D(c,i,t.x,t.y,t.z,a,s,o,l,u,g),ve.pixelStorei(3314,h),ve.pixelStorei(32878,d),ve.pixelStorei(3316,f),ve.pixelStorei(3315,p),ve.pixelStorei(32877,m),0===i&&r.generateMipmaps&&ve.generateMipmap(c),Y.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?Z.setTextureCube(e,0):e.isData3DTexture?Z.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?Z.setTexture2DArray(e,0):Z.setTexture2D(e,0),Y.unbindTexture()},this.resetState=function(){_=0,w=0,M=null,Y.reset(),me.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}class rl extends nl{}rl.prototype.isWebGL1Renderer=!0;class il{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Xn(e),this.density=t}clone(){return new il(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class al{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new Xn(e),this.near=t,this.far=n}clone(){return new al(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class sl extends ui{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),null!==e.background&&(this.background=e.background.clone()),null!==e.environment&&(this.environment=e.environment.clone()),null!==e.fog&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,null!==e.overrideMaterial&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return null!==this.fog&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.backgroundIntensity=this.backgroundIntensity),t}get autoUpdate(){return console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate}set autoUpdate(e){console.warn("THREE.Scene: autoUpdate was renamed to matrixWorldAutoUpdate in r144."),this.matrixWorldAutoUpdate=e}}class ol{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=void 0!==e?e.length/t:0,this.usage=nn,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=bn()}onUploadCallback(){}set needsUpdate(e){!0===e&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,i=this.stride;r<i;r++)this.array[e+r]=t.array[n+r];return this}set(e,t=0){return this.array.set(e,t),this}clone(e){void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=bn()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const t=new this.array.constructor(e.arrayBuffers[this.array.buffer._uuid]),n=new this.constructor(t,this.stride);return n.setUsage(this.usage),n}onUpload(e){return this.onUploadCallback=e,this}toJSON(e){return void 0===e.arrayBuffers&&(e.arrayBuffers={}),void 0===this.array.buffer._uuid&&(this.array.buffer._uuid=bn()),void 0===e.arrayBuffers[this.array.buffer._uuid]&&(e.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const ll=new lr;class ul{constructor(e,t,n,r=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=e,this.itemSize=t,this.offset=n,this.normalized=r}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(e){this.data.needsUpdate=e}applyMatrix4(e){for(let t=0,n=this.data.count;t<n;t++)ll.fromBufferAttribute(this,t),ll.applyMatrix4(e),this.setXYZ(t,ll.x,ll.y,ll.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)ll.fromBufferAttribute(this,t),ll.applyNormalMatrix(e),this.setXYZ(t,ll.x,ll.y,ll.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)ll.fromBufferAttribute(this,t),ll.transformDirection(e),this.setXYZ(t,ll.x,ll.y,ll.z);return this}setX(e,t){return this.normalized&&(t=Tn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Tn(t,this.array)),this.data.array[e*this.data.stride+this.offset+3]=t,this}getX(e){let t=this.data.array[e*this.data.stride+this.offset];return this.normalized&&(t=En(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=En(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=En(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=En(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this}setXYZ(e,t,n,r){return e=e*this.data.stride+this.offset,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array),r=Tn(r,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this}setXYZW(e,t,n,r,i){return e=e*this.data.stride+this.offset,this.normalized&&(t=Tn(t,this.array),n=Tn(n,this.array),r=Tn(r,this.array),i=Tn(i,this.array)),this.data.array[e+0]=t,this.data.array[e+1]=n,this.data.array[e+2]=r,this.data.array[e+3]=i,this}clone(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.clone(): Cloning an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return new Ci(new this.array.constructor(e),this.itemSize,this.normalized)}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.clone(e)),new ul(e.interleavedBuffers[this.data.uuid],this.itemSize,this.offset,this.normalized)}toJSON(e){if(void 0===e){console.log("THREE.InterleavedBufferAttribute.toJSON(): Serializing an interleaved buffer attribute will de-interleave buffer data.");const e=[];for(let t=0;t<this.count;t++){const n=t*this.data.stride+this.offset;for(let t=0;t<this.itemSize;t++)e.push(this.data.array[n+t])}return{itemSize:this.itemSize,type:this.array.constructor.name,array:e,normalized:this.normalized}}return void 0===e.interleavedBuffers&&(e.interleavedBuffers={}),void 0===e.interleavedBuffers[this.data.uuid]&&(e.interleavedBuffers[this.data.uuid]=this.data.toJSON(e)),{isInterleavedBufferAttribute:!0,itemSize:this.itemSize,data:this.data.uuid,offset:this.offset,normalized:this.normalized}}}class cl extends wi{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Xn(16777215),this.map=null,this.alphaMap=null,this.rotation=0,this.sizeAttenuation=!0,this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.rotation=e.rotation,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}let hl;const dl=new lr,fl=new lr,pl=new lr,ml=new Pn,gl=new Pn,vl=new Nr,yl=new lr,xl=new lr,bl=new lr,_l=new Pn,wl=new Pn,Ml=new Pn;class Sl extends ui{constructor(e){if(super(),this.isSprite=!0,this.type="Sprite",void 0===hl){hl=new Wi;const e=new Float32Array([-.5,-.5,0,0,0,.5,-.5,0,1,0,.5,.5,0,1,1,-.5,.5,0,0,1]),t=new ol(e,5);hl.setIndex([0,1,2,0,2,3]),hl.setAttribute("position",new ul(t,3,0,!1)),hl.setAttribute("uv",new ul(t,2,3,!1))}this.geometry=hl,this.material=void 0!==e?e:new cl,this.center=new Pn(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),fl.setFromMatrixScale(this.matrixWorld),vl.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),pl.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&fl.multiplyScalar(-pl.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const a=this.center;Al(yl.set(-.5,-.5,0),pl,a,fl,r,i),Al(xl.set(.5,-.5,0),pl,a,fl,r,i),Al(bl.set(.5,.5,0),pl,a,fl,r,i),_l.set(0,0),wl.set(1,0),Ml.set(1,1);let s=e.ray.intersectTriangle(yl,xl,bl,!1,dl);if(null===s&&(Al(xl.set(-.5,.5,0),pl,a,fl,r,i),wl.set(0,1),s=e.ray.intersectTriangle(yl,bl,xl,!1,dl),null===s))return;const o=e.ray.origin.distanceTo(dl);o<e.near||o>e.far||t.push({distance:o,point:dl.clone(),uv:bi.getUV(dl,yl,xl,bl,_l,wl,Ml,new Pn),face:null,object:this})}copy(e,t){return super.copy(e,t),void 0!==e.center&&this.center.copy(e.center),this.material=e.material,this}}function Al(e,t,n,r,i,a){ml.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(gl.x=a*ml.x-i*ml.y,gl.y=i*ml.x+a*ml.y):gl.copy(ml),e.copy(t),e.x+=gl.x,e.y+=gl.y,e.applyMatrix4(vl)}const Cl=new lr,El=new lr;class Tl extends ui{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);const t=e.levels;for(let e=0,n=t.length;e<n;e++){const n=t[e];this.addLevel(n.object.clone(),n.distance,n.hysteresis)}return this.autoUpdate=e.autoUpdate,this}addLevel(e,t=0,n=0){t=Math.abs(t);const r=this.levels;let i;for(i=0;i<r.length&&!(t<r[i].distance);i++);return r.splice(i,0,{distance:t,hysteresis:n,object:e}),this.add(e),this}getCurrentLevel(){return this._currentLevel}getObjectForDistance(e){const t=this.levels;if(t.length>0){let n,r;for(n=1,r=t.length;n<r;n++){let r=t[n].distance;if(t[n].object.visible&&(r-=r*t[n].hysteresis),e<r)break}return t[n-1].object}return null}raycast(e,t){if(this.levels.length>0){Cl.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(Cl);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Cl.setFromMatrixPosition(e.matrixWorld),El.setFromMatrixPosition(this.matrixWorld);const n=Cl.distanceTo(El)/e.zoom;let r,i;for(t[0].object.visible=!0,r=1,i=t.length;r<i;r++){let e=t[r].distance;if(t[r].object.visible&&(e-=e*t[r].hysteresis),!(n>=e))break;t[r-1].object.visible=!1,t[r].object.visible=!0}for(this._currentLevel=r-1;r<i;r++)t[r].object.visible=!1}}toJSON(e){const t=super.toJSON(e);!1===this.autoUpdate&&(t.object.autoUpdate=!1),t.object.levels=[];const n=this.levels;for(let e=0,r=n.length;e<r;e++){const r=n[e];t.object.levels.push({object:r.object.uuid,distance:r.distance,hysteresis:r.hysteresis})}return t}}const Bl=new lr,Pl=new er,Rl=new er,Ll=new lr,Dl=new Nr;class Il extends ia{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Nr,this.bindMatrixInverse=new Nr}copy(e,t){return super.copy(e,t),this.bindMode=e.bindMode,this.bindMatrix.copy(e.bindMatrix),this.bindMatrixInverse.copy(e.bindMatrixInverse),this.skeleton=e.skeleton,this}bind(e,t){this.skeleton=e,void 0===t&&(this.updateMatrixWorld(!0),this.skeleton.calculateInverses(),t=this.matrixWorld),this.bindMatrix.copy(t),this.bindMatrixInverse.copy(t).invert()}pose(){this.skeleton.pose()}normalizeSkinWeights(){const e=new er,t=this.geometry.attributes.skinWeight;for(let n=0,r=t.count;n<r;n++){e.fromBufferAttribute(t,n);const r=1/e.manhattanLength();r!==1/0?e.multiplyScalar(r):e.set(1,0,0,0),t.setXYZW(n,e.x,e.y,e.z,e.w)}}updateMatrixWorld(e){super.updateMatrixWorld(e),"attached"===this.bindMode?this.bindMatrixInverse.copy(this.matrixWorld).invert():"detached"===this.bindMode?this.bindMatrixInverse.copy(this.bindMatrix).invert():console.warn("THREE.SkinnedMesh: Unrecognized bindMode: "+this.bindMode)}boneTransform(e,t){const n=this.skeleton,r=this.geometry;Pl.fromBufferAttribute(r.attributes.skinIndex,e),Rl.fromBufferAttribute(r.attributes.skinWeight,e),Bl.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){const r=Rl.getComponent(e);if(0!==r){const i=Pl.getComponent(e);Dl.multiplyMatrices(n.bones[i].matrixWorld,n.boneInverses[i]),t.addScaledVector(Ll.copy(Bl).applyMatrix4(Dl),r)}}return t.applyMatrix4(this.bindMatrixInverse)}}class kl extends ui{constructor(){super(),this.isBone=!0,this.type="Bone"}}class Fl extends $n{constructor(e=null,t=1,n=1,r,i,a,s,o,l=de,u=de,c,h){super(null,a,s,o,l,u,r,i,c,h),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const Ol=new Nr,Nl=new Nr;class zl{constructor(e=[],t=[]){this.uuid=bn(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,this.frame=-1,this.init()}init(){const e=this.bones,t=this.boneInverses;if(this.boneMatrices=new Float32Array(16*e.length),0===t.length)this.calculateInverses();else if(e.length!==t.length){console.warn("THREE.Skeleton: Number of inverse bone matrices does not match amount of bones."),this.boneInverses=[];for(let e=0,t=this.bones.length;e<t;e++)this.boneInverses.push(new Nr)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new Nr;this.bones[e]&&t.copy(this.bones[e].matrixWorld).invert(),this.boneInverses.push(t)}}pose(){for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&t.matrixWorld.copy(this.boneInverses[e]).invert()}for(let e=0,t=this.bones.length;e<t;e++){const t=this.bones[e];t&&(t.parent&&t.parent.isBone?(t.matrix.copy(t.parent.matrixWorld).invert(),t.matrix.multiply(t.matrixWorld)):t.matrix.copy(t.matrixWorld),t.matrix.decompose(t.position,t.quaternion,t.scale))}}update(){const e=this.bones,t=this.boneInverses,n=this.boneMatrices,r=this.boneTexture;for(let r=0,i=e.length;r<i;r++){const i=e[r]?e[r].matrixWorld:Nl;Ol.multiplyMatrices(i,t[r]),Ol.toArray(n,16*r)}null!==r&&(r.needsUpdate=!0)}clone(){return new zl(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=An(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new Fl(t,e,e,ke,Te);return n.needsUpdate=!0,this.boneMatrices=t,this.boneTexture=n,this.boneTextureSize=e,this}getBoneByName(e){for(let t=0,n=this.bones.length;t<n;t++){const n=this.bones[t];if(n.name===e)return n}}dispose(){null!==this.boneTexture&&(this.boneTexture.dispose(),this.boneTexture=null)}fromJSON(e,t){this.uuid=e.uuid;for(let n=0,r=e.bones.length;n<r;n++){const r=e.bones[n];let i=t[r];void 0===i&&(console.warn("THREE.Skeleton: No bone found with UUID:",r),i=new kl),this.bones.push(i),this.boneInverses.push((new Nr).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.5,type:"Skeleton",generator:"Skeleton.toJSON"},bones:[],boneInverses:[]};e.uuid=this.uuid;const t=this.bones,n=this.boneInverses;for(let r=0,i=t.length;r<i;r++){const i=t[r];e.bones.push(i.uuid);const a=n[r];e.boneInverses.push(a.toArray())}return e}}class Ul extends Ci{constructor(e,t,n,r=1){super(e,t,n),this.isInstancedBufferAttribute=!0,this.meshPerAttribute=r}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}toJSON(){const e=super.toJSON();return e.meshPerAttribute=this.meshPerAttribute,e.isInstancedBufferAttribute=!0,e}}const Gl=new Nr,Hl=new Nr,Vl=[],Wl=new Nr,jl=new ia;class Jl extends ia{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new Ul(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.frustumCulled=!1;for(let e=0;e<n;e++)this.setMatrixAt(e,Wl)}copy(e,t){return super.copy(e,t),this.instanceMatrix.copy(e.instanceMatrix),null!==e.instanceColor&&(this.instanceColor=e.instanceColor.clone()),this.count=e.count,this}getColorAt(e,t){t.fromArray(this.instanceColor.array,3*e)}getMatrixAt(e,t){t.fromArray(this.instanceMatrix.array,16*e)}raycast(e,t){const n=this.matrixWorld,r=this.count;if(jl.geometry=this.geometry,jl.material=this.material,void 0!==jl.material)for(let i=0;i<r;i++){this.getMatrixAt(i,Gl),Hl.multiplyMatrices(n,Gl),jl.matrixWorld=Hl,jl.raycast(e,Vl);for(let e=0,n=Vl.length;e<n;e++){const n=Vl[e];n.instanceId=i,n.object=this,t.push(n)}Vl.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new Ul(new Float32Array(3*this.instanceMatrix.count),3)),t.toArray(this.instanceColor.array,3*e)}setMatrixAt(e,t){t.toArray(this.instanceMatrix.array,16*e)}updateMorphTargets(){}dispose(){this.dispatchEvent({type:"dispose"})}}class Xl extends wi{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Xn(16777215),this.linewidth=1,this.linecap="round",this.linejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const Yl=new lr,Kl=new lr,ql=new Nr,Ql=new Or,Zl=new Br;class $l extends ui{constructor(e=new Wi,t=new Xl){super(),this.isLine=!0,this.type="Line",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=e.material,this.geometry=e.geometry,this}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[0];for(let e=1,r=t.count;e<r;e++)Yl.fromBufferAttribute(t,e-1),Kl.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Yl.distanceTo(Kl);e.setAttribute("lineDistance",new ki(n,1))}else console.warn("THREE.Line.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Line.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),Zl.copy(n.boundingSphere),Zl.applyMatrix4(r),Zl.radius+=i,!1===e.ray.intersectsSphere(Zl))return;ql.copy(r).invert(),Ql.copy(e.ray).applyMatrix4(ql);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=new lr,u=new lr,c=new lr,h=new lr,d=this.isLineSegments?2:1,f=n.index,p=n.attributes.position;if(null!==f)for(let n=Math.max(0,a.start),r=Math.min(f.count,a.start+a.count)-1;n<r;n+=d){const r=f.getX(n),i=f.getX(n+1);if(l.fromBufferAttribute(p,r),u.fromBufferAttribute(p,i),Ql.distanceSqToSegment(l,u,h,c)>o)continue;h.applyMatrix4(this.matrixWorld);const a=e.ray.origin.distanceTo(h);a<e.near||a>e.far||t.push({distance:a,point:c.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}else for(let n=Math.max(0,a.start),r=Math.min(p.count,a.start+a.count)-1;n<r;n+=d){if(l.fromBufferAttribute(p,n),u.fromBufferAttribute(p,n+1),Ql.distanceSqToSegment(l,u,h,c)>o)continue;h.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(h);r<e.near||r>e.far||t.push({distance:r,point:c.clone().applyMatrix4(this.matrixWorld),index:n,face:null,faceIndex:null,object:this})}}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}const eu=new lr,tu=new lr;class nu extends $l{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(null===e.index){const t=e.attributes.position,n=[];for(let e=0,r=t.count;e<r;e+=2)eu.fromBufferAttribute(t,e),tu.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+eu.distanceTo(tu);e.setAttribute("lineDistance",new ki(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class ru extends $l{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class iu extends wi{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Xn(16777215),this.map=null,this.alphaMap=null,this.size=1,this.sizeAttenuation=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.alphaMap=e.alphaMap,this.size=e.size,this.sizeAttenuation=e.sizeAttenuation,this.fog=e.fog,this}}const au=new Nr,su=new Or,ou=new Br,lu=new lr;class uu extends ui{constructor(e=new Wi,t=new iu){super(),this.isPoints=!0,this.type="Points",this.geometry=e,this.material=t,this.updateMorphTargets()}copy(e,t){return super.copy(e,t),this.material=e.material,this.geometry=e.geometry,this}raycast(e,t){const n=this.geometry,r=this.matrixWorld,i=e.params.Points.threshold,a=n.drawRange;if(null===n.boundingSphere&&n.computeBoundingSphere(),ou.copy(n.boundingSphere),ou.applyMatrix4(r),ou.radius+=i,!1===e.ray.intersectsSphere(ou))return;au.copy(r).invert(),su.copy(e.ray).applyMatrix4(au);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=n.index,u=n.attributes.position;if(null!==l)for(let n=Math.max(0,a.start),i=Math.min(l.count,a.start+a.count);n<i;n++){const i=l.getX(n);lu.fromBufferAttribute(u,i),cu(lu,i,o,r,e,t,this)}else for(let n=Math.max(0,a.start),i=Math.min(u.count,a.start+a.count);n<i;n++)lu.fromBufferAttribute(u,n),cu(lu,n,o,r,e,t,this)}updateMorphTargets(){const e=this.geometry.morphAttributes,t=Object.keys(e);if(t.length>0){const n=e[t[0]];if(void 0!==n){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let e=0,t=n.length;e<t;e++){const t=n[e].name||String(e);this.morphTargetInfluences.push(0),this.morphTargetDictionary[t]=e}}}}}function cu(e,t,n,r,i,a,s){const o=su.distanceSqToPoint(e);if(o<n){const n=new lr;su.closestPointToPoint(e,n),n.applyMatrix4(r);const l=i.ray.origin.distanceTo(n);if(l<i.near||l>i.far)return;a.push({distance:l,distanceToRay:Math.sqrt(o),point:n,index:t,face:null,object:s})}}class hu extends $n{constructor(e,t,n,r,i,a,s,o,l){super(e,t,n,r,i,a,s,o,l),this.isVideoTexture=!0,this.minFilter=void 0!==a?a:ve,this.magFilter=void 0!==i?i:ve,this.generateMipmaps=!1;const u=this;"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback((function t(){u.needsUpdate=!0,e.requestVideoFrameCallback(t)}))}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;!1=="requestVideoFrameCallback"in e&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class du extends $n{constructor(e,t,n){super({width:e,height:t}),this.isFramebufferTexture=!0,this.format=n,this.magFilter=de,this.minFilter=de,this.generateMipmaps=!1,this.needsUpdate=!0}}class fu extends $n{constructor(e,t,n,r,i,a,s,o,l,u,c,h){super(null,a,s,o,l,u,r,i,c,h),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class pu extends fu{constructor(e,t,n,r,i,a){super(e,t,n,i,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=ce}}class mu extends $n{constructor(e,t,n,r,i,a,s,o,l){super(e,t,n,r,i,a,s,o,l),this.isCanvasTexture=!0,this.needsUpdate=!0}}class gu{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const n=this.getUtoTmapping(e);return this.getPoint(n,t)}getPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return t}getSpacedPoints(e=5){const t=[];for(let n=0;n<=e;n++)t.push(this.getPointAt(n/e));return t}getLength(){const e=this.getLengths();return e[e.length-1]}getLengths(e=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===e+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const t=[];let n,r=this.getPoint(0),i=0;t.push(0);for(let a=1;a<=e;a++)n=this.getPoint(a/e),i+=n.distanceTo(r),t.push(i),r=n;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const n=this.getLengths();let r=0;const i=n.length;let a;a=t||e*n[i-1];let s,o=0,l=i-1;for(;o<=l;)if(r=Math.floor(o+(l-o)/2),s=n[r]-a,s<0)o=r+1;else{if(!(s>0)){l=r;break}l=r-1}if(r=l,n[r]===a)return r/(i-1);const u=n[r];return(r+(a-u)/(n[r+1]-u))/(i-1)}getTangent(e,t){const n=1e-4;let r=e-n,i=e+n;r<0&&(r=0),i>1&&(i=1);const a=this.getPoint(r),s=this.getPoint(i),o=t||(a.isVector2?new Pn:new lr);return o.copy(s).sub(a).normalize(),o}getTangentAt(e,t){const n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){const n=new lr,r=[],i=[],a=[],s=new lr,o=new Nr;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new lr)}i[0]=new lr,a[0]=new lr;let l=Number.MAX_VALUE;const u=Math.abs(r[0].x),c=Math.abs(r[0].y),h=Math.abs(r[0].z);u<=l&&(l=u,n.set(1,0,0)),c<=l&&(l=c,n.set(0,1,0)),h<=l&&n.set(0,0,1),s.crossVectors(r[0],n).normalize(),i[0].crossVectors(r[0],s),a[0].crossVectors(r[0],i[0]);for(let t=1;t<=e;t++){if(i[t]=i[t-1].clone(),a[t]=a[t-1].clone(),s.crossVectors(r[t-1],r[t]),s.length()>Number.EPSILON){s.normalize();const e=Math.acos(_n(r[t-1].dot(r[t]),-1,1));i[t].applyMatrix4(o.makeRotationAxis(s,e))}a[t].crossVectors(r[t],i[t])}if(!0===t){let t=Math.acos(_n(i[0].dot(i[e]),-1,1));t/=e,r[0].dot(s.crossVectors(i[0],i[e]))>0&&(t=-t);for(let n=1;n<=e;n++)i[n].applyMatrix4(o.makeRotationAxis(r[n],t*n)),a[n].crossVectors(r[n],i[n])}return{tangents:r,normals:i,binormals:a}}clone(){return(new this.constructor).copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){const e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class vu extends gu{constructor(e=0,t=0,n=1,r=1,i=0,a=2*Math.PI,s=!1,o=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=i,this.aEndAngle=a,this.aClockwise=s,this.aRotation=o}getPoint(e,t){const n=t||new Pn,r=2*Math.PI;let i=this.aEndAngle-this.aStartAngle;const a=Math.abs(i)<Number.EPSILON;for(;i<0;)i+=r;for(;i>r;)i-=r;i<Number.EPSILON&&(i=a?0:r),!0!==this.aClockwise||a||(i===r?i=-r:i-=r);const s=this.aStartAngle+e*i;let o=this.aX+this.xRadius*Math.cos(s),l=this.aY+this.yRadius*Math.sin(s);if(0!==this.aRotation){const e=Math.cos(this.aRotation),t=Math.sin(this.aRotation),n=o-this.aX,r=l-this.aY;o=n*e-r*t+this.aX,l=n*t+r*e+this.aY}return n.set(o,l)}copy(e){return super.copy(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}toJSON(){const e=super.toJSON();return e.aX=this.aX,e.aY=this.aY,e.xRadius=this.xRadius,e.yRadius=this.yRadius,e.aStartAngle=this.aStartAngle,e.aEndAngle=this.aEndAngle,e.aClockwise=this.aClockwise,e.aRotation=this.aRotation,e}fromJSON(e){return super.fromJSON(e),this.aX=e.aX,this.aY=e.aY,this.xRadius=e.xRadius,this.yRadius=e.yRadius,this.aStartAngle=e.aStartAngle,this.aEndAngle=e.aEndAngle,this.aClockwise=e.aClockwise,this.aRotation=e.aRotation,this}}class yu extends vu{constructor(e,t,n,r,i,a){super(e,t,n,n,r,i,a),this.isArcCurve=!0,this.type="ArcCurve"}}function xu(){let e=0,t=0,n=0,r=0;function i(i,a,s,o){e=i,t=s,n=-3*i+3*a-2*s-o,r=2*i-2*a+s+o}return{initCatmullRom:function(e,t,n,r,a){i(t,n,a*(n-e),a*(r-t))},initNonuniformCatmullRom:function(e,t,n,r,a,s,o){let l=(t-e)/a-(n-e)/(a+s)+(n-t)/s,u=(n-t)/s-(r-t)/(s+o)+(r-n)/o;l*=s,u*=s,i(t,n,l,u)},calc:function(i){const a=i*i;return e+t*i+n*a+r*(a*i)}}}const bu=new lr,_u=new xu,wu=new xu,Mu=new xu;class Su extends gu{constructor(e=[],t=!1,n="centripetal",r=.5){super(),this.isCatmullRomCurve3=!0,this.type="CatmullRomCurve3",this.points=e,this.closed=t,this.curveType=n,this.tension=r}getPoint(e,t=new lr){const n=t,r=this.points,i=r.length,a=(i-(this.closed?0:1))*e;let s,o,l=Math.floor(a),u=a-l;this.closed?l+=l>0?0:(Math.floor(Math.abs(l)/i)+1)*i:0===u&&l===i-1&&(l=i-2,u=1),this.closed||l>0?s=r[(l-1)%i]:(bu.subVectors(r[0],r[1]).add(r[0]),s=bu);const c=r[l%i],h=r[(l+1)%i];if(this.closed||l+2<i?o=r[(l+2)%i]:(bu.subVectors(r[i-1],r[i-2]).add(r[i-1]),o=bu),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(s.distanceToSquared(c),e),n=Math.pow(c.distanceToSquared(h),e),r=Math.pow(h.distanceToSquared(o),e);n<1e-4&&(n=1),t<1e-4&&(t=n),r<1e-4&&(r=n),_u.initNonuniformCatmullRom(s.x,c.x,h.x,o.x,t,n,r),wu.initNonuniformCatmullRom(s.y,c.y,h.y,o.y,t,n,r),Mu.initNonuniformCatmullRom(s.z,c.z,h.z,o.z,t,n,r)}else"catmullrom"===this.curveType&&(_u.initCatmullRom(s.x,c.x,h.x,o.x,this.tension),wu.initCatmullRom(s.y,c.y,h.y,o.y,this.tension),Mu.initCatmullRom(s.z,c.z,h.z,o.z,this.tension));return n.set(_u.calc(u),wu.calc(u),Mu.calc(u)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e.closed=this.closed,e.curveType=this.curveType,e.tension=this.tension,e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new lr).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function Au(e,t,n,r,i){const a=.5*(r-t),s=.5*(i-n),o=e*e;return(2*n-2*r+a+s)*(e*o)+(-3*n+3*r-2*a-s)*o+a*e+n}function Cu(e,t,n,r){return function(e,t){const n=1-e;return n*n*t}(e,t)+function(e,t){return 2*(1-e)*e*t}(e,n)+function(e,t){return e*e*t}(e,r)}function Eu(e,t,n,r,i){return function(e,t){const n=1-e;return n*n*n*t}(e,t)+function(e,t){const n=1-e;return 3*n*n*e*t}(e,n)+function(e,t){return 3*(1-e)*e*e*t}(e,r)+function(e,t){return e*e*e*t}(e,i)}class Tu extends gu{constructor(e=new Pn,t=new Pn,n=new Pn,r=new Pn){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Pn){const n=t,r=this.v0,i=this.v1,a=this.v2,s=this.v3;return n.set(Eu(e,r.x,i.x,a.x,s.x),Eu(e,r.y,i.y,a.y,s.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Bu extends gu{constructor(e=new lr,t=new lr,n=new lr,r=new lr){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new lr){const n=t,r=this.v0,i=this.v1,a=this.v2,s=this.v3;return n.set(Eu(e,r.x,i.x,a.x,s.x),Eu(e,r.y,i.y,a.y,s.y),Eu(e,r.z,i.z,a.z,s.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this.v3.copy(e.v3),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e.v3=this.v3.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this.v3.fromArray(e.v3),this}}class Pu extends gu{constructor(e=new Pn,t=new Pn){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Pn){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}getTangent(e,t){const n=t||new Pn;return n.copy(this.v2).sub(this.v1).normalize(),n}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Ru extends gu{constructor(e=new lr,t=new lr){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new lr){const n=t;return 1===e?n.copy(this.v2):(n.copy(this.v2).sub(this.v1),n.multiplyScalar(e).add(this.v1)),n}getPointAt(e,t){return this.getPoint(e,t)}copy(e){return super.copy(e),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Lu extends gu{constructor(e=new Pn,t=new Pn,n=new Pn){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Pn){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(Cu(e,r.x,i.x,a.x),Cu(e,r.y,i.y,a.y)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Du extends gu{constructor(e=new lr,t=new lr,n=new lr){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new lr){const n=t,r=this.v0,i=this.v1,a=this.v2;return n.set(Cu(e,r.x,i.x,a.x),Cu(e,r.y,i.y,a.y),Cu(e,r.z,i.z,a.z)),n}copy(e){return super.copy(e),this.v0.copy(e.v0),this.v1.copy(e.v1),this.v2.copy(e.v2),this}toJSON(){const e=super.toJSON();return e.v0=this.v0.toArray(),e.v1=this.v1.toArray(),e.v2=this.v2.toArray(),e}fromJSON(e){return super.fromJSON(e),this.v0.fromArray(e.v0),this.v1.fromArray(e.v1),this.v2.fromArray(e.v2),this}}class Iu extends gu{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Pn){const n=t,r=this.points,i=(r.length-1)*e,a=Math.floor(i),s=i-a,o=r[0===a?a:a-1],l=r[a],u=r[a>r.length-2?r.length-1:a+1],c=r[a>r.length-3?r.length-1:a+2];return n.set(Au(s,o.x,l.x,u.x,c.x),Au(s,o.y,l.y,u.y,c.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.points=[];for(let t=0,n=this.points.length;t<n;t++){const n=this.points[t];e.points.push(n.toArray())}return e}fromJSON(e){super.fromJSON(e),this.points=[];for(let t=0,n=e.points.length;t<n;t++){const n=e.points[t];this.points.push((new Pn).fromArray(n))}return this}}var ku=Object.freeze({__proto__:null,ArcCurve:yu,CatmullRomCurve3:Su,CubicBezierCurve:Tu,CubicBezierCurve3:Bu,EllipseCurve:vu,LineCurve:Pu,LineCurve3:Ru,QuadraticBezierCurve:Lu,QuadraticBezierCurve3:Du,SplineCurve:Iu});class Fu extends gu{constructor(){super(),this.type="CurvePath",this.curves=[],this.autoClose=!1}add(e){this.curves.push(e)}closePath(){const e=this.curves[0].getPoint(0),t=this.curves[this.curves.length-1].getPoint(1);e.equals(t)||this.curves.push(new Pu(t,e))}getPoint(e,t){const n=e*this.getLength(),r=this.getCurveLengths();let i=0;for(;i<r.length;){if(r[i]>=n){const e=r[i]-n,a=this.curves[i],s=a.getLength(),o=0===s?0:1-e/s;return a.getPointAt(o,t)}i++}return null}getLength(){const e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;const e=[];let t=0;for(let n=0,r=this.curves.length;n<r;n++)t+=this.curves[n].getLength(),e.push(t);return this.cacheLengths=e,e}getSpacedPoints(e=40){const t=[];for(let n=0;n<=e;n++)t.push(this.getPoint(n/e));return this.autoClose&&t.push(t[0]),t}getPoints(e=12){const t=[];let n;for(let r=0,i=this.curves;r<i.length;r++){const a=i[r],s=a.isEllipseCurve?2*e:a.isLineCurve||a.isLineCurve3?1:a.isSplineCurve?e*a.points.length:e,o=a.getPoints(s);for(let e=0;e<o.length;e++){const r=o[e];n&&n.equals(r)||(t.push(r),n=r)}}return this.autoClose&&t.length>1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push(n.clone())}return this.autoClose=e.autoClose,this}toJSON(){const e=super.toJSON();e.autoClose=this.autoClose,e.curves=[];for(let t=0,n=this.curves.length;t<n;t++){const n=this.curves[t];e.curves.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.autoClose=e.autoClose,this.curves=[];for(let t=0,n=e.curves.length;t<n;t++){const n=e.curves[t];this.curves.push((new ku[n.type]).fromJSON(n))}return this}}class Ou extends Fu{constructor(e){super(),this.type="Path",this.currentPoint=new Pn,e&&this.setFromPoints(e)}setFromPoints(e){this.moveTo(e[0].x,e[0].y);for(let t=1,n=e.length;t<n;t++)this.lineTo(e[t].x,e[t].y);return this}moveTo(e,t){return this.currentPoint.set(e,t),this}lineTo(e,t){const n=new Pu(this.currentPoint.clone(),new Pn(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new Lu(this.currentPoint.clone(),new Pn(e,t),new Pn(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,a){const s=new Tu(this.currentPoint.clone(),new Pn(e,t),new Pn(n,r),new Pn(i,a));return this.curves.push(s),this.currentPoint.set(i,a),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new Iu(t);return this.curves.push(n),this.currentPoint.copy(e[e.length-1]),this}arc(e,t,n,r,i,a){const s=this.currentPoint.x,o=this.currentPoint.y;return this.absarc(e+s,t+o,n,r,i,a),this}absarc(e,t,n,r,i,a){return this.absellipse(e,t,n,n,r,i,a),this}ellipse(e,t,n,r,i,a,s,o){const l=this.currentPoint.x,u=this.currentPoint.y;return this.absellipse(e+l,t+u,n,r,i,a,s,o),this}absellipse(e,t,n,r,i,a,s,o){const l=new vu(e,t,n,r,i,a,s,o);if(this.curves.length>0){const e=l.getPoint(0);e.equals(this.currentPoint)||this.lineTo(e.x,e.y)}this.curves.push(l);const u=l.getPoint(1);return this.currentPoint.copy(u),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){const e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}}class Nu extends Wi{constructor(e=[new Pn(0,-.5),new Pn(.5,0),new Pn(0,.5)],t=12,n=0,r=2*Math.PI){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:n,phiLength:r},t=Math.floor(t),r=_n(r,0,2*Math.PI);const i=[],a=[],s=[],o=[],l=[],u=1/t,c=new lr,h=new Pn,d=new lr,f=new lr,p=new lr;let m=0,g=0;for(let t=0;t<=e.length-1;t++)switch(t){case 0:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,d.x=1*g,d.y=-m,d.z=0*g,p.copy(d),d.normalize(),o.push(d.x,d.y,d.z);break;case e.length-1:o.push(p.x,p.y,p.z);break;default:m=e[t+1].x-e[t].x,g=e[t+1].y-e[t].y,d.x=1*g,d.y=-m,d.z=0*g,f.copy(d),d.x+=p.x,d.y+=p.y,d.z+=p.z,d.normalize(),o.push(d.x,d.y,d.z),p.copy(f)}for(let i=0;i<=t;i++){const d=n+i*u*r,f=Math.sin(d),p=Math.cos(d);for(let n=0;n<=e.length-1;n++){c.x=e[n].x*f,c.y=e[n].y,c.z=e[n].x*p,a.push(c.x,c.y,c.z),h.x=i/t,h.y=n/(e.length-1),s.push(h.x,h.y);const r=o[3*n+0]*f,u=o[3*n+1],d=o[3*n+0]*p;l.push(r,u,d)}}for(let n=0;n<t;n++)for(let t=0;t<e.length-1;t++){const r=t+n*e.length,a=r,s=r+e.length,o=r+e.length+1,l=r+1;i.push(a,s,l),i.push(o,l,s)}this.setIndex(i),this.setAttribute("position",new ki(a,3)),this.setAttribute("uv",new ki(s,2)),this.setAttribute("normal",new ki(l,3))}static fromJSON(e){return new Nu(e.points,e.segments,e.phiStart,e.phiLength)}}class zu extends Nu{constructor(e=1,t=1,n=4,r=8){const i=new Ou;i.absarc(0,-t/2,e,1.5*Math.PI,0),i.absarc(0,t/2,e,0,.5*Math.PI),super(i.getPoints(n),r),this.type="CapsuleGeometry",this.parameters={radius:e,height:t,capSegments:n,radialSegments:r}}static fromJSON(e){return new zu(e.radius,e.length,e.capSegments,e.radialSegments)}}class Uu extends Wi{constructor(e=1,t=32,n=0,r=2*Math.PI){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);const i=[],a=[],s=[],o=[],l=new lr,u=new Pn;a.push(0,0,0),s.push(0,0,1),o.push(.5,.5);for(let i=0,c=3;i<=t;i++,c+=3){const h=n+i/t*r;l.x=e*Math.cos(h),l.y=e*Math.sin(h),a.push(l.x,l.y,l.z),s.push(0,0,1),u.x=(a[c]/e+1)/2,u.y=(a[c+1]/e+1)/2,o.push(u.x,u.y)}for(let e=1;e<=t;e++)i.push(e,e+1,0);this.setIndex(i),this.setAttribute("position",new ki(a,3)),this.setAttribute("normal",new ki(s,3)),this.setAttribute("uv",new ki(o,2))}static fromJSON(e){return new Uu(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Gu extends Wi{constructor(e=1,t=1,n=1,r=32,i=1,a=!1,s=0,o=2*Math.PI){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:i,openEnded:a,thetaStart:s,thetaLength:o};const l=this;r=Math.floor(r),i=Math.floor(i);const u=[],c=[],h=[],d=[];let f=0;const p=[],m=n/2;let g=0;function v(n){const i=f,a=new Pn,p=new lr;let v=0;const y=!0===n?e:t,x=!0===n?1:-1;for(let e=1;e<=r;e++)c.push(0,m*x,0),h.push(0,x,0),d.push(.5,.5),f++;const b=f;for(let e=0;e<=r;e++){const t=e/r*o+s,n=Math.cos(t),i=Math.sin(t);p.x=y*i,p.y=m*x,p.z=y*n,c.push(p.x,p.y,p.z),h.push(0,x,0),a.x=.5*n+.5,a.y=.5*i*x+.5,d.push(a.x,a.y),f++}for(let e=0;e<r;e++){const t=i+e,r=b+e;!0===n?u.push(r,r+1,t):u.push(r+1,r,t),v+=3}l.addGroup(g,v,!0===n?1:2),g+=v}!function(){const a=new lr,v=new lr;let y=0;const x=(t-e)/n;for(let l=0;l<=i;l++){const u=[],g=l/i,y=g*(t-e)+e;for(let e=0;e<=r;e++){const t=e/r,i=t*o+s,l=Math.sin(i),p=Math.cos(i);v.x=y*l,v.y=-g*n+m,v.z=y*p,c.push(v.x,v.y,v.z),a.set(l,x,p).normalize(),h.push(a.x,a.y,a.z),d.push(t,1-g),u.push(f++)}p.push(u)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=p[t][e],r=p[t+1][e],i=p[t+1][e+1],a=p[t][e+1];u.push(n,r,a),u.push(r,i,a),y+=6}l.addGroup(g,y,0),g+=y}(),!1===a&&(e>0&&v(!0),t>0&&v(!1)),this.setIndex(u),this.setAttribute("position",new ki(c,3)),this.setAttribute("normal",new ki(h,3)),this.setAttribute("uv",new ki(d,2))}static fromJSON(e){return new Gu(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Hu extends Gu{constructor(e=1,t=1,n=32,r=1,i=!1,a=0,s=2*Math.PI){super(0,e,t,n,r,i,a,s),this.type="ConeGeometry",this.parameters={radius:e,height:t,radialSegments:n,heightSegments:r,openEnded:i,thetaStart:a,thetaLength:s}}static fromJSON(e){return new Hu(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Vu extends Wi{constructor(e=[],t=[],n=1,r=0){super(),this.type="PolyhedronGeometry",this.parameters={vertices:e,indices:t,radius:n,detail:r};const i=[],a=[];function s(e,t,n,r){const i=r+1,a=[];for(let r=0;r<=i;r++){a[r]=[];const s=e.clone().lerp(n,r/i),o=t.clone().lerp(n,r/i),l=i-r;for(let e=0;e<=l;e++)a[r][e]=0===e&&r===i?s:s.clone().lerp(o,e/l)}for(let e=0;e<i;e++)for(let t=0;t<2*(i-e)-1;t++){const n=Math.floor(t/2);t%2==0?(o(a[e][n+1]),o(a[e+1][n]),o(a[e][n])):(o(a[e][n+1]),o(a[e+1][n+1]),o(a[e+1][n]))}}function o(e){i.push(e.x,e.y,e.z)}function l(t,n){const r=3*t;n.x=e[r+0],n.y=e[r+1],n.z=e[r+2]}function u(e,t,n,r){r<0&&1===e.x&&(a[t]=e.x-1),0===n.x&&0===n.z&&(a[t]=r/2/Math.PI+.5)}function c(e){return Math.atan2(e.z,-e.x)}!function(e){const n=new lr,r=new lr,i=new lr;for(let a=0;a<t.length;a+=3)l(t[a+0],n),l(t[a+1],r),l(t[a+2],i),s(n,r,i,e)}(r),function(e){const t=new lr;for(let n=0;n<i.length;n+=3)t.x=i[n+0],t.y=i[n+1],t.z=i[n+2],t.normalize().multiplyScalar(e),i[n+0]=t.x,i[n+1]=t.y,i[n+2]=t.z}(n),function(){const e=new lr;for(let n=0;n<i.length;n+=3){e.x=i[n+0],e.y=i[n+1],e.z=i[n+2];const r=c(e)/2/Math.PI+.5,s=(t=e,Math.atan2(-t.y,Math.sqrt(t.x*t.x+t.z*t.z))/Math.PI+.5);a.push(r,1-s)}var t;(function(){const e=new lr,t=new lr,n=new lr,r=new lr,s=new Pn,o=new Pn,l=new Pn;for(let h=0,d=0;h<i.length;h+=9,d+=6){e.set(i[h+0],i[h+1],i[h+2]),t.set(i[h+3],i[h+4],i[h+5]),n.set(i[h+6],i[h+7],i[h+8]),s.set(a[d+0],a[d+1]),o.set(a[d+2],a[d+3]),l.set(a[d+4],a[d+5]),r.copy(e).add(t).add(n).divideScalar(3);const f=c(r);u(s,d+0,e,f),u(o,d+2,t,f),u(l,d+4,n,f)}})(),function(){for(let e=0;e<a.length;e+=6){const t=a[e+0],n=a[e+2],r=a[e+4],i=Math.max(t,n,r),s=Math.min(t,n,r);i>.9&&s<.1&&(t<.2&&(a[e+0]+=1),n<.2&&(a[e+2]+=1),r<.2&&(a[e+4]+=1))}}()}(),this.setAttribute("position",new ki(i,3)),this.setAttribute("normal",new ki(i.slice(),3)),this.setAttribute("uv",new ki(a,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}static fromJSON(e){return new Vu(e.vertices,e.indices,e.radius,e.details)}}class Wu extends Vu{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2,r=1/n;super([-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-r,-n,0,-r,n,0,r,-n,0,r,n,-r,-n,0,-r,n,0,r,-n,0,r,n,0,-n,0,-r,n,0,-r,-n,0,r,n,0,r],[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9],e,t),this.type="DodecahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Wu(e.radius,e.detail)}}const ju=new lr,Ju=new lr,Xu=new lr,Yu=new bi;class Ku extends Wi{constructor(e=null,t=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:e,thresholdAngle:t},null!==e){const n=4,r=Math.pow(10,n),i=Math.cos(yn*t),a=e.getIndex(),s=e.getAttribute("position"),o=a?a.count:s.count,l=[0,0,0],u=["a","b","c"],c=new Array(3),h={},d=[];for(let e=0;e<o;e+=3){a?(l[0]=a.getX(e),l[1]=a.getX(e+1),l[2]=a.getX(e+2)):(l[0]=e,l[1]=e+1,l[2]=e+2);const{a:t,b:n,c:o}=Yu;if(t.fromBufferAttribute(s,l[0]),n.fromBufferAttribute(s,l[1]),o.fromBufferAttribute(s,l[2]),Yu.getNormal(Xu),c[0]=`${Math.round(t.x*r)},${Math.round(t.y*r)},${Math.round(t.z*r)}`,c[1]=`${Math.round(n.x*r)},${Math.round(n.y*r)},${Math.round(n.z*r)}`,c[2]=`${Math.round(o.x*r)},${Math.round(o.y*r)},${Math.round(o.z*r)}`,c[0]!==c[1]&&c[1]!==c[2]&&c[2]!==c[0])for(let e=0;e<3;e++){const t=(e+1)%3,n=c[e],r=c[t],a=Yu[u[e]],s=Yu[u[t]],o=`${n}_${r}`,f=`${r}_${n}`;f in h&&h[f]?(Xu.dot(h[f].normal)<=i&&(d.push(a.x,a.y,a.z),d.push(s.x,s.y,s.z)),h[f]=null):o in h||(h[o]={index0:l[e],index1:l[t],normal:Xu.clone()})}}for(const e in h)if(h[e]){const{index0:t,index1:n}=h[e];ju.fromBufferAttribute(s,t),Ju.fromBufferAttribute(s,n),d.push(ju.x,ju.y,ju.z),d.push(Ju.x,Ju.y,Ju.z)}this.setAttribute("position",new ki(d,3))}}}class qu extends Ou{constructor(e){super(e),this.uuid=bn(),this.type="Shape",this.holes=[]}getPointsHoles(e){const t=[];for(let n=0,r=this.holes.length;n<r;n++)t[n]=this.holes[n].getPoints(e);return t}extractPoints(e){return{shape:this.getPoints(e),holes:this.getPointsHoles(e)}}copy(e){super.copy(e),this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push(n.clone())}return this}toJSON(){const e=super.toJSON();e.uuid=this.uuid,e.holes=[];for(let t=0,n=this.holes.length;t<n;t++){const n=this.holes[t];e.holes.push(n.toJSON())}return e}fromJSON(e){super.fromJSON(e),this.uuid=e.uuid,this.holes=[];for(let t=0,n=e.holes.length;t<n;t++){const n=e.holes[t];this.holes.push((new Ou).fromJSON(n))}return this}}function Qu(e,t,n,r,i){let a,s;if(i===function(e,t,n,r){let i=0;for(let a=t,s=n-r;a<n;a+=r)i+=(e[s]-e[a])*(e[a+1]+e[s+1]),s=a;return i}(e,t,n,r)>0)for(a=t;a<n;a+=r)s=yc(a,e[a],e[a+1],s);else for(a=n-r;a>=t;a-=r)s=yc(a,e[a],e[a+1],s);return s&&dc(s,s.next)&&(xc(s),s=s.next),s}function Zu(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!dc(r,r.next)&&0!==hc(r.prev,r,r.next))r=r.next;else{if(xc(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function $u(e,t,n,r,i,a,s){if(!e)return;!s&&a&&function(e,t,n,r){let i=e;do{0===i.z&&(i.z=oc(i.x,i.y,t,n,r)),i.prevZ=i.prev,i.nextZ=i.next,i=i.next}while(i!==e);i.prevZ.nextZ=null,i.prevZ=null,function(e){let t,n,r,i,a,s,o,l,u=1;do{for(n=e,e=null,a=null,s=0;n;){for(s++,r=n,o=0,t=0;t<u&&(o++,r=r.nextZ,r);t++);for(l=u;o>0||l>0&&r;)0!==o&&(0===l||!r||n.z<=r.z)?(i=n,n=n.nextZ,o--):(i=r,r=r.nextZ,l--),a?a.nextZ=i:e=i,i.prevZ=a,a=i;n=r}a.nextZ=null,u*=2}while(s>1)}(i)}(e,r,i,a);let o,l,u=e;for(;e.prev!==e.next;)if(o=e.prev,l=e.next,a?tc(e,r,i,a):ec(e))t.push(o.i/n|0),t.push(e.i/n|0),t.push(l.i/n|0),xc(e),e=l.next,u=l.next;else if((e=l)===u){s?1===s?$u(e=nc(Zu(e),t,n),t,n,r,i,a,2):2===s&&rc(e,t,n,r,i,a):$u(Zu(e),t,n,r,i,a,1);break}}function ec(e){const t=e.prev,n=e,r=e.next;if(hc(t,n,r)>=0)return!1;const i=t.x,a=n.x,s=r.x,o=t.y,l=n.y,u=r.y,c=i<a?i<s?i:s:a<s?a:s,h=o<l?o<u?o:u:l<u?l:u,d=i>a?i>s?i:s:a>s?a:s,f=o>l?o>u?o:u:l>u?l:u;let p=r.next;for(;p!==t;){if(p.x>=c&&p.x<=d&&p.y>=h&&p.y<=f&&uc(i,o,a,l,s,u,p.x,p.y)&&hc(p.prev,p,p.next)>=0)return!1;p=p.next}return!0}function tc(e,t,n,r){const i=e.prev,a=e,s=e.next;if(hc(i,a,s)>=0)return!1;const o=i.x,l=a.x,u=s.x,c=i.y,h=a.y,d=s.y,f=o<l?o<u?o:u:l<u?l:u,p=c<h?c<d?c:d:h<d?h:d,m=o>l?o>u?o:u:l>u?l:u,g=c>h?c>d?c:d:h>d?h:d,v=oc(f,p,t,n,r),y=oc(m,g,t,n,r);let x=e.prevZ,b=e.nextZ;for(;x&&x.z>=v&&b&&b.z<=y;){if(x.x>=f&&x.x<=m&&x.y>=p&&x.y<=g&&x!==i&&x!==s&&uc(o,c,l,h,u,d,x.x,x.y)&&hc(x.prev,x,x.next)>=0)return!1;if(x=x.prevZ,b.x>=f&&b.x<=m&&b.y>=p&&b.y<=g&&b!==i&&b!==s&&uc(o,c,l,h,u,d,b.x,b.y)&&hc(b.prev,b,b.next)>=0)return!1;b=b.nextZ}for(;x&&x.z>=v;){if(x.x>=f&&x.x<=m&&x.y>=p&&x.y<=g&&x!==i&&x!==s&&uc(o,c,l,h,u,d,x.x,x.y)&&hc(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;b&&b.z<=y;){if(b.x>=f&&b.x<=m&&b.y>=p&&b.y<=g&&b!==i&&b!==s&&uc(o,c,l,h,u,d,b.x,b.y)&&hc(b.prev,b,b.next)>=0)return!1;b=b.nextZ}return!0}function nc(e,t,n){let r=e;do{const i=r.prev,a=r.next.next;!dc(i,a)&&fc(i,r,r.next,a)&&gc(i,a)&&gc(a,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(a.i/n|0),xc(r),xc(r.next),r=e=a),r=r.next}while(r!==e);return Zu(r)}function rc(e,t,n,r,i,a){let s=e;do{let e=s.next.next;for(;e!==s.prev;){if(s.i!==e.i&&cc(s,e)){let o=vc(s,e);return s=Zu(s,s.next),o=Zu(o,o.next),$u(s,t,n,r,i,a,0),void $u(o,t,n,r,i,a,0)}e=e.next}s=s.next}while(s!==e)}function ic(e,t){return e.x-t.x}function ac(e,t){const n=function(e,t){let n,r=t,i=-1/0;const a=e.x,s=e.y;do{if(s<=r.y&&s>=r.next.y&&r.next.y!==r.y){const e=r.x+(s-r.y)*(r.next.x-r.x)/(r.next.y-r.y);if(e<=a&&e>i&&(i=e,n=r.x<r.next.x?r:r.next,e===a))return n}r=r.next}while(r!==t);if(!n)return null;const o=n,l=n.x,u=n.y;let c,h=1/0;r=n;do{a>=r.x&&r.x>=l&&a!==r.x&&uc(s<u?a:i,s,l,u,s<u?i:a,s,r.x,r.y)&&(c=Math.abs(s-r.y)/(a-r.x),gc(r,e)&&(c<h||c===h&&(r.x>n.x||r.x===n.x&&sc(n,r)))&&(n=r,h=c)),r=r.next}while(r!==o);return n}(e,t);if(!n)return t;const r=vc(n,e);return Zu(r,r.next),Zu(n,n.next)}function sc(e,t){return hc(e.prev,e,t.prev)<0&&hc(t.next,e,e.next)<0}function oc(e,t,n,r,i){return(e=1431655765&((e=858993459&((e=252645135&((e=16711935&((e=(e-n)*i|0)|e<<8))|e<<4))|e<<2))|e<<1))|(t=1431655765&((t=858993459&((t=252645135&((t=16711935&((t=(t-r)*i|0)|t<<8))|t<<4))|t<<2))|t<<1))<<1}function lc(e){let t=e,n=e;do{(t.x<n.x||t.x===n.x&&t.y<n.y)&&(n=t),t=t.next}while(t!==e);return n}function uc(e,t,n,r,i,a,s,o){return(i-s)*(t-o)>=(e-s)*(a-o)&&(e-s)*(r-o)>=(n-s)*(t-o)&&(n-s)*(a-o)>=(i-s)*(r-o)}function cc(e,t){return e.next.i!==t.i&&e.prev.i!==t.i&&!function(e,t){let n=e;do{if(n.i!==e.i&&n.next.i!==e.i&&n.i!==t.i&&n.next.i!==t.i&&fc(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&(gc(e,t)&&gc(t,e)&&function(e,t){let n=e,r=!1;const i=(e.x+t.x)/2,a=(e.y+t.y)/2;do{n.y>a!=n.next.y>a&&n.next.y!==n.y&&i<(n.next.x-n.x)*(a-n.y)/(n.next.y-n.y)+n.x&&(r=!r),n=n.next}while(n!==e);return r}(e,t)&&(hc(e.prev,e,t.prev)||hc(e,t.prev,t))||dc(e,t)&&hc(e.prev,e,e.next)>0&&hc(t.prev,t,t.next)>0)}function hc(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function dc(e,t){return e.x===t.x&&e.y===t.y}function fc(e,t,n,r){const i=mc(hc(e,t,n)),a=mc(hc(e,t,r)),s=mc(hc(n,r,e)),o=mc(hc(n,r,t));return i!==a&&s!==o||!(0!==i||!pc(e,n,t))||!(0!==a||!pc(e,r,t))||!(0!==s||!pc(n,e,r))||!(0!==o||!pc(n,t,r))}function pc(e,t,n){return t.x<=Math.max(e.x,n.x)&&t.x>=Math.min(e.x,n.x)&&t.y<=Math.max(e.y,n.y)&&t.y>=Math.min(e.y,n.y)}function mc(e){return e>0?1:e<0?-1:0}function gc(e,t){return hc(e.prev,e,e.next)<0?hc(e,t,e.next)>=0&&hc(e,e.prev,t)>=0:hc(e,t,e.prev)<0||hc(e,e.next,t)<0}function vc(e,t){const n=new bc(e.i,e.x,e.y),r=new bc(t.i,t.x,t.y),i=e.next,a=t.prev;return e.next=t,t.prev=e,n.next=i,i.prev=n,r.next=n,n.prev=r,a.next=r,r.prev=a,r}function yc(e,t,n,r){const i=new bc(e,t,n);return r?(i.next=r.next,i.prev=r,r.next.prev=i,r.next=i):(i.prev=i,i.next=i),i}function xc(e){e.next.prev=e.prev,e.prev.next=e.next,e.prevZ&&(e.prevZ.nextZ=e.nextZ),e.nextZ&&(e.nextZ.prevZ=e.prevZ)}function bc(e,t,n){this.i=e,this.x=t,this.y=n,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}class _c{static area(e){const t=e.length;let n=0;for(let r=t-1,i=0;i<t;r=i++)n+=e[r].x*e[i].y-e[i].x*e[r].y;return.5*n}static isClockWise(e){return _c.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];wc(e),Mc(n,e);let a=e.length;t.forEach(wc);for(let e=0;e<t.length;e++)r.push(a),a+=t[e].length,Mc(n,t[e]);const s=function(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let a=Qu(e,0,i,n,!0);const s=[];if(!a||a.next===a.prev)return s;let o,l,u,c,h,d,f;if(r&&(a=function(e,t,n,r){const i=[];let a,s,o,l,u;for(a=0,s=t.length;a<s;a++)o=t[a]*r,l=a<s-1?t[a+1]*r:e.length,u=Qu(e,o,l,r,!1),u===u.next&&(u.steiner=!0),i.push(lc(u));for(i.sort(ic),a=0;a<i.length;a++)n=ac(i[a],n);return n}(e,t,a,n)),e.length>80*n){o=u=e[0],l=c=e[1];for(let t=n;t<i;t+=n)h=e[t],d=e[t+1],h<o&&(o=h),d<l&&(l=d),h>u&&(u=h),d>c&&(c=d);f=Math.max(u-o,c-l),f=0!==f?32767/f:0}return $u(a,s,n,o,l,f,0),s}(n,r);for(let e=0;e<s.length;e+=3)i.push(s.slice(e,e+3));return i}}function wc(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function Mc(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class Sc extends Wi{constructor(e=new qu([new Pn(.5,.5),new Pn(-.5,.5),new Pn(-.5,-.5),new Pn(.5,-.5)]),t={}){super(),this.type="ExtrudeGeometry",this.parameters={shapes:e,options:t},e=Array.isArray(e)?e:[e];const n=this,r=[],i=[];for(let t=0,n=e.length;t<n;t++)a(e[t]);function a(e){const a=[],s=void 0!==t.curveSegments?t.curveSegments:12,o=void 0!==t.steps?t.steps:1,l=void 0!==t.depth?t.depth:1;let u=void 0===t.bevelEnabled||t.bevelEnabled,c=void 0!==t.bevelThickness?t.bevelThickness:.2,h=void 0!==t.bevelSize?t.bevelSize:c-.1,d=void 0!==t.bevelOffset?t.bevelOffset:0,f=void 0!==t.bevelSegments?t.bevelSegments:3;const p=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:Ac;let g,v,y,x,b,_=!1;p&&(g=p.getSpacedPoints(o),_=!0,u=!1,v=p.computeFrenetFrames(o,!1),y=new lr,x=new lr,b=new lr),u||(f=0,c=0,h=0,d=0);const w=e.extractPoints(s);let M=w.shape;const S=w.holes;if(!_c.isClockWise(M)){M=M.reverse();for(let e=0,t=S.length;e<t;e++){const t=S[e];_c.isClockWise(t)&&(S[e]=t.reverse())}}const A=_c.triangulateShape(M,S),C=M;for(let e=0,t=S.length;e<t;e++){const t=S[e];M=M.concat(t)}function E(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),t.clone().multiplyScalar(n).add(e)}const T=M.length,B=A.length;function P(e,t,n){let r,i,a;const s=e.x-t.x,o=e.y-t.y,l=n.x-e.x,u=n.y-e.y,c=s*s+o*o,h=s*u-o*l;if(Math.abs(h)>Number.EPSILON){const h=Math.sqrt(c),d=Math.sqrt(l*l+u*u),f=t.x-o/h,p=t.y+s/h,m=((n.x-u/d-f)*u-(n.y+l/d-p)*l)/(s*u-o*l);r=f+s*m-e.x,i=p+o*m-e.y;const g=r*r+i*i;if(g<=2)return new Pn(r,i);a=Math.sqrt(g/2)}else{let e=!1;s>Number.EPSILON?l>Number.EPSILON&&(e=!0):s<-Number.EPSILON?l<-Number.EPSILON&&(e=!0):Math.sign(o)===Math.sign(u)&&(e=!0),e?(r=-o,i=s,a=Math.sqrt(c)):(r=s,i=o,a=Math.sqrt(c/2))}return new Pn(r/a,i/a)}const R=[];for(let e=0,t=C.length,n=t-1,r=e+1;e<t;e++,n++,r++)n===t&&(n=0),r===t&&(r=0),R[e]=P(C[e],C[n],C[r]);const L=[];let D,I=R.concat();for(let e=0,t=S.length;e<t;e++){const t=S[e];D=[];for(let e=0,n=t.length,r=n-1,i=e+1;e<n;e++,r++,i++)r===n&&(r=0),i===n&&(i=0),D[e]=P(t[e],t[r],t[i]);L.push(D),I=I.concat(D)}for(let e=0;e<f;e++){const t=e/f,n=c*Math.cos(t*Math.PI/2),r=h*Math.sin(t*Math.PI/2)+d;for(let e=0,t=C.length;e<t;e++){const t=E(C[e],R[e],r);O(t.x,t.y,-n)}for(let e=0,t=S.length;e<t;e++){const t=S[e];D=L[e];for(let e=0,i=t.length;e<i;e++){const i=E(t[e],D[e],r);O(i.x,i.y,-n)}}}const k=h+d;for(let e=0;e<T;e++){const t=u?E(M[e],I[e],k):M[e];_?(x.copy(v.normals[0]).multiplyScalar(t.x),y.copy(v.binormals[0]).multiplyScalar(t.y),b.copy(g[0]).add(x).add(y),O(b.x,b.y,b.z)):O(t.x,t.y,0)}for(let e=1;e<=o;e++)for(let t=0;t<T;t++){const n=u?E(M[t],I[t],k):M[t];_?(x.copy(v.normals[e]).multiplyScalar(n.x),y.copy(v.binormals[e]).multiplyScalar(n.y),b.copy(g[e]).add(x).add(y),O(b.x,b.y,b.z)):O(n.x,n.y,l/o*e)}for(let e=f-1;e>=0;e--){const t=e/f,n=c*Math.cos(t*Math.PI/2),r=h*Math.sin(t*Math.PI/2)+d;for(let e=0,t=C.length;e<t;e++){const t=E(C[e],R[e],r);O(t.x,t.y,l+n)}for(let e=0,t=S.length;e<t;e++){const t=S[e];D=L[e];for(let e=0,i=t.length;e<i;e++){const i=E(t[e],D[e],r);_?O(i.x,i.y+g[o-1].y,g[o-1].x+n):O(i.x,i.y,l+n)}}}function F(e,t){let n=e.length;for(;--n>=0;){const r=n;let i=n-1;i<0&&(i=e.length-1);for(let e=0,n=o+2*f;e<n;e++){const n=T*e,a=T*(e+1);z(t+r+n,t+i+n,t+i+a,t+r+a)}}}function O(e,t,n){a.push(e),a.push(t),a.push(n)}function N(e,t,i){U(e),U(t),U(i);const a=r.length/3,s=m.generateTopUV(n,r,a-3,a-2,a-1);G(s[0]),G(s[1]),G(s[2])}function z(e,t,i,a){U(e),U(t),U(a),U(t),U(i),U(a);const s=r.length/3,o=m.generateSideWallUV(n,r,s-6,s-3,s-2,s-1);G(o[0]),G(o[1]),G(o[3]),G(o[1]),G(o[2]),G(o[3])}function U(e){r.push(a[3*e+0]),r.push(a[3*e+1]),r.push(a[3*e+2])}function G(e){i.push(e.x),i.push(e.y)}!function(){const e=r.length/3;if(u){let e=0,t=T*e;for(let e=0;e<B;e++){const n=A[e];N(n[2]+t,n[1]+t,n[0]+t)}e=o+2*f,t=T*e;for(let e=0;e<B;e++){const n=A[e];N(n[0]+t,n[1]+t,n[2]+t)}}else{for(let e=0;e<B;e++){const t=A[e];N(t[2],t[1],t[0])}for(let e=0;e<B;e++){const t=A[e];N(t[0]+T*o,t[1]+T*o,t[2]+T*o)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;F(C,t),t+=C.length;for(let e=0,n=S.length;e<n;e++){const n=S[e];F(n,t),t+=n.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new ki(r,3)),this.setAttribute("uv",new ki(i,2)),this.computeVertexNormals()}toJSON(){const e=super.toJSON();return function(e,t,n){if(n.shapes=[],Array.isArray(e))for(let t=0,r=e.length;t<r;t++){const r=e[t];n.shapes.push(r.uuid)}else n.shapes.push(e.uuid);return n.options=Object.assign({},t),void 0!==t.extrudePath&&(n.options.extrudePath=t.extrudePath.toJSON()),n}(this.parameters.shapes,this.parameters.options,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}const r=e.options.extrudePath;return void 0!==r&&(e.options.extrudePath=(new ku[r.type]).fromJSON(r)),new Sc(n,e.options)}}const Ac={generateTopUV:function(e,t,n,r,i){const a=t[3*n],s=t[3*n+1],o=t[3*r],l=t[3*r+1],u=t[3*i],c=t[3*i+1];return[new Pn(a,s),new Pn(o,l),new Pn(u,c)]},generateSideWallUV:function(e,t,n,r,i,a){const s=t[3*n],o=t[3*n+1],l=t[3*n+2],u=t[3*r],c=t[3*r+1],h=t[3*r+2],d=t[3*i],f=t[3*i+1],p=t[3*i+2],m=t[3*a],g=t[3*a+1],v=t[3*a+2];return Math.abs(o-c)<Math.abs(s-u)?[new Pn(s,1-l),new Pn(u,1-h),new Pn(d,1-p),new Pn(m,1-v)]:[new Pn(o,1-l),new Pn(c,1-h),new Pn(f,1-p),new Pn(g,1-v)]}};class Cc extends Vu{constructor(e=1,t=0){const n=(1+Math.sqrt(5))/2;super([-1,n,0,1,n,0,-1,-n,0,1,-n,0,0,-1,n,0,1,n,0,-1,-n,0,1,-n,n,0,-1,n,0,1,-n,0,-1,-n,0,1],[0,11,5,0,5,1,0,1,7,0,7,10,0,10,11,1,5,9,5,11,4,11,10,2,10,7,6,7,1,8,3,9,4,3,4,2,3,2,6,3,6,8,3,8,9,4,9,5,2,4,11,6,2,10,8,6,7,9,8,1],e,t),this.type="IcosahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Cc(e.radius,e.detail)}}class Ec extends Vu{constructor(e=1,t=0){super([1,0,0,-1,0,0,0,1,0,0,-1,0,0,0,1,0,0,-1],[0,2,4,0,4,3,0,3,5,0,5,2,1,2,5,1,5,3,1,3,4,1,4,2],e,t),this.type="OctahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Ec(e.radius,e.detail)}}class Tc extends Wi{constructor(e=.5,t=1,n=32,r=1,i=0,a=2*Math.PI){super(),this.type="RingGeometry",this.parameters={innerRadius:e,outerRadius:t,thetaSegments:n,phiSegments:r,thetaStart:i,thetaLength:a},n=Math.max(3,n);const s=[],o=[],l=[],u=[];let c=e;const h=(t-e)/(r=Math.max(1,r)),d=new lr,f=new Pn;for(let e=0;e<=r;e++){for(let e=0;e<=n;e++){const r=i+e/n*a;d.x=c*Math.cos(r),d.y=c*Math.sin(r),o.push(d.x,d.y,d.z),l.push(0,0,1),f.x=(d.x/t+1)/2,f.y=(d.y/t+1)/2,u.push(f.x,f.y)}c+=h}for(let e=0;e<r;e++){const t=e*(n+1);for(let e=0;e<n;e++){const r=e+t,i=r,a=r+n+1,o=r+n+2,l=r+1;s.push(i,a,l),s.push(a,o,l)}}this.setIndex(s),this.setAttribute("position",new ki(o,3)),this.setAttribute("normal",new ki(l,3)),this.setAttribute("uv",new ki(u,2))}static fromJSON(e){return new Tc(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class Bc extends Wi{constructor(e=new qu([new Pn(0,.5),new Pn(-.5,-.5),new Pn(.5,-.5)]),t=12){super(),this.type="ShapeGeometry",this.parameters={shapes:e,curveSegments:t};const n=[],r=[],i=[],a=[];let s=0,o=0;if(!1===Array.isArray(e))l(e);else for(let t=0;t<e.length;t++)l(e[t]),this.addGroup(s,o,t),s+=o,o=0;function l(e){const s=r.length/3,l=e.extractPoints(t);let u=l.shape;const c=l.holes;!1===_c.isClockWise(u)&&(u=u.reverse());for(let e=0,t=c.length;e<t;e++){const t=c[e];!0===_c.isClockWise(t)&&(c[e]=t.reverse())}const h=_c.triangulateShape(u,c);for(let e=0,t=c.length;e<t;e++){const t=c[e];u=u.concat(t)}for(let e=0,t=u.length;e<t;e++){const t=u[e];r.push(t.x,t.y,0),i.push(0,0,1),a.push(t.x,t.y)}for(let e=0,t=h.length;e<t;e++){const t=h[e],r=t[0]+s,i=t[1]+s,a=t[2]+s;n.push(r,i,a),o+=3}}this.setIndex(n),this.setAttribute("position",new ki(r,3)),this.setAttribute("normal",new ki(i,3)),this.setAttribute("uv",new ki(a,2))}toJSON(){const e=super.toJSON();return function(e,t){if(t.shapes=[],Array.isArray(e))for(let n=0,r=e.length;n<r;n++){const r=e[n];t.shapes.push(r.uuid)}else t.shapes.push(e.uuid);return t}(this.parameters.shapes,e)}static fromJSON(e,t){const n=[];for(let r=0,i=e.shapes.length;r<i;r++){const i=t[e.shapes[r]];n.push(i)}return new Bc(n,e.curveSegments)}}class Pc extends Wi{constructor(e=1,t=32,n=16,r=0,i=2*Math.PI,a=0,s=Math.PI){super(),this.type="SphereGeometry",this.parameters={radius:e,widthSegments:t,heightSegments:n,phiStart:r,phiLength:i,thetaStart:a,thetaLength:s},t=Math.max(3,Math.floor(t)),n=Math.max(2,Math.floor(n));const o=Math.min(a+s,Math.PI);let l=0;const u=[],c=new lr,h=new lr,d=[],f=[],p=[],m=[];for(let d=0;d<=n;d++){const g=[],v=d/n;let y=0;0==d&&0==a?y=.5/t:d==n&&o==Math.PI&&(y=-.5/t);for(let n=0;n<=t;n++){const o=n/t;c.x=-e*Math.cos(r+o*i)*Math.sin(a+v*s),c.y=e*Math.cos(a+v*s),c.z=e*Math.sin(r+o*i)*Math.sin(a+v*s),f.push(c.x,c.y,c.z),h.copy(c).normalize(),p.push(h.x,h.y,h.z),m.push(o+y,1-v),g.push(l++)}u.push(g)}for(let e=0;e<n;e++)for(let r=0;r<t;r++){const t=u[e][r+1],i=u[e][r],s=u[e+1][r],l=u[e+1][r+1];(0!==e||a>0)&&d.push(t,i,l),(e!==n-1||o<Math.PI)&&d.push(i,s,l)}this.setIndex(d),this.setAttribute("position",new ki(f,3)),this.setAttribute("normal",new ki(p,3)),this.setAttribute("uv",new ki(m,2))}static fromJSON(e){return new Pc(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class Rc extends Vu{constructor(e=1,t=0){super([1,1,1,-1,-1,1,-1,1,-1,1,-1,-1],[2,1,0,0,3,2,1,3,0,2,3,1],e,t),this.type="TetrahedronGeometry",this.parameters={radius:e,detail:t}}static fromJSON(e){return new Rc(e.radius,e.detail)}}class Lc extends Wi{constructor(e=1,t=.4,n=12,r=48,i=2*Math.PI){super(),this.type="TorusGeometry",this.parameters={radius:e,tube:t,radialSegments:n,tubularSegments:r,arc:i},n=Math.floor(n),r=Math.floor(r);const a=[],s=[],o=[],l=[],u=new lr,c=new lr,h=new lr;for(let a=0;a<=n;a++)for(let d=0;d<=r;d++){const f=d/r*i,p=a/n*Math.PI*2;c.x=(e+t*Math.cos(p))*Math.cos(f),c.y=(e+t*Math.cos(p))*Math.sin(f),c.z=t*Math.sin(p),s.push(c.x,c.y,c.z),u.x=e*Math.cos(f),u.y=e*Math.sin(f),h.subVectors(c,u).normalize(),o.push(h.x,h.y,h.z),l.push(d/r),l.push(a/n)}for(let e=1;e<=n;e++)for(let t=1;t<=r;t++){const n=(r+1)*e+t-1,i=(r+1)*(e-1)+t-1,s=(r+1)*(e-1)+t,o=(r+1)*e+t;a.push(n,i,o),a.push(i,s,o)}this.setIndex(a),this.setAttribute("position",new ki(s,3)),this.setAttribute("normal",new ki(o,3)),this.setAttribute("uv",new ki(l,2))}static fromJSON(e){return new Lc(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class Dc extends Wi{constructor(e=1,t=.4,n=64,r=8,i=2,a=3){super(),this.type="TorusKnotGeometry",this.parameters={radius:e,tube:t,tubularSegments:n,radialSegments:r,p:i,q:a},n=Math.floor(n),r=Math.floor(r);const s=[],o=[],l=[],u=[],c=new lr,h=new lr,d=new lr,f=new lr,p=new lr,m=new lr,g=new lr;for(let s=0;s<=n;++s){const y=s/n*i*Math.PI*2;v(y,i,a,e,d),v(y+.01,i,a,e,f),m.subVectors(f,d),g.addVectors(f,d),p.crossVectors(m,g),g.crossVectors(p,m),p.normalize(),g.normalize();for(let e=0;e<=r;++e){const i=e/r*Math.PI*2,a=-t*Math.cos(i),f=t*Math.sin(i);c.x=d.x+(a*g.x+f*p.x),c.y=d.y+(a*g.y+f*p.y),c.z=d.z+(a*g.z+f*p.z),o.push(c.x,c.y,c.z),h.subVectors(c,d).normalize(),l.push(h.x,h.y,h.z),u.push(s/n),u.push(e/r)}}for(let e=1;e<=n;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),a=(r+1)*e+t,o=(r+1)*(e-1)+t;s.push(n,i,o),s.push(i,a,o)}function v(e,t,n,r,i){const a=Math.cos(e),s=Math.sin(e),o=n/t*e,l=Math.cos(o);i.x=r*(2+l)*.5*a,i.y=r*(2+l)*s*.5,i.z=r*Math.sin(o)*.5}this.setIndex(s),this.setAttribute("position",new ki(o,3)),this.setAttribute("normal",new ki(l,3)),this.setAttribute("uv",new ki(u,2))}static fromJSON(e){return new Dc(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class Ic extends Wi{constructor(e=new Du(new lr(-1,-1,0),new lr(-1,1,0),new lr(1,1,0)),t=64,n=1,r=8,i=!1){super(),this.type="TubeGeometry",this.parameters={path:e,tubularSegments:t,radius:n,radialSegments:r,closed:i};const a=e.computeFrenetFrames(t,i);this.tangents=a.tangents,this.normals=a.normals,this.binormals=a.binormals;const s=new lr,o=new lr,l=new Pn;let u=new lr;const c=[],h=[],d=[],f=[];function p(i){u=e.getPointAt(i/t,u);const l=a.normals[i],d=a.binormals[i];for(let e=0;e<=r;e++){const t=e/r*Math.PI*2,i=Math.sin(t),a=-Math.cos(t);o.x=a*l.x+i*d.x,o.y=a*l.y+i*d.y,o.z=a*l.z+i*d.z,o.normalize(),h.push(o.x,o.y,o.z),s.x=u.x+n*o.x,s.y=u.y+n*o.y,s.z=u.z+n*o.z,c.push(s.x,s.y,s.z)}}!function(){for(let e=0;e<t;e++)p(e);p(!1===i?t:0),function(){for(let e=0;e<=t;e++)for(let n=0;n<=r;n++)l.x=e/t,l.y=n/r,d.push(l.x,l.y)}(),function(){for(let e=1;e<=t;e++)for(let t=1;t<=r;t++){const n=(r+1)*(e-1)+(t-1),i=(r+1)*e+(t-1),a=(r+1)*e+t,s=(r+1)*(e-1)+t;f.push(n,i,s),f.push(i,a,s)}}()}(),this.setIndex(f),this.setAttribute("position",new ki(c,3)),this.setAttribute("normal",new ki(h,3)),this.setAttribute("uv",new ki(d,2))}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new Ic((new ku[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class kc extends Wi{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],n=new Set,r=new lr,i=new lr;if(null!==e.index){const a=e.attributes.position,s=e.index;let o=e.groups;0===o.length&&(o=[{start:0,count:s.count,materialIndex:0}]);for(let e=0,l=o.length;e<l;++e){const l=o[e],u=l.start;for(let e=u,o=u+l.count;e<o;e+=3)for(let o=0;o<3;o++){const l=s.getX(e+o),u=s.getX(e+(o+1)%3);r.fromBufferAttribute(a,l),i.fromBufferAttribute(a,u),!0===Fc(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}}else{const a=e.attributes.position;for(let e=0,s=a.count/3;e<s;e++)for(let s=0;s<3;s++){const o=3*e+s,l=3*e+(s+1)%3;r.fromBufferAttribute(a,o),i.fromBufferAttribute(a,l),!0===Fc(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}this.setAttribute("position",new ki(t,3))}}}function Fc(e,t,n){const r=`${e.x},${e.y},${e.z}-${t.x},${t.y},${t.z}`,i=`${t.x},${t.y},${t.z}-${e.x},${e.y},${e.z}`;return!0!==n.has(r)&&!0!==n.has(i)&&(n.add(r),n.add(i),!0)}var Oc=Object.freeze({__proto__:null,BoxGeometry:sa,CapsuleGeometry:zu,CircleGeometry:Uu,ConeGeometry:Hu,CylinderGeometry:Gu,DodecahedronGeometry:Wu,EdgesGeometry:Ku,ExtrudeGeometry:Sc,IcosahedronGeometry:Cc,LatheGeometry:Nu,OctahedronGeometry:Ec,PlaneGeometry:Ea,PolyhedronGeometry:Vu,RingGeometry:Tc,ShapeGeometry:Bc,SphereGeometry:Pc,TetrahedronGeometry:Rc,TorusGeometry:Lc,TorusKnotGeometry:Dc,TubeGeometry:Ic,WireframeGeometry:kc});class Nc extends wi{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Xn(0),this.transparent=!0,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.fog=e.fog,this}}class zc extends ha{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class Uc extends wi{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Xn(16777215),this.roughness=1,this.metalness=0,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=kt,this.normalScale=new Pn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.roughnessMap=null,this.metalnessMap=null,this.alphaMap=null,this.envMap=null,this.envMapIntensity=1,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={STANDARD:""},this.color.copy(e.color),this.roughness=e.roughness,this.metalness=e.metalness,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.roughnessMap=e.roughnessMap,this.metalnessMap=e.metalnessMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.envMapIntensity=e.envMapIntensity,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Gc extends Uc{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Pn(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return _n(2.5*(this.ior-1)/(this.ior+1),0,1)},set:function(e){this.ior=(1+.4*e)/(1-.4*e)}}),this.iridescenceMap=null,this.iridescenceIOR=1.3,this.iridescenceThicknessRange=[100,400],this.iridescenceThicknessMap=null,this.sheenColor=new Xn(0),this.sheenColorMap=null,this.sheenRoughness=1,this.sheenRoughnessMap=null,this.transmissionMap=null,this.thickness=0,this.thicknessMap=null,this.attenuationDistance=1/0,this.attenuationColor=new Xn(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Xn(1,1,1),this.specularColorMap=null,this._sheen=0,this._clearcoat=0,this._iridescence=0,this._transmission=0,this.setValues(e)}get sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get iridescence(){return this._iridescence}set iridescence(e){this._iridescence>0!=e>0&&this.version++,this._iridescence=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.iridescence=e.iridescence,this.iridescenceMap=e.iridescenceMap,this.iridescenceIOR=e.iridescenceIOR,this.iridescenceThicknessRange=[...e.iridescenceThicknessRange],this.iridescenceThicknessMap=e.iridescenceThicknessMap,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}}class Hc extends wi{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Xn(16777215),this.specular=new Xn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=kt,this.normalScale=new Pn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Y,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Vc extends wi{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Xn(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=kt,this.normalScale=new Pn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.fog=e.fog,this}}class Wc extends wi{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=kt,this.normalScale=new Pn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}}class jc extends wi{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Xn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=kt,this.normalScale=new Pn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Y,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,this.combine=e.combine,this.reflectivity=e.reflectivity,this.refractionRatio=e.refractionRatio,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Jc extends wi{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Xn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=kt,this.normalScale=new Pn(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this.fog=e.fog,this}}class Xc extends Xl{constructor(e){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}}function Yc(e,t,n){return qc(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)}function Kc(e,t,n){return!e||!n&&e.constructor===t?e:"number"==typeof t.BYTES_PER_ELEMENT?new t(e):Array.prototype.slice.call(e)}function qc(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Qc(e){const t=e.length,n=new Array(t);for(let e=0;e!==t;++e)n[e]=e;return n.sort((function(t,n){return e[t]-e[n]})),n}function Zc(e,t,n){const r=e.length,i=new e.constructor(r);for(let a=0,s=0;s!==r;++a){const r=n[a]*t;for(let n=0;n!==t;++n)i[s++]=e[r+n]}return i}function $c(e,t,n,r){let i=1,a=e[0];for(;void 0!==a&&void 0===a[r];)a=e[i++];if(void 0===a)return;let s=a[r];if(void 0!==s)if(Array.isArray(s))do{s=a[r],void 0!==s&&(t.push(a.time),n.push.apply(n,s)),a=e[i++]}while(void 0!==a);else if(void 0!==s.toArray)do{s=a[r],void 0!==s&&(t.push(a.time),s.toArray(n,n.length)),a=e[i++]}while(void 0!==a);else do{s=a[r],void 0!==s&&(t.push(a.time),n.push(s)),a=e[i++]}while(void 0!==a)}var eh=Object.freeze({__proto__:null,arraySlice:Yc,convertArray:Kc,isTypedArray:qc,getKeyframeOrder:Qc,sortedArray:Zc,flattenJSON:$c,subclip:function(e,t,n,r,i=30){const a=e.clone();a.name=t;const s=[];for(let e=0;e<a.tracks.length;++e){const t=a.tracks[e],o=t.getValueSize(),l=[],u=[];for(let e=0;e<t.times.length;++e){const a=t.times[e]*i;if(!(a<n||a>=r)){l.push(t.times[e]);for(let n=0;n<o;++n)u.push(t.values[e*o+n])}}0!==l.length&&(t.times=Kc(l,t.times.constructor),t.values=Kc(u,t.values.constructor),s.push(t))}a.tracks=s;let o=1/0;for(let e=0;e<a.tracks.length;++e)o>a.tracks[e].times[0]&&(o=a.tracks[e].times[0]);for(let e=0;e<a.tracks.length;++e)a.tracks[e].shift(-1*o);return a.resetDuration(),a},makeClipAdditive:function(e,t=0,n=e,r=30){r<=0&&(r=30);const i=n.tracks.length,a=t/r;for(let t=0;t<i;++t){const r=n.tracks[t],i=r.ValueTypeName;if("bool"===i||"string"===i)continue;const s=e.tracks.find((function(e){return e.name===r.name&&e.ValueTypeName===i}));if(void 0===s)continue;let o=0;const l=r.getValueSize();r.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(o=l/3);let u=0;const c=s.getValueSize();s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(u=c/3);const h=r.times.length-1;let d;if(a<=r.times[0]){const e=o,t=l-o;d=Yc(r.values,e,t)}else if(a>=r.times[h]){const e=h*l+o,t=e+l-o;d=Yc(r.values,e,t)}else{const e=r.createInterpolant(),t=o,n=l-o;e.evaluate(a),d=Yc(e.resultBuffer,t,n)}"quaternion"===i&&(new or).fromArray(d).normalize().conjugate().toArray(d);const f=s.times.length;for(let e=0;e<f;++e){const t=e*c+u;if("quaternion"===i)or.multiplyQuaternionsFlat(s.values,t,d,0,s.values,t);else{const e=c-2*u;for(let n=0;n<e;++n)s.values[t+n]-=d[n]}}}return e.blendMode=Et,e}});class th{constructor(e,t,n,r){this.parameterPositions=e,this._cachedIndex=0,this.resultBuffer=void 0!==r?r:new t.constructor(n),this.sampleValues=t,this.valueSize=n,this.settings=null,this.DefaultSettings_={}}evaluate(e){const t=this.parameterPositions;let n=this._cachedIndex,r=t[n],i=t[n-1];e:{t:{let a;n:{r:if(!(e<r)){for(let a=n+2;;){if(void 0===r){if(e<i)break r;return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}if(n===a)break;if(i=r,r=t[++n],e<r)break t}a=t.length;break n}if(e>=i)break e;{const s=t[1];e<s&&(n=2,i=s);for(let a=n-2;;){if(void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(n===a)break;if(r=i,i=t[--n-1],e>=i)break t}a=n,n=0}}for(;n<a;){const r=n+a>>>1;e<t[r]?a=r:n=r+1}if(r=t[n],i=t[n-1],void 0===i)return this._cachedIndex=0,this.copySampleValue_(0);if(void 0===r)return n=t.length,this._cachedIndex=n,this.copySampleValue_(n-1)}this._cachedIndex=n,this.intervalChanged_(n,i,r)}return this.interpolate_(n,i,e,r)}getSettings_(){return this.settings||this.DefaultSettings_}copySampleValue_(e){const t=this.resultBuffer,n=this.sampleValues,r=this.valueSize,i=e*r;for(let e=0;e!==r;++e)t[e]=n[i+e];return t}interpolate_(){throw new Error("call to abstract method")}intervalChanged_(){}}class nh extends th{constructor(e,t,n,r){super(e,t,n,r),this._weightPrev=-0,this._offsetPrev=-0,this._weightNext=-0,this._offsetNext=-0,this.DefaultSettings_={endingStart:Mt,endingEnd:Mt}}intervalChanged_(e,t,n){const r=this.parameterPositions;let i=e-2,a=e+1,s=r[i],o=r[a];if(void 0===s)switch(this.getSettings_().endingStart){case St:i=e,s=2*t-n;break;case At:i=r.length-2,s=t+r[i]-r[i+1];break;default:i=e,s=n}if(void 0===o)switch(this.getSettings_().endingEnd){case St:a=e,o=2*n-t;break;case At:a=1,o=n+r[1]-r[0];break;default:a=e-1,o=t}const l=.5*(n-t),u=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(o-n),this._offsetPrev=i*u,this._offsetNext=a*u}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=this._offsetPrev,c=this._offsetNext,h=this._weightPrev,d=this._weightNext,f=(n-t)/(r-t),p=f*f,m=p*f,g=-h*m+2*h*p-h*f,v=(1+h)*m+(-1.5-2*h)*p+(-.5+h)*f+1,y=(-1-d)*m+(1.5+d)*p+.5*f,x=d*m-d*p;for(let e=0;e!==s;++e)i[e]=g*a[u+e]+v*a[l+e]+y*a[o+e]+x*a[c+e];return i}}class rh extends th{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,u=(n-t)/(r-t),c=1-u;for(let e=0;e!==s;++e)i[e]=a[l+e]*c+a[o+e]*u;return i}}class ih extends th{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class ah{constructor(e,t,n,r){if(void 0===e)throw new Error("THREE.KeyframeTrack: track name is undefined");if(void 0===t||0===t.length)throw new Error("THREE.KeyframeTrack: no keyframes in track named "+e);this.name=e,this.times=Kc(t,this.TimeBufferType),this.values=Kc(n,this.ValueBufferType),this.setInterpolation(r||this.DefaultInterpolation)}static toJSON(e){const t=e.constructor;let n;if(t.toJSON!==this.toJSON)n=t.toJSON(e);else{n={name:e.name,times:Kc(e.times,Array),values:Kc(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new ih(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new rh(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new nh(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case bt:t=this.InterpolantFactoryMethodDiscrete;break;case _t:t=this.InterpolantFactoryMethodLinear;break;case wt:t=this.InterpolantFactoryMethodSmooth}if(void 0===t){const t="unsupported interpolation for "+this.ValueTypeName+" keyframe track named "+this.name;if(void 0===this.createInterpolant){if(e===this.DefaultInterpolation)throw new Error(t);this.setInterpolation(this.DefaultInterpolation)}return console.warn("THREE.KeyframeTrack:",t),this}return this.createInterpolant=t,this}getInterpolation(){switch(this.createInterpolant){case this.InterpolantFactoryMethodDiscrete:return bt;case this.InterpolantFactoryMethodLinear:return _t;case this.InterpolantFactoryMethodSmooth:return wt}}getValueSize(){return this.values.length/this.times.length}shift(e){if(0!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]+=e}return this}scale(e){if(1!==e){const t=this.times;for(let n=0,r=t.length;n!==r;++n)t[n]*=e}return this}trim(e,t){const n=this.times,r=n.length;let i=0,a=r-1;for(;i!==r&&n[i]<e;)++i;for(;-1!==a&&n[a]>t;)--a;if(++a,0!==i||a!==r){i>=a&&(a=Math.max(a,1),i=a-1);const e=this.getValueSize();this.times=Yc(n,i,a),this.values=Yc(this.values,i*e,a*e)}return this}validate(){let e=!0;const t=this.getValueSize();t-Math.floor(t)!=0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);const n=this.times,r=this.values,i=n.length;0===i&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let a=null;for(let t=0;t!==i;t++){const r=n[t];if("number"==typeof r&&isNaN(r)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,t,r),e=!1;break}if(null!==a&&a>r){console.error("THREE.KeyframeTrack: Out of order keys.",this,t,r,a),e=!1;break}a=r}if(void 0!==r&&qc(r))for(let t=0,n=r.length;t!==n;++t){const n=r[t];if(isNaN(n)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,t,n),e=!1;break}}return e}optimize(){const e=Yc(this.times),t=Yc(this.values),n=this.getValueSize(),r=this.getInterpolation()===wt,i=e.length-1;let a=1;for(let s=1;s<i;++s){let i=!1;const o=e[s];if(o!==e[s+1]&&(1!==s||o!==e[0]))if(r)i=!0;else{const e=s*n,r=e-n,a=e+n;for(let s=0;s!==n;++s){const n=t[e+s];if(n!==t[r+s]||n!==t[a+s]){i=!0;break}}}if(i){if(s!==a){e[a]=e[s];const r=s*n,i=a*n;for(let e=0;e!==n;++e)t[i+e]=t[r+e]}++a}}if(i>0){e[a]=e[i];for(let e=i*n,r=a*n,s=0;s!==n;++s)t[r+s]=t[e+s];++a}return a!==e.length?(this.times=Yc(e,0,a),this.values=Yc(t,0,a*n)):(this.times=e,this.values=t),this}clone(){const e=Yc(this.times,0),t=Yc(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}ah.prototype.TimeBufferType=Float32Array,ah.prototype.ValueBufferType=Float32Array,ah.prototype.DefaultInterpolation=_t;class sh extends ah{}sh.prototype.ValueTypeName="bool",sh.prototype.ValueBufferType=Array,sh.prototype.DefaultInterpolation=bt,sh.prototype.InterpolantFactoryMethodLinear=void 0,sh.prototype.InterpolantFactoryMethodSmooth=void 0;class oh extends ah{}oh.prototype.ValueTypeName="color";class lh extends ah{}lh.prototype.ValueTypeName="number";class uh extends th{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=(n-t)/(r-t);let l=e*s;for(let e=l+s;l!==e;l+=4)or.slerpFlat(i,0,a,l-s,a,l,o);return i}}class ch extends ah{InterpolantFactoryMethodLinear(e){return new uh(this.times,this.values,this.getValueSize(),e)}}ch.prototype.ValueTypeName="quaternion",ch.prototype.DefaultInterpolation=_t,ch.prototype.InterpolantFactoryMethodSmooth=void 0;class hh extends ah{}hh.prototype.ValueTypeName="string",hh.prototype.ValueBufferType=Array,hh.prototype.DefaultInterpolation=bt,hh.prototype.InterpolantFactoryMethodLinear=void 0,hh.prototype.InterpolantFactoryMethodSmooth=void 0;class dh extends ah{}dh.prototype.ValueTypeName="vector";class fh{constructor(e,t=-1,n,r=Ct){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=bn(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],n=e.tracks,r=1/(e.fps||1);for(let e=0,i=n.length;e!==i;++e)t.push(ph(n[e]).scale(r));const i=new this(e.name,e.duration,t,e.blendMode);return i.uuid=e.uuid,i}static toJSON(e){const t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let e=0,r=n.length;e!==r;++e)t.push(ah.toJSON(n[e]));return r}static CreateFromMorphTargetSequence(e,t,n,r){const i=t.length,a=[];for(let e=0;e<i;e++){let s=[],o=[];s.push((e+i-1)%i,e,(e+1)%i),o.push(0,1,0);const l=Qc(s);s=Zc(s,1,l),o=Zc(o,1,l),r||0!==s[0]||(s.push(i),o.push(o[0])),a.push(new lh(".morphTargetInfluences["+t[e].name+"]",s,o).scale(1/n))}return new this(e,-1,a)}static findByName(e,t){let n=e;if(!Array.isArray(e)){const t=e;n=t.geometry&&t.geometry.animations||t.animations}for(let e=0;e<n.length;e++)if(n[e].name===t)return n[e];return null}static CreateClipsFromMorphTargetSequences(e,t,n){const r={},i=/^([\w-]*?)([\d]+)$/;for(let t=0,n=e.length;t<n;t++){const n=e[t],a=n.name.match(i);if(a&&a.length>1){const e=a[1];let t=r[e];t||(r[e]=t=[]),t.push(n)}}const a=[];for(const e in r)a.push(this.CreateFromMorphTargetSequence(e,r[e],t,n));return a}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const n=function(e,t,n,r,i){if(0!==n.length){const a=[],s=[];$c(n,a,s,r),0!==a.length&&i.push(new e(t,a,s))}},r=[],i=e.name||"default",a=e.fps||30,s=e.blendMode;let o=e.length||-1;const l=e.hierarchy||[];for(let e=0;e<l.length;e++){const i=l[e].keys;if(i&&0!==i.length)if(i[0].morphTargets){const e={};let t;for(t=0;t<i.length;t++)if(i[t].morphTargets)for(let n=0;n<i[t].morphTargets.length;n++)e[i[t].morphTargets[n]]=-1;for(const n in e){const e=[],a=[];for(let r=0;r!==i[t].morphTargets.length;++r){const r=i[t];e.push(r.time),a.push(r.morphTarget===n?1:0)}r.push(new lh(".morphTargetInfluence["+n+"]",e,a))}o=e.length*a}else{const a=".bones["+t[e].name+"]";n(dh,a+".position",i,"pos",r),n(ch,a+".quaternion",i,"rot",r),n(dh,a+".scale",i,"scl",r)}}return 0===r.length?null:new this(i,o,r,s)}resetDuration(){let e=0;for(let t=0,n=this.tracks.length;t!==n;++t){const n=this.tracks[t];e=Math.max(e,n.times[n.times.length-1])}return this.duration=e,this}trim(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].trim(0,this.duration);return this}validate(){let e=!0;for(let t=0;t<this.tracks.length;t++)e=e&&this.tracks[t].validate();return e}optimize(){for(let e=0;e<this.tracks.length;e++)this.tracks[e].optimize();return this}clone(){const e=[];for(let t=0;t<this.tracks.length;t++)e.push(this.tracks[t].clone());return new this.constructor(this.name,this.duration,e,this.blendMode)}toJSON(){return this.constructor.toJSON(this)}}function ph(e){if(void 0===e.type)throw new Error("THREE.KeyframeTrack: track type undefined, can not parse");const t=function(e){switch(e.toLowerCase()){case"scalar":case"double":case"float":case"number":case"integer":return lh;case"vector":case"vector2":case"vector3":case"vector4":return dh;case"color":return oh;case"quaternion":return ch;case"bool":case"boolean":return sh;case"string":return hh}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];$c(e.keys,t,n,"value"),e.times=t,e.values=n}return void 0!==t.parse?t.parse(e):new t(e.name,e.times,e.values,e.interpolation)}const mh={enabled:!1,files:{},add:function(e,t){!1!==this.enabled&&(this.files[e]=t)},get:function(e){if(!1!==this.enabled)return this.files[e]},remove:function(e){delete this.files[e]},clear:function(){this.files={}}};class gh{constructor(e,t,n){const r=this;let i,a=!1,s=0,o=0;const l=[];this.onStart=void 0,this.onLoad=e,this.onProgress=t,this.onError=n,this.itemStart=function(e){o++,!1===a&&void 0!==r.onStart&&r.onStart(e,s,o),a=!0},this.itemEnd=function(e){s++,void 0!==r.onProgress&&r.onProgress(e,s,o),s===o&&(a=!1,void 0!==r.onLoad&&r.onLoad())},this.itemError=function(e){void 0!==r.onError&&r.onError(e)},this.resolveURL=function(e){return i?i(e):e},this.setURLModifier=function(e){return i=e,this},this.addHandler=function(e,t){return l.push(e,t),this},this.removeHandler=function(e){const t=l.indexOf(e);return-1!==t&&l.splice(t,2),this},this.getHandler=function(e){for(let t=0,n=l.length;t<n;t+=2){const n=l[t],r=l[t+1];if(n.global&&(n.lastIndex=0),n.test(e))return r}return null}}}const vh=new gh;class yh{constructor(e){this.manager=void 0!==e?e:vh,this.crossOrigin="anonymous",this.withCredentials=!1,this.path="",this.resourcePath="",this.requestHeader={}}load(){}loadAsync(e,t){const n=this;return new Promise((function(r,i){n.load(e,r,t,i)}))}parse(){}setCrossOrigin(e){return this.crossOrigin=e,this}setWithCredentials(e){return this.withCredentials=e,this}setPath(e){return this.path=e,this}setResourcePath(e){return this.resourcePath=e,this}setRequestHeader(e){return this.requestHeader=e,this}}const xh={};class bh extends Error{constructor(e,t){super(e),this.response=t}}class _h extends yh{constructor(e){super(e)}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=mh.get(e);if(void 0!==i)return this.manager.itemStart(e),setTimeout((()=>{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==xh[e])return void xh[e].push({onLoad:t,onProgress:n,onError:r});xh[e]=[],xh[e].push({onLoad:t,onProgress:n,onError:r});const a=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),s=this.mimeType,o=this.responseType;fetch(a).then((t=>{if(200===t.status||0===t.status){if(0===t.status&&console.warn("THREE.FileLoader: HTTP Status 0 received."),"undefined"==typeof ReadableStream||void 0===t.body||void 0===t.body.getReader)return t;const n=xh[e],r=t.body.getReader(),i=t.headers.get("Content-Length")||t.headers.get("X-File-Size"),a=i?parseInt(i):0,s=0!==a;let o=0;const l=new ReadableStream({start(e){!function t(){r.read().then((({done:r,value:i})=>{if(r)e.close();else{o+=i.byteLength;const r=new ProgressEvent("progress",{lengthComputable:s,loaded:o,total:a});for(let e=0,t=n.length;e<t;e++){const t=n[e];t.onProgress&&t.onProgress(r)}e.enqueue(i),t()}}))}()}});return new Response(l)}throw new bh(`fetch for "${t.url}" responded with ${t.status}: ${t.statusText}`,t)})).then((e=>{switch(o){case"arraybuffer":return e.arrayBuffer();case"blob":return e.blob();case"document":return e.text().then((e=>(new DOMParser).parseFromString(e,s)));case"json":return e.json();default:if(void 0===s)return e.text();{const t=/charset="?([^;"\s]*)"?/i.exec(s),n=t&&t[1]?t[1].toLowerCase():void 0,r=new TextDecoder(n);return e.arrayBuffer().then((e=>r.decode(e)))}}})).then((t=>{mh.add(e,t);const n=xh[e];delete xh[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onLoad&&r.onLoad(t)}})).catch((t=>{const n=xh[e];if(void 0===n)throw this.manager.itemError(e),t;delete xh[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onError&&r.onError(t)}this.manager.itemError(e)})).finally((()=>{this.manager.itemEnd(e)})),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class wh extends yh{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new _h(this.manager);a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t=[];for(let n=0;n<e.length;n++){const r=fh.parse(e[n]);t.push(r)}return t}}class Mh extends yh{constructor(e){super(e)}load(e,t,n,r){const i=this,a=[],s=new fu,o=new _h(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(i.withCredentials);let l=0;function u(u){o.load(e[u],(function(e){const n=i.parse(e,!0);a[u]={width:n.width,height:n.height,format:n.format,mipmaps:n.mipmaps},l+=1,6===l&&(1===n.mipmapCount&&(s.minFilter=ve),s.image=a,s.format=n.format,s.needsUpdate=!0,t&&t(s))}),n,r)}if(Array.isArray(e))for(let t=0,n=e.length;t<n;++t)u(t);else o.load(e,(function(e){const n=i.parse(e,!0);if(n.isCubemap){const e=n.mipmaps.length/n.mipmapCount;for(let t=0;t<e;t++){a[t]={mipmaps:[]};for(let e=0;e<n.mipmapCount;e++)a[t].mipmaps.push(n.mipmaps[t*n.mipmapCount+e]),a[t].format=n.format,a[t].width=n.width,a[t].height=n.height}s.image=a}else s.image.width=n.width,s.image.height=n.height,s.mipmaps=n.mipmaps;1===n.mipmapCount&&(s.minFilter=ve),s.format=n.format,s.needsUpdate=!0,t&&t(s)}),n,r);return s}}class Sh extends yh{constructor(e){super(e)}load(e,t,n,r){void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,a=mh.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;const s=Fn("img");function o(){u(),mh.add(e,this),t&&t(this),i.manager.itemEnd(e)}function l(t){u(),r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)}function u(){s.removeEventListener("load",o,!1),s.removeEventListener("error",l,!1)}return s.addEventListener("load",o,!1),s.addEventListener("error",l,!1),"data:"!==e.slice(0,5)&&void 0!==this.crossOrigin&&(s.crossOrigin=this.crossOrigin),i.manager.itemStart(e),s.src=e,s}}class Ah extends yh{constructor(e){super(e)}load(e,t,n,r){const i=new ga,a=new Sh(this.manager);a.setCrossOrigin(this.crossOrigin),a.setPath(this.path);let s=0;function o(n){a.load(e[n],(function(e){i.images[n]=e,s++,6===s&&(i.needsUpdate=!0,t&&t(i))}),void 0,r)}for(let t=0;t<e.length;++t)o(t);return i}}class Ch extends yh{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new Fl,s=new _h(this.manager);return s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setPath(this.path),s.setWithCredentials(i.withCredentials),s.load(e,(function(e){const n=i.parse(e);n&&(void 0!==n.image?a.image=n.image:void 0!==n.data&&(a.image.width=n.width,a.image.height=n.height,a.image.data=n.data),a.wrapS=void 0!==n.wrapS?n.wrapS:ce,a.wrapT=void 0!==n.wrapT?n.wrapT:ce,a.magFilter=void 0!==n.magFilter?n.magFilter:ve,a.minFilter=void 0!==n.minFilter?n.minFilter:ve,a.anisotropy=void 0!==n.anisotropy?n.anisotropy:1,void 0!==n.encoding&&(a.encoding=n.encoding),void 0!==n.flipY&&(a.flipY=n.flipY),void 0!==n.format&&(a.format=n.format),void 0!==n.type&&(a.type=n.type),void 0!==n.mipmaps&&(a.mipmaps=n.mipmaps,a.minFilter=be),1===n.mipmapCount&&(a.minFilter=ve),void 0!==n.generateMipmaps&&(a.generateMipmaps=n.generateMipmaps),a.needsUpdate=!0,t&&t(a,n))}),n,r),a}}class Eh extends yh{constructor(e){super(e)}load(e,t,n,r){const i=new $n,a=new Sh(this.manager);return a.setCrossOrigin(this.crossOrigin),a.setPath(this.path),a.load(e,(function(e){i.image=e,i.needsUpdate=!0,void 0!==t&&t(i)}),n,r),i}}class Th extends ui{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Xn(e),this.intensity=t}dispose(){}copy(e,t){return super.copy(e,t),this.color.copy(e.color),this.intensity=e.intensity,this}toJSON(e){const t=super.toJSON(e);return t.object.color=this.color.getHex(),t.object.intensity=this.intensity,void 0!==this.groundColor&&(t.object.groundColor=this.groundColor.getHex()),void 0!==this.distance&&(t.object.distance=this.distance),void 0!==this.angle&&(t.object.angle=this.angle),void 0!==this.decay&&(t.object.decay=this.decay),void 0!==this.penumbra&&(t.object.penumbra=this.penumbra),void 0!==this.shadow&&(t.object.shadow=this.shadow.toJSON()),t}}class Bh extends Th{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(ui.DefaultUp),this.updateMatrix(),this.groundColor=new Xn(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const Ph=new Nr,Rh=new lr,Lh=new lr;class Dh{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Pn(512,512),this.map=null,this.mapPass=null,this.matrix=new Nr,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new Sa,this._frameExtents=new Pn(1,1),this._viewportCount=1,this._viewports=[new er(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;Rh.setFromMatrixPosition(e.matrixWorld),t.position.copy(Rh),Lh.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(Lh),t.updateMatrixWorld(),Ph.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Ph),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(Ph)}getViewport(e){return this._viewports[e]}getFrameExtents(){return this._frameExtents}dispose(){this.map&&this.map.dispose(),this.mapPass&&this.mapPass.dispose()}copy(e){return this.camera=e.camera.clone(),this.bias=e.bias,this.radius=e.radius,this.mapSize.copy(e.mapSize),this}clone(){return(new this.constructor).copy(this)}toJSON(){const e={};return 0!==this.bias&&(e.bias=this.bias),0!==this.normalBias&&(e.normalBias=this.normalBias),1!==this.radius&&(e.radius=this.radius),512===this.mapSize.x&&512===this.mapSize.y||(e.mapSize=this.mapSize.toArray()),e.camera=this.camera.toJSON(!1).object,delete e.camera.matrix,e}}class Ih extends Dh{constructor(){super(new fa(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=2*xn*e.angle*this.focus,r=this.mapSize.width/this.mapSize.height,i=e.distance||t.far;n===t.fov&&r===t.aspect&&i===t.far||(t.fov=n,t.aspect=r,t.far=i,t.updateProjectionMatrix()),super.updateMatrices(e)}copy(e){return super.copy(e),this.focus=e.focus,this}}class kh extends Th{constructor(e,t,n=0,r=Math.PI/3,i=0,a=2){super(e,t),this.isSpotLight=!0,this.type="SpotLight",this.position.copy(ui.DefaultUp),this.updateMatrix(),this.target=new ui,this.distance=n,this.angle=r,this.penumbra=i,this.decay=a,this.map=null,this.shadow=new Ih}get power(){return this.intensity*Math.PI}set power(e){this.intensity=e/Math.PI}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.angle=e.angle,this.penumbra=e.penumbra,this.decay=e.decay,this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}const Fh=new Nr,Oh=new lr,Nh=new lr;class zh extends Dh{constructor(){super(new fa(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Pn(4,2),this._viewportCount=6,this._viewports=[new er(2,1,1,1),new er(0,1,1,1),new er(3,1,1,1),new er(1,1,1,1),new er(3,0,1,1),new er(1,0,1,1)],this._cubeDirections=[new lr(1,0,0),new lr(-1,0,0),new lr(0,0,1),new lr(0,0,-1),new lr(0,1,0),new lr(0,-1,0)],this._cubeUps=[new lr(0,1,0),new lr(0,1,0),new lr(0,1,0),new lr(0,1,0),new lr(0,0,1),new lr(0,0,-1)]}updateMatrices(e,t=0){const n=this.camera,r=this.matrix,i=e.distance||n.far;i!==n.far&&(n.far=i,n.updateProjectionMatrix()),Oh.setFromMatrixPosition(e.matrixWorld),n.position.copy(Oh),Nh.copy(n.position),Nh.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(Nh),n.updateMatrixWorld(),r.makeTranslation(-Oh.x,-Oh.y,-Oh.z),Fh.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(Fh)}}class Uh extends Th{constructor(e,t,n=0,r=2){super(e,t),this.isPointLight=!0,this.type="PointLight",this.distance=n,this.decay=r,this.shadow=new zh}get power(){return 4*this.intensity*Math.PI}set power(e){this.intensity=e/(4*Math.PI)}dispose(){this.shadow.dispose()}copy(e,t){return super.copy(e,t),this.distance=e.distance,this.decay=e.decay,this.shadow=e.shadow.clone(),this}}class Gh extends Dh{constructor(){super(new Na(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class Hh extends Th{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(ui.DefaultUp),this.updateMatrix(),this.target=new ui,this.shadow=new Gh}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class Vh extends Th{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class Wh extends Th{constructor(e,t,n=10,r=10){super(e,t),this.isRectAreaLight=!0,this.type="RectAreaLight",this.width=n,this.height=r}get power(){return this.intensity*this.width*this.height*Math.PI}set power(e){this.intensity=e/(this.width*this.height*Math.PI)}copy(e){return super.copy(e),this.width=e.width,this.height=e.height,this}toJSON(e){const t=super.toJSON(e);return t.object.width=this.width,t.object.height=this.height,t}}class jh{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new lr)}set(e){for(let t=0;t<9;t++)this.coefficients[t].copy(e[t]);return this}zero(){for(let e=0;e<9;e++)this.coefficients[e].set(0,0,0);return this}getAt(e,t){const n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.282095),t.addScaledVector(a[1],.488603*r),t.addScaledVector(a[2],.488603*i),t.addScaledVector(a[3],.488603*n),t.addScaledVector(a[4],n*r*1.092548),t.addScaledVector(a[5],r*i*1.092548),t.addScaledVector(a[6],.315392*(3*i*i-1)),t.addScaledVector(a[7],n*i*1.092548),t.addScaledVector(a[8],.546274*(n*n-r*r)),t}getIrradianceAt(e,t){const n=e.x,r=e.y,i=e.z,a=this.coefficients;return t.copy(a[0]).multiplyScalar(.886227),t.addScaledVector(a[1],1.023328*r),t.addScaledVector(a[2],1.023328*i),t.addScaledVector(a[3],1.023328*n),t.addScaledVector(a[4],.858086*n*r),t.addScaledVector(a[5],.858086*r*i),t.addScaledVector(a[6],.743125*i*i-.247708),t.addScaledVector(a[7],.858086*n*i),t.addScaledVector(a[8],.429043*(n*n-r*r)),t}add(e){for(let t=0;t<9;t++)this.coefficients[t].add(e.coefficients[t]);return this}addScaledSH(e,t){for(let n=0;n<9;n++)this.coefficients[n].addScaledVector(e.coefficients[n],t);return this}scale(e){for(let t=0;t<9;t++)this.coefficients[t].multiplyScalar(e);return this}lerp(e,t){for(let n=0;n<9;n++)this.coefficients[n].lerp(e.coefficients[n],t);return this}equals(e){for(let t=0;t<9;t++)if(!this.coefficients[t].equals(e.coefficients[t]))return!1;return!0}copy(e){return this.set(e.coefficients)}clone(){return(new this.constructor).copy(this)}fromArray(e,t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].fromArray(e,t+3*r);return this}toArray(e=[],t=0){const n=this.coefficients;for(let r=0;r<9;r++)n[r].toArray(e,t+3*r);return e}static getBasisAt(e,t){const n=e.x,r=e.y,i=e.z;t[0]=.282095,t[1]=.488603*r,t[2]=.488603*i,t[3]=.488603*n,t[4]=1.092548*n*r,t[5]=1.092548*r*i,t[6]=.315392*(3*i*i-1),t[7]=1.092548*n*i,t[8]=.546274*(n*n-r*r)}}class Jh extends Th{constructor(e=new jh,t=1){super(void 0,t),this.isLightProbe=!0,this.sh=e}copy(e){return super.copy(e),this.sh.copy(e.sh),this}fromJSON(e){return this.intensity=e.intensity,this.sh.fromArray(e.sh),this}toJSON(e){const t=super.toJSON(e);return t.object.sh=this.sh.toArray(),t}}class Xh extends yh{constructor(e){super(e),this.textures={}}load(e,t,n,r){const i=this,a=new _h(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t=this.textures;function n(e){return void 0===t[e]&&console.warn("THREE.MaterialLoader: Undefined texture",e),t[e]}const r=Xh.createMaterialFromType(e.type);if(void 0!==e.uuid&&(r.uuid=e.uuid),void 0!==e.name&&(r.name=e.name),void 0!==e.color&&void 0!==r.color&&r.color.setHex(e.color),void 0!==e.roughness&&(r.roughness=e.roughness),void 0!==e.metalness&&(r.metalness=e.metalness),void 0!==e.sheen&&(r.sheen=e.sheen),void 0!==e.sheenColor&&(r.sheenColor=(new Xn).setHex(e.sheenColor)),void 0!==e.sheenRoughness&&(r.sheenRoughness=e.sheenRoughness),void 0!==e.emissive&&void 0!==r.emissive&&r.emissive.setHex(e.emissive),void 0!==e.specular&&void 0!==r.specular&&r.specular.setHex(e.specular),void 0!==e.specularIntensity&&(r.specularIntensity=e.specularIntensity),void 0!==e.specularColor&&void 0!==r.specularColor&&r.specularColor.setHex(e.specularColor),void 0!==e.shininess&&(r.shininess=e.shininess),void 0!==e.clearcoat&&(r.clearcoat=e.clearcoat),void 0!==e.clearcoatRoughness&&(r.clearcoatRoughness=e.clearcoatRoughness),void 0!==e.iridescence&&(r.iridescence=e.iridescence),void 0!==e.iridescenceIOR&&(r.iridescenceIOR=e.iridescenceIOR),void 0!==e.iridescenceThicknessRange&&(r.iridescenceThicknessRange=e.iridescenceThicknessRange),void 0!==e.transmission&&(r.transmission=e.transmission),void 0!==e.thickness&&(r.thickness=e.thickness),void 0!==e.attenuationDistance&&(r.attenuationDistance=e.attenuationDistance),void 0!==e.attenuationColor&&void 0!==r.attenuationColor&&r.attenuationColor.setHex(e.attenuationColor),void 0!==e.fog&&(r.fog=e.fog),void 0!==e.flatShading&&(r.flatShading=e.flatShading),void 0!==e.blending&&(r.blending=e.blending),void 0!==e.combine&&(r.combine=e.combine),void 0!==e.side&&(r.side=e.side),void 0!==e.shadowSide&&(r.shadowSide=e.shadowSide),void 0!==e.opacity&&(r.opacity=e.opacity),void 0!==e.transparent&&(r.transparent=e.transparent),void 0!==e.alphaTest&&(r.alphaTest=e.alphaTest),void 0!==e.depthTest&&(r.depthTest=e.depthTest),void 0!==e.depthWrite&&(r.depthWrite=e.depthWrite),void 0!==e.colorWrite&&(r.colorWrite=e.colorWrite),void 0!==e.stencilWrite&&(r.stencilWrite=e.stencilWrite),void 0!==e.stencilWriteMask&&(r.stencilWriteMask=e.stencilWriteMask),void 0!==e.stencilFunc&&(r.stencilFunc=e.stencilFunc),void 0!==e.stencilRef&&(r.stencilRef=e.stencilRef),void 0!==e.stencilFuncMask&&(r.stencilFuncMask=e.stencilFuncMask),void 0!==e.stencilFail&&(r.stencilFail=e.stencilFail),void 0!==e.stencilZFail&&(r.stencilZFail=e.stencilZFail),void 0!==e.stencilZPass&&(r.stencilZPass=e.stencilZPass),void 0!==e.wireframe&&(r.wireframe=e.wireframe),void 0!==e.wireframeLinewidth&&(r.wireframeLinewidth=e.wireframeLinewidth),void 0!==e.wireframeLinecap&&(r.wireframeLinecap=e.wireframeLinecap),void 0!==e.wireframeLinejoin&&(r.wireframeLinejoin=e.wireframeLinejoin),void 0!==e.rotation&&(r.rotation=e.rotation),1!==e.linewidth&&(r.linewidth=e.linewidth),void 0!==e.dashSize&&(r.dashSize=e.dashSize),void 0!==e.gapSize&&(r.gapSize=e.gapSize),void 0!==e.scale&&(r.scale=e.scale),void 0!==e.polygonOffset&&(r.polygonOffset=e.polygonOffset),void 0!==e.polygonOffsetFactor&&(r.polygonOffsetFactor=e.polygonOffsetFactor),void 0!==e.polygonOffsetUnits&&(r.polygonOffsetUnits=e.polygonOffsetUnits),void 0!==e.dithering&&(r.dithering=e.dithering),void 0!==e.alphaToCoverage&&(r.alphaToCoverage=e.alphaToCoverage),void 0!==e.premultipliedAlpha&&(r.premultipliedAlpha=e.premultipliedAlpha),void 0!==e.visible&&(r.visible=e.visible),void 0!==e.toneMapped&&(r.toneMapped=e.toneMapped),void 0!==e.userData&&(r.userData=e.userData),void 0!==e.vertexColors&&("number"==typeof e.vertexColors?r.vertexColors=e.vertexColors>0:r.vertexColors=e.vertexColors),void 0!==e.uniforms)for(const t in e.uniforms){const i=e.uniforms[t];switch(r.uniforms[t]={},i.type){case"t":r.uniforms[t].value=n(i.value);break;case"c":r.uniforms[t].value=(new Xn).setHex(i.value);break;case"v2":r.uniforms[t].value=(new Pn).fromArray(i.value);break;case"v3":r.uniforms[t].value=(new lr).fromArray(i.value);break;case"v4":r.uniforms[t].value=(new er).fromArray(i.value);break;case"m3":r.uniforms[t].value=(new Rn).fromArray(i.value);break;case"m4":r.uniforms[t].value=(new Nr).fromArray(i.value);break;default:r.uniforms[t].value=i.value}}if(void 0!==e.defines&&(r.defines=e.defines),void 0!==e.vertexShader&&(r.vertexShader=e.vertexShader),void 0!==e.fragmentShader&&(r.fragmentShader=e.fragmentShader),void 0!==e.glslVersion&&(r.glslVersion=e.glslVersion),void 0!==e.extensions)for(const t in e.extensions)r.extensions[t]=e.extensions[t];if(void 0!==e.size&&(r.size=e.size),void 0!==e.sizeAttenuation&&(r.sizeAttenuation=e.sizeAttenuation),void 0!==e.map&&(r.map=n(e.map)),void 0!==e.matcap&&(r.matcap=n(e.matcap)),void 0!==e.alphaMap&&(r.alphaMap=n(e.alphaMap)),void 0!==e.bumpMap&&(r.bumpMap=n(e.bumpMap)),void 0!==e.bumpScale&&(r.bumpScale=e.bumpScale),void 0!==e.normalMap&&(r.normalMap=n(e.normalMap)),void 0!==e.normalMapType&&(r.normalMapType=e.normalMapType),void 0!==e.normalScale){let t=e.normalScale;!1===Array.isArray(t)&&(t=[t,t]),r.normalScale=(new Pn).fromArray(t)}return void 0!==e.displacementMap&&(r.displacementMap=n(e.displacementMap)),void 0!==e.displacementScale&&(r.displacementScale=e.displacementScale),void 0!==e.displacementBias&&(r.displacementBias=e.displacementBias),void 0!==e.roughnessMap&&(r.roughnessMap=n(e.roughnessMap)),void 0!==e.metalnessMap&&(r.metalnessMap=n(e.metalnessMap)),void 0!==e.emissiveMap&&(r.emissiveMap=n(e.emissiveMap)),void 0!==e.emissiveIntensity&&(r.emissiveIntensity=e.emissiveIntensity),void 0!==e.specularMap&&(r.specularMap=n(e.specularMap)),void 0!==e.specularIntensityMap&&(r.specularIntensityMap=n(e.specularIntensityMap)),void 0!==e.specularColorMap&&(r.specularColorMap=n(e.specularColorMap)),void 0!==e.envMap&&(r.envMap=n(e.envMap)),void 0!==e.envMapIntensity&&(r.envMapIntensity=e.envMapIntensity),void 0!==e.reflectivity&&(r.reflectivity=e.reflectivity),void 0!==e.refractionRatio&&(r.refractionRatio=e.refractionRatio),void 0!==e.lightMap&&(r.lightMap=n(e.lightMap)),void 0!==e.lightMapIntensity&&(r.lightMapIntensity=e.lightMapIntensity),void 0!==e.aoMap&&(r.aoMap=n(e.aoMap)),void 0!==e.aoMapIntensity&&(r.aoMapIntensity=e.aoMapIntensity),void 0!==e.gradientMap&&(r.gradientMap=n(e.gradientMap)),void 0!==e.clearcoatMap&&(r.clearcoatMap=n(e.clearcoatMap)),void 0!==e.clearcoatRoughnessMap&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),void 0!==e.clearcoatNormalMap&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),void 0!==e.clearcoatNormalScale&&(r.clearcoatNormalScale=(new Pn).fromArray(e.clearcoatNormalScale)),void 0!==e.iridescenceMap&&(r.iridescenceMap=n(e.iridescenceMap)),void 0!==e.iridescenceThicknessMap&&(r.iridescenceThicknessMap=n(e.iridescenceThicknessMap)),void 0!==e.transmissionMap&&(r.transmissionMap=n(e.transmissionMap)),void 0!==e.thicknessMap&&(r.thicknessMap=n(e.thicknessMap)),void 0!==e.sheenColorMap&&(r.sheenColorMap=n(e.sheenColorMap)),void 0!==e.sheenRoughnessMap&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}static createMaterialFromType(e){return new{ShadowMaterial:Nc,SpriteMaterial:cl,RawShaderMaterial:zc,ShaderMaterial:ha,PointsMaterial:iu,MeshPhysicalMaterial:Gc,MeshStandardMaterial:Uc,MeshPhongMaterial:Hc,MeshToonMaterial:Vc,MeshNormalMaterial:Wc,MeshLambertMaterial:jc,MeshDepthMaterial:Ho,MeshDistanceMaterial:Vo,MeshBasicMaterial:Mi,MeshMatcapMaterial:Jc,LineDashedMaterial:Xc,LineBasicMaterial:Xl,Material:wi}[e]}}class Yh{static decodeText(e){if("undefined"!=typeof TextDecoder)return(new TextDecoder).decode(e);let t="";for(let n=0,r=e.length;n<r;n++)t+=String.fromCharCode(e[n]);try{return decodeURIComponent(escape(t))}catch(e){return t}}static extractUrlBase(e){const t=e.lastIndexOf("/");return-1===t?"./":e.slice(0,t+1)}static resolveURL(e,t){return"string"!=typeof e||""===e?"":(/^https?:\/\//i.test(t)&&/^\//.test(e)&&(t=t.replace(/(^https?:\/\/[^\/]+).*/i,"$1")),/^(https?:)?\/\//i.test(e)||/^data:.*,.*$/i.test(e)||/^blob:.*$/i.test(e)?e:t+e)}}class Kh extends Wi{constructor(){super(),this.isInstancedBufferGeometry=!0,this.type="InstancedBufferGeometry",this.instanceCount=1/0}copy(e){return super.copy(e),this.instanceCount=e.instanceCount,this}toJSON(){const e=super.toJSON();return e.instanceCount=this.instanceCount,e.isInstancedBufferGeometry=!0,e}}class qh extends yh{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new _h(i.manager);a.setPath(i.path),a.setRequestHeader(i.requestHeader),a.setWithCredentials(i.withCredentials),a.load(e,(function(n){try{t(i.parse(JSON.parse(n)))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}parse(e){const t={},n={};function r(e,r){if(void 0!==t[r])return t[r];const i=e.interleavedBuffers[r],a=function(e,t){if(void 0!==n[t])return n[t];const r=e.arrayBuffers[t],i=new Uint32Array(r).buffer;return n[t]=i,i}(e,i.buffer),s=kn(i.type,a),o=new ol(s,i.stride);return o.uuid=i.uuid,t[r]=o,o}const i=e.isInstancedBufferGeometry?new Kh:new Wi,a=e.data.index;if(void 0!==a){const e=kn(a.type,a.array);i.setIndex(new Ci(e,1))}const s=e.data.attributes;for(const t in s){const n=s[t];let a;if(n.isInterleavedBufferAttribute){const t=r(e.data,n.data);a=new ul(t,n.itemSize,n.offset,n.normalized)}else{const e=kn(n.type,n.array);a=new(n.isInstancedBufferAttribute?Ul:Ci)(e,n.itemSize,n.normalized)}void 0!==n.name&&(a.name=n.name),void 0!==n.usage&&a.setUsage(n.usage),void 0!==n.updateRange&&(a.updateRange.offset=n.updateRange.offset,a.updateRange.count=n.updateRange.count),i.setAttribute(t,a)}const o=e.data.morphAttributes;if(o)for(const t in o){const n=o[t],a=[];for(let t=0,i=n.length;t<i;t++){const i=n[t];let s;if(i.isInterleavedBufferAttribute){const t=r(e.data,i.data);s=new ul(t,i.itemSize,i.offset,i.normalized)}else{const e=kn(i.type,i.array);s=new Ci(e,i.itemSize,i.normalized)}void 0!==i.name&&(s.name=i.name),a.push(s)}i.morphAttributes[t]=a}e.data.morphTargetsRelative&&(i.morphTargetsRelative=!0);const l=e.data.groups||e.data.drawcalls||e.data.offsets;if(void 0!==l)for(let e=0,t=l.length;e!==t;++e){const t=l[e];i.addGroup(t.start,t.count,t.materialIndex)}const u=e.data.boundingSphere;if(void 0!==u){const e=new lr;void 0!==u.center&&e.fromArray(u.center),i.boundingSphere=new Br(e,u.radius)}return e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}}class Qh extends yh{constructor(e){super(e)}load(e,t,n,r){const i=this,a=""===this.path?Yh.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||a;const s=new _h(this.manager);s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,(function(n){let a=null;try{a=JSON.parse(n)}catch(t){return void 0!==r&&r(t),void console.error("THREE:ObjectLoader: Can't parse "+e+".",t.message)}const s=a.metadata;if(void 0===s||void 0===s.type||"geometry"===s.type.toLowerCase())return void 0!==r&&r(new Error("THREE.ObjectLoader: Can't load "+e)),void console.error("THREE.ObjectLoader: Can't load "+e);i.parse(a,t)}),n,r)}async loadAsync(e,t){const n=""===this.path?Yh.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;const r=new _h(this.manager);r.setPath(this.path),r.setRequestHeader(this.requestHeader),r.setWithCredentials(this.withCredentials);const i=await r.loadAsync(e,t),a=JSON.parse(i),s=a.metadata;if(void 0===s||void 0===s.type||"geometry"===s.type.toLowerCase())throw new Error("THREE.ObjectLoader: Can't load "+e);return await this.parseAsync(a)}parse(e,t){const n=this.parseAnimations(e.animations),r=this.parseShapes(e.shapes),i=this.parseGeometries(e.geometries,r),a=this.parseImages(e.images,(function(){void 0!==t&&t(l)})),s=this.parseTextures(e.textures,a),o=this.parseMaterials(e.materials,s),l=this.parseObject(e.object,i,o,s,n),u=this.parseSkeletons(e.skeletons,l);if(this.bindSkeletons(l,u),void 0!==t){let e=!1;for(const t in a)if(a[t].data instanceof HTMLImageElement){e=!0;break}!1===e&&t(l)}return l}async parseAsync(e){const t=this.parseAnimations(e.animations),n=this.parseShapes(e.shapes),r=this.parseGeometries(e.geometries,n),i=await this.parseImagesAsync(e.images),a=this.parseTextures(e.textures,i),s=this.parseMaterials(e.materials,a),o=this.parseObject(e.object,r,s,a,t),l=this.parseSkeletons(e.skeletons,o);return this.bindSkeletons(o,l),o}parseShapes(e){const t={};if(void 0!==e)for(let n=0,r=e.length;n<r;n++){const r=(new qu).fromJSON(e[n]);t[r.uuid]=r}return t}parseSkeletons(e,t){const n={},r={};if(t.traverse((function(e){e.isBone&&(r[e.uuid]=e)})),void 0!==e)for(let t=0,i=e.length;t<i;t++){const i=(new zl).fromJSON(e[t],r);n[i.uuid]=i}return n}parseGeometries(e,t){const n={};if(void 0!==e){const r=new qh;for(let i=0,a=e.length;i<a;i++){let a;const s=e[i];switch(s.type){case"BufferGeometry":case"InstancedBufferGeometry":a=r.parse(s);break;default:s.type in Oc?a=Oc[s.type].fromJSON(s,t):console.warn(`THREE.ObjectLoader: Unsupported geometry type "${s.type}"`)}a.uuid=s.uuid,void 0!==s.name&&(a.name=s.name),!0===a.isBufferGeometry&&void 0!==s.userData&&(a.userData=s.userData),n[s.uuid]=a}}return n}parseMaterials(e,t){const n={},r={};if(void 0!==e){const i=new Xh;i.setTextures(t);for(let t=0,a=e.length;t<a;t++){const a=e[t];void 0===n[a.uuid]&&(n[a.uuid]=i.parse(a)),r[a.uuid]=n[a.uuid]}}return r}parseAnimations(e){const t={};if(void 0!==e)for(let n=0;n<e.length;n++){const r=e[n],i=fh.parse(r);t[i.uuid]=i}return t}parseImages(e,t){const n=this,r={};let i;function a(e){if("string"==typeof e){const t=e;return function(e){return n.manager.itemStart(e),i.load(e,(function(){n.manager.itemEnd(e)}),void 0,(function(){n.manager.itemError(e),n.manager.itemEnd(e)}))}(/^(\/\/)|([a-z]+:(\/\/)?)/i.test(t)?t:n.resourcePath+t)}return e.data?{data:kn(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){const n=new gh(t);i=new Sh(n),i.setCrossOrigin(this.crossOrigin);for(let t=0,n=e.length;t<n;t++){const n=e[t],i=n.url;if(Array.isArray(i)){const e=[];for(let t=0,n=i.length;t<n;t++){const n=a(i[t]);null!==n&&(n instanceof HTMLImageElement?e.push(n):e.push(new Fl(n.data,n.width,n.height)))}r[n.uuid]=new qn(e)}else{const e=a(n.url);r[n.uuid]=new qn(e)}}}return r}async parseImagesAsync(e){const t=this,n={};let r;async function i(e){if("string"==typeof e){const n=e,i=/^(\/\/)|([a-z]+:(\/\/)?)/i.test(n)?n:t.resourcePath+n;return await r.loadAsync(i)}return e.data?{data:kn(e.type,e.data),width:e.width,height:e.height}:null}if(void 0!==e&&e.length>0){r=new Sh(this.manager),r.setCrossOrigin(this.crossOrigin);for(let t=0,r=e.length;t<r;t++){const r=e[t],a=r.url;if(Array.isArray(a)){const e=[];for(let t=0,n=a.length;t<n;t++){const n=a[t],r=await i(n);null!==r&&(r instanceof HTMLImageElement?e.push(r):e.push(new Fl(r.data,r.width,r.height)))}n[r.uuid]=new qn(e)}else{const e=await i(r.url);n[r.uuid]=new qn(e)}}}return n}parseTextures(e,t){function n(e,t){return"number"==typeof e?e:(console.warn("THREE.ObjectLoader.parseTexture: Constant should be in numeric form.",e),t[e])}const r={};if(void 0!==e)for(let i=0,a=e.length;i<a;i++){const a=e[i];void 0===a.image&&console.warn('THREE.ObjectLoader: No "image" specified for',a.uuid),void 0===t[a.image]&&console.warn("THREE.ObjectLoader: Undefined image",a.image);const s=t[a.image],o=s.data;let l;Array.isArray(o)?(l=new ga,6===o.length&&(l.needsUpdate=!0)):(l=o&&o.data?new Fl:new $n,o&&(l.needsUpdate=!0)),l.source=s,l.uuid=a.uuid,void 0!==a.name&&(l.name=a.name),void 0!==a.mapping&&(l.mapping=n(a.mapping,Zh)),void 0!==a.offset&&l.offset.fromArray(a.offset),void 0!==a.repeat&&l.repeat.fromArray(a.repeat),void 0!==a.center&&l.center.fromArray(a.center),void 0!==a.rotation&&(l.rotation=a.rotation),void 0!==a.wrap&&(l.wrapS=n(a.wrap[0],$h),l.wrapT=n(a.wrap[1],$h)),void 0!==a.format&&(l.format=a.format),void 0!==a.type&&(l.type=a.type),void 0!==a.encoding&&(l.encoding=a.encoding),void 0!==a.minFilter&&(l.minFilter=n(a.minFilter,ed)),void 0!==a.magFilter&&(l.magFilter=n(a.magFilter,ed)),void 0!==a.anisotropy&&(l.anisotropy=a.anisotropy),void 0!==a.flipY&&(l.flipY=a.flipY),void 0!==a.generateMipmaps&&(l.generateMipmaps=a.generateMipmaps),void 0!==a.premultiplyAlpha&&(l.premultiplyAlpha=a.premultiplyAlpha),void 0!==a.unpackAlignment&&(l.unpackAlignment=a.unpackAlignment),void 0!==a.userData&&(l.userData=a.userData),r[a.uuid]=l}return r}parseObject(e,t,n,r,i){let a,s,o;function l(e){return void 0===t[e]&&console.warn("THREE.ObjectLoader: Undefined geometry",e),t[e]}function u(e){if(void 0!==e){if(Array.isArray(e)){const t=[];for(let r=0,i=e.length;r<i;r++){const i=e[r];void 0===n[i]&&console.warn("THREE.ObjectLoader: Undefined material",i),t.push(n[i])}return t}return void 0===n[e]&&console.warn("THREE.ObjectLoader: Undefined material",e),n[e]}}function c(e){return void 0===r[e]&&console.warn("THREE.ObjectLoader: Undefined texture",e),r[e]}switch(e.type){case"Scene":a=new sl,void 0!==e.background&&(Number.isInteger(e.background)?a.background=new Xn(e.background):a.background=c(e.background)),void 0!==e.environment&&(a.environment=c(e.environment)),void 0!==e.fog&&("Fog"===e.fog.type?a.fog=new al(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(a.fog=new il(e.fog.color,e.fog.density))),void 0!==e.backgroundBlurriness&&(a.backgroundBlurriness=e.backgroundBlurriness);break;case"PerspectiveCamera":a=new fa(e.fov,e.aspect,e.near,e.far),void 0!==e.focus&&(a.focus=e.focus),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.filmGauge&&(a.filmGauge=e.filmGauge),void 0!==e.filmOffset&&(a.filmOffset=e.filmOffset),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"OrthographicCamera":a=new Na(e.left,e.right,e.top,e.bottom,e.near,e.far),void 0!==e.zoom&&(a.zoom=e.zoom),void 0!==e.view&&(a.view=Object.assign({},e.view));break;case"AmbientLight":a=new Vh(e.color,e.intensity);break;case"DirectionalLight":a=new Hh(e.color,e.intensity);break;case"PointLight":a=new Uh(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":a=new Wh(e.color,e.intensity,e.width,e.height);break;case"SpotLight":a=new kh(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":a=new Bh(e.color,e.groundColor,e.intensity);break;case"LightProbe":a=(new Jh).fromJSON(e);break;case"SkinnedMesh":s=l(e.geometry),o=u(e.material),a=new Il(s,o),void 0!==e.bindMode&&(a.bindMode=e.bindMode),void 0!==e.bindMatrix&&a.bindMatrix.fromArray(e.bindMatrix),void 0!==e.skeleton&&(a.skeleton=e.skeleton);break;case"Mesh":s=l(e.geometry),o=u(e.material),a=new ia(s,o);break;case"InstancedMesh":s=l(e.geometry),o=u(e.material);const t=e.count,n=e.instanceMatrix,r=e.instanceColor;a=new Jl(s,o,t),a.instanceMatrix=new Ul(new Float32Array(n.array),16),void 0!==r&&(a.instanceColor=new Ul(new Float32Array(r.array),r.itemSize));break;case"LOD":a=new Tl;break;case"Line":a=new $l(l(e.geometry),u(e.material));break;case"LineLoop":a=new ru(l(e.geometry),u(e.material));break;case"LineSegments":a=new nu(l(e.geometry),u(e.material));break;case"PointCloud":case"Points":a=new uu(l(e.geometry),u(e.material));break;case"Sprite":a=new Sl(u(e.material));break;case"Group":a=new Ko;break;case"Bone":a=new kl;break;default:a=new ui}if(a.uuid=e.uuid,void 0!==e.name&&(a.name=e.name),void 0!==e.matrix?(a.matrix.fromArray(e.matrix),void 0!==e.matrixAutoUpdate&&(a.matrixAutoUpdate=e.matrixAutoUpdate),a.matrixAutoUpdate&&a.matrix.decompose(a.position,a.quaternion,a.scale)):(void 0!==e.position&&a.position.fromArray(e.position),void 0!==e.rotation&&a.rotation.fromArray(e.rotation),void 0!==e.quaternion&&a.quaternion.fromArray(e.quaternion),void 0!==e.scale&&a.scale.fromArray(e.scale)),void 0!==e.castShadow&&(a.castShadow=e.castShadow),void 0!==e.receiveShadow&&(a.receiveShadow=e.receiveShadow),e.shadow&&(void 0!==e.shadow.bias&&(a.shadow.bias=e.shadow.bias),void 0!==e.shadow.normalBias&&(a.shadow.normalBias=e.shadow.normalBias),void 0!==e.shadow.radius&&(a.shadow.radius=e.shadow.radius),void 0!==e.shadow.mapSize&&a.shadow.mapSize.fromArray(e.shadow.mapSize),void 0!==e.shadow.camera&&(a.shadow.camera=this.parseObject(e.shadow.camera))),void 0!==e.visible&&(a.visible=e.visible),void 0!==e.frustumCulled&&(a.frustumCulled=e.frustumCulled),void 0!==e.renderOrder&&(a.renderOrder=e.renderOrder),void 0!==e.userData&&(a.userData=e.userData),void 0!==e.layers&&(a.layers.mask=e.layers),void 0!==e.children){const s=e.children;for(let e=0;e<s.length;e++)a.add(this.parseObject(s[e],t,n,r,i))}if(void 0!==e.animations){const t=e.animations;for(let e=0;e<t.length;e++){const n=t[e];a.animations.push(i[n])}}if("LOD"===e.type){void 0!==e.autoUpdate&&(a.autoUpdate=e.autoUpdate);const t=e.levels;for(let e=0;e<t.length;e++){const n=t[e],r=a.getObjectByProperty("uuid",n.object);void 0!==r&&a.addLevel(r,n.distance,n.hysteresis)}}return a}bindSkeletons(e,t){0!==Object.keys(t).length&&e.traverse((function(e){if(!0===e.isSkinnedMesh&&void 0!==e.skeleton){const n=t[e.skeleton];void 0===n?console.warn("THREE.ObjectLoader: No skeleton found with UUID:",e.skeleton):e.bind(n,e.bindMatrix)}}))}}const Zh={UVMapping:re,CubeReflectionMapping:ie,CubeRefractionMapping:ae,EquirectangularReflectionMapping:se,EquirectangularRefractionMapping:oe,CubeUVReflectionMapping:le},$h={RepeatWrapping:ue,ClampToEdgeWrapping:ce,MirroredRepeatWrapping:he},ed={NearestFilter:de,NearestMipmapNearestFilter:fe,NearestMipmapLinearFilter:me,LinearFilter:ve,LinearMipmapNearestFilter:ye,LinearMipmapLinearFilter:be};class td extends yh{constructor(e){super(e),this.isImageBitmapLoader=!0,"undefined"==typeof createImageBitmap&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),"undefined"==typeof fetch&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){void 0===e&&(e=""),void 0!==this.path&&(e=this.path+e),e=this.manager.resolveURL(e);const i=this,a=mh.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;const s={};s.credentials="anonymous"===this.crossOrigin?"same-origin":"include",s.headers=this.requestHeader,fetch(e,s).then((function(e){return e.blob()})).then((function(e){return createImageBitmap(e,Object.assign(i.options,{colorSpaceConversion:"none"}))})).then((function(n){mh.add(e,n),t&&t(n),i.manager.itemEnd(e)})).catch((function(t){r&&r(t),i.manager.itemError(e),i.manager.itemEnd(e)})),i.manager.itemStart(e)}}let nd;class rd{static getContext(){return void 0===nd&&(nd=new(window.AudioContext||window.webkitAudioContext)),nd}static setContext(e){nd=e}}class id extends yh{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new _h(this.manager);a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(n){try{const e=n.slice(0);rd.getContext().decodeAudioData(e,(function(e){t(e)}))}catch(t){r?r(t):console.error(t),i.manager.itemError(e)}}),n,r)}}class ad extends Jh{constructor(e,t,n=1){super(void 0,n),this.isHemisphereLightProbe=!0;const r=(new Xn).set(e),i=(new Xn).set(t),a=new lr(r.r,r.g,r.b),s=new lr(i.r,i.g,i.b),o=Math.sqrt(Math.PI),l=o*Math.sqrt(.75);this.sh.coefficients[0].copy(a).add(s).multiplyScalar(o),this.sh.coefficients[1].copy(a).sub(s).multiplyScalar(l)}}class sd extends Jh{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const n=(new Xn).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const od=new Nr,ld=new Nr,ud=new Nr;class cd{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new fa,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new fa,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){const t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep,ud.copy(e.projectionMatrix);const n=t.eyeSep/2,r=n*t.near/t.focus,i=t.near*Math.tan(yn*t.fov*.5)/t.zoom;let a,s;ld.elements[12]=-n,od.elements[12]=n,a=-i*t.aspect+r,s=i*t.aspect+r,ud.elements[0]=2*t.near/(s-a),ud.elements[8]=(s+a)/(s-a),this.cameraL.projectionMatrix.copy(ud),a=-i*t.aspect-r,s=i*t.aspect-r,ud.elements[0]=2*t.near/(s-a),ud.elements[8]=(s+a)/(s-a),this.cameraR.projectionMatrix.copy(ud)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(ld),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(od)}}class hd{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=dd(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const t=dd();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function dd(){return("undefined"==typeof performance?Date:performance).now()}const fd=new lr,pd=new or,md=new lr,gd=new lr;class vd extends ui{constructor(){super(),this.type="AudioListener",this.context=rd.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new hd}getInput(){return this.gain}removeFilter(){return null!==this.filter&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return null!==this.filter?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);const t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(fd,pd,md),gd.set(0,0,-1).applyQuaternion(pd),t.positionX){const e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(fd.x,e),t.positionY.linearRampToValueAtTime(fd.y,e),t.positionZ.linearRampToValueAtTime(fd.z,e),t.forwardX.linearRampToValueAtTime(gd.x,e),t.forwardY.linearRampToValueAtTime(gd.y,e),t.forwardZ.linearRampToValueAtTime(gd.z,e),t.upX.linearRampToValueAtTime(n.x,e),t.upY.linearRampToValueAtTime(n.y,e),t.upZ.linearRampToValueAtTime(n.z,e)}else t.setPosition(fd.x,fd.y,fd.z),t.setOrientation(gd.x,gd.y,gd.z,n.x,n.y,n.z)}}class yd extends ui{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(!0===this.isPlaying)return void console.warn("THREE.Audio: Audio is already playing.");if(!1===this.hasPlaybackControl)return void console.warn("THREE.Audio: this Audio has no playback control.");this._startedAt=this.context.currentTime+e;const t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(!1!==this.hasPlaybackControl)return!0===this.isPlaying&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,!0===this.loop&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this;console.warn("THREE.Audio: this Audio has no playback control.")}stop(){if(!1!==this.hasPlaybackControl)return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this;console.warn("THREE.Audio: this Audio has no playback control.")}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].connect(this.filters[e]);this.filters[this.filters.length-1].connect(this.getOutput())}else this.source.connect(this.getOutput());return this._connected=!0,this}disconnect(){if(this.filters.length>0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e<t;e++)this.filters[e-1].disconnect(this.filters[e]);this.filters[this.filters.length-1].disconnect(this.getOutput())}else this.source.disconnect(this.getOutput());return this._connected=!1,this}getFilters(){return this.filters}setFilters(e){return e||(e=[]),!0===this._connected?(this.disconnect(),this.filters=e.slice(),this.connect()):this.filters=e.slice(),this}setDetune(e){if(this.detune=e,void 0!==this.source.detune)return!0===this.isPlaying&&this.source.detune.setTargetAtTime(this.detune,this.context.currentTime,.01),this}getDetune(){return this.detune}getFilter(){return this.getFilters()[0]}setFilter(e){return this.setFilters(e?[e]:[])}setPlaybackRate(e){if(!1!==this.hasPlaybackControl)return this.playbackRate=e,!0===this.isPlaying&&this.source.playbackRate.setTargetAtTime(this.playbackRate,this.context.currentTime,.01),this;console.warn("THREE.Audio: this Audio has no playback control.")}getPlaybackRate(){return this.playbackRate}onEnded(){this.isPlaying=!1}getLoop(){return!1===this.hasPlaybackControl?(console.warn("THREE.Audio: this Audio has no playback control."),!1):this.loop}setLoop(e){if(!1!==this.hasPlaybackControl)return this.loop=e,!0===this.isPlaying&&(this.source.loop=this.loop),this;console.warn("THREE.Audio: this Audio has no playback control.")}setLoopStart(e){return this.loopStart=e,this}setLoopEnd(e){return this.loopEnd=e,this}getVolume(){return this.gain.gain.value}setVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}}const xd=new lr,bd=new or,_d=new lr,wd=new lr;class Md extends yd{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}disconnect(){super.disconnect(),this.panner.disconnect(this.gain)}getOutput(){return this.panner}getRefDistance(){return this.panner.refDistance}setRefDistance(e){return this.panner.refDistance=e,this}getRolloffFactor(){return this.panner.rolloffFactor}setRolloffFactor(e){return this.panner.rolloffFactor=e,this}getDistanceModel(){return this.panner.distanceModel}setDistanceModel(e){return this.panner.distanceModel=e,this}getMaxDistance(){return this.panner.maxDistance}setMaxDistance(e){return this.panner.maxDistance=e,this}setDirectionalCone(e,t,n){return this.panner.coneInnerAngle=e,this.panner.coneOuterAngle=t,this.panner.coneOuterGain=n,this}updateMatrixWorld(e){if(super.updateMatrixWorld(e),!0===this.hasPlaybackControl&&!1===this.isPlaying)return;this.matrixWorld.decompose(xd,bd,_d),wd.set(0,0,1).applyQuaternion(bd);const t=this.panner;if(t.positionX){const e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(xd.x,e),t.positionY.linearRampToValueAtTime(xd.y,e),t.positionZ.linearRampToValueAtTime(xd.z,e),t.orientationX.linearRampToValueAtTime(wd.x,e),t.orientationY.linearRampToValueAtTime(wd.y,e),t.orientationZ.linearRampToValueAtTime(wd.z,e)}else t.setPosition(xd.x,xd.y,xd.z),t.setOrientation(wd.x,wd.y,wd.z)}}class Sd{constructor(e,t=2048){this.analyser=e.context.createAnalyser(),this.analyser.fftSize=t,this.data=new Uint8Array(this.analyser.frequencyBinCount),e.getOutput().connect(this.analyser)}getFrequencyData(){return this.analyser.getByteFrequencyData(this.data),this.data}getAverageFrequency(){let e=0;const t=this.getFrequencyData();for(let n=0;n<t.length;n++)e+=t[n];return e/t.length}}class Ad{constructor(e,t,n){let r,i,a;switch(this.binding=e,this.valueSize=n,t){case"quaternion":r=this._slerp,i=this._slerpAdditive,a=this._setAdditiveIdentityQuaternion,this.buffer=new Float64Array(6*n),this._workIndex=5;break;case"string":case"bool":r=this._select,i=this._select,a=this._setAdditiveIdentityOther,this.buffer=new Array(5*n);break;default:r=this._lerp,i=this._lerpAdditive,a=this._setAdditiveIdentityNumeric,this.buffer=new Float64Array(5*n)}this._mixBufferRegion=r,this._mixBufferRegionAdditive=i,this._setIdentity=a,this._origIndex=3,this._addIndex=4,this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,this.useCount=0,this.referenceCount=0}accumulate(e,t){const n=this.buffer,r=this.valueSize,i=e*r+r;let a=this.cumulativeWeight;if(0===a){for(let e=0;e!==r;++e)n[i+e]=n[e];a=t}else{a+=t;const e=t/a;this._mixBufferRegion(n,i,0,e,r)}this.cumulativeWeight=a}accumulateAdditive(e){const t=this.buffer,n=this.valueSize,r=n*this._addIndex;0===this.cumulativeWeightAdditive&&this._setIdentity(),this._mixBufferRegionAdditive(t,r,0,e,n),this.cumulativeWeightAdditive+=e}apply(e){const t=this.valueSize,n=this.buffer,r=e*t+t,i=this.cumulativeWeight,a=this.cumulativeWeightAdditive,s=this.binding;if(this.cumulativeWeight=0,this.cumulativeWeightAdditive=0,i<1){const e=t*this._origIndex;this._mixBufferRegion(n,r,e,1-i,t)}a>0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let e=t,i=t+t;e!==i;++e)if(n[e]!==n[e+t]){s.setValue(n,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let e=n,i=r;e!==i;++e)t[e]=t[r+e%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=3*this.valueSize;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n<t;n++)this.buffer[n]=0}_setAdditiveIdentityQuaternion(){this._setAdditiveIdentityNumeric(),this.buffer[this._addIndex*this.valueSize+3]=1}_setAdditiveIdentityOther(){const e=this._origIndex*this.valueSize,t=this._addIndex*this.valueSize;for(let n=0;n<this.valueSize;n++)this.buffer[t+n]=this.buffer[e+n]}_select(e,t,n,r,i){if(r>=.5)for(let r=0;r!==i;++r)e[t+r]=e[n+r]}_slerp(e,t,n,r){or.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const a=this._workIndex*i;or.multiplyQuaternionsFlat(e,a,e,t,e,n),or.slerpFlat(e,t,e,t,e,a,r)}_lerp(e,t,n,r,i){const a=1-r;for(let s=0;s!==i;++s){const i=t+s;e[i]=e[i]*a+e[n+s]*r}}_lerpAdditive(e,t,n,r,i){for(let a=0;a!==i;++a){const i=t+a;e[i]=e[i]+e[n+a]*r}}}const Cd=new RegExp("[\\[\\]\\.:\\/]","g"),Ed="[^\\[\\]\\.:\\/]",Td="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",Bd=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",Ed)+/(WCOD+)?/.source.replace("WCOD",Td)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Ed)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Ed)+"$"),Pd=["material","materials","bones","map"];class Rd{constructor(e,t,n){this.path=t,this.parsedPath=n||Rd.parseTrackName(t),this.node=Rd.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new Rd.Composite(e,t,n):new Rd(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Cd,"")}static parseTrackName(e){const t=Bd.exec(e);if(null===t)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const n={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=n.nodeName&&n.nodeName.lastIndexOf(".");if(void 0!==r&&-1!==r){const e=n.nodeName.substring(r+1);-1!==Pd.indexOf(e)&&(n.nodeName=n.nodeName.substring(0,r),n.objectName=e)}if(null===n.propertyName||0===n.propertyName.length)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return n}static findNode(e,t){if(void 0===t||""===t||"."===t||-1===t||t===e.name||t===e.uuid)return e;if(e.skeleton){const n=e.skeleton.getBoneByName(t);if(void 0!==n)return n}if(e.children){const n=function(e){for(let r=0;r<e.length;r++){const i=e[r];if(i.name===t||i.uuid===t)return i;const a=n(i.children);if(a)return a}return null},r=n(e.children);if(r)return r}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(e,t){e[t]=this.targetObject[this.propertyName]}_getValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)e[t++]=n[r]}_getValue_arrayElement(e,t){e[t]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(e,t){this.resolvedProperty.toArray(e,t)}_setValue_direct(e,t){this.targetObject[this.propertyName]=e[t]}_setValue_direct_setNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(e,t){this.targetObject[this.propertyName]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++]}_setValue_array_setNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(e,t){const n=this.resolvedProperty;for(let r=0,i=n.length;r!==i;++r)n[r]=e[t++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(e,t){this.resolvedProperty[this.propertyIndex]=e[t]}_setValue_arrayElement_setNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty[this.propertyIndex]=e[t],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(e,t){this.resolvedProperty.fromArray(e,t)}_setValue_fromArray_setNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(e,t){this.resolvedProperty.fromArray(e,t),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(e,t){this.bind(),this.getValue(e,t)}_setValue_unbound(e,t){this.bind(),this.setValue(e,t)}bind(){let e=this.node;const t=this.parsedPath,n=t.objectName,r=t.propertyName;let i=t.propertyIndex;if(e||(e=Rd.findNode(this.rootNode,t.nodeName)||this.rootNode,this.node=e),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!e)return void console.error("THREE.PropertyBinding: Trying to update node for track: "+this.path+" but it wasn't found.");if(n){let r=t.objectIndex;switch(n){case"materials":if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.materials)return void console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);e=e.material.materials;break;case"bones":if(!e.skeleton)return void console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);e=e.skeleton.bones;for(let t=0;t<e.length;t++)if(e[t].name===r){r=t;break}break;case"map":if("map"in e){e=e.map;break}if(!e.material)return void console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);if(!e.material.map)return void console.error("THREE.PropertyBinding: Can not bind to material.map as node.material does not have a map.",this);e=e.material.map;break;default:if(void 0===e[n])return void console.error("THREE.PropertyBinding: Can not bind to objectName of node undefined.",this);e=e[n]}if(void 0!==r){if(void 0===e[r])return void console.error("THREE.PropertyBinding: Trying to bind to objectIndex of objectName, but is undefined.",this,e);e=e[r]}}const a=e[r];if(void 0===a){const n=t.nodeName;return void console.error("THREE.PropertyBinding: Trying to update property for track: "+n+"."+r+" but it wasn't found.",e)}let s=this.Versioning.None;this.targetObject=e,void 0!==e.needsUpdate?s=this.Versioning.NeedsUpdate:void 0!==e.matrixWorldNeedsUpdate&&(s=this.Versioning.MatrixWorldNeedsUpdate);let o=this.BindingType.Direct;if(void 0!==i){if("morphTargetInfluences"===r){if(!e.geometry)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.",this);if(!e.geometry.morphAttributes)return void console.error("THREE.PropertyBinding: Can not bind to morphTargetInfluences because node does not have a geometry.morphAttributes.",this);void 0!==e.morphTargetDictionary[i]&&(i=e.morphTargetDictionary[i])}o=this.BindingType.ArrayElement,this.resolvedProperty=a,this.propertyIndex=i}else void 0!==a.fromArray&&void 0!==a.toArray?(o=this.BindingType.HasFromToArray,this.resolvedProperty=a):Array.isArray(a)?(o=this.BindingType.EntireArray,this.resolvedProperty=a):this.propertyName=r;this.getValue=this.GetterByBindingType[o],this.setValue=this.SetterByBindingTypeAndVersioning[o][s]}unbind(){this.node=null,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}}Rd.Composite=class{constructor(e,t,n){const r=n||Rd.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const n=this._targetGroup.nCachedObjects_,r=this._bindings[n];void 0!==r&&r.getValue(e,t)}setValue(e,t){const n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,i=n.length;r!==i;++r)n[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},Rd.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},Rd.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},Rd.prototype.GetterByBindingType=[Rd.prototype._getValue_direct,Rd.prototype._getValue_array,Rd.prototype._getValue_arrayElement,Rd.prototype._getValue_toArray],Rd.prototype.SetterByBindingTypeAndVersioning=[[Rd.prototype._setValue_direct,Rd.prototype._setValue_direct_setNeedsUpdate,Rd.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[Rd.prototype._setValue_array,Rd.prototype._setValue_array_setNeedsUpdate,Rd.prototype._setValue_array_setMatrixWorldNeedsUpdate],[Rd.prototype._setValue_arrayElement,Rd.prototype._setValue_arrayElement_setNeedsUpdate,Rd.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[Rd.prototype._setValue_fromArray,Rd.prototype._setValue_fromArray_setNeedsUpdate,Rd.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class Ld{constructor(){this.isAnimationObjectGroup=!0,this.uuid=bn(),this._objects=Array.prototype.slice.call(arguments),this.nCachedObjects_=0;const e={};this._indicesByUUID=e;for(let t=0,n=arguments.length;t!==n;++t)e[arguments[t].uuid]=t;this._paths=[],this._parsedPaths=[],this._bindings=[],this._bindingsIndicesByPath={};const t=this;this.stats={objects:{get total(){return t._objects.length},get inUse(){return this.total-t.nCachedObjects_}},get bindingsPerObject(){return t._bindings.length}}}add(){const e=this._objects,t=this._indicesByUUID,n=this._paths,r=this._parsedPaths,i=this._bindings,a=i.length;let s,o=e.length,l=this.nCachedObjects_;for(let u=0,c=arguments.length;u!==c;++u){const c=arguments[u],h=c.uuid;let d=t[h];if(void 0===d){d=o++,t[h]=d,e.push(c);for(let e=0,t=a;e!==t;++e)i[e].push(new Rd(c,n[e],r[e]))}else if(d<l){s=e[d];const o=--l,u=e[o];t[u.uuid]=d,e[d]=u,t[h]=o,e[o]=c;for(let e=0,t=a;e!==t;++e){const t=i[e],a=t[o];let s=t[d];t[d]=a,void 0===s&&(s=new Rd(c,n[e],r[e])),t[o]=s}}else e[d]!==s&&console.error("THREE.AnimationObjectGroup: Different objects with the same UUID detected. Clean the caches or recreate your infrastructure when reloading scenes.")}this.nCachedObjects_=l}remove(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_;for(let a=0,s=arguments.length;a!==s;++a){const s=arguments[a],o=s.uuid,l=t[o];if(void 0!==l&&l>=i){const a=i++,u=e[a];t[u.uuid]=l,e[l]=u,t[o]=a,e[a]=s;for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[a],i=t[l];t[l]=r,t[a]=i}}}this.nCachedObjects_=i}uncache(){const e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length;let i=this.nCachedObjects_,a=e.length;for(let s=0,o=arguments.length;s!==o;++s){const o=arguments[s].uuid,l=t[o];if(void 0!==l)if(delete t[o],l<i){const s=--i,o=e[s],u=--a,c=e[u];t[o.uuid]=l,e[l]=o,t[c.uuid]=s,e[s]=c,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[s],i=t[u];t[l]=r,t[s]=i,t.pop()}}else{const i=--a,s=e[i];i>0&&(t[s.uuid]=l),e[l]=s,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e];t[l]=t[i],t.pop()}}}this.nCachedObjects_=i}subscribe_(e,t){const n=this._bindingsIndicesByPath;let r=n[e];const i=this._bindings;if(void 0!==r)return i[r];const a=this._paths,s=this._parsedPaths,o=this._objects,l=o.length,u=this.nCachedObjects_,c=new Array(l);r=i.length,n[e]=r,a.push(e),s.push(t),i.push(c);for(let n=u,r=o.length;n!==r;++n){const r=o[n];c[n]=new Rd(r,e,t)}return c}unsubscribe_(e){const t=this._bindingsIndicesByPath,n=t[e];if(void 0!==n){const r=this._paths,i=this._parsedPaths,a=this._bindings,s=a.length-1,o=a[s];t[e[s]]=n,a[n]=o,a.pop(),i[n]=i[s],i.pop(),r[n]=r[s],r.pop()}}}class Dd{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;const i=t.tracks,a=i.length,s=new Array(a),o={endingStart:Mt,endingEnd:Mt};for(let e=0;e!==a;++e){const t=i[e].createInterpolant(null);s[e]=t,t.settings=o}this._interpolantSettings=o,this._interpolants=s,this._propertyBindings=new Array(a),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=yt,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&0!==this.timeScale&&null===this._startTime&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){const n=this._clip.duration,r=e._clip.duration,i=r/n,a=n/r;e.warp(1,i,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){const e=this._weightInterpolant;return null!==e&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){const r=this._mixer,i=r.time,a=this.timeScale;let s=this._timeScaleInterpolant;null===s&&(s=r._lendControlInterpolant(),this._timeScaleInterpolant=s);const o=s.parameterPositions,l=s.sampleValues;return o[0]=i,o[1]=i+n,l[0]=e/a,l[1]=t/a,this}stopWarping(){const e=this._timeScaleInterpolant;return null!==e&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled)return void this._updateWeight(e);const i=this._startTime;if(null!==i){const r=(e-i)*n;r<0||0===n?t=0:(this._startTime=null,t=n*r)}t*=this._updateTimeScale(e);const a=this._updateTime(t),s=this._updateWeight(e);if(s>0){const e=this._interpolants,t=this._propertyBindings;if(this.blendMode===Et)for(let n=0,r=e.length;n!==r;++n)e[n].evaluate(a),t[n].accumulateAdditive(s);else for(let n=0,i=e.length;n!==i;++n)e[n].evaluate(a),t[n].accumulate(r,s)}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const n=this._weightInterpolant;if(null!==n){const r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),0===r&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const n=this._timeScaleInterpolant;null!==n&&(t*=n.evaluate(e)[0],e>n.parameterPositions[1]&&(this.stopWarping(),0===t?this.paused=!0:this.timeScale=t))}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,n=this.loop;let r=this.time+e,i=this._loopCount;const a=n===xt;if(0===e)return-1===i?r:a&&1==(1&i)?t-r:r;if(n===vt){-1===i&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else{if(!(r<0)){this.time=r;break e}r=0}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(-1===i&&(e>=0?(i=0,this._setEndings(!0,0===this.repetitions,a)):this._setEndings(0===this.repetitions,!0,a)),r>=t||r<0){const n=Math.floor(r/t);r-=t*n,i+=Math.abs(n);const s=this.repetitions-i;if(s<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(1===s){const t=e<0;this._setEndings(t,!t,a)}else this._setEndings(!1,!1,a);this._loopCount=i,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:n})}}else this.time=r;if(a&&1==(1&i))return t-r}return r}_setEndings(e,t,n){const r=this._interpolantSettings;n?(r.endingStart=St,r.endingEnd=St):(r.endingStart=e?this.zeroSlopeAtStart?St:Mt:At,r.endingEnd=t?this.zeroSlopeAtEnd?St:Mt:At)}_scheduleFading(e,t,n){const r=this._mixer,i=r.time;let a=this._weightInterpolant;null===a&&(a=r._lendControlInterpolant(),this._weightInterpolant=a);const s=a.parameterPositions,o=a.sampleValues;return s[0]=i,o[0]=t,s[1]=i+e,o[1]=n,this}}const Id=new Float32Array(1);class kd extends mn{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const n=e._localRoot||this._root,r=e._clip.tracks,i=r.length,a=e._propertyBindings,s=e._interpolants,o=n.uuid,l=this._bindingsByRootAndName;let u=l[o];void 0===u&&(u={},l[o]=u);for(let e=0;e!==i;++e){const i=r[e],l=i.name;let c=u[l];if(void 0!==c)++c.referenceCount,a[e]=c;else{if(c=a[e],void 0!==c){null===c._cacheIndex&&(++c.referenceCount,this._addInactiveBinding(c,o,l));continue}const r=t&&t._propertyBindings[e].binding.parsedPath;c=new Ad(Rd.create(n,l,r),i.ValueTypeName,i.getValueSize()),++c.referenceCount,this._addInactiveBinding(c,o,l),a[e]=c}s[e].resultBuffer=c.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(null===e._cacheIndex){const t=(e._localRoot||this._root).uuid,n=e._clip.uuid,r=this._actionsByClip[n];this._bindAction(e,r&&r.knownActions[0]),this._addInactiveAction(e,n,t)}const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==n.useCount++&&(this._lendBinding(n),n.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.useCount&&(n.restoreOriginalState(),this._takeBackBinding(n))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){const t=e._cacheIndex;return null!==t&&t<this._nActiveActions}_addInactiveAction(e,t,n){const r=this._actions,i=this._actionsByClip;let a=i[t];if(void 0===a)a={knownActions:[e],actionByRoot:{}},e._byClipCacheIndex=0,i[t]=a;else{const t=a.knownActions;e._byClipCacheIndex=t.length,t.push(e)}e._cacheIndex=r.length,r.push(e),a.actionByRoot[n]=e}_removeInactiveAction(e){const t=this._actions,n=t[t.length-1],r=e._cacheIndex;n._cacheIndex=r,t[r]=n,t.pop(),e._cacheIndex=null;const i=e._clip.uuid,a=this._actionsByClip,s=a[i],o=s.knownActions,l=o[o.length-1],u=e._byClipCacheIndex;l._byClipCacheIndex=u,o[u]=l,o.pop(),e._byClipCacheIndex=null,delete s.actionByRoot[(e._localRoot||this._root).uuid],0===o.length&&delete a[i],this._removeInactiveBindingsForAction(e)}_removeInactiveBindingsForAction(e){const t=e._propertyBindings;for(let e=0,n=t.length;e!==n;++e){const n=t[e];0==--n.referenceCount&&this._removeInactiveBinding(n)}}_lendAction(e){const t=this._actions,n=e._cacheIndex,r=this._nActiveActions++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackAction(e){const t=this._actions,n=e._cacheIndex,r=--this._nActiveActions,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_addInactiveBinding(e,t,n){const r=this._bindingsByRootAndName,i=this._bindings;let a=r[t];void 0===a&&(a={},r[t]=a),a[n]=e,e._cacheIndex=i.length,i.push(e)}_removeInactiveBinding(e){const t=this._bindings,n=e.binding,r=n.rootNode.uuid,i=n.path,a=this._bindingsByRootAndName,s=a[r],o=t[t.length-1],l=e._cacheIndex;o._cacheIndex=l,t[l]=o,t.pop(),delete s[i],0===Object.keys(s).length&&delete a[r]}_lendBinding(e){const t=this._bindings,n=e._cacheIndex,r=this._nActiveBindings++,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_takeBackBinding(e){const t=this._bindings,n=e._cacheIndex,r=--this._nActiveBindings,i=t[r];e._cacheIndex=r,t[r]=e,i._cacheIndex=n,t[n]=i}_lendControlInterpolant(){const e=this._controlInterpolants,t=this._nActiveControlInterpolants++;let n=e[t];return void 0===n&&(n=new rh(new Float32Array(2),new Float32Array(2),1,Id),n.__cacheIndex=t,e[t]=n),n}_takeBackControlInterpolant(e){const t=this._controlInterpolants,n=e.__cacheIndex,r=--this._nActiveControlInterpolants,i=t[r];e.__cacheIndex=r,t[r]=e,i.__cacheIndex=n,t[n]=i}clipAction(e,t,n){const r=t||this._root,i=r.uuid;let a="string"==typeof e?fh.findByName(r,e):e;const s=null!==a?a.uuid:e,o=this._actionsByClip[s];let l=null;if(void 0===n&&(n=null!==a?a.blendMode:Ct),void 0!==o){const e=o.actionByRoot[i];if(void 0!==e&&e.blendMode===n)return e;l=o.knownActions[0],null===a&&(a=l._clip)}if(null===a)return null;const u=new Dd(this,a,t,n);return this._bindAction(u,l),this._addInactiveAction(u,s,i),u}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"==typeof e?fh.findByName(n,e):e,a=i?i.uuid:e,s=this._actionsByClip[a];return void 0!==s&&s.actionByRoot[r]||null}stopAllAction(){const e=this._actions;for(let t=this._nActiveActions-1;t>=0;--t)e[t].stop();return this}update(e){e*=this.timeScale;const t=this._actions,n=this._nActiveActions,r=this.time+=e,i=Math.sign(e),a=this._accuIndex^=1;for(let s=0;s!==n;++s)t[s]._update(r,e,i,a);const s=this._bindings,o=this._nActiveBindings;for(let e=0;e!==o;++e)s[e].apply(a);return this}setTime(e){this.time=0;for(let e=0;e<this._actions.length;e++)this._actions[e].time=0;return this.update(e)}getRoot(){return this._root}uncacheClip(e){const t=this._actions,n=e.uuid,r=this._actionsByClip,i=r[n];if(void 0!==i){const e=i.knownActions;for(let n=0,r=e.length;n!==r;++n){const r=e[n];this._deactivateAction(r);const i=r._cacheIndex,a=t[t.length-1];r._cacheIndex=null,r._byClipCacheIndex=null,a._cacheIndex=i,t[i]=a,t.pop(),this._removeInactiveBindingsForAction(r)}delete r[n]}}uncacheRoot(e){const t=e.uuid,n=this._actionsByClip;for(const e in n){const r=n[e].actionByRoot[t];void 0!==r&&(this._deactivateAction(r),this._removeInactiveAction(r))}const r=this._bindingsByRootAndName[t];if(void 0!==r)for(const e in r){const t=r[e];t.restoreOriginalState(),this._removeInactiveBinding(t)}}uncacheAction(e,t){const n=this.existingAction(e,t);null!==n&&(this._deactivateAction(n),this._removeInactiveAction(n))}}class Fd{constructor(e){this.value=e}clone(){return new Fd(void 0===this.value.clone?this.value:this.value.clone())}}let Od=0;class Nd extends mn{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:Od++}),this.name="",this.usage=nn,this.uniforms=[]}add(e){return this.uniforms.push(e),this}remove(e){const t=this.uniforms.indexOf(e);return-1!==t&&this.uniforms.splice(t,1),this}setName(e){return this.name=e,this}setUsage(e){return this.usage=e,this}dispose(){return this.dispatchEvent({type:"dispose"}),this}copy(e){this.name=e.name,this.usage=e.usage;const t=e.uniforms;this.uniforms.length=0;for(let e=0,n=t.length;e<n;e++)this.uniforms.push(t[e].clone());return this}clone(){return(new this.constructor).copy(this)}}class zd extends ol{constructor(e,t,n=1){super(e,t),this.isInstancedInterleavedBuffer=!0,this.meshPerAttribute=n}copy(e){return super.copy(e),this.meshPerAttribute=e.meshPerAttribute,this}clone(e){const t=super.clone(e);return t.meshPerAttribute=this.meshPerAttribute,t}toJSON(e){const t=super.toJSON(e);return t.isInstancedInterleavedBuffer=!0,t.meshPerAttribute=this.meshPerAttribute,t}}class Ud{constructor(e,t,n,r,i){this.isGLBufferAttribute=!0,this.buffer=e,this.type=t,this.itemSize=n,this.elementSize=r,this.count=i,this.version=0}set needsUpdate(e){!0===e&&this.version++}setBuffer(e){return this.buffer=e,this}setType(e,t){return this.type=e,this.elementSize=t,this}setItemSize(e){return this.itemSize=e,this}setCount(e){return this.count=e,this}}class Gd{constructor(e,t,n=0,r=1/0){this.ray=new Or(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new Kr,this.params={Mesh:{},Line:{threshold:1},LOD:{},Points:{threshold:1},Sprite:{}}}set(e,t){this.ray.set(e,t)}setFromCamera(e,t){t.isPerspectiveCamera?(this.ray.origin.setFromMatrixPosition(t.matrixWorld),this.ray.direction.set(e.x,e.y,.5).unproject(t).sub(this.ray.origin).normalize(),this.camera=t):t.isOrthographicCamera?(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.camera=t):console.error("THREE.Raycaster: Unsupported camera type: "+t.type)}intersectObject(e,t=!0,n=[]){return Vd(e,this,n,t),n.sort(Hd),n}intersectObjects(e,t=!0,n=[]){for(let r=0,i=e.length;r<i;r++)Vd(e[r],this,n,t);return n.sort(Hd),n}}function Hd(e,t){return e.distance-t.distance}function Vd(e,t,n,r){if(e.layers.test(t.layers)&&e.raycast(t,n),!0===r){const r=e.children;for(let e=0,i=r.length;e<i;e++)Vd(r[e],t,n,!0)}}class Wd{constructor(e=1,t=0,n=0){return this.radius=e,this.phi=t,this.theta=n,this}set(e,t,n){return this.radius=e,this.phi=t,this.theta=n,this}copy(e){return this.radius=e.radius,this.phi=e.phi,this.theta=e.theta,this}makeSafe(){const e=1e-6;return this.phi=Math.max(e,Math.min(Math.PI-e,this.phi)),this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+t*t+n*n),0===this.radius?(this.theta=0,this.phi=0):(this.theta=Math.atan2(e,n),this.phi=Math.acos(_n(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}class jd{constructor(e=1,t=0,n=0){return this.radius=e,this.theta=t,this.y=n,this}set(e,t,n){return this.radius=e,this.theta=t,this.y=n,this}copy(e){return this.radius=e.radius,this.theta=e.theta,this.y=e.y,this}setFromVector3(e){return this.setFromCartesianCoords(e.x,e.y,e.z)}setFromCartesianCoords(e,t,n){return this.radius=Math.sqrt(e*e+n*n),this.theta=Math.atan2(e,n),this.y=t,this}clone(){return(new this.constructor).copy(this)}}const Jd=new Pn;class Xd{constructor(e=new Pn(1/0,1/0),t=new Pn(-1/0,-1/0)){this.isBox2=!0,this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;t<n;t++)this.expandByPoint(e[t]);return this}setFromCenterAndSize(e,t){const n=Jd.copy(t).multiplyScalar(.5);return this.min.copy(e).sub(n),this.max.copy(e).add(n),this}clone(){return(new this.constructor).copy(this)}copy(e){return this.min.copy(e.min),this.max.copy(e.max),this}makeEmpty(){return this.min.x=this.min.y=1/0,this.max.x=this.max.y=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y}getCenter(e){return this.isEmpty()?e.set(0,0):e.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(e){return this.isEmpty()?e.set(0,0):e.subVectors(this.max,this.min)}expandByPoint(e){return this.min.min(e),this.max.max(e),this}expandByVector(e){return this.min.sub(e),this.max.add(e),this}expandByScalar(e){return this.min.addScalar(-e),this.max.addScalar(e),this}containsPoint(e){return!(e.x<this.min.x||e.x>this.max.x||e.y<this.min.y||e.y>this.max.y)}containsBox(e){return this.min.x<=e.min.x&&e.max.x<=this.max.x&&this.min.y<=e.min.y&&e.max.y<=this.max.y}getParameter(e,t){return t.set((e.x-this.min.x)/(this.max.x-this.min.x),(e.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(e){return!(e.max.x<this.min.x||e.min.x>this.max.x||e.max.y<this.min.y||e.min.y>this.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return Jd.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),this}translate(e){return this.min.add(e),this.max.add(e),this}equals(e){return e.min.equals(this.min)&&e.max.equals(this.max)}}const Yd=new lr,Kd=new lr;class qd{constructor(e=new lr,t=new lr){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){Yd.subVectors(e,this.start),Kd.subVectors(this.end,this.start);const n=Kd.dot(Kd);let r=Kd.dot(Yd)/n;return t&&(r=_n(r,0,1)),r}closestPointToPoint(e,t,n){const r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return(new this.constructor).copy(this)}}const Qd=new lr;class Zd extends ui{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new Wi,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let e=0,t=1,n=32;e<n;e++,t++){const i=e/n*Math.PI*2,a=t/n*Math.PI*2;r.push(Math.cos(i),Math.sin(i),1,Math.cos(a),Math.sin(a),1)}n.setAttribute("position",new ki(r,3));const i=new Xl({fog:!1,toneMapped:!1});this.cone=new nu(n,i),this.add(this.cone),this.update()}dispose(){this.cone.geometry.dispose(),this.cone.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1);const e=this.light.distance?this.light.distance:1e3,t=e*Math.tan(this.light.angle);this.cone.scale.set(t,t,e),Qd.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Qd),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const $d=new lr,ef=new Nr,tf=new Nr;class nf extends nu{constructor(e){const t=rf(e),n=new Wi,r=[],i=[],a=new Xn(0,0,1),s=new Xn(0,1,0);for(let e=0;e<t.length;e++){const n=t[e];n.parent&&n.parent.isBone&&(r.push(0,0,0),r.push(0,0,0),i.push(a.r,a.g,a.b),i.push(s.r,s.g,s.b))}n.setAttribute("position",new ki(r,3)),n.setAttribute("color",new ki(i,3)),super(n,new Xl({vertexColors:!0,depthTest:!1,depthWrite:!1,toneMapped:!1,transparent:!0})),this.isSkeletonHelper=!0,this.type="SkeletonHelper",this.root=e,this.bones=t,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1}updateMatrixWorld(e){const t=this.bones,n=this.geometry,r=n.getAttribute("position");tf.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e<t.length;e++){const i=t[e];i.parent&&i.parent.isBone&&(ef.multiplyMatrices(tf,i.matrixWorld),$d.setFromMatrixPosition(ef),r.setXYZ(n,$d.x,$d.y,$d.z),ef.multiplyMatrices(tf,i.parent.matrixWorld),$d.setFromMatrixPosition(ef),r.setXYZ(n+1,$d.x,$d.y,$d.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}}function rf(e){const t=[];!0===e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push.apply(t,rf(e.children[n]));return t}class af extends ia{constructor(e,t,n){super(new Pc(t,4,2),new Mi({wireframe:!0,fog:!1,toneMapped:!1})),this.light=e,this.color=n,this.type="PointLightHelper",this.matrix=this.light.matrixWorld,this.matrixAutoUpdate=!1,this.update()}dispose(){this.geometry.dispose(),this.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),void 0!==this.color?this.material.color.set(this.color):this.material.color.copy(this.light.color)}}const sf=new lr,of=new Xn,lf=new Xn;class uf extends ui{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const r=new Ec(t);r.rotateY(.5*Math.PI),this.material=new Mi({wireframe:!0,fog:!1,toneMapped:!1}),void 0===this.color&&(this.material.vertexColors=!0);const i=r.getAttribute("position"),a=new Float32Array(3*i.count);r.setAttribute("color",new Ci(a,3)),this.add(new ia(r,this.material)),this.update()}dispose(){this.children[0].geometry.dispose(),this.children[0].material.dispose()}update(){const e=this.children[0];if(void 0!==this.color)this.material.color.set(this.color);else{const t=e.geometry.getAttribute("color");of.copy(this.light.color),lf.copy(this.light.groundColor);for(let e=0,n=t.count;e<n;e++){const r=e<n/2?of:lf;t.setXYZ(e,r.r,r.g,r.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(sf.setFromMatrixPosition(this.light.matrixWorld).negate())}}class cf extends nu{constructor(e=10,t=10,n=4473924,r=8947848){n=new Xn(n),r=new Xn(r);const i=t/2,a=e/t,s=e/2,o=[],l=[];for(let e=0,u=0,c=-s;e<=t;e++,c+=a){o.push(-s,0,c,s,0,c),o.push(c,0,-s,c,0,s);const t=e===i?n:r;t.toArray(l,u),u+=3,t.toArray(l,u),u+=3,t.toArray(l,u),u+=3,t.toArray(l,u),u+=3}const u=new Wi;u.setAttribute("position",new ki(o,3)),u.setAttribute("color",new ki(l,3)),super(u,new Xl({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class hf extends nu{constructor(e=10,t=16,n=8,r=64,i=4473924,a=8947848){i=new Xn(i),a=new Xn(a);const s=[],o=[];if(t>1)for(let n=0;n<t;n++){const r=n/t*(2*Math.PI),l=Math.sin(r)*e,u=Math.cos(r)*e;s.push(0,0,0),s.push(l,0,u);const c=1&n?i:a;o.push(c.r,c.g,c.b),o.push(c.r,c.g,c.b)}for(let t=0;t<n;t++){const l=1&t?i:a,u=e-e/n*t;for(let e=0;e<r;e++){let t=e/r*(2*Math.PI),n=Math.sin(t)*u,i=Math.cos(t)*u;s.push(n,0,i),o.push(l.r,l.g,l.b),t=(e+1)/r*(2*Math.PI),n=Math.sin(t)*u,i=Math.cos(t)*u,s.push(n,0,i),o.push(l.r,l.g,l.b)}}const l=new Wi;l.setAttribute("position",new ki(s,3)),l.setAttribute("color",new ki(o,3)),super(l,new Xl({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const df=new lr,ff=new lr,pf=new lr;class mf extends ui{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="DirectionalLightHelper",void 0===t&&(t=1);let r=new Wi;r.setAttribute("position",new ki([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const i=new Xl({fog:!1,toneMapped:!1});this.lightPlane=new $l(r,i),this.add(this.lightPlane),r=new Wi,r.setAttribute("position",new ki([0,0,0,0,0,1],3)),this.targetLine=new $l(r,i),this.add(this.targetLine),this.update()}dispose(){this.lightPlane.geometry.dispose(),this.lightPlane.material.dispose(),this.targetLine.geometry.dispose(),this.targetLine.material.dispose()}update(){this.light.updateWorldMatrix(!0,!1),this.light.target.updateWorldMatrix(!0,!1),df.setFromMatrixPosition(this.light.matrixWorld),ff.setFromMatrixPosition(this.light.target.matrixWorld),pf.subVectors(ff,df),this.lightPlane.lookAt(ff),void 0!==this.color?(this.lightPlane.material.color.set(this.color),this.targetLine.material.color.set(this.color)):(this.lightPlane.material.color.copy(this.light.color),this.targetLine.material.color.copy(this.light.color)),this.targetLine.lookAt(ff),this.targetLine.scale.z=pf.length()}}const gf=new lr,vf=new da;class yf extends nu{constructor(e){const t=new Wi,n=new Xl({color:16777215,vertexColors:!0,toneMapped:!1}),r=[],i=[],a={};function s(e,t){o(e),o(t)}function o(e){r.push(0,0,0),i.push(0,0,0),void 0===a[e]&&(a[e]=[]),a[e].push(r.length/3-1)}s("n1","n2"),s("n2","n4"),s("n4","n3"),s("n3","n1"),s("f1","f2"),s("f2","f4"),s("f4","f3"),s("f3","f1"),s("n1","f1"),s("n2","f2"),s("n3","f3"),s("n4","f4"),s("p","n1"),s("p","n2"),s("p","n3"),s("p","n4"),s("u1","u2"),s("u2","u3"),s("u3","u1"),s("c","t"),s("p","c"),s("cn1","cn2"),s("cn3","cn4"),s("cf1","cf2"),s("cf3","cf4"),t.setAttribute("position",new ki(r,3)),t.setAttribute("color",new ki(i,3)),super(t,n),this.type="CameraHelper",this.camera=e,this.camera.updateProjectionMatrix&&this.camera.updateProjectionMatrix(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.pointMap=a,this.update();const l=new Xn(16755200),u=new Xn(16711680),c=new Xn(43775),h=new Xn(16777215),d=new Xn(3355443);this.setColors(l,u,c,h,d)}setColors(e,t,n,r,i){const a=this.geometry.getAttribute("color");a.setXYZ(0,e.r,e.g,e.b),a.setXYZ(1,e.r,e.g,e.b),a.setXYZ(2,e.r,e.g,e.b),a.setXYZ(3,e.r,e.g,e.b),a.setXYZ(4,e.r,e.g,e.b),a.setXYZ(5,e.r,e.g,e.b),a.setXYZ(6,e.r,e.g,e.b),a.setXYZ(7,e.r,e.g,e.b),a.setXYZ(8,e.r,e.g,e.b),a.setXYZ(9,e.r,e.g,e.b),a.setXYZ(10,e.r,e.g,e.b),a.setXYZ(11,e.r,e.g,e.b),a.setXYZ(12,e.r,e.g,e.b),a.setXYZ(13,e.r,e.g,e.b),a.setXYZ(14,e.r,e.g,e.b),a.setXYZ(15,e.r,e.g,e.b),a.setXYZ(16,e.r,e.g,e.b),a.setXYZ(17,e.r,e.g,e.b),a.setXYZ(18,e.r,e.g,e.b),a.setXYZ(19,e.r,e.g,e.b),a.setXYZ(20,e.r,e.g,e.b),a.setXYZ(21,e.r,e.g,e.b),a.setXYZ(22,e.r,e.g,e.b),a.setXYZ(23,e.r,e.g,e.b),a.setXYZ(24,t.r,t.g,t.b),a.setXYZ(25,t.r,t.g,t.b),a.setXYZ(26,t.r,t.g,t.b),a.setXYZ(27,t.r,t.g,t.b),a.setXYZ(28,t.r,t.g,t.b),a.setXYZ(29,t.r,t.g,t.b),a.setXYZ(30,t.r,t.g,t.b),a.setXYZ(31,t.r,t.g,t.b),a.setXYZ(32,n.r,n.g,n.b),a.setXYZ(33,n.r,n.g,n.b),a.setXYZ(34,n.r,n.g,n.b),a.setXYZ(35,n.r,n.g,n.b),a.setXYZ(36,n.r,n.g,n.b),a.setXYZ(37,n.r,n.g,n.b),a.setXYZ(38,r.r,r.g,r.b),a.setXYZ(39,r.r,r.g,r.b),a.setXYZ(40,i.r,i.g,i.b),a.setXYZ(41,i.r,i.g,i.b),a.setXYZ(42,i.r,i.g,i.b),a.setXYZ(43,i.r,i.g,i.b),a.setXYZ(44,i.r,i.g,i.b),a.setXYZ(45,i.r,i.g,i.b),a.setXYZ(46,i.r,i.g,i.b),a.setXYZ(47,i.r,i.g,i.b),a.setXYZ(48,i.r,i.g,i.b),a.setXYZ(49,i.r,i.g,i.b),a.needsUpdate=!0}update(){const e=this.geometry,t=this.pointMap;vf.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),xf("c",t,e,vf,0,0,-1),xf("t",t,e,vf,0,0,1),xf("n1",t,e,vf,-1,-1,-1),xf("n2",t,e,vf,1,-1,-1),xf("n3",t,e,vf,-1,1,-1),xf("n4",t,e,vf,1,1,-1),xf("f1",t,e,vf,-1,-1,1),xf("f2",t,e,vf,1,-1,1),xf("f3",t,e,vf,-1,1,1),xf("f4",t,e,vf,1,1,1),xf("u1",t,e,vf,.7,1.1,-1),xf("u2",t,e,vf,-.7,1.1,-1),xf("u3",t,e,vf,0,2,-1),xf("cf1",t,e,vf,-1,0,1),xf("cf2",t,e,vf,1,0,1),xf("cf3",t,e,vf,0,-1,1),xf("cf4",t,e,vf,0,1,1),xf("cn1",t,e,vf,-1,0,-1),xf("cn2",t,e,vf,1,0,-1),xf("cn3",t,e,vf,0,-1,-1),xf("cn4",t,e,vf,0,1,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function xf(e,t,n,r,i,a,s){gf.set(i,a,s).unproject(r);const o=t[e];if(void 0!==o){const e=n.getAttribute("position");for(let t=0,n=o.length;t<n;t++)e.setXYZ(o[t],gf.x,gf.y,gf.z)}}const bf=new hr;class _f extends nu{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Float32Array(24),i=new Wi;i.setIndex(new Ci(n,1)),i.setAttribute("position",new Ci(r,3)),super(i,new Xl({color:t,toneMapped:!1})),this.object=e,this.type="BoxHelper",this.matrixAutoUpdate=!1,this.update()}update(e){if(void 0!==e&&console.warn("THREE.BoxHelper: .update() has no longer arguments."),void 0!==this.object&&bf.setFromObject(this.object),bf.isEmpty())return;const t=bf.min,n=bf.max,r=this.geometry.attributes.position,i=r.array;i[0]=n.x,i[1]=n.y,i[2]=n.z,i[3]=t.x,i[4]=n.y,i[5]=n.z,i[6]=t.x,i[7]=t.y,i[8]=n.z,i[9]=n.x,i[10]=t.y,i[11]=n.z,i[12]=n.x,i[13]=n.y,i[14]=t.z,i[15]=t.x,i[16]=n.y,i[17]=t.z,i[18]=t.x,i[19]=t.y,i[20]=t.z,i[21]=n.x,i[22]=t.y,i[23]=t.z,r.needsUpdate=!0,this.geometry.computeBoundingSphere()}setFromObject(e){return this.object=e,this.update(),this}copy(e,t){return super.copy(e,t),this.object=e.object,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class wf extends nu{constructor(e,t=16776960){const n=new Uint16Array([0,1,1,2,2,3,3,0,4,5,5,6,6,7,7,4,0,4,1,5,2,6,3,7]),r=new Wi;r.setIndex(new Ci(n,1)),r.setAttribute("position",new ki([1,1,1,-1,1,1,-1,-1,1,1,-1,1,1,1,-1,-1,1,-1,-1,-1,-1,1,-1,-1],3)),super(r,new Xl({color:t,toneMapped:!1})),this.box=e,this.type="Box3Helper",this.geometry.computeBoundingSphere()}updateMatrixWorld(e){const t=this.box;t.isEmpty()||(t.getCenter(this.position),t.getSize(this.scale),this.scale.multiplyScalar(.5),super.updateMatrixWorld(e))}dispose(){this.geometry.dispose(),this.material.dispose()}}class Mf extends $l{constructor(e,t=1,n=16776960){const r=n,i=new Wi;i.setAttribute("position",new ki([1,-1,0,-1,1,0,-1,-1,0,1,1,0,-1,1,0,-1,-1,0,1,-1,0,1,1,0],3)),i.computeBoundingSphere(),super(i,new Xl({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const a=new Wi;a.setAttribute("position",new ki([1,1,0,-1,1,0,-1,-1,0,1,1,0,-1,-1,0,1,-1,0],3)),a.computeBoundingSphere(),this.add(new ia(a,new Mi({color:r,opacity:.2,transparent:!0,depthWrite:!1,toneMapped:!1})))}updateMatrixWorld(e){this.position.set(0,0,0),this.scale.set(.5*this.size,.5*this.size,1),this.lookAt(this.plane.normal),this.translateZ(-this.plane.constant),super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose(),this.children[0].geometry.dispose(),this.children[0].material.dispose()}}const Sf=new lr;let Af,Cf;class Ef extends ui{constructor(e=new lr(0,0,1),t=new lr(0,0,0),n=1,r=16776960,i=.2*n,a=.2*i){super(),this.type="ArrowHelper",void 0===Af&&(Af=new Wi,Af.setAttribute("position",new ki([0,0,0,0,1,0],3)),Cf=new Gu(0,.5,1,5,1),Cf.translate(0,-.5,0)),this.position.copy(t),this.line=new $l(Af,new Xl({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new ia(Cf,new Mi({color:r,toneMapped:!1})),this.cone.matrixAutoUpdate=!1,this.add(this.cone),this.setDirection(e),this.setLength(n,i,a)}setDirection(e){if(e.y>.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{Sf.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Sf,t)}}setLength(e,t=.2*e,n=.2*t){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class Tf extends nu{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=new Wi;n.setAttribute("position",new ki(t,3)),n.setAttribute("color",new ki([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(n,new Xl({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,n){const r=new Xn,i=this.geometry.attributes.color.array;return r.set(e),r.toArray(i,0),r.toArray(i,3),r.set(t),r.toArray(i,6),r.toArray(i,9),r.set(n),r.toArray(i,12),r.toArray(i,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Bf{constructor(){this.type="ShapePath",this.color=new Xn,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Ou,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,i,a){return this.currentPath.bezierCurveTo(e,t,n,r,i,a),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(e,t){const n=t.length;let r=!1;for(let i=n-1,a=0;a<n;i=a++){let n=t[i],s=t[a],o=s.x-n.x,l=s.y-n.y;if(Math.abs(l)>Number.EPSILON){if(l<0&&(n=t[a],o=-o,s=t[i],l=-l),e.y<n.y||e.y>s.y)continue;if(e.y===n.y){if(e.x===n.x)return!0}else{const t=l*(e.x-n.x)-o*(e.y-n.y);if(0===t)return!0;if(t<0)continue;r=!r}}else{if(e.y!==n.y)continue;if(s.x<=e.x&&e.x<=n.x||n.x<=e.x&&e.x<=s.x)return!0}}return r}const n=_c.isClockWise,r=this.subPaths;if(0===r.length)return[];let i,a,s;const o=[];if(1===r.length)return a=r[0],s=new qu,s.curves=a.curves,o.push(s),o;let l=!n(r[0].getPoints());l=e?!l:l;const u=[],c=[];let h,d,f=[],p=0;c[p]=void 0,f[p]=[];for(let t=0,s=r.length;t<s;t++)a=r[t],h=a.getPoints(),i=n(h),i=e?!i:i,i?(!l&&c[p]&&p++,c[p]={s:new qu,p:h},c[p].s.curves=a.curves,l&&p++,f[p]=[]):f[p].push({h:a,p:h[0]});if(!c[0])return function(e){const t=[];for(let n=0,r=e.length;n<r;n++){const r=e[n],i=new qu;i.curves=r.curves,t.push(i)}return t}(r);if(c.length>1){let e=!1,n=0;for(let e=0,t=c.length;e<t;e++)u[e]=[];for(let r=0,i=c.length;r<i;r++){const i=f[r];for(let a=0;a<i.length;a++){const s=i[a];let o=!0;for(let i=0;i<c.length;i++)t(s.p,c[i].p)&&(r!==i&&n++,o?(o=!1,u[i].push(s)):e=!0);o&&u[r].push(s)}}n>0&&!1===e&&(f=u)}for(let e=0,t=c.length;e<t;e++){s=c[e].s,o.push(s),d=f[e];for(let e=0,t=d.length;e<t;e++)s.holes.push(d[e].h)}return o}}const Pf=Rf();function Rf(){const e=new ArrayBuffer(4),t=new Float32Array(e),n=new Uint32Array(e),r=new Uint32Array(512),i=new Uint32Array(512);for(let e=0;e<256;++e){const t=e-127;t<-27?(r[e]=0,r[256|e]=32768,i[e]=24,i[256|e]=24):t<-14?(r[e]=1024>>-t-14,r[256|e]=1024>>-t-14|32768,i[e]=-t-1,i[256|e]=-t-1):t<=15?(r[e]=t+15<<10,r[256|e]=t+15<<10|32768,i[e]=13,i[256|e]=13):t<128?(r[e]=31744,r[256|e]=64512,i[e]=24,i[256|e]=24):(r[e]=31744,r[256|e]=64512,i[e]=13,i[256|e]=13)}const a=new Uint32Array(2048),s=new Uint32Array(64),o=new Uint32Array(64);for(let e=1;e<1024;++e){let t=e<<13,n=0;for(;0==(8388608&t);)t<<=1,n-=8388608;t&=-8388609,n+=947912704,a[e]=t|n}for(let e=1024;e<2048;++e)a[e]=939524096+(e-1024<<13);for(let e=1;e<31;++e)s[e]=e<<23;s[31]=1199570944,s[32]=2147483648;for(let e=33;e<63;++e)s[e]=2147483648+(e-32<<23);s[63]=3347054592;for(let e=1;e<64;++e)32!==e&&(o[e]=1024);return{floatView:t,uint32View:n,baseTable:r,shiftTable:i,mantissaTable:a,exponentTable:s,offsetTable:o}}var Lf=Object.freeze({__proto__:null,toHalfFloat:function(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=_n(e,-65504,65504),Pf.floatView[0]=e;const t=Pf.uint32View[0],n=t>>23&511;return Pf.baseTable[n]+((8388607&t)>>Pf.shiftTable[n])},fromHalfFloat:function(e){const t=e>>10;return Pf.uint32View[0]=Pf.mantissaTable[Pf.offsetTable[t]+(1023&e)]+Pf.exponentTable[t],Pf.floatView[0]}});function Df(){console.error("THREE.ImmediateRenderObject has been removed.")}class If extends tr{constructor(e,t,n){console.error('THREE.WebGLMultisampleRenderTarget has been removed. Use a normal render target and set the "samples" property to greater 0 to enable multisampling.'),super(e,t,n),this.samples=4}}class kf extends nr{constructor(e,t,n,r){console.warn("THREE.DataTexture2DArray has been renamed to DataArrayTexture."),super(e,t,n,r)}}class Ff extends ir{constructor(e,t,n,r){console.warn("THREE.DataTexture3D has been renamed to Data3DTexture."),super(e,t,n,r)}}class Of extends sa{constructor(e,t,n,r,i,a){console.warn("THREE.BoxBufferGeometry has been renamed to THREE.BoxGeometry."),super(e,t,n,r,i,a)}}class Nf extends zu{constructor(e,t,n,r){console.warn("THREE.CapsuleBufferGeometry has been renamed to THREE.CapsuleGeometry."),super(e,t,n,r)}}class zf extends Uu{constructor(e,t,n,r){console.warn("THREE.CircleBufferGeometry has been renamed to THREE.CircleGeometry."),super(e,t,n,r)}}class Uf extends Hu{constructor(e,t,n,r,i,a,s){console.warn("THREE.ConeBufferGeometry has been renamed to THREE.ConeGeometry."),super(e,t,n,r,i,a,s)}}class Gf extends Gu{constructor(e,t,n,r,i,a,s,o){console.warn("THREE.CylinderBufferGeometry has been renamed to THREE.CylinderGeometry."),super(e,t,n,r,i,a,s,o)}}class Hf extends Wu{constructor(e,t){console.warn("THREE.DodecahedronBufferGeometry has been renamed to THREE.DodecahedronGeometry."),super(e,t)}}class Vf extends Sc{constructor(e,t){console.warn("THREE.ExtrudeBufferGeometry has been renamed to THREE.ExtrudeGeometry."),super(e,t)}}class Wf extends Cc{constructor(e,t){console.warn("THREE.IcosahedronBufferGeometry has been renamed to THREE.IcosahedronGeometry."),super(e,t)}}class jf extends Nu{constructor(e,t,n,r){console.warn("THREE.LatheBufferGeometry has been renamed to THREE.LatheGeometry."),super(e,t,n,r)}}class Jf extends Ec{constructor(e,t){console.warn("THREE.OctahedronBufferGeometry has been renamed to THREE.OctahedronGeometry."),super(e,t)}}class Xf extends Ea{constructor(e,t,n,r){console.warn("THREE.PlaneBufferGeometry has been renamed to THREE.PlaneGeometry."),super(e,t,n,r)}}class Yf extends Vu{constructor(e,t,n,r){console.warn("THREE.PolyhedronBufferGeometry has been renamed to THREE.PolyhedronGeometry."),super(e,t,n,r)}}class Kf extends Tc{constructor(e,t,n,r,i,a){console.warn("THREE.RingBufferGeometry has been renamed to THREE.RingGeometry."),super(e,t,n,r,i,a)}}class qf extends Bc{constructor(e,t){console.warn("THREE.ShapeBufferGeometry has been renamed to THREE.ShapeGeometry."),super(e,t)}}class Qf extends Pc{constructor(e,t,n,r,i,a,s){console.warn("THREE.SphereBufferGeometry has been renamed to THREE.SphereGeometry."),super(e,t,n,r,i,a,s)}}class Zf extends Rc{constructor(e,t){console.warn("THREE.TetrahedronBufferGeometry has been renamed to THREE.TetrahedronGeometry."),super(e,t)}}class $f extends Lc{constructor(e,t,n,r,i){console.warn("THREE.TorusBufferGeometry has been renamed to THREE.TorusGeometry."),super(e,t,n,r,i)}}class ep extends Dc{constructor(e,t,n,r,i,a){console.warn("THREE.TorusKnotBufferGeometry has been renamed to THREE.TorusKnotGeometry."),super(e,t,n,r,i,a)}}class tp extends Ic{constructor(e,t,n,r,i){console.warn("THREE.TubeBufferGeometry has been renamed to THREE.TubeGeometry."),super(e,t,n,r,i)}}"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:r}})),"undefined"!=typeof window&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=r)}},t={};function n(r){var i=t[r];if(void 0!==i)return i.exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{"use strict";function e(e,t,n,r,i,a,s){try{var o=e[a](s),l=o.value}catch(e){return void n(e)}o.done?t(l):Promise.resolve(l).then(r,i)}var t=n(3324),r=n(4687),i=n.n(r),a=n(7294),s=n(745);const o=1/60*1e3,l="undefined"!=typeof performance?()=>performance.now():()=>Date.now(),u="undefined"!=typeof window?e=>window.requestAnimationFrame(e):e=>setTimeout((()=>e(l())),o),c={delta:0,timestamp:0};let h=!0,d=!1,f=!1;const p=["read","update","preRender","render","postRender"],m=p.reduce(((e,t)=>(e[t]=function(e){let t=[],n=[],r=0,i=!1,a=!1;const s=new WeakSet,o={schedule:(e,a=!1,o=!1)=>{const l=o&&i,u=l?t:n;return a&&s.add(e),-1===u.indexOf(e)&&(u.push(e),l&&i&&(r=t.length)),e},cancel:e=>{const t=n.indexOf(e);-1!==t&&n.splice(t,1),s.delete(e)},process:l=>{if(i)a=!0;else{if(i=!0,[t,n]=[n,t],n.length=0,r=t.length,r)for(let n=0;n<r;n++){const r=t[n];r(l),s.has(r)&&(o.schedule(r),e())}i=!1,a&&(a=!1,o.process(l))}}};return o}((()=>d=!0)),e)),{}),g=p.reduce(((e,t)=>{const n=m[t];return e[t]=(e,t=!1,r=!1)=>(d||_(),n.schedule(e,t,r)),e}),{}),v=p.reduce(((e,t)=>(e[t]=m[t].cancel,e)),{}),y=p.reduce(((e,t)=>(e[t]=()=>m[t].process(c),e)),{}),x=e=>m[e].process(c),b=e=>{d=!1,c.delta=h?o:Math.max(Math.min(e-c.timestamp,40),1),c.timestamp=e,f=!0,p.forEach(x),f=!1,d&&(h=!1,u(b))},_=()=>{d=!0,h=!0,f||u(b)},w="undefined"!=typeof document,M=w?a.useLayoutEffect:a.useEffect;function S(){const e=(0,a.useRef)(!1);return M((()=>(e.current=!0,()=>{e.current=!1})),[]),e}const A=(0,a.createContext)(null);function C(e){const t=(0,a.useRef)(null);return null===t.current&&(t.current=e()),t.current}class E extends a.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const e=this.props.sizeRef.current;e.height=t.offsetHeight||0,e.width=t.offsetWidth||0,e.top=t.offsetTop,e.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function T({children:e,isPresent:t}){const n=(0,a.useId)(),r=(0,a.useRef)(null),i=(0,a.useRef)({width:0,height:0,top:0,left:0});return(0,a.useInsertionEffect)((()=>{const{width:e,height:a,top:s,left:o}=i.current;if(t||!r.current||!e||!a)return;r.current.dataset.motionPopId=n;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${n}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${a}px !important;\n top: ${s}px !important;\n left: ${o}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[t]),a.createElement(E,{isPresent:t,childRef:r,sizeRef:i},a.cloneElement(e,{ref:r}))}const B=({children:e,initial:t,isPresent:n,onExitComplete:r,custom:i,presenceAffectsLayout:s,mode:o})=>{const l=C(P),u=(0,a.useId)(),c=(0,a.useMemo)((()=>({id:u,initial:t,isPresent:n,custom:i,onExitComplete:e=>{l.set(e,!0);for(const e of l.values())if(!e)return;r&&r()},register:e=>(l.set(e,!1),()=>l.delete(e))})),s?void 0:[n]);return(0,a.useMemo)((()=>{l.forEach(((e,t)=>l.set(t,!1)))}),[n]),a.useEffect((()=>{!n&&!l.size&&r&&r()}),[n]),"popLayout"===o&&(e=a.createElement(T,{isPresent:n},e)),a.createElement(A.Provider,{value:c},e)};function P(){return new Map}const R=(0,a.createContext)({});function L(e){return(0,a.useEffect)((()=>()=>e()),[])}const D=e=>e.key||"",I=({children:e,custom:t,initial:n=!0,onExitComplete:r,exitBeforeEnter:i,presenceAffectsLayout:s=!0,mode:o="sync"})=>{i&&(o="wait");let[l]=function(){const e=S(),[t,n]=(0,a.useState)(0),r=(0,a.useCallback)((()=>{e.current&&n(t+1)}),[t]);return[(0,a.useCallback)((()=>g.postRender(r)),[r]),t]}();const u=(0,a.useContext)(R).forceRender;u&&(l=u);const c=S(),h=function(e){const t=[];return a.Children.forEach(e,(e=>{(0,a.isValidElement)(e)&&t.push(e)})),t}(e);let d=h;const f=new Set,p=(0,a.useRef)(d),m=(0,a.useRef)(new Map).current,v=(0,a.useRef)(!0);if(M((()=>{v.current=!1,function(e,t){e.forEach((e=>{const n=D(e);t.set(n,e)}))}(h,m),p.current=d})),L((()=>{v.current=!0,m.clear(),f.clear()})),v.current)return a.createElement(a.Fragment,null,d.map((e=>a.createElement(B,{key:D(e),isPresent:!0,initial:!!n&&void 0,presenceAffectsLayout:s,mode:o},e))));d=[...d];const y=p.current.map(D),x=h.map(D),b=y.length;for(let e=0;e<b;e++){const t=y[e];-1===x.indexOf(t)&&f.add(t)}return"wait"===o&&f.size&&(d=[]),f.forEach((e=>{if(-1!==x.indexOf(e))return;const n=m.get(e);if(!n)return;const i=y.indexOf(e);d.splice(i,0,a.createElement(B,{key:D(n),isPresent:!1,onExitComplete:()=>{m.delete(e),f.delete(e);const t=p.current.findIndex((t=>t.key===e));if(p.current.splice(t,1),!f.size){if(p.current=h,!1===c.current)return;l(),r&&r()}},custom:t,presenceAffectsLayout:s,mode:o},n))})),d=d.map((e=>{const t=e.key;return f.has(t)?e:a.createElement(B,{key:D(e),isPresent:!0,presenceAffectsLayout:s,mode:o},e)})),a.createElement(a.Fragment,null,f.size?d:d.map((e=>(0,a.cloneElement)(e))))},k=(0,a.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),F=(0,a.createContext)({}),O=(0,a.createContext)({strict:!1});function N(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function z(e){return"string"==typeof e||Array.isArray(e)}function U(e){return"object"==typeof e&&"function"==typeof e.start}const G=["initial","animate","exit","whileHover","whileDrag","whileTap","whileFocus","whileInView"];function H(e){return U(e.animate)||G.some((t=>z(e[t])))}function V(e){return Boolean(H(e)||e.variants)}function W(e){return Array.isArray(e)?e.join(" "):e}const j=e=>({isEnabled:t=>e.some((e=>!!t[e]))}),J={measureLayout:j(["layout","layoutId","drag"]),animation:j(["animate","exit","variants","whileHover","whileTap","whileFocus","whileDrag","whileInView"]),exit:j(["exit"]),drag:j(["drag","dragControls"]),focus:j(["whileFocus"]),hover:j(["whileHover","onHoverStart","onHoverEnd"]),tap:j(["whileTap","onTap","onTapStart","onTapCancel"]),pan:j(["onPan","onPanStart","onPanSessionStart","onPanEnd"]),inView:j(["whileInView","onViewportEnter","onViewportLeave"])},X={hasAnimatedSinceResize:!0,hasEverUpdated:!1};let Y=1;class K extends a.Component{getSnapshotBeforeUpdate(){const{visualElement:e,props:t}=this.props;return e&&e.setProps(t),null}componentDidUpdate(){}render(){return this.props.children}}const q=(0,a.createContext)({}),Q=Symbol.for("motionComponentSymbol");function Z({preloadedFeatures:e,createVisualElement:t,projectionNodeConstructor:n,useRender:r,useVisualState:i,Component:s}){e&&function(e){for(const t in e)"projectionNodeConstructor"===t?J.projectionNodeConstructor=e[t]:J[t].Component=e[t]}(e);const o=(0,a.forwardRef)((function(o,l){const u={...(0,a.useContext)(k),...o,layoutId:$(o)},{isStatic:c}=u;let h=null;const d=function(e){const{initial:t,animate:n}=function(e,t){if(H(e)){const{initial:t,animate:n}=e;return{initial:!1===t||z(t)?t:void 0,animate:z(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,a.useContext)(F));return(0,a.useMemo)((()=>({initial:t,animate:n})),[W(t),W(n)])}(o),f=c?void 0:C((()=>{if(X.hasEverUpdated)return Y++})),p=i(o,c);if(!c&&w){d.visualElement=function(e,t,n,r){const i=(0,a.useContext)(F).visualElement,s=(0,a.useContext)(O),o=(0,a.useContext)(A),l=(0,a.useContext)(k).reducedMotion,u=(0,a.useRef)();r=r||s.renderer,!u.current&&r&&(u.current=r(e,{visualState:t,parent:i,props:n,presenceId:o?o.id:void 0,blockInitialAnimation:!!o&&!1===o.initial,reducedMotionConfig:l}));const c=u.current;return M((()=>{c&&c.render()})),(window.HandoffAppearAnimations?M:a.useEffect)((()=>{c&&c.animationState&&c.animationState.animateChanges()})),c}(s,p,u,t);const r=(0,a.useContext)(O).strict,i=(0,a.useContext)(q);d.visualElement&&(h=d.visualElement.loadFeatures(u,r,e,f,n||J.projectionNodeConstructor,i))}return a.createElement(K,{visualElement:d.visualElement,props:u},h,a.createElement(F.Provider,{value:d},r(s,o,f,function(e,t,n){return(0,a.useCallback)((r=>{r&&e.mount&&e.mount(r),t&&(r?t.mount(r):t.unmount()),n&&("function"==typeof n?n(r):N(n)&&(n.current=r))}),[t])}(p,d.visualElement,l),p,c,d.visualElement)))}));return o[Q]=s,o}function $({layoutId:e}){const t=(0,a.useContext)(R).id;return t&&void 0!==e?t+"-"+e:e}function ee(e){function t(t,n={}){return Z(e(t,n))}if("undefined"==typeof Proxy)return t;const n=new Map;return new Proxy(t,{get:(e,r)=>(n.has(r)||n.set(r,t(r)),n.get(r))})}const te=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function ne(e){return"string"==typeof e&&!e.includes("-")&&!!(te.indexOf(e)>-1||/[A-Z]/.test(e))}const re={},ie=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],ae=new Set(ie);function se(e,{layout:t,layoutId:n}){return ae.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!re[e]||"opacity"===e)}const oe=e=>!!(null==e?void 0:e.getVelocity),le={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},ue=(e,t)=>ie.indexOf(e)-ie.indexOf(t);function ce(e){return e.startsWith("--")}const he=(e,t)=>t&&"number"==typeof e?t.transform(e):e,de=(e,t,n)=>Math.min(Math.max(n,e),t),fe={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},pe={...fe,transform:e=>de(0,1,e)},me={...fe,default:1},ge=e=>Math.round(1e5*e)/1e5,ve=/(-)?([\d]*\.?[\d])+/g,ye=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,xe=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function be(e){return"string"==typeof e}const _e=e=>({test:t=>be(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),we=_e("deg"),Me=_e("%"),Se=_e("px"),Ae=_e("vh"),Ce=_e("vw"),Ee={...Me,parse:e=>Me.parse(e)/100,transform:e=>Me.transform(100*e)},Te={...fe,transform:Math.round},Be={borderWidth:Se,borderTopWidth:Se,borderRightWidth:Se,borderBottomWidth:Se,borderLeftWidth:Se,borderRadius:Se,radius:Se,borderTopLeftRadius:Se,borderTopRightRadius:Se,borderBottomRightRadius:Se,borderBottomLeftRadius:Se,width:Se,maxWidth:Se,height:Se,maxHeight:Se,size:Se,top:Se,right:Se,bottom:Se,left:Se,padding:Se,paddingTop:Se,paddingRight:Se,paddingBottom:Se,paddingLeft:Se,margin:Se,marginTop:Se,marginRight:Se,marginBottom:Se,marginLeft:Se,rotate:we,rotateX:we,rotateY:we,rotateZ:we,scale:me,scaleX:me,scaleY:me,scaleZ:me,skew:we,skewX:we,skewY:we,distance:Se,translateX:Se,translateY:Se,translateZ:Se,x:Se,y:Se,z:Se,perspective:Se,transformPerspective:Se,opacity:pe,originX:Ee,originY:Ee,originZ:Se,zIndex:Te,fillOpacity:pe,strokeOpacity:pe,numOctaves:Te};function Pe(e,t,n,r){const{style:i,vars:a,transform:s,transformKeys:o,transformOrigin:l}=e;o.length=0;let u=!1,c=!1,h=!0;for(const e in t){const n=t[e];if(ce(e)){a[e]=n;continue}const r=Be[e],d=he(n,r);if(ae.has(e)){if(u=!0,s[e]=d,o.push(e),!h)continue;n!==(r.default||0)&&(h=!1)}else e.startsWith("origin")?(c=!0,l[e]=d):i[e]=d}if(t.transform||(u||r?i.transform=function({transform:e,transformKeys:t},{enableHardwareAcceleration:n=!0,allowTransformNone:r=!0},i,a){let s="";t.sort(ue);for(const n of t)s+=`${le[n]||n}(${e[n]}) `;return n&&!e.z&&(s+="translateZ(0)"),s=s.trim(),a?s=a(e,i?"":s):r&&i&&(s="none"),s}(e,n,h,r):i.transform&&(i.transform="none")),c){const{originX:e="50%",originY:t="50%",originZ:n=0}=l;i.transformOrigin=`${e} ${t} ${n}`}}function Re(e,t,n){for(const r in t)oe(t[r])||se(r,n)||(e[r]=t[r])}function Le(e,t,n){const r={},i=function(e,t,n){const r={};return Re(r,e.style||{},e),Object.assign(r,function({transformTemplate:e},t,n){return(0,a.useMemo)((()=>{const r={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}};return Pe(r,t,{enableHardwareAcceleration:!n},e),Object.assign({},r.vars,r.style)}),[t])}(e,t,n)),e.transformValues?e.transformValues(r):r}(e,t,n);return e.drag&&!1!==e.dragListener&&(r.draggable=!1,i.userSelect=i.WebkitUserSelect=i.WebkitTouchCallout="none",i.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),r.style=i,r}const De=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onLayoutAnimationStart","onLayoutAnimationComplete","onLayoutMeasure","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","viewport"]);function Ie(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||De.has(e)}let ke=e=>!Ie(e);try{(Fe=require("@emotion/is-prop-valid").default)&&(ke=e=>e.startsWith("on")?!Ie(e):Fe(e))}catch(e){}var Fe;function Oe(e,t,n){return"string"==typeof e?e:Se.transform(t+n*e)}const Ne={offset:"stroke-dashoffset",array:"stroke-dasharray"},ze={offset:"strokeDashoffset",array:"strokeDasharray"};function Ue(e,{attrX:t,attrY:n,originX:r,originY:i,pathLength:a,pathSpacing:s=1,pathOffset:o=0,...l},u,c,h){if(Pe(e,l,u,h),c)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:d,style:f,dimensions:p}=e;d.transform&&(p&&(f.transform=d.transform),delete d.transform),p&&(void 0!==r||void 0!==i||f.transform)&&(f.transformOrigin=function(e,t,n){return`${Oe(t,e.x,e.width)} ${Oe(n,e.y,e.height)}`}(p,void 0!==r?r:.5,void 0!==i?i:.5)),void 0!==t&&(d.x=t),void 0!==n&&(d.y=n),void 0!==a&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?Ne:ze;e[a.offset]=Se.transform(-r);const s=Se.transform(t),o=Se.transform(n);e[a.array]=`${s} ${o}`}(d,a,s,o,!1)}const Ge=e=>"string"==typeof e&&"svg"===e.toLowerCase();function He(e,t,n,r){const i=(0,a.useMemo)((()=>{const n={style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}};return Ue(n,t,{enableHardwareAcceleration:!1},Ge(r),e.transformTemplate),{...n.attrs,style:{...n.style}}}),[t]);if(e.style){const t={};Re(t,e.style,e),i.style={...t,...i.style}}return i}function Ve(e=!1){return(t,n,r,i,{latestValues:s},o)=>{const l=(ne(t)?He:Le)(n,s,o,t),u=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(ke(i)||!0===n&&Ie(i)||!t&&!Ie(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(n,"string"==typeof t,e),c={...u,...l,ref:i},{children:h}=n,d=(0,a.useMemo)((()=>oe(h)?h.get():h),[h]);return r&&(c["data-projection-id"]=r),(0,a.createElement)(t,{...c,children:d})}}const We=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function je(e,{style:t,vars:n},r,i){Object.assign(e.style,t,i&&i.getProjectionStyles(r));for(const t in n)e.style.setProperty(t,n[t])}const Je=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function Xe(e,t,n,r){je(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Je.has(n)?n:We(n),t.attrs[n])}function Ye(e,t){const{style:n}=e,r={};for(const i in n)(oe(n[i])||t.style&&oe(t.style[i])||se(i,e))&&(r[i]=n[i]);return r}function Ke(e,t){const n=Ye(e,t);for(const r in e)(oe(e[r])||oe(t[r]))&&(n["x"===r||"y"===r?"attr"+r.toUpperCase():r]=e[r]);return n}function qe(e,t,n,r={},i={}){return"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,i)),"string"==typeof t&&(t=e.variants&&e.variants[t]),"function"==typeof t&&(t=t(void 0!==n?n:e.custom,r,i)),t}const Qe=e=>Array.isArray(e);function Ze(e){const t=oe(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const $e=e=>(t,n)=>{const r=(0,a.useContext)(F),i=(0,a.useContext)(A),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const s={latestValues:et(r,i,a,e),renderState:t()};return n&&(s.mount=e=>n(r,e,s)),s}(e,t,r,i);return n?s():C(s)};function et(e,t,n,r){const i={},a=r(e,{});for(const e in a)i[e]=Ze(a[e]);let{initial:s,animate:o}=e;const l=H(e),u=V(e);t&&u&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===o&&(o=t.animate));let c=!!n&&!1===n.initial;c=c||!1===s;const h=c?o:s;return h&&"boolean"!=typeof h&&!U(h)&&(Array.isArray(h)?h:[h]).forEach((t=>{const n=qe(e,t);if(!n)return;const{transitionEnd:r,transition:a,...s}=n;for(const e in s){let t=s[e];Array.isArray(t)&&(t=t[c?t.length-1:0]),null!==t&&(i[e]=t)}for(const e in r)i[e]=r[e]})),i}const tt={useVisualState:$e({scrapeMotionValuesFromProps:Ke,createRenderState:()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{},attrs:{}}),onMount:(e,t,{renderState:n,latestValues:r})=>{try{n.dimensions="function"==typeof t.getBBox?t.getBBox():t.getBoundingClientRect()}catch(e){n.dimensions={x:0,y:0,width:0,height:0}}Ue(n,r,{enableHardwareAcceleration:!1},Ge(t.tagName),e.transformTemplate),Xe(t,n)}})},nt={useVisualState:$e({scrapeMotionValuesFromProps:Ye,createRenderState:()=>({style:{},transform:{},transformKeys:[],transformOrigin:{},vars:{}})})};var rt;function it(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}function at(e,t,n,r){(0,a.useEffect)((()=>{const i=e.current;if(n&&i)return it(i,t,n,r)}),[e,t,n,r])}!function(e){e.Animate="animate",e.Hover="whileHover",e.Tap="whileTap",e.Drag="whileDrag",e.Focus="whileFocus",e.InView="whileInView",e.Exit="exit"}(rt||(rt={}));const st=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function ot(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}const lt=e=>t=>st(t)&&e(t,ot(t));function ut(e,t,n,r){return it(e,t,lt(n),r)}function ct(e,t,n,r){return at(e,t,n&<(n),r)}function ht(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}const dt=ht("dragHorizontal"),ft=ht("dragVertical");function pt(e){let t=!1;if("y"===e)t=ft();else if("x"===e)t=dt();else{const e=dt(),n=ft();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function mt(){const e=pt(!0);return!e||(e(),!1)}function gt(e,t,n,r){return(i,a)=>{"touch"===i.type||mt()||(n&&e.animationState&&e.animationState.setActive(rt.Hover,t),r&&r(i,a))}}const vt=(e,t)=>!!t&&(e===t||vt(e,t.parentElement)),yt=(e,t)=>n=>t(e(n)),xt=(...e)=>e.reduce(yt),bt=new WeakMap,_t=new WeakMap,wt=e=>{const t=bt.get(e.target);t&&t(e)},Mt=e=>{e.forEach(wt)};const St={some:0,all:1};function At(e,t,n,{root:r,margin:i,amount:s="some",once:o}){(0,a.useEffect)((()=>{if(!e||!n.current)return;const a={root:null==r?void 0:r.current,rootMargin:i,threshold:"number"==typeof s?s:St[s]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;_t.has(n)||_t.set(n,{});const r=_t.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(Mt,{root:e,...t})),r[i]}(t);return bt.set(e,n),r.observe(e),()=>{bt.delete(e),r.unobserve(e)}}(n.current,a,(e=>{const{isIntersecting:r}=e;if(t.isInView===r)return;if(t.isInView=r,o&&!r&&t.hasEnteredView)return;r&&(t.hasEnteredView=!0),n.animationState&&n.animationState.setActive(rt.InView,r);const i=n.getProps(),a=r?i.onViewportEnter:i.onViewportLeave;a&&a(e)}))}),[e,r,i,s])}function Ct(e,t,n,{fallback:r=!0}){(0,a.useEffect)((()=>{e&&r&&requestAnimationFrame((()=>{t.hasEnteredView=!0;const{onViewportEnter:e}=n.getProps();e&&e(null),n.animationState&&n.animationState.setActive(rt.InView,!0)}))}),[e])}const Et=e=>t=>(e(t),null),Tt={inView:Et((function({visualElement:e,whileInView:t,onViewportEnter:n,onViewportLeave:r,viewport:i={}}){const s=(0,a.useRef)({hasEnteredView:!1,isInView:!1});let o=Boolean(t||n||r);i.once&&s.current.hasEnteredView&&(o=!1),("undefined"==typeof IntersectionObserver?Ct:At)(o,s.current,e,i)})),tap:Et((function({onTap:e,onTapStart:t,onTapCancel:n,whileTap:r,visualElement:i,...s}){const o=e||t||n||r,l=(0,a.useRef)(!1),u=(0,a.useRef)(null),c={passive:!(t||e||n||s.onPointerDown)};function h(){u.current&&u.current(),u.current=null}function d(){return h(),l.current=!1,i.getProps().whileTap&&i.animationState&&i.animationState.setActive(rt.Tap,!1),!mt()}function f(e,t){var n,r,a,s;d()&&(vt(i.current,e.target)?null===(s=(a=i.getProps()).onTap)||void 0===s||s.call(a,e,t):null===(r=(n=i.getProps()).onTapCancel)||void 0===r||r.call(n,e,t))}function p(e,t){var n,r;d()&&(null===(r=(n=i.getProps()).onTapCancel)||void 0===r||r.call(n,e,t))}const m=(0,a.useCallback)(((e,t)=>{var n;if(h(),l.current)return;l.current=!0,u.current=xt(ut(window,"pointerup",f,c),ut(window,"pointercancel",p,c));const r=i.getProps();r.whileTap&&i.animationState&&i.animationState.setActive(rt.Tap,!0),null===(n=r.onTapStart)||void 0===n||n.call(r,e,t)}),[Boolean(t),i]);ct(i,"pointerdown",o?m:void 0,c),L(h)})),focus:Et((function({whileFocus:e,visualElement:t}){const{animationState:n}=t,r=(0,a.useCallback)((()=>{n&&n.setActive(rt.Focus,!0)}),[n]),i=(0,a.useCallback)((()=>{n&&n.setActive(rt.Focus,!1)}),[n]);at(t,"focus",e?r:void 0),at(t,"blur",e?i:void 0)})),hover:Et((function({onHoverStart:e,onHoverEnd:t,whileHover:n,visualElement:r}){ct(r,"pointerenter",(0,a.useMemo)((()=>e||n?gt(r,!0,Boolean(n),e):void 0),[e,Boolean(n),r]),{passive:!e}),ct(r,"pointerleave",(0,a.useMemo)((()=>t||n?gt(r,!1,Boolean(n),t):void 0),[e,Boolean(n),r]),{passive:!t})}))};function Bt(){const e=(0,a.useContext)(A);if(null===e)return[!0,null];const{isPresent:t,onExitComplete:n,register:r}=e,i=(0,a.useId)();return(0,a.useEffect)((()=>r(i)),[]),!t&&n?[!1,()=>n&&n(i)]:[!0]}function Pt(e,t){if(!Array.isArray(t))return!1;const n=t.length;if(n!==e.length)return!1;for(let r=0;r<n;r++)if(t[r]!==e[r])return!1;return!0}function Rt(e,t){-1===e.indexOf(t)&&e.push(t)}function Lt(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class Dt{constructor(){this.subscriptions=[]}add(e){return Rt(this.subscriptions,e),()=>Lt(this.subscriptions,e)}notify(e,t,n){const r=this.subscriptions.length;if(r)if(1===r)this.subscriptions[0](e,t,n);else for(let i=0;i<r;i++){const r=this.subscriptions[i];r&&r(e,t,n)}}getSize(){return this.subscriptions.length}clear(){this.subscriptions.length=0}}function It(e,t){return t?e*(1e3/t):0}class kt{constructor(e,t={}){var n;this.version="8.5.5",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(e,t=!0)=>{this.prev=this.current,this.current=e;const{delta:n,timestamp:r}=c;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,g.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),t&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>g.postRender(this.velocityCheck),this.velocityCheck=({timestamp:e})=>{e!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=(n=this.current,!isNaN(parseFloat(n))),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new Dt);const n=this.events[e].add(t);return"change"===e?()=>{n(),g.read((()=>{this.events.change.getSize()||this.stop()}))}:n}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){t&&this.passiveEffect?this.passiveEffect(e,this.updateAndNotify):this.updateAndNotify(e,t)}setWithVelocity(e,t,n){this.set(t),this.prev=e,this.timeDelta=n}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?It(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t)||null,this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){this.animation=null}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Ft(e,t){return new kt(e,t)}const Ot=(e,t)=>n=>Boolean(be(n)&&xe.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Nt=(e,t,n)=>r=>{if(!be(r))return r;const[i,a,s,o]=r.match(ve);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(s),alpha:void 0!==o?parseFloat(o):1}},zt={...fe,transform:e=>Math.round((e=>de(0,255,e))(e))},Ut={test:Ot("rgb","red"),parse:Nt("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+zt.transform(e)+", "+zt.transform(t)+", "+zt.transform(n)+", "+ge(pe.transform(r))+")"},Gt={test:Ot("#"),parse:function(e){let t="",n="",r="",i="";return e.length>5?(t=e.substring(1,3),n=e.substring(3,5),r=e.substring(5,7),i=e.substring(7,9)):(t=e.substring(1,2),n=e.substring(2,3),r=e.substring(3,4),i=e.substring(4,5),t+=t,n+=n,r+=r,i+=i),{red:parseInt(t,16),green:parseInt(n,16),blue:parseInt(r,16),alpha:i?parseInt(i,16)/255:1}},transform:Ut.transform},Ht={test:Ot("hsl","hue"),parse:Nt("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+Me.transform(ge(t))+", "+Me.transform(ge(n))+", "+ge(pe.transform(r))+")"},Vt={test:e=>Ut.test(e)||Gt.test(e)||Ht.test(e),parse:e=>Ut.test(e)?Ut.parse(e):Ht.test(e)?Ht.parse(e):Gt.parse(e),transform:e=>be(e)?e:e.hasOwnProperty("red")?Ut.transform(e):Ht.transform(e)},Wt="${c}",jt="${n}";function Jt(e){"number"==typeof e&&(e=`${e}`);const t=[];let n=0,r=0;const i=e.match(ye);i&&(n=i.length,e=e.replace(ye,Wt),t.push(...i.map(Vt.parse)));const a=e.match(ve);return a&&(r=a.length,e=e.replace(ve,jt),t.push(...a.map(fe.parse))),{values:t,numColors:n,numNumbers:r,tokenised:e}}function Xt(e){return Jt(e).values}function Yt(e){const{values:t,numColors:n,tokenised:r}=Jt(e),i=t.length;return e=>{let t=r;for(let r=0;r<i;r++)t=t.replace(r<n?Wt:jt,r<n?Vt.transform(e[r]):ge(e[r]));return t}}const Kt=e=>"number"==typeof e?0:e,qt={test:function(e){var t,n;return isNaN(e)&&be(e)&&((null===(t=e.match(ve))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(ye))||void 0===n?void 0:n.length)||0)>0},parse:Xt,createTransformer:Yt,getAnimatableNone:function(e){const t=Xt(e);return Yt(e)(t.map(Kt))}},Qt=new Set(["brightness","contrast","saturate","opacity"]);function Zt(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ve)||[];if(!r)return e;const i=n.replace(r,"");let a=Qt.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const $t=/([a-z-]*)\(.*?\)/g,en={...qt,getAnimatableNone:e=>{const t=e.match($t);return t?t.map(Zt).join(" "):e}},tn={...Be,color:Vt,backgroundColor:Vt,outlineColor:Vt,fill:Vt,stroke:Vt,borderColor:Vt,borderTopColor:Vt,borderRightColor:Vt,borderBottomColor:Vt,borderLeftColor:Vt,filter:en,WebkitFilter:en},nn=e=>tn[e];function rn(e,t){var n;let r=nn(e);return r!==en&&(r=qt),null===(n=r.getAnimatableNone)||void 0===n?void 0:n.call(r,t)}const an=e=>t=>t.test(e),sn=[fe,Se,Me,we,Ce,Ae,{test:e=>"auto"===e,parse:e=>e}],on=e=>sn.find(an(e)),ln=[...sn,Vt,qt],un=e=>ln.find(an(e));function cn(e,t,n){const r=e.getProps();return qe(r,t,void 0!==n?n:r.custom,function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.get())),t}(e),function(e){const t={};return e.values.forEach(((e,n)=>t[n]=e.getVelocity())),t}(e))}function hn(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,Ft(n))}function dn(e,t){if(t)return(t[e]||t.default||t).from}function fn(e){return Boolean(oe(e)&&e.add)}const pn="data-"+We("framerAppearId"),mn=e=>1e3*e,gn=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,vn=e=>t=>1-e(1-t),yn=e=>e*e,xn=vn(yn),bn=gn(yn),_n=(e,t,n)=>-n*e+n*t+e;function wn(e,t,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?e+6*(t-e)*n:n<.5?t:n<2/3?e+(t-e)*(2/3-n)*6:e}const Mn=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},Sn=[Gt,Ut,Ht];function An(e){const t=(n=e,Sn.find((e=>e.test(n))));var n;Boolean(t);let r=t.parse(e);return t===Ht&&(r=function({hue:e,saturation:t,lightness:n,alpha:r}){e/=360,n/=100;let i=0,a=0,s=0;if(t/=100){const r=n<.5?n*(1+t):n+t-n*t,o=2*n-r;i=wn(o,r,e+1/3),a=wn(o,r,e),s=wn(o,r,e-1/3)}else i=a=s=n;return{red:Math.round(255*i),green:Math.round(255*a),blue:Math.round(255*s),alpha:r}}(r)),r}const Cn=(e,t)=>{const n=An(e),r=An(t),i={...n};return e=>(i.red=Mn(n.red,r.red,e),i.green=Mn(n.green,r.green,e),i.blue=Mn(n.blue,r.blue,e),i.alpha=_n(n.alpha,r.alpha,e),Ut.transform(i))};function En(e,t){return"number"==typeof e?n=>_n(e,t,n):Vt.test(e)?Cn(e,t):Pn(e,t)}const Tn=(e,t)=>{const n=[...e],r=n.length,i=e.map(((e,n)=>En(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}},Bn=(e,t)=>{const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=En(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}},Pn=(e,t)=>{const n=qt.createTransformer(t),r=Jt(e),i=Jt(t);return r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?xt(Tn(r.values,i.values),n):n=>`${n>0?t:e}`},Rn=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},Ln=(e,t)=>n=>_n(e,t,n);function Dn(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;t.length,!r||!Array.isArray(r)||r.length,e[0]>e[a-1]&&(e=[...e].reverse(),t=[...t].reverse());const s=function(e,t,n){const r=[],i=n||("number"==typeof(a=e[0])?Ln:"string"==typeof a?Vt.test(a)?Cn:Pn:Array.isArray(a)?Tn:"object"==typeof a?Bn:Ln);var a;const s=e.length-1;for(let n=0;n<s;n++){let a=i(e[n],e[n+1]);if(t){const e=Array.isArray(t)?t[n]:t;a=xt(e,a)}r.push(a)}return r}(t,r,i),o=s.length,l=t=>{let n=0;if(o>1)for(;n<e.length-2&&!(t<e[n+1]);n++);const r=Rn(e[n],e[n+1],t);return s[n](r)};return n?t=>l(de(e[0],e[a-1],t)):l}const In=e=>e,kn=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Fn(e,t,n,r){if(e===t&&n===r)return In;return i=>0===i||1===i?i:kn(function(e,t,n,r,i){let a,s,o=0;do{s=t+(n-t)/2,a=kn(s,r,i)-e,a>0?n=s:t=s}while(Math.abs(a)>1e-7&&++o<12);return s}(i,0,1,e,n),t,r)}const On=e=>1-Math.sin(Math.acos(e)),Nn=vn(On),zn=gn(Nn),Un=Fn(.33,1.53,.69,.99),Gn=vn(Un),Hn=gn(Gn),Vn={linear:In,easeIn:yn,easeInOut:bn,easeOut:xn,circIn:On,circInOut:zn,circOut:Nn,backIn:Gn,backInOut:Hn,backOut:Un,anticipate:e=>(e*=2)<1?.5*Gn(e):.5*(2-Math.pow(2,-10*(e-1)))},Wn=e=>{if(Array.isArray(e)){e.length;const[t,n,r,i]=e;return Fn(t,n,r,i)}return"string"==typeof e?Vn[e]:e};function jn({keyframes:e,ease:t=bn,times:n,duration:r=300}){e=[...e];const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(t)?t.map(Wn):Wn(t),a={done:!1,value:e[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===e.length?n:function(e){const t=e.length;return e.map(((e,n)=>0!==n?n/(t-1):0))}(e),r);function o(){return Dn(s,e,{ease:Array.isArray(i)?i:(t=e,n=i,t.map((()=>n||bn)).splice(0,t.length-1))});var t,n}let l=o();return{next:e=>(a.value=l(e),a.done=e>=r,a),flipTarget:()=>{e.reverse(),l=o()}}}function Jn(e,t){return e*Math.sqrt(1-t*t)}const Xn=["duration","bounce"],Yn=["stiffness","damping","mass"];function Kn(e,t){return t.some((t=>void 0!==e[t]))}function qn({keyframes:e,restDelta:t,restSpeed:n,...r}){let i=e[0],a=e[e.length-1];const s={done:!1,value:i},{stiffness:o,damping:l,mass:u,velocity:c,duration:h,isResolvedFromDuration:d}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!Kn(e,Yn)&&Kn(e,Xn)){const n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a,s=1-t;s=de(.05,1,s),e=de(.01,10,e/1e3),s<1?(i=t=>{const r=t*s,i=r*e;return.001-(r-n)/Jn(t,s)*Math.exp(-i)},a=t=>{const r=t*s*e,a=r*n+n,o=Math.pow(s,2)*Math.pow(t,2)*e,l=Math.exp(-r),u=Jn(Math.pow(t,2),s);return(.001-i(t)>0?-1:1)*((a-o)*l)/u}):(i=t=>Math.exp(-t*e)*((t-n)*e+1)-.001,a=t=>Math.exp(-t*e)*(e*e*(n-t)));const o=function(e,t,n){let r=n;for(let n=1;n<12;n++)r-=e(r)/t(r);return r}(i,a,5/e);if(e*=1e3,isNaN(o))return{stiffness:100,damping:10,duration:e};{const t=Math.pow(o,2)*r;return{stiffness:t,damping:2*s*Math.sqrt(r*t),duration:e}}}(e);t={...t,...n,velocity:0,mass:1},t.isResolvedFromDuration=!0}return t}(r);let f=Qn,p=c?-c/1e3:0;const m=l/(2*Math.sqrt(o*u));function g(){const e=a-i,r=Math.sqrt(o/u)/1e3,s=Math.abs(e)<5;if(n||(n=s?.01:2),t||(t=s?.005:.5),m<1){const t=Jn(r,m);f=n=>{const i=Math.exp(-m*r*n);return a-i*((p+m*r*e)/t*Math.sin(t*n)+e*Math.cos(t*n))}}else if(1===m)f=t=>a-Math.exp(-r*t)*(e+(p+r*e)*t);else{const t=r*Math.sqrt(m*m-1);f=n=>{const i=Math.exp(-m*r*n),s=Math.min(t*n,300);return a-i*((p+m*r*e)*Math.sinh(s)+t*e*Math.cosh(s))/t}}}return g(),{next:e=>{const r=f(e);if(d)s.done=e>=h;else{let i=p;if(0!==e)if(m<1){const t=Math.max(0,e-5);i=It(r-f(t),e-t)}else i=0;const o=Math.abs(i)<=n,l=Math.abs(a-r)<=t;s.done=o&&l}return s.value=s.done?a:r,s},flipTarget:()=>{p=-p,[i,a]=[a,i],g()}}}qn.needsInterpolation=(e,t)=>"string"==typeof e||"string"==typeof t;const Qn=e=>0,Zn={decay:function({keyframes:e=[0],velocity:t=0,power:n=.8,timeConstant:r=350,restDelta:i=.5,modifyTarget:a}){const s=e[0],o={done:!1,value:s};let l=n*t;const u=s+l,c=void 0===a?u:a(u);return c!==u&&(l=c-s),{next:e=>{const t=-l*Math.exp(-e/r);return o.done=!(t>i||t<-i),o.value=o.done?c:c+t,o},flipTarget:()=>{}}},keyframes:jn,tween:jn,spring:qn};function $n(e,t,n=0){return e-t-n}const er=e=>{const t=({delta:t})=>e(t);return{start:()=>g.update(t,!0),stop:()=>v.update(t)}};function tr({duration:e,driver:t=er,elapsed:n=0,repeat:r=0,repeatType:i="loop",repeatDelay:a=0,keyframes:s,autoplay:o=!0,onPlay:l,onStop:u,onComplete:c,onRepeat:h,onUpdate:d,type:f="keyframes",...p}){var m,g;const v=n;let y,x,b=0,_=e,w=!1,M=!0;const S=Zn[s.length>2?"keyframes":f]||jn,A=s[0],C=s[s.length-1];let E={done:!1,value:A};(null===(g=(m=S).needsInterpolation)||void 0===g?void 0:g.call(m,A,C))&&(x=Dn([0,100],[A,C],{clamp:!1}),s=[0,100]);const T=S({...p,duration:e,keyframes:s});function B(e){M||(e=-e),n+=e,w||(E=T.next(Math.max(0,n)),x&&(E.value=x(E.value)),w=M?E.done:n<=0),d&&d(E.value),w&&(0===b&&(_=void 0!==_?_:n),b<r?function(e,t,n,r){return r?e>=t+n:e<=-n}(n,_,a,M)&&(b++,"reverse"===i?(M=b%2==0,n=function(e,t=0,n=0,r=!0){return r?$n(t+-e,t,n):t-(e-t)+n}(n,_,a,M)):(n=$n(n,_,a),"mirror"===i&&T.flipTarget()),w=!1,h&&h()):(y&&y.stop(),c&&c()))}return o&&(l&&l(),y=t(B),y.start()),{stop:()=>{u&&u(),y&&y.stop()},set currentTime(e){n=v,B(e)},sample:t=>{n=v;const r=e&&"number"==typeof e?Math.max(.5*e,50):50;let i=0;for(B(0);i<=t;){const e=t-i;B(Math.min(e,r)),i+=r}return E}}}const nr=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,rr={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:nr([0,.65,.55,1]),circOut:nr([.55,0,1,.45]),backIn:nr([.31,.01,.66,-.59]),backOut:nr([.33,1.53,.69,.99])};function ir(e){if(e)return Array.isArray(e)?nr(e):rr[e]}const ar={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},sr={},or={};for(const e in ar)or[e]=()=>(void 0===sr[e]&&(sr[e]=ar[e]()),sr[e]);const lr=new Set(["opacity"]);function ur(e,t){const n=performance.now(),r=({timestamp:i})=>{const a=i-n;a>=t&&(v.read(r),e(a-t))};return g.read(r,!0),()=>v.read(r)}function cr({keyframes:e,elapsed:t,onUpdate:n,onComplete:r}){const i=()=>{n&&n(e[e.length-1]),r&&r()};return t?{stop:ur(i,-t)}:i()}const hr=()=>({type:"spring",stiffness:500,damping:25,restSpeed:10}),dr=e=>({type:"spring",stiffness:550,damping:0===e?2*Math.sqrt(550):30,restSpeed:10}),fr=()=>({type:"keyframes",ease:"linear",duration:.3}),pr={type:"keyframes",duration:.8},mr={x:hr,y:hr,z:hr,rotate:hr,rotateX:hr,rotateY:hr,rotateZ:hr,scaleX:dr,scaleY:dr,scale:dr,opacity:fr,backgroundColor:fr,color:fr,default:dr},gr=(e,{keyframes:t})=>t.length>2?pr:(mr[e]||mr.default)(t[1]),vr=(e,t)=>!("zIndex"===e||"number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!qt.test(t)||t.startsWith("url(")));function yr(e){return 0===e||"string"==typeof e&&0===parseFloat(e)&&-1===e.indexOf(" ")}function xr(e){return"number"==typeof e?0:rn("",e)}function br(e,t){return e[t]||e.default||e}const _r=(e,t,n,r={})=>i=>{const a=br(r,e)||{},s=a.delay||r.delay||0;let{elapsed:o=0}=r;o-=mn(s);const l=function(e,t,n,r){const i=vr(t,n);let a=void 0!==r.from?r.from:e.get();return"none"===a&&i&&"string"==typeof n?a=rn(t,n):yr(a)&&"string"==typeof n?a=xr(n):!Array.isArray(n)&&yr(n)&&"string"==typeof a&&(n=xr(a)),Array.isArray(n)?(null===n[0]&&(n[0]=a),n):[a,n]}(t,e,n,a),u=l[0],h=l[l.length-1],d=vr(e,u),f=vr(e,h);let p={keyframes:l,velocity:t.getVelocity(),...a,elapsed:o,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(!d||!f||!1===a.type)return cr(p);if("inertia"===a.type)return function({keyframes:e,velocity:t=0,min:n,max:r,power:i=.8,timeConstant:a=750,bounceStiffness:s=500,bounceDamping:o=10,restDelta:l=1,modifyTarget:u,driver:h,onUpdate:d,onComplete:f,onStop:p}){const m=e[0];let g;function v(e){return void 0!==n&&e<n||void 0!==r&&e>r}function y(e){return void 0===n?r:void 0===r||Math.abs(n-e)<Math.abs(r-e)?n:r}function x(e){null==g||g.stop(),g=tr({keyframes:[0,1],velocity:0,...e,driver:h,onUpdate:t=>{var n;null==d||d(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:f,onStop:p})}function b(e){x({type:"spring",stiffness:s,damping:o,restDelta:l,...e})}if(v(m))b({velocity:t,keyframes:[m,y(m)]});else{let e=i*t+m;void 0!==u&&(e=u(e));const r=y(e),s=r===n?-1:1;let o,h;const d=e=>{o=h,h=e,t=It(e-o,c.delta),(1===s&&e>r||-1===s&&e<r)&&b({keyframes:[e,r],velocity:t})};x({type:"decay",keyframes:[m,0],velocity:t,timeConstant:a,power:i,restDelta:l,modifyTarget:u,onUpdate:v(e)?d:void 0})}return{stop:()=>null==g?void 0:g.stop()}}(p);(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:o,from:l,elapsed:u,...c}){return!!Object.keys(c).length})(a)||(p={...p,...gr(e,p)}),p.duration&&(p.duration=mn(p.duration)),p.repeatDelay&&(p.repeatDelay=mn(p.repeatDelay));const m=t.owner,v=m&&m.current;if(m&&v instanceof HTMLElement&&!(null==m?void 0:m.getProps().onUpdate)){const n=function(e,t,{onUpdate:n,onComplete:r,...i}){if(!or.waapi()||!lr.has(t)||i.repeatDelay||"mirror"===i.repeatType||0===i.damping)return!1;let{keyframes:a,duration:s=300,elapsed:o=0,ease:l}=i;if("spring"===i.type||!(!(u=i.ease)||Array.isArray(u)||"string"==typeof u&&rr[u])){if(i.repeat===1/0)return;const e=tr({...i,elapsed:0});let t={done:!1,value:a[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;a=n,s=r-10,l="linear"}var u;const c=function(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:s="loop",ease:o,times:l}={}){return e.animate({[t]:n,offset:l},{delay:r,duration:i,easing:ir(o),fill:"both",iterations:a+1,direction:"reverse"===s?"alternate":"normal"})}(e.owner.current,t,a,{...i,delay:-o,duration:s,ease:l});return c.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:n="loop"}){return e[t&&"loop"!==n&&t%2==1?0:e.length-1]}(a,i)),g.update((()=>c.cancel())),r&&r()},{get currentTime(){return c.currentTime||0},set currentTime(e){c.currentTime=e},stop:()=>{const{currentTime:t}=c;if(t){const n=tr({...i,autoplay:!1});e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}g.update((()=>c.cancel()))}}}(t,e,p);if(n)return n}return tr(p)};function wr(e,t,n={}){var r;const i=cn(e,t,n.custom);let{transition:a=e.getDefaultTransition()||{}}=i||{};n.transitionOverride&&(a=n.transitionOverride);const s=i?()=>Mr(e,i,n):()=>Promise.resolve(),o=(null===(r=e.variantChildren)||void 0===r?void 0:r.size)?(r=0)=>{const{delayChildren:i=0,staggerChildren:s,staggerDirection:o}=a;return function(e,t,n=0,r=0,i=1,a){const s=[],o=(e.variantChildren.size-1)*r,l=1===i?(e=0)=>e*r:(e=0)=>o-e*r;return Array.from(e.variantChildren).sort(Sr).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(wr(e,t,{...a,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,i+r,s,o,n)}:()=>Promise.resolve(),{when:l}=a;if(l){const[e,t]="beforeChildren"===l?[s,o]:[o,s];return e().then(t)}return Promise.all([s(),o(n.delay)])}function Mr(e,t,{delay:n=0,transitionOverride:r,type:i}={}){var a;let{transition:s=e.getDefaultTransition(),transitionEnd:o,...l}=e.makeTargetAnimatable(t);const u=e.getValue("willChange");r&&(s=r);const c=[],h=i&&(null===(a=e.animationState)||void 0===a?void 0:a.getState()[i]);for(const t in l){const r=e.getValue(t),i=l[t];if(!r||void 0===i||h&&Ar(h,t))continue;const a={delay:n,elapsed:0,...s};if(window.HandoffAppearAnimations&&!r.hasAnimated){const n=e.getProps()[pn];n&&(a.elapsed=window.HandoffAppearAnimations(n,t,r,g))}let o=r.start(_r(t,r,i,e.shouldReduceMotion&&ae.has(t)?{type:!1}:a));fn(u)&&(u.add(t),o=o.then((()=>u.remove(t)))),c.push(o)}return Promise.all(c).then((()=>{o&&function(e,t){const n=cn(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const t in a)hn(e,t,(s=a[t],Qe(s)?s[s.length-1]||0:s));var s}(e,o)}))}function Sr(e,t){return e.sortNodePosition(t)}function Ar({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}const Cr=[rt.Animate,rt.InView,rt.Focus,rt.Hover,rt.Tap,rt.Drag,rt.Exit],Er=[...Cr].reverse(),Tr=Cr.length;function Br(e){let t=function(e){return t=>Promise.all(t.map((({animation:t,options:n})=>function(e,t,n={}){let r;if(e.notify("AnimationStart",t),Array.isArray(t)){const i=t.map((t=>wr(e,t,n)));r=Promise.all(i)}else if("string"==typeof t)r=wr(e,t,n);else{const i="function"==typeof t?cn(e,t,n.custom):t;r=Mr(e,i,n)}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}(e);const n={[rt.Animate]:Pr(!0),[rt.InView]:Pr(),[rt.Hover]:Pr(),[rt.Tap]:Pr(),[rt.Drag]:Pr(),[rt.Focus]:Pr(),[rt.Exit]:Pr()};let r=!0;const i=(t,n)=>{const r=cn(e,n);if(r){const{transition:e,transitionEnd:n,...i}=r;t={...t,...i,...n}}return t};function a(a,s){const o=e.getProps(),l=e.getVariantContext(!0)||{},u=[],c=new Set;let h={},d=1/0;for(let t=0;t<Tr;t++){const m=Er[t],g=n[m],v=void 0!==o[m]?o[m]:l[m],y=z(v),x=m===s?g.isActive:null;!1===x&&(d=t);let b=v===l[m]&&v!==o[m]&&y;if(b&&r&&e.manuallyAnimateOnMount&&(b=!1),g.protectedKeys={...h},!g.isActive&&null===x||!v&&!g.prevProp||U(v)||"boolean"==typeof v)continue;const _=(f=g.prevProp,"string"==typeof(p=v)?p!==f:!!Array.isArray(p)&&!Pt(p,f));let w=_||m===s&&g.isActive&&!b&&y||t>d&&y;const M=Array.isArray(v)?v:[v];let S=M.reduce(i,{});!1===x&&(S={});const{prevResolvedValues:A={}}=g,C={...A,...S},E=e=>{w=!0,c.delete(e),g.needsAnimating[e]=!0};for(const e in C){const t=S[e],n=A[e];h.hasOwnProperty(e)||(t!==n?Qe(t)&&Qe(n)?!Pt(t,n)||_?E(e):g.protectedKeys[e]=!0:void 0!==t?E(e):c.add(e):void 0!==t&&c.has(e)?E(e):g.protectedKeys[e]=!0)}g.prevProp=v,g.prevResolvedValues=S,g.isActive&&(h={...h,...S}),r&&e.blockInitialAnimation&&(w=!1),w&&!b&&u.push(...M.map((e=>({animation:e,options:{type:m,...a}}))))}var f,p;if(c.size){const t={};c.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),u.push({animation:t})}let m=Boolean(u.length);return r&&!1===o.initial&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(u):Promise.resolve()}return{animateChanges:a,setActive:function(t,r,i){var s;if(n[t].isActive===r)return Promise.resolve();null===(s=e.variantChildren)||void 0===s||s.forEach((e=>{var n;return null===(n=e.animationState)||void 0===n?void 0:n.setActive(t,r)})),n[t].isActive=r;const o=a(i,t);for(const e in n)n[e].protectedKeys={};return o},setAnimateFunction:function(n){t=n(e)},getState:()=>n}}function Pr(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}const Rr={animation:Et((({visualElement:e,animate:t})=>{e.animationState||(e.animationState=Br(e)),U(t)&&(0,a.useEffect)((()=>t.subscribe(e)),[t])})),exit:Et((e=>{const{custom:t,visualElement:n}=e,[r,i]=Bt(),s=(0,a.useContext)(A);(0,a.useEffect)((()=>{n.isPresent=r;const e=n.animationState&&n.animationState.setActive(rt.Exit,!r,{custom:s&&s.custom||t});e&&!r&&e.then(i)}),[r])}))},Lr=(e,t)=>Math.abs(e-t);class Dr{constructor(e,t,{transformPagePoint:n}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.updatePoint=()=>{if(!this.lastMoveEvent||!this.lastMoveEventInfo)return;const e=Fr(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=Lr(e.x,t.x),r=Lr(e.y,t.y);return Math.sqrt(n**2+r**2)}(e.offset,{x:0,y:0})>=3;if(!t&&!n)return;const{point:r}=e,{timestamp:i}=c;this.history.push({...r,timestamp:i});const{onStart:a,onMove:s}=this.handlers;t||(a&&a(this.lastMoveEvent,e),this.startEvent=this.lastMoveEvent),s&&s(this.lastMoveEvent,e)},this.handlePointerMove=(e,t)=>{this.lastMoveEvent=e,this.lastMoveEventInfo=Ir(t,this.transformPagePoint),g.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,i=Fr("pointercancel"===e.type?this.lastMoveEventInfo:Ir(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!st(e))return;this.handlers=t,this.transformPagePoint=n;const r=Ir(ot(e),this.transformPagePoint),{point:i}=r,{timestamp:a}=c;this.history=[{...i,timestamp:a}];const{onSessionStart:s}=t;s&&s(e,Fr(r,this.history)),this.removeListeners=xt(ut(window,"pointermove",this.handlePointerMove),ut(window,"pointerup",this.handlePointerUp),ut(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),v.update(this.updatePoint)}}function Ir(e,t){return t?{point:t(e.point)}:e}function kr(e,t){return{x:e.x-t.x,y:e.y-t.y}}function Fr({point:e},t){return{point:e,delta:kr(e,Nr(t)),offset:kr(e,Or(t)),velocity:zr(t,.1)}}function Or(e){return e[0]}function Nr(e){return e[e.length-1]}function zr(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=Nr(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>mn(t)));)n--;if(!r)return{x:0,y:0};const a=(i.timestamp-r.timestamp)/1e3;if(0===a)return{x:0,y:0};const s={x:(i.x-r.x)/a,y:(i.y-r.y)/a};return s.x===1/0&&(s.x=0),s.y===1/0&&(s.y=0),s}function Ur(e){return e.max-e.min}function Gr(e,t=0,n=.01){return Math.abs(e-t)<=n}function Hr(e,t,n,r=.5){e.origin=r,e.originPoint=_n(t.min,t.max,e.origin),e.scale=Ur(n)/Ur(t),(Gr(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=_n(n.min,n.max,e.origin)-e.originPoint,(Gr(e.translate)||isNaN(e.translate))&&(e.translate=0)}function Vr(e,t,n,r){Hr(e.x,t.x,n.x,null==r?void 0:r.originX),Hr(e.y,t.y,n.y,null==r?void 0:r.originY)}function Wr(e,t,n){e.min=n.min+t.min,e.max=e.min+Ur(t)}function jr(e,t,n){e.min=t.min-n.min,e.max=e.min+Ur(t)}function Jr(e,t,n){jr(e.x,t.x,n.x),jr(e.y,t.y,n.y)}function Xr(e,t,n){return{min:void 0!==t?e.min+t:void 0,max:void 0!==n?e.max+n-(e.max-e.min):void 0}}function Yr(e,t){let n=t.min-e.min,r=t.max-e.max;return t.max-t.min<e.max-e.min&&([n,r]=[r,n]),{min:n,max:r}}const Kr=.35;function qr(e,t,n){return{min:Qr(e,t),max:Qr(e,n)}}function Qr(e,t){return"number"==typeof e?e:e[t]||0}function Zr(e){return[e("x"),e("y")]}function $r({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function ei(e){return void 0===e||1===e}function ti({scale:e,scaleX:t,scaleY:n}){return!ei(e)||!ei(t)||!ei(n)}function ni(e){return ti(e)||ri(e)||e.z||e.rotate||e.rotateX||e.rotateY}function ri(e){return ii(e.x)||ii(e.y)}function ii(e){return e&&"0%"!==e}function ai(e,t,n){return n+t*(e-n)}function si(e,t,n,r,i){return void 0!==i&&(e=ai(e,i,r)),ai(e,n,r)+t}function oi(e,t=0,n=1,r,i){e.min=si(e.min,t,n,r,i),e.max=si(e.max,t,n,r,i)}function li(e,{x:t,y:n}){oi(e.x,t.translate,t.scale,t.originPoint),oi(e.y,n.translate,n.scale,n.originPoint)}function ui(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function ci(e,t){e.min=e.min+t,e.max=e.max+t}function hi(e,t,[n,r,i]){const a=void 0!==t[i]?t[i]:.5,s=_n(e.min,e.max,a);oi(e,t[n],t[r],s,t.scale)}const di=["x","scaleX","originX"],fi=["y","scaleY","originY"];function pi(e,t){hi(e.x,t,di),hi(e.y,t,fi)}function mi(e,t){return $r(function(e,t){if(!t)return e;const n=t({x:e.left,y:e.top}),r=t({x:e.right,y:e.bottom});return{top:n.y,left:n.x,bottom:r.y,right:r.x}}(e.getBoundingClientRect(),t))}const gi=new WeakMap;class vi{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic={x:{min:0,max:0},y:{min:0,max:0}},this.visualElement=e}start(e,{snapToCursor:t=!1}={}){!1!==this.visualElement.isPresent&&(this.panSession=new Dr(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(ot(e,"page").point)},onStart:(e,t)=>{var n;const{drag:r,dragPropagation:i,onDragStart:a}=this.getProps();(!r||i||(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=pt(r),this.openGlobalLock))&&(this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Zr((e=>{var t,n;let r=this.getAxisMotionValue(e).get()||0;if(Me.test(r)){const i=null===(n=null===(t=this.visualElement.projection)||void 0===t?void 0:t.layout)||void 0===n?void 0:n.layoutBox[e];i&&(r=Ur(i)*(parseFloat(r)/100))}this.originPoint[e]=r})),null==a||a(e,t),null===(n=this.visualElement.animationState)||void 0===n||n.setActive(rt.Drag,!0))},onMove:(e,t)=>{const{dragPropagation:n,dragDirectionLock:r,onDirectionLock:i,onDrag:a}=this.getProps();if(!n&&!this.openGlobalLock)return;const{offset:s}=t;if(r&&null===this.currentDirection)return this.currentDirection=function(e,t=10){let n=null;return Math.abs(e.y)>t?n="y":Math.abs(e.x)>t&&(n="x"),n}(s),void(null!==this.currentDirection&&(null==i||i(this.currentDirection)));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),null==a||a(e,t)},onSessionEnd:(e,t)=>this.stop(e,t)},{transformPagePoint:this.visualElement.getTransformPagePoint()}))}stop(e,t){const n=this.isDragging;if(this.cancel(),!n)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:i}=this.getProps();null==i||i(e,t)}cancel(){var e,t;this.isDragging=!1,this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!1),null===(e=this.panSession)||void 0===e||e.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),null===(t=this.visualElement.animationState)||void 0===t||t.setActive(rt.Drag,!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!yi(e,r,this.currentDirection))return;const i=this.getAxisMotionValue(e);let a=this.originPoint[e]+n[e];this.constraints&&this.constraints[e]&&(a=function(e,{min:t,max:n},r){return void 0!==t&&e<t?e=r?_n(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?_n(n,e,r.max):Math.min(e,n)),e}(a,this.constraints[e],this.elastic[e])),i.set(a)}resolveConstraints(){const{dragConstraints:e,dragElastic:t}=this.getProps(),{layout:n}=this.visualElement.projection||{},r=this.constraints;e&&N(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:Xr(e.x,n,i),y:Xr(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Kr){return!1===e?e=0:!0===e&&(e=Kr),{x:qr(e,"left","right"),y:qr(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Zr((e=>{this.getAxisMotionValue(e)&&(this.constraints[e]=function(e,t){const n={};return void 0!==t.min&&(n.min=t.min-e.min),void 0!==t.max&&(n.max=t.max-e.min),n}(n.layoutBox[e],this.constraints[e]))}))}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!N(e))return!1;const n=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=mi(e,n),{scroll:i}=t;return i&&(ci(r.x,i.offset.x),ci(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:Yr(e.x,t.x),y:Yr(e.y,t.y)}}(r.layout.layoutBox,i);if(t){const e=t(function({x:e,y:t}){return{top:t.min,right:e.max,bottom:t.max,left:e.min}}(a));this.hasMutatedConstraints=!!e,e&&(a=$r(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),o=this.constraints||{},l=Zr((s=>{if(!yi(s,t,this.currentDirection))return;let l=(null==o?void 0:o[s])||{};a&&(l={min:0,max:0});const u=r?200:1e6,c=r?40:1e7,h={type:"inertia",velocity:n?e[s]:0,bounceStiffness:u,bounceDamping:c,timeConstant:750,restDelta:1,restSpeed:10,...i,...l};return this.startAxisValueAnimation(s,h)}));return Promise.all(l).then(s)}startAxisValueAnimation(e,t){const n=this.getAxisMotionValue(e);return n.start(_r(e,n,0,t))}stopAnimation(){Zr((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){var t;const n="_drag"+e.toUpperCase();return this.visualElement.getProps()[n]||this.visualElement.getValue(e,(null===(t=this.visualElement.getProps().initial)||void 0===t?void 0:t[e])||0)}snapToCursor(e){Zr((t=>{const{drag:n}=this.getProps();if(!yi(t,n,this.currentDirection))return;const{projection:r}=this.visualElement,i=this.getAxisMotionValue(t);if(r&&r.layout){const{min:n,max:a}=r.layout.layoutBox[t];i.set(e[t]-_n(n,a,.5))}}))}scalePositionWithinConstraints(){var e;if(!this.visualElement.current)return;const{drag:t,dragConstraints:n}=this.getProps(),{projection:r}=this.visualElement;if(!N(n)||!r||!this.constraints)return;this.stopAnimation();const i={x:0,y:0};Zr((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();i[e]=function(e,t){let n=.5;const r=Ur(e),i=Ur(t);return i>r?n=Rn(t.min,t.max-r,e.min):r>i&&(n=Rn(e.min,e.max-i,t.min)),de(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:a}=this.visualElement.getProps();this.visualElement.current.style.transform=a?a({},""):"none",null===(e=r.root)||void 0===e||e.updateScroll(),r.updateLayout(),this.resolveConstraints(),Zr((e=>{if(!yi(e,t,null))return;const n=this.getAxisMotionValue(e),{min:r,max:a}=this.constraints[e];n.set(_n(r,a,i[e]))}))}addListeners(){var e;if(!this.visualElement.current)return;gi.set(this.visualElement,this);const t=ut(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),n=()=>{const{dragConstraints:e}=this.getProps();N(e)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,i=r.addEventListener("measure",n);r&&!r.layout&&(null===(e=r.root)||void 0===e||e.updateScroll(),r.updateLayout()),n();const a=it(window,"resize",(()=>this.scalePositionWithinConstraints())),s=r.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Zr((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{a(),t(),i(),null==s||s()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Kr,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function yi(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const xi={pan:Et((function({onPan:e,onPanStart:t,onPanEnd:n,onPanSessionStart:r,visualElement:i}){const s=e||t||n||r,o=(0,a.useRef)(null),{transformPagePoint:l}=(0,a.useContext)(k),u={onSessionStart:r,onStart:t,onMove:e,onEnd:(e,t)=>{o.current=null,n&&n(e,t)}};(0,a.useEffect)((()=>{null!==o.current&&o.current.updateHandlers(u)})),ct(i,"pointerdown",s&&function(e){o.current=new Dr(e,u,{transformPagePoint:l})}),L((()=>o.current&&o.current.end()))})),drag:Et((function(e){const{dragControls:t,visualElement:n}=e,r=C((()=>new vi(n)));(0,a.useEffect)((()=>t&&t.subscribe(r)),[r,t]),(0,a.useEffect)((()=>r.addListeners()),[r])}))};function bi(e){return"string"==typeof e&&e.startsWith("var(--")}const _i=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function wi(e,t,n=1){const[r,i]=function(e){const t=_i.exec(e);if(!t)return[,];const[,n,r]=t;return[n,r]}(e);if(!r)return;const a=window.getComputedStyle(t).getPropertyValue(r);return a?a.trim():bi(i)?wi(i,t,n+1):i}const Mi=new Set(["width","height","top","left","right","bottom","x","y"]),Si=e=>Mi.has(e),Ai=e=>e===fe||e===Se;var Ci;!function(e){e.width="width",e.height="height",e.left="left",e.right="right",e.top="top",e.bottom="bottom"}(Ci||(Ci={}));const Ei=(e,t)=>parseFloat(e.split(", ")[t]),Ti=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return Ei(i[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?Ei(t[1],e):0}},Bi=new Set(["x","y","z"]),Pi=ie.filter((e=>!Bi.has(e))),Ri={width:({x:e},{paddingLeft:t="0",paddingRight:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),height:({y:e},{paddingTop:t="0",paddingBottom:n="0"})=>e.max-e.min-parseFloat(t)-parseFloat(n),top:(e,{top:t})=>parseFloat(t),left:(e,{left:t})=>parseFloat(t),bottom:({y:e},{top:t})=>parseFloat(t)+(e.max-e.min),right:({x:e},{left:t})=>parseFloat(t)+(e.max-e.min),x:Ti(4,13),y:Ti(5,14)};function Li(e,t,n,r){return(e=>Object.keys(e).some(Si))(t)?((e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(Si);let a=[],s=!1;const o=[];if(i.forEach((i=>{const l=e.getValue(i);if(!e.hasValue(i))return;let u=n[i],c=on(u);const h=t[i];let d;if(Qe(h)){const e=h.length,t=null===h[0]?1:0;u=h[t],c=on(u);for(let n=t;n<e;n++)d?on(h[n]):(d=on(h[n]),d===c||Ai(c)&&Ai(d))}else d=on(h);if(c!==d)if(Ai(c)&&Ai(d)){const e=l.get();"string"==typeof e&&l.set(parseFloat(e)),"string"==typeof h?t[i]=parseFloat(h):Array.isArray(h)&&d===Se&&(t[i]=h.map(parseFloat))}else(null==c?void 0:c.transform)&&(null==d?void 0:d.transform)&&(0===u||0===h)?0===u?l.set(d.transform(u)):t[i]=c.transform(h):(s||(a=function(e){const t=[];return Pi.forEach((n=>{const r=e.getValue(n);void 0!==r&&(t.push([n,r.get()]),r.set(n.startsWith("scale")?1:0))})),t.length&&e.render(),t}(e),s=!0),o.push(i),r[i]=void 0!==r[i]?r[i]:t[i],l.jump(h))})),o.length){const n=o.indexOf("height")>=0?window.pageYOffset:null,i=((e,t,n)=>{const r=t.measureViewportBox(),i=t.current,a=getComputedStyle(i),{display:s}=a,o={};"none"===s&&t.setStaticValue("display",e.display||"block"),n.forEach((e=>{o[e]=Ri[e](r,a)})),t.render();const l=t.measureViewportBox();return n.forEach((n=>{const r=t.getValue(n);r&&r.jump(o[n]),e[n]=Ri[n](l,a)})),e})(t,e,o);return a.length&&a.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),w&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:r}}return{target:t,transitionEnd:r}})(e,t,n,r):{target:t,transitionEnd:r}}const Di={current:null},Ii={current:!1},ki=Object.keys(J),Fi=ki.length,Oi=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],Ni=["initial",...Cr],zi=Ni.length;class Ui extends class{constructor({parent:e,props:t,reducedMotionConfig:n,visualState:r},i={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.isPresent=!0,this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>g.render(this.render,!1,!0);const{latestValues:a,renderState:s}=r;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=s,this.parent=e,this.props=t,this.depth=e?e.depth+1:0,this.reducedMotionConfig=n,this.options=i,this.isControllingVariants=H(t),this.isVariantNode=V(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:o,...l}=this.scrapeMotionValuesFromProps(t,{});for(const e in l){const t=l[e];void 0!==a[e]&&oe(t)&&(t.set(a[e],!1),fn(o)&&o.add(e))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){var t;this.current=e,this.projection&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=null===(t=this.parent)||void 0===t?void 0:t.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),Ii.current||function(){if(Ii.current=!0,w)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>Di.current=e.matches;e.addListener(t),t()}else Di.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||Di.current),this.parent&&this.parent.children.add(this),this.setProps(this.props)}unmount(){var e,t,n;null===(e=this.projection)||void 0===e||e.unmount(),v.update(this.notifyUpdate),v.render(this.render),this.valueSubscriptions.forEach((e=>e())),null===(t=this.removeFromVariantTree)||void 0===t||t.call(this),null===(n=this.parent)||void 0===n||n.children.delete(this);for(const e in this.events)this.events[e].clear();this.current=null}bindToMotionValue(e,t){const n=ae.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&g.update(this.notifyUpdate,!1,!0),n&&this.projection&&(this.projection.isTransformDirty=!0)})),i=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,(()=>{r(),i()}))}sortNodePosition(e){return this.current&&this.sortInstanceNodePosition&&this.type===e.type?this.sortInstanceNodePosition(this.current,e.current):0}loadFeatures({children:e,...t},n,r,i,s,o){const l=[];for(let e=0;e<Fi;e++){const n=ki[e],{isEnabled:r,Component:i}=J[n];r(t)&&i&&l.push((0,a.createElement)(i,{key:n,...t,visualElement:this}))}if(!this.projection&&s){this.projection=new s(i,this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:a,layoutScroll:l,layoutRoot:u}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||a&&N(a),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:o,layoutScroll:l,layoutRoot:u})}return l}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):{x:{min:0,max:0},y:{min:0,max:0}}}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}setProps(e){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender();const t=this.props;this.props=e;for(let t=0;t<Oi.length;t++){const n=Oi[t];this.propEventSubscriptions[n]&&(this.propEventSubscriptions[n](),delete this.propEventSubscriptions[n]);const r=e["on"+n];r&&(this.propEventSubscriptions[n]=this.on(n,r))}this.prevMotionValues=function(e,t,n){const{willChange:r}=t;for(const i in t){const a=t[i],s=n[i];if(oe(a))e.addValue(i,a),fn(r)&&r.add(i);else if(oe(s))e.addValue(i,Ft(a,{owner:e})),fn(r)&&r.remove(i);else if(s!==a)if(e.hasValue(i)){const t=e.getValue(i);!t.hasAnimated&&t.set(a)}else{const t=e.getStaticValue(i);e.addValue(i,Ft(void 0!==t?t:a,{owner:e}))}}for(const r in n)void 0===t[r]&&e.removeValue(r);return t}(this,this.scrapeMotionValuesFromProps(e,t),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){var t;return null===(t=this.props.variants)||void 0===t?void 0:t[e]}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){var e;return this.isVariantNode?this:null===(e=this.parent)||void 0===e?void 0:e.getClosestVariantNode()}getVariantContext(e=!1){var t,n;if(e)return null===(t=this.parent)||void 0===t?void 0:t.getVariantContext();if(!this.isControllingVariants){const e=(null===(n=this.parent)||void 0===n?void 0:n.getVariantContext())||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const r={};for(let e=0;e<zi;e++){const t=Ni[e],n=this.props[t];(z(n)||!1===n)&&(r[t]=n)}return r}addVariantChild(e){var t;const n=this.getClosestVariantNode();if(n)return null===(t=n.variantChildren)||void 0===t||t.add(e),()=>n.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){var t;this.values.delete(e),null===(t=this.valueSubscriptions.get(e))||void 0===t||t(),this.valueSubscriptions.delete(e),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=Ft(t,{owner:this}),this.addValue(e,n)),n}readValue(e){return void 0===this.latestValues[e]&&this.current?this.readValueFromInstance(this.current,e,this.options):this.latestValues[e]}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:n}=this.props,r="string"==typeof n||"object"==typeof n?null===(t=qe(this.props,n))||void 0===t?void 0:t[e]:void 0;if(n&&void 0!==r)return r;const i=this.getBaseTargetFromProps(this.props,e);return void 0===i||oe(i)?void 0!==this.initialValues[e]&&void 0===r?void 0:this.baseTarget[e]:i}on(e,t){return this.events[e]||(this.events[e]=new Dt),this.events[e].add(t)}notify(e,...t){var n;null===(n=this.events[e])||void 0===n||n.notify(...t)}}{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){var n;return null===(n=e.style)||void 0===n?void 0:n[t]}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},i){let a=function(e,t,n){var r;const i={};for(const a in e){const e=dn(a,t);i[a]=void 0!==e?e:null===(r=n.getValue(a))||void 0===r?void 0:r.get()}return i}(n,e||{},this);if(r&&(t&&(t=r(t)),n&&(n=r(n)),a&&(a=r(a))),i){!function(e,t,n){var r,i;const a=Object.keys(t).filter((t=>!e.hasValue(t))),s=a.length;if(s)for(let o=0;o<s;o++){const s=a[o],l=t[s];let u=null;Array.isArray(l)&&(u=l[0]),null===u&&(u=null!==(i=null!==(r=n[s])&&void 0!==r?r:e.readValue(s))&&void 0!==i?i:t[s]),null!=u&&("string"==typeof u&&(/^\-?\d*\.?\d+$/.test(u)||/^0[^.\s]+$/.test(u))?u=parseFloat(u):!un(u)&&qt.test(l)&&(u=rn(s,l)),e.addValue(s,Ft(u,{owner:e})),void 0===n[s]&&(n[s]=u),null!==u&&e.setBaseTarget(s,u))}}(this,n,a);const e=((e,t,n,r)=>{const i=function(e,{...t},n){const r=e.current;if(!(r instanceof Element))return{target:t,transitionEnd:n};n&&(n={...n}),e.values.forEach((e=>{const t=e.get();if(!bi(t))return;const n=wi(t,r);n&&e.set(n)}));for(const e in t){const i=t[e];if(!bi(i))continue;const a=wi(i,r);a&&(t[e]=a,n&&void 0===n[e]&&(n[e]=i))}return{target:t,transitionEnd:n}}(e,t,r);return Li(e,t=i.target,n,r=i.transitionEnd)})(this,n,a,t);t=e.transitionEnd,n=e.target}return{transition:e,transitionEnd:t,...n}}}class Gi extends Ui{readValueFromInstance(e,t){if(ae.has(t)){const e=nn(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),i=(ce(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return mi(e,t)}build(e,t,n,r){Pe(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return Ye(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;oe(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){je(e,t,n,r)}}class Hi extends Ui{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){var n;return ae.has(t)?(null===(n=nn(t))||void 0===n?void 0:n.default)||0:(t=Je.has(t)?t:We(t),e.getAttribute(t))}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(e,t){return Ke(e,t)}build(e,t,n,r){Ue(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){Xe(e,t,0,r)}mount(e){this.isSVGTag=Ge(e.tagName),super.mount(e)}}const Vi=(e,t)=>ne(e)?new Hi(t,{enableHardwareAcceleration:!1}):new Gi(t,{enableHardwareAcceleration:!0});function Wi(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const ji={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!Se.test(e))return e;e=parseFloat(e)}return`${Wi(e,t.target.x)}% ${Wi(e,t.target.y)}%`}},Ji="_$css",Xi={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=e.includes("var("),a=[];i&&(e=e.replace(_i,(e=>(a.push(e),Ji))));const s=qt.parse(e);if(s.length>5)return r;const o=qt.createTransformer(e),l="number"!=typeof s[0]?1:0,u=n.x.scale*t.x,c=n.y.scale*t.y;s[0+l]/=u,s[1+l]/=c;const h=_n(u,c,.5);"number"==typeof s[2+l]&&(s[2+l]/=h),"number"==typeof s[3+l]&&(s[3+l]/=h);let d=o(s);if(i){let e=0;d=d.replace(Ji,(()=>{const t=a[e];return e++,t}))}return d}};class Yi extends a.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;var a;a=Ki,Object.assign(re,a),i&&(t.group&&t.group.add(i),n&&n.register&&r&&n.register(i),i.root.didUpdate(),i.addEventListener("animationComplete",(()=>{this.safeToRemove()})),i.setOptions({...i.options,onExitComplete:()=>this.safeToRemove()})),X.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:n,drag:r,isPresent:i}=this.props,a=n.projection;return a?(a.isPresent=i,r||e.layoutDependency!==t||void 0===t?a.willUpdate():this.safeToRemove(),e.isPresent!==i&&(i?a.promote():a.relegate()||g.postRender((()=>{var e;(null===(e=a.getStack())||void 0===e?void 0:e.members.length)||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),!e.currentAnimation&&e.isLead()&&this.safeToRemove())}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),(null==t?void 0:t.group)&&t.group.remove(r),(null==n?void 0:n.deregister)&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;null==e||e()}render(){return null}}const Ki={borderRadius:{...ji,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:ji,borderTopRightRadius:ji,borderBottomLeftRadius:ji,borderBottomRightRadius:ji,boxShadow:Xi},qi={measureLayout:function(e){const[t,n]=Bt(),r=(0,a.useContext)(R);return a.createElement(Yi,{...e,layoutGroup:r,switchLayoutGroup:(0,a.useContext)(q),isPresent:t,safeToRemove:n})}},Qi=["TopLeft","TopRight","BottomLeft","BottomRight"],Zi=Qi.length,$i=e=>"string"==typeof e?parseFloat(e):e,ea=e=>"number"==typeof e||Se.test(e);function ta(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const na=ia(0,.5,Nn),ra=ia(.5,.95,In);function ia(e,t,n){return r=>r<e?0:r>t?1:n(Rn(e,t,r))}function aa(e,t){e.min=t.min,e.max=t.max}function sa(e,t){aa(e.x,t.x),aa(e.y,t.y)}function oa(e,t,n,r,i){return e=ai(e-=t,1/n,r),void 0!==i&&(e=ai(e,1/i,r)),e}function la(e,t,[n,r,i],a,s){!function(e,t=0,n=1,r=.5,i,a=e,s=e){if(Me.test(t)&&(t=parseFloat(t),t=_n(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let o=_n(a.min,a.max,r);e===a&&(o-=t),e.min=oa(e.min,t,n,o,i),e.max=oa(e.max,t,n,o,i)}(e,t[n],t[r],t[i],t.scale,a,s)}const ua=["x","scaleX","originX"],ca=["y","scaleY","originY"];function ha(e,t,n,r){la(e.x,t,ua,null==n?void 0:n.x,null==r?void 0:r.x),la(e.y,t,ca,null==n?void 0:n.y,null==r?void 0:r.y)}function da(e){return 0===e.translate&&1===e.scale}function fa(e){return da(e.x)&&da(e.y)}function pa(e,t){return e.x.min===t.x.min&&e.x.max===t.x.max&&e.y.min===t.y.min&&e.y.max===t.y.max}function ma(e){return Ur(e.x)/Ur(e.y)}class ga{constructor(){this.members=[]}add(e){Rt(this.members,e),e.scheduleRender()}remove(e){if(Lt(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const e=this.members[this.members.length-1];e&&this.promote(e)}}relegate(e){const t=this.members.findIndex((t=>e===t));if(0===t)return!1;let n;for(let e=t;e>=0;e--){const t=this.members[e];if(!1!==t.isPresent){n=t;break}}return!!n&&(this.promote(n),!0)}promote(e,t){var n;const r=this.lead;if(e!==r&&(this.prevLead=r,this.lead=e,e.show(),r)){r.instance&&r.scheduleRender(),e.scheduleRender(),e.resumeFrom=r,t&&(e.resumeFrom.preserveOpacity=!0),r.snapshot&&(e.snapshot=r.snapshot,e.snapshot.latestValues=r.animationValues||r.latestValues),(null===(n=e.root)||void 0===n?void 0:n.isUpdating)&&(e.isLayoutDirty=!0);const{crossfade:i}=e.options;!1===i&&r.hide()}}exitAnimationComplete(){this.members.forEach((e=>{var t,n,r,i,a;null===(n=(t=e.options).onExitComplete)||void 0===n||n.call(t),null===(a=null===(r=e.resumingFrom)||void 0===r?void 0:(i=r.options).onExitComplete)||void 0===a||a.call(i)}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function va(e,t,n){let r="";const i=e.x.translate/t.x,a=e.y.translate/t.y;if((i||a)&&(r=`translate3d(${i}px, ${a}px, 0) `),1===t.x&&1===t.y||(r+=`scale(${1/t.x}, ${1/t.y}) `),n){const{rotate:e,rotateX:t,rotateY:i}=n;e&&(r+=`rotate(${e}deg) `),t&&(r+=`rotateX(${t}deg) `),i&&(r+=`rotateY(${i}deg) `)}const s=e.x.scale*t.x,o=e.y.scale*t.y;return 1===s&&1===o||(r+=`scale(${s}, ${o})`),r||"none"}const ya=(e,t)=>e.depth-t.depth;class xa{constructor(){this.children=[],this.isDirty=!1}add(e){Rt(this.children,e),this.isDirty=!0}remove(e){Lt(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(ya),this.isDirty=!1,this.children.forEach(e)}}const ba=["","X","Y","Z"];let _a=0;function wa({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e,n={},r=(null==t?void 0:t())){this.id=_a++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isTransformDirty=!1,this.isProjectionDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.potentialNodes=new Map,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.nodes.forEach(Aa),this.nodes.forEach(Pa),this.nodes.forEach(Ra)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.elementId=e,this.latestValues=n,this.root=r?r.root||r:this,this.path=r?[...r.path,r]:[],this.parent=r,this.depth=r?r.depth+1:0,e&&this.root.registerPotentialNode(e,this);for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new xa)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new Dt),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);null==n||n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}registerPotentialNode(e,t){this.potentialNodes.set(e,t)}mount(t,n=!1){var r;if(this.instance)return;this.isSVG=t instanceof SVGElement&&"svg"!==t.tagName,this.instance=t;const{layoutId:i,layout:a,visualElement:s}=this.options;if(s&&!s.current&&s.mount(t),this.root.nodes.add(this),null===(r=this.parent)||void 0===r||r.children.add(this),this.elementId&&this.root.potentialNodes.delete(this.elementId),n&&(a||i)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=ur(r,250),X.hasAnimatedSinceResize&&(X.hasAnimatedSinceResize=!1,this.nodes.forEach(Ba))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||a)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{var i,a,o,l,u;if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const c=null!==(a=null!==(i=this.options.transition)&&void 0!==i?i:s.getDefaultTransition())&&void 0!==a?a:Oa,{onLayoutAnimationStart:h,onLayoutAnimationComplete:d}=s.getProps(),f=!this.targetLayout||!pa(this.targetLayout,r)||n,p=!t&&n;if(this.options.layoutRoot||(null===(o=this.resumeFrom)||void 0===o?void 0:o.instance)||p||t&&(f||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,p);const t={...br(c,"layout"),onPlay:h,onComplete:d};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||0!==this.animationProgress||Ba(this),this.isLead()&&(null===(u=(l=this.options).onExitComplete)||void 0===u||u.call(l));this.targetLayout=r}))}unmount(){var e,t;this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this),null===(e=this.getStack())||void 0===e||e.remove(this),null===(t=this.parent)||void 0===t||t.children.delete(this),this.instance=void 0,v.preRender(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){var e;return this.isAnimationBlocked||(null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimationBlocked())||!1}startUpdate(){var e;this.isUpdateBlocked()||(this.isUpdating=!0,null===(e=this.nodes)||void 0===e||e.forEach(La),this.animationId++)}getTransformTemplate(){var e;return null===(e=this.options.visualElement)||void 0===e?void 0:e.getProps().transformTemplate}willUpdate(e=!0){var t,n,r;if(this.root.isUpdateBlocked())return void(null===(n=(t=this.options).onExitComplete)||void 0===n||n.call(t));if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let e=0;e<this.path.length;e++){const t=this.path[e];t.shouldResetTransform=!0,t.updateScroll("snapshot"),t.options.layoutRoot&&t.willUpdate(!1)}const{layoutId:i,layout:a}=this.options;(void 0!==i||a)&&(this.prevTransformTemplateValue=null===(r=this.getTransformTemplate())||void 0===r?void 0:r(this.latestValues,""),this.updateSnapshot(),e&&this.notifyListeners("willUpdate"))}didUpdate(){if(this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(Ea);this.isUpdating&&(this.isUpdating=!1,this.potentialNodes.size&&(this.potentialNodes.forEach(Na),this.potentialNodes.clear()),this.nodes.forEach(Ta),this.nodes.forEach(Ma),this.nodes.forEach(Sa),this.clearAllSnapshots(),y.update(),y.preRender(),y.render())}clearAllSnapshots(){this.nodes.forEach(Ca),this.sharedNodes.forEach(Da)}scheduleUpdateProjection(){g.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){g.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){var e;if(!this.instance)return;if(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead()||this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let e=0;e<this.path.length;e++)this.path[e].updateScroll();const t=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox),null===(e=this.options.visualElement)||void 0===e||e.notify("LayoutMeasure",this.layout.layoutBox,null==t?void 0:t.layoutBox)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);this.scroll&&this.scroll.animationId===this.root.animationId&&this.scroll.phase===e&&(t=!1),t&&(this.scroll={animationId:this.root.animationId,phase:e,isRoot:r(this.instance),offset:n(this.instance)})}resetTransform(){var e;if(!i)return;const t=this.isLayoutDirty||this.shouldResetTransform,n=this.projectionDelta&&!fa(this.projectionDelta),r=null===(e=this.getTransformTemplate())||void 0===e?void 0:e(this.latestValues,""),a=r!==this.prevTransformTemplateValue;t&&(n||ni(this.latestValues)||a)&&(i(this.instance,r),this.shouldResetTransform=!1,this.scheduleRender())}measure(e=!0){const t=this.measurePageBox();let n=this.removeElementScroll(t);var r;return e&&(n=this.removeTransform(n)),za((r=n).x),za(r.y),{animationId:this.root.animationId,measuredBox:t,layoutBox:n,latestValues:{},source:this.id}}measurePageBox(){const{visualElement:e}=this.options;if(!e)return{x:{min:0,max:0},y:{min:0,max:0}};const t=e.measureViewportBox(),{scroll:n}=this.root;return n&&(ci(t.x,n.offset.x),ci(t.y,n.offset.y)),t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};sa(t,e);for(let n=0;n<this.path.length;n++){const r=this.path[n],{scroll:i,options:a}=r;if(r!==this.root&&i&&a.layoutScroll){if(i.isRoot){sa(t,e);const{scroll:n}=this.root;n&&(ci(t.x,-n.offset.x),ci(t.y,-n.offset.y))}ci(t.x,i.offset.x),ci(t.y,i.offset.y)}}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};sa(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];!t&&r.options.layoutScroll&&r.scroll&&r!==r.root&&pi(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),ni(r.latestValues)&&pi(n,r.latestValues)}return ni(this.latestValues)&&pi(n,this.latestValues),n}removeTransform(e){var t;const n={x:{min:0,max:0},y:{min:0,max:0}};sa(n,e);for(let e=0;e<this.path.length;e++){const r=this.path[e];if(!r.instance)continue;if(!ni(r.latestValues))continue;ti(r.latestValues)&&r.updateSnapshot();const i={x:{min:0,max:0},y:{min:0,max:0}};sa(i,r.measurePageBox()),ha(n,r.latestValues,null===(t=r.snapshot)||void 0===t?void 0:t.layoutBox,i)}return ni(this.latestValues)&&ha(n,this.latestValues),n}setTargetDelta(e){this.targetDelta=e,this.isProjectionDirty=!0,this.root.scheduleUpdateProjection()}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}resolveTargetDelta(){var e;const t=this.getLead();if(this.isProjectionDirty||(this.isProjectionDirty=t.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=t.isTransformDirty),!this.isProjectionDirty&&!this.attemptToResolveRelativeTarget)return;const{layout:n,layoutId:r}=this.options;if(this.layout&&(n||r)){if(!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout?(this.relativeParent=e,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Jr(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),sa(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}var i,a,s;if((this.relativeTarget||this.targetDelta)&&(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&(null===(e=this.relativeParent)||void 0===e?void 0:e.target)?(i=this.target,a=this.relativeTarget,s=this.relativeParent.target,Wr(i.x,a.x,s.x),Wr(i.y,a.y,s.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):sa(this.target,this.layout.layoutBox),li(this.target,this.targetDelta)):sa(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget)){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target?(this.relativeParent=e,this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Jr(this.relativeTargetOrigin,this.target,e.target),sa(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}}}getClosestProjectingParent(){if(this.parent&&!ti(this.parent.latestValues)&&!ri(this.parent.latestValues))return(this.parent.relativeTarget||this.parent.targetDelta||this.parent.options.layoutRoot)&&this.parent.layout?this.parent:this.parent.getClosestProjectingParent()}calcProjection(){var e;const{isProjectionDirty:t,isTransformDirty:n}=this;this.isProjectionDirty=this.isTransformDirty=!1;const r=this.getLead(),i=Boolean(this.resumingFrom)||this!==r;let a=!0;if(t&&(a=!1),i&&n&&(a=!1),a)return;const{layout:s,layoutId:o}=this.options;if(this.isTreeAnimating=Boolean((null===(e=this.parent)||void 0===e?void 0:e.isTreeAnimating)||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!s&&!o)return;sa(this.layoutCorrected,this.layout.layoutBox),function(e,t,n,r=!1){var i,a;const s=n.length;if(!s)return;let o,l;t.x=t.y=1;for(let u=0;u<s;u++)o=n[u],l=o.projectionDelta,"contents"!==(null===(a=null===(i=o.instance)||void 0===i?void 0:i.style)||void 0===a?void 0:a.display)&&(r&&o.options.layoutScroll&&o.scroll&&o!==o.root&&pi(e,{x:-o.scroll.offset.x,y:-o.scroll.offset.y}),l&&(t.x*=l.x.scale,t.y*=l.y.scale,li(e,l)),r&&ni(o.latestValues)&&pi(e,o.latestValues));t.x=ui(t.x),t.y=ui(t.y)}(this.layoutCorrected,this.treeScale,this.path,i);const{target:l}=r;if(!l)return;this.projectionDelta||(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionDeltaWithTransform={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}});const u=this.treeScale.x,c=this.treeScale.y,h=this.projectionTransform;Vr(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=va(this.projectionDelta,this.treeScale),this.projectionTransform===h&&this.treeScale.x===u&&this.treeScale.y===c||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l))}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){var t,n,r;null===(n=(t=this.options).scheduleRender)||void 0===n||n.call(t),e&&(null===(r=this.getStack())||void 0===r||r.scheduleRender()),this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){var n,r;const i=this.snapshot,a=(null==i?void 0:i.latestValues)||{},s={...this.latestValues},o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const l={x:{min:0,max:0},y:{min:0,max:0}},u=(null==i?void 0:i.source)!==(null===(n=this.layout)||void 0===n?void 0:n.source),c=((null===(r=this.getStack())||void 0===r?void 0:r.members.length)||0)<=1,h=Boolean(u&&!c&&!0===this.options.crossfade&&!this.path.some(Fa));this.animationProgress=0,this.mixTargetDelta=t=>{var n;const r=t/1e3;var i,d,f,p;Ia(o.x,e.x,r),Ia(o.y,e.y,r),this.setTargetDelta(o),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&(null===(n=this.relativeParent)||void 0===n?void 0:n.layout)&&(Jr(l,this.layout.layoutBox,this.relativeParent.layout.layoutBox),i=this.relativeTarget,d=this.relativeTargetOrigin,f=l,p=r,ka(i.x,d.x,f.x,p),ka(i.y,d.y,f.y,p)),u&&(this.animationValues=s,function(e,t,n,r,i,a){i?(e.opacity=_n(0,void 0!==n.opacity?n.opacity:1,na(r)),e.opacityExit=_n(void 0!==t.opacity?t.opacity:1,0,ra(r))):a&&(e.opacity=_n(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let i=0;i<Zi;i++){const a=`border${Qi[i]}Radius`;let s=ta(t,a),o=ta(n,a);void 0===s&&void 0===o||(s||(s=0),o||(o=0),0===s||0===o||ea(s)===ea(o)?(e[a]=Math.max(_n($i(s),$i(o),r),0),(Me.test(o)||Me.test(s))&&(e[a]+="%")):e[a]=o)}(t.rotate||n.rotate)&&(e.rotate=_n(t.rotate||0,n.rotate||0,r))}(s,a,this.latestValues,r,h,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=r},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){var t,n;this.notifyListeners("animationStart"),null===(t=this.currentAnimation)||void 0===t||t.stop(),this.resumingFrom&&(null===(n=this.resumingFrom.currentAnimation)||void 0===n||n.stop()),this.pendingAnimation&&(v.update(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=g.update((()=>{X.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n={}){const r=oe(e)?e:Ft(e);return r.start(_r("",r,t,n)),{stop:()=>r.stop(),isAnimating:()=>r.isAnimating()}}(0,1e3,{...e,onUpdate:t=>{var n;this.mixTargetDelta(t),null===(n=e.onUpdate)||void 0===n||n.call(e,t)},onComplete:()=>{var t;null===(t=e.onComplete)||void 0===t||t.call(e),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){var e;this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0),null===(e=this.getStack())||void 0===e||e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){var e;this.currentAnimation&&(null===(e=this.mixTargetDelta)||void 0===e||e.call(this,1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&Ua(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=Ur(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=Ur(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}sa(t,n),pi(t,i),Vr(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){var n,r,i;this.sharedNodes.has(e)||this.sharedNodes.set(e,new ga),this.sharedNodes.get(e).add(t),t.promote({transition:null===(n=t.options.initialPromotionConfig)||void 0===n?void 0:n.transition,preserveFollowOpacity:null===(i=null===(r=t.options.initialPromotionConfig)||void 0===r?void 0:r.shouldPreserveFollowOpacity)||void 0===i?void 0:i.call(r,t)})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?void 0:e.lead)||this}getPrevLead(){var e;const{layoutId:t}=this.options;return t?null===(e=this.getStack())||void 0===e?void 0:e.prevLead:void 0}getStack(){const{layoutId:e}=this.options;if(e)return this.root.sharedNodes.get(e)}promote({needsReset:e,transition:t,preserveFollowOpacity:n}={}){const r=this.getStack();r&&r.promote(this,n),e&&(this.projectionDelta=void 0,this.needsReset=!0),t&&this.setOptions({transition:t})}relegate(){const e=this.getStack();return!!e&&e.relegate(this)}resetRotation(){const{visualElement:e}=this.options;if(!e)return;let t=!1;const{latestValues:n}=e;if((n.rotate||n.rotateX||n.rotateY||n.rotateZ)&&(t=!0),!t)return;const r={};for(let t=0;t<ba.length;t++){const i="rotate"+ba[t];n[i]&&(r[i]=n[i],e.setStaticValue(i,0))}null==e||e.render();for(const t in r)e.setStaticValue(t,r[t]);e.scheduleRender()}getProjectionStyles(e={}){var t,n;const r={};if(!this.instance||this.isSVG)return r;if(!this.isVisible)return{visibility:"hidden"};r.visibility="";const i=this.getTransformTemplate();if(this.needsReset)return this.needsReset=!1,r.opacity="",r.pointerEvents=Ze(e.pointerEvents)||"",r.transform=i?i(this.latestValues,""):"none",r;const a=this.getLead();if(!this.projectionDelta||!this.layout||!a.target){const t={};return this.options.layoutId&&(t.opacity=void 0!==this.latestValues.opacity?this.latestValues.opacity:1,t.pointerEvents=Ze(e.pointerEvents)||""),this.hasProjected&&!ni(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}const s=a.animationValues||a.latestValues;this.applyTransformsToTarget(),r.transform=va(this.projectionDeltaWithTransform,this.treeScale,s),i&&(r.transform=i(s,r.transform));const{x:o,y:l}=this.projectionDelta;r.transformOrigin=`${100*o.origin}% ${100*l.origin}% 0`,a.animationValues?r.opacity=a===this?null!==(n=null!==(t=s.opacity)&&void 0!==t?t:this.latestValues.opacity)&&void 0!==n?n:1:this.preserveOpacity?this.latestValues.opacity:s.opacityExit:r.opacity=a===this?void 0!==s.opacity?s.opacity:"":void 0!==s.opacityExit?s.opacityExit:0;for(const e in re){if(void 0===s[e])continue;const{correct:t,applyTo:n}=re[e],i="none"===r.transform?s[e]:t(s[e],a);if(n){const e=n.length;for(let t=0;t<e;t++)r[n[t]]=i}else r[e]=i}return this.options.layoutId&&(r.pointerEvents=a===this?Ze(e.pointerEvents)||"":"none"),r}clearSnapshot(){this.resumeFrom=this.snapshot=void 0}resetTree(){this.root.nodes.forEach((e=>{var t;return null===(t=e.currentAnimation)||void 0===t?void 0:t.stop()})),this.root.nodes.forEach(Ea),this.root.sharedNodes.clear()}}}function Ma(e){e.updateLayout()}function Sa(e){var t,n,r;const i=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&i&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:n}=e.layout,{animationType:r}=e.options,a=i.source!==e.layout.source;"size"===r?Zr((e=>{const n=a?i.measuredBox[e]:i.layoutBox[e],r=Ur(n);n.min=t[e].min,n.max=n.min+r})):Ua(r,i.layoutBox,t)&&Zr((e=>{const n=a?i.measuredBox[e]:i.layoutBox[e],r=Ur(t[e]);n.max=n.min+r}));const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};Vr(s,t,i.layoutBox);const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?Vr(o,e.applyTransform(n,!0),i.measuredBox):Vr(o,t,i.layoutBox);const l=!fa(s);let u=!1;if(!e.resumeFrom){const n=e.getClosestProjectingParent();if(n&&!n.resumeFrom){const{snapshot:r,layout:a}=n;if(r&&a){const s={x:{min:0,max:0},y:{min:0,max:0}};Jr(s,i.layoutBox,r.layoutBox);const o={x:{min:0,max:0},y:{min:0,max:0}};Jr(o,t,a.layoutBox),pa(s,o)||(u=!0),n.options.layoutRoot&&(e.relativeTarget=o,e.relativeTargetOrigin=s,e.relativeParent=n)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:i,delta:o,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:u})}else e.isLead()&&(null===(r=(n=e.options).onExitComplete)||void 0===r||r.call(n));e.options.transition=void 0}function Aa(e){e.isProjectionDirty||(e.isProjectionDirty=Boolean(e.parent&&e.parent.isProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=Boolean(e.parent&&e.parent.isTransformDirty))}function Ca(e){e.clearSnapshot()}function Ea(e){e.clearMeasurements()}function Ta(e){const{visualElement:t}=e.options;(null==t?void 0:t.getProps().onBeforeLayoutMeasure)&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function Ba(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0}function Pa(e){e.resolveTargetDelta()}function Ra(e){e.calcProjection()}function La(e){e.resetRotation()}function Da(e){e.removeLeadSnapshot()}function Ia(e,t,n){e.translate=_n(t.translate,0,n),e.scale=_n(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function ka(e,t,n,r){e.min=_n(t.min,n.min,r),e.max=_n(t.max,n.max,r)}function Fa(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const Oa={duration:.45,ease:[.4,0,.1,1]};function Na(e,t){let n=e.root;for(let t=e.path.length-1;t>=0;t--)if(Boolean(e.path[t].instance)){n=e.path[t];break}const r=(n&&n!==e.root?n.instance:document).querySelector(`[data-projection-id="${t}"]`);r&&e.mount(r,!0)}function za(e){e.min=Math.round(e.min),e.max=Math.round(e.max)}function Ua(e,t,n){return"position"===e||"preserve-aspect"===e&&!Gr(ma(t),ma(n),.2)}const Ga=wa({attachResizeListener:(e,t)=>it(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Ha={current:void 0},Va=wa({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!Ha.current){const e=new Ga(0,{});e.mount(window),e.setOptions({layoutScroll:!0}),Ha.current=e}return Ha.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),Wa={...Rr,...Tt,...xi,...qi},ja=ee(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r,i){return{...ne(e)?tt:nt,preloadedFeatures:n,useRender:Ve(t),createVisualElement:r,projectionNodeConstructor:i,Component:e}}(e,t,Wa,Vi,Va)));var Ja=n(7462),Xa=n(8628),Ya=n(8715),Ka=n(6227),qa=n(5696),Qa=n(533),Za=n(587),$a=n(3758),es=n(3520);const ts=function(){var e=(0,a.useRef)(null),n=(0,a.useRef)(null),r=(0,a.useState)(1),i=(0,t.Z)(r,2),s=i[0],o=i[1],l=(0,a.useState)("always"),u=(0,t.Z)(l,2),c=u[0],h=(u[1],(0,a.useRef)(null));(0,a.useEffect)((function(){document.addEventListener("mousemove",(function(e){window.mousePos={x:-.1*(1-e.clientX/(window.innerWidth/2)),y:-.1*(1-e.clientY/(window.innerHeight/2))}}),!1)}),[]);var d=function(t){var r=(0,Ka.L)(frameConsts.footer),i=r.nodes,s=r.materials;return a.createElement("group",(0,Ja.Z)({ref:n},t,{dispose:null}),a.createElement("mesh",{castShadow:!0,receiveShadow:!0,geometry:i.Object001.geometry,material:s["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01}),a.createElement("mesh",{castShadow:!0,receiveShadow:!0,geometry:i.Object002.geometry,material:s["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01}),a.createElement("mesh",{castShadow:!0,receiveShadow:!0,geometry:i.Object003.geometry,material:s["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01}),a.createElement("mesh",{castShadow:!0,receiveShadow:!0,geometry:i.Object001001.geometry,material:s["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01,ref:e}))};Ka.L.preload(frameConsts.footer);var f=function(){var r=0,i=0;return(0,Ya.A)((function(){if(e.current&&!("ontouchstart"in window))window.mousePos&&(e.current.rotation.y=-2*parseFloat(window.mousePos.x),e.current.rotation.x=Math.PI/2- -2*parseFloat(window.mousePos.y));else if(e.current&&"ontouchstart"in window){var t=-.1*(1-r/(window.innerWidth/2)),a=-.1*(1-i/(window.innerHeight/2));e.current.rotation.y=-2*parseFloat(t),e.current.rotation.x=Math.PI/2- -2*parseFloat(a)}if(n.current&&!("ontouchstart"in window))window.mousePos&&(n.current.rotation.y=1*parseFloat(window.mousePos.x),n.current.rotation.x=1*parseFloat(window.mousePos.y));else if(n.current&&"ontouchstart"in window){var s=-.1*(1-r/(window.innerWidth/2)),o=-.1*(1-i/(window.innerHeight/2));n.current.rotation.y=1*parseFloat(s),n.current.rotation.x=1*parseFloat(o)}})),(0,a.useEffect)((function(){var e=document.querySelector("footer .frame");if("ontouchstart"in window){var n=function(e){for(var n=0,a=Object.entries(e.touches);n<a.length;n++){var s=(0,t.Z)(a[n],2),o=s[0],l=(s[1],e.touches[o]),u=r-l.clientX,c=i-l.clientY;r-=u,i-=c,console.log(l,{deltaTouchX:u,deltaTouchY:c},{touchX:r,touchY:i})}},a=function t(r){e.removeEventListener("touchmove",n,!1),e.removeEventListener("touchend",t,!1)};e.addEventListener("touchstart",(function(t){e.addEventListener("touchmove",n,!1),e.addEventListener("touchend",a,!1)}),!1)}}),[]),a.createElement(qa.H,{shadows:!1,environment:"sunset",intensity:.5,adjustCamera:1.3},a.createElement(d,null))};return a.createElement(Xa.Xz,{dpr:s,style:{width:"100%",height:"150px",pointerEvents:"none"},ref:h,frameloop:c},a.createElement(Qa.A,{onIncline:function(){return o(2)},onDecline:function(){return o(1)}}),a.createElement(a.Suspense,{fallback:null},a.createElement(f,null),a.createElement(Za.q,null),a.createElement($a.S,{pixelated:!0}),a.createElement(es.E,null)))};var ns=n(9062);const rs=function(){var e=(0,a.useRef)(null),n=(0,a.useState)([{role:"system",content:"\n You are Teamo.\n You are the mascot for a company called Crowd. You were created in 2022 to celebrate Crowd's 10th Birthday.\n You embody the essence of Crowd's teamwork, creativity, and collaboration.\n You are a 6-inch tall white figurine with a large orange megaphone head. You hold a golden egg and a phone with the number 10 on it. You have the Crowd logo on his chest.\n The egg you hold is a metaphor for Crowd's success and golden reputation.\n More information about Teamo as a character can be found by exploring this website.\n Answer any questions the user has about Crowd.\n Be friendly and concise.\n Here is information about Crowd, with links:\n The Crowd website is https://thisiscrowd.com\n \n ".concat(window.crowdInfo,"\n\n Always provide a link that is the source of your information. Only share links that I have told you about.\n If you can't find an answer here, tell the user and direct them to https://thisiscrowd.com.\n Users can get in touch with Crowd by emailing results@thisiscrowd.com.\n ")},{role:"system",content:"Start off by greeting the user with your name and a unique greeting, telling them that you are an AI they can use to find out about Crowd."}]),r=(0,t.Z)(n,2),i=r[0],s=r[1],o=(0,a.useState)(!1),l=(0,t.Z)(o,2),u=l[0],c=l[1];(0,a.useEffect)((function(){var t,n;null==e||null===(t=e.current)||void 0===t||t.scrollTo({left:0,top:null==e||null===(n=e.current)||void 0===n?void 0:n.scrollHeight,behavior:"smooth"}),"user"!==i.at(-1).role&&"system"!==i.at(-1).role||h()}),[i]);var h=function(){c(!0),fetch("https://api.openai.com/v1/chat/completions",{method:"POST",headers:{"Content-type":"application/json",Authorization:"Bearer ".concat("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")},body:JSON.stringify({model:"gpt-3.5-turbo",messages:i,temperature:.8})}).then((function(e){return e.json()})).then((function(e){var t=[];null==e||e.choices.forEach((function(e){t.push(e.message)})),c(!1),s([].concat((0,ns.Z)(i),t))})).catch((function(e){console.error(e),c(!1),s([i.at(0),i.at(-3),i.at(-2),i.at(-1)])}))};return a.createElement("div",{className:"chat"},a.createElement("div",{className:"messages",ref:e},a.createElement(I,null,i.map((function(e){return a.createElement(ja.div,{key:e.content.slice(10),initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},className:e.role,dangerouslySetInnerHTML:{__html:(t=e.content,t.replace(/(\b(https?|ftp|file):\/\/[-A-Z0-9+&@#\/%?=~_|!:,.;]*[-A-Z0-9+&@#\/%=~_|])/gi,(function(e){return'<a target="_blank" rel="noreferrer" href="'+e+'">'+e+"</a>"})))}});var t})),u&&a.createElement(ja.small,{key:"wait",initial:{opacity:0,y:"100%"},animate:{opacity:1,y:0},exit:{opacity:0}},"Teamo is responding..."))),a.createElement("input",{type:"text",onKeyUp:function(e){"Enter"===e.key&&e.target.value&&(s([].concat((0,ns.Z)(i),[{role:"user",content:e.target.value}])),e.target.value="")},placeholder:"Ask Teamo a question about Crowd"}))};var is=function(){var n=(0,a.useState)(!1),r=(0,t.Z)(n,2),s=r[0],o=r[1],l=(0,a.useState)(!1),u=(0,t.Z)(l,2),c=u[0],h=u[1],d="",f="",p="",m="",g=function(){var t,n=(t=i().mark((function e(){return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,fetch("https://thisiscrowd.com/wp-json/wp/v2/pages?per_page=100").then((function(e){return e.json()})).then((function(e){e.length&&e.forEach((function(e){d+="\n ".concat(e.link,": ").concat(e.title.rendered," - ").concat(e.yoast_head_json.description)}))}));case 2:return e.next=4,fetch("https://thisiscrowd.com/wp-json/wp/v2/c_work").then((function(e){return e.json()})).then((function(e){e.length&&e.forEach((function(e){f+="\n ".concat(e.link,": ").concat(e.title.rendered," - ").concat(e.yoast_head_json.description)}))}));case 4:return e.next=6,fetch("https://thisiscrowd.com/wp-json/wp/v2/c_service?per_page=100").then((function(e){return e.json()})).then((function(e){e.length&&e.forEach((function(e){p+="\n ".concat(e.link,": ").concat(e.title.rendered," - ").concat(e.yoast_head_json.description)}))}));case 6:return e.next=8,fetch("https://thisiscrowd.com/wp-json/wp/v2/c_team?per_page=100").then((function(e){return e.json()})).then((function(e){e.length&&e.forEach((function(e){m+="\n ".concat(e.title.rendered," - ").concat(e.acf.job_position)}))}));case 8:window.crowdInfo="\n Pages:\n ".concat(d,"\n\n Services:\n ").concat(p,"\n\n Work/Case Studies:\n ").concat(f,"\n\n Team:\n ").concat(m,"\n "),h(!0);case 10:case"end":return e.stop()}}),e)})),function(){var n=this,r=arguments;return new Promise((function(i,a){var s=t.apply(n,r);function o(t){e(s,i,a,o,l,"next",t)}function l(t){e(s,i,a,o,l,"throw",t)}o(void 0)}))});return function(){return n.apply(this,arguments)}}();return(0,a.useEffect)((function(){g()}),[]),a.createElement(I,null,s&&a.createElement(ja.div,{key:"box",initial:{scale:0,opacity:0},animate:{scale:1,opacity:1},exit:{scale:0,opacity:0},className:"chat-box"},a.createElement("h2",null,"Chat with Teamo ",a.createElement("button",{className:"close",onClick:function(){return o(!1)}},"✗")),a.createElement(rs,null),a.createElement(ts,null)),c&&a.createElement(ja.button,{className:"toggle",key:"toggle",initial:{opacity:0},animate:{opacity:1},exit:{opacity:0},onClick:function(){return o(!s)}},"💬"))};function as(){var e=document.querySelector(".chat-frame");(0,s.s)(e).render(a.createElement(a.Fragment,null,a.createElement(is,null)))}"complete"==document.readyState||"interactive"==document.readyState?as():document.addEventListener("DOMContentLoaded",as,!1)})(),function(){"use strict";var e,t,n,r,i,a={};function s(s){s.preventDefault(),e=s.currentTarget,t=e.dataset.formId,[].forEach.call(e.elements,(function(e){e.name&&(a[e.name]=e.value)})),n=e.querySelector('[type="submit"]'),r=e.querySelector("[data-status-msg]"),n.style.width=n.offsetWidth+"px",n.innerHTML='<span class="loading-bar"></span>'+n.dataset.sendingMsg+"...",n.disabled=!0,n.classList.add("sending"),n.querySelector(".loading-bar"),ajax().post(crowdAjax,{action:"flex_form",form_id:t,fields:JSON.stringify(a)}).then((function(e){r.innerHTML=e.message,e.download&&((i=document.createElement("a")).href=e.download,i.setAttribute("download",!0),i.style.display="none",document.body.appendChild(i),i.click(),i.remove())}))}document.addEventListener("DOMContentLoaded",(function(){[].slice.call(document.querySelectorAll("[data-flex-form]")).forEach((function(e){e.addEventListener("submit",s,!1)}))}),!1)}(),(()=>{"use strict";var e=n(7462),t=n(3324),r=n(7294),i=n(745),a=n(8715),s=n(8628),o=n(6227),l=n(5696),u=n(533),c=n(587),h=n(3758),d=n(3520),f=n(2642),p=n(7082);f.p8.registerPlugin(p.i),o.L.preload(frameConsts.modelUrl);var m=function(){var n=(0,r.useRef)(null),i=(0,r.useRef)(null),f=(0,r.useState)(1),p=(0,t.Z)(f,2),m=p[0],g=p[1],v=(0,r.useState)("demand"),y=(0,t.Z)(v,2),x=y[0],b=y[1],_=(0,r.useRef)(null);(0,r.useEffect)((function(){_.current&&new IntersectionObserver((function(e,t){e.forEach((function(e){e.isIntersecting?b("always"):b("never")}))})).observe(_.current)}),[_]);var w=function(t){var a=(0,o.L)(frameConsts.footer),s=a.nodes,l=a.materials;return r.createElement("group",(0,e.Z)({ref:i},t,{dispose:null}),r.createElement("mesh",{castShadow:!0,receiveShadow:!0,geometry:s.Object001.geometry,material:l["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01}),r.createElement("mesh",{castShadow:!0,receiveShadow:!0,geometry:s.Object002.geometry,material:l["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01}),r.createElement("mesh",{castShadow:!0,receiveShadow:!0,geometry:s.Object003.geometry,material:l["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01}),r.createElement("mesh",{castShadow:!0,receiveShadow:!0,geometry:s.Object001001.geometry,material:l["Material #63.001"],position:[0,.12,0],rotation:[Math.PI/2,0,0],scale:.01,ref:n}))};o.L.preload(frameConsts.modelUrl);var M=function(){var e=0,s=0;return(0,a.A)((function(){if(n.current&&!("ontouchstart"in window))window.mousePos&&(n.current.rotation.y=-2*parseFloat(window.mousePos.x),n.current.rotation.x=Math.PI/2- -2*parseFloat(window.mousePos.y));else if(n.current&&"ontouchstart"in window){var t=-.1*(1-e/(window.innerWidth/2)),r=-.1*(1-s/(window.innerHeight/2));n.current.rotation.y=-2*parseFloat(t),n.current.rotation.x=Math.PI/2- -2*parseFloat(r)}if(i.current&&!("ontouchstart"in window))window.mousePos&&(i.current.rotation.y=1*parseFloat(window.mousePos.x),i.current.rotation.x=1*parseFloat(window.mousePos.y));else if(i.current&&"ontouchstart"in window){var a=-.1*(1-e/(window.innerWidth/2)),o=-.1*(1-s/(window.innerHeight/2));i.current.rotation.y=1*parseFloat(a),i.current.rotation.x=1*parseFloat(o)}})),(0,r.useEffect)((function(){var n=document.querySelector("footer .frame");if("ontouchstart"in window){var r=function(n){for(var r=0,i=Object.entries(n.touches);r<i.length;r++){var a=(0,t.Z)(i[r],2),o=a[0],l=(a[1],n.touches[o]),u=e-l.clientX,c=s-l.clientY;e-=u,s-=c,console.log(l,{deltaTouchX:u,deltaTouchY:c},{touchX:e,touchY:s})}},i=function e(t){n.removeEventListener("touchmove",r,!1),n.removeEventListener("touchend",e,!1)};n.addEventListener("touchstart",(function(e){n.addEventListener("touchmove",r,!1),n.addEventListener("touchend",i,!1)}),!1)}}),[]),r.createElement(l.H,{shadows:!1,environment:"sunset",intensity:.5,adjustCamera:1.3},r.createElement(w,null))};return r.createElement(s.Xz,{dpr:m,style:{width:"auto",height:1e3},ref:_,frameloop:x},r.createElement(u.A,{onIncline:function(){return g(2)},onDecline:function(){return g(1)}}),r.createElement(r.Suspense,{fallback:null},r.createElement(M,null),r.createElement(c.q,null),r.createElement(h.S,{pixelated:!0}),r.createElement(d.E,null)))};function g(){var e=document.querySelector("footer .frame");(0,i.s)(e).render(r.createElement(r.Fragment,null,r.createElement(m,null)));var t=f.p8.matchMedia();t.add("(min-width: 800px)",(function(){f.p8.timeline({scrollTrigger:{trigger:"footer",start:"bottom bottom+=200px",end:"bottom bottom",scrub:1}}).fromTo("footer .frame",{y:1500},{y:0})})),t.add("(max-width: 799px)",(function(){f.p8.timeline({scrollTrigger:{trigger:"footer",start:"bottom bottom+=200px",end:"bottom bottom",scrub:1}}).fromTo("footer .frame",{y:1500,scale:1.2},{y:-400,x:-30,scale:1.2})}))}"complete"==document.readyState||"interactive"==document.readyState?g():document.addEventListener("DOMContentLoaded",g,!1)})(),(()=>{"use strict";var e=n(2642),t=n(7082);function r(){var n=document.querySelector(".navigation crowd-switch");n&&(document.body.dataset.mode="true"===n.value?"light":"dark",n.addEventListener("crowdChange",(function(){document.body.dataset.mode="true"===n.value?"light":"dark",localStorage.setItem("colorMode","true"===n.value?"light":"dark")})),localStorage.getItem("colorMode")&&"light"===localStorage.getItem("colorMode")&&(n.value=!0,n.checked=!0,document.body.dataset.mode="light")),t.i.observe({target:window,type:"wheel,touch,pointer",onUp:function(){e.p8.to(".navigation",{y:0,duration:.3}),e.p8.to(".chat-frame .toggle",{y:0,duration:.3})},onDown:function(){e.p8.to(".navigation",{y:"-100%",duration:.3}),e.p8.to(".chat-frame .toggle",{y:"200%",duration:.3})}})}e.p8.registerPlugin(t.i),"complete"===document.readyState||"interactive"===document.readyState?r():document.addEventListener("DOMContentLoaded",r,!1)})(),(()=>{"use strict";var e=n(2642),t=n(7082),r=n(9062);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 a(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,(a=r.key,s=void 0,s=function(e,t){if("object"!==i(e)||null===e)return e;var n=e[Symbol.toPrimitive];if(void 0!==n){var r=n.call(e,t);if("object"!==i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(a,"string"),"symbol"===i(s)?s:String(s)),r)}var a,s}var s,o,l,u,c,h,d,f,p,m,g,v,y,x=function(){return"undefined"!=typeof window},b=function(){return s||x()&&(s=window.gsap)&&s.registerPlugin&&s},_=function(){return String.fromCharCode.apply(null,arguments)},w=_(103,114,101,101,110,115,111,99,107,46,99,111,109),M=(function(e){var t="undefined"!=typeof window,n=0!==(t?window.location.href:"").indexOf(_(102,105,108,101,58,47,47))||-1!==e.indexOf(_(108,111,99,97,108,104,111,115,116))||-1!==e.indexOf(_(49,50,55,46,48,32,48,46,49)),r=[w,_(99,111,100,101,112,101,110,46,105,111),_(99,111,100,101,112,101,110,46,112,108,117,109,98,105,110,103),_(99,111,100,101,112,101,110,46,100,101,118),_(99,111,100,101,112,101,110,46,97,112,112),_(99,111,100,101,112,101,110,46,119,101,98,115,105,116,101),_(112,101,110,115,46,99,108,111,117,100),_(99,115,115,45,116,114,105,99,107,115,46,99,111,109),_(99,100,112,110,46,105,111),_(112,101,110,115,46,105,111),_(103,97,110,110,111,110,46,116,118),_(99,111,100,101,99,97,110,121,111,110,46,110,101,116),_(116,104,101,109,101,102,111,114,101,115,116,46,110,101,116),_(99,101,114,101,98,114,97,120,46,99,111,46,117,107),_(116,121,109,112,97,110,117,115,46,110,101,116),_(116,119,101,101,110,109,97,120,46,99,111,109),_(116,119,101,101,110,108,105,116,101,46,99,111,109),_(112,108,110,107,114,46,99,111),_(104,111,116,106,97,114,46,99,111,109),_(119,101,98,112,97,99,107,98,105,110,46,99,111,109),_(97,114,99,104,105,118,101,46,111,114,103),_(99,111,100,101,115,97,110,100,98,111,120,46,105,111),_(99,115,98,46,97,112,112),_(115,116,97,99,107,98,108,105,116,122,46,99,111,109),_(115,116,97,99,107,98,108,105,116,122,46,105,111),_(99,111,100,105,101,114,46,105,111),_(109,111,116,105,111,110,116,114,105,99,107,115,46,99,111,109),_(115,116,97,99,107,111,118,101,114,102,108,111,119,46,99,111,109),_(115,116,97,99,107,101,120,99,104,97,110,103,101,46,99,111,109),_(106,115,102,105,100,100,108,101,46,110,101,116)],a=r.length;for(setTimeout((function e(){t&&("loading"===document.readyState||"interactive"===document.readyState?document.addEventListener("readystatechange",e):(document.removeEventListener("readystatechange",e),t&&window.console&&!window._gsapWarned&&"object"==i(window.gsap)&&!1!==window.gsap.config().trialWarn&&(console.log(_(37,99,87,97,114,110,105,110,103),_(102,111,110,116,45,115,105,122,101,58,51,48,112,120,59,99,111,108,111,114,58,114,101,100,59)),console.log(_(65,32,116,114,105,97,108,32,118,101,114,115,105,111,110,32,111,102,32)+"ScrollSmoother"+_(32,105,115,32,108,111,97,100,101,100,32,116,104,97,116,32,111,110,108,121,32,119,111,114,107,115,32,108,111,99,97,108,108,121,32,97,110,100,32,111,110,32,100,111,109,97,105,110,115,32,108,105,107,101,32,99,111,100,101,112,101,110,46,105,111,32,97,110,100,32,99,111,100,101,115,97,110,100,98,111,120,46,105,111,46,32,42,42,42,32,68,79,32,78,79,84,32,68,69,80,76,79,89,32,84,72,73,83,32,70,73,76,69,32,42,42,42,32,76,111,97,100,105,110,103,32,105,116,32,111,110,32,97,110,32,117,110,97,117,116,104,111,114,105,122,101,100,32,115,105,116,101,32,118,105,111,108,97,116,101,115,32,116,104,101,32,108,105,99,101,110,115,101,32,97,110,100,32,119,105,108,108,32,99,97,117,115,101,32,97,32,114,101,100,105,114,101,99,116,46,32,80,108,101,97,115,101,32,106,111,105,110,32,67,108,117,98,32,71,114,101,101,110,83,111,99,107,32,116,111,32,103,101,116,32,102,117,108,108,32,97,99,99,101,115,115,32,116,111,32,116,104,101,32,98,111,110,117,115,32,112,108,117,103,105,110,115,32,116,104,97,116,32,98,111,111,115,116,32,121,111,117,114,32,97,110,105,109,97,116,105,111,110,32,115,117,112,101,114,112,111,119,101,114,115,46,32,68,105,115,97,98,108,101,32,116,104,105,115,32,119,97,114,110,105,110,103,32,119,105,116,104,32,103,115,97,112,46,99,111,110,102,105,103,40,123,116,114,105,97,108,87,97,114,110,58,32,102,97,108,115,101,125,41,59)),console.log(_(37,99,71,101,116,32,117,110,114,101,115,116,114,105,99,116,101,100,32,102,105,108,101,115,32,97,116,32,104,116,116,112,115,58,47,47,103,114,101,101,110,115,111,99,107,46,99,111,109,47,99,108,117,98),_(102,111,110,116,45,115,105,122,101,58,49,54,112,120,59,99,111,108,111,114,58,35,52,101,57,56,49,53)),window._gsapWarned=1)))}),50);--a>-1;)if(-1!==e.indexOf(r[a]))return!0;n||setTimeout((function(){}),3e3)}("undefined"!=typeof window?window.location.host:""),function(e){var t=u.querySelector(".ScrollSmoother-wrapper");return t||((t=u.createElement("div")).classList.add("ScrollSmoother-wrapper"),e.parentNode.insertBefore(t,e),t.appendChild(e)),t}),S=function(){function e(t){var n=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),o||e.register(s)||console.warn("Please gsap.registerPlugin(ScrollSmoother)"),t=this.vars=t||{},m&&m.kill(),m=this;var i,a,x,b,_,w,S,A,C,E,T,B,P,R,L=t,D=L.smoothTouch,I=L.onUpdate,k=L.onStop,F=L.smooth,O=L.onFocusIn,N=L.normalizeScroll,z=this,U="undefined"!=typeof ResizeObserver&&new ResizeObserver((function(){return b.refresh()})),G=t.effectsPrefix||"",H=p.getScrollFunc(l),V=1===p.isTouch?!0===D?.8:parseFloat(D)||0:0===F||!1===F?0:parseFloat(F)||.8,W=0,j=0,J=1,X=v(0),Y=function(){return X.update(-W)},K={y:0},q=function(){return i.style.overflow="visible"},Q=function(e){e.update();var t=e.getTween();t&&(t.pause(),t._time=t._dur,t._tTime=t._tDur),P=!1,e.animation.progress(e.progress,!0)},Z=function(e,t){(e!==W&&!E||t)&&(V&&(i.style.transform="matrix3d(1, 0, 0, 0, 0, 1, 0, 0, 0, 0, 1, 0, 0, "+e+", 0, 1)",i._gsap.y=e+"px"),j=e-W,W=e,p.isUpdating||p.update())},$=function(e){return arguments.length?(e<0&&(e=0),K.y=-e,P=!0,E?W=-e:Z(-e),H(e),this):-W},ee=function(e){a.scrollTop=0,e.target.contains&&e.target.contains(a)||O&&!1===O(n,e)||(p.isInViewport(e.target)||e.target===R||n.scrollTo(e.target,!1,"center center"),R=e.target)},te=function(e,t){var n,r,i,a;_.forEach((function(t){n=t.pins,a=t.markers,e.forEach((function(e){t.trigger&&e.trigger&&t!==e&&(e.trigger===t.trigger||e.pinnedContainer===t.trigger||t.trigger.contains(e.trigger))&&(r=e.start,i=(r-t.start-t.offset)/t.ratio-(r-t.start),n.forEach((function(e){return i-=e.distance/t.ratio-e.distance})),e.setPositions(r+i,e.end+i),e.markerStart&&a.push(s.quickSetter([e.markerStart,e.markerEnd],"y","px")),e.pin&&e.end>0&&(i=e.end-e.start,n.push({start:e.start,end:e.end,distance:i,trig:e}),t.setPositions(t.start,t.end+i),t.vars.onRefresh(t)))}))}))},ne=function(){q(),requestAnimationFrame(q),_&&(_.forEach((function(e){var t=e.start,n=e.auto?Math.min(p.maxScroll(e.scroller),e.end):t+(e.end-t)/e.ratio,r=(n-e.end)/2;t-=r,n-=r,e.offset=r||1e-4,e.pins.length=0,e.setPositions(Math.min(t,n),Math.max(t,n)),e.vars.onRefresh(e)})),te(p.sort())),X.reset()},re=function(){return p.addEventListener("refresh",ne)},ie=function(){return _&&_.forEach((function(e){return e.vars.onRefresh(e)}))},ae=function(){return _&&_.forEach((function(e){return e.vars.onRefreshInit(e)})),ie},se=function(e,t,n,r){return function(){var i="function"==typeof t?t(n,r):t;return i||0===i||(i=r.getAttribute("data-"+G+e)||("speed"===e?1:0)),r.setAttribute("data-"+G+e,i),"auto"===i?i:parseFloat(i)}},oe=function(e,t,n,r){var i,o,u,h,d,m,v=se("speed",t,r,e),y=se("lag",n,r,e),x=s.getProperty(e,"y"),b=e._gsap,w=function(){t=v(),n=y(),i=parseFloat(t)||1,d=(u="auto"===t)?0:.5,h&&h.kill(),h=n&&s.to(e,{ease:g,overwrite:!1,y:"+=0",duration:n}),o&&(o.ratio=i,o.autoSpeed=u)},M=function(){b.y=x+"px",b.renderTransform(1),w()},S=[],A=[],C=0,E=function(t){if(u){M();var n=function(e,t){var n,r,i=e.parentNode||c,a=e.getBoundingClientRect(),s=i.getBoundingClientRect(),o=s.top-a.top,u=s.bottom-a.bottom,h=(Math.abs(o)>Math.abs(u)?o:u)/(1-t),d=-h*t;return h>0&&(r=.5==(n=s.height/(l.innerHeight+s.height))?2*s.height:2*Math.min(s.height,-h*n/(2*n-1))*(t||1),d+=t?-r*t:-r/2,h+=r),{change:h,offset:d}}(e,f(0,1,-t.start/(t.end-t.start)));C=n.change,m=n.offset}else C=(t.end-t.start)*(1-i),m=0;S.forEach((function(e){return C-=e.distance*(1-i)})),t.vars.onUpdate(t),h&&h.progress(1)};return w(),(1!==i||u||h)&&(o=p.create({trigger:u?e.parentNode:e,scroller:a,scrub:!0,refreshPriority:-999,onRefreshInit:M,onRefresh:E,onKill:function(e){var t=_.indexOf(e);t>=0&&_.splice(t,1),M()},onUpdate:function(e){var t,n,r,i,a=x+C*(e.progress-d),o=S.length,l=0;if(e.offset){if(o){for(n=-W,r=e.end;o--;){if((t=S[o]).trig.isActive||n>=t.start&&n<=t.end)return void(h&&(t.trig.progress+=t.trig.direction<0?.001:-.001,t.trig.update(0,0,1),h.resetTo("y",parseFloat(b.y),-j,!0),J&&h.progress(1)));n>t.end&&(l+=t.distance),r-=t.distance}a=x+l+C*((s.utils.clamp(e.start,e.end,n)-e.start-l)/(r-e.start)-d)}i=a+m,a=Math.round(1e5*i)/1e5||0,A.length&&!u&&A.forEach((function(e){return e(a-l)})),h?(h.resetTo("y",a,-j,!0),J&&h.progress(1)):(b.y=a+"px",b.renderTransform(1))}}}),E(o),s.core.getCache(o.trigger).stRevert=ae,o.startY=x,o.pins=S,o.markers=A,o.ratio=i,o.autoSpeed=u,e.style.willChange="transform"),o};function le(){return x=i.clientHeight,i.style.overflow="visible",h.style.height=x+"px",x-l.innerHeight}re(),p.addEventListener("killAll",re),s.delayedCall(.5,(function(){return J=0})),this.scrollTop=$,this.scrollTo=function(e,t,r){var i=s.utils.clamp(0,p.maxScroll(l),isNaN(e)?n.offset(e,r):+e);t?E?s.to(n,{duration:V,scrollTop:i,overwrite:"auto",ease:g}):H(i):$(i)},this.offset=function(e,t){var n,r=(e=d(e)[0]).style.cssText,i=p.create({trigger:e,start:t||"top top"});return _&&te([i]),n=i.start,i.kill(!1),e.style.cssText=r,s.core.getCache(e).uncache=1,n},this.content=function(e){if(arguments.length){var t=d(e||"#smooth-content")[0]||h.children[0];return t!==i&&(C=(i=t).getAttribute("style")||"",U&&U.observe(i),s.set(i,{overflow:"visible",width:"100%",boxSizing:"border-box",y:"+=0"}),V||s.set(i,{clearProps:"transform"})),this}return i},this.wrapper=function(e){return arguments.length?(a=d(e||"#smooth-wrapper")[0]||M(i),A=a.getAttribute("style")||"",le(),s.set(a,V?{overflow:"hidden",position:"fixed",height:"100%",width:"100%",top:0,left:0,right:0,bottom:0}:{overflow:"visible",position:"relative",width:"100%",height:"auto",top:"auto",bottom:"auto",left:"auto",right:"auto"}),this):a},this.effects=function(e,t){var n;if(_||(_=[]),!e)return _.slice(0);(e=d(e)).forEach((function(e){for(var t=_.length;t--;)_[t].trigger===e&&_[t].kill()}));var r,i,a=t=t||{},s=a.speed,o=a.lag,l=[];for(r=0;r<e.length;r++)(i=oe(e[r],s,o,r))&&l.push(i);return(n=_).push.apply(n,l),l},this.sections=function(e,t){var n;if(w||(w=[]),!e)return w.slice(0);var i=d(e).map((function(e){return p.create({trigger:e,start:"top 120%",end:"bottom -20%",onToggle:function(t){e.style.opacity=t.isActive?"1":"0",e.style.pointerEvents=t.isActive?"all":"none"}})}));return t&&t.add?(n=w).push.apply(n,(0,r.Z)(i)):w=i.slice(0),i},this.content(t.content),this.wrapper(t.wrapper),this.render=function(e){return Z(e||0===e?e:W)},this.getVelocity=function(){return X.getVelocity(-W)},p.scrollerProxy(a,{scrollTop:$,scrollHeight:function(){return le()&&h.scrollHeight},fixedMarkers:!1!==t.fixedMarkers&&!!V,content:i,getBoundingClientRect:function(){return{top:0,left:0,width:l.innerWidth,height:l.innerHeight}}}),p.defaults({scroller:a});var ue=p.getAll().filter((function(e){return e.scroller===l||e.scroller===a}));ue.forEach((function(e){return e.revert(!0)})),b=p.create({animation:s.fromTo(K,{y:0},{y:function(){return-le()},immediateRender:!1,ease:"none",data:"ScrollSmoother",duration:100,onUpdate:function(){if(this._dur){var e=P;e&&(Q(b),K.y=W),Z(K.y,e),Y(),I&&!E&&I(z)}}}),onRefreshInit:function(){if(_){var e=p.getAll().filter((function(e){return!!e.pin}));_.forEach((function(t){t.vars.pinnedContainer||e.forEach((function(e){if(e.pin.contains(t.trigger)){var n=t.vars;n.pinnedContainer=e.pin,t.vars=null,t.init(n,t.animation)}}))}))}B=W,K.y=a.scrollTop=0},id:"ScrollSmoother",scroller:l,invalidateOnRefresh:!0,start:0,refreshPriority:-9999,end:le,onScrubComplete:function(){X.reset(),k&&k(n)},scrub:V||!0,onRefresh:function(e){Q(e),K.y=-H(),Z(K.y),J||e.animation.progress(s.utils.clamp(0,1,B/-e.end))}}),this.smooth=function(e){return arguments.length&&(V=e||0),arguments.length?b.scrubDuration(e):b.getTween()?b.getTween().duration():0},b.getTween()&&(b.getTween().vars.ease=t.ease||g),this.scrollTrigger=b,t.effects&&this.effects(!0===t.effects?"[data-"+G+"speed], [data-"+G+"lag]":t.effects,{}),t.sections&&this.sections(!0===t.sections?"[data-section]":t.sections),ue.forEach((function(e){e.vars.scroller=a,e.init(e.vars,e.animation)})),this.paused=function(e,t){return arguments.length?(!!E!==e&&(e?(b.getTween()&&b.getTween().pause(),H(-W),X.reset(),(T=p.normalizeScroll())&&T.disable(),(E=p.observe({preventDefault:!0,type:"wheel,touch,scroll",debounce:!1,allowClicks:!0,onChangeY:function(){return $(-W)}})).nested=y(c,"wheel,touch,scroll",!0,!1!==t)):(E.nested.kill(),E.kill(),E=0,T&&T.enable(),b.progress=(-W-b.start)/(b.end-b.start),Q(b))),this):!!E},this.kill=function(){n.paused(!1),Q(b),b.kill();for(var e=(_||[]).concat(w||[]),t=e.length;t--;)e[t].kill();p.scrollerProxy(a),p.removeEventListener("killAll",re),p.removeEventListener("refresh",ne),h.style.removeProperty("height"),a.style.cssText=A,i.style.cssText=C;var r=p.defaults({});r&&r.scroller===a&&p.defaults({scroller:l}),n.normalizer&&p.normalizeScroll(!1),clearInterval(S),m=null,U&&U.disconnect(),l.removeEventListener("focusin",ee)},this.refresh=function(e,t){return b.refresh(e,t)},N&&(this.normalizer=p.normalizeScroll(!0===N?{debounce:!0,content:!V&&i}:N)),p.config(t),"overscrollBehavior"in l.getComputedStyle(h)&&s.set([h,c],{overscrollBehavior:"none"}),"scrollBehavior"in l.getComputedStyle(h)&&s.set([h,c],{scrollBehavior:"auto"}),l.addEventListener("focusin",ee),S=setInterval(Y,250),"loading"===u.readyState||requestAnimationFrame((function(){return p.refresh()}))}var t,n,i;return t=e,i=[{key:"register",value:function(t){return o||(s=t||b(),x()&&window.document&&(l=window,u=document,c=u.documentElement,h=u.body),s&&(d=s.utils.toArray,f=s.utils.clamp,g=s.parseEase("expo"),p=s.core.globals().ScrollTrigger,s.core.globals("ScrollSmoother",e),h&&p&&(v=p.core._getVelocityProp,y=p.core._inputObserver,e.refresh=p.refresh,o=1))),o}}],(n=[{key:"progress",get:function(){return this.scrollTrigger?this.scrollTrigger.animation._time/100:0}}])&&a(t.prototype,n),i&&a(t,i),Object.defineProperty(t,"prototype",{writable:!1}),e}();S.version="3.11.1",S.create=function(e){return m&&e&&m.content()===d(e.content)[0]?m:new S(e)},S.get=function(){return m},b()&&s.registerPlugin(S),"scrollRestoration"in history&&(history.scrollRestoration="manual"),window.scrollTo(0,0),window.onbeforeunload=function(){window.scrollTo(0,0)},e.p8.registerPlugin(t.i),t.i.normalizeScroll({allowNestedScroll:!0,type:"wheel,touch"}),t.i.addEventListener("scrollEnd",(function(){})),document.addEventListener("mousemove",(function(e){window.mousePos={x:-.1*(1-e.clientX/(window.innerWidth/2)),y:-.1*(1-e.clientY/(window.innerHeight/2))}}),!1);var A=[].slice.call(document.querySelectorAll('a[href*="'.concat(location.host,'"]')));document.startViewTransition&&A&&A.forEach((function(e){e.addEventListener("click",(function(t){t.preventDefault(),document.startViewTransition((function(){document.body.classList.remove("hide-splash")})).finished.then((function(){window.location.href=e.href}))}));var t=document.createElement("link");t.rel="preload",t.href=e.href,t.as="document",document.head.appendChild(t)}))})()})(); </script> <script id="https://teamo.thisiscrowd.com/wp-content/themes/crowd-base-build-package/dist/js/partytown.js-js-after"> (()=>{"use strict";((t,e)=>{const{forward:n=[],...i}={},o=JSON.stringify(i,((t,e)=>("function"==typeof e&&(e=String(e)).startsWith(t+"(")&&(e="function "+e),e)));["!(function(w,p,f,c){",Object.keys(i).length>0?`c=w[p]=Object.assign(w[p]||{},${o});`:"c=w[p]=w[p]||{};","c[f]=(c[f]||[])",n.length>0?`.concat(${JSON.stringify(n)})`:"","})(window,'partytown','forward');",'/* Partytown 0.6.1 - MIT builder.io */\n!function(t,e,n,i,r,o,a,d,s,c,p,l){function u(){l||(l=1,"/"==(a=(o.lib||"/~partytown/")+(o.debug?"debug/":""))[0]&&(s=e.querySelectorAll(\'script[type="text/partytown"]\'),i!=t?i.dispatchEvent(new CustomEvent("pt1",{detail:t})):(d=setTimeout(w,1e4),e.addEventListener("pt0",f),r?h(1):n.serviceWorker?n.serviceWorker.register(a+(o.swPath||"partytown-sw.js"),{scope:a}).then((function(t){t.active?h():t.installing&&t.installing.addEventListener("statechange",(function(t){"activated"==t.target.state&&h()}))}),console.error):w())))}function h(t){c=e.createElement(t?"script":"iframe"),t||(c.setAttribute("style","display:block;width:0;height:0;border:0;visibility:hidden"),c.setAttribute("aria-hidden",!0)),c.src=a+"partytown-"+(t?"atomics.js?v=0.6.1":"sandbox-sw.html?"+Date.now()),e.body.appendChild(c)}function w(t,n){for(f(),t=0;t<s.length;t++)(n=e.createElement("script")).innerHTML=s[t].innerHTML,e.head.appendChild(n);c&&c.parentNode.removeChild(c)}function f(){clearTimeout(d)}o=t.partytown||{},i==t&&(o.forward||[]).map((function(e){p=t,e.split(".").map((function(e,n,i){p=p[i[n]]=n+1<i.length?"push"==i[n+1]?[]:p[i[n]]||{}:function(){(t._ptf=t._ptf||[]).push(i,arguments)}}))})),"complete"==e.readyState?u():(t.addEventListener("DOMContentLoaded",u),t.addEventListener("load",u))}(window,document,navigator,top,window.crossOriginIsolated);'].join("")})()})(); </script> </div> </div> <div class='teamo-model'></div> <div class='floaters'></div> <script>console.log("Page generated in 1.5295 seconds. 145 database queries")</script> <script type='application/ld+json'> { "@context": "https://schema.org", "@type": "Organization", "name": "TEAMO", "url": "https://teamo.thisiscrowd.com", "description": "Introducing TEAMO: Your personalised gift for Crowd's 10th Birthday Celebration", "sameAs": [ ] } </script> <script> document.addEventListener('DOMContentLoaded', () => { let scriptSrcs = [].slice.call(document.querySelectorAll('script[data-src]:not(loaded)')) if (scriptSrcs) { scriptSrcs.forEach(el => { setTimeout(() => { el.src = el.dataset.src el.classList.add('loaded') },200) }) } }, false) </script> </body> </html>