CINXE.COM

Crowd’s Privacy Policy - Crowd

<!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>Crowd’s Privacy Policy - Crowd</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"> <!--[if lte IE 8]> <script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2-legacy.js"></script> <![endif]--> <script charset="utf-8" type="text/javascript" src="//js.hsforms.net/forms/v2.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/gsap.min.js"></script> <script src="https://cdnjs.cloudflare.com/ajax/libs/gsap/3.12.2/ScrollTrigger.min.js"></script> <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 v20.12 - https://yoast.com/wordpress/plugins/seo/ --> <meta name="description" content="At Crowd, we value your privacy and follow industry best practices to ensure that any data submitted, collected or obtained through this website is stored securely." /> <link rel="canonical" href="https://thisiscrowd.com/privacy-policy/" /> <meta property="og:locale" content="en_GB" /> <meta property="og:type" content="article" /> <meta property="og:title" content="Crowd’s Privacy Policy - Crowd" /> <meta property="og:description" content="At Crowd, we value your privacy and follow industry best practices to ensure that any data submitted, collected or obtained through this website is stored securely." /> <meta property="og:url" content="https://thisiscrowd.com/privacy-policy/" /> <meta property="og:site_name" content="Crowd" /> <meta property="article:publisher" content="https://facebook.com" /> <meta property="article:modified_time" content="2024-01-24T15:50:26+00:00" /> <meta property="og:image" content="https://thisiscrowd.com/wp-content/uploads/2023/08/Social-Share.jpg" /> <meta property="og:image:width" content="1280" /> <meta property="og:image:height" content="700" /> <meta property="og:image:type" content="image/jpeg" /> <meta name="twitter:card" content="summary_large_image" /> <meta name="twitter:site" content="@test" /> <script type="application/ld+json" class="yoast-schema-graph">{"@context":"https://schema.org","@graph":[{"@type":"WebPage","@id":"https://thisiscrowd.com/privacy-policy/","url":"https://thisiscrowd.com/privacy-policy/","name":"Crowd’s Privacy Policy - Crowd","isPartOf":{"@id":"https://thisiscrowd.com/#website"},"primaryImageOfPage":{"@id":"https://thisiscrowd.com/privacy-policy/#primaryimage"},"image":{"@id":"https://thisiscrowd.com/privacy-policy/#primaryimage"},"thumbnailUrl":"https://thisiscrowd.com/wp-content/uploads/2023/08/Social-Share.jpg","datePublished":"2023-05-31T13:45:48+00:00","dateModified":"2024-01-24T15:50:26+00:00","description":"At Crowd, we value your privacy and follow industry best practices to ensure that any data submitted, collected or obtained through this website is stored securely.","breadcrumb":{"@id":"https://thisiscrowd.com/privacy-policy/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https://thisiscrowd.com/privacy-policy/"]}]},{"@type":"ImageObject","inLanguage":"en-GB","@id":"https://thisiscrowd.com/privacy-policy/#primaryimage","url":"https://thisiscrowd.com/wp-content/uploads/2023/08/Social-Share.jpg","contentUrl":"https://thisiscrowd.com/wp-content/uploads/2023/08/Social-Share.jpg","width":1280,"height":700,"caption":"Crowd Marketing Agency: Helping Brands, Organisations and Governments Into Future Territories"},{"@type":"BreadcrumbList","@id":"https://thisiscrowd.com/privacy-policy/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://thisiscrowd.com/"},{"@type":"ListItem","position":2,"name":"Privacy Policy"}]},{"@type":"WebSite","@id":"https://thisiscrowd.com/#website","url":"https://thisiscrowd.com/","name":"A marketing agency that amplifies demand","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://thisiscrowd.com/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"}]}</script> <!-- / Yoast SEO plugin. --> <style id='safe-svg-svg-icon-style-inline-css'> .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> <link rel='stylesheet' id='yop-public-css' href='https://thisiscrowd.com/wp-content/plugins/yop-poll/public/assets/css/yop-poll-public-6.5.33.css?ver=6.7.1' media='all' /> <link rel='stylesheet' id='main.css-css' href='https://thisiscrowd.com/wp-content/themes/thisiscrowd2023-package/dist/styles/main.css?ver=1694095914051' media='all' /> <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> <script src="https://thisiscrowd.com/wp-includes/js/jquery/jquery.min.js?ver=3.7.1" id="jquery-core-js"></script> <script src="https://thisiscrowd.com/wp-includes/js/jquery/jquery-migrate.min.js?ver=3.4.1" id="jquery-migrate-js"></script> <script id="yop-public-js-extra"> var objectL10n = {"yopPollParams":{"urlParams":{"ajax":"https:\/\/thisiscrowd.com\/wp-admin\/admin-ajax.php","wpLogin":"https:\/\/thisiscrowd.com\/crowd-login\/?redirect_to=https%3A%2F%2Fthisiscrowd.com%2Fwp-admin%2Fadmin-ajax.php%3Faction%3Dyop_poll_record_wordpress_vote"},"apiParams":{"reCaptcha":{"siteKey":""},"reCaptchaV2Invisible":{"siteKey":""},"reCaptchaV3":{"siteKey":""},"hCaptcha":{"siteKey":""}},"captchaParams":{"imgPath":"https:\/\/thisiscrowd.com\/wp-content\/plugins\/yop-poll\/public\/assets\/img\/","url":"https:\/\/thisiscrowd.com\/wp-content\/plugins\/yop-poll\/app.php","accessibilityAlt":"Sound icon","accessibilityTitle":"Accessibility option: listen to a question and answer it!","accessibilityDescription":"Type below the <strong>answer<\/strong> to what you hear. Numbers or words:","explanation":"Click or touch the <strong>ANSWER<\/strong>","refreshAlt":"Refresh\/reload icon","refreshTitle":"Refresh\/reload: get new images and accessibility option!"},"voteParams":{"invalidPoll":"Invalid Poll","noAnswersSelected":"No answer selected","minAnswersRequired":"At least {min_answers_allowed} answer(s) required","maxAnswersRequired":"A max of {max_answers_allowed} answer(s) accepted","noAnswerForOther":"No other answer entered","noValueForCustomField":"{custom_field_name} is required","consentNotChecked":"You must agree to our terms and conditions","noCaptchaSelected":"Captcha is required","thankYou":"Thank you for your vote"},"resultsParams":{"singleVote":"vote","multipleVotes":"votes","singleAnswer":"answer","multipleAnswers":"answers"}}}; </script> <script src="https://thisiscrowd.com/wp-content/plugins/yop-poll/public/assets/js/yop-poll-public-6.5.33.min.js?ver=6.7.1" id="yop-public-js"></script> <script src="https://thisiscrowd.com/wp-content/themes/thisiscrowd2023-package/dist/js/essential.js?ver=1694095914051" id="essential.js-js"></script> <link rel="icon" href="https://thisiscrowd.com/wp-content/uploads/2023/07/cropped-favicon-32x32.png" sizes="32x32" /> <link rel="icon" href="https://thisiscrowd.com/wp-content/uploads/2023/07/cropped-favicon-192x192.png" sizes="192x192" /> <link rel="apple-touch-icon" href="https://thisiscrowd.com/wp-content/uploads/2023/07/cropped-favicon-180x180.png" /> <meta name="msapplication-TileImage" content="https://thisiscrowd.com/wp-content/uploads/2023/07/cropped-favicon-270x270.png" /> <!-- Hubspot Consent Mode v2 --> <script> var _hsp = window._hsp = window._hsp || []; window.dataLayer = window.dataLayer || []; function gtag(){dataLayer.push(arguments);} // set up default denied consent gtag('consent', 'default', { 'analytics_storage': 'denied', 'ad_storage': 'denied', 'ad_user_data': 'denied', 'ad_personalization': 'denied', 'region': ["AT", "BE", "BG", "HR", "CY", "CZ", "DK", "EE", "FI", "FR", "DE", "GR", "HU", "IS", "IE", "IT", "LV", "LI", "LT", "LU", "MT", "NL", "NO", "PL", "PT", "RO", "SK", "SI", "ES", "SE", "UK", "CH"] }); // send consent updates from the HubSpot Cookie Banner _hsp.push(['addPrivacyConsentListener', function(consent){ var hasAnalyticsConsent = consent && (consent.allowed || (consent.categories && consent.categories.analytics)); var hasAdsConsent = consent && (consent.allowed || (consent.categories && consent.categories.advertisement)); gtag('consent', 'update', { 'ad_storage': hasAdsConsent ? 'granted' : 'denied', 'analytics_storage': hasAnalyticsConsent ? 'granted' : 'denied', 'ad_user_data': hasAdsConsent ? 'granted' : 'denied', 'ad_personalization': hasAdsConsent ? 'granted' : 'denied' }); }]); </script> <!-- Google tag (gtag.js) --> <script> var _hsp = window._hsp = window._hsp || []; _hsp.push(['addPrivacyConsentListener', (consent) => { if (consent.categories.analytics) { (function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= 'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); })(window,document,'script','dataLayer','GTM-KQVNZCB'); } }]) </script> <meta name="facebook-domain-verification" content="r1tsk81ezpu46mj5wt6buamkfv786o" /> </head> <body class="privacy-policy page-template page-template-page-sections page-template-page-sections-php page page-id-3" data-template="base.twig"> <!-- Google Tag Manager (noscript) --> <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-KQVNZCB" height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> <!-- End Google Tag Manager (noscript) --> <div class="cursor d-none d-md-block"> <div class="cursor__team_view"> <i class="fa-sharp fa-regular fa-user"></i> </div> <div class="cursor__work_view"> <i class="fa-light fa-eye"></i> </div> </div> <header class="header bg-black"> <div class="container-fluid container-xl"> <div class="d-flex align-items-center justify-content-between justify-content-lg-start py-3 py-lg-0"> <div> <a href="https://thisiscrowd.com" class="header__logo-link d-none d-lg-block"> <svg xmlns="http://www.w3.org/2000/svg" width="122" height="36" fill="none"><g fill="#fff" clip-path="url(#clip0_43_2195)"><path d="M8.984 10.536c1.62 0 3.04.567 4.218 1.685l.044.043 1.974-1.972-.046-.044a9.194 9.194 0 00-2.722-1.803 8.673 8.673 0 00-3.468-.696c-2.485 0-4.622.884-6.35 2.628C.885 12.123 0 14.248 0 16.693c0 2.446.886 4.589 2.632 6.314 1.749 1.746 3.886 2.632 6.352 2.632 1.233 0 2.4-.235 3.468-.697a9.103 9.103 0 002.721-1.803l.047-.045-1.974-1.945-.045.04c-1.192 1.103-2.611 1.661-4.217 1.661-1.702 0-3.175-.6-4.377-1.784-1.205-1.22-1.816-2.691-1.816-4.372 0-1.682.61-3.144 1.815-4.345 1.205-1.203 2.678-1.813 4.378-1.813z"/><path d="M32.063 19.141c1.054-.422 1.934-1.138 2.614-2.127a5.758 5.758 0 001.051-3.349c0-1.612-.586-3.017-1.743-4.175-1.157-1.156-2.563-1.741-4.178-1.741H20.85v17.89h2.766v-6.036h5.32l3.505 6.036h3.2l-3.707-6.446.13-.052zm.874-5.476a3.05 3.05 0 01-.924 2.226c-.614.614-1.356.925-2.206.925l-6.192-.025v-6.255h6.192c.848 0 1.59.311 2.206.924.613.614.924 1.356.924 2.205z"/><path d="M100.038 7.749l-5.397 11.53-5.317-11.364-5.294 11.364-5.403-11.494-.017-.036h-2.877l8.296 17.723 5.294-11.364 5.318 11.365 8.232-17.634.042-.09h-2.877z"/><path d="M118.867 10.378c-1.73-1.745-3.858-2.63-6.324-2.63h-5.922v17.89h5.922c2.467 0 4.595-.884 6.325-2.63 1.747-1.726 2.632-3.85 2.632-6.314 0-2.463-.886-4.57-2.633-6.316zm-.157 6.316c0 1.68-.612 3.152-1.818 4.372-1.2 1.184-2.663 1.785-4.349 1.785h-3.158V10.536h3.158c1.684 0 3.147.61 4.349 1.813 1.206 1.201 1.818 2.663 1.818 4.345z"/><path d="M67.263 15.299c-.318-.06-.854-.152-1.222-.249a43.443 43.443 0 00-.493-5.358l-1.49.212c-4.172 3.985-10.86 4.057-15.996 4.42-.05.22-.098.454-.142.694-.498.14-1.141.247-1.4.296a10.042 10.042 0 00-.006 2.835c.426.075.958.174 1.398.299.044.234.092.465.143.689.63.051 1.28.097 1.945.145-.223.53-.438 1.1-.693 1.806-.393 1.085-.679 2.627-.786 3.21-.038.21.04.525.358.62.345.103 1.907.45 2.823.57a.54.54 0 00.625-.39s.089-.316-.174-.54c-.825-.705-.462-3.066.42-5.071 4.136.386 8.46 1.186 11.477 4.067l1.488.222c.3-1.906.45-3.516.504-5.355.384-.098 1.002-.22 1.221-.25.096-.746.129-1.826 0-2.872m3.81 1.493c-.024 7.774-6.331 14.105-14.13 14.08a15.156 15.156 0 01-4.16-.622l-4.855 1.896.28-4.285c-3.408-2.698-5.431-6.862-5.418-11.158.025-7.774 6.388-14.078 14.186-14.054 7.798.024 14.122 6.369 14.098 14.143m2.656.008C73.73 7.566 66.247.03 56.984 0 47.72-.029 40.162 7.46 40.133 16.695a16.706 16.706 0 005.389 12.361L45.147 36l7.646-2.995.177.045c1.266.302 2.669.486 3.973.486 9.165 0 16.787-7.444 16.787-16.736"/></g><defs><clipPath id="clip0_43_2195"><rect width="121.5" height="36" fill="#fff"/></clipPath></defs></svg> </a> <a href="https://thisiscrowd.com" class="header__logo-link d-lg-none"><img src="https://thisiscrowd.com/wp-content/themes/thisiscrowd2023-package/dist/images/simple-logo.svg" alt="Crowd"></a> </div> <div class="header__main-nav d-none d-lg-flex flex-grow-1 justify-content-lg-between"> <div class="d-flex flex-column flex-lg-row w-100 flex-grow-1 justify-content-lg-between"> <nav> <ul class="d-flex mb-0 align-items-lg-center align-items-lg-start flex-column flex-lg-row top-menu"> <li class=" menu-item menu-item-type-post_type menu-item-object-page menu-item-74 "> <a href="https://thisiscrowd.com/our-work/">Work</a> </li> <li class=" menu-item menu-item-type-post_type menu-item-object-page menu-item-65 has-mega-menu"> <a href="https://thisiscrowd.com/our-services/">Services</a> <div class="header-megamenu-wrap"> <div class="container-fluid container-xl"> <div class="header-widgets"> <div class="wp-block-columns is-layout-flex wp-container-core-columns-is-layout-3 wp-block-columns-is-layout-flex"> <div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="widget widget_nav_menu"><h2 class="widgettitle">Creative and Content</h2><div class="menu-services-creative-container"><ul id="menu-services-creative-1" class="menu"><li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2033"><a href="https://thisiscrowd.com/our-services/campaign-creative/">Creative Marketing Campaigns</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2036"><a href="https://thisiscrowd.com/our-services/marketing-strategy-production/">Marketing Strategy and Production</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2031"><a href="https://thisiscrowd.com/our-services/brand-development-guardianship/">Brand Development and Guardianship</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-1678"><a href="https://thisiscrowd.com/our-services/localisation-transcreation/">Content Translation, Localisation and Transcreation</a></li> </ul></div></div></div> <div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="widget widget_nav_menu"><h2 class="widgettitle">Digital Product</h2><div class="menu-services-digital-container"><ul id="menu-services-digital-1" class="menu"><li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-3389"><a href="https://thisiscrowd.com/our-services/web3/">Web 3</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2119"><a href="https://thisiscrowd.com/our-services/web-design-build/">Web Design and Build</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-1679"><a href="https://thisiscrowd.com/our-services/ux-ui-design/">UX/UI Design</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2100"><a href="https://thisiscrowd.com/our-services/seo-sem/">Search Engine Optimisation and Marketing (SEO/SEM)</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2123"><a href="https://thisiscrowd.com/our-services/cro-analytics/">Conversion Rate Optimisation (CRO) and Analytics</a></li> </ul></div></div></div> <div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="widget widget_nav_menu"><h2 class="widgettitle">Demand Generation</h2><div class="menu-services-demand-container"><ul id="menu-services-demand-1" class="menu"><li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2130"><a href="https://thisiscrowd.com/our-services/market-research-audience-insights/">Market Research and Audience Insights</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2138"><a href="https://thisiscrowd.com/our-services/lead-generation-nurturing/">Lead Generation and Nurturing</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2142"><a href="https://thisiscrowd.com/our-services/new-market-activation/">New Market Activation</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2137"><a href="https://thisiscrowd.com/our-services/reporting-data-analysis/">Marketing Reporting and Data Analysis</a></li> </ul></div></div></div> <div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="widget widget_nav_menu"><h2 class="widgettitle">Distribution</h2><div class="menu-services-distribution-container"><ul id="menu-services-distribution-1" class="menu"><li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2146"><a href="https://thisiscrowd.com/our-services/inbound-marketing-automation/">Inbound Marketing and Automation</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2152"><a href="https://thisiscrowd.com/our-services/virtual-events-conferences/">Virtual Events and Conferences</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2154"><a href="https://thisiscrowd.com/our-services/social-media-community-management/">Social Media and Community Management</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_service menu-item-2148"><a href="https://thisiscrowd.com/our-services/media-planning-buying/">Media Planning and Buying</a></li> </ul></div></div></div> </div> </div> </div> </div> </li> <li class=" menu-item menu-item-type-post_type menu-item-object-page menu-item-68 "> <a href="https://thisiscrowd.com/about-crowd/">About</a> </li> <li class=" menu-item menu-item-type-custom menu-item-object-custom menu-item-3212 "> <a target="_blank" href="https://news.thisiscrowd.com">News & Insights</a> </li> <li class=" menu-item menu-item-type-custom menu-item-object-custom menu-item-70 "> <a target="_blank" href="https://join.thisiscrowd.com">Careers</a> </li> </ul> </nav> <nav class="secondary-nav"> <ul class="d-flex mb-0 align-items-lg-center justify-ld-content-end align-items-lg-start flex-column flex-lg-row top-menu"> <li class=" menu-item menu-item-type-custom menu-item-object-custom menu-item-1673 has-mega-menu"> <a href="#">Locations</a> <div class="header-megamenu-wrap"> <div class="container-fluid container-xl"> <div class="header-widgets"> <div class="wp-block-columns menu-locations-grid is-layout-flex wp-container-core-columns-is-layout-4 wp-block-columns-is-layout-flex"> <div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="widget widget_nav_menu"><h2 class="widgettitle">North America</h2><div class="menu-location-menu-usa-container"><ul id="menu-location-menu-usa-1" class="menu"><li class="menu-item menu-item-type-post_type menu-item-object-c_location menu-item-2271"><a href="https://thisiscrowd.com/our-locations/new-york/" data-action="mapView" data-id="2264">New York</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_location menu-item-2111"><a href="https://thisiscrowd.com/our-locations/san-francisco/" data-action="mapView" data-id="2109">San Francisco</a></li> </ul></div></div></div> <div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="widget widget_nav_menu"><h2 class="widgettitle">Europe</h2><div class="menu-location-menu-europe-container"><ul id="menu-location-menu-europe-1" class="menu"><li class="menu-item menu-item-type-post_type menu-item-object-c_location menu-item-2097"><a href="https://thisiscrowd.com/our-locations/berlin/" data-action="mapView" data-id="2095">Berlin</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_location menu-item-2102"><a href="https://thisiscrowd.com/our-locations/madrid/" data-action="mapView" data-id="2098">Madrid</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_location menu-item-2290"><a href="https://thisiscrowd.com/our-locations/crowd-netherlands/" data-action="mapView" data-id="2174">Amsterdam</a></li> <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-3430"><a href="/our-locations/london/">London</a></li> </ul></div></div></div> <div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="widget widget_nav_menu"><h2 class="widgettitle">Middle East</h2><div class="menu-location-menu-me-container"><ul id="menu-location-menu-me-1" class="menu"><li class="menu-item menu-item-type-post_type menu-item-object-c_location menu-item-2108"><a href="https://thisiscrowd.com/our-locations/dubai/" data-action="mapView" data-id="2107">Dubai</a></li> <li class="menu-item menu-item-type-custom menu-item-object-custom menu-item-2907"><a href="#">Riyadh (launching soon)</a></li> </ul></div></div></div> <div class="wp-block-column is-layout-flow wp-block-column-is-layout-flow"><div class="widget widget_nav_menu"><h2 class="widgettitle">Asia Pacific</h2><div class="menu-location-menu-apac-container"><ul id="menu-location-menu-apac-1" class="menu"><li class="menu-item menu-item-type-post_type menu-item-object-c_location menu-item-2104"><a href="https://thisiscrowd.com/our-locations/chengdu/" data-action="mapView" data-id="2101">Chengdu</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_location menu-item-2299"><a href="https://thisiscrowd.com/our-locations/shenzhen/" data-action="mapView" data-id="2295">Shenzhen</a></li> <li class="menu-item menu-item-type-post_type menu-item-object-c_location menu-item-2304"><a href="https://thisiscrowd.com/our-locations/sydney/" data-action="mapView" data-id="2300">Sydney</a></li> </ul></div></div></div> </div> </div> </div> </div> </li> <li class="d-none d-lg-inline-block menu-item menu-item-type-custom menu-item-object-custom menu-item-1674 "> <a href="https://thisiscrowd.cn/">中国</a> </li> </ul> </nav> <div class="header__social-links d-lg-none mt-3 mt-lg-0"> <ul class="social-links list-unstyled list-root-inline d-flex align-items-center"> <li><a target="_blank" href="https://www.instagram.com/thisiscrowd/"><i class="fa-brands fa-instagram" aria-hidden="true"></i></a></li> <li><a target="_blank" href="https://www.facebook.com/CrowdCommunications"><i class="fa-brands fa-facebook-f" aria-hidden="true"></i></a></li> <li><a target="_blank" href="https://twitter.com/thisiscrowd"><i class="fa-brands fa-x-twitter" aria-hidden="true"></i></a></li> <li><a target="_blank" href="https://www.linkedin.com/company/this-is-crowd/mycompany/"><i class="fa-brands fa-linkedin-in" aria-hidden="true"></i></a></li> <li><a target="_blank" href="https://www.youtube.com/user/ThisIsCrowd"><i class="fa-brands fa-youtube" aria-hidden="true"></i></a></li> <li><a target="_blank" href="weixin://dl/chat?CrowdChina"><i class="fa-brands fa-weixin" aria-hidden="true"></i></a></li> <li><a target="_blank" href="https://developers.thisiscrowd.com/"><i class="fa-solid fa-file-code" aria-hidden="true"></i></a></li> </ul> </div> </div> </div> <div class="header__cta-buttons"> <!--HubSpot Call-to-Action Code --> <span class="hs-cta-wrapper" id="hs-cta-wrapper-11c1d97c-c823-4432-a997-bb8b379f7b3c"> <span class="hs-cta-node hs-cta-11c1d97c-c823-4432-a997-bb8b379f7b3c" id="hs-cta-11c1d97c-c823-4432-a997-bb8b379f7b3c"> <!--[if lte IE 8]><div id="hs-cta-ie-element"></div><![endif]--> <a class="btn btn-outline-warning" href="https://cta-redirect.hubspot.com/cta/redirect/7280898/11c1d97c-c823-4432-a997-bb8b379f7b3c">Speak to Us</a> </span> <script charset="utf-8" src="https://js.hscta.net/cta/current.js"></script> <script type="text/javascript"> hbspt.cta.load(7280898, '11c1d97c-c823-4432-a997-bb8b379f7b3c', { "useNewLoader": "true", "region": "na1" }); </script> </span> <!-- end HubSpot Call-to-Action Code --> </div> <div class="d-lg-none"> <button class="header__toggle-menu-btn" id="toggle-mobile-menu"> <span class="off"><i class="fa-sharp fa-regular fa-bars"></i></span> <span class="on"><i class="fa-sharp fa-solid fa-xmark"></i></span> </button> </div> </div> </div> </header> <section id="content" role="main"> <div class="wrapper text-body"> <div class="section-heading d-flex align-items-end padding-bottom-2 padding-top-2" style="background-color: #1E1F25"> <div class="container-md"> <div class="row "> <div class="reset-last-child col-xl-8 offset-xl-2"> <h6 class="section-heading__upper-text mb-0">CROWD</h6> <h1 class="h2 fw-bolder">Privacy Policy</h1> </div> </div> </div> </div> <section class="page-section padding-top-4 padding-bottom-6 section-content-editor font-size-default" style="background-color:#FFFFFF"> <div class="container"> <div class="row"> <div class="col-xl-6 offset-xl-3 col-lg-8 offset-lg-2 col-md-10 offset-md-1"> <div class="content-component content-clear reset-last-child"> <h2>At Crowd we are committed to protecting and respecting your privacy</h2> <p>This Privacy Policy informs you about how we use any personal data which you provide to us, including through our website thisiscrowd.com (the “<strong>Website</strong>”). The Website is owned and operated by [Crowd, incorporated and registered in England and Wales with company number 11084700 and registered office at 20-22 Wenlock Road, London N1 7GU[JD1] ] (referred to as “<strong>we</strong>”, “<strong>our</strong>”, “<strong>us</strong>” and “<strong>Crowd</strong>”)</p> </div> </div> </div> </div> </section> <section class="page-section padding-top-4 padding-bottom-6 section-content-editor font-size-default" style="background-color:#f1f2f9"> <div class="container"> <div class="row"> <div class="col-xl-6 offset-xl-3 col-lg-8 offset-lg-2 col-md-10 offset-md-1"> <div class="content-component content-clear reset-last-child"> <p><strong>When you use the website, or otherwise provide any information to us, you agree to this privacy policy, including the manner in which we use your information. if you do not agree to this privacy policy, or to any changes we subsequently make to this privacy policy, you must immediately stop using the website or otherwise providing any information to us.</strong></p> </div> </div> </div> </div> </section> <section class="page-section padding-top-4 padding-bottom-6 section-content-editor font-size-default" style="background-color:#FFFFFF"> <div class="container"> <div class="row"> <div class="col-xl-6 offset-xl-3 col-lg-8 offset-lg-2 col-md-10 offset-md-1"> <div class="content-component content-clear reset-last-child"> <h3>Owner and data controller</h3> <p>When we use personal data about you or others in connection with promoting and administering our business, providing our services, or recruitment, we do so as data controller.</p> <p>Please read this Privacy Policy carefully as it contains important information about the use of any information you provide to us. This Privacy Policy explains what information we collect about you, how we use your information and sets out the circumstances where it could be shared with third parties.</p> <p>We do not meet the criteria for a mandatory appointment of a Data Protection Officer under the UK General Data Protection Regulation. We have allocated informal responsibility to a person in our business who can deal with any data protection-related matters. You can contact our Privacy Manager by email at: results@thisiscrowd.com marking the subject line, ‘For the attention of the Privacy Manager’.</p> <h3>Types of personal data collected</h3> <p>Personal data, or personal information, means any information about a living individual from which that person can be identified, directly or indirectly. We may collect different kinds of personal data about you when you interact with us, including via the Website, social media, email, telephone, post or in person.<br /> We may also receive this information from third parties (for example, a publicly available source or from someone who has recommended us to you and given us your contact details).</p> <p><strong>We have grouped this information together as follows:</strong></p> <ul> <li><strong>Identity Data</strong>, such as your first name and last name.</li> <li><strong>Contact Data</strong>, such as your email address, telephone/fax number, address and other contact details.</li> <li><strong>Enquiry Data</strong>, such as your enquiries.</li> <li><strong>Correspondence Data</strong>, such as any correspondence between us and you about an enquiry.</li> <li><strong>Technical Data</strong> such as information collected automatically through this Website (or third-party services employed in this Website), which can include: the IP addresses or domain names of your computer, the URI addresses (Uniform Resource Identifier), the time of the request, the method utilized to submit the request to the server, the size of the file received in response, the numerical code indicating the status of the server’s answer (successful outcome, error, etc.), the country of origin, the features of the browser and the operating system utilized by you, the various time details per visit (e.g., the time spent on each page within the Website) and the details about the path followed within the Website with special reference to the sequence of pages visited, and other parameters about the device operating system and/or your IT environment.</li> <li><strong>Marketing and Communications Data</strong>, such as your communications preferences and how you have responded to our marketing communications.</li> <li><strong>Tracking Data</strong>, such as information we or others collect about you from cookies and similar tracking technologies, such as web beacons, pixels, and other digital identifiers.</li> </ul> <p>We also collect, use and share Aggregated Data such as statistical or demographic data for any purpose.</p> <p>Aggregated Data may be derived from your personal data but is not considered personal data in law as this data does not directly or indirectly reveal your identity. For example, we may aggregate your Technical Data to calculate the percentage of users accessing a specific feature, or we may aggregate your Marketing and Communications Data to calculate the percentage of recipients who open our email newsletter. However, if we combine or connect Aggregated Data with your personal data so that it can directly or indirectly identify you, we treat the combined data as personal data which will be used in accordance with this Privacy Policy.</p> <p>We do not usually collect any special categories of personal Data about you, but you may choose to disclose this data to us. Special categories of personal Data include details about your race or ethnicity, religious or philosophical beliefs, sex life, sexual orientation, political opinions, trade union membership, information about your health, and genetic and biometric data. Unless we are required to do so to comply with a legal obligation, or as an integral part of providing the Service to you, we do not usually collect any personal data about you relating to criminal convictions or offences.</p> <h3 class="wp-block-heading">Use of personal data</h3> <p>Our core purposes for processing personal data are to promote and operate the business of being a marketing firm, to provide marketing services to our clients, to maintain our client and business records, to recruit, and to comply with the law and regulations.</p> <p>We will only use your personal data when the law allows us to. Most commonly, we will use your personal data in the following circumstances:</p> <ul> <li>Where it is necessary for us in order to perform a contract which we are about to enter into, or have entered into, with you (for example, a contract between you and us for us to provide marketing services to you).</li> <li>Where it is necessary for our legitimate interests (or those of a third party) and your interests and fundamental rights do not override those interests (for example, to monitor our IT systems and protect them).</li> <li>Where we need to comply with a legal or regulatory obligation (for example, the rules which require us to verify the identity of someone before they can become a client).</li> <li>Where we have your consent to do so (for example, if you are not a client and you ask us to sign you up for news and updates by email).</li> </ul> <p>We may also use personal data as we believe to be necessary or appropriate: (a) to comply with applicable law, including laws outside your country of residence; (b) to comply with legal process; (c) to respond to requests from public and government authorities including those outside your country of residence; (d) to enforce our terms and conditions; (e) to protect our operations; (f) to protect our rights, privacy, safety or property, you or others; and (g) to allow us to pursue available remedies or limit the damages that we may sustain.</p> <p>In any case, we will gladly help to clarify the specific legal basis that applies to the processing, and in particular whether the provision of personal data is a statutory or contractual requirement, or a requirement necessary to enter into a contract.</p> <h3>Lawful basis for the processing</h3> <p>This table sets out in more detail the lawful basis we rely on to process personal data, depending on the category of personal data and the reason we are processing it. Note that we may process your personal data for more than one lawful basis depending on the specific purpose for which we are using your data.</p> <figure class="wp-block-table"> <table> <tbody> <tr> <td><strong>Purpose/activity</strong></td> <td><strong>Type of data</strong></td> <td><strong>Lawful basis for processing including basis of legitimate interest</strong></td> </tr> <tr> <td>To provide the Website to you</td> <td>(a) Technical Data</td> <td>Legitimate interests (to promote our business and services via the web)</td> </tr> <tr> <td>To register you as a recipient of our newsletters and updates and to download our e-books</td> <td>(a) Identity Data (b) Contact Data (c) Technical Data (d) Marketing and Communications Data</td> <td>(a) Legitimate interests, including for any soft opt-in (to undertake direct marketing to promote our business and services) (b) In the limited circumstances where the Privacy and Electronic Communications Regulations mandate that consent is required for electronic marketing, and we are not relying on your opt-in, the lawful basis will be consent (See Advertising, marketing and your communications preferences below)</td> </tr> <tr> <td>To manage our relationship with you which will include: (a) Notifying you about changes to our terms or Privacy Policy (b) Asking for feedback</td> <td>(a) Identity Data (b) Contact Data (c) Enquiry Data (d) Correspondence Data (e) Marketing and Communications Data</td> <td>(a) Performance of a contract with you (b) Necessary to comply with a legal obligation (c) Necessary for our legitimate interests (to keep our records updated and to ensure we provide our services on our most recently updated terms)</td> </tr> <tr> <td>To register you as a new client and respond to your enquiry</td> <td>(a) Identity Data (b) Contact Data (c) Enquiry Data (d) Correspondence Data</td> <td>(a) Necessary for our legitimate interests (for running our business, provision of administration and IT services, network security, to prevent fraud and in the context of a business reorganisation or group restructuring exercise)(b) Necessary to comply with a legal obligation</td> </tr> <tr> <td>To administer and protect our business and our Website (including troubleshooting, data analysis, testing, system maintenance, support, reporting and hosting of data)</td> <td>(a) Identity Data (b) Contact Data (c) Enquiry Data (d) Correspondence Data (e) Technical Data (f) Marketing and Communications Data</td> <td>(a) Necessary for our legitimate interests (for running our business, provision of administration and IT services, network security, to prevent fraud and in the context of a business reorganisation or group restructuring exercise)(b) Necessary to comply with a legal obligation</td> </tr> <tr> <td>To deliver relevant website content and advertisements to you and measure or understand the effectiveness of the advertising we serve to you</td> <td>(a) Identity Data (b) Contact Data (c) Enquiry Data (d) Correspondence Data (e) Technical Data (f) Tracking Data (g) Marketing and Communications Data</td> <td>Necessary for our legitimate interests (to study how customers use our products/services, to develop them, to grow our business and to inform our marketing strategy)</td> </tr> <tr> <td>To use data analytics to improve our Website and the client experience</td> <td>(a) Identity Data (b) Technical Data (c) Tracking Data</td> <td>Necessary for our legitimate interests (to define types of customers for our products and services, to keep our website updated and relevant, to develop our business and to inform and deliver our marketing strategy)</td> </tr> <tr> <td>To target potential new clients via social media and the web</td> <td>(a) Identity Data (b) Technical Data (c) Tracking Data</td> <td>Necessary for our legitimate interests (to engage with the new clients and potential new lawyers via social media and the web (for example, via LinkedIn))</td> </tr> </tbody> </table> </figure> <h3>Sharing your personal data</h3> <p>We may share your data with third parties to whom we have outsourced certain tasks, such as IT, business administration or marketing and analytics services.</p> <p>We may share your personal data with our insurers, our professional advisors (lawyers, bankers, auditors, corporate financiers and brokers) in connection with services they provide to us.</p> <p>We share personal data with the following third parties for advertising and analytics purposes:</p> <ul> <li>Facebook: we share your data with Facebook so that we can display adverts to you on Facebook. For more information on Facebook advertising, and how you can control your settings, see here.</li> <li>Google: we share your data with Google so that we can display adverts to you on the world wide web and make use of its Google Analytics product. For more information on Google, and how you can control your settings, see here.</li> </ul> <p>For more information on personal data sharing connected to advertising and marketing, see Advertising, marketing and your communications preferences below.</p> <p>We may also share data with third parties to whom we may choose to sell, transfer, or merge parts of our business or our assets. Alternatively, we may seek to acquire other businesses or merge with them. If a change happens to our business, then the new owners may use your personal data in the same way as set out in this Privacy Policy.</p> <p>We require all third parties to respect the security of personal data and to treat it in accordance with the law. We do not allow our third-party service providers to use your personal data for their own purposes and only permit them to process your personal data for specified purposes and in accordance with our instructions.</p> <p>We will not otherwise share personal information with any third party except where we are permitted to under data protection laws or required to by law.</p> <h3>Advertising, marketing and your communications preferences</h3> <p>We work with partners to try and promote the reach of our adverts and use analytics and retargeting for this reason. We use Tracking Data to deliver relevant online advertising, including via websites and social media. Tracking Data, and in particular cookies, help us to deliver website and social advertising that we believe is most relevant to you and to potential new clients and colleagues. The cookies used for this purpose are often placed on our website by specialist organisations – and this is also why when you have been on our Website, you might see an advert for us quite soon afterwards. The partners we work with are: Facebook, Google, Instagram, LinkedIn, Pinterest, Sign-Up.to, and Twitter.</p> <p>Cookies can also tell us if you have seen a specific advert, and how long it has been since you have seen it. This is helpful, because it means we can control the effectiveness of our adverts and control the number of times people might be shown our adverts. Cookies also help us understand if you have opened a marketing email, because we prefer not to send you correspondence you prefer not to read.</p> <p>If you want more information about Tracking Data, in particular cookies, see our Cookies Policy below.</p> <p>Almost all the cookies that relate to advertising are part of third-party online advertising networks. If you would like to read about how you can control which adverts you see online, see opt-out programs established by the <a href="https://digitaladvertisingalliance.org/" target="_blank" rel="noopener">Digital Advertising Alliance (United States)</a> and the <a href="http://www.youronlinechoices.eu/" target="_blank" rel="noopener">European Interactive Digital Advertising Alliance (Europe).</a></p> <p>Unfortunately, because the technical rules are not yet standardised, the Website currently does not respond to a Do Not Track signal.</p> <h3>International transfers</h3> <p>For data transfers taking place outside of the UK, we ensure that a similar degree of protection is afforded to it, either by making our own assessment of adequacy, or using one of the standard mechanisms available to us. These may include:</p> <ul> <li>Transfers to the EEA because these have been confirmed by the Information Commissioner’s Office as being adequate.</li> <li>Transfer to countries or organisations that have officially been deemed to provide an adequate level of protection for personal data by the Information Commissioner’s Office.</li> <li>Using specific contracts approved by the Information Commissioner’s Office.</li> </ul> <h3>Retention time</h3> <p>We will only keep your personal data for as long as necessary to fulfill the purposes for which we collected it, including for the purposes of satisfying any legal, accounting, or reporting requirements.</p> <p>To determine the appropriate retention period for personal data, we consider the amount, nature, and sensitivity of the personal data, the potential risk of harm from unauthorised use or disclosure of your personal data, the purposes for which we process your personal data and whether we can achieve those purposes through other means, and the applicable legal requirements.</p> <p>After a reasonable period of time, we will either delete or anonymize your information or, if this is not possible, then we will securely store your information and isolate it from any further use until deletion is possible.</p> <p>We retain personal data that you provide to us where we have an ongoing legitimate business need to do so (for example, as needed to comply with our legal obligations, resolve disputes and enforce our agreements).</p> <h3>Your rights</h3> <p>You may exercise certain rights regarding your personal data. In particular, you have the right to do the following:</p> <ul> <li><strong>Withdraw your consent at any time.</strong> You have the right to withdraw consent where you have previously given your consent to the processing of your personal data.</li> <li><strong>Object to processing of your personal data.</strong> You have the right to object to the processing of your personal data if the processing is carried out on a legal basis other than consent. Further details are provided in the dedicated section below.</li> <li><strong>Access your personal data.</strong> You have the right to learn if personal data is being processed by us, obtain disclosure regarding certain aspects of the processing and obtain a copy of the Data undergoing processing.</li> <li><strong>Verify and seek rectification.</strong> You have the right to verify the accuracy of your personal data and ask for it to be updated or corrected.</li> <li><strong>Restrict the processing of your personal data.</strong> You have the right, under certain circumstances, to restrict the processing of their personal data. In this case, you will not process their personal data for any purpose other than storing it.</li> <li><strong>Have your personal data deleted or otherwise removed.</strong> You have the right, under certain circumstances, to obtain the erasure of their personal data from us.</li> <li><strong>Receive your personal data and have it transferred to another controller.</strong> You have the right to receive your personal data in a structured, commonly used and machine-readable format and, if technically feasible, to have it transmitted to another controller without any hindrance. This provision is applicable provided that the personal data is processed by automated means and that the processing is based on your consent, on a contract which you are part of or on pre-contractual obligations thereof.</li> <li><strong>Lodge a complaint.</strong> You have the right to bring a claim before your competent data protection authority.</li> </ul> <p>Where personal data is processed for the purposes of the legitimate interests pursued by us, you may object to such processing by providing a ground related to their particular situation to justify the objection.</p> <p>You must know that, however, should your personal data be processed for direct marketing purposes, you can object to that processing at any time without providing any justification.</p> <h3>How to exercise these rights</h3> <p>Any requests to exercise your rights can be directed to us through the contact details provided in this document. These requests can be exercised free of charge and will be addressed by us as early as possible and always within one month.</p> <h3>Additional information about your personal data</h3> <p>In addition to the information contained in this Privacy Policy, this Website may provide you with additional and contextual information concerning particular services or the collection and processing of personal data upon request.</p> <h3>System logs and maintenance</h3> <p>For operation and maintenance purposes, this Website and any third-party services may collect files that record interaction with this Website (System logs) use other personal data (such as the IP Address) for this purpose.</p> <h3>Information not contained in this policy</h3> <p>More details concerning the collection or processing of personal data may be requested from us at any time. Please see the contact information at the beginning of this document.</p> <h3>Changes to this privacy policy</h3> <p>We reserve the right to make changes to this Privacy Policy at any time by notifying you on this page and possibly within this Website and/or &#8211; as far as technically and legally feasible &#8211; sending a notice to you via any contact information available to us.</p> <p>It is strongly recommended to check this page often, referring to the date of the last modification listed at the top.</p> <p>Should the changes affect processing activities performed on the basis of your consent, we shall collect new consent from you, where required.</p> <h2><strong>Contact</strong></h2> <p>If you experience any technical problems during your interaction with the Website, please contact us here: infrastructure AT thisiscrowd.com</p> <p>Queries, concerns or complaints regarding your privacy or this Privacy Policy: If you have queries regarding this Privacy Policy please contact us by sending an email to the Data Protection Officer: DPO AT thisiscrowd.com.</p> <p>In the United Kingdom we are supervised by the Information Commissioner’s Office (ICO). You can find out more about the ICO through its website: www.ico.org.uk</p> <h2><strong>Cookie Policy</strong></h2> <h3>What are cookies and how do they work?</h3> <p>“Cookies” are text-only pieces of information that a website transfers to an individual’s hard drive or other website-browsing equipment for record-keeping purposes. Cookies allow the website to remember important information that will make your use of the site more convenient. A cookie will typically contain the name of the domain from which the cookie has come, the “lifetime” of the cookie, and a randomly generated unique number or other value. Like most websites, we use different categories of cookies for a variety of purposes in order to improve your online experience.</p> <p>Depending on the purpose, we use session cookies, which are temporary cookies that remain in the cookie file of your browser until you leave the site, and persistent cookies, which remain in the cookie file of your browser to collect information that is used either in aggregate form to help us understand how our website is being used or how effective our marketing campaigns are, or to help us customise our Website for you.</p> <h3>What are the categories of cookies?</h3> <p>Cookies can be categorised, following the International Chamber of Commerce guide, as follows:</p> <h3>Strictly necessary cookies</h3> <p>‘Strictly necessary cookies’ tend to be session cookies which are deleted at the end of the browser session.</p> <p>Accepting these cookies is a condition of using the website, so if you prevent these cookies, we can’t guarantee how our website will perform during your visit.</p> <h3>Performance Cookies</h3> <p>‘Performance cookies’ collect information about how you use our website such as which pages you visit and if you experience any errors. These cookies don’t collect any information that could identify you – all the information is collected on an anonymous aggregate basis and is only used to help us improve how our website works, understand what interests our users and measure the effectiveness of our advertising. They also enable us to track the total number of visitors to our site. Most performance cookies tend to be session cookies which are deleted at the end of the browser session.</p> <p>In some cases, some of these cookies are managed for us by third parties, but we don’t allow the third party to use the cookies for any purpose other than those listed above. Some of these third-party performance cookies are persistent cookies.</p> <h3>Functionality Cookies</h3> <p>Functionality cookies, by their very nature, are persistent cookies so that we remember your computer when you return to our website.</p> <p>Some of these cookies are managed for us by third parties – where this is the case, we don’t allow the third party to use the cookies for any purpose other than those listed above.</p> <h3>Targeting Cookies</h3> <p>These cookies record your visit to our website, the pages you have visited and the links you have followed. We will use this information to make our website and the advertising displayed on it more relevant to your interests. We may also share this information with third parties for this purpose.] Only needed if targeting cookies are used.</p> <h3>How can I block and/or delete cookies?</h3> <p>Use the options in your web browser if you do not wish to receive a cookie or if you wish to set your browser to notify you when you receive a cookie. You can easily delete any cookies that have been installed in the cookie folder of your browser.</p> <h3>What Do We Use This Information For?</h3> <ul> <li>We use visitor contact information to send information about our company to prospective clients and interested parties, and to get in touch with them when necessary.</li> <li>Visitors who have subscribed to the Crowd mailing list are emailed periodically with information strictly relevant to Crowd and its activities. Your data is never shared with third party companies for the purposes of marketing or any other activity.</li> </ul> <h3>Google Analytics Cookie Usage on Websites</h3> <p>Important: Google Analytics does not collect any personal information about our website users.</p> <p>Google Analytics is a simple, easy-to-use tool that helps website owners measure how users interact with website content. As a user navigates between web pages, Google Analytics provides website owners JavaScript tags (libraries) to record information about the page a user has seen, for example the URL of the page. The Google Analytics JavaScript libraries use HTTP Cookies to “remember” what a user has done on previous pages / interactions with the website.</p> <p>Please click here to see a detailed description on Google Analytics policy. If you would like to learn how to manage or remove cookies which have been set on your device please visit http://www.aboutcookies.org (http://www.aboutcookies.org). We gather this information for internal use only and will not authorize the release of this information to anyone outside Crowd.</p> <h3>HubSpot Analytics</h3> <p>HubSpot Analytics uses cookies and beacons to track how long Customers and potential Customers are on our site, what marketing pages they visit, what marketing offers they respond to, and a visitor’s identity in order for us to improve our customer education material, set up accounts, and provide the Services.  For a description of all HubSpot cookies you can read about them on their site and check out their privacy policy.</p> <h3>Cookies we use</h3> <ul> <li>_hs_opt_out Strictly necessary cookie tracking user selection to opt out of Hubspot tracking. Expires after 177 days.</li> <li>_hs_opt_out_in Strictly necessary cookie tracking user selection to opt in and out of Hubspot tracking. Expires after 4 days.</li> <li>_ga_# Performance cookie used for Google Analytics to distinguish unique users by assigning a randomly generated number as a client identifier. It is included in each page request in a site and used to calculate visitor, session and campaign data for analytics reports.</li> <li>PHPSESSID Strictly necessary cookie providing website functions across pages. Expires after session.</li> </ul> </div> </div> </div> </div> </section> </div> </section> <div class="section-newsletter-prefooter padding-vertical-2" style="background-color: var(--bs-black); color: var(--bs-white)"> <div class="container"> <div class="d-flex flex-column gap-4 flex-sm-row justify-content-between align-items-center"> <h4 class="mb-0">Get personalised marketing insights</h4> <div> <div class="text-"> <a href="https://thisiscrowd.com/newsletter/" class="btn btn-outline-warning">Subscribe Now</a> </div> </div> </div> </div> </div> <footer id="footer" class="page-footer"> <div class="container-fluid container-xl"> <div class="page-footer__top d-sm-flex justify-content-between font-size-small"> <nav> <ul class=""> <li class=" menu-item menu-item-type-post_type menu-item-object-page menu-item-1797 "> <a href="https://thisiscrowd.com/about-crowd/the-crowd-group-marketing-agencies/">The Crowd Group</a> </li> <li class=" menu-item menu-item-type-post_type menu-item-object-page menu-item-privacy-policy current-menu-item page_item page-item-3 current_page_item menu-item-138 "> <a href="https://thisiscrowd.com/privacy-policy/">Privacy Policy</a> </li> <li class=" menu-item menu-item-type-post_type menu-item-object-page menu-item-2054 "> <a href="https://thisiscrowd.com/modern-slavery-statement/">Modern Slavery Statement</a> </li> <li class=" menu-item menu-item-type-custom menu-item-object-custom menu-item-3303 "> <a target="_blank" href="https://teamo.thisiscrowd.com/">Meet #TEAMO</a> </li> <li class=" menu-item menu-item-type-custom menu-item-object-custom menu-item-3362 "> <a target="_blank" href="https://crowd-merch.myspreadshop.co.uk/">Crowd Merch</a> </li> </ul> </nav> </div> <div class="page-footer__bottom d-flex flex-column-reverse flex-sm-row justify-content-between align-items-center"> <ul class="copyright-list d-md-flex mt-4 mt-sm-0"> <li>&copy; 2024 The Crowd Group Limited</li> <li>Company No: 11084700</li> </ul> <ul class="social-links list-unstyled list-root-inline d-flex align-items-center"> <li><a target="_blank" href="https://www.instagram.com/thisiscrowd/"><i class="fa-brands fa-instagram" aria-hidden="true"></i></a></li> <li><a target="_blank" href="https://www.facebook.com/CrowdCommunications"><i class="fa-brands fa-facebook-f" aria-hidden="true"></i></a></li> <li><a target="_blank" href="https://twitter.com/thisiscrowd"><i class="fa-brands fa-x-twitter" aria-hidden="true"></i></a></li> <li><a target="_blank" href="https://www.linkedin.com/company/this-is-crowd/mycompany/"><i class="fa-brands fa-linkedin-in" aria-hidden="true"></i></a></li> <li><a target="_blank" href="https://www.youtube.com/user/ThisIsCrowd"><i class="fa-brands fa-youtube" aria-hidden="true"></i></a></li> <li><a target="_blank" href="weixin://dl/chat?CrowdChina"><i class="fa-brands fa-weixin" aria-hidden="true"></i></a></li> <li><a target="_blank" href="https://developers.thisiscrowd.com/"><i class="fa-solid fa-file-code" aria-hidden="true"></i></a></li> </ul> </div> </div> </footer> <script type='text/javascript'> var crowdAjax = "https://thisiscrowd.com/wp-admin/admin-ajax.php"; // Pseudo-jQuery for Hubspot callbacks (function () { window.jQuery = window.jQuery || function (nodeOrSelector) { if (typeof (nodeOrSelector) == 'string') { return document.querySelector(s); } return nodeOrSelector; }; })(); </script> <style id='core-block-supports-inline-css'> .wp-container-core-columns-is-layout-1{flex-wrap:nowrap;}.wp-container-core-columns-is-layout-2{flex-wrap:nowrap;}.wp-container-core-columns-is-layout-3{flex-wrap:nowrap;}.wp-container-core-columns-is-layout-4{flex-wrap:nowrap;} </style> <script src="https://thisiscrowd.com/wp-content/themes/thisiscrowd2023-package/dist/js/deferred.js?ver=1694095914051" id="deferred.js-js"></script> <script id="https://thisiscrowd.com/wp-content/themes/thisiscrowd2023-package/dist/js/globe.js-js-after"> /*! For license information please see globe.js.LICENSE.txt */ (()=>{var e={296:e=>{function t(e,t,n){var r,i,a,s,o;function l(){var c=Date.now()-s;c<t&&c>=0?r=setTimeout(l,t-c):(r=null,n||(o=e.apply(a,i),a=i=null))}null==t&&(t=100);var c=function(){a=this,i=arguments,s=Date.now();var c=n&&!r;return r||(r=setTimeout(l,t)),c&&(o=e.apply(a,i),a=i=null),o};return c.clear=function(){r&&(clearTimeout(r),r=null)},c.flush=function(){r&&(o=e.apply(a,i),a=i=null,clearTimeout(r),r=null)},c}t.debounce=t,e.exports=t},448:(e,t,n)=>{"use strict";var r=n(294),i=n(142);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){c(e,t),c(e+"Capture",t)}function c(e,t){for(o[e]=t,e=0;e<t.length;e++)s.add(t[e])}var u=!("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]*$/,p={},f={};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(f,e)||!h.call(p,e)&&(d.test(e)?f[e]=!0:(p[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,b=Symbol.for("react.element"),A=Symbol.for("react.portal"),M=Symbol.for("react.fragment"),S=Symbol.for("react.strict_mode"),E=Symbol.for("react.profiler"),w=Symbol.for("react.provider"),T=Symbol.for("react.context"),C=Symbol.for("react.forward_ref"),R=Symbol.for("react.suspense"),P=Symbol.for("react.suspense_list"),B=Symbol.for("react.memo"),L=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 D=Symbol.iterator;function F(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=D&&e[D]||e["@@iterator"])?e:null}var U,N=Object.assign;function O(e){if(void 0===U)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);U=t&&t[1]||""}return"\n"+U+e}var k=!1;function z(e,t){if(!e||k)return"";k=!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{k=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?O(e):""}function H(e){switch(e.tag){case 5:return O(e.type);case 16:return O("Lazy");case 13:return O("Suspense");case 19:return O("SuspenseList");case 0:case 2:case 15:return z(e.type,!1);case 11:return z(e.type.render,!1);case 1:return z(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 A:return"Portal";case E:return"Profiler";case S:return"StrictMode";case R:return"Suspense";case P:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case T:return(e.displayName||"Context")+".Consumer";case w:return(e._context.displayName||"Context")+".Provider";case C:var t=e.render;return(e=e.displayName)||(e=""!==(e=t.displayName||t.name||"")?"ForwardRef("+e+")":"ForwardRef"),e;case B:return null!==(t=e.displayName||null)?t:G(e.type)||"Memo";case L: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 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 X(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 J(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 N({},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 N({},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 ce,ue,he=(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 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 pe={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},fe=["Webkit","ms","Moz","O"];function me(e,t,n){return null==t||"boolean"==typeof t||""===t?"":n||"number"!=typeof t||0===t||pe.hasOwnProperty(e)&&pe[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(pe).forEach((function(e){fe.forEach((function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),pe[t]=pe[e]}))}));var ve=N({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 _e=null;function be(e){return(e=e.target||e.srcElement||window).correspondingUseElement&&(e=e.correspondingUseElement),3===e.nodeType?e.parentNode:e}var Ae=null,Me=null,Se=null;function Ee(e){if(e=xi(e)){if("function"!=typeof Ae)throw Error(a(280));var t=e.stateNode;t&&(t=bi(t),Ae(e.stateNode,e.type,t))}}function we(e){Me?Se?Se.push(e):Se=[e]:Me=e}function Te(){if(Me){var e=Me,t=Se;if(Se=Me=null,Ee(e),t)for(e=0;e<t.length;e++)Ee(t[e])}}function Ce(e,t){return e(t)}function Re(){}var Pe=!1;function Be(e,t,n){if(Pe)return e(t,n);Pe=!0;try{return Ce(e,t,n)}finally{Pe=!1,(null!==Me||null!==Se)&&(Re(),Te())}}function Le(e,t){var n=e.stateNode;if(null===n)return null;var r=bi(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 De={};Object.defineProperty(De,"passive",{get:function(){Ie=!0}}),window.addEventListener("test",De,De),window.removeEventListener("test",De,De)}catch(ue){Ie=!1}function Fe(e,t,n,r,i,a,s,o,l){var c=Array.prototype.slice.call(arguments,3);try{t.apply(n,c)}catch(e){this.onError(e)}}var Ue=!1,Ne=null,Oe=!1,ke=null,ze={onError:function(e){Ue=!0,Ne=e}};function He(e,t,n,r,i,a,s,o,l){Ue=!1,Ne=null,Fe.apply(ze,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 We(e){if(Ge(e)!==e)throw Error(a(188))}function je(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 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))?Xe(e):null}function Xe(e){if(5===e.tag||6===e.tag)return e;for(e=e.child;null!==e;){var t=Xe(e);if(null!==t)return t;e=e.sibling}return null}var Je=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,ct=64,ut=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 pt(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 ft(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-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 _t(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var bt,At,Mt,St,Et,wt=!1,Tt=[],Ct=null,Rt=null,Pt=null,Bt=new Map,Lt=new Map,It=[],Dt="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 Ft(e,t){switch(e){case"focusin":case"focusout":Ct=null;break;case"dragenter":case"dragleave":Rt=null;break;case"mouseover":case"mouseout":Pt=null;break;case"pointerover":case"pointerout":Bt.delete(t.pointerId);break;case"gotpointercapture":case"lostpointercapture":Lt.delete(t.pointerId)}}function Ut(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))&&At(t),e):(e.eventSystemFlags|=r,t=e.targetContainers,null!==i&&-1===t.indexOf(i)&&t.push(i),e)}function Nt(e){var t=yi(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 Et(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 Ot(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))&&At(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 kt(e,t,n){Ot(e)&&n.delete(t)}function zt(){wt=!1,null!==Ct&&Ot(Ct)&&(Ct=null),null!==Rt&&Ot(Rt)&&(Rt=null),null!==Pt&&Ot(Pt)&&(Pt=null),Bt.forEach(kt),Lt.forEach(kt)}function Ht(e,t){e.blockedOn===t&&(e.blockedOn=null,wt||(wt=!0,i.unstable_scheduleCallback(i.unstable_NormalPriority,zt)))}function Gt(e){function t(t){return Ht(t,e)}if(0<Tt.length){Ht(Tt[0],e);for(var n=1;n<Tt.length;n++){var r=Tt[n];r.blockedOn===e&&(r.blockedOn=null)}}for(null!==Ct&&Ht(Ct,e),null!==Rt&&Ht(Rt,e),null!==Pt&&Ht(Pt,e),Bt.forEach(t),Lt.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;)Nt(n),null===n.blockedOn&&It.shift()}var Vt=_.ReactCurrentBatchConfig,Wt=!0;function jt(e,t,n,r){var i=xt,a=Vt.transition;Vt.transition=null;try{xt=1,Jt(e,t,n,r)}finally{xt=i,Vt.transition=a}}function Xt(e,t,n,r){var i=xt,a=Vt.transition;Vt.transition=null;try{xt=4,Jt(e,t,n,r)}finally{xt=i,Vt.transition=a}}function Jt(e,t,n,r){if(Wt){var i=Kt(e,t,n,r);if(null===i)Wr(e,t,r,Yt,n),Ft(e,r);else if(function(e,t,n,r,i){switch(t){case"focusin":return Ct=Ut(Ct,e,t,n,r,i),!0;case"dragenter":return Rt=Ut(Rt,e,t,n,r,i),!0;case"mouseover":return Pt=Ut(Pt,e,t,n,r,i),!0;case"pointerover":var a=i.pointerId;return Bt.set(a,Ut(Bt.get(a)||null,e,t,n,r,i)),!0;case"gotpointercapture":return a=i.pointerId,Lt.set(a,Ut(Lt.get(a)||null,e,t,n,r,i)),!0}return!1}(i,e,t,n,r))r.stopPropagation();else if(Ft(e,r),4&t&&-1<Dt.indexOf(e)){for(;null!==i;){var a=xi(i);if(null!==a&&bt(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=be(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 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 N(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,cn={eventPhase:0,bubbles:0,cancelable:0,timeStamp:function(e){return e.timeStamp||Date.now()},defaultPrevented:0,isTrusted:0},un=an(cn),hn=N({},cn,{view:0,detail:0}),dn=an(hn),pn=N({},hn,{screenX:0,screenY:0,clientX:0,clientY:0,pageX:0,pageY:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,getModifierState:En,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}}),fn=an(pn),mn=an(N({},pn,{dataTransfer:0})),gn=an(N({},hn,{relatedTarget:0})),vn=an(N({},cn,{animationName:0,elapsedTime:0,pseudoElement:0})),yn=N({},cn,{clipboardData:function(e){return"clipboardData"in e?e.clipboardData:window.clipboardData}}),xn=an(yn),_n=an(N({},cn,{data:0})),bn={Esc:"Escape",Spacebar:" ",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Win:"OS",Menu:"ContextMenu",Apps:"ContextMenu",Scroll:"ScrollLock",MozPrintableKey:"Unidentified"},An={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 En(){return Sn}var wn=N({},hn,{key:function(e){if(e.key){var t=bn[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?An[e.keyCode]||"Unidentified":""},code:0,location:0,ctrlKey:0,shiftKey:0,altKey:0,metaKey:0,repeat:0,locale:0,getModifierState:En,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}}),Tn=an(wn),Cn=an(N({},pn,{pointerId:0,width:0,height:0,pressure:0,tangentialPressure:0,tiltX:0,tiltY:0,twist:0,pointerType:0,isPrimary:0})),Rn=an(N({},hn,{touches:0,targetTouches:0,changedTouches:0,altKey:0,metaKey:0,ctrlKey:0,shiftKey:0,getModifierState:En})),Pn=an(N({},cn,{propertyName:0,elapsedTime:0,pseudoElement:0})),Bn=N({},pn,{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(Bn),In=[9,13,27,32],Dn=u&&"CompositionEvent"in window,Fn=null;u&&"documentMode"in document&&(Fn=document.documentMode);var Un=u&&"TextEvent"in window&&!Fn,Nn=u&&(!Dn||Fn&&8<Fn&&11>=Fn),On=String.fromCharCode(32),kn=!1;function zn(e,t){switch(e){case"keyup":return-1!==In.indexOf(t.keyCode);case"keydown":return 229!==t.keyCode;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Hn(e){return"object"==typeof(e=e.detail)&&"data"in e?e.data:null}var Gn=!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){we(r),0<(t=Xr(t,"onChange")).length&&(n=new un("onChange","change",null,n,r),e.push({event:n,listeners:t}))}var Xn=null,Jn=null;function Yn(e){Or(e,0)}function Kn(e){if(J(_i(e)))return e}function qn(e,t){if("change"===e)return t}var Qn=!1;if(u){var Zn;if(u){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(){Xn&&(Xn.detachEvent("onpropertychange",nr),Jn=Xn=null)}function nr(e){if("value"===e.propertyName&&Kn(Jn)){var t=[];jn(t,Jn,e,be(e)),Be(Yn,t)}}function rr(e,t,n){"focusin"===e?(tr(),Jn=n,(Xn=t).attachEvent("onpropertychange",nr)):"focusout"===e&&tr()}function ir(e){if("selectionchange"===e||"keyup"===e||"keydown"===e)return Kn(Jn)}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 cr(e){for(;e&&e.firstChild;)e=e.firstChild;return e}function ur(e,t){var n,r=cr(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=cr(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 pr(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 fr(e){var t=dr(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&hr(n.ownerDocument.documentElement,n)){if(null!==r&&pr(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=ur(n,a);var s=ur(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=u&&"documentMode"in document&&11>=document.documentMode,gr=null,vr=null,yr=null,xr=!1;function _r(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)&&pr(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=Xr(vr,"onSelect")).length&&(t=new un("onSelect","select",null,t,n),e.push({event:t,listeners:r}),t.target=gr)))}function br(e,t){var n={};return n[e.toLowerCase()]=t.toLowerCase(),n["Webkit"+e]="webkit"+t,n["Moz"+e]="moz"+t,n}var Ar={animationend:br("Animation","AnimationEnd"),animationiteration:br("Animation","AnimationIteration"),animationstart:br("Animation","AnimationStart"),transitionend:br("Transition","TransitionEnd")},Mr={},Sr={};function Er(e){if(Mr[e])return Mr[e];if(!Ar[e])return e;var t,n=Ar[e];for(t in n)if(n.hasOwnProperty(t)&&t in Sr)return Mr[e]=n[t];return e}u&&(Sr=document.createElement("div").style,"AnimationEvent"in window||(delete Ar.animationend.animation,delete Ar.animationiteration.animation,delete Ar.animationstart.animation),"TransitionEvent"in window||delete Ar.transitionend.transition);var wr=Er("animationend"),Tr=Er("animationiteration"),Cr=Er("animationstart"),Rr=Er("transitionend"),Pr=new Map,Br="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 Ir=0;Ir<Br.length;Ir++){var Dr=Br[Ir];Lr(Dr.toLowerCase(),"on"+(Dr[0].toUpperCase()+Dr.slice(1)))}Lr(wr,"onAnimationEnd"),Lr(Tr,"onAnimationIteration"),Lr(Cr,"onAnimationStart"),Lr("dblclick","onDoubleClick"),Lr("focusin","onFocus"),Lr("focusout","onBlur"),Lr(Rr,"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 Fr="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(" "),Ur=new Set("cancel close invalid load scroll toggle".split(" ").concat(Fr));function Nr(e,t,n){var r=e.type||"unknown-event";e.currentTarget=n,function(e,t,n,r,i,s,o,l,c){if(He.apply(this,arguments),Ue){if(!Ue)throw Error(a(198));var u=Ne;Ue=!1,Ne=null,Oe||(Oe=!0,ke=u)}}(r,t,void 0,e),e.currentTarget=null}function Or(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,c=o.currentTarget;if(o=o.listener,l!==a&&i.isPropagationStopped())break e;Nr(i,o,c),a=l}else for(s=0;s<r.length;s++){if(l=(o=r[s]).instance,c=o.currentTarget,o=o.listener,l!==a&&i.isPropagationStopped())break e;Nr(i,o,c),a=l}}}if(Oe)throw e=ke,Oe=!1,ke=null,e}function kr(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 zr(e,t,n){var r=0;t&&(r|=4),Vr(n,e,r,t)}var Hr="_reactListening"+Math.random().toString(36).slice(2);function Gr(e){if(!e[Hr]){e[Hr]=!0,s.forEach((function(t){"selectionchange"!==t&&(Ur.has(t)||zr(t,!1,e),zr(t,!0,e))}));var t=9===e.nodeType?e:e.ownerDocument;null===t||t[Hr]||(t[Hr]=!0,zr("selectionchange",!1,t))}}function Vr(e,t,n,r){switch(qt(t)){case 1:var i=jt;break;case 4:i=Xt;break;default:i=Jt}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 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}Be((function(){var r=a,i=be(n),s=[];e:{var o=Pr.get(e);if(void 0!==o){var l=un,c=e;switch(e){case"keypress":if(0===tn(n))break e;case"keydown":case"keyup":l=Tn;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=fn;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=Rn;break;case wr:case Tr:case Cr:l=vn;break;case Rr: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=Cn}var u=0!=(4&t),h=!u&&"scroll"===e,d=u?null!==o?o+"Capture":null:o;u=[];for(var p,f=r;null!==f;){var m=(p=f).stateNode;if(5===p.tag&&null!==m&&(p=m,null!==d&&null!=(m=Le(f,d))&&u.push(jr(f,m,p))),h)break;f=f.return}0<u.length&&(o=new l(o,c,null,n,i),s.push({event:o,listeners:u}))}}if(0==(7&t)){if(l="mouseout"===e||"pointerout"===e,(!(o="mouseover"===e||"pointerover"===e)||n===_e||!(c=n.relatedTarget||n.fromElement)||!yi(c)&&!c[fi])&&(l||o)&&(o=i.window===i?i:(o=i.ownerDocument)?o.defaultView||o.parentWindow:window,l?(l=r,null!==(c=(c=n.relatedTarget||n.toElement)?yi(c):null)&&(c!==(h=Ge(c))||5!==c.tag&&6!==c.tag)&&(c=null)):(l=null,c=r),l!==c)){if(u=fn,m="onMouseLeave",d="onMouseEnter",f="mouse","pointerout"!==e&&"pointerover"!==e||(u=Cn,m="onPointerLeave",d="onPointerEnter",f="pointer"),h=null==l?o:_i(l),p=null==c?o:_i(c),(o=new u(m,f+"leave",l,n,i)).target=h,o.relatedTarget=p,m=null,yi(i)===r&&((u=new u(d,f+"enter",c,n,i)).target=p,u.relatedTarget=h,m=u),h=m,l&&c)e:{for(d=c,f=0,p=u=l;p;p=Jr(p))f++;for(p=0,m=d;m;m=Jr(m))p++;for(;0<f-p;)u=Jr(u),f--;for(;0<p-f;)d=Jr(d),p--;for(;f--;){if(u===d||null!==d&&u===d.alternate)break e;u=Jr(u),d=Jr(d)}u=null}else u=null;null!==l&&Yr(s,o,l,u,!1),null!==c&&null!==h&&Yr(s,h,c,u,!0)}if("select"===(l=(o=r?_i(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?_i(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,_r(s,n,i);break;case"selectionchange":if(mr)break;case"keydown":case"keyup":_r(s,n,i)}var y;if(Dn)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 Gn?zn(e,n)&&(x="onCompositionEnd"):"keydown"===e&&229===n.keyCode&&(x="onCompositionStart");x&&(Nn&&"ko"!==n.locale&&(Gn||"onCompositionStart"!==x?"onCompositionEnd"===x&&Gn&&(y=en()):(Zt="value"in(Qt=i)?Qt.value:Qt.textContent,Gn=!0)),0<(v=Xr(r,x)).length&&(x=new _n(x,e,null,n,i),s.push({event:x,listeners:v}),(y||null!==(y=Hn(n)))&&(x.data=y))),(y=Un?function(e,t){switch(e){case"compositionend":return Hn(t);case"keypress":return 32!==t.which?null:(kn=!0,On);case"textInput":return(e=t.data)===On&&kn?null:e;default:return null}}(e,n):function(e,t){if(Gn)return"compositionend"===e||!Dn&&zn(e,t)?(e=en(),$t=Zt=Qt=null,Gn=!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 Nn&&"ko"!==t.locale?null:t.data}}(e,n))&&0<(r=Xr(r,"onBeforeInput")).length&&(i=new _n("onBeforeInput","beforeinput",null,n,i),s.push({event:i,listeners:r}),i.data=y)}Or(s,t)}))}function jr(e,t,n){return{instance:e,listener:t,currentTarget:n}}function Xr(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 Jr(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,c=o.stateNode;if(null!==l&&l===r)break;5===o.tag&&null!==c&&(o=c,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 Gt(t);r--}else"$"!==n&&"$?"!==n&&"$!"!==n||r++;n=i}while(n);Gt(t)}function ci(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 ui(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,pi="__reactProps$"+hi,fi="__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[fi]||n[di]){if(n=t.alternate,null!==t.child||null!==n&&null!==n.child)for(e=ui(e);null!==e;){if(n=e[di])return n;e=ui(e)}return t}n=(e=n).parentNode}return null}function xi(e){return!(e=e[di]||e[fi])||5!==e.tag&&6!==e.tag&&13!==e.tag&&3!==e.tag?null:e}function _i(e){if(5===e.tag||6===e.tag)return e.stateNode;throw Error(a(33))}function bi(e){return e[pi]||null}var Ai=[],Mi=-1;function Si(e){return{current:e}}function Ei(e){0>Mi||(e.current=Ai[Mi],Ai[Mi]=null,Mi--)}function wi(e,t){Mi++,Ai[Mi]=e.current,e.current=t}var Ti={},Ci=Si(Ti),Ri=Si(!1),Pi=Ti;function Bi(e,t){var n=e.type.contextTypes;if(!n)return Ti;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 Ii(){Ei(Ri),Ei(Ci)}function Di(e,t,n){if(Ci.current!==Ti)throw Error(a(168));wi(Ci,t),wi(Ri,n)}function Fi(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 N({},n,r)}function Ui(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||Ti,Pi=Ci.current,wi(Ci,e),wi(Ri,Ri.current),!0}function Ni(e,t,n){var r=e.stateNode;if(!r)throw Error(a(169));n?(e=Fi(e,t,Pi),r.__reactInternalMemoizedMergedChildContext=e,Ei(Ri),Ei(Ci),wi(Ci,e)):Ei(Ri),wi(Ri,n)}var Oi=null,ki=!1,zi=!1;function Hi(e){null===Oi?Oi=[e]:Oi.push(e)}function Gi(){if(!zi&&null!==Oi){zi=!0;var e=0,t=xt;try{var n=Oi;for(xt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Oi=null,ki=!1}catch(t){throw null!==Oi&&(Oi=Oi.slice(e+1)),Je($e,Gi),t}finally{xt=t,zi=!1}}return null}var Vi=[],Wi=0,ji=null,Xi=0,Ji=[],Yi=0,Ki=null,qi=1,Qi="";function Zi(e,t){Vi[Wi++]=Xi,Vi[Wi++]=ji,ji=e,Xi=t}function $i(e,t,n){Ji[Yi++]=qi,Ji[Yi++]=Qi,Ji[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,Xi=Vi[--Wi],Vi[Wi]=null;for(;e===Ki;)Ki=Ji[--Yi],Ji[Yi]=null,Qi=Ji[--Yi],Ji[Yi]=null,qi=Ji[--Yi],Ji[Yi]=null}var na=null,ra=null,ia=!1,aa=null;function sa(e,t){var n=Bc(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=ci(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=Bc(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 ca(e){if(ia){var t=ra;if(t){var n=t;if(!oa(e,t)){if(la(e))throw Error(a(418));t=ci(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 ua(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 ua(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=ci(t.nextSibling)}if(ua(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=ci(e.nextSibling);break e}t--}else"$"!==n&&"$!"!==n&&"$?"!==n||t++}e=e.nextSibling}ra=null}}else ra=na?ci(e.stateNode.nextSibling):null;return!0}function da(){for(var e=ra;e;)e=ci(e.nextSibling)}function pa(){ra=na=null,ia=!1}function fa(e){null===aa?aa=[e]:aa.push(e)}var ma=_.ReactCurrentBatchConfig;function ga(e,t){if(e&&e.defaultProps){for(var n in t=N({},t),e=e.defaultProps)void 0===t[n]&&(t[n]=e[n]);return t}return t}var va=Si(null),ya=null,xa=null,_a=null;function ba(){_a=xa=ya=null}function Aa(e){var t=va.current;Ei(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,_a=xa=null,null!==(e=e.dependencies)&&null!==e.firstContext&&(0!=(e.lanes&t)&&(_o=!0),e.firstContext=null)}function Ea(e){var t=e._currentValue;if(_a!==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 wa=null;function Ta(e){null===wa?wa=[e]:wa.push(e)}function Ca(e,t,n,r){var i=t.interleaved;return null===i?(n.next=n,Ta(t)):(n.next=i.next,i.next=n),t.interleaved=n,Ra(e,r)}function Ra(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 Ba(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 Ia(e,t){return{eventTime:e,lane:t,tag:0,payload:null,callback:null,next:null}}function Da(e,t,n){var r=e.updateQueue;if(null===r)return null;if(r=r.shared,0!=(2&Cl)){var i=r.pending;return null===i?t.next=t:(t.next=i.next,i.next=t),r.pending=t,Ra(e,n)}return null===(i=r.interleaved)?(t.next=t,Ta(r)):(t.next=i.next,i.next=t),r.interleaved=t,Ra(e,n)}function Fa(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 Ua(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 Na(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,c=l.next;l.next=null,null===s?a=c:s.next=c,s=l;var u=e.alternate;null!==u&&(o=(u=u.updateQueue).lastBaseUpdate)!==s&&(null===o?u.firstBaseUpdate=c:o.next=c,u.lastBaseUpdate=l)}if(null!==a){var h=i.baseState;for(s=0,u=c=l=null,o=a;;){var d=o.lane,p=o.eventTime;if((r&d)===d){null!==u&&(u=u.next={eventTime:p,lane:0,tag:o.tag,payload:o.payload,callback:o.callback,next:null});e:{var f=e,m=o;switch(d=t,p=n,m.tag){case 1:if("function"==typeof(f=m.payload)){h=f.call(p,h,d);break e}h=f;break e;case 3:f.flags=-65537&f.flags|128;case 0:if(null==(d="function"==typeof(f=m.payload)?f.call(p,h,d):f))break e;h=N({},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 p={eventTime:p,lane:d,tag:o.tag,payload:o.payload,callback:o.callback,next:null},null===u?(c=u=p,l=h):u=u.next=p,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===u&&(l=h),i.baseState=l,i.firstBaseUpdate=c,i.lastBaseUpdate=u,null!==(t=i.shared.interleaved)){i=t;do{s|=i.lane,i=i.next}while(i!==t)}else null===a&&(i.shared.lanes=0);Ul|=s,e.lanes=s,e.memoizedState=h}}function Oa(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 ka=(new r.Component).refs;function za(e,t,n,r){n=null==(n=n(r,t=e.memoizedState))?t:N({},t,n),e.memoizedState=n,0===e.lanes&&(e.updateQueue.baseState=n)}var Ha={isMounted:function(e){return!!(e=e._reactInternals)&&Ge(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),a=Ia(r,i);a.payload=t,null!=n&&(a.callback=n),null!==(t=Da(e,a,i))&&(nc(t,e,i,r),Fa(t,e,i))},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=ec(),i=tc(e),a=Ia(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),null!==(t=Da(e,a,i))&&(nc(t,e,i,r),Fa(t,e,i))},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=ec(),r=tc(e),i=Ia(n,r);i.tag=2,null!=t&&(i.callback=t),null!==(t=Da(e,i,r))&&(nc(t,e,r,n),Fa(t,e,r))}};function Ga(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=Ti,a=t.contextType;return"object"==typeof a&&null!==a?a=Ea(a):(i=Li(t)?Pi:Ci.current,a=(r=null!=(r=t.contextTypes))?Bi(e,i):Ti),t=new t(n,a),e.memoizedState=null!==t.state&&void 0!==t.state?t.state:null,t.updater=Ha,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&&Ha.enqueueReplaceState(t,t.state,null)}function ja(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=ka,Ba(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=Ea(a):(a=Li(t)?Pi:Ci.current,i.context=Bi(e,a)),i.state=e.memoizedState,"function"==typeof(a=t.getDerivedStateFromProps)&&(za(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&&Ha.enqueueReplaceState(i,i.state,null),Na(e,n,i,r),i.state=e.memoizedState),"function"==typeof i.componentDidMount&&(e.flags|=4194308)}function Xa(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===ka&&(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 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 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=Ic(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=Nc(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?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=Xa(e,t,n),r.return=e,r):((r=Dc(n.type,n.key,n.props,null,e.mode,r)).ref=Xa(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=Oc(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=Fc(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=Nc(""+t,e.mode,n)).return=e,t;if("object"==typeof t&&null!==t){switch(t.$$typeof){case b:return(n=Dc(t.type,t.key,t.props,null,e.mode,n)).ref=Xa(e,null,t),n.return=e,n;case A:return(t=Oc(t,e.mode,n)).return=e,t;case L:return d(e,(0,t._init)(t._payload),n)}if(te(t)||F(t))return(t=Fc(t,e.mode,n,null)).return=e,t;Ja(e,t)}return null}function p(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 b:return n.key===i?c(e,t,n,r):null;case A:return n.key===i?u(e,t,n,r):null;case L:return p(e,t,(i=n._init)(n._payload),r)}if(te(n)||F(n))return null!==i?null:h(e,t,n,r,null);Ja(e,n)}return null}function f(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 b:return c(t,e=e.get(null===r.key?n:r.key)||null,r,i);case A:return u(t,e=e.get(null===r.key?n:r.key)||null,r,i);case L:return f(e,t,n,(0,r._init)(r._payload),i)}if(te(r)||F(r))return h(t,e=e.get(n)||null,r,i,null);Ja(t,r)}return null}function m(i,a,o,l){for(var c=null,u=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=p(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===u?c=v:u.sibling=v,u=v,h=g}if(m===o.length)return n(i,h),ia&&Zi(i,m),c;if(null===h){for(;m<o.length;m++)null!==(h=d(i,o[m],l))&&(a=s(h,a,m),null===u?c=h:u.sibling=h,u=h);return ia&&Zi(i,m),c}for(h=r(i,h);m<o.length;m++)null!==(g=f(h,i,m,o[m],l))&&(e&&null!==g.alternate&&h.delete(null===g.key?m:g.key),a=s(g,a,m),null===u?c=g:u.sibling=g,u=g);return e&&h.forEach((function(e){return t(i,e)})),ia&&Zi(i,m),c}function g(i,o,l,c){var u=F(l);if("function"!=typeof u)throw Error(a(150));if(null==(l=u.call(l)))throw Error(a(151));for(var h=u=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=p(i,m,y.value,c);if(null===x){null===m&&(m=v);break}e&&m&&null===x.alternate&&t(i,m),o=s(x,o,g),null===h?u=x:h.sibling=x,h=x,m=v}if(y.done)return n(i,m),ia&&Zi(i,g),u;if(null===m){for(;!y.done;g++,y=l.next())null!==(y=d(i,y.value,c))&&(o=s(y,o,g),null===h?u=y:h.sibling=y,h=y);return ia&&Zi(i,g),u}for(m=r(i,m);!y.done;g++,y=l.next())null!==(y=f(m,i,g,y.value,c))&&(e&&null!==y.alternate&&m.delete(null===y.key?g:y.key),o=s(y,o,g),null===h?u=y:h.sibling=y,h=y);return e&&m.forEach((function(e){return t(i,e)})),ia&&Zi(i,g),u}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 b:e:{for(var c=s.key,u=a;null!==u;){if(u.key===c){if((c=s.type)===M){if(7===u.tag){n(r,u.sibling),(a=i(u,s.props.children)).return=r,r=a;break e}}else if(u.elementType===c||"object"==typeof c&&null!==c&&c.$$typeof===L&&Ya(c)===u.type){n(r,u.sibling),(a=i(u,s.props)).ref=Xa(r,u,s),a.return=r,r=a;break e}n(r,u);break}t(r,u),u=u.sibling}s.type===M?((a=Fc(s.props.children,r.mode,l,s.key)).return=r,r=a):((l=Dc(s.type,s.key,s.props,null,r.mode,l)).ref=Xa(r,a,s),l.return=r,r=l)}return o(r);case A:e:{for(u=s.key;null!==a;){if(a.key===u){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=Oc(s,r.mode,l)).return=r,r=a}return o(r);case L:return e(r,a,(u=s._init)(s._payload),l)}if(te(s))return m(r,a,s,l);if(F(s))return g(r,a,s,l);Ja(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=Nc(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(wi(ts,t),wi(es,e),wi($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)}Ei($a),wi($a,t)}function is(){Ei($a),Ei(es),Ei(ts)}function as(e){ns(ts.current);var t=ns($a.current),n=le(t,e.type);t!==n&&(wi(es,e),wi($a,n))}function ss(e){es.current===e&&(Ei($a),Ei(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 cs=[];function us(){for(var e=0;e<cs.length;e++)cs[e]._workInProgressVersionPrimary=null;cs.length=0}var hs=_.ReactCurrentDispatcher,ds=_.ReactCurrentBatchConfig,ps=0,fs=null,ms=null,gs=null,vs=!1,ys=!1,xs=0,_s=0;function bs(){throw Error(a(321))}function As(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(ps=s,fs=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,ps=0,gs=ms=fs=null,vs=!1,t)throw Error(a(300));return e}function Ss(){var e=0!==xs;return xs=0,e}function Es(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===gs?fs.memoizedState=gs=e:gs=gs.next=e,gs}function ws(){if(null===ms){var e=fs.alternate;e=null!==e?e.memoizedState:null}else e=ms.next;var t=null===gs?fs.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?fs.memoizedState=gs=e:gs=gs.next=e}return gs}function Ts(e,t){return"function"==typeof t?t(e):t}function Cs(e){var t=ws(),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,c=null,u=s;do{var h=u.lane;if((ps&h)===h)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 d={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=d,o=r):c=c.next=d,fs.lanes|=h,Ul|=h}u=u.next}while(null!==u&&u!==s);null===c?o=r:c.next=l,or(r,t.memoizedState)||(_o=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,n.lastRenderedState=r}if(null!==(e=n.interleaved)){i=e;do{s=i.lane,fs.lanes|=s,Ul|=s,i=i.next}while(i!==e)}else null===i&&(n.lanes=0);return[t.memoizedState,n.dispatch]}function Rs(e){var t=ws(),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)||(_o=!0),t.memoizedState=s,null===t.baseQueue&&(t.baseState=s),n.lastRenderedState=s}return[s,r]}function Ps(){}function Bs(e,t){var n=fs,r=ws(),i=t(),s=!or(r.memoizedState,i);if(s&&(r.memoizedState=i,_o=!0),r=r.queue,Vs(Ds.bind(null,n,r,e),[e]),r.getSnapshot!==t||s||null!==gs&&1&gs.memoizedState.tag){if(n.flags|=2048,Os(9,Is.bind(null,n,r,i,t),void 0,null),null===Rl)throw Error(a(349));0!=(30&ps)||Ls(n,t,i)}return i}function Ls(e,t,n){e.flags|=16384,e={getSnapshot:t,value:n},null===(t=fs.updateQueue)?(t={lastEffect:null,stores:null},fs.updateQueue=t,t.stores=[e]):null===(n=t.stores)?t.stores=[e]:n.push(e)}function Is(e,t,n,r){t.value=n,t.getSnapshot=r,Fs(t)&&Us(e)}function Ds(e,t,n){return n((function(){Fs(t)&&Us(e)}))}function Fs(e){var t=e.getSnapshot;e=e.value;try{var n=t();return!or(e,n)}catch(e){return!0}}function Us(e){var t=Ra(e,1);null!==t&&nc(t,e,1,-1)}function Ns(e){var t=Es();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ts,lastRenderedState:e},t.queue=e,e=e.dispatch=to.bind(null,fs,e),[t.memoizedState,e]}function Os(e,t,n,r){return e={tag:e,create:t,destroy:n,deps:r,next:null},null===(t=fs.updateQueue)?(t={lastEffect:null,stores:null},fs.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 ks(){return ws().memoizedState}function zs(e,t,n,r){var i=Es();fs.flags|=e,i.memoizedState=Os(1|t,n,void 0,void 0===r?null:r)}function Hs(e,t,n,r){var i=ws();r=void 0===r?null:r;var a=void 0;if(null!==ms){var s=ms.memoizedState;if(a=s.destroy,null!==r&&As(r,s.deps))return void(i.memoizedState=Os(t,n,a,r))}fs.flags|=e,i.memoizedState=Os(1|t,n,a,r)}function Gs(e,t){return zs(8390656,8,e,t)}function Vs(e,t){return Hs(2048,8,e,t)}function Ws(e,t){return Hs(4,2,e,t)}function js(e,t){return Hs(4,4,e,t)}function Xs(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 Js(e,t,n){return n=null!=n?n.concat([e]):null,Hs(4,4,Xs.bind(null,t,e),n)}function Ys(){}function Ks(e,t){var n=ws();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&As(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function qs(e,t){var n=ws();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&As(t,r[1])?r[0]:(e=e(),n.memoizedState=[e,t],e)}function Qs(e,t,n){return 0==(21&ps)?(e.baseState&&(e.baseState=!1,_o=!0),e.memoizedState=n):(or(n,t)||(n=mt(),fs.lanes|=n,Ul|=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 ws().memoizedState}function eo(e,t,n){var r=tc(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},no(e)?ro(t,n):null!==(n=Ca(e,t,n,r))&&(nc(n,e,r,ec()),io(n,t,r))}function to(e,t,n){var r=tc(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,Ta(t)):(i.next=l.next,l.next=i),void(t.interleaved=i)}}catch(e){}null!==(n=Ca(e,t,i,r))&&(nc(n,e,r,i=ec()),io(n,t,r))}}function no(e){var t=e.alternate;return e===fs||null!==t&&t===fs}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:Ea,useCallback:bs,useContext:bs,useEffect:bs,useImperativeHandle:bs,useInsertionEffect:bs,useLayoutEffect:bs,useMemo:bs,useReducer:bs,useRef:bs,useState:bs,useDebugValue:bs,useDeferredValue:bs,useTransition:bs,useMutableSource:bs,useSyncExternalStore:bs,useId:bs,unstable_isNewReconciler:!1},so={readContext:Ea,useCallback:function(e,t){return Es().memoizedState=[e,void 0===t?null:t],e},useContext:Ea,useEffect:Gs,useImperativeHandle:function(e,t,n){return n=null!=n?n.concat([e]):null,zs(4194308,4,Xs.bind(null,t,e),n)},useLayoutEffect:function(e,t){return zs(4194308,4,e,t)},useInsertionEffect:function(e,t){return zs(4,2,e,t)},useMemo:function(e,t){var n=Es();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Es();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,fs,e),[r.memoizedState,e]},useRef:function(e){return e={current:e},Es().memoizedState=e},useState:Ns,useDebugValue:Ys,useDeferredValue:function(e){return Es().memoizedState=e},useTransition:function(){var e=Ns(!1),t=e[0];return e=Zs.bind(null,e[1]),Es().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=fs,i=Es();if(ia){if(void 0===n)throw Error(a(407));n=n()}else{if(n=t(),null===Rl)throw Error(a(349));0!=(30&ps)||Ls(r,t,n)}i.memoizedState=n;var s={value:n,getSnapshot:t};return i.queue=s,Gs(Ds.bind(null,r,s,e),[e]),r.flags|=2048,Os(9,Is.bind(null,r,s,n,t),void 0,null),n},useId:function(){var e=Es(),t=Rl.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=_s++).toString(32)+":";return e.memoizedState=t},unstable_isNewReconciler:!1},oo={readContext:Ea,useCallback:Ks,useContext:Ea,useEffect:Vs,useImperativeHandle:Js,useInsertionEffect:Ws,useLayoutEffect:js,useMemo:qs,useReducer:Cs,useRef:ks,useState:function(){return Cs(Ts)},useDebugValue:Ys,useDeferredValue:function(e){return Qs(ws(),ms.memoizedState,e)},useTransition:function(){return[Cs(Ts)[0],ws().memoizedState]},useMutableSource:Ps,useSyncExternalStore:Bs,useId:$s,unstable_isNewReconciler:!1},lo={readContext:Ea,useCallback:Ks,useContext:Ea,useEffect:Vs,useImperativeHandle:Js,useInsertionEffect:Ws,useLayoutEffect:js,useMemo:qs,useReducer:Rs,useRef:ks,useState:function(){return Rs(Ts)},useDebugValue:Ys,useDeferredValue:function(e){var t=ws();return null===ms?t.memoizedState=e:Qs(t,ms.memoizedState,e)},useTransition:function(){return[Rs(Ts)[0],ws().memoizedState]},useMutableSource:Ps,useSyncExternalStore:Bs,useId:$s,unstable_isNewReconciler:!1};function co(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 uo(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 po="function"==typeof WeakMap?WeakMap:Map;function fo(e,t,n){(n=Ia(-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=Ia(-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===Xl?Xl=new Set([this]):Xl.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 po;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=Ec.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=Ia(-1,1)).tag=2,Da(n,t,1))),n.lanes|=1),e):(e.flags|=65536,e.lanes=i,e)}var xo=_.ReactCurrentOwner,_o=!1;function bo(e,t,n,r){t.child=null===e?Qa(t,null,n,r):qa(t,e.child,n,r)}function Ao(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||_o?(ia&&n&&ea(t),t.flags|=1,bo(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||Lc(a)||void 0!==a.defaultProps||null!==n.compare||void 0!==n.defaultProps?((e=Dc(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=Ic(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(_o=!1,t.pendingProps=r=a,0==(e.lanes&i))return t.lanes=e.lanes,Wo(e,t,i);0!=(131072&e.flags)&&(_o=!0)}}return To(e,t,n,r,i)}function Eo(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},wi(Il,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,wi(Il,Ll),Ll|=e,null;t.memoizedState={baseLanes:0,cachePool:null,transitions:null},r=null!==a?a.baseLanes:n,wi(Il,Ll),Ll|=r}else null!==a?(r=a.baseLanes|n,t.memoizedState=null):r=n,wi(Il,Ll),Ll|=r;return bo(e,t,i,n),t.child}function wo(e,t){var n=t.ref;(null===e&&null!==n||null!==e&&e.ref!==n)&&(t.flags|=512,t.flags|=2097152)}function To(e,t,n,r,i){var a=Li(n)?Pi:Ci.current;return a=Bi(t,a),Sa(t,i),n=Ms(e,t,n,r,a,i),r=Ss(),null===e||_o?(ia&&r&&ea(t),t.flags|=1,bo(e,t,n,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,Wo(e,t,i))}function Co(e,t,n,r,i){if(Li(n)){var a=!0;Ui(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,c=n.contextType;c="object"==typeof c&&null!==c?Ea(c):Bi(t,c=Li(n)?Pi:Ci.current);var u=n.getDerivedStateFromProps,h="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;h||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(o!==r||l!==c)&&Wa(t,s,r,c),Pa=!1;var d=t.memoizedState;s.state=d,Na(t,r,s,i),l=t.memoizedState,o!==r||d!==l||Ri.current||Pa?("function"==typeof u&&(za(t,n,u,r),l=t.memoizedState),(o=Pa||Ga(t,n,o,r,d,l,c))?(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=c,r=o):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,La(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:ga(t.type,o),s.props=c,h=t.pendingProps,d=s.context,l="object"==typeof(l=n.contextType)&&null!==l?Ea(l):Bi(t,l=Li(n)?Pi:Ci.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"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,Na(t,r,s,i);var f=t.memoizedState;o!==h||d!==f||Ri.current||Pa?("function"==typeof p&&(za(t,n,p,r),f=t.memoizedState),(c=Pa||Ga(t,n,c,r,d,f,l)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,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=f),s.props=r,s.state=f,s.context=l,r=c):("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 Ro(e,t,n,r,a,i)}function Ro(e,t,n,r,i,a){wo(e,t);var s=0!=(128&t.flags);if(!r&&!s)return i&&Ni(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)):bo(e,t,o,a),t.memoizedState=r.state,i&&Ni(t,n,!0),t.child}function Po(e){var t=e.stateNode;t.pendingContext?Di(0,t.pendingContext,t.pendingContext!==t.context):t.context&&Di(0,t.context,!1),rs(e,t.containerInfo)}function Bo(e,t,n,r,i){return pa(),fa(i),t.flags|=256,bo(e,t,n,r),t.child}var Lo,Io,Do,Fo={dehydrated:null,treeContext:null,retryLane:0};function Uo(e){return{baseLanes:e,cachePool:null,transitions:null}}function No(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),wi(os,1&s),null===e)return ca(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=Uc(l,i,0,null),e=Fc(e,i,n,null),o.return=t,e.return=t,o.sibling=e,t.child=o,t.child.memoizedState=Uo(n),t.memoizedState=Fo,e):Oo(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,ko(e,t,o,r=uo(Error(a(422))))):null!==t.memoizedState?(t.child=e.child,t.flags|=128,null):(s=r.fallback,i=t.mode,r=Uc({mode:"visible",children:r.children},i,0,null),(s=Fc(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=Uo(o),t.memoizedState=Fo,s);if(0==(1&t.mode))return ko(e,t,o,null);if("$!"===i.data){if(r=i.nextSibling&&i.nextSibling.dataset)var l=r.dgst;return r=l,ko(e,t,o,r=uo(s=Error(a(419)),r,void 0))}if(l=0!=(o&e.childLanes),_o||l){if(null!==(r=Rl)){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,Ra(e,i),nc(r,e,i,-1))}return mc(),ko(e,t,o,r=uo(Error(a(421))))}return"$?"===i.data?(t.flags|=128,t.child=e.child,t=Tc.bind(null,e),i._reactRetry=t,null):(e=s.treeContext,ra=ci(i.nextSibling),na=t,ia=!0,aa=null,null!==e&&(Ji[Yi++]=qi,Ji[Yi++]=Qi,Ji[Yi++]=Ki,qi=e.id,Qi=e.overflow,Ki=t),(t=Oo(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 c={mode:"hidden",children:i.children};return 0==(1&l)&&t.child!==s?((i=t.child).childLanes=0,i.pendingProps=c,t.deletions=null):(i=Ic(s,c)).subtreeFlags=14680064&s.subtreeFlags,null!==r?o=Ic(r,o):(o=Fc(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)?Uo(n):{baseLanes:l.baseLanes|n,cachePool:null,transitions:l.transitions},o.memoizedState=l,o.childLanes=e.childLanes&~n,t.memoizedState=Fo,i}return e=(o=e.child).sibling,i=Ic(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 Oo(e,t){return(t=Uc({mode:"visible",children:t},e.mode,0,null)).return=e,e.child=t}function ko(e,t,n,r){return null!==r&&fa(r),qa(t,e.child,null,n),(e=Oo(t,t.pendingProps.children)).flags|=2,t.memoizedState=null,e}function zo(e,t,n){e.lanes|=t;var r=e.alternate;null!==r&&(r.lanes|=t),Ma(e.return,t,n)}function Ho(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 Go(e,t,n){var r=t.pendingProps,i=r.revealOrder,a=r.tail;if(bo(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&&zo(e,n,t);else if(19===e.tag)zo(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(wi(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),Ho(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}Ho(t,!0,n,null,a);break;case"together":Ho(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),Ul|=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=Ic(e=t.child,e.pendingProps),t.child=n,n.return=t;null!==e.sibling;)e=e.sibling,(n=n.sibling=Ic(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 Xo(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 Jo(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 Xo(t),null;case 1:case 17:return Li(t.type)&&Ii(),Xo(t),null;case 3:return r=t.stateNode,is(),Ei(Ri),Ei(Ci),us(),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&&(sc(aa),aa=null))),Xo(t),null;case 5:ss(t);var i=ns(ts.current);if(n=t.type,null!==e&&null!=t.stateNode)Io(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 Xo(t),null}if(e=ns($a.current),ha(t)){r=t.stateNode,n=t.type;var s=t.memoizedProps;switch(r[di]=t,r[pi]=s,e=0!=(1&t.mode),n){case"dialog":kr("cancel",r),kr("close",r);break;case"iframe":case"object":case"embed":kr("load",r);break;case"video":case"audio":for(i=0;i<Fr.length;i++)kr(Fr[i],r);break;case"source":kr("error",r);break;case"img":case"image":case"link":kr("error",r),kr("load",r);break;case"details":kr("toggle",r);break;case"input":q(r,s),kr("invalid",r);break;case"select":r._wrapperState={wasMultiple:!!s.multiple},kr("invalid",r);break;case"textarea":ie(r,s),kr("invalid",r)}for(var l in ye(n,s),i=null,s)if(s.hasOwnProperty(l)){var c=s[l];"children"===l?"string"==typeof c?r.textContent!==c&&(!0!==s.suppressHydrationWarning&&Zr(r.textContent,c,e),i=["children",c]):"number"==typeof c&&r.textContent!==""+c&&(!0!==s.suppressHydrationWarning&&Zr(r.textContent,c,e),i=["children",""+c]):o.hasOwnProperty(l)&&null!=c&&"onScroll"===l&&kr("scroll",r)}switch(n){case"input":X(r),$(r,s,!0);break;case"textarea":X(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[pi]=r,Lo(e,t),t.stateNode=e;e:{switch(l=xe(n,r),n){case"dialog":kr("cancel",e),kr("close",e),i=r;break;case"iframe":case"object":case"embed":kr("load",e),i=r;break;case"video":case"audio":for(i=0;i<Fr.length;i++)kr(Fr[i],e);i=r;break;case"source":kr("error",e),i=r;break;case"img":case"image":case"link":kr("error",e),kr("load",e),i=r;break;case"details":kr("toggle",e),i=r;break;case"input":q(e,r),i=K(e,r),kr("invalid",e);break;case"option":default:i=r;break;case"select":e._wrapperState={wasMultiple:!!r.multiple},i=N({},r,{value:void 0}),kr("invalid",e);break;case"textarea":ie(e,r),i=re(e,r),kr("invalid",e)}for(s in ye(n,i),c=i)if(c.hasOwnProperty(s)){var u=c[s];"style"===s?ge(e,u):"dangerouslySetInnerHTML"===s?null!=(u=u?u.__html:void 0)&&he(e,u):"children"===s?"string"==typeof u?("textarea"!==n||""!==u)&&de(e,u):"number"==typeof u&&de(e,""+u):"suppressContentEditableWarning"!==s&&"suppressHydrationWarning"!==s&&"autoFocus"!==s&&(o.hasOwnProperty(s)?null!=u&&"onScroll"===s&&kr("scroll",e):null!=u&&x(e,s,u,l))}switch(n){case"input":X(e),$(e,r,!1);break;case"textarea":X(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 Xo(t),null;case 6:if(e&&null!=t.stateNode)Do(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 Xo(t),null;case 13:if(Ei(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(),pa(),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 pa(),0==(128&t.flags)&&(t.memoizedState=null),t.flags|=4;Xo(t),s=!1}else null!==aa&&(sc(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===Dl&&(Dl=3):mc())),null!==t.updateQueue&&(t.flags|=4),Xo(t),null);case 4:return is(),null===e&&Gr(t.stateNode.containerInfo),Xo(t),null;case 10:return Aa(t.type._context),Xo(t),null;case 19:if(Ei(os),null===(s=t.memoizedState))return Xo(t),null;if(r=0!=(128&t.flags),null===(l=s.rendering))if(r)jo(s,!1);else{if(0!==Dl||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 wi(os,1&os.current|2),t.child}e=e.sibling}null!==s.tail&&Qe()>Gl&&(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 Xo(t),null}else 2*Qe()-s.renderingStartTime>Gl&&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,wi(os,r?1&n|2:1&n),t):(Xo(t),null);case 22:case 23:return hc(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Ll)&&(Xo(t),6&t.subtreeFlags&&(t.flags|=8192)):Xo(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)&&Ii(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return is(),Ei(Ri),Ei(Ci),us(),0!=(65536&(e=t.flags))&&0==(128&e)?(t.flags=-65537&e|128,t):null;case 5:return ss(t),null;case 13:if(Ei(os),null!==(e=t.memoizedState)&&null!==e.dehydrated){if(null===t.alternate)throw Error(a(340));pa()}return 65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 19:return Ei(os),null;case 4:return is(),null;case 10:return Aa(t.type._context),null;case 22:case 23:return hc(),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}},Io=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=N({},i,{value:void 0}),r=N({},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(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&&(o.hasOwnProperty(u)?s||(s=[]):(s=s||[]).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||(s||(s=[]),s.push(u,n)),n=c;else"dangerouslySetInnerHTML"===u?(c=c?c.__html:void 0,l=l?l.__html:void 0,null!=c&&l!==c&&(s=s||[]).push(u,c)):"children"===u?"string"!=typeof c&&"number"!=typeof c||(s=s||[]).push(u,""+c):"suppressContentEditableWarning"!==u&&"suppressHydrationWarning"!==u&&(o.hasOwnProperty(u)?(null!=c&&"onScroll"===u&&kr("scroll",e),s||l===c||(s=[])):(s=s||[]).push(u,c))}n&&(s=s||[]).push("style",n);var u=s;(t.updateQueue=u)&&(t.flags|=4)}},Do=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){Sc(e,t,n)}else n.current=null}function el(e,t,n){try{n()}catch(n){Sc(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[pi],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 cl(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(cl(e,t,n),e=e.sibling;null!==e;)cl(e,t,n),e=e.sibling}var ul=null,hl=!1;function dl(e,t,n){for(n=n.child;null!==n;)pl(e,t,n),n=n.sibling}function pl(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=ul,i=hl;ul=null,dl(e,t,n),hl=i,null!==(ul=r)&&(hl?(e=ul,n=n.stateNode,8===e.nodeType?e.parentNode.removeChild(n):e.removeChild(n)):ul.removeChild(n.stateNode));break;case 18:null!==ul&&(hl?(e=ul,n=n.stateNode,8===e.nodeType?li(e.parentNode,n):1===e.nodeType&&li(e,n),Gt(e)):li(ul,n.stateNode));break;case 4:r=ul,i=hl,ul=n.stateNode.containerInfo,hl=!0,dl(e,t,n),ul=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){Sc(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 fl(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=Cc.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:ul=l.stateNode,hl=!1;break e;case 3:case 4:ul=l.stateNode.containerInfo,hl=!0;break e}l=l.return}if(null===ul)throw Error(a(160));pl(s,o,i),ul=null,hl=!1;var c=i.alternate;null!==c&&(c.return=null),i.return=null}catch(e){Sc(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){Sc(e,e.return,t)}try{nl(5,e,e.return)}catch(t){Sc(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){Sc(e,e.return,t)}}if(4&r&&null!=(i=e.stateNode)){var s=e.memoizedProps,o=null!==n?n.memoizedProps:s,l=e.type,c=e.updateQueue;if(e.updateQueue=null,null!==c)try{"input"===l&&"radio"===s.type&&null!=s.name&&Q(i,s),xe(l,o);var u=xe(l,s);for(o=0;o<c.length;o+=2){var h=c[o],d=c[o+1];"style"===h?ge(i,d):"dangerouslySetInnerHTML"===h?he(i,d):"children"===h?de(i,d):x(i,h,d,u)}switch(l){case"input":Z(i,s);break;case"textarea":ae(i,s);break;case"select":var p=i._wrapperState.wasMultiple;i._wrapperState.wasMultiple=!!s.multiple;var f=s.value;null!=f?ne(i,!!s.multiple,f,!1):p!==!!s.multiple&&(null!=s.defaultValue?ne(i,!!s.multiple,s.defaultValue,!0):ne(i,!!s.multiple,s.multiple?[]:"",!1))}i[pi]=s}catch(t){Sc(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){Sc(e,e.return,t)}}break;case 3:if(ml(t,e),vl(e),4&r&&null!==n&&n.memoizedState.isDehydrated)try{Gt(t.containerInfo)}catch(t){Sc(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||(Hl=Qe())),4&r&&fl(e);break;case 22:if(h=null!==n&&null!==n.memoizedState,1&e.mode?(qo=(u=qo)||h,ml(t,e),qo=u):ml(t,e),vl(e),8192&r){if(u=null!==e.memoizedState,(e.stateNode.isHidden=u)&&!h&&0!=(1&e.mode))for(Zo=e,h=e.child;null!==h;){for(d=Zo=h;null!==Zo;){switch(f=(p=Zo).child,p.tag){case 0:case 11:case 14:case 15:nl(4,p,p.return);break;case 1:$o(p,p.return);var m=p.stateNode;if("function"==typeof m.componentWillUnmount){r=p,n=p.return;try{t=r,m.props=t.memoizedProps,m.state=t.memoizedState,m.componentWillUnmount()}catch(e){Sc(r,n,e)}}break;case 5:$o(p,p.return);break;case 22:if(null!==p.memoizedState){bl(d);continue}}null!==f?(f.return=p,Zo=f):bl(d)}h=h.sibling}e:for(h=null,d=e;;){if(5===d.tag){if(null===h){h=d;try{i=d.stateNode,u?"function"==typeof(s=i.style).setProperty?s.setProperty("display","none","important"):s.display="none":(l=d.stateNode,o=null!=(c=d.memoizedProps.style)&&c.hasOwnProperty("display")?c.display:null,l.style.display=me("display",o))}catch(t){Sc(e,e.return,t)}}}else if(6===d.tag){if(null===h)try{d.stateNode.nodeValue=u?"":d.memoizedProps}catch(t){Sc(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&&fl(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),cl(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){Sc(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 c=qo;if(Ko=s,(qo=l)&&!c)for(Zo=i;null!==Zo;)l=(s=Zo).child,22===s.tag&&null!==s.memoizedState?Al(i):null!==l?(l.return=s,Zo=l):Al(i);for(;null!==a;)Zo=a,xl(a,t,n),a=a.sibling;Zo=i,Ko=o,qo=c}_l(e)}else 0!=(8772&i.subtreeFlags)&&null!==a?(a.return=i,Zo=a):_l(e)}}function _l(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&&Oa(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}Oa(t,o,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 h=u.memoizedState;if(null!==h){var d=h.dehydrated;null!==d&&Gt(d)}}}break;default:throw Error(a(163))}qo||512&t.flags&&il(t)}catch(e){Sc(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 bl(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 Al(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){Sc(t,n,e)}break;case 1:var r=t.stateNode;if("function"==typeof r.componentDidMount){var i=t.return;try{r.componentDidMount()}catch(e){Sc(t,i,e)}}var a=t.return;try{il(t)}catch(e){Sc(t,a,e)}break;case 5:var s=t.return;try{il(t)}catch(e){Sc(t,s,e)}}}catch(e){Sc(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,El=_.ReactCurrentDispatcher,wl=_.ReactCurrentOwner,Tl=_.ReactCurrentBatchConfig,Cl=0,Rl=null,Pl=null,Bl=0,Ll=0,Il=Si(0),Dl=0,Fl=null,Ul=0,Nl=0,Ol=0,kl=null,zl=null,Hl=0,Gl=1/0,Vl=null,Wl=!1,jl=null,Xl=null,Jl=!1,Yl=null,Kl=0,ql=0,Ql=null,Zl=-1,$l=0;function ec(){return 0!=(6&Cl)?Qe():-1!==Zl?Zl:Zl=Qe()}function tc(e){return 0==(1&e.mode)?1:0!=(2&Cl)&&0!==Bl?Bl&-Bl:null!==ma.transition?(0===$l&&($l=mt()),$l):0!==(e=xt)?e:e=void 0===(e=window.event)?16:qt(e.type)}function nc(e,t,n,r){if(50<ql)throw ql=0,Ql=null,Error(a(185));vt(e,n,r),0!=(2&Cl)&&e===Rl||(e===Rl&&(0==(2&Cl)&&(Nl|=n),4===Dl&&oc(e,Bl)),rc(e,r),1===n&&0===Cl&&0==(1&t.mode)&&(Gl=Qe()+500,ki&&Gi()))}function rc(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]=pt(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}}(e,t);var r=dt(e,e===Rl?Bl: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){ki=!0,Hi(e)}(lc.bind(null,e)):Hi(lc.bind(null,e)),si((function(){0==(6&Cl)&&Gi()})),n=null;else{switch(_t(r)){case 1:n=$e;break;case 4:n=et;break;case 16:default:n=tt;break;case 536870912:n=rt}n=Rc(n,ic.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function ic(e,t){if(Zl=-1,$l=0,0!=(6&Cl))throw Error(a(327));var n=e.callbackNode;if(Ac()&&e.callbackNode!==n)return null;var r=dt(e,e===Rl?Bl:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=gc(e,r);else{t=r;var i=Cl;Cl|=2;var s=fc();for(Rl===e&&Bl===t||(Vl=null,Gl=Qe()+500,dc(e,t));;)try{yc();break}catch(t){pc(e,t)}ba(),El.current=s,Cl=i,null!==Pl?t=0:(Rl=null,Bl=0,t=Dl)}if(0!==t){if(2===t&&0!==(i=ft(e))&&(r=i,t=ac(e,i)),1===t)throw n=Fl,dc(e,0),oc(e,r),rc(e,Qe()),n;if(6===t)oc(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=gc(e,r))&&0!==(s=ft(e))&&(r=s,t=ac(e,s)),1===t))throw n=Fl,dc(e,0),oc(e,r),rc(e,Qe()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(a(345));case 2:case 5:bc(e,zl,Vl);break;case 3:if(oc(e,r),(130023424&r)===r&&10<(t=Hl+500-Qe())){if(0!==dt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){ec(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=ri(bc.bind(null,e,zl,Vl),t);break}bc(e,zl,Vl);break;case 4:if(oc(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(bc.bind(null,e,zl,Vl),r);break}bc(e,zl,Vl);break;default:throw Error(a(329))}}}return rc(e,Qe()),e.callbackNode===n?ic.bind(null,e):null}function ac(e,t){var n=kl;return e.current.memoizedState.isDehydrated&&(dc(e,t).flags|=256),2!==(e=gc(e,t))&&(t=zl,zl=n,null!==t&&sc(t)),e}function sc(e){null===zl?zl=e:zl.push.apply(zl,e)}function oc(e,t){for(t&=~Ol,t&=~Nl,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 lc(e){if(0!=(6&Cl))throw Error(a(327));Ac();var t=dt(e,0);if(0==(1&t))return rc(e,Qe()),null;var n=gc(e,t);if(0!==e.tag&&2===n){var r=ft(e);0!==r&&(t=r,n=ac(e,r))}if(1===n)throw n=Fl,dc(e,0),oc(e,t),rc(e,Qe()),n;if(6===n)throw Error(a(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,bc(e,zl,Vl),rc(e,Qe()),null}function cc(e,t){var n=Cl;Cl|=1;try{return e(t)}finally{0===(Cl=n)&&(Gl=Qe()+500,ki&&Gi())}}function uc(e){null!==Yl&&0===Yl.tag&&0==(6&Cl)&&Ac();var t=Cl;Cl|=1;var n=Tl.transition,r=xt;try{if(Tl.transition=null,xt=1,e)return e()}finally{xt=r,Tl.transition=n,0==(6&(Cl=t))&&Gi()}}function hc(){Ll=Il.current,Ei(Il)}function dc(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)&&Ii();break;case 3:is(),Ei(Ri),Ei(Ci),us();break;case 5:ss(r);break;case 4:is();break;case 13:case 19:Ei(os);break;case 10:Aa(r.type._context);break;case 22:case 23:hc()}n=n.return}if(Rl=e,Pl=e=Ic(e.current,null),Bl=Ll=t,Dl=0,Fl=null,Ol=Nl=Ul=0,zl=kl=null,null!==wa){for(t=0;t<wa.length;t++)if(null!==(r=(n=wa[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}wa=null}return e}function pc(e,t){for(;;){var n=Pl;try{if(ba(),hs.current=ao,vs){for(var r=fs.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}vs=!1}if(ps=0,gs=ms=fs=null,ys=!1,xs=0,wl.current=null,null===n||null===n.return){Dl=1,Fl=t,Pl=null;break}e:{var s=e,o=n.return,l=n,c=t;if(t=Bl,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,h=l,d=h.tag;if(0==(1&h.mode)&&(0===d||11===d||15===d)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var f=vo(o);if(null!==f){f.flags&=-257,yo(f,o,l,0,t),1&f.mode&&go(s,u,t),c=u;var m=(t=f).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0==(1&t)){go(s,u,t),mc();break e}c=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),fa(co(c,l));break e}}s=c=co(c,l),4!==Dl&&(Dl=2),null===kl?kl=[s]:kl.push(s),s=o;do{switch(s.tag){case 3:s.flags|=65536,t&=-t,s.lanes|=t,Ua(s,fo(0,c,t));break e;case 1:l=c;var y=s.type,x=s.stateNode;if(0==(128&s.flags)&&("function"==typeof y.getDerivedStateFromError||null!==x&&"function"==typeof x.componentDidCatch&&(null===Xl||!Xl.has(x)))){s.flags|=65536,t&=-t,s.lanes|=t,Ua(s,mo(s,l,t));break e}}s=s.return}while(null!==s)}_c(n)}catch(e){t=e,Pl===n&&null!==n&&(Pl=n=n.return);continue}break}}function fc(){var e=El.current;return El.current=ao,null===e?ao:e}function mc(){0!==Dl&&3!==Dl&&2!==Dl||(Dl=4),null===Rl||0==(268435455&Ul)&&0==(268435455&Nl)||oc(Rl,Bl)}function gc(e,t){var n=Cl;Cl|=2;var r=fc();for(Rl===e&&Bl===t||(Vl=null,dc(e,t));;)try{vc();break}catch(t){pc(e,t)}if(ba(),Cl=n,El.current=r,null!==Pl)throw Error(a(261));return Rl=null,Bl=0,Dl}function vc(){for(;null!==Pl;)xc(Pl)}function yc(){for(;null!==Pl&&!Ke();)xc(Pl)}function xc(e){var t=Ml(e.alternate,e,Ll);e.memoizedProps=e.pendingProps,null===t?_c(e):Pl=t,wl.current=null}function _c(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Jo(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 Dl=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===Dl&&(Dl=5)}function bc(e,t,n){var r=xt,i=Tl.transition;try{Tl.transition=null,xt=1,function(e,t,n,r){do{Ac()}while(null!==Yl);if(0!=(6&Cl))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===Rl&&(Pl=Rl=null,Bl=0),0==(2064&n.subtreeFlags)&&0==(2064&n.flags)||Jl||(Jl=!0,Rc(tt,(function(){return Ac(),null}))),s=0!=(15990&n.flags),0!=(15990&n.subtreeFlags)||s){s=Tl.transition,Tl.transition=null;var o=xt;xt=1;var l=Cl;Cl|=4,wl.current=null,function(e,t){if(ei=Wt,pr(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,c=-1,u=0,h=0,d=e,p=null;t:for(;;){for(var f;d!==n||0!==i&&3!==d.nodeType||(l=o+i),d!==s||0!==r&&3!==d.nodeType||(c=o+r),3===d.nodeType&&(o+=d.nodeValue.length),null!==(f=d.firstChild);)p=d,d=f;for(;;){if(d===e)break t;if(p===n&&++u===i&&(l=o),p===s&&++h===r&&(c=o),null!==(f=d.nextSibling))break;p=(d=p).parentNode}d=f}n=-1===l||-1===c?null:{start:l,end:c}}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 _=t.stateNode.containerInfo;1===_.nodeType?_.textContent="":9===_.nodeType&&_.documentElement&&_.removeChild(_.documentElement);break;default:throw Error(a(163))}}catch(e){Sc(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),fr(ti),Wt=!!ei,ti=ei=null,e.current=n,yl(n,e,i),qe(),Cl=l,xt=o,Tl.transition=s}else e.current=n;if(Jl&&(Jl=!1,Yl=e,Kl=i),0===(s=e.pendingLanes)&&(Xl=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),rc(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&&Ac(),0!=(1&(s=e.pendingLanes))?e===Ql?ql++:(ql=0,Ql=e):ql=0,Gi()}(e,t,n,r)}finally{Tl.transition=i,xt=r}return null}function Ac(){if(null!==Yl){var e=_t(Kl),t=Tl.transition,n=xt;try{if(Tl.transition=null,xt=16>e?16:e,null===Yl)var r=!1;else{if(e=Yl,Yl=null,Kl=0,0!=(6&Cl))throw Error(a(331));var i=Cl;for(Cl|=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 c=0;c<l.length;c++){var u=l[c];for(Zo=u;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 p=(h=Zo).sibling,f=h.return;if(al(h),h===u){Zo=null;break}if(null!==p){p.return=f,Zo=p;break}Zo=f}}}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 _=(o=Zo).child;if(0!=(2064&o.subtreeFlags)&&null!==_)_.return=o,Zo=_;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){Sc(l,l.return,e)}if(l===o){Zo=null;break e}var b=l.sibling;if(null!==b){b.return=l.return,Zo=b;break e}Zo=l.return}}if(Cl=i,Gi(),at&&"function"==typeof at.onPostCommitFiberRoot)try{at.onPostCommitFiberRoot(it,e)}catch(e){}r=!0}return r}finally{xt=n,Tl.transition=t}}return!1}function Mc(e,t,n){e=Da(e,t=fo(0,t=co(n,t),1),1),t=ec(),null!==e&&(vt(e,1,t),rc(e,t))}function Sc(e,t,n){if(3===e.tag)Mc(e,e,n);else for(;null!==t;){if(3===t.tag){Mc(t,e,n);break}if(1===t.tag){var r=t.stateNode;if("function"==typeof t.type.getDerivedStateFromError||"function"==typeof r.componentDidCatch&&(null===Xl||!Xl.has(r))){t=Da(t,e=mo(t,e=co(n,e),1),1),e=ec(),null!==t&&(vt(t,1,e),rc(t,e));break}}t=t.return}}function Ec(e,t,n){var r=e.pingCache;null!==r&&r.delete(t),t=ec(),e.pingedLanes|=e.suspendedLanes&n,Rl===e&&(Bl&n)===n&&(4===Dl||3===Dl&&(130023424&Bl)===Bl&&500>Qe()-Hl?dc(e,0):Ol|=n),rc(e,t)}function wc(e,t){0===t&&(0==(1&e.mode)?t=1:(t=ut,0==(130023424&(ut<<=1))&&(ut=4194304)));var n=ec();null!==(e=Ra(e,t))&&(vt(e,t,n),rc(e,n))}function Tc(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),wc(e,n)}function Cc(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),wc(e,n)}function Rc(e,t){return Je(e,t)}function Pc(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 Bc(e,t,n,r){return new Pc(e,t,n,r)}function Lc(e){return!(!(e=e.prototype)||!e.isReactComponent)}function Ic(e,t){var n=e.alternate;return null===n?((n=Bc(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 Dc(e,t,n,r,i,s){var o=2;if(r=e,"function"==typeof e)Lc(e)&&(o=1);else if("string"==typeof e)o=5;else e:switch(e){case M:return Fc(n.children,i,s,t);case S:o=8,i|=8;break;case E:return(e=Bc(12,n,t,2|i)).elementType=E,e.lanes=s,e;case R:return(e=Bc(13,n,t,i)).elementType=R,e.lanes=s,e;case P:return(e=Bc(19,n,t,i)).elementType=P,e.lanes=s,e;case I:return Uc(n,i,s,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case w:o=10;break e;case T:o=9;break e;case C:o=11;break e;case B:o=14;break e;case L:o=16,r=null;break e}throw Error(a(130,null==e?e:typeof e,""))}return(t=Bc(o,n,t,i)).elementType=e,t.type=r,t.lanes=s,t}function Fc(e,t,n,r){return(e=Bc(7,e,r,t)).lanes=n,e}function Uc(e,t,n,r){return(e=Bc(22,e,r,t)).elementType=I,e.lanes=n,e.stateNode={isHidden:!1},e}function Nc(e,t,n){return(e=Bc(6,e,null,t)).lanes=n,e}function Oc(e,t,n){return(t=Bc(4,null!==e.children?e.children:[],e.key,t)).lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function kc(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 zc(e,t,n,r,i,a,s,o,l){return e=new kc(e,t,n,o,l),1===t?(t=1,!0===a&&(t|=8)):t=0,a=Bc(3,null,null,t),e.current=a,a.stateNode=e,a.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},Ba(a),e}function Hc(e,t,n){var r=3<arguments.length&&void 0!==arguments[3]?arguments[3]:null;return{$$typeof:A,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}}function Gc(e){if(!e)return Ti;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(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 Fi(e,n,t)}return t}function Vc(e,t,n,r,i,a,s,o,l){return(e=zc(n,r,!0,e,0,a,0,o,l)).context=Gc(null),n=e.current,(a=Ia(r=ec(),i=tc(n))).callback=null!=t?t:null,Da(n,a,i),e.current.lanes=i,vt(e,i,r),rc(e,r),e}function Wc(e,t,n,r){var i=t.current,a=ec(),s=tc(i);return n=Gc(n),null===t.context?t.context=n:t.pendingContext=n,(t=Ia(a,s)).payload={element:e},null!==(r=void 0===r?null:r)&&(t.callback=r),null!==(e=Da(i,t,s))&&(nc(e,i,s,a),Fa(e,i,s)),s}function jc(e){return(e=e.current).child?(e.child.tag,e.child.stateNode):null}function Xc(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){Xc(e,t),(e=e.alternate)&&Xc(e,t)}Ml=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||Ri.current)_o=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return _o=!1,function(e,t,n){switch(t.tag){case 3:Po(t),pa();break;case 5:as(t);break;case 1:Li(t.type)&&Ui(t);break;case 4:rs(t,t.stateNode.containerInfo);break;case 10:var r=t.type._context,i=t.memoizedProps.value;wi(va,r._currentValue),r._currentValue=i;break;case 13:if(null!==(r=t.memoizedState))return null!==r.dehydrated?(wi(os,1&os.current),t.flags|=128,null):0!=(n&t.child.childLanes)?No(e,t,n):(wi(os,1&os.current),null!==(e=Wo(e,t,n))?e.sibling:null);wi(os,1&os.current);break;case 19:if(r=0!=(n&t.childLanes),0!=(128&e.flags)){if(r)return Go(e,t,n);t.flags|=128}if(null!==(i=t.memoizedState)&&(i.rendering=null,i.tail=null,i.lastEffect=null),wi(os,os.current),r)break;return null;case 22:case 23:return t.lanes=0,Eo(e,t,n)}return Wo(e,t,n)}(e,t,n);_o=0!=(131072&e.flags)}else _o=!1,ia&&0!=(1048576&t.flags)&&$i(t,Xi,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;Vo(e,t),e=t.pendingProps;var i=Bi(t,Ci.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,Ui(t)):s=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,Ba(t),i.updater=Ha,t.stateNode=i,i._reactInternals=t,ja(t,r,e,n),t=Ro(null,t,r,!0,s,n)):(t.tag=0,ia&&s&&ea(t),bo(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 Lc(e)?1:0;if(null!=e){if((e=e.$$typeof)===C)return 11;if(e===B)return 14}return 2}(r),e=ga(r,e),i){case 0:t=To(null,t,r,e,n);break e;case 1:t=Co(null,t,r,e,n);break e;case 11:t=Ao(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,To(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 1:return r=t.type,i=t.pendingProps,Co(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),Na(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=Bo(e,t,r,n,i=co(Error(a(423)),t));break e}if(r!==i){t=Bo(e,t,r,n,i=co(Error(a(424)),t));break e}for(ra=ci(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(pa(),r===i){t=Wo(e,t,n);break e}bo(e,t,r,n)}t=t.child}return t;case 5:return as(t),null===e&&ca(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),wo(e,t),bo(e,t,o,n),t.child;case 6:return null===e&&ca(t),null;case 13:return No(e,t,n);case 4:return rs(t,t.stateNode.containerInfo),r=t.pendingProps,null===e?t.child=qa(t,null,r,n):bo(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Ao(e,t,r,i=t.elementType===r?i:ga(r,i),n);case 7:return bo(e,t,t.pendingProps,n),t.child;case 8:case 12:return bo(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,wi(va,r._currentValue),r._currentValue=o,null!==s)if(or(s.value,o)){if(s.children===i.children&&!Ri.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 c=l.firstContext;null!==c;){if(c.context===r){if(1===s.tag){(c=Ia(-1,n&-n)).tag=2;var u=s.updateQueue;if(null!==u){var h=(u=u.shared).pending;null===h?c.next=c:(c.next=h.next,h.next=c),u.pending=c}}s.lanes|=n,null!==(c=s.alternate)&&(c.lanes|=n),Ma(s.return,n,t),l.lanes|=n;break}c=c.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}bo(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=Ea(i)),t.flags|=1,bo(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,Ui(t)):e=!1,Sa(t,n),Va(t,r,i),ja(t,r,i,n),Ro(null,t,r,!0,e,n);case 19:return Go(e,t,n);case 22:return Eo(e,t,n)}throw Error(a(156,t.tag))};var Yc="function"==typeof reportError?reportError:function(e){console.error(e)};function Kc(e){this._internalRoot=e}function qc(e){this._internalRoot=e}function Qc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType)}function Zc(e){return!(!e||1!==e.nodeType&&9!==e.nodeType&&11!==e.nodeType&&(8!==e.nodeType||" react-mount-point-unstable "!==e.nodeValue))}function $c(){}function eu(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=jc(s);o.call(e)}}Wc(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=jc(s);a.call(e)}}var s=Vc(t,r,e,0,null,!1,0,"",$c);return e._reactRootContainer=s,e[fi]=s.current,Gr(8===e.nodeType?e.parentNode:e),uc(),s}for(;i=e.lastChild;)e.removeChild(i);if("function"==typeof r){var o=r;r=function(){var e=jc(l);o.call(e)}}var l=zc(e,0,!1,null,0,!1,0,"",$c);return e._reactRootContainer=l,e[fi]=l.current,Gr(8===e.nodeType?e.parentNode:e),uc((function(){Wc(t,l,n,r)})),l}(n,t,e,i,r);return jc(s)}qc.prototype.render=Kc.prototype.render=function(e){var t=this._internalRoot;if(null===t)throw Error(a(409));Wc(e,t,null,null)},qc.prototype.unmount=Kc.prototype.unmount=function(){var e=this._internalRoot;if(null!==e){this._internalRoot=null;var t=e.containerInfo;uc((function(){Wc(null,e,null,null)})),t[fi]=null}},qc.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&&Nt(e)}},bt=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),rc(t,Qe()),0==(6&Cl)&&(Gl=Qe()+500,Gi()))}break;case 13:uc((function(){var t=Ra(e,1);if(null!==t){var n=ec();nc(t,e,1,n)}})),Jc(e,1)}},At=function(e){if(13===e.tag){var t=Ra(e,134217728);null!==t&&nc(t,e,134217728,ec()),Jc(e,134217728)}},Mt=function(e){if(13===e.tag){var t=tc(e),n=Ra(e,t);null!==n&&nc(n,e,t,ec()),Jc(e,t)}},St=function(){return xt},Et=function(e,t){var n=xt;try{return xt=e,t()}finally{xt=n}},Ae=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=bi(r);if(!i)throw Error(a(90));J(r),Z(r,i)}}}break;case"textarea":ae(e,n);break;case"select":null!=(t=n.value)&&ne(e,!!n.multiple,t,!1)}},Ce=cc,Re=uc;var tu={usingClientEntryPoint:!1,Events:[xi,_i,bi,we,Te,cc]},nu={findFiberByHostInstance:yi,bundleType:0,version:"18.2.0",rendererPackageName:"react-dom"},ru={bundleType:nu.bundleType,version:nu.version,rendererPackageName:nu.rendererPackageName,rendererConfig:nu.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=je(e))?null:e.stateNode},findFiberByHostInstance:nu.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 iu=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(!iu.isDisabled&&iu.supportsFiber)try{it=iu.inject(ru),at=iu}catch(ue){}}t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=tu,t.createPortal=function(e,t){var n=2<arguments.length&&void 0!==arguments[2]?arguments[2]:null;if(!Qc(t))throw Error(a(200));return Hc(e,t,null,n)},t.createRoot=function(e,t){if(!Qc(e))throw Error(a(299));var n=!1,r="",i=Yc;return null!=t&&(!0===t.unstable_strictMode&&(n=!0),void 0!==t.identifierPrefix&&(r=t.identifierPrefix),void 0!==t.onRecoverableError&&(i=t.onRecoverableError)),t=zc(e,1,!1,null,0,n,0,r,i),e[fi]=t.current,Gr(8===e.nodeType?e.parentNode:e),new Kc(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 uc(e)},t.hydrate=function(e,t,n){if(!Zc(t))throw Error(a(200));return eu(null,e,t,!0,n)},t.hydrateRoot=function(e,t,n){if(!Qc(e))throw Error(a(405));var r=null!=n&&n.hydratedSources||null,i=!1,s="",o=Yc;if(null!=n&&(!0===n.unstable_strictMode&&(i=!0),void 0!==n.identifierPrefix&&(s=n.identifierPrefix),void 0!==n.onRecoverableError&&(o=n.onRecoverableError)),t=Vc(t,null,e,1,null!=n?n:null,i,0,s,o),e[fi]=t.current,Gr(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 qc(t)},t.render=function(e,t,n){if(!Zc(t))throw Error(a(200));return eu(null,e,t,!1,n)},t.unmountComponentAtNode=function(e){if(!Zc(e))throw Error(a(40));return!!e._reactRootContainer&&(uc((function(){eu(null,null,e,!1,(function(){e._reactRootContainer=null,e[fi]=null}))})),!0)},t.unstable_batchedUpdates=cc,t.unstable_renderSubtreeIntoContainer=function(e,t,n,r){if(!Zc(n))throw Error(a(200));if(null==e||void 0===e._reactInternals)throw Error(a(38));return eu(e,t,n,!1,r)},t.version="18.2.0-next-9e3b772b8-20220608"},745:(e,t,n)=>{"use strict";var r=n(935);t.s=r.createRoot,r.hydrateRoot},935:(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(448)},203:(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],c=o+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[o]=n,r=o);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 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 c=[],u=[],h=1,d=null,p=3,f=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,x="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 b(e){if(g=!1,_(e),!m)if(null!==r(c))m=!0,I(A);else{var t=r(u);null!==t&&D(b,t.startTime-e)}}function A(e,n){m=!1,g&&(g=!1,y(w),w=-1),f=!0;var a=p;try{for(_(n),d=r(c);null!==d&&(!(d.expirationTime>n)||e&&!R());){var s=d.callback;if("function"==typeof s){d.callback=null,p=d.priorityLevel;var o=s(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof o?d.callback=o:d===r(c)&&i(c),_(n)}else i(c);d=r(c)}if(null!==d)var l=!0;else{var h=r(u);null!==h&&D(b,h.startTime-n),l=!1}return l}finally{d=null,p=a,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var M,S=!1,E=null,w=-1,T=5,C=-1;function R(){return!(t.unstable_now()-C<T)}function P(){if(null!==E){var e=t.unstable_now();C=e;var n=!0;try{n=E(!0,e)}finally{n?M():(S=!1,E=null)}}else S=!1}if("function"==typeof x)M=function(){x(P)};else if("undefined"!=typeof MessageChannel){var B=new MessageChannel,L=B.port2;B.port1.onmessage=P,M=function(){L.postMessage(null)}}else M=function(){v(P,0)};function I(e){E=e,S||(S=!0,M())}function D(e,n){w=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||f||(m=!0,I(A))},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"):T=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=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=p;p=e;try{return t()}finally{p=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(u,e),null===r(c)&&e===r(u)&&(g?(y(w),w=-1):g=!0,D(b,a-s))):(e.sortIndex=o,n(c,e),m||f||(m=!0,I(A))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},142:(e,t,n)=>{"use strict";e.exports=n(203)},511:(e,t)=>{"use strict";t.ConcurrentRoot=1,t.ContinuousEventPriority=4,t.DefaultEventPriority=16,t.DiscreteEventPriority=1},287:(e,t,n)=>{e.exports=function(e){var t={},r=n(294),i=n(840),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"),c=Symbol.for("react.portal"),u=Symbol.for("react.fragment"),h=Symbol.for("react.strict_mode"),d=Symbol.for("react.profiler"),p=Symbol.for("react.provider"),f=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 _=Symbol.for("react.offscreen");Symbol.for("react.legacy_hidden"),Symbol.for("react.cache"),Symbol.for("react.tracing_marker");var b=Symbol.iterator;function A(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=b&&e[b]||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 d:return"Profiler";case h:return"StrictMode";case g:return"Suspense";case v:return"SuspenseList"}if("object"==typeof e)switch(e.$$typeof){case f:return(e.displayName||"Context")+".Consumer";case p: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 E(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 w(e){if(E(e)!==e)throw Error(s(188))}function T(e){var t=e.alternate;if(!t){if(null===(t=E(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 w(i),e;if(a===r)return w(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 C(e){return null!==(e=T(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 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 B,L=Array.isArray,I=e.getPublicInstance,D=e.getRootHostContext,F=e.getChildHostContext,U=e.prepareForCommit,N=e.resetAfterCommit,O=e.createInstance,k=e.appendInitialChild,z=e.finalizeInitialChildren,H=e.prepareUpdate,G=e.shouldSetTextContent,V=e.createTextInstance,W=e.scheduleTimeout,j=e.cancelTimeout,X=e.noTimeout,J=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,ce=e.setFocusIfFocusable,ue=e.setupIntersectionObserver,he=e.appendChild,de=e.appendChildToContainer,pe=e.commitTextUpdate,fe=e.commitMount,me=e.commitUpdate,ge=e.insertBefore,ve=e.insertInContainerBefore,ye=e.removeChild,xe=e.removeChildFromContainer,_e=e.resetTextContent,be=e.hideInstance,Ae=e.hideTextInstance,Me=e.unhideInstance,Se=e.unhideTextInstance,Ee=e.clearContainer,we=e.cloneInstance,Te=e.createContainerChildSet,Ce=e.appendChildToContainerChildSet,Re=e.finalizeContainerChildren,Pe=e.replaceContainerChildren,Be=e.cloneHiddenInstance,Le=e.cloneHiddenTextInstance,Ie=e.canHydrateInstance,De=e.canHydrateTextInstance,Fe=e.canHydrateSuspenseInstance,Ue=e.isSuspenseInstancePending,Ne=e.isSuspenseInstanceFallback,Oe=e.registerSuspenseInstanceRetry,ke=e.getNextHydratableSibling,ze=e.getFirstHydratableChild,He=e.getFirstHydratableChildWithinContainer,Ge=e.getFirstHydratableChildWithinSuspenseInstance,Ve=e.hydrateInstance,We=e.hydrateTextInstance,je=e.hydrateSuspenseInstance,Xe=e.getNextHydratableInstanceAfterSuspenseInstance,Je=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===B)try{throw Error()}catch(e){var t=e.stack.trim().match(/\n( *(at )?)/);B=t&&t[1]||""}return"\n"+B+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 ct={},ut=st(ct),ht=st(!1),dt=ct;function pt(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 ft(e){return null!=e.childContextTypes}function mt(){ot(ht),ot(ut)}function gt(e,t,n){if(ut.current!==ct)throw Error(s(168));lt(ut,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||ct,dt=ut.current,lt(ut,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(ut),lt(ut,e)):ot(ht),lt(ht,n)}var _t=Math.clz32?Math.clz32:function(e){return 0==(e>>>=0)?32:31-(bt(e)/At|0)|0},bt=Math.log,At=Math.LN2,Mt=64,St=4194304;function Et(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 wt(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=Et(o):0!=(a&=s)&&(r=Et(a))}else 0!=(s=n&~i)?r=Et(s):0!==a&&(r=Et(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 Tt(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 Ct(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 Pt(e,t,n){e.pendingLanes|=t,536870912!==t&&(e.suspendedLanes=0,e.pingedLanes=0),(e=e.eventTimes)[t=31-_t(t)]=n}function Bt(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 Lt=0;function It(e){return 1<(e&=-e)?4<e?0!=(268435455&e)?16:536870912:4:1}var Dt=i.unstable_scheduleCallback,Ft=i.unstable_cancelCallback,Ut=i.unstable_shouldYield,Nt=i.unstable_requestPaint,Ot=i.unstable_now,kt=i.unstable_ImmediatePriority,zt=i.unstable_UserBlockingPriority,Ht=i.unstable_NormalPriority,Gt=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},Xt=null,Jt=!1,Yt=!1;function Kt(e){null===Xt?Xt=[e]:Xt.push(e)}function qt(){if(!Yt&&null!==Xt){Yt=!0;var e=0,t=Lt;try{var n=Xt;for(Lt=1;e<n.length;e++){var r=n[e];do{r=r(!0)}while(null!==r)}Xt=null,Jt=!1}catch(t){throw null!==Xt&&(Xt=Xt.slice(e+1)),Dt(kt,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){J?(lt(tn,t._currentValue),t._currentValue=n):(lt(tn,t._currentValue2),t._currentValue2=n)}function ln(e){var t=tn.current;ot(tn),J?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)&&(Ui=!0),e.firstContext=null)}function hn(e){var t=J?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,pn=!1;function fn(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&Ja)?(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,Bt(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 _n(e,t,n,r){var i=e.updateQueue;pn=!1;var s=i.firstBaseUpdate,o=i.lastBaseUpdate,l=i.shared.pending;if(null!==l){i.shared.pending=null;var c=l,u=c.next;c.next=null,null===o?s=u:o.next=u,o=c;var h=e.alternate;null!==h&&(l=(h=h.updateQueue).lastBaseUpdate)!==o&&(null===l?h.firstBaseUpdate=u:l.next=u,h.lastBaseUpdate=c)}if(null!==s){var d=i.baseState;for(o=0,h=u=c=null,l=s;;){var p=l.lane,f=l.eventTime;if((r&p)===p){null!==h&&(h=h.next={eventTime:f,lane:0,tag:l.tag,payload:l.payload,callback:l.callback,next:null});e:{var m=e,g=l;switch(p=t,f=n,g.tag){case 1:if("function"==typeof(m=g.payload)){d=m.call(f,d,p);break e}d=m;break e;case 3:m.flags=-65537&m.flags|128;case 0:if(null==(p="function"==typeof(m=g.payload)?m.call(f,d,p):m))break e;d=a({},d,p);break e;case 2:pn=!0}}null!==l.callback&&0!==l.lane&&(e.flags|=64,null===(p=i.effects)?i.effects=[l]:p.push(l))}else f={eventTime:f,lane:p,tag:l.tag,payload:l.payload,callback:l.callback,next:null},null===h?(u=h=f,c=d):h=h.next=f,o|=p;if(null===(l=l.next)){if(null===(l=i.shared.pending))break;l=(p=l).next,p.next=null,i.lastBaseUpdate=p,i.shared.pending=null}}if(null===h&&(c=d),i.baseState=c,i.firstBaseUpdate=u,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 bn(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 An=(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)&&E(e)===e},enqueueSetState:function(e,t,n){e=e._reactInternals;var r=_s(),i=bs(e),a=gn(r,i);a.payload=t,null!=n&&(a.callback=n),vn(e,a),null!==(t=As(e,i,r))&&yn(t,e,i)},enqueueReplaceState:function(e,t,n){e=e._reactInternals;var r=_s(),i=bs(e),a=gn(r,i);a.tag=1,a.payload=t,null!=n&&(a.callback=n),vn(e,a),null!==(t=As(e,i,r))&&yn(t,e,i)},enqueueForceUpdate:function(e,t){e=e._reactInternals;var n=_s(),r=bs(e),i=gn(n,r);i.tag=2,null!=t&&(i.callback=t),vn(e,i),null!==(t=As(e,r,n))&&yn(t,e,r)}};function En(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 wn(e,t,n){var r=!1,i=ct,a=t.contextType;return"object"==typeof a&&null!==a?a=hn(a):(i=ft(t)?dt:ut.current,a=(r=null!=(r=t.contextTypes))?pt(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 Tn(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 Cn(e,t,n,r){var i=e.stateNode;i.props=n,i.state=e.memoizedState,i.refs=An,fn(e);var a=t.contextType;"object"==typeof a&&null!==a?i.context=hn(a):(a=ft(t)?dt:ut.current,i.context=pt(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=[],Pn=0,Bn=null,Ln=0,In=[],Dn=0,Fn=null,Un=1,Nn="";function On(e,t){Rn[Pn++]=Ln,Rn[Pn++]=Bn,Bn=e,Ln=t}function kn(e,t,n){In[Dn++]=Un,In[Dn++]=Nn,In[Dn++]=Fn,Fn=e;var r=Un;e=Nn;var i=32-_t(r)-1;r&=~(1<<i),n+=1;var a=32-_t(t)+i;if(30<a){var s=i-i%5;a=(r&(1<<s)-1).toString(32),r>>=s,i-=s,Un=1<<32-_t(t)+i|n<<i|r,Nn=a+e}else Un=1<<a|n<<i|r,Nn=e}function zn(e){null!==e.return&&(On(e,1),kn(e,1,0))}function Hn(e){for(;e===Bn;)Bn=Rn[--Pn],Rn[Pn]=null,Ln=Rn[--Pn],Rn[Pn]=null;for(;e===Fn;)Fn=In[--Dn],In[Dn]=null,Nn=In[--Dn],In[Dn]=null,Un=In[--Dn],In[Dn]=null}var Gn=null,Vn=null,Wn=!1,jn=!1,Xn=null;function Jn(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=Ie(t,e.type,e.pendingProps))&&(e.stateNode=t,Gn=e,Vn=ze(t),!0);case 6:return null!==(t=De(t,e.pendingProps))&&(e.stateNode=t,Gn=e,Vn=null,!0);case 13:if(null!==(t=Fe(t))){var n=null!==Fn?{id:Un,overflow:Nn}:null;return e.memoizedState={dehydrated:t,treeContext:n,retryLane:1073741824},(n=Qs(18,null,null,0)).stateNode=t,n.return=e,e.child=n,Gn=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=ke(n);var r=Gn;t&&Yn(e,t)?Jn(r,n):(e.flags=-4097&e.flags|2,Wn=!1,Gn=e)}}else{if(Kn(e))throw Error(s(418));e.flags=-4097&e.flags|2,Wn=!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 Zn(e){if(!q||e!==Gn)return!1;if(!Wn)return Qn(e),Wn=!0,!1;if(3!==e.tag&&(5!==e.tag||Qe(e.type)&&!G(e.type,e.memoizedProps))){var t=Vn;if(t){if(Kn(e)){for(e=Vn;e;)e=ke(e);throw Error(s(418))}for(;t;)Jn(e,t),t=ke(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=Xe(e)}else Vn=Gn?ke(e.stateNode):null;return!0}function $n(){q&&(Vn=Gn=null,jn=Wn=!1)}function er(e){null===Xn?Xn=[e]:Xn.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===An&&(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===u?f(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 p(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 f(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 c:return(t=io(t,e.mode,n)).return=e,t;case x:return m(e,(0,t._init)(t._payload),n)}if(L(t)||A(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 c:return n.key===i?p(e,t,n,r):null;case x:return g(e,t,(i=n._init)(n._payload),r)}if(L(n)||A(n))return null!==i?null:f(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 c:return p(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)||A(r))return f(t,e=e.get(n)||null,r,i,null);nr(t,r)}return null}function y(i,s,o,l){for(var c=null,u=null,h=s,d=s=0,p=null;null!==h&&d<o.length;d++){h.index>d?(p=h,h=null):p=h.sibling;var f=g(i,h,o[d],l);if(null===f){null===h&&(h=p);break}e&&h&&null===f.alternate&&t(i,h),s=a(f,s,d),null===u?c=f:u.sibling=f,u=f,h=p}if(d===o.length)return n(i,h),Wn&&On(i,d),c;if(null===h){for(;d<o.length;d++)null!==(h=m(i,o[d],l))&&(s=a(h,s,d),null===u?c=h:u.sibling=h,u=h);return Wn&&On(i,d),c}for(h=r(i,h);d<o.length;d++)null!==(p=v(h,i,d,o[d],l))&&(e&&null!==p.alternate&&h.delete(null===p.key?d:p.key),s=a(p,s,d),null===u?c=p:u.sibling=p,u=p);return e&&h.forEach((function(e){return t(i,e)})),Wn&&On(i,d),c}function _(i,o,l,c){var u=A(l);if("function"!=typeof u)throw Error(s(150));if(null==(l=u.call(l)))throw Error(s(151));for(var h=u=null,d=o,p=o=0,f=null,y=l.next();null!==d&&!y.done;p++,y=l.next()){d.index>p?(f=d,d=null):f=d.sibling;var x=g(i,d,y.value,c);if(null===x){null===d&&(d=f);break}e&&d&&null===x.alternate&&t(i,d),o=a(x,o,p),null===h?u=x:h.sibling=x,h=x,d=f}if(y.done)return n(i,d),Wn&&On(i,p),u;if(null===d){for(;!y.done;p++,y=l.next())null!==(y=m(i,y.value,c))&&(o=a(y,o,p),null===h?u=y:h.sibling=y,h=y);return Wn&&On(i,p),u}for(d=r(i,d);!y.done;p++,y=l.next())null!==(y=v(d,i,p,y.value,c))&&(e&&null!==y.alternate&&d.delete(null===y.key?p:y.key),o=a(y,o,p),null===h?u=y:h.sibling=y,h=y);return e&&d.forEach((function(e){return t(i,e)})),Wn&&On(i,p),u}return function e(r,a,s,h){if("object"==typeof s&&null!==s&&s.type===u&&null===s.key&&(s=s.props.children),"object"==typeof s&&null!==s){switch(s.$$typeof){case l:e:{for(var d=s.key,p=a;null!==p;){if(p.key===d){if((d=s.type)===u){if(7===p.tag){n(r,p.sibling),(a=i(p,s.props.children)).return=r,r=a;break e}}else if(p.elementType===d||"object"==typeof d&&null!==d&&d.$$typeof===x&&rr(d)===p.type){n(r,p.sibling),(a=i(p,s.props)).ref=tr(r,p,s),a.return=r,r=a;break e}n(r,p);break}t(r,p),p=p.sibling}s.type===u?((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 c:e:{for(p=s.key;null!==a;){if(a.key===p){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,(p=s._init)(s._payload),h)}if(L(s))return y(r,a,s,h);if(A(s))return _(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),cr=st(or),ur=st(or);function hr(e){if(e===or)throw Error(s(174));return e}function dr(e,t){lt(ur,t),lt(cr,e),lt(lr,or),e=D(t),ot(lr),lt(lr,e)}function pr(){ot(lr),ot(cr),ot(ur)}function fr(e){var t=hr(ur.current),n=hr(lr.current);n!==(t=F(n,e.type,t))&&(lt(cr,e),lt(lr,t))}function mr(e){cr.current===e&&(ot(lr),ot(cr))}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)||Ue(n)||Ne(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];J?t._workInProgressVersionPrimary=null:t._workInProgressVersionSecondary=null}yr.length=0}var _r=o.ReactCurrentDispatcher,br=o.ReactCurrentBatchConfig,Ar=0,Mr=null,Sr=null,Er=null,wr=!1,Tr=!1,Cr=0,Rr=0;function Pr(){throw Error(s(321))}function Br(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(Ar=a,Mr=t,t.memoizedState=null,t.updateQueue=null,t.lanes=0,_r.current=null===e||null===e.memoizedState?fi:mi,e=n(r,i),Tr){a=0;do{if(Tr=!1,Cr=0,25<=a)throw Error(s(301));a+=1,Er=Sr=null,t.updateQueue=null,_r.current=gi,e=n(r,i)}while(Tr)}if(_r.current=pi,t=null!==Sr&&null!==Sr.next,Ar=0,Er=Sr=Mr=null,wr=!1,t)throw Error(s(300));return e}function Ir(){var e=0!==Cr;return Cr=0,e}function Dr(){var e={memoizedState:null,baseState:null,baseQueue:null,queue:null,next:null};return null===Er?Mr.memoizedState=Er=e:Er=Er.next=e,Er}function Fr(){if(null===Sr){var e=Mr.alternate;e=null!==e?e.memoizedState:null}else e=Sr.next;var t=null===Er?Mr.memoizedState:Er.next;if(null!==t)Er=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===Er?Mr.memoizedState=Er=e:Er=Er.next=e}return Er}function Ur(e,t){return"function"==typeof t?t(e):t}function Nr(e){var t=Fr(),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,c=null,u=a;do{var h=u.lane;if((Ar&h)===h)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 d={lane:h,action:u.action,hasEagerState:u.hasEagerState,eagerState:u.eagerState,next:null};null===c?(l=c=d,o=r):c=c.next=d,Mr.lanes|=h,ts|=h}u=u.next}while(null!==u&&u!==a);null===c?o=r:c.next=l,jt(r,t.memoizedState)||(Ui=!0),t.memoizedState=r,t.baseState=o,t.baseQueue=c,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 Or(e){var t=Fr(),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)||(Ui=!0),t.memoizedState=a,null===t.baseQueue&&(t.baseState=a),n.lastRenderedState=a}return[a,r]}function kr(){}function zr(e,t){var n=Mr,r=Fr(),i=t(),a=!jt(r.memoizedState,i);if(a&&(r.memoizedState=i,Ui=!0),r=r.queue,Qr(Vr.bind(null,n,r,e),[e]),r.getSnapshot!==t||a||null!==Er&&1&Er.memoizedState.tag){if(n.flags|=2048,Xr(9,Gr.bind(null,n,r,i,t),void 0,null),null===Ya)throw Error(s(349));0!=(30&Ar)||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,Wr(t)&&As(e,1,-1)}function Vr(e,t,n){return n((function(){Wr(t)&&As(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=Dr();return"function"==typeof e&&(e=e()),t.memoizedState=t.baseState=e,e={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:Ur,lastRenderedState:e},t.queue=e,e=e.dispatch=li.bind(null,Mr,e),[t.memoizedState,e]}function Xr(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 Jr(){return Fr().memoizedState}function Yr(e,t,n,r){var i=Dr();Mr.flags|=e,i.memoizedState=Xr(1|t,n,void 0,void 0===r?null:r)}function Kr(e,t,n,r){var i=Fr();r=void 0===r?null:r;var a=void 0;if(null!==Sr){var s=Sr.memoizedState;if(a=s.destroy,null!==r&&Br(r,s.deps))return void(i.memoizedState=Xr(t,n,a,r))}Mr.flags|=e,i.memoizedState=Xr(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=Fr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Br(t,r[1])?r[0]:(n.memoizedState=[e,t],e)}function ii(e,t){var n=Fr();t=void 0===t?null:t;var r=n.memoizedState;return null!==r&&null!==t&&Br(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=br.transition;br.transition={};try{e(!1),t()}finally{Lt=n,br.transition=r}}function si(){return Fr().memoizedState}function oi(e,t,n){var r=bs(e);n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},ci(e)?ui(t,n):(hi(e,t,n),null!==(e=As(e,r,n=_s()))&&di(e,t,r))}function li(e,t,n){var r=bs(e),i={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(ci(e))ui(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=As(e,r,n=_s()))&&di(e,t,r)}}function ci(e){var t=e.alternate;return e===Mr||null!==t&&t===Mr}function ui(e,t){Tr=wr=!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&Ja)?(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,Bt(e,n)}}var pi={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},fi={readContext:hn,useCallback:function(e,t){return Dr().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=Dr();return t=void 0===t?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=Dr();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},Dr().memoizedState=e},useState:jr,useDebugValue:ni,useDeferredValue:function(e){var t=jr(e),n=t[0],r=t[1];return qr((function(){var t=br.transition;br.transition={};try{r(e)}finally{br.transition=t}}),[e]),n},useTransition:function(){var e=jr(!1),t=e[0];return e=ai.bind(null,e[1]),Dr().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=Mr,i=Dr();if(Wn){if(void 0===n)throw Error(s(407));n=n()}else{if(n=t(),null===Ya)throw Error(s(349));0!=(30&Ar)||Hr(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,Xr(9,Gr.bind(null,r,a,n,t),void 0,null),n},useId:function(){var e=Dr(),t=Ya.identifierPrefix;if(Wn){var n=Nn;t=":"+t+"R"+(n=(Un&~(1<<32-_t(Un)-1)).toString(32)+n),0<(n=Cr++)&&(t+="H"+n.toString(32)),t+=":"}else t=":"+t+"r"+(n=Rr++).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:Nr,useRef:Jr,useState:function(){return Nr(Ur)},useDebugValue:ni,useDeferredValue:function(e){var t=Nr(Ur),n=t[0],r=t[1];return Qr((function(){var t=br.transition;br.transition={};try{r(e)}finally{br.transition=t}}),[e]),n},useTransition:function(){return[Nr(Ur)[0],Fr().memoizedState]},useMutableSource:kr,useSyncExternalStore:zr,useId:si,unstable_isNewReconciler:!1},gi={readContext:hn,useCallback:ri,useContext:hn,useEffect:Qr,useImperativeHandle:ti,useInsertionEffect:Zr,useLayoutEffect:$r,useMemo:ii,useReducer:Or,useRef:Jr,useState:function(){return Or(Ur)},useDebugValue:ni,useDeferredValue:function(e){var t=Or(Ur),n=t[0],r=t[1];return Qr((function(){var t=br.transition;br.transition={};try{r(e)}finally{br.transition=t}}),[e]),n},useTransition:function(){return[Or(Ur)[0],Fr().memoizedState]},useMutableSource:kr,useSyncExternalStore:zr,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,_i,bi,Ai,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(){us||(us=!0,hs=r),yi(0,t)},n}function Ei(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 wi(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 Ti(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 Ci(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 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)k(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(){},bi=function(e,t,n,r,i){if((e=e.memoizedProps)!==r){var a=t.stateNode,s=hr(lr.current);n=H(a,n,e,r,i,s),(t.updateQueue=n)&&Ri(t)}},Ai=function(e,t,n,r){n!==r&&Ri(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=Be(a,i.type,i.memoizedProps,i)),k(e,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=Le(a,i.memoizedProps,i)),k(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 Bi=function(e,t,n,r){for(var i=t.child;null!==i;){if(5===i.tag){var a=i.stateNode;n&&r&&(a=Be(a,i.type,i.memoizedProps,i)),Ce(e,a)}else if(6===i.tag)a=i.stateNode,n&&r&&(a=Le(a,i.memoizedProps,i)),Ce(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}};_i=function(e,t){var n=t.stateNode;if(!Pi(e,t)){e=n.containerInfo;var r=Te(e);Bi(r,t,!1,!1),n.pendingChildren=r,Ri(t),Re(e,r)}},bi=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),c=null;s!==r&&(c=H(o,n,s,r,i,l)),e&&null===c?t.stateNode=a:(a=we(a,c,n,s,r,t,e,o),z(a,n,r,i,l)&&Ri(t),t.stateNode=a,e?Ri(t):xi(a,t,!1,!1))}},Ai=function(e,t,n,r){n!==r?(e=hr(ur.current),n=hr(lr.current),t.stateNode=V(r,e,n,t),Ri(t)):t.stateNode=e.stateNode}}else _i=function(){},bi=function(){},Ai=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 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 Di(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 ft(t.type)&&mt(),Ii(t),null;case 3:return r=t.stateNode,pr(),ot(ht),ot(ut),xr(),r.pendingContext&&(r.context=r.pendingContext,r.pendingContext=null),null!==e&&null!==e.child||(Zn(t)?Ri(t):null===e||e.memoizedState.isDehydrated&&0==(256&t.flags)||(t.flags|=1024,null!==Xn&&(Ts(Xn),Xn=null))),_i(e,t),Ii(t),null;case 5:mr(t),n=hr(ur.current);var i=t.type;if(null!==e&&null!=t.stateNode)bi(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 Ii(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&&Ri(t)}else{var a=O(i,r,n,e,t);xi(a,t,!1,!1),t.stateNode=a,z(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)Ai(e,t,e.memoizedProps,r);else{if("string"!=typeof r&&null===t.stateNode)throw Error(s(166));if(e=hr(ur.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=Gn))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&&Ri(t)}else t.stateNode=V(r,e,n,t)}return Ii(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=ke(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 Ii(t),null}return null!==Xn&&(Ts(Xn),Xn=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):Fs())),null!==t.updateQueue&&(t.flags|=4),Ii(t),null);case 4:return pr(),_i(e,t),null===e&&Z(t.stateNode.containerInfo),Ii(t),null;case 10:return ln(t.type._context),Ii(t),null;case 19:if(ot(gr),null===(i=t.memoizedState))return Ii(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&&Ot()>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 Ii(t),null}else 2*Ot()-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=Ot(),t.sibling=null,e=gr.current,lt(gr,r?1&e|2:1&e),t):(Ii(t),null);case 22:case 23:return Bs(),r=null!==t.memoizedState,null!==e&&null!==e.memoizedState!==r&&(t.flags|=8192),r&&0!=(1&t.mode)?0!=(1073741824&Qa)&&(Ii(t),Y&&6&t.subtreeFlags&&(t.flags|=8192)):Ii(t),null;case 24:case 25:return null}throw Error(s(156,t.tag))}var Fi=o.ReactCurrentOwner,Ui=!1;function Ni(e,t,n,r){t.child=null===e?sr(t,null,n,r):ar(t,e.child,n,r)}function Oi(e,t,n,r,i){n=n.render;var a=t.ref;return un(t,i),r=Lr(e,t,n,r,a,i),n=Ir(),null===e||Ui?(Wn&&n&&zn(t),t.flags|=1,Ni(e,t,r,i),t.child):(t.updateQueue=e.updateQueue,t.flags&=-2053,e.lanes&=~i,ia(e,t,i))}function ki(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,zi(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 zi(e,t,n,r,i){if(null!==e&&Zt(e.memoizedProps,r)&&e.ref===t.ref){if(Ui=!1,0==(e.lanes&i))return t.lanes=e.lanes,ia(e,t,i);0!=(131072&e.flags)&&(Ui=!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(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 Ni(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=ft(n)?dt:ut.current;return a=pt(t,a),un(t,i),n=Lr(e,t,n,r,a,i),r=Ir(),null===e||Ui?(Wn&&r&&zn(t),t.flags|=1,Ni(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(ft(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),wn(t,n,r),Cn(t,n,r,i),r=!0;else if(null===e){var s=t.stateNode,o=t.memoizedProps;s.props=o;var l=s.context,c=n.contextType;c="object"==typeof c&&null!==c?hn(c):pt(t,c=ft(n)?dt:ut.current);var u=n.getDerivedStateFromProps,h="function"==typeof u||"function"==typeof s.getSnapshotBeforeUpdate;h||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(o!==r||l!==c)&&Tn(t,s,r,c),pn=!1;var d=t.memoizedState;s.state=d,_n(t,r,s,i),l=t.memoizedState,o!==r||d!==l||ht.current||pn?("function"==typeof u&&(Mn(t,n,u,r),l=t.memoizedState),(o=pn||En(t,n,o,r,d,l,c))?(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=c,r=o):("function"==typeof s.componentDidMount&&(t.flags|=4194308),r=!1)}else{s=t.stateNode,mn(e,t),o=t.memoizedProps,c=t.type===t.elementType?o:en(t.type,o),s.props=c,h=t.pendingProps,d=s.context,l="object"==typeof(l=n.contextType)&&null!==l?hn(l):pt(t,l=ft(n)?dt:ut.current);var p=n.getDerivedStateFromProps;(u="function"==typeof p||"function"==typeof s.getSnapshotBeforeUpdate)||"function"!=typeof s.UNSAFE_componentWillReceiveProps&&"function"!=typeof s.componentWillReceiveProps||(o!==h||d!==l)&&Tn(t,s,r,l),pn=!1,d=t.memoizedState,s.state=d,_n(t,r,s,i);var f=t.memoizedState;o!==h||d!==f||ht.current||pn?("function"==typeof p&&(Mn(t,n,p,r),f=t.memoizedState),(c=pn||En(t,n,c,r,d,f,l)||!1)?(u||"function"!=typeof s.UNSAFE_componentWillUpdate&&"function"!=typeof s.componentWillUpdate||("function"==typeof s.componentWillUpdate&&s.componentWillUpdate(r,f,l),"function"==typeof s.UNSAFE_componentWillUpdate&&s.UNSAFE_componentWillUpdate(r,f,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=f),s.props=r,s.state=f,s.context=l,r=c):("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){Gi(e,t);var s=0!=(128&t.flags);if(!r&&!s)return i&&xt(t,n,!1),ia(e,t,a);r=t.stateNode,Fi.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)):Ni(e,t,o,a),t.memoizedState=r.state,i&&xt(t,n,!0),t.child}function Xi(e){var t=e.stateNode;t.pendingContext?gt(0,t.pendingContext,t.pendingContext!==t.context):t.context&&gt(0,t.context,!1),dr(e,t.containerInfo)}function Ji(e,t,n,r,i){return $n(),er(i),t.flags|=256,Ni(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:Ne(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(Ne(r))t=ea(e,t,n,Error(s(419)));else if(i=0!=(n&e.childLanes),Ui||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,As(e,i,-1))}Fs(),t=ea(e,t,n,Error(s(421)))}else Ue(r)?(t.flags|=128,t.child=e.child,t=Js.bind(null,e),Oe(r,t),t=null):(n=a.treeContext,q&&(Vn=Ge(r),Gn=t,Wn=!0,Xn=null,jn=!1,null!==n&&(In[Dn++]=Un,In[Dn++]=Nn,In[Dn++]=Fn,Un=n.id,Nn=n.overflow,Fn=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),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(Ni(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(Hn(t),t.tag){case 1:return ft(t.type)&&mt(),65536&(e=t.flags)?(t.flags=-65537&e|128,t):null;case 3:return pr(),ot(ht),ot(ut),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 pr(),null;case 10:return ln(t.type._context),null;case 22:case 23:return Bs(),null;default:return null}}var sa=!1,oa=!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){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 pa(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 fa(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(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(ua(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:ua(t,n);break;case 4:Y?Sa(e,t,n):K&&K&&(t=t.stateNode.containerInfo,n=Te(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 _a(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 ba(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&&(_e(t),n.flags&=-33),Ma(e,n=_a(e),t);break;case 3:case 4:t=n.stateNode.containerInfo,Aa(e,n=_a(e),t);break;default:throw Error(s(161))}}}function Aa(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(Aa(e,t,n),e=e.sibling;null!==e;)Aa(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 Ea(e,t){if(Y){switch(t.tag){case 0:case 11:case 14:case 15:return pa(3,t,t.return),fa(3,t),void pa(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 pe(t.stateNode,null!==e?e.memoizedProps:n,n);case 3:return void(q&&null!==e&&e.memoizedState.isDehydrated&&Je(t.stateNode.containerInfo));case 13:case 19:return void wa(t)}throw Error(s(163))}switch(t.tag){case 0:case 11:case 14:case 15:return pa(3,t,t.return),fa(3,t),void pa(5,t,t.return);case 12:case 22:case 23:return;case 13:case 19:return void wa(t);case 3:q&&null!==e&&e.memoizedState.isDehydrated&&Je(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 wa(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 Ta(e,t,n){ca=e,Ca(e,t,n)}function Ca(e,t,n){for(var r=0!=(1&e.mode);null!==ca;){var i=ca,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 c=oa;if(sa=s,(oa=l)&&!c)for(ca=i;null!==ca;)l=(s=ca).child,22===s.tag&&null!==s.memoizedState?Ba(i):null!==l?(l.return=s,ca=l):Ba(i);for(;null!==a;)ca=a,Ca(a,t,n),a=a.sibling;ca=i,sa=o,oa=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:oa||fa(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&&bn(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=I(t.child.stateNode);break;case 1:n=t.child.stateNode}bn(t,o,n)}break;case 5:var l=t.stateNode;null===n&&4&t.flags&&fe(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 c=t.alternate;if(null!==c){var u=c.memoizedState;if(null!==u){var h=u.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){ca=null;break}if(null!==(n=t.sibling)){n.return=t.return,ca=n;break}ca=t.return}}function Pa(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 Ba(e){for(;null!==ca;){var t=ca;try{switch(t.tag){case 0:case 11:case 15:var n=t.return;try{fa(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){ca=null;break}var o=t.sibling;if(null!==o){o.return=t.return,ca=o;break}ca=t.return}}var La=0,Ia=1,Da=2,Fa=3,Ua=4;if("function"==typeof Symbol&&Symbol.for){var Na=Symbol.for;La=Na("selector.component"),Ia=Na("selector.has_pseudo_class"),Da=Na("selector.role"),Fa=Na("selector.test_id"),Ua=Na("selector.text")}function Oa(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 ka(e,t){switch(t.$$typeof){case La: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||!oe(r)){for(;null!=a&&ka(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 Da:if(5===e.tag&&le(e.stateNode,t.value))return!0;break;case Ua:if((5===e.tag||6===e.tag)&&null!==(e=se(e))&&0<=e.indexOf(t.value))return!0;break;case Fa: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 za(e){switch(e.$$typeof){case La:return"<"+(M(e.value)||"Unknown")+">";case Ia:return":has("+(za(e)||"")+")";case Da:return'[role="'+e.value+'"]';case Ua:return'"'+e.value+'"';case Fa:return'[data-testname="'+e.value+'"]';default:throw Error(s(365))}}function Ha(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&&ka(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 Ga(e,t){if(!re)throw Error(s(363));e=Ha(e=Oa(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,Xa=o.ReactCurrentBatchConfig,Ja=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=Ot()+500}var cs,us=!1,hs=null,ds=null,ps=!1,fs=null,ms=0,gs=0,vs=null,ys=-1,xs=0;function _s(){return 0!=(6&Ja)?Ot():-1!==ys?ys:ys=Ot()}function bs(e){return 0==(1&e.mode)?1:0!=(2&Ja)&&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 As(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&Ja)&&r===Ya||(r===Ya&&(0==(2&Ja)&&(ns|=t),4===$a&&Cs(r,qa)),Ss(r,n),1===t&&0===Ja&&0==(1&e.mode)&&(ls(),Jt&&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-_t(a),o=1<<s,l=i[s];-1===l?0!=(o&n)&&0==(o&r)||(i[s]=Tt(o,t)):l<=t&&(e.expiredLanes|=o),a&=~o}}(e,t);var r=wt(e,e===Ya?qa:0);if(0===r)null!==n&&Ft(n),e.callbackNode=null,e.callbackPriority=0;else if(t=r&-r,e.callbackPriority!==t){if(null!=n&&Ft(n),1===t)0===e.tag?function(e){Jt=!0,Kt(e)}(Rs.bind(null,e)):Kt(Rs.bind(null,e)),te?ne((function(){0===Ja&&qt()})):Dt(kt,qt),n=null;else{switch(It(r)){case 1:n=kt;break;case 4:n=zt;break;case 16:default:n=Ht;break;case 536870912:n=Gt}n=Ks(n,Es.bind(null,e))}e.callbackPriority=t,e.callbackNode=n}}function Es(e,t){if(ys=-1,xs=0,0!=(6&Ja))throw Error(s(327));var n=e.callbackNode;if(Gs()&&e.callbackNode!==n)return null;var r=wt(e,e===Ya?qa:0);if(0===r)return null;if(0!=(30&r)||0!=(r&e.expiredLanes)||t)t=Us(e,r);else{t=r;var i=Ja;Ja|=2;var a=Ds();for(Ya===e&&qa===t||(ls(),Ls(e,t));;)try{Os();break}catch(t){Is(e,t)}sn(),Wa.current=a,Ja=i,null!==Ka?t=0:(Ya=null,qa=0,t=$a)}if(0!==t){if(2===t&&0!==(i=Ct(e))&&(r=i,t=ws(e,i)),1===t)throw n=es,Ls(e,0),Cs(e,r),Ss(e,Ot()),n;if(6===t)Cs(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=Us(e,r))&&0!==(a=Ct(e))&&(r=a,t=ws(e,a)),1===t))throw n=es,Ls(e,0),Cs(e,r),Ss(e,Ot()),n;switch(e.finishedWork=i,e.finishedLanes=r,t){case 0:case 1:throw Error(s(345));case 2:case 5:Hs(e,as);break;case 3:if(Cs(e,r),(130023424&r)===r&&10<(t=ss+500-Ot())){if(0!==wt(e,0))break;if(((i=e.suspendedLanes)&r)!==r){_s(),e.pingedLanes|=e.suspendedLanes&i;break}e.timeoutHandle=W(Hs.bind(null,e,as),t);break}Hs(e,as);break;case 4:if(Cs(e,r),(4194240&r)===r)break;for(t=e.eventTimes,i=-1;0<r;){var o=31-_t(r);a=1<<o,(o=t[o])>i&&(i=o),r&=~a}if(r=i,10<(r=(120>(r=Ot()-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(Hs.bind(null,e,as),r);break}Hs(e,as);break;default:throw Error(s(329))}}}return Ss(e,Ot()),e.callbackNode===n?Es.bind(null,e):null}function ws(e,t){var n=is;return e.current.memoizedState.isDehydrated&&(Ls(e,t).flags|=256),2!==(e=Us(e,t))&&(t=as,as=n,null!==t&&Ts(t)),e}function Ts(e){null===as?as=e:as.push.apply(as,e)}function Cs(e,t){for(t&=~rs,t&=~ns,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 Rs(e){if(0!=(6&Ja))throw Error(s(327));Gs();var t=wt(e,0);if(0==(1&t))return Ss(e,Ot()),null;var n=Us(e,t);if(0!==e.tag&&2===n){var r=Ct(e);0!==r&&(t=r,n=ws(e,r))}if(1===n)throw n=es,Ls(e,0),Cs(e,t),Ss(e,Ot()),n;if(6===n)throw Error(s(345));return e.finishedWork=e.current.alternate,e.finishedLanes=t,Hs(e,as),Ss(e,Ot()),null}function Ps(e){null!==fs&&0===fs.tag&&0==(6&Ja)&&Gs();var t=Ja;Ja|=1;var n=Xa.transition,r=Lt;try{if(Xa.transition=null,Lt=1,e)return e()}finally{Lt=r,Xa.transition=n,0==(6&(Ja=t))&&qt()}}function Bs(){Qa=Za.current,ot(Za)}function Ls(e,t){e.finishedWork=null,e.finishedLanes=0;var n=e.timeoutHandle;if(n!==X&&(e.timeoutHandle=X,j(n)),null!==Ka)for(n=Ka.return;null!==n;){var r=n;switch(Hn(r),r.tag){case 1:null!=(r=r.type.childContextTypes)&&mt();break;case 3:pr(),ot(ht),ot(ut),xr();break;case 5:mr(r);break;case 4:pr();break;case 13:case 19:ot(gr);break;case 10:ln(r.type._context);break;case 22:case 23:Bs()}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 Is(e,t){for(;;){var n=Ka;try{if(sn(),_r.current=pi,wr){for(var r=Mr.memoizedState;null!==r;){var i=r.queue;null!==i&&(i.pending=null),r=r.next}wr=!1}if(Ar=0,Er=Sr=Mr=null,Tr=!1,Cr=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,c=t;if(t=qa,l.flags|=32768,null!==c&&"object"==typeof c&&"function"==typeof c.then){var u=c,h=l,d=h.tag;if(0==(1&h.mode)&&(0===d||11===d||15===d)){var p=h.alternate;p?(h.updateQueue=p.updateQueue,h.memoizedState=p.memoizedState,h.lanes=p.lanes):(h.updateQueue=null,h.memoizedState=null)}var f=Ti(o);if(null!==f){f.flags&=-257,Ci(f,o,l,0,t),1&f.mode&&wi(a,u,t),c=u;var m=(t=f).updateQueue;if(null===m){var g=new Set;g.add(c),t.updateQueue=g}else m.add(c);break e}if(0==(1&t)){wi(a,u,t),Fs();break e}c=Error(s(426))}else if(Wn&&1&l.mode){var v=Ti(o);if(null!==v){0==(65536&v.flags)&&(v.flags|=256),Ci(v,o,l,0,t),er(c);break e}}a=c,4!==$a&&($a=2),null===is?is=[a]:is.push(a),c=vi(c,l),l=o;do{switch(l.tag){case 3:l.flags|=65536,t&=-t,l.lanes|=t,xn(l,Si(0,c,t));break e;case 1:a=c;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,Ei(l,a,t));break e}}l=l.return}while(null!==l)}zs(n)}catch(e){t=e,Ka===n&&null!==n&&(Ka=n=n.return);continue}break}}function Ds(){var e=Wa.current;return Wa.current=pi,null===e?pi:e}function Fs(){0!==$a&&3!==$a&&2!==$a||($a=4),null===Ya||0==(268435455&ts)&&0==(268435455&ns)||Cs(Ya,qa)}function Us(e,t){var n=Ja;Ja|=2;var r=Ds();for(Ya===e&&qa===t||Ls(e,t);;)try{Ns();break}catch(t){Is(e,t)}if(sn(),Ja=n,Wa.current=r,null!==Ka)throw Error(s(261));return Ya=null,qa=0,$a}function Ns(){for(;null!==Ka;)ks(Ka)}function Os(){for(;null!==Ka&&!Ut();)ks(Ka)}function ks(e){var t=cs(e.alternate,e,Qa);e.memoizedProps=e.pendingProps,null===t?zs(e):Ka=t,ja.current=null}function zs(e){var t=e;do{var n=t.alternate;if(e=t.return,0==(32768&t.flags)){if(null!==(n=Di(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 Hs(e,t){var n=Lt,r=Xa.transition;try{Xa.transition=null,Lt=1,function(e,t,n){do{Gs()}while(null!==fs);if(0!=(6&Ja))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-_t(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)||ps||(ps=!0,Ks(Ht,(function(){return Gs(),null}))),a=0!=(15990&r.flags),0!=(15990&r.subtreeFlags)||a){a=Xa.transition,Xa.transition=null;var o=Lt;Lt=1;var l=Ja;Ja|=4,ja.current=null,function(e,t){for(U(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,o=a.getSnapshotBeforeUpdate(e.elementType===e.type?r:en(e.type,r),i);a.__reactInternalSnapshotBeforeUpdate=o}break;case 3:Y&&Ee(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,ca=t;break}ca=e.return}n=da,da=!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;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,ca=n;else for(;null!==ca;){t=ca;try{var o=t.flags;if(32&o&&Y&&_e(t.stateNode),512&o){var l=t.alternate;if(null!==l){var c=l.ref;null!==c&&("function"==typeof c?c(null):c.current=null)}}if(8192&o)switch(t.tag){case 13:if(null!==t.memoizedState){var u=t.alternate;null!==u&&null!==u.memoizedState||(ss=Ot())}break;case 22:var h=null!==t.memoizedState,d=t.alternate,p=null!==d&&null!==d.memoizedState;if(n=t,Y)e:if(r=n,i=h,a=null,Y)for(var f=r;;){if(5===f.tag){if(null===a){a=f;var m=f.stateNode;i?be(m):Me(f.stateNode,f.memoizedProps)}}else if(6===f.tag){if(null===a){var g=f.stateNode;i?Ae(g):Se(g,f.memoizedProps)}}else if((22!==f.tag&&23!==f.tag||null===f.memoizedState||f===r)&&null!==f.child){f.child.return=f,f=f.child;continue}if(f===r)break;for(;null===f.sibling;){if(null===f.return||f.return===r)break e;a===f&&(a=null),f=f.return}a===f&&(a=null),f.sibling.return=f.return,f=f.sibling}if(h&&!p&&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:pa(4,r,r.return);break;case 1:ua(r,r.return);var x=r.stateNode;if("function"==typeof x.componentWillUnmount){var _=r.return;try{x.props=r.memoizedProps,x.state=r.memoizedState,x.componentWillUnmount()}catch(e){Ws(r,_,e)}}break;case 5:ua(r,r.return);break;case 22:if(null!==r.memoizedState){Pa(n);continue}}null!==y?(y.return=r,ca=y):Pa(n)}v=v.sibling}}}switch(4102&o){case 2:ba(t),t.flags&=-3;break;case 6:ba(t),t.flags&=-3,Ea(t.alternate,t);break;case 4096:t.flags&=-4097;break;case 4100:t.flags&=-4097,Ea(t.alternate,t);break;case 4:Ea(t.alternate,t)}}catch(e){Ws(t,t.return,e)}if(null!==(n=t.sibling)){n.return=t.return,ca=n;break}ca=t.return}}}(e,r),N(e.containerInfo),e.current=r,Ta(r,e,i),Nt(),Ja=l,Lt=o,Xa.transition=a}else e.current=r;if(ps&&(ps=!1,fs=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,Ot()),null!==t)for(n=e.onRecoverableError,r=0;r<t.length;r++)n(t[r]);if(us)throw us=!1,e=hs,hs=null,e;0!=(1&ms)&&0!==e.tag&&Gs(),0!=(1&(a=e.pendingLanes))?e===vs?gs++:(gs=0,vs=e):gs=0,qt()}(e,t,n)}finally{Xa.transition=r,Lt=n}return null}function Gs(){if(null!==fs){var e=It(ms),t=Xa.transition,n=Lt;try{if(Xa.transition=null,Lt=16>e?16:e,null===fs)var r=!1;else{if(e=fs,fs=null,ms=0,0!=(6&Ja))throw Error(s(331));var i=Ja;for(Ja|=4,ca=e.current;null!==ca;){var a=ca,o=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 h=ca;switch(h.tag){case 0:case 11:case 15:pa(8,h,a)}var d=h.child;if(null!==d)d.return=h,ca=d;else for(;null!==ca;){var p=(h=ca).sibling,f=h.return;if(ya(h),h===u){ca=null;break}if(null!==p){p.return=f,ca=p;break}ca=f}}}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!==o)o.return=a,ca=o;else e:for(;null!==ca;){if(0!=(2048&(a=ca).flags))switch(a.tag){case 0:case 11:case 15:pa(9,a,a.return)}var y=a.sibling;if(null!==y){y.return=a.return,ca=y;break e}ca=a.return}}var x=e.current;for(ca=x;null!==ca;){var _=(o=ca).child;if(0!=(2064&o.subtreeFlags)&&null!==_)_.return=o,ca=_;else e:for(o=x;null!==ca;){if(0!=(2048&(l=ca).flags))try{switch(l.tag){case 0:case 11:case 15:fa(9,l)}}catch(e){Ws(l,l.return,e)}if(l===o){ca=null;break e}var b=l.sibling;if(null!==b){b.return=l.return,ca=b;break e}ca=l.return}}if(Ja=i,qt(),Wt&&"function"==typeof Wt.onPostCommitFiberRoot)try{Wt.onPostCommitFiberRoot(Vt,e)}catch(e){}r=!0}return r}finally{Lt=n,Xa.transition=t}}return!1}function Vs(e,t,n){vn(e,t=Si(0,t=vi(n,t),1)),t=_s(),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=Ei(t,e=vi(n,e),1)),e=_s(),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=_s(),e.pingedLanes|=e.suspendedLanes&n,Ya===e&&(qa&n)===n&&(4===$a||3===$a&&(130023424&qa)===qa&&500>Ot()-ss?Ls(e,0):rs|=n),Ss(e,t)}function Xs(e,t){0===t&&(0==(1&e.mode)?t=1:(t=St,0==(130023424&(St<<=1))&&(St=4194304)));var n=_s();null!==(e=Ms(e,t))&&(Pt(e,t,n),Ss(e,n))}function Js(e){var t=e.memoizedState,n=0;null!==t&&(n=t.retryLane),Xs(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),Xs(e,n)}function Ks(e,t){return Dt(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 u: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 _:return no(n,i,a,t);default:if("object"==typeof e&&null!==e)switch(e.$$typeof){case p:o=10;break e;case f: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=_,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=X,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,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},fn(a),e}function oo(e){if(!e)return ct;e:{if(E(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(ft(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(ft(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=C(t))?null:e.stateNode}function co(e,t){if(null!==(e=e.memoizedState)&&null!==e.dehydrated){var n=e.retryLane;e.retryLane=0!==n&&n<t?n:t}}function uo(e,t){co(e,t),(e=e.alternate)&&co(e,t)}function ho(e){return null===(e=C(e))?null:e.stateNode}function po(){return null}return cs=function(e,t,n){if(null!==e)if(e.memoizedProps!==t.pendingProps||ht.current)Ui=!0;else{if(0==(e.lanes&n)&&0==(128&t.flags))return Ui=!1,function(e,t,n){switch(t.tag){case 3:Xi(t),$n();break;case 5:fr(t);break;case 1:ft(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,Hi(e,t,n)}return ia(e,t,n)}(e,t,n);Ui=0!=(131072&e.flags)}else Ui=!1,Wn&&0!=(1048576&t.flags)&&kn(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=pt(t,ut.current);un(t,n),i=Lr(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,ft(r)?(a=!0,yt(t)):a=!1,t.memoizedState=null!==i.state&&void 0!==i.state?i.state:null,fn(t),i.updater=Sn,t.stateNode=i,i._reactInternals=t,Cn(t,r,e,n),t=ji(null,t,r,!0,a,n)):(t.tag=0,Wn&&a&&zn(t),Ni(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=Oi(null,t,r,e,n);break e;case 14:t=ki(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(Xi(t),null===e)throw Error(s(387));r=t.pendingProps,i=(a=t.memoizedState).element,mn(e,t),_n(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=Ji(e,t,r,n,i=Error(s(423)));break e}if(r!==i){t=Ji(e,t,r,n,i=Error(s(424)));break e}for(q&&(Vn=He(t.stateNode.containerInfo),Gn=t,Wn=!0,Xn=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}Ni(e,t,r,n)}t=t.child}return t;case 5:return fr(t),null===e&&qn(t),r=t.type,i=t.pendingProps,a=null!==e?e.memoizedProps:null,o=i.children,G(r,i)?o=null:null!==a&&G(r,a)&&(t.flags|=32),Gi(e,t),Ni(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):Ni(e,t,r,n),t.child;case 11:return r=t.type,i=t.pendingProps,Oi(e,t,r,i=t.elementType===r?i:en(r,i),n);case 7:return Ni(e,t,t.pendingProps,n),t.child;case 8:case 12:return Ni(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 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 h=(u=u.shared).pending;null===h?c.next=c:(c.next=h.next,h.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)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),cn(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}Ni(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=hn(i)),t.flags|=1,Ni(e,t,r,n),t.child;case 14:return i=en(r=t.type,t.pendingProps),ki(e,t,r,i=en(r.type,i),n);case 15:return zi(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,ft(r)?(e=!0,yt(t)):e=!1,un(t,n),wn(t,r,i),Cn(t,r,i,n),ji(null,t,r,!0,e,n);case 19:return ra(e,t,n);case 22:return Hi(e,t,n)}throw Error(s(156,t.tag))},t.attemptContinuousHydration=function(e){13===e.tag&&(As(e,134217728,_s()),uo(e,134217728))},t.attemptHydrationAtCurrentPriority=function(e){if(13===e.tag){var t=_s(),n=bs(e);As(e,n,t),uo(e,n)}},t.attemptSynchronousHydration=function(e){switch(e.tag){case 3:var t=e.stateNode;if(t.current.memoizedState.isDehydrated){var n=Et(t.pendingLanes);0!==n&&(Bt(t,1|n),Ss(t,Ot()),0==(6&Ja)&&(ls(),qt()))}break;case 13:var r=_s();Ps((function(){return As(e,1,r)})),uo(e,1)}},t.batchedUpdates=function(e,t){var n=Ja;Ja|=1;try{return e(t)}finally{0===(Ja=n)&&(ls(),Jt&&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:Ia,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=_s(),i=bs(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:c,key:null==r?null:""+r,children:e,containerInfo:t,implementation:n}},t.createRoleSelector=function(e){return{$$typeof:Da,value:e}},t.createTestNameSelector=function(e){return{$$typeof:Fa,value:e}},t.createTextSelector=function(e){return{$$typeof:Ua,value:e}},t.deferredUpdates=function(e){var t=Lt,n=Xa.transition;try{return Xa.transition=null,Lt=16,e()}finally{Lt=t,Xa.transition=n}},t.discreteUpdates=function(e,t,n,r,i){var a=Lt,s=Xa.transition;try{return Xa.transition=null,Lt=1,e(t,n,r,i)}finally{Lt=a,Xa.transition=s,0===Ja&&ls()}},t.findAllNodes=Ga,t.findBoundingRects=function(e,t){if(!re)throw Error(s(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,o=a+n.height,l=t-1;0<=l;l--)if(t!==l){var c=e[l],u=c.x,h=u+c.width,d=c.y,p=d+c.height;if(r>=u&&a>=d&&i<=h&&o<=p){e.splice(t,1);break}if(!(r!==u||n.width!==c.width||p<a||d>o)){d>a&&(c.height+=d-a,c.y=a),p<o&&(c.height=o-d),e.splice(t,1);break}if(!(a!==d||n.height!==c.height||h<r||u>i)){u>r&&(c.width+=u-r,c.x=r),h<i&&(c.width=i-u),e.splice(t,1);break}}return e},t.findHostInstance=lo,t.findHostInstanceWithNoPortals=function(e){return null===(e=null!==(e=T(e))?P(e):null)?null:e.stateNode},t.findHostInstanceWithWarning=function(e){return lo(e)},t.flushControlled=function(e){var t=Ja;Ja|=1;var n=Xa.transition,r=Lt;try{Xa.transition=null,Lt=1,e()}finally{Lt=r,Xa.transition=n,0===(Ja=t)&&(ls(),qt())}},t.flushPassiveEffects=Gs,t.flushSync=Ps,t.focusWithin=function(e,t){if(!re)throw Error(s(363));for(t=Ha(e=Oa(e),t),t=Array.from(t),e=0;e<t.length;){var n=t[e++];if(!oe(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 Lt},t.getFindAllNodesFailureDescription=function(e,t){if(!re)throw Error(s(363));var n=0,r=[];e=[Oa(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))&&(ka(a,l)&&(r.push(za(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(za(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:o.ReactCurrentDispatcher,findHostInstanceByFiber:ho,findFiberByHostInstance:e.findFiberByHostInstance||po,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=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=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=_s(),s=bs(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=As(i,s,a))&&yn(e,i,s),s},t}},576:(e,t,n)=>{"use strict";e.exports=n(511)},525:(e,t,n)=>{"use strict";e.exports=n(287)},408:(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"),c=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),h=Symbol.for("react.memo"),d=Symbol.for("react.lazy"),p=Symbol.iterator,f={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||f}function y(){}function x(e,t,n){this.props=e,this.context=t,this.refs=g,this.updater=n||f}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 _=x.prototype=new y;_.constructor=x,m(_,v.prototype),_.isPureReactComponent=!0;var b=Array.isArray,A=Object.prototype.hasOwnProperty,M={current:null},S={key:!0,ref:!0,__self:!0,__source:!0};function E(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)A.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:s,ref:o,props:a,_owner:M.current}}function w(e){return"object"==typeof e&&null!==e&&e.$$typeof===n}var T=/\/+/g;function C(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,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?"."+C(l,0):a,b(s)?(i="",null!=e&&(i=e.replace(T,"$&/")+"/"),R(s,t,i,"",(function(e){return e}))):null!=s&&(w(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(T,"$&/")+"/")+e)),t.push(s)),1;if(l=0,a=""===a?".":a+":",b(e))for(var c=0;c<e.length;c++){var u=a+C(o=e[c],c);l+=R(o,t,i,u,s)}else if(u=function(e){return null===e||"object"!=typeof e?null:"function"==typeof(e=p&&e[p]||e["@@iterator"])?e:null}(e),"function"==typeof u)for(e=u.call(e),c=0;!(o=e.next()).done;)l+=R(o=o.value,t,i,u=a+C(o,c++),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 R(e,r,"","",(function(e){return t.call(n,e,i++)})),r}function B(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},I={transition:null},D={ReactCurrentDispatcher:L,ReactCurrentBatchConfig:I,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(!w(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=u,t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED=D,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(c in t)A.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: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=E,t.createFactory=function(e){var t=E.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=w,t.lazy=function(e){return{$$typeof:d,_payload:{_status:-1,_result:e},_init:B}},t.memo=function(e,t){return{$$typeof:h,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 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"},294:(e,t,n)=>{"use strict";e.exports=n(408)},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],c=o+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[o]=n,r=o);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 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 c=[],u=[],h=1,d=null,p=3,f=!1,m=!1,g=!1,v="function"==typeof setTimeout?setTimeout:null,y="function"==typeof clearTimeout?clearTimeout:null,x="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 b(e){if(g=!1,_(e),!m)if(null!==r(c))m=!0,I(A);else{var t=r(u);null!==t&&D(b,t.startTime-e)}}function A(e,n){m=!1,g&&(g=!1,y(w),w=-1),f=!0;var a=p;try{for(_(n),d=r(c);null!==d&&(!(d.expirationTime>n)||e&&!R());){var s=d.callback;if("function"==typeof s){d.callback=null,p=d.priorityLevel;var o=s(d.expirationTime<=n);n=t.unstable_now(),"function"==typeof o?d.callback=o:d===r(c)&&i(c),_(n)}else i(c);d=r(c)}if(null!==d)var l=!0;else{var h=r(u);null!==h&&D(b,h.startTime-n),l=!1}return l}finally{d=null,p=a,f=!1}}"undefined"!=typeof navigator&&void 0!==navigator.scheduling&&void 0!==navigator.scheduling.isInputPending&&navigator.scheduling.isInputPending.bind(navigator.scheduling);var M,S=!1,E=null,w=-1,T=5,C=-1;function R(){return!(t.unstable_now()-C<T)}function P(){if(null!==E){var e=t.unstable_now();C=e;var n=!0;try{n=E(!0,e)}finally{n?M():(S=!1,E=null)}}else S=!1}if("function"==typeof x)M=function(){x(P)};else if("undefined"!=typeof MessageChannel){var B=new MessageChannel,L=B.port2;B.port1.onmessage=P,M=function(){L.postMessage(null)}}else M=function(){v(P,0)};function I(e){E=e,S||(S=!0,M())}function D(e,n){w=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||f||(m=!0,I(A))},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"):T=0<e?Math.floor(1e3/e):5},t.unstable_getCurrentPriorityLevel=function(){return p},t.unstable_getFirstCallbackNode=function(){return r(c)},t.unstable_next=function(e){switch(p){case 1:case 2:case 3:var t=3;break;default:t=p}var n=p;p=t;try{return e()}finally{p=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=p;p=e;try{return t()}finally{p=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(u,e),null===r(c)&&e===r(u)&&(g?(y(w),w=-1):g=!0,D(b,a-s))):(e.sortIndex=o,n(c,e),m||f||(m=!0,I(A))),e},t.unstable_shouldYield=R,t.unstable_wrapCallback=function(e){var t=p;return function(){var n=p;p=t;try{return e.apply(this,arguments)}finally{p=n}}}},840:(e,t,n)=>{"use strict";e.exports=n(53)}},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";var e={};n.r(e),n.d(e,{ACESFilmicToneMapping:()=>te,AddEquation:()=>S,AddOperation:()=>q,AdditiveAnimationBlendMode:()=>Pt,AdditiveBlending:()=>_,AlphaFormat:()=>Ie,AlwaysCompare:()=>fn,AlwaysDepth:()=>H,AlwaysStencilFunc:()=>sn,AmbientLight:()=>wd,AmbientLightProbe:()=>Vd,AnimationAction:()=>gp,AnimationClip:()=>qh,AnimationLoader:()=>ad,AnimationMixer:()=>yp,AnimationObjectGroup:()=>mp,AnimationUtils:()=>Nh,ArcCurve:()=>tu,ArrayCamera:()=>Sl,ArrowHelper:()=>uf,Audio:()=>tp,AudioAnalyser:()=>op,AudioContext:()=>zd,AudioListener:()=>ep,AudioLoader:()=>Hd,AxesHelper:()=>hf,BackSide:()=>m,BasicDepthPacking:()=>Ut,BasicShadowMap:()=>u,Bone:()=>gc,BooleanKeyframeTrack:()=>Vh,Box2:()=>Pp,Box3:()=>Sr,Box3Helper:()=>af,BoxGeometry:()=>Fa,BoxHelper:()=>rf,BufferAttribute:()=>Qi,BufferGeometry:()=>ma,BufferGeometryLoader:()=>Id,ByteType:()=>Me,Cache:()=>Zh,Camera:()=>Ha,CameraHelper:()=>ef,CanvasTexture:()=>Zc,CapsuleGeometry:()=>Au,CatmullRomCurve3:()=>ou,CineonToneMapping:()=>ee,CircleGeometry:()=>Mu,ClampToEdgeWrapping:()=>ue,Clock:()=>Yd,Color:()=>Hi,ColorKeyframeTrack:()=>Wh,ColorManagement:()=>ar,CompressedArrayTexture:()=>Qc,CompressedTexture:()=>qc,CompressedTextureLoader:()=>sd,ConeGeometry:()=>Eu,CubeCamera:()=>Wa,CubeReflectionMapping:()=>ie,CubeRefractionMapping:()=>ae,CubeTexture:()=>ja,CubeTextureLoader:()=>ld,CubeUVReflectionMapping:()=>le,CubicBezierCurve:()=>hu,CubicBezierCurve3:()=>du,CubicInterpolant:()=>kh,CullFaceBack:()=>o,CullFaceFront:()=>l,CullFaceFrontBack:()=>c,CullFaceNone:()=>s,Curve:()=>$c,CurvePath:()=>xu,CustomBlending:()=>M,CustomToneMapping:()=>ne,CylinderGeometry:()=>Su,Cylindrical:()=>Cp,Data3DTexture:()=>vr,DataArrayTexture:()=>mr,DataTexture:()=>vc,DataTextureLoader:()=>cd,DataUtils:()=>Yi,DecrementStencilOp:()=>Yt,DecrementWrapStencilOp:()=>qt,DefaultLoadingManager:()=>ed,DepthFormat:()=>Ne,DepthStencilFormat:()=>Oe,DepthTexture:()=>Cl,DirectionalLight:()=>Ed,DirectionalLightHelper:()=>Qp,DiscreteInterpolant:()=>Hh,DisplayP3ColorSpace:()=>Vt,DodecahedronGeometry:()=>Tu,DoubleSide:()=>g,DstAlphaFactor:()=>F,DstColorFactor:()=>N,DynamicCopyUsage:()=>An,DynamicDrawUsage:()=>gn,DynamicReadUsage:()=>xn,EdgesGeometry:()=>Lu,EllipseCurve:()=>eu,EqualCompare:()=>cn,EqualDepth:()=>W,EqualStencilFunc:()=>en,EquirectangularReflectionMapping:()=>se,EquirectangularRefractionMapping:()=>oe,Euler:()=>oi,EventDispatcher:()=>Rn,ExtrudeGeometry:()=>oh,FileLoader:()=>id,Float16BufferAttribute:()=>aa,Float32BufferAttribute:()=>sa,Float64BufferAttribute:()=>oa,FloatType:()=>Ce,Fog:()=>Ul,FogExp2:()=>Fl,FramebufferTexture:()=>Kc,FrontSide:()=>f,Frustum:()=>$a,GLBufferAttribute:()=>Mp,GLSL1:()=>Sn,GLSL3:()=>En,GreaterCompare:()=>hn,GreaterDepth:()=>X,GreaterEqualCompare:()=>pn,GreaterEqualDepth:()=>j,GreaterEqualStencilFunc:()=>an,GreaterStencilFunc:()=>nn,GridHelper:()=>Xp,Group:()=>El,HalfFloatType:()=>Re,HemisphereLight:()=>dd,HemisphereLightHelper:()=>jp,HemisphereLightProbe:()=>Gd,IcosahedronGeometry:()=>ch,ImageBitmapLoader:()=>Od,ImageLoader:()=>od,ImageUtils:()=>or,IncrementStencilOp:()=>Jt,IncrementWrapStencilOp:()=>Kt,InstancedBufferAttribute:()=>bc,InstancedBufferGeometry:()=>Ld,InstancedInterleavedBuffer:()=>Ap,InstancedMesh:()=>Rc,Int16BufferAttribute:()=>ta,Int32BufferAttribute:()=>ra,Int8BufferAttribute:()=>Zi,IntType:()=>we,InterleavedBuffer:()=>Ol,InterleavedBufferAttribute:()=>zl,Interpolant:()=>Oh,InterpolateDiscrete:()=>Mt,InterpolateLinear:()=>St,InterpolateSmooth:()=>Et,InvertStencilOp:()=>Qt,KeepStencilOp:()=>jt,KeyframeTrack:()=>Gh,LOD:()=>ac,LatheGeometry:()=>bu,Layers:()=>li,LessCompare:()=>ln,LessDepth:()=>G,LessEqualCompare:()=>un,LessEqualDepth:()=>V,LessEqualStencilFunc:()=>tn,LessStencilFunc:()=>$t,Light:()=>hd,LightProbe:()=>Rd,Line:()=>Uc,Line3:()=>Ip,LineBasicMaterial:()=>Pc,LineCurve:()=>pu,LineCurve3:()=>fu,LineDashedMaterial:()=>Ph,LineLoop:()=>zc,LineSegments:()=>kc,LinearEncoding:()=>Dt,LinearFilter:()=>ve,LinearInterpolant:()=>zh,LinearMipMapLinearFilter:()=>be,LinearMipMapNearestFilter:()=>xe,LinearMipmapLinearFilter:()=>_e,LinearMipmapNearestFilter:()=>ye,LinearSRGBColorSpace:()=>Gt,LinearToneMapping:()=>Z,Loader:()=>td,LoaderUtils:()=>Bd,LoadingManager:()=>$h,LoopOnce:()=>_t,LoopPingPong:()=>At,LoopRepeat:()=>bt,LuminanceAlphaFormat:()=>Ue,LuminanceFormat:()=>Fe,MOUSE:()=>i,Material:()=>Ui,MaterialLoader:()=>Pd,MathUtils:()=>Vn,Matrix3:()=>jn,Matrix4:()=>Qr,MaxEquation:()=>C,Mesh:()=>Ia,MeshBasicMaterial:()=>Vi,MeshDepthMaterial:()=>yl,MeshDistanceMaterial:()=>xl,MeshLambertMaterial:()=>Ch,MeshMatcapMaterial:()=>Rh,MeshNormalMaterial:()=>Th,MeshPhongMaterial:()=>Eh,MeshPhysicalMaterial:()=>Sh,MeshStandardMaterial:()=>Mh,MeshToonMaterial:()=>wh,MinEquation:()=>T,MirroredRepeatWrapping:()=>he,MixOperation:()=>K,MultiplyBlending:()=>A,MultiplyOperation:()=>Y,NearestFilter:()=>de,NearestMipMapLinearFilter:()=>ge,NearestMipMapNearestFilter:()=>fe,NearestMipmapLinearFilter:()=>me,NearestMipmapNearestFilter:()=>pe,NeverCompare:()=>on,NeverDepth:()=>z,NeverStencilFunc:()=>Zt,NoBlending:()=>y,NoColorSpace:()=>zt,NoToneMapping:()=>Q,NormalAnimationBlendMode:()=>Rt,NormalBlending:()=>x,NotEqualCompare:()=>dn,NotEqualDepth:()=>J,NotEqualStencilFunc:()=>rn,NumberKeyframeTrack:()=>jh,Object3D:()=>Ai,ObjectLoader:()=>Dd,ObjectSpaceNormalMap:()=>kt,OctahedronGeometry:()=>uh,OneFactor:()=>P,OneMinusDstAlphaFactor:()=>U,OneMinusDstColorFactor:()=>O,OneMinusSrcAlphaFactor:()=>D,OneMinusSrcColorFactor:()=>L,OrthographicCamera:()=>ps,PCFShadowMap:()=>h,PCFSoftShadowMap:()=>d,PMREMGenerator:()=>bs,Path:()=>_u,PerspectiveCamera:()=>Ga,Plane:()=>qa,PlaneGeometry:()=>ns,PlaneHelper:()=>sf,PointLight:()=>Md,PointLightHelper:()=>Hp,Points:()=>Xc,PointsMaterial:()=>Hc,PolarGridHelper:()=>Jp,PolyhedronGeometry:()=>wu,PositionalAudio:()=>sp,PropertyBinding:()=>fp,PropertyMixer:()=>lp,QuadraticBezierCurve:()=>mu,QuadraticBezierCurve3:()=>gu,Quaternion:()=>_r,QuaternionKeyframeTrack:()=>Jh,QuaternionLinearInterpolant:()=>Xh,RED_GREEN_RGTC2_Format:()=>yt,RED_RGTC1_Format:()=>gt,REVISION:()=>r,RGBADepthPacking:()=>Nt,RGBAFormat:()=>De,RGBAIntegerFormat:()=>Ve,RGBA_ASTC_10x10_Format:()=>dt,RGBA_ASTC_10x5_Format:()=>ct,RGBA_ASTC_10x6_Format:()=>ut,RGBA_ASTC_10x8_Format:()=>ht,RGBA_ASTC_12x10_Format:()=>pt,RGBA_ASTC_12x12_Format:()=>ft,RGBA_ASTC_4x4_Format:()=>tt,RGBA_ASTC_5x4_Format:()=>nt,RGBA_ASTC_5x5_Format:()=>rt,RGBA_ASTC_6x5_Format:()=>it,RGBA_ASTC_6x6_Format:()=>at,RGBA_ASTC_8x5_Format:()=>st,RGBA_ASTC_8x6_Format:()=>ot,RGBA_ASTC_8x8_Format:()=>lt,RGBA_BPTC_Format:()=>mt,RGBA_ETC2_EAC_Format:()=>et,RGBA_PVRTC_2BPPV1_Format:()=>Qe,RGBA_PVRTC_4BPPV1_Format:()=>qe,RGBA_S3TC_DXT1_Format:()=>je,RGBA_S3TC_DXT3_Format:()=>Xe,RGBA_S3TC_DXT5_Format:()=>Je,RGB_ETC1_Format:()=>Ze,RGB_ETC2_Format:()=>$e,RGB_PVRTC_2BPPV1_Format:()=>Ke,RGB_PVRTC_4BPPV1_Format:()=>Ye,RGB_S3TC_DXT1_Format:()=>We,RGFormat:()=>He,RGIntegerFormat:()=>Ge,RawShaderMaterial:()=>Ah,Ray:()=>qr,Raycaster:()=>Sp,RectAreaLight:()=>Td,RedFormat:()=>ke,RedIntegerFormat:()=>ze,ReinhardToneMapping:()=>$,RepeatWrapping:()=>ce,ReplaceStencilOp:()=>Xt,ReverseSubtractEquation:()=>w,RingGeometry:()=>hh,SIGNED_RED_GREEN_RGTC2_Format:()=>xt,SIGNED_RED_RGTC1_Format:()=>vt,SRGBColorSpace:()=>Ht,Scene:()=>Nl,ShaderChunk:()=>rs,ShaderLib:()=>as,ShaderMaterial:()=>za,ShadowMaterial:()=>bh,Shape:()=>Iu,ShapeGeometry:()=>dh,ShapePath:()=>df,ShapeUtils:()=>ih,ShortType:()=>Se,Skeleton:()=>_c,SkeletonHelper:()=>kp,SkinnedMesh:()=>mc,Source:()=>cr,Sphere:()=>Gr,SphereGeometry:()=>ph,Spherical:()=>Tp,SphericalHarmonics3:()=>Cd,SplineCurve:()=>vu,SpotLight:()=>yd,SpotLightHelper:()=>Fp,Sprite:()=>tc,SpriteMaterial:()=>Hl,SrcAlphaFactor:()=>I,SrcAlphaSaturateFactor:()=>k,SrcColorFactor:()=>B,StaticCopyUsage:()=>bn,StaticDrawUsage:()=>mn,StaticReadUsage:()=>yn,StereoCamera:()=>Jd,StreamCopyUsage:()=>Mn,StreamDrawUsage:()=>vn,StreamReadUsage:()=>_n,StringKeyframeTrack:()=>Yh,SubtractEquation:()=>E,SubtractiveBlending:()=>b,TOUCH:()=>a,TangentSpaceNormalMap:()=>Ot,TetrahedronGeometry:()=>fh,Texture:()=>dr,TextureLoader:()=>ud,TorusGeometry:()=>mh,TorusKnotGeometry:()=>gh,Triangle:()=>Di,TriangleFanDrawMode:()=>It,TriangleStripDrawMode:()=>Lt,TrianglesDrawMode:()=>Bt,TubeGeometry:()=>vh,TwoPassDoubleSide:()=>v,UVMapping:()=>re,Uint16BufferAttribute:()=>na,Uint32BufferAttribute:()=>ia,Uint8BufferAttribute:()=>$i,Uint8ClampedBufferAttribute:()=>ea,Uniform:()=>xp,UniformsGroup:()=>bp,UniformsLib:()=>is,UniformsUtils:()=>ka,UnsignedByteType:()=>Ae,UnsignedInt248Type:()=>Le,UnsignedIntType:()=>Te,UnsignedShort4444Type:()=>Pe,UnsignedShort5551Type:()=>Be,UnsignedShortType:()=>Ee,VSMShadowMap:()=>p,Vector2:()=>Wn,Vector3:()=>br,Vector4:()=>pr,VectorKeyframeTrack:()=>Kh,VideoTexture:()=>Yc,WebGL1Renderer:()=>Dl,WebGL3DRenderTarget:()=>yr,WebGLArrayRenderTarget:()=>gr,WebGLCoordinateSystem:()=>Tn,WebGLCubeRenderTarget:()=>Xa,WebGLMultipleRenderTargets:()=>xr,WebGLRenderTarget:()=>fr,WebGLRenderer:()=>Il,WebGLUtils:()=>Ml,WebGPUCoordinateSystem:()=>Cn,WireframeGeometry:()=>yh,WrapAroundEnding:()=>Ct,ZeroCurvatureEnding:()=>wt,ZeroFactor:()=>R,ZeroSlopeEnding:()=>Tt,ZeroStencilOp:()=>Wt,_SRGBAFormat:()=>wn,sRGBEncoding:()=>Ft});var t=n(294);const r="154",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,c=3,u=0,h=1,d=2,p=3,f=0,m=1,g=2,v=2,y=0,x=1,_=2,b=3,A=4,M=5,S=100,E=101,w=102,T=103,C=104,R=200,P=201,B=202,L=203,I=204,D=205,F=206,U=207,N=208,O=209,k=210,z=0,H=1,G=2,V=3,W=4,j=5,X=6,J=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,ce=1e3,ue=1001,he=1002,de=1003,pe=1004,fe=1004,me=1005,ge=1005,ve=1006,ye=1007,xe=1007,_e=1008,be=1008,Ae=1009,Me=1010,Se=1011,Ee=1012,we=1013,Te=1014,Ce=1015,Re=1016,Pe=1017,Be=1018,Le=1020,Ie=1021,De=1023,Fe=1024,Ue=1025,Ne=1026,Oe=1027,ke=1028,ze=1029,He=1030,Ge=1031,Ve=1033,We=33776,je=33777,Xe=33778,Je=33779,Ye=35840,Ke=35841,qe=35842,Qe=35843,Ze=36196,$e=37492,et=37496,tt=37808,nt=37809,rt=37810,it=37811,at=37812,st=37813,ot=37814,lt=37815,ct=37816,ut=37817,ht=37818,dt=37819,pt=37820,ft=37821,mt=36492,gt=36283,vt=36284,yt=36285,xt=36286,_t=2200,bt=2201,At=2202,Mt=2300,St=2301,Et=2302,wt=2400,Tt=2401,Ct=2402,Rt=2500,Pt=2501,Bt=0,Lt=1,It=2,Dt=3e3,Ft=3001,Ut=3200,Nt=3201,Ot=0,kt=1,zt="",Ht="srgb",Gt="srgb-linear",Vt="display-p3",Wt=0,jt=7680,Xt=7681,Jt=7682,Yt=7683,Kt=34055,qt=34056,Qt=5386,Zt=512,$t=513,en=514,tn=515,nn=516,rn=517,an=518,sn=519,on=512,ln=513,cn=514,un=515,hn=516,dn=517,pn=518,fn=519,mn=35044,gn=35048,vn=35040,yn=35045,xn=35049,_n=35041,bn=35046,An=35050,Mn=35042,Sn="100",En="300 es",wn=1035,Tn=2e3,Cn=2001;class Rn{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 Pn=["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 Bn=1234567;const Ln=Math.PI/180,In=180/Math.PI;function Dn(){const e=4294967295*Math.random()|0,t=4294967295*Math.random()|0,n=4294967295*Math.random()|0,r=4294967295*Math.random()|0;return(Pn[255&e]+Pn[e>>8&255]+Pn[e>>16&255]+Pn[e>>24&255]+"-"+Pn[255&t]+Pn[t>>8&255]+"-"+Pn[t>>16&15|64]+Pn[t>>24&255]+"-"+Pn[63&n|128]+Pn[n>>8&255]+"-"+Pn[n>>16&255]+Pn[n>>24&255]+Pn[255&r]+Pn[r>>8&255]+Pn[r>>16&255]+Pn[r>>24&255]).toLowerCase()}function Fn(e,t,n){return Math.max(t,Math.min(n,e))}function Un(e,t){return(e%t+t)%t}function Nn(e,t,n){return(1-n)*e+n*t}function On(e){return 0==(e&e-1)&&0!==e}function kn(e){return Math.pow(2,Math.ceil(Math.log(e)/Math.LN2))}function zn(e){return Math.pow(2,Math.floor(Math.log(e)/Math.LN2))}function Hn(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return e/4294967295;case Uint16Array:return e/65535;case Uint8Array:return e/255;case Int32Array:return Math.max(e/2147483647,-1);case Int16Array:return Math.max(e/32767,-1);case Int8Array:return Math.max(e/127,-1);default:throw new Error("Invalid component type.")}}function Gn(e,t){switch(t.constructor){case Float32Array:return e;case Uint32Array:return Math.round(4294967295*e);case Uint16Array:return Math.round(65535*e);case Uint8Array:return Math.round(255*e);case Int32Array:return Math.round(2147483647*e);case Int16Array:return Math.round(32767*e);case Int8Array:return Math.round(127*e);default:throw new Error("Invalid component type.")}}const Vn={DEG2RAD:Ln,RAD2DEG:In,generateUUID:Dn,clamp:Fn,euclideanModulo:Un,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:Nn,damp:function(e,t,n,r){return Nn(e,t,1-Math.exp(-n*r))},pingpong:function(e,t=1){return t-Math.abs(Un(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&&(Bn=e);let t=Bn+=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*Ln},radToDeg:function(e){return e*In},isPowerOfTwo:On,ceilPowerOfTwo:kn,floorPowerOfTwo:zn,setQuaternionFromProperEuler:function(e,t,n,r,i){const a=Math.cos,s=Math.sin,o=a(n/2),l=s(n/2),c=a((t+r)/2),u=s((t+r)/2),h=a((t-r)/2),d=s((t-r)/2),p=a((r-t)/2),f=s((r-t)/2);switch(i){case"XYX":e.set(o*u,l*h,l*d,o*c);break;case"YZY":e.set(l*d,o*u,l*h,o*c);break;case"ZXZ":e.set(l*h,l*d,o*u,o*c);break;case"XZX":e.set(o*u,l*f,l*p,o*c);break;case"YXY":e.set(l*p,o*u,l*f,o*c);break;case"ZYZ":e.set(l*f,l*p,o*u,o*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+i)}},normalize:Gn,denormalize:Hn};class Wn{constructor(e=0,t=0){Wn.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}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(Fn(n,-1,1))}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 jn{constructor(e,t,n,r,i,a,s,o,l){jn.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l)}set(e,t,n,r,i,a,s,o,l){const c=this.elements;return c[0]=e,c[1]=r,c[2]=s,c[3]=t,c[4]=i,c[5]=o,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],s=n[3],o=n[6],l=n[1],c=n[4],u=n[7],h=n[2],d=n[5],p=n[8],f=r[0],m=r[3],g=r[6],v=r[1],y=r[4],x=r[7],_=r[2],b=r[5],A=r[8];return i[0]=a*f+s*v+o*_,i[3]=a*m+s*y+o*b,i[6]=a*g+s*x+o*A,i[1]=l*f+c*v+u*_,i[4]=l*m+c*y+u*b,i[7]=l*g+c*x+u*A,i[2]=h*f+d*v+p*_,i[5]=h*m+d*y+p*b,i[8]=h*g+d*x+p*A,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],c=e[8];return t*a*c-t*s*l-n*i*c+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],c=e[8],u=c*a-s*l,h=s*o-c*i,d=l*i-a*o,p=t*u+n*h+r*d;if(0===p)return this.set(0,0,0,0,0,0,0,0,0);const f=1/p;return e[0]=u*f,e[1]=(r*l-c*n)*f,e[2]=(s*n-r*a)*f,e[3]=h*f,e[4]=(c*t-r*o)*f,e[5]=(r*i-s*t)*f,e[6]=d*f,e[7]=(n*o-l*t)*f,e[8]=(a*t-n*i)*f,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(Xn.makeScale(e,t)),this}rotate(e){return this.premultiply(Xn.makeRotation(-e)),this}translate(e,t){return this.premultiply(Xn.makeTranslation(e,t)),this}makeTranslation(e,t){return e.isVector2?this.set(1,0,e.x,0,1,e.y,0,0,1):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 Xn=new jn;function Jn(e){for(let t=e.length-1;t>=0;--t)if(e[t]>=65535)return!0;return!1}const Yn={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Kn(e,t){return new Yn[e](t)}function qn(e){return document.createElementNS("http://www.w3.org/1999/xhtml",e)}const Qn={};function Zn(e){e in Qn||(Qn[e]=!0,console.warn(e))}function $n(e){return e<.04045?.0773993808*e:Math.pow(.9478672986*e+.0521327014,2.4)}function er(e){return e<.0031308?12.92*e:1.055*Math.pow(e,.41666)-.055}const tr=(new jn).fromArray([.8224621,.0331941,.0170827,.177538,.9668058,.0723974,-1e-7,1e-7,.9105199]),nr=(new jn).fromArray([1.2249401,-.0420569,-.0196376,-.2249404,1.0420571,-.0786361,1e-7,0,1.0982735]),rr={[Gt]:e=>e,[Ht]:e=>e.convertSRGBToLinear(),[Vt]:function(e){return e.convertSRGBToLinear().applyMatrix3(nr)}},ir={[Gt]:e=>e,[Ht]:e=>e.convertLinearToSRGB(),[Vt]:function(e){return e.applyMatrix3(tr).convertLinearToSRGB()}},ar={enabled:!0,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(e){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!e},get workingColorSpace(){return Gt},set workingColorSpace(e){console.warn("THREE.ColorManagement: .workingColorSpace is readonly.")},convert:function(e,t,n){if(!1===this.enabled||t===n||!t||!n)return e;const r=rr[t],i=ir[n];if(void 0===r||void 0===i)throw new Error(`Unsupported color space conversion, "${t}" to "${n}".`);return i(r(e))},fromWorkingColorSpace:function(e,t){return this.convert(e,this.workingColorSpace,t)},toWorkingColorSpace:function(e,t){return this.convert(e,t,this.workingColorSpace)}};let sr;class or{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===sr&&(sr=qn("canvas")),sr.width=e.width,sr.height=e.height;const n=sr.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=sr}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=qn("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*$n(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*$n(t[e]/255)):t[e]=$n(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}}let lr=0;class cr{constructor(e=null){this.isSource=!0,Object.defineProperty(this,"id",{value:lr++}),this.uuid=Dn(),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(ur(r[t].image)):e.push(ur(r[t]))}else e=ur(r);n.url=e}return t||(e.images[this.uuid]=n),n}}function ur(e){return"undefined"!=typeof HTMLImageElement&&e instanceof HTMLImageElement||"undefined"!=typeof HTMLCanvasElement&&e instanceof HTMLCanvasElement||"undefined"!=typeof ImageBitmap&&e instanceof ImageBitmap?or.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 hr=0;class dr extends Rn{constructor(e=dr.DEFAULT_IMAGE,t=dr.DEFAULT_MAPPING,n=ue,r=ue,i=ve,a=_e,s=De,o=Ae,l=dr.DEFAULT_ANISOTROPY,c=zt){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:hr++}),this.uuid=Dn(),this.name="",this.source=new cr(e),this.mipmaps=[],this.mapping=t,this.channel=0,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 Wn(0,0),this.repeat=new Wn(1,1),this.center=new Wn(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new jn,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,"string"==typeof c?this.colorSpace=c:(Zn("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=c===Ft?Ht:zt),this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.needsPMREMUpdate=!1}get image(){return this.source.data}set image(e=null){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.channel=e.channel,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.colorSpace=e.colorSpace,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.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,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,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,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 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 ce:e.y=e.y-Math.floor(e.y);break;case ue: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)}get encoding(){return Zn("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Ht?Ft:Dt}set encoding(e){Zn("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=e===Ft?Ht:zt}}dr.DEFAULT_IMAGE=null,dr.DEFAULT_MAPPING=re,dr.DEFAULT_ANISOTROPY=1;class pr{constructor(e=0,t=0,n=0,r=1){pr.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],c=o[4],u=o[8],h=o[1],d=o[5],p=o[9],f=o[2],m=o[6],g=o[10];if(Math.abs(c-h)<a&&Math.abs(u-f)<a&&Math.abs(p-m)<a){if(Math.abs(c+h)<s&&Math.abs(u+f)<s&&Math.abs(p+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=(c+h)/4,x=(u+f)/4,_=(p+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=_/r):v<a?(n=.707106781,r=.707106781,i=0):(i=Math.sqrt(v),n=x/i,r=_/i),this.set(n,r,i,t),this}let v=Math.sqrt((m-p)*(m-p)+(u-f)*(u-f)+(h-c)*(h-c));return Math.abs(v)<.001&&(v=1),this.x=(m-p)/v,this.y=(u-f)/v,this.z=(h-c)/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 fr extends Rn{constructor(e=1,t=1,n={}){super(),this.isWebGLRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new pr(0,0,e,t),this.scissorTest=!1,this.viewport=new pr(0,0,e,t);const r={width:e,height:t,depth:1};void 0!==n.encoding&&(Zn("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),n.colorSpace=n.encoding===Ft?Ht:zt),this.texture=new dr(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace),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.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,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 cr(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 mr extends dr{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=ue,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class gr extends fr{constructor(e=1,t=1,n=1){super(e,t),this.isWebGLArrayRenderTarget=!0,this.depth=n,this.texture=new mr(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class vr extends dr{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=ue,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class yr extends fr{constructor(e=1,t=1,n=1){super(e,t),this.isWebGL3DRenderTarget=!0,this.depth=n,this.texture=new vr(null,e,t,n),this.texture.isRenderTargetTexture=!0}}class xr extends fr{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.scissor.copy(e.scissor),this.scissorTest=e.scissorTest,this.viewport.copy(e.viewport),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 _r{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],c=n[r+2],u=n[r+3];const h=i[a+0],d=i[a+1],p=i[a+2],f=i[a+3];if(0===s)return e[t+0]=o,e[t+1]=l,e[t+2]=c,void(e[t+3]=u);if(1===s)return e[t+0]=h,e[t+1]=d,e[t+2]=p,void(e[t+3]=f);if(u!==f||o!==h||l!==d||c!==p){let e=1-s;const t=o*h+l*d+c*p+u*f,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,c=c*e+p*i,u=u*e+f*i,e===1-s){const e=1/Math.sqrt(o*o+l*l+c*c+u*u);o*=e,l*=e,c*=e,u*=e}}e[t]=o,e[t+1]=l,e[t+2]=c,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,i,a){const s=n[r],o=n[r+1],l=n[r+2],c=n[r+3],u=i[a],h=i[a+1],d=i[a+2],p=i[a+3];return e[t]=s*p+c*u+o*d-l*h,e[t+1]=o*p+c*h+l*u-s*d,e[t+2]=l*p+c*d+s*h-o*u,e[t+3]=c*p-s*u-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),c=s(r/2),u=s(i/2),h=o(n/2),d=o(r/2),p=o(i/2);switch(a){case"XYZ":this._x=h*c*u+l*d*p,this._y=l*d*u-h*c*p,this._z=l*c*p+h*d*u,this._w=l*c*u-h*d*p;break;case"YXZ":this._x=h*c*u+l*d*p,this._y=l*d*u-h*c*p,this._z=l*c*p-h*d*u,this._w=l*c*u+h*d*p;break;case"ZXY":this._x=h*c*u-l*d*p,this._y=l*d*u+h*c*p,this._z=l*c*p+h*d*u,this._w=l*c*u-h*d*p;break;case"ZYX":this._x=h*c*u-l*d*p,this._y=l*d*u+h*c*p,this._z=l*c*p-h*d*u,this._w=l*c*u+h*d*p;break;case"YZX":this._x=h*c*u+l*d*p,this._y=l*d*u+h*c*p,this._z=l*c*p-h*d*u,this._w=l*c*u-h*d*p;break;case"XZY":this._x=h*c*u-l*d*p,this._y=l*d*u-h*c*p,this._z=l*c*p+h*d*u,this._w=l*c*u+h*d*p;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],c=t[6],u=t[10],h=n+s+u;if(h>0){const e=.5/Math.sqrt(h+1);this._w=.25/e,this._x=(c-o)*e,this._y=(i-l)*e,this._z=(a-r)*e}else if(n>s&&n>u){const e=2*Math.sqrt(1+n-s-u);this._w=(c-o)/e,this._x=.25*e,this._y=(r+a)/e,this._z=(i+l)/e}else if(s>u){const e=2*Math.sqrt(1+s-n-u);this._w=(i-l)/e,this._x=(r+a)/e,this._y=.25*e,this._z=(o+c)/e}else{const e=2*Math.sqrt(1+u-n-s);this._w=(a-r)/e,this._x=(i+l)/e,this._y=(o+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(Fn(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,c=t._w;return this._x=n*c+a*s+r*l-i*o,this._y=r*c+a*o+i*s-n*l,this._z=i*c+a*l+n*o-r*s,this._w=a*c-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),c=Math.atan2(l,s),u=Math.sin((1-t)*c)/l,h=Math.sin(t*c)/l;return this._w=a*u+this._w*h,this._x=n*u+this._x*h,this._y=r*u+this._y*h,this._z=i*u+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}toJSON(){return this.toArray()}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class br{constructor(e=0,t=0,n=0){br.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(Mr.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(Mr.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,c=o*n+s*t-i*r,u=o*r+i*n-a*t,h=-i*t-a*n-s*r;return this.x=l*o+h*-i+c*-s-u*-a,this.y=c*o+h*-a+u*-i-l*-s,this.z=u*o+h*-s+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,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 Ar.copy(this).projectOnVector(e),this.sub(Ar)}reflect(e){return this.sub(Ar.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(Fn(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}setFromColor(e){return this.x=e.r,this.y=e.g,this.z=e.b,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 Ar=new br,Mr=new _r;class Sr{constructor(e=new br(1/0,1/0,1/0),t=new br(-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){this.makeEmpty();for(let t=0,n=e.length;t<n;t+=3)this.expandByPoint(wr.fromArray(e,t));return this}setFromBufferAttribute(e){this.makeEmpty();for(let t=0,n=e.count;t<n;t++)this.expandByPoint(wr.fromBufferAttribute(e,t));return 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=wr.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){if(e.updateWorldMatrix(!1,!1),void 0!==e.boundingBox)null===e.boundingBox&&e.computeBoundingBox(),Tr.copy(e.boundingBox),Tr.applyMatrix4(e.matrixWorld),this.union(Tr);else{const n=e.geometry;if(void 0!==n)if(t&&void 0!==n.attributes&&void 0!==n.attributes.position){const t=n.attributes.position;for(let n=0,r=t.count;n<r;n++)wr.fromBufferAttribute(t,n).applyMatrix4(e.matrixWorld),this.expandByPoint(wr)}else null===n.boundingBox&&n.computeBoundingBox(),Tr.copy(n.boundingBox),Tr.applyMatrix4(e.matrixWorld),this.union(Tr)}const n=e.children;for(let e=0,r=n.length;e<r;e++)this.expandByObject(n[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,wr),wr.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(Dr),Fr.subVectors(this.max,Dr),Cr.subVectors(e.a,Dr),Rr.subVectors(e.b,Dr),Pr.subVectors(e.c,Dr),Br.subVectors(Rr,Cr),Lr.subVectors(Pr,Rr),Ir.subVectors(Cr,Pr);let t=[0,-Br.z,Br.y,0,-Lr.z,Lr.y,0,-Ir.z,Ir.y,Br.z,0,-Br.x,Lr.z,0,-Lr.x,Ir.z,0,-Ir.x,-Br.y,Br.x,0,-Lr.y,Lr.x,0,-Ir.y,Ir.x,0];return!!Or(t,Cr,Rr,Pr,Fr)&&(t=[1,0,0,0,1,0,0,0,1],!!Or(t,Cr,Rr,Pr,Fr)&&(Ur.crossVectors(Br,Lr),t=[Ur.x,Ur.y,Ur.z],Or(t,Cr,Rr,Pr,Fr)))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,wr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=.5*this.getSize(wr).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()||(Er[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),Er[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),Er[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),Er[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),Er[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),Er[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),Er[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),Er[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(Er)),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 Er=[new br,new br,new br,new br,new br,new br,new br,new br],wr=new br,Tr=new Sr,Cr=new br,Rr=new br,Pr=new br,Br=new br,Lr=new br,Ir=new br,Dr=new br,Fr=new br,Ur=new br,Nr=new br;function Or(e,t,n,r,i){for(let a=0,s=e.length-3;a<=s;a+=3){Nr.fromArray(e,a);const s=i.x*Math.abs(Nr.x)+i.y*Math.abs(Nr.y)+i.z*Math.abs(Nr.z),o=t.dot(Nr),l=n.dot(Nr),c=r.dot(Nr);if(Math.max(-Math.max(o,l,c),Math.min(o,l,c))>s)return!1}return!0}const kr=new Sr,zr=new br,Hr=new br;class Gr{constructor(e=new br,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):kr.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;zr.subVectors(e,this.center);const t=zr.lengthSq();if(t>this.radius*this.radius){const e=Math.sqrt(t),n=.5*(e-this.radius);this.center.addScaledVector(zr,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):(Hr.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(zr.copy(e.center).add(Hr)),this.expandByPoint(zr.copy(e.center).sub(Hr))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return(new this.constructor).copy(this)}}const Vr=new br,Wr=new br,jr=new br,Xr=new br,Jr=new br,Yr=new br,Kr=new br;class qr{constructor(e=new br,t=new br(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.origin).addScaledVector(this.direction,e)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Vr)),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.origin).addScaledVector(this.direction,n)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=Vr.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Vr.copy(this.origin).addScaledVector(this.direction,t),Vr.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){Wr.copy(e).add(t).multiplyScalar(.5),jr.copy(t).sub(e).normalize(),Xr.copy(this.origin).sub(Wr);const i=.5*e.distanceTo(t),a=-this.direction.dot(jr),s=Xr.dot(this.direction),o=-Xr.dot(jr),l=Xr.lengthSq(),c=Math.abs(1-a*a);let u,h,d,p;if(c>0)if(u=a*o-s,h=a*s-o,p=i*c,u>=0)if(h>=-p)if(h<=p){const e=1/c;u*=e,h*=e,d=u*(u+a*h+2*s)+h*(a*u+h+2*o)+l}else h=i,u=Math.max(0,-(a*h+s)),d=-u*u+h*(h+2*o)+l;else h=-i,u=Math.max(0,-(a*h+s)),d=-u*u+h*(h+2*o)+l;else h<=-p?(u=Math.max(0,-(-a*i+s)),h=u>0?-i:Math.min(Math.max(-i,-o),i),d=-u*u+h*(h+2*o)+l):h<=p?(u=0,h=Math.min(Math.max(-i,-o),i),d=h*(h+2*o)+l):(u=Math.max(0,-(a*i+s)),h=u>0?i:Math.min(Math.max(-i,-o),i),d=-u*u+h*(h+2*o)+l);else h=a>0?-i:i,u=Math.max(0,-(a*h+s)),d=-u*u+h*(h+2*o)+l;return n&&n.copy(this.origin).addScaledVector(this.direction,u),r&&r.copy(Wr).addScaledVector(jr,h),d}intersectSphere(e,t){Vr.subVectors(e.center,this.origin);const n=Vr.dot(this.direction),r=Vr.dot(Vr)-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 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,c=1/this.direction.y,u=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),c>=0?(i=(e.min.y-h.y)*c,a=(e.max.y-h.y)*c):(i=(e.max.y-h.y)*c,a=(e.min.y-h.y)*c),n>a||i>r?null:((i>n||isNaN(n))&&(n=i),(a<r||isNaN(r))&&(r=a),u>=0?(s=(e.min.z-h.z)*u,o=(e.max.z-h.z)*u):(s=(e.max.z-h.z)*u,o=(e.min.z-h.z)*u),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,Vr)}intersectTriangle(e,t,n,r,i){Jr.subVectors(t,e),Yr.subVectors(n,e),Kr.crossVectors(Jr,Yr);let a,s=this.direction.dot(Kr);if(s>0){if(r)return null;a=1}else{if(!(s<0))return null;a=-1,s=-s}Xr.subVectors(this.origin,e);const o=a*this.direction.dot(Yr.crossVectors(Xr,Yr));if(o<0)return null;const l=a*this.direction.dot(Jr.cross(Xr));if(l<0)return null;if(o+l>s)return null;const c=-a*Xr.dot(Kr);return c<0?null:this.at(c/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 Qr{constructor(e,t,n,r,i,a,s,o,l,c,u,h,d,p,f,m){Qr.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],void 0!==e&&this.set(e,t,n,r,i,a,s,o,l,c,u,h,d,p,f,m)}set(e,t,n,r,i,a,s,o,l,c,u,h,d,p,f,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]=c,g[10]=u,g[14]=h,g[3]=d,g[7]=p,g[11]=f,g[15]=m,this}identity(){return this.set(1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1),this}clone(){return(new Qr).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),c=Math.cos(i),u=Math.sin(i);if("XYZ"===e.order){const e=a*c,n=a*u,r=s*c,i=s*u;t[0]=o*c,t[4]=-o*u,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*c,n=o*u,r=l*c,i=l*u;t[0]=e+i*s,t[4]=r*s-n,t[8]=a*l,t[1]=a*u,t[5]=a*c,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*c,n=o*u,r=l*c,i=l*u;t[0]=e-i*s,t[4]=-a*u,t[8]=r+n*s,t[1]=n+r*s,t[5]=a*c,t[9]=i-e*s,t[2]=-a*l,t[6]=s,t[10]=a*o}else if("ZYX"===e.order){const e=a*c,n=a*u,r=s*c,i=s*u;t[0]=o*c,t[4]=r*l-n,t[8]=e*l+i,t[1]=o*u,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*c,t[4]=i-e*u,t[8]=r*u+n,t[1]=u,t[5]=a*c,t[9]=-s*c,t[2]=-l*c,t[6]=n*u+r,t[10]=e-i*u}else if("XZY"===e.order){const e=a*o,n=a*l,r=s*o,i=s*l;t[0]=o*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]=s*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(ei,e,ti)}lookAt(e,t,n){const r=this.elements;return ii.subVectors(e,t),0===ii.lengthSq()&&(ii.z=1),ii.normalize(),ni.crossVectors(n,ii),0===ni.lengthSq()&&(1===Math.abs(n.z)?ii.x+=1e-4:ii.z+=1e-4,ii.normalize(),ni.crossVectors(n,ii)),ni.normalize(),ri.crossVectors(ii,ni),r[0]=ni.x,r[4]=ri.x,r[8]=ii.x,r[1]=ni.y,r[5]=ri.y,r[9]=ii.y,r[2]=ni.z,r[6]=ri.z,r[10]=ii.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],c=n[1],u=n[5],h=n[9],d=n[13],p=n[2],f=n[6],m=n[10],g=n[14],v=n[3],y=n[7],x=n[11],_=n[15],b=r[0],A=r[4],M=r[8],S=r[12],E=r[1],w=r[5],T=r[9],C=r[13],R=r[2],P=r[6],B=r[10],L=r[14],I=r[3],D=r[7],F=r[11],U=r[15];return i[0]=a*b+s*E+o*R+l*I,i[4]=a*A+s*w+o*P+l*D,i[8]=a*M+s*T+o*B+l*F,i[12]=a*S+s*C+o*L+l*U,i[1]=c*b+u*E+h*R+d*I,i[5]=c*A+u*w+h*P+d*D,i[9]=c*M+u*T+h*B+d*F,i[13]=c*S+u*C+h*L+d*U,i[2]=p*b+f*E+m*R+g*I,i[6]=p*A+f*w+m*P+g*D,i[10]=p*M+f*T+m*B+g*F,i[14]=p*S+f*C+m*L+g*U,i[3]=v*b+y*E+x*R+_*I,i[7]=v*A+y*w+x*P+_*D,i[11]=v*M+y*T+x*B+_*F,i[15]=v*S+y*C+x*L+_*U,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],c=e[2],u=e[6],h=e[10],d=e[14];return e[3]*(+i*o*u-r*l*u-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*c-i*o*c)+e[11]*(+t*l*u-t*s*d-i*a*u+n*a*d+i*s*c-n*l*c)+e[15]*(-r*s*c-t*o*u+t*s*h+r*a*u-n*a*h+n*o*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],s=e[5],o=e[6],l=e[7],c=e[8],u=e[9],h=e[10],d=e[11],p=e[12],f=e[13],m=e[14],g=e[15],v=u*m*l-f*h*l+f*o*d-s*m*d-u*o*g+s*h*g,y=p*h*l-c*m*l-p*o*d+a*m*d+c*o*g-a*h*g,x=c*f*l-p*u*l+p*s*d-a*f*d-c*s*g+a*u*g,_=p*u*o-c*f*o-p*s*h+a*f*h+c*s*m-a*u*m,b=t*v+n*y+r*x+i*_;if(0===b)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const A=1/b;return e[0]=v*A,e[1]=(f*h*i-u*m*i-f*r*d+n*m*d+u*r*g-n*h*g)*A,e[2]=(s*m*i-f*o*i+f*r*l-n*m*l-s*r*g+n*o*g)*A,e[3]=(u*o*i-s*h*i-u*r*l+n*h*l+s*r*d-n*o*d)*A,e[4]=y*A,e[5]=(c*m*i-p*h*i+p*r*d-t*m*d-c*r*g+t*h*g)*A,e[6]=(p*o*i-a*m*i-p*r*l+t*m*l+a*r*g-t*o*g)*A,e[7]=(a*h*i-c*o*i+c*r*l-t*h*l-a*r*d+t*o*d)*A,e[8]=x*A,e[9]=(p*u*i-c*f*i-p*n*d+t*f*d+c*n*g-t*u*g)*A,e[10]=(a*f*i-p*s*i+p*n*l-t*f*l-a*n*g+t*s*g)*A,e[11]=(c*s*i-a*u*i-c*n*l+t*u*l+a*n*d-t*s*d)*A,e[12]=_*A,e[13]=(c*f*r-p*u*r+p*n*h-t*f*h-c*n*m+t*u*m)*A,e[14]=(p*s*r-a*f*r-p*n*o+t*f*o+a*n*m-t*s*m)*A,e[15]=(a*u*r-c*s*r+c*n*o-t*u*o-a*n*h+t*s*h)*A,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 e.isVector3?this.set(1,0,0,e.x,0,1,0,e.y,0,0,1,e.z,0,0,0,1):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,c=i*s;return this.set(l*a+n,l*s-r*o,l*o+r*s,0,l*s+r*o,c*s+n,c*o-r*a,0,l*o-r*s,c*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,c=a+a,u=s+s,h=i*l,d=i*c,p=i*u,f=a*c,m=a*u,g=s*u,v=o*l,y=o*c,x=o*u,_=n.x,b=n.y,A=n.z;return r[0]=(1-(f+g))*_,r[1]=(d+x)*_,r[2]=(p-y)*_,r[3]=0,r[4]=(d-x)*b,r[5]=(1-(h+g))*b,r[6]=(m+v)*b,r[7]=0,r[8]=(p+y)*A,r[9]=(m-v)*A,r[10]=(1-(h+f))*A,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],$r.copy(this);const o=1/i,l=1/a,c=1/s;return $r.elements[0]*=o,$r.elements[1]*=o,$r.elements[2]*=o,$r.elements[4]*=l,$r.elements[5]*=l,$r.elements[6]*=l,$r.elements[8]*=c,$r.elements[9]*=c,$r.elements[10]*=c,t.setFromRotationMatrix($r),n.x=i,n.y=a,n.z=s,this}makePerspective(e,t,n,r,i,a,s=Tn){const o=this.elements,l=2*i/(t-e),c=2*i/(n-r),u=(t+e)/(t-e),h=(n+r)/(n-r);let d,p;if(s===Tn)d=-(a+i)/(a-i),p=-2*a*i/(a-i);else{if(s!==Cn)throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);d=-a/(a-i),p=-a*i/(a-i)}return o[0]=l,o[4]=0,o[8]=u,o[12]=0,o[1]=0,o[5]=c,o[9]=h,o[13]=0,o[2]=0,o[6]=0,o[10]=d,o[14]=p,o[3]=0,o[7]=0,o[11]=-1,o[15]=0,this}makeOrthographic(e,t,n,r,i,a,s=Tn){const o=this.elements,l=1/(t-e),c=1/(n-r),u=1/(a-i),h=(t+e)*l,d=(n+r)*c;let p,f;if(s===Tn)p=(a+i)*u,f=-2*u;else{if(s!==Cn)throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);p=i*u,f=-1*u}return o[0]=2*l,o[4]=0,o[8]=0,o[12]=-h,o[1]=0,o[5]=2*c,o[9]=0,o[13]=-d,o[2]=0,o[6]=0,o[10]=f,o[14]=-p,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 br,$r=new Qr,ei=new br(0,0,0),ti=new br(1,1,1),ni=new br,ri=new br,ii=new br,ai=new Qr,si=new _r;class oi{constructor(e=0,t=0,n=0,r=oi.DEFAULT_ORDER){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],c=r[9],u=r[2],h=r[6],d=r[10];switch(t){case"XYZ":this._y=Math.asin(Fn(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(-c,d),this._z=Math.atan2(-a,i)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-Fn(c,-1,1)),Math.abs(c)<.9999999?(this._y=Math.atan2(s,d),this._z=Math.atan2(o,l)):(this._y=Math.atan2(-u,i),this._z=0);break;case"ZXY":this._x=Math.asin(Fn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,d),this._z=Math.atan2(-a,l)):(this._y=0,this._z=Math.atan2(o,i));break;case"ZYX":this._y=Math.asin(-Fn(u,-1,1)),Math.abs(u)<.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(Fn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(-c,l),this._y=Math.atan2(-u,i)):(this._x=0,this._y=Math.atan2(s,d));break;case"XZY":this._z=Math.asin(-Fn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(s,i)):(this._x=Math.atan2(-c,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 ai.makeRotationFromQuaternion(e),this.setFromRotationMatrix(ai,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return si.setFromEuler(this),this.setFromQuaternion(si,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}}oi.DEFAULT_ORDER="XYZ";class li{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 ci=0;const ui=new br,hi=new _r,di=new Qr,pi=new br,fi=new br,mi=new br,gi=new _r,vi=new br(1,0,0),yi=new br(0,1,0),xi=new br(0,0,1),_i={type:"added"},bi={type:"removed"};class Ai extends Rn{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:ci++}),this.uuid=Dn(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=Ai.DEFAULT_UP.clone();const e=new br,t=new oi,n=new _r,r=new br(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 Qr},normalMatrix:{value:new jn}}),this.matrix=new Qr,this.matrixWorld=new Qr,this.matrixAutoUpdate=Ai.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.matrixWorldAutoUpdate=Ai.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.layers=new li,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 hi.setFromAxisAngle(e,t),this.quaternion.multiply(hi),this}rotateOnWorldAxis(e,t){return hi.setFromAxisAngle(e,t),this.quaternion.premultiply(hi),this}rotateX(e){return this.rotateOnAxis(vi,e)}rotateY(e){return this.rotateOnAxis(yi,e)}rotateZ(e){return this.rotateOnAxis(xi,e)}translateOnAxis(e,t){return ui.copy(e).applyQuaternion(this.quaternion),this.position.add(ui.multiplyScalar(t)),this}translateX(e){return this.translateOnAxis(vi,e)}translateY(e){return this.translateOnAxis(yi,e)}translateZ(e){return this.translateOnAxis(xi,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(di.copy(this.matrixWorld).invert())}lookAt(e,t,n){e.isVector3?pi.copy(e):pi.set(e,t,n);const r=this.parent;this.updateWorldMatrix(!0,!1),fi.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?di.lookAt(fi,pi,this.up):di.lookAt(pi,fi,this.up),this.quaternion.setFromRotationMatrix(di),r&&(di.extractRotation(r.matrixWorld),hi.setFromRotationMatrix(di),this.quaternion.premultiply(hi.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(_i)):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(bi)),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(bi)}return this.children.length=0,this}attach(e){return this.updateWorldMatrix(!0,!1),di.copy(this.matrixWorld).invert(),null!==e.parent&&(e.parent.updateWorldMatrix(!0,!1),di.multiply(e.parent.matrixWorld)),e.applyMatrix4(di),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(fi,e,mi),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(fi,gi,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.6,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(),r.up=this.up.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),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),s.length>0&&(n.images=s),o.length>0&&(n.shapes=o),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.animations=e.animations,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}}Ai.DEFAULT_UP=new br(0,1,0),Ai.DEFAULT_MATRIX_AUTO_UPDATE=!0,Ai.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0;const Mi=new br,Si=new br,Ei=new br,wi=new br,Ti=new br,Ci=new br,Ri=new br,Pi=new br,Bi=new br,Li=new br;let Ii=!1;class Di{constructor(e=new br,t=new br,n=new br){this.a=e,this.b=t,this.c=n}static getNormal(e,t,n,r){r.subVectors(n,t),Mi.subVectors(e,t),r.cross(Mi);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){Mi.subVectors(r,t),Si.subVectors(n,t),Ei.subVectors(e,t);const a=Mi.dot(Mi),s=Mi.dot(Si),o=Mi.dot(Ei),l=Si.dot(Si),c=Si.dot(Ei),u=a*l-s*s;if(0===u)return i.set(-2,-1,-1);const h=1/u,d=(l*o-s*c)*h,p=(a*c-s*o)*h;return i.set(1-d-p,p,d)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,wi),wi.x>=0&&wi.y>=0&&wi.x+wi.y<=1}static getUV(e,t,n,r,i,a,s,o){return!1===Ii&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ii=!0),this.getInterpolation(e,t,n,r,i,a,s,o)}static getInterpolation(e,t,n,r,i,a,s,o){return this.getBarycoord(e,t,n,r,wi),o.setScalar(0),o.addScaledVector(i,wi.x),o.addScaledVector(a,wi.y),o.addScaledVector(s,wi.z),o}static isFrontFacing(e,t,n,r){return Mi.subVectors(n,t),Si.subVectors(e,t),Mi.cross(Si).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 Mi.subVectors(this.c,this.b),Si.subVectors(this.a,this.b),.5*Mi.cross(Si).length()}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Di.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Di.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,i){return!1===Ii&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),Ii=!0),Di.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}getInterpolation(e,t,n,r,i){return Di.getInterpolation(e,this.a,this.b,this.c,t,n,r,i)}containsPoint(e){return Di.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Di.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;Ti.subVectors(r,n),Ci.subVectors(i,n),Pi.subVectors(e,n);const o=Ti.dot(Pi),l=Ci.dot(Pi);if(o<=0&&l<=0)return t.copy(n);Bi.subVectors(e,r);const c=Ti.dot(Bi),u=Ci.dot(Bi);if(c>=0&&u<=c)return t.copy(r);const h=o*u-c*l;if(h<=0&&o>=0&&c<=0)return a=o/(o-c),t.copy(n).addScaledVector(Ti,a);Li.subVectors(e,i);const d=Ti.dot(Li),p=Ci.dot(Li);if(p>=0&&d<=p)return t.copy(i);const f=d*l-o*p;if(f<=0&&l>=0&&p<=0)return s=l/(l-p),t.copy(n).addScaledVector(Ci,s);const m=c*p-d*u;if(m<=0&&u-c>=0&&d-p>=0)return Ri.subVectors(i,r),s=(u-c)/(u-c+(d-p)),t.copy(r).addScaledVector(Ri,s);const g=1/(m+f+h);return a=f*g,s=h*g,t.copy(n).addScaledVector(Ti,a).addScaledVector(Ci,s)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}let Fi=0;class Ui extends Rn{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:Fi++}),this.uuid=Dn(),this.name="",this.type="Material",this.blending=x,this.side=f,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=I,this.blendDst=D,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=sn,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=jt,this.stencilZFail=jt,this.stencilZPass=jt,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.forceSinglePass=!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: parameter '${t}' has value of 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.Material: '${t}' is not a property of THREE.${this.type}.`)}}toJSON(e){const t=void 0===e||"string"==typeof e;t&&(e={textures:{},images:{}});const n={metadata:{version:4.6,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),void 0!==this.anisotropy&&(n.anisotropy=this.anisotropy),void 0!==this.anisotropyRotation&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.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!==f&&(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.alphaHash&&(n.alphaHash=this.alphaHash),!0===this.alphaToCoverage&&(n.alphaToCoverage=this.alphaToCoverage),!0===this.premultipliedAlpha&&(n.premultipliedAlpha=this.premultipliedAlpha),!0===this.forceSinglePass&&(n.forceSinglePass=this.forceSinglePass),!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.alphaHash=e.alphaHash,this.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,this.forceSinglePass=e.forceSinglePass,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++}}const Ni={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},Oi={h:0,s:0,l:0},ki={h:0,s:0,l:0};function zi(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}class Hi{constructor(e,t,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,n)}set(e,t,n){if(void 0===t&&void 0===n){const t=e;t&&t.isColor?this.copy(t):"number"==typeof t?this.setHex(t):"string"==typeof t&&this.setStyle(t)}else this.setRGB(e,t,n);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=Ht){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(255&e)/255,ar.toWorkingColorSpace(this,t),this}setRGB(e,t,n,r=ar.workingColorSpace){return this.r=e,this.g=t,this.b=n,ar.toWorkingColorSpace(this,r),this}setHSL(e,t,n,r=ar.workingColorSpace){if(e=Un(e,1),t=Fn(t,0,1),n=Fn(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=zi(i,r,e+1/3),this.g=zi(i,r,e),this.b=zi(i,r,e-1/3)}return ar.toWorkingColorSpace(this,r),this}setStyle(e,t=Ht){function n(t){void 0!==t&&parseFloat(t)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let i;const a=r[1],s=r[2];switch(a){case"rgb":case"rgba":if(i=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setRGB(Math.min(255,parseInt(i[1],10))/255,Math.min(255,parseInt(i[2],10))/255,Math.min(255,parseInt(i[3],10))/255,t);if(i=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setRGB(Math.min(100,parseInt(i[1],10))/100,Math.min(100,parseInt(i[2],10))/100,Math.min(100,parseInt(i[3],10))/100,t);break;case"hsl":case"hsla":if(i=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(i[4]),this.setHSL(parseFloat(i[1])/360,parseFloat(i[2])/100,parseFloat(i[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const n=r[1],i=n.length;if(3===i)return this.setRGB(parseInt(n.charAt(0),16)/15,parseInt(n.charAt(1),16)/15,parseInt(n.charAt(2),16)/15,t);if(6===i)return this.setHex(parseInt(n,16),t);console.warn("THREE.Color: Invalid hex color "+e)}else if(e&&e.length>0)return this.setColorName(e,t);return this}setColorName(e,t=Ht){const n=Ni[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=$n(e.r),this.g=$n(e.g),this.b=$n(e.b),this}copyLinearToSRGB(e){return this.r=er(e.r),this.g=er(e.g),this.b=er(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=Ht){return ar.fromWorkingColorSpace(Gi.copy(this),e),65536*Math.round(Fn(255*Gi.r,0,255))+256*Math.round(Fn(255*Gi.g,0,255))+Math.round(Fn(255*Gi.b,0,255))}getHexString(e=Ht){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=ar.workingColorSpace){ar.fromWorkingColorSpace(Gi.copy(this),t);const n=Gi.r,r=Gi.g,i=Gi.b,a=Math.max(n,r,i),s=Math.min(n,r,i);let o,l;const c=(s+a)/2;if(s===a)o=0,l=0;else{const e=a-s;switch(l=c<=.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=c,e}getRGB(e,t=ar.workingColorSpace){return ar.fromWorkingColorSpace(Gi.copy(this),t),e.r=Gi.r,e.g=Gi.g,e.b=Gi.b,e}getStyle(e=Ht){ar.fromWorkingColorSpace(Gi.copy(this),e);const t=Gi.r,n=Gi.g,r=Gi.b;return e!==Ht?`color(${e} ${t.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(255*t)},${Math.round(255*n)},${Math.round(255*r)})`}offsetHSL(e,t,n){return this.getHSL(Oi),Oi.h+=e,Oi.s+=t,Oi.l+=n,this.setHSL(Oi.h,Oi.s,Oi.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(Oi),e.getHSL(ki);const n=Nn(Oi.h,ki.h,t),r=Nn(Oi.s,ki.s,t),i=Nn(Oi.l,ki.l,t);return this.setHSL(n,r,i),this}setFromVector3(e){return this.r=e.x,this.g=e.y,this.b=e.z,this}applyMatrix3(e){const t=this.r,n=this.g,r=this.b,i=e.elements;return this.r=i[0]*t+i[3]*n+i[6]*r,this.g=i[1]*t+i[4]*n+i[7]*r,this.b=i[2]*t+i[5]*n+i[8]*r,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}}const Gi=new Hi;Hi.NAMES=Ni;class Vi extends Ui{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Hi(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 Wi=ji();function ji(){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}}function Xi(e){Math.abs(e)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),e=Fn(e,-65504,65504),Wi.floatView[0]=e;const t=Wi.uint32View[0],n=t>>23&511;return Wi.baseTable[n]+((8388607&t)>>Wi.shiftTable[n])}function Ji(e){const t=e>>10;return Wi.uint32View[0]=Wi.mantissaTable[Wi.offsetTable[t]+(1023&e)]+Wi.exponentTable[t],Wi.floatView[0]}const Yi={toHalfFloat:Xi,fromHalfFloat:Ji},Ki=new br,qi=new Wn;class Qi{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=mn,this.updateRange={offset:0,count:-1},this.gpuType=Ce,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.gpuType=e.gpuType,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++)qi.fromBufferAttribute(this,t),qi.applyMatrix3(e),this.setXY(t,qi.x,qi.y);else if(3===this.itemSize)for(let t=0,n=this.count;t<n;t++)Ki.fromBufferAttribute(this,t),Ki.applyMatrix3(e),this.setXYZ(t,Ki.x,Ki.y,Ki.z);return this}applyMatrix4(e){for(let t=0,n=this.count;t<n;t++)Ki.fromBufferAttribute(this,t),Ki.applyMatrix4(e),this.setXYZ(t,Ki.x,Ki.y,Ki.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)Ki.fromBufferAttribute(this,t),Ki.applyNormalMatrix(e),this.setXYZ(t,Ki.x,Ki.y,Ki.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)Ki.fromBufferAttribute(this,t),Ki.transformDirection(e),this.setXYZ(t,Ki.x,Ki.y,Ki.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=Hn(t,this.array)),t}setX(e,t){return this.normalized&&(t=Gn(t,this.array)),this.array[e*this.itemSize]=t,this}getY(e){let t=this.array[e*this.itemSize+1];return this.normalized&&(t=Hn(t,this.array)),t}setY(e,t){return this.normalized&&(t=Gn(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=Hn(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Gn(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=Hn(t,this.array)),t}setW(e,t){return this.normalized&&(t=Gn(t,this.array)),this.array[e*this.itemSize+3]=t,this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Gn(t,this.array),n=Gn(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=Gn(t,this.array),n=Gn(n,this.array),r=Gn(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=Gn(t,this.array),n=Gn(n,this.array),r=Gn(r,this.array),i=Gn(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!==mn&&(e.usage=this.usage),0===this.updateRange.offset&&-1===this.updateRange.count||(e.updateRange=this.updateRange),e}}class Zi extends Qi{constructor(e,t,n){super(new Int8Array(e),t,n)}}class $i extends Qi{constructor(e,t,n){super(new Uint8Array(e),t,n)}}class ea extends Qi{constructor(e,t,n){super(new Uint8ClampedArray(e),t,n)}}class ta extends Qi{constructor(e,t,n){super(new Int16Array(e),t,n)}}class na extends Qi{constructor(e,t,n){super(new Uint16Array(e),t,n)}}class ra extends Qi{constructor(e,t,n){super(new Int32Array(e),t,n)}}class ia extends Qi{constructor(e,t,n){super(new Uint32Array(e),t,n)}}class aa extends Qi{constructor(e,t,n){super(new Uint16Array(e),t,n),this.isFloat16BufferAttribute=!0}getX(e){let t=Ji(this.array[e*this.itemSize]);return this.normalized&&(t=Hn(t,this.array)),t}setX(e,t){return this.normalized&&(t=Gn(t,this.array)),this.array[e*this.itemSize]=Xi(t),this}getY(e){let t=Ji(this.array[e*this.itemSize+1]);return this.normalized&&(t=Hn(t,this.array)),t}setY(e,t){return this.normalized&&(t=Gn(t,this.array)),this.array[e*this.itemSize+1]=Xi(t),this}getZ(e){let t=Ji(this.array[e*this.itemSize+2]);return this.normalized&&(t=Hn(t,this.array)),t}setZ(e,t){return this.normalized&&(t=Gn(t,this.array)),this.array[e*this.itemSize+2]=Xi(t),this}getW(e){let t=Ji(this.array[e*this.itemSize+3]);return this.normalized&&(t=Hn(t,this.array)),t}setW(e,t){return this.normalized&&(t=Gn(t,this.array)),this.array[e*this.itemSize+3]=Xi(t),this}setXY(e,t,n){return e*=this.itemSize,this.normalized&&(t=Gn(t,this.array),n=Gn(n,this.array)),this.array[e+0]=Xi(t),this.array[e+1]=Xi(n),this}setXYZ(e,t,n,r){return e*=this.itemSize,this.normalized&&(t=Gn(t,this.array),n=Gn(n,this.array),r=Gn(r,this.array)),this.array[e+0]=Xi(t),this.array[e+1]=Xi(n),this.array[e+2]=Xi(r),this}setXYZW(e,t,n,r,i){return e*=this.itemSize,this.normalized&&(t=Gn(t,this.array),n=Gn(n,this.array),r=Gn(r,this.array),i=Gn(i,this.array)),this.array[e+0]=Xi(t),this.array[e+1]=Xi(n),this.array[e+2]=Xi(r),this.array[e+3]=Xi(i),this}}class sa extends Qi{constructor(e,t,n){super(new Float32Array(e),t,n)}}class oa extends Qi{constructor(e,t,n){super(new Float64Array(e),t,n)}}let la=0;const ca=new Qr,ua=new Ai,ha=new br,da=new Sr,pa=new Sr,fa=new br;class ma extends Rn{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:la++}),this.uuid=Dn(),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(Jn(e)?ia:na)(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 jn).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 ca.makeRotationFromQuaternion(e),this.applyMatrix4(ca),this}rotateX(e){return ca.makeRotationX(e),this.applyMatrix4(ca),this}rotateY(e){return ca.makeRotationY(e),this.applyMatrix4(ca),this}rotateZ(e){return ca.makeRotationZ(e),this.applyMatrix4(ca),this}translate(e,t,n){return ca.makeTranslation(e,t,n),this.applyMatrix4(ca),this}scale(e,t,n){return ca.makeScale(e,t,n),this.applyMatrix4(ca),this}lookAt(e){return ua.lookAt(e),ua.updateMatrix(),this.applyMatrix4(ua.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(ha).negate(),this.translate(ha.x,ha.y,ha.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 sa(t,3)),this}computeBoundingBox(){null===this.boundingBox&&(this.boundingBox=new Sr);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 br(-1/0,-1/0,-1/0),new br(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];da.setFromBufferAttribute(n),this.morphTargetsRelative?(fa.addVectors(this.boundingBox.min,da.min),this.boundingBox.expandByPoint(fa),fa.addVectors(this.boundingBox.max,da.max),this.boundingBox.expandByPoint(fa)):(this.boundingBox.expandByPoint(da.min),this.boundingBox.expandByPoint(da.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 Gr);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 br,1/0);if(e){const n=this.boundingSphere.center;if(da.setFromBufferAttribute(e),t)for(let e=0,n=t.length;e<n;e++){const n=t[e];pa.setFromBufferAttribute(n),this.morphTargetsRelative?(fa.addVectors(da.min,pa.min),da.expandByPoint(fa),fa.addVectors(da.max,pa.max),da.expandByPoint(fa)):(da.expandByPoint(pa.min),da.expandByPoint(pa.max))}da.getCenter(n);let r=0;for(let t=0,i=e.count;t<i;t++)fa.fromBufferAttribute(e,t),r=Math.max(r,n.distanceToSquared(fa));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++)fa.fromBufferAttribute(a,t),s&&(ha.fromBufferAttribute(e,t),fa.add(ha)),r=Math.max(r,n.distanceToSquared(fa))}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 Qi(new Float32Array(4*s),4));const o=this.getAttribute("tangent").array,l=[],c=[];for(let e=0;e<s;e++)l[e]=new br,c[e]=new br;const u=new br,h=new br,d=new br,p=new Wn,f=new Wn,m=new Wn,g=new br,v=new br;function y(e,t,n){u.fromArray(r,3*e),h.fromArray(r,3*t),d.fromArray(r,3*n),p.fromArray(a,2*e),f.fromArray(a,2*t),m.fromArray(a,2*n),h.sub(u),d.sub(u),f.sub(p),m.sub(p);const i=1/(f.x*m.y-m.x*f.y);isFinite(i)&&(g.copy(h).multiplyScalar(m.y).addScaledVector(d,-f.y).multiplyScalar(i),v.copy(d).multiplyScalar(f.x).addScaledVector(h,-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 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 _=new br,b=new br,A=new br,M=new br;function S(e){A.fromArray(i,3*e),M.copy(A);const t=l[e];_.copy(t),_.sub(A.multiplyScalar(A.dot(t))).normalize(),b.crossVectors(M,t);const n=b.dot(c[e])<0?-1:1;o[4*e]=_.x,o[4*e+1]=_.y,o[4*e+2]=_.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 Qi(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 br,i=new br,a=new br,s=new br,o=new br,l=new br,c=new br,u=new br;if(e)for(let h=0,d=e.count;h<d;h+=3){const d=e.getX(h+0),p=e.getX(h+1),f=e.getX(h+2);r.fromBufferAttribute(t,d),i.fromBufferAttribute(t,p),a.fromBufferAttribute(t,f),c.subVectors(a,i),u.subVectors(r,i),c.cross(u),s.fromBufferAttribute(n,d),o.fromBufferAttribute(n,p),l.fromBufferAttribute(n,f),s.add(c),o.add(c),l.add(c),n.setXYZ(d,s.x,s.y,s.z),n.setXYZ(p,o.x,o.y,o.z),n.setXYZ(f,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),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}}normalizeNormals(){const e=this.attributes.normal;for(let t=0,n=e.count;t<n;t++)fa.fromBufferAttribute(e,t),fa.normalize(),e.setXYZ(t,fa.x,fa.y,fa.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 Qi(a,r,i)}if(null===this.index)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;const t=new ma,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.6,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,this}dispose(){this.dispatchEvent({type:"dispose"})}}const ga=new Qr,va=new qr,ya=new Gr,xa=new br,_a=new br,ba=new br,Aa=new br,Ma=new br,Sa=new br,Ea=new Wn,wa=new Wn,Ta=new Wn,Ca=new br,Ra=new br,Pa=new br,Ba=new br,La=new br;class Ia extends Ai{constructor(e=new ma,t=new Vi){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){Sa.set(0,0,0);for(let n=0,r=i.length;n<r;n++){const r=s[n],o=i[n];0!==r&&(Ma.fromBufferAttribute(o,e),a?Sa.addScaledVector(Ma,r):Sa.addScaledVector(Ma.sub(t),r))}t.add(Sa)}return t}raycast(e,t){const n=this.geometry,r=this.material,i=this.matrixWorld;if(void 0!==r){if(null===n.boundingSphere&&n.computeBoundingSphere(),ya.copy(n.boundingSphere),ya.applyMatrix4(i),va.copy(e.ray).recast(e.near),!1===ya.containsPoint(va.origin)){if(null===va.intersectSphere(ya,xa))return;if(va.origin.distanceToSquared(xa)>(e.far-e.near)**2)return}ga.copy(i).invert(),va.copy(e.ray).applyMatrix4(ga),null!==n.boundingBox&&!1===va.intersectsBox(n.boundingBox)||this._computeIntersections(e,t,va)}}_computeIntersections(e,t,n){let r;const i=this.geometry,a=this.material,s=i.index,o=i.attributes.position,l=i.attributes.uv,c=i.attributes.uv1,u=i.attributes.normal,h=i.groups,d=i.drawRange;if(null!==s)if(Array.isArray(a))for(let i=0,o=h.length;i<o;i++){const o=h[i],p=a[o.materialIndex];for(let i=Math.max(o.start,d.start),a=Math.min(s.count,Math.min(o.start+o.count,d.start+d.count));i<a;i+=3)r=Da(this,p,e,n,l,c,u,s.getX(i),s.getX(i+1),s.getX(i+2)),r&&(r.faceIndex=Math.floor(i/3),r.face.materialIndex=o.materialIndex,t.push(r))}else for(let i=Math.max(0,d.start),o=Math.min(s.count,d.start+d.count);i<o;i+=3)r=Da(this,a,e,n,l,c,u,s.getX(i),s.getX(i+1),s.getX(i+2)),r&&(r.faceIndex=Math.floor(i/3),t.push(r));else if(void 0!==o)if(Array.isArray(a))for(let i=0,s=h.length;i<s;i++){const s=h[i],p=a[s.materialIndex];for(let i=Math.max(s.start,d.start),a=Math.min(o.count,Math.min(s.start+s.count,d.start+d.count));i<a;i+=3)r=Da(this,p,e,n,l,c,u,i,i+1,i+2),r&&(r.faceIndex=Math.floor(i/3),r.face.materialIndex=s.materialIndex,t.push(r))}else for(let i=Math.max(0,d.start),s=Math.min(o.count,d.start+d.count);i<s;i+=3)r=Da(this,a,e,n,l,c,u,i,i+1,i+2),r&&(r.faceIndex=Math.floor(i/3),t.push(r))}}function Da(e,t,n,r,i,a,s,o,l,c){e.getVertexPosition(o,_a),e.getVertexPosition(l,ba),e.getVertexPosition(c,Aa);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===f,o),null===l)return null;La.copy(o),La.applyMatrix4(e.matrixWorld);const c=n.ray.origin.distanceTo(La);return c<n.near||c>n.far?null:{distance:c,point:La.clone(),object:e}}(e,t,n,r,_a,ba,Aa,Ba);if(u){i&&(Ea.fromBufferAttribute(i,o),wa.fromBufferAttribute(i,l),Ta.fromBufferAttribute(i,c),u.uv=Di.getInterpolation(Ba,_a,ba,Aa,Ea,wa,Ta,new Wn)),a&&(Ea.fromBufferAttribute(a,o),wa.fromBufferAttribute(a,l),Ta.fromBufferAttribute(a,c),u.uv1=Di.getInterpolation(Ba,_a,ba,Aa,Ea,wa,Ta,new Wn),u.uv2=u.uv1),s&&(Ca.fromBufferAttribute(s,o),Ra.fromBufferAttribute(s,l),Pa.fromBufferAttribute(s,c),u.normal=Di.getInterpolation(Ba,_a,ba,Aa,Ca,Ra,Pa,new br),u.normal.dot(r.direction)>0&&u.normal.multiplyScalar(-1));const e={a:o,b:l,c,normal:new br,materialIndex:0};Di.getNormal(_a,ba,Aa,e.normal),u.face=e}return u}class Fa extends ma{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=[],c=[],u=[];let h=0,d=0;function p(e,t,n,r,i,a,p,f,m,g,v){const y=a/m,x=p/g,_=a/2,b=p/2,A=f/2,M=m+1,S=g+1;let E=0,w=0;const T=new br;for(let a=0;a<S;a++){const s=a*x-b;for(let o=0;o<M;o++){const h=o*y-_;T[e]=h*r,T[t]=s*i,T[n]=A,l.push(T.x,T.y,T.z),T[e]=0,T[t]=0,T[n]=f>0?1:-1,c.push(T.x,T.y,T.z),u.push(o/m),u.push(1-a/g),E+=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),w+=6}s.addGroup(d,w,v),d+=w,h+=E}p("z","y","x",-1,-1,n,t,e,a,i,0),p("z","y","x",1,-1,n,t,-e,a,i,1),p("x","z","y",1,1,e,n,t,r,a,2),p("x","z","y",1,-1,e,n,-t,r,a,3),p("x","y","z",1,-1,e,t,n,r,i,4),p("x","y","z",-1,-1,e,t,-n,r,i,5),this.setIndex(o),this.setAttribute("position",new sa(l,3)),this.setAttribute("normal",new sa(c,3)),this.setAttribute("uv",new sa(u,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Fa(e.width,e.height,e.depth,e.widthSegments,e.heightSegments,e.depthSegments)}}function Ua(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)?i.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[n][r]=null):t[n][r]=i.clone():Array.isArray(i)?t[n][r]=i.slice():t[n][r]=i}}return t}function Na(e){const t={};for(let n=0;n<e.length;n++){const r=Ua(e[n]);for(const e in r)t[e]=r[e]}return t}function Oa(e){return null===e.getRenderTarget()?e.outputColorSpace:Gt}const ka={clone:Ua,merge:Na};class za extends Ui{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.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[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=Ua(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,t.lights=this.lights,t.clipping=this.clipping;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 Ai{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new Qr,this.projectionMatrix=new Qr,this.projectionMatrixInverse=new Qr,this.coordinateSystem=Tn}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this.coordinateSystem=e.coordinateSystem,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 Ga 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*In*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(.5*Ln*this.fov);return.5*this.getFilmHeight()/e}getEffectiveFOV(){return 2*In*Math.atan(Math.tan(.5*Ln*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*Ln*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.coordinateSystem),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 Va=-90;class Wa extends Ai{constructor(e,t,n){super(),this.type="CubeCamera",this.renderTarget=n,this.coordinateSystem=null;const r=new Ga(Va,1,e,t);r.layers=this.layers,this.add(r);const i=new Ga(Va,1,e,t);i.layers=this.layers,this.add(i);const a=new Ga(Va,1,e,t);a.layers=this.layers,this.add(a);const s=new Ga(Va,1,e,t);s.layers=this.layers,this.add(s);const o=new Ga(Va,1,e,t);o.layers=this.layers,this.add(o);const l=new Ga(Va,1,e,t);l.layers=this.layers,this.add(l)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[n,r,i,a,s,o]=t;for(const e of t)this.remove(e);if(e===Tn)n.up.set(0,1,0),n.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),i.up.set(0,0,-1),i.lookAt(0,1,0),a.up.set(0,0,1),a.lookAt(0,-1,0),s.up.set(0,1,0),s.lookAt(0,0,1),o.up.set(0,1,0),o.lookAt(0,0,-1);else{if(e!==Cn)throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);n.up.set(0,-1,0),n.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),i.up.set(0,0,1),i.lookAt(0,1,0),a.up.set(0,0,-1),a.lookAt(0,-1,0),s.up.set(0,-1,0),s.lookAt(0,0,1),o.up.set(0,-1,0),o.lookAt(0,0,-1)}for(const e of t)this.add(e),e.updateMatrixWorld()}update(e,t){null===this.parent&&this.updateMatrixWorld();const n=this.renderTarget;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[r,i,a,s,o,l]=this.children,c=e.getRenderTarget(),u=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(c),e.toneMapping=u,e.xr.enabled=h,n.texture.needsPMREMUpdate=!0}}class ja extends dr{constructor(e,t,n,r,i,a,s,o,l,c){super(e=void 0!==e?e:[],t=void 0!==t?t:ie,n,r,i,a,s,o,l,c),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class Xa extends fr{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];void 0!==t.encoding&&(Zn("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),t.colorSpace=t.encoding===Ft?Ht:zt),this.texture=new ja(r,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.colorSpace),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.colorSpace=t.colorSpace,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 Fa(5,5,5),s=new za({name:"CubemapFromEquirect",uniforms:Ua(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===_e&&(t.minFilter=ve),new Wa(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 Ja=new br,Ya=new br,Ka=new jn;class qa{constructor(e=new br(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=Ja.subVectors(n,t).cross(Ya.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(e).addScaledVector(this.normal,-this.distanceToPoint(e))}intersectLine(e,t){const n=e.delta(Ja),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(e.start).addScaledVector(n,i)}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||Ka.getNormalMatrix(e),r=this.coplanarPoint(Ja).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 Qa=new Gr,Za=new br;class $a{constructor(e=new qa,t=new qa,n=new qa,r=new qa,i=new qa,a=new qa){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,t=Tn){const n=this.planes,r=e.elements,i=r[0],a=r[1],s=r[2],o=r[3],l=r[4],c=r[5],u=r[6],h=r[7],d=r[8],p=r[9],f=r[10],m=r[11],g=r[12],v=r[13],y=r[14],x=r[15];if(n[0].setComponents(o-i,h-l,m-d,x-g).normalize(),n[1].setComponents(o+i,h+l,m+d,x+g).normalize(),n[2].setComponents(o+a,h+c,m+p,x+v).normalize(),n[3].setComponents(o-a,h-c,m-p,x-v).normalize(),n[4].setComponents(o-s,h-u,m-f,x-y).normalize(),t===Tn)n[5].setComponents(o+s,h+u,m+f,x+y).normalize();else{if(t!==Cn)throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);n[5].setComponents(s,u,f,y).normalize()}return this}intersectsObject(e){if(void 0!==e.boundingSphere)null===e.boundingSphere&&e.computeBoundingSphere(),Qa.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;null===t.boundingSphere&&t.computeBoundingSphere(),Qa.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Qa)}intersectsSprite(e){return Qa.center.set(0,0,0),Qa.radius=.7071067811865476,Qa.applyMatrix4(e.matrixWorld),this.intersectsSphere(Qa)}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(Za.x=r.normal.x>0?e.max.x:e.min.x,Za.y=r.normal.y>0?e.max.y:e.min.y,Za.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Za)<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 es(){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 ts(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=e.FLOAT;else if(i instanceof Uint16Array)if(t.isFloat16BufferAttribute){if(!n)throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");o=e.HALF_FLOAT}else o=e.UNSIGNED_SHORT;else if(i instanceof Int16Array)o=e.SHORT;else if(i instanceof Uint32Array)o=e.UNSIGNED_INT;else if(i instanceof Int32Array)o=e.INT;else if(i instanceof Int8Array)o=e.BYTE;else if(i instanceof Uint8Array)o=e.UNSIGNED_BYTE;else{if(!(i instanceof Uint8ClampedArray))throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+i);o=e.UNSIGNED_BYTE}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 ns extends ma{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,c=o+1,u=e/s,h=t/o,d=[],p=[],f=[],m=[];for(let e=0;e<c;e++){const t=e*h-a;for(let n=0;n<l;n++){const r=n*u-i;p.push(r,-t,0),f.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 sa(p,3)),this.setAttribute("normal",new sa(f,3)),this.setAttribute("uv",new sa(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ns(e.width,e.height,e.widthSegments,e.heightSegments)}}const rs={alphahash_fragment:"#ifdef USE_ALPHAHASH\n\tif ( diffuseColor.a < getAlphaHashThreshold( vPosition ) ) discard;\n#endif",alphahash_pars_fragment:"#ifdef USE_ALPHAHASH\n\tconst float ALPHA_HASH_SCALE = 0.05;\n\tfloat hash2D( vec2 value ) {\n\t\treturn fract( 1.0e4 * sin( 17.0 * value.x + 0.1 * value.y ) * ( 0.1 + abs( sin( 13.0 * value.y + value.x ) ) ) );\n\t}\n\tfloat hash3D( vec3 value ) {\n\t\treturn hash2D( vec2( hash2D( value.xy ), value.z ) );\n\t}\n\tfloat getAlphaHashThreshold( vec3 position ) {\n\t\tfloat maxDeriv = max(\n\t\t\tlength( dFdx( position.xyz ) ),\n\t\t\tlength( dFdy( position.xyz ) )\n\t\t);\n\t\tfloat pixScale = 1.0 / ( ALPHA_HASH_SCALE * maxDeriv );\n\t\tvec2 pixScales = vec2(\n\t\t\texp2( floor( log2( pixScale ) ) ),\n\t\t\texp2( ceil( log2( pixScale ) ) )\n\t\t);\n\t\tvec2 alpha = vec2(\n\t\t\thash3D( floor( pixScales.x * position.xyz ) ),\n\t\t\thash3D( floor( pixScales.y * position.xyz ) )\n\t\t);\n\t\tfloat lerpFactor = fract( log2( pixScale ) );\n\t\tfloat x = ( 1.0 - lerpFactor ) * alpha.x + lerpFactor * alpha.y;\n\t\tfloat a = min( lerpFactor, 1.0 - lerpFactor );\n\t\tvec3 cases = vec3(\n\t\t\tx * x / ( 2.0 * a * ( 1.0 - a ) ),\n\t\t\t( x - 0.5 * a ) / ( 1.0 - a ),\n\t\t\t1.0 - ( ( 1.0 - x ) * ( 1.0 - x ) / ( 2.0 * a * ( 1.0 - a ) ) )\n\t\t);\n\t\tfloat threshold = ( x < ( 1.0 - a ) )\n\t\t\t? ( ( x < a ) ? cases.x : cases.y )\n\t\t\t: cases.z;\n\t\treturn clamp( threshold , 1.0e-6, 1.0 );\n\t}\n#endif",alphamap_fragment:"#ifdef USE_ALPHAMAP\n\tdiffuseColor.a *= texture2D( alphaMap, vAlphaMapUv ).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, vAoMapUv ).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 );\n#ifdef USE_ALPHAHASH\n\tvPosition = vec3( position );\n#endif",beginnormal_vertex:"vec3 objectNormal = vec3( normal );\n#ifdef USE_TANGENT\n\tvec3 objectTangent = vec3( tangent.xyz );\n#endif",bsdfs:"float 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} // validated",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( vBumpMapUv );\n\t\tvec2 dSTdy = dFdy( vBumpMapUv );\n\t\tfloat Hll = bumpScale * texture2D( bumpMap, vBumpMapUv ).x;\n\t\tfloat dBx = bumpScale * texture2D( bumpMap, vBumpMapUv + dSTdx ).x - Hll;\n\t\tfloat dBy = bumpScale * texture2D( bumpMap, vBumpMapUv + 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};\n#ifdef USE_ALPHAHASH\n\tvarying vec3 vPosition;\n#endif\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}\nvec3 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} // validated",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, vDisplacementMapUv ).x * displacementScale + displacementBias );\n#endif",emissivemap_fragment:"#ifdef USE_EMISSIVEMAP\n\tvec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv );\n\ttotalEmissiveRadiance *= emissiveColor.rgb;\n#endif",emissivemap_pars_fragment:"#ifdef USE_EMISSIVEMAP\n\tuniform sampler2D emissiveMap;\n#endif",colorspace_fragment:"gl_FragColor = linearToOutputTexel( gl_FragColor );",colorspace_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:"#ifdef USE_ENVMAP\n\tvec3 getIBLIrradiance( const in vec3 normal ) {\n\t\t#ifdef 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#ifdef 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\t#ifdef USE_ANISOTROPY\n\t\tvec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) {\n\t\t\t#ifdef ENVMAP_TYPE_CUBE_UV\n\t\t\t\tvec3 bentNormal = cross( bitangent, viewDir );\n\t\t\t\tbentNormal = normalize( cross( bentNormal, bitangent ) );\n\t\t\t\tbentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) );\n\t\t\t\treturn getIBLRadiance( viewDir, bentNormal, roughness );\n\t\t\t#else\n\t\t\t\treturn vec3( 0.0 );\n\t\t\t#endif\n\t\t}\n\t#endif\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, vLightMapUv );\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 ( LEGACY_LIGHTS )\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#else\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#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 USE_SPECULAR\n\t\tfloat specularIntensityFactor = specularIntensity;\n\t\tvec3 specularColorFactor = specularColor;\n\t\t#ifdef USE_SPECULAR_COLORMAP\n\t\t\tspecularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb;\n\t\t#endif\n\t\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\t\tspecularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a;\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, vClearcoatMapUv ).x;\n\t#endif\n\t#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\t\tmaterial.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).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, vIridescenceMapUv ).r;\n\t#endif\n\t#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\t\tmaterial.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).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_SHEEN_COLORMAP\n\t\tmaterial.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb;\n\t#endif\n\tmaterial.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 );\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tmaterial.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\t#ifdef USE_ANISOTROPYMAP\n\t\tmat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x );\n\t\tvec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb;\n\t\tvec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b;\n\t#else\n\t\tvec2 anisotropyV = anisotropyVector;\n\t#endif\n\tmaterial.anisotropy = length( anisotropyV );\n\tanisotropyV /= material.anisotropy;\n\tmaterial.anisotropy = saturate( material.anisotropy );\n\tmaterial.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) );\n\tmaterial.anisotropyT = tbn[ 0 ] * anisotropyV.x - tbn[ 1 ] * anisotropyV.y;\n\tmaterial.anisotropyB = tbn[ 1 ] * anisotropyV.x + tbn[ 0 ] * anisotropyV.y;\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\t#ifdef USE_ANISOTROPY\n\t\tfloat anisotropy;\n\t\tfloat alphaT;\n\t\tvec3 anisotropyT;\n\t\tvec3 anisotropyB;\n\t#endif\n};\nvec3 clearcoatSpecular = vec3( 0.0 );\nvec3 sheenSpecular = vec3( 0.0 );\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}\n#ifdef USE_ANISOTROPY\n\tfloat V_GGX_SmithCorrelated_Anisotropic( const in float alphaT, const in float alphaB, const in float dotTV, const in float dotBV, const in float dotTL, const in float dotBL, const in float dotNV, const in float dotNL ) {\n\t\tfloat gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) );\n\t\tfloat gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) );\n\t\tfloat v = 0.5 / ( gv + gl );\n\t\treturn saturate(v);\n\t}\n\tfloat D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) {\n\t\tfloat a2 = alphaT * alphaB;\n\t\thighp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH );\n\t\thighp float v2 = dot( v, v );\n\t\tfloat w2 = a2 / v2;\n\t\treturn RECIPROCAL_PI * a2 * pow2 ( w2 );\n\t}\n#endif\n#ifdef USE_CLEARCOAT\n\tvec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) {\n\t\tvec3 f0 = material.clearcoatF0;\n\t\tfloat f90 = material.clearcoatF90;\n\t\tfloat roughness = material.clearcoatRoughness;\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 = F_Schlick( f0, f90, dotVH );\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\nvec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) {\n\tvec3 f0 = material.specularColor;\n\tfloat f90 = material.specularF90;\n\tfloat roughness = material.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\t#ifdef USE_IRIDESCENCE\n\t\tF = mix( F, material.iridescenceFresnel, material.iridescence );\n\t#endif\n\t#ifdef USE_ANISOTROPY\n\t\tfloat dotTL = dot( material.anisotropyT, lightDir );\n\t\tfloat dotTV = dot( material.anisotropyT, viewDir );\n\t\tfloat dotTH = dot( material.anisotropyT, halfDir );\n\t\tfloat dotBL = dot( material.anisotropyB, lightDir );\n\t\tfloat dotBV = dot( material.anisotropyB, viewDir );\n\t\tfloat dotBH = dot( material.anisotropyB, halfDir );\n\t\tfloat V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL );\n\t\tfloat D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH );\n\t#else\n\t\tfloat V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV );\n\t\tfloat D = D_GGX( alpha, dotNH );\n\t#endif\n\treturn F * ( V * D );\n}\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}\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\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_Clearcoat( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material );\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\treflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material );\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, vLightMapUv );\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\t#ifdef USE_ANISOTROPY\n\t\tradiance += getIBLAnisotropyRadiance( geometry.viewDir, geometry.normal, material.roughness, material.anisotropyB, material.anisotropy );\n\t#else\n\t\tradiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness );\n\t#endif\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\tdiffuseColor *= texture2D( map, vMapUv );\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\t#if defined( USE_POINTS_UV )\n\t\tvec2 uv = vUv;\n\t#else\n\t\tvec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy;\n\t#endif\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_POINTS_UV )\n\tvarying vec2 vUv;\n#else\n\t#if defined( USE_MAP ) || defined( USE_ALPHAMAP )\n\t\tuniform mat3 uvTransform;\n\t#endif\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, vMetalnessMapUv );\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 *= faceDirection;\n\t#endif\n#endif\n#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY )\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn = getTangentFrame( - vViewPosition, normal,\n\t\t#if defined( USE_NORMALMAP )\n\t\t\tvNormalMapUv\n\t\t#elif defined( USE_CLEARCOAT_NORMALMAP )\n\t\t\tvClearcoatNormalMapUv\n\t\t#else\n\t\t\tvUv\n\t\t#endif\n\t\t);\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn[0] *= faceDirection;\n\t\ttbn[1] *= faceDirection;\n\t#endif\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\t#ifdef USE_TANGENT\n\t\tmat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal );\n\t#else\n\t\tmat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv );\n\t#endif\n\t#if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED )\n\t\ttbn2[0] *= faceDirection;\n\t\ttbn2[1] *= faceDirection;\n\t#endif\n#endif\nvec3 geometryNormal = normal;",normal_fragment_maps:"#ifdef USE_NORMALMAP_OBJECTSPACE\n\tnormal = texture2D( normalMap, vNormalMapUv ).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( USE_NORMALMAP_TANGENTSPACE )\n\tvec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0;\n\tmapN.xy *= normalScale;\n\tnormal = normalize( tbn * mapN );\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 USE_NORMALMAP_OBJECTSPACE\n\tuniform mat3 normalMatrix;\n#endif\n#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) )\n\tmat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) {\n\t\tvec3 q0 = dFdx( eye_pos.xyz );\n\t\tvec3 q1 = dFdy( eye_pos.xyz );\n\t\tvec2 st0 = dFdx( uv.st );\n\t\tvec2 st1 = dFdy( uv.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 : inversesqrt( det );\n\t\treturn mat3( T * scale, B * scale, N );\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, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0;\n\tclearcoatMapN.xy *= clearcoatNormalScale;\n\tclearcoatNormal = normalize( tbn2 * clearcoatMapN );\n#endif",clearcoat_pars_fragment:"#ifdef USE_CLEARCOATMAP\n\tuniform sampler2D clearcoatMap;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform sampler2D clearcoatNormalMap;\n\tuniform vec2 clearcoatNormalScale;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform sampler2D clearcoatRoughnessMap;\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",opaque_fragment:"#ifdef OPAQUE\ndiffuseColor.a = 1.0;\n#endif\n#ifdef USE_TRANSMISSION\ndiffuseColor.a *= material.transmissionAlpha;\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 depth, const in float near, const in float far ) {\n\treturn depth * ( 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 depth, const in float near, const in float far ) {\n\treturn ( near * far ) / ( ( far - near ) * depth - 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, vRoughnessMapUv );\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\tvarying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ];\n#endif\n#if NUM_SPOT_LIGHT_MAPS > 0\n\tuniform 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\tuniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ];\n\tvarying 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_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 )\n\tvec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix );\n\tvec4 shadowWorldPosition;\n#endif\n#if defined( USE_SHADOWMAP )\n\t#if NUM_DIR_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n\t#if NUM_POINT_LIGHT_SHADOWS > 0\n\t\t#pragma unroll_loop_start\n\t\tfor ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) {\n\t\t\tshadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 );\n\t\t\tvPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition;\n\t\t}\n\t\t#pragma unroll_loop_end\n\t#endif\n#endif\n#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#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, vSpecularMapUv );\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 saturate( 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, vTransmissionMapUv ).r;\n\t#endif\n\t#ifdef USE_THICKNESSMAP\n\t\tmaterial.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g;\n\t#endif\n\tvec3 pos = vWorldPosition;\n\tvec3 v = normalize( cameraPosition - pos );\n\tvec3 n = inverseTransformDirection( normal, viewMatrix );\n\tvec4 transmitted = 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, transmitted.a, material.transmission );\n\ttotalDiffuse = mix( totalDiffuse, transmitted.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\tfloat w0( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 );\n\t}\n\tfloat w1( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 );\n\t}\n\tfloat w2( float a ){\n\t\treturn ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 );\n\t}\n\tfloat w3( float a ) {\n\t\treturn ( 1.0 / 6.0 ) * ( a * a * a );\n\t}\n\tfloat g0( float a ) {\n\t\treturn w0( a ) + w1( a );\n\t}\n\tfloat g1( float a ) {\n\t\treturn w2( a ) + w3( a );\n\t}\n\tfloat h0( float a ) {\n\t\treturn - 1.0 + w1( a ) / ( w0( a ) + w1( a ) );\n\t}\n\tfloat h1( float a ) {\n\t\treturn 1.0 + w3( a ) / ( w2( a ) + w3( a ) );\n\t}\n\tvec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) {\n\t\tuv = uv * texelSize.zw + 0.5;\n\t\tvec2 iuv = floor( uv );\n\t\tvec2 fuv = fract( uv );\n\t\tfloat g0x = g0( fuv.x );\n\t\tfloat g1x = g1( fuv.x );\n\t\tfloat h0x = h0( fuv.x );\n\t\tfloat h1x = h1( fuv.x );\n\t\tfloat h0y = h0( fuv.y );\n\t\tfloat h1y = h1( fuv.y );\n\t\tvec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\tvec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy;\n\t\treturn g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) +\n\t\t\tg1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) );\n\t}\n\tvec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) {\n\t\tvec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) );\n\t\tvec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) );\n\t\tvec2 fLodSizeInv = 1.0 / fLodSize;\n\t\tvec2 cLodSizeInv = 1.0 / cLodSize;\n\t\tvec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) );\n\t\tvec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) );\n\t\treturn mix( fSample, cSample, fract( lod ) );\n\t}\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 lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior );\n\t\treturn textureBicubic( transmissionSamplerMap, fragCoord.xy, lod );\n\t}\n\tvec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) {\n\t\tif ( isinf( attenuationDistance ) ) {\n\t\t\treturn vec3( 1.0 );\n\t\t} else {\n\t\t\tvec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance;\n\t\t\tvec3 transmittance = exp( - attenuationCoefficient * transmissionDistance );\t\t\treturn transmittance;\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 transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance );\n\t\tvec3 attenuatedColor = transmittance * transmittedLight.rgb;\n\t\tvec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness );\n\t\tfloat transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0;\n\t\treturn vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor );\n\t}\n#endif",uv_pars_fragment:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_pars_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvarying vec2 vUv;\n#endif\n#ifdef USE_MAP\n\tuniform mat3 mapTransform;\n\tvarying vec2 vMapUv;\n#endif\n#ifdef USE_ALPHAMAP\n\tuniform mat3 alphaMapTransform;\n\tvarying vec2 vAlphaMapUv;\n#endif\n#ifdef USE_LIGHTMAP\n\tuniform mat3 lightMapTransform;\n\tvarying vec2 vLightMapUv;\n#endif\n#ifdef USE_AOMAP\n\tuniform mat3 aoMapTransform;\n\tvarying vec2 vAoMapUv;\n#endif\n#ifdef USE_BUMPMAP\n\tuniform mat3 bumpMapTransform;\n\tvarying vec2 vBumpMapUv;\n#endif\n#ifdef USE_NORMALMAP\n\tuniform mat3 normalMapTransform;\n\tvarying vec2 vNormalMapUv;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tuniform mat3 displacementMapTransform;\n\tvarying vec2 vDisplacementMapUv;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tuniform mat3 emissiveMapTransform;\n\tvarying vec2 vEmissiveMapUv;\n#endif\n#ifdef USE_METALNESSMAP\n\tuniform mat3 metalnessMapTransform;\n\tvarying vec2 vMetalnessMapUv;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tuniform mat3 roughnessMapTransform;\n\tvarying vec2 vRoughnessMapUv;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tuniform mat3 anisotropyMapTransform;\n\tvarying vec2 vAnisotropyMapUv;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tuniform mat3 clearcoatMapTransform;\n\tvarying vec2 vClearcoatMapUv;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tuniform mat3 clearcoatNormalMapTransform;\n\tvarying vec2 vClearcoatNormalMapUv;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tuniform mat3 clearcoatRoughnessMapTransform;\n\tvarying vec2 vClearcoatRoughnessMapUv;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tuniform mat3 sheenColorMapTransform;\n\tvarying vec2 vSheenColorMapUv;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tuniform mat3 sheenRoughnessMapTransform;\n\tvarying vec2 vSheenRoughnessMapUv;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tuniform mat3 iridescenceMapTransform;\n\tvarying vec2 vIridescenceMapUv;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tuniform mat3 iridescenceThicknessMapTransform;\n\tvarying vec2 vIridescenceThicknessMapUv;\n#endif\n#ifdef USE_SPECULARMAP\n\tuniform mat3 specularMapTransform;\n\tvarying vec2 vSpecularMapUv;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tuniform mat3 specularColorMapTransform;\n\tvarying vec2 vSpecularColorMapUv;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tuniform mat3 specularIntensityMapTransform;\n\tvarying vec2 vSpecularIntensityMapUv;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tuniform mat3 transmissionMapTransform;\n\tvarying vec2 vTransmissionMapUv;\n#endif\n#ifdef USE_THICKNESSMAP\n\tuniform mat3 thicknessMapTransform;\n\tvarying vec2 vThicknessMapUv;\n#endif",uv_vertex:"#if defined( USE_UV ) || defined( USE_ANISOTROPY )\n\tvUv = vec3( uv, 1 ).xy;\n#endif\n#ifdef USE_MAP\n\tvMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ALPHAMAP\n\tvAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_LIGHTMAP\n\tvLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_AOMAP\n\tvAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_BUMPMAP\n\tvBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_NORMALMAP\n\tvNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_DISPLACEMENTMAP\n\tvDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_EMISSIVEMAP\n\tvEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_METALNESSMAP\n\tvMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ROUGHNESSMAP\n\tvRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_ANISOTROPYMAP\n\tvAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOATMAP\n\tvClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_NORMALMAP\n\tvClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_CLEARCOAT_ROUGHNESSMAP\n\tvClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCEMAP\n\tvIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_IRIDESCENCE_THICKNESSMAP\n\tvIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_COLORMAP\n\tvSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SHEEN_ROUGHNESSMAP\n\tvSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULARMAP\n\tvSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_COLORMAP\n\tvSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_SPECULAR_INTENSITYMAP\n\tvSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_TRANSMISSIONMAP\n\tvTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy;\n#endif\n#ifdef USE_THICKNESSMAP\n\tvThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 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\ttexColor.rgb *= backgroundIntensity;\n\tgl_FragColor = texColor;\n\t#include <tonemapping_fragment>\n\t#include <colorspace_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 <colorspace_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 <colorspace_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 <alphahash_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 <alphahash_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 <alphahash_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\t#include <alphahash_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 <colorspace_fragment>\n}",linedashed_vert:"uniform float scale;\nattribute float lineDistance;\nvarying float vLineDistance;\n#include <common>\n#include <uv_pars_vertex>\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 <uv_vertex>\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 <uv_pars_fragment>\n#include <map_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 <map_fragment>\n\t#include <color_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n\t#include <premultiplied_alpha_fragment>\n}",meshbasic_vert:"#include <common>\n#include <uv_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 <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 <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_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 <alphahash_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, vLightMapUv );\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 <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_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 <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 <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 <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_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 <alphahash_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 <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_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 <alphahash_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 <alphahash_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 <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_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( USE_NORMALMAP_TANGENTSPACE )\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( USE_NORMALMAP_TANGENTSPACE )\n\tvViewPosition = - mvPosition.xyz;\n#endif\n}",meshnormal_frag:"#define NORMAL\nuniform float opacity;\n#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE )\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 <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 <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 <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_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 <alphahash_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 <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_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 <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 <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 USE_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 USE_SPECULAR\n\tuniform float specularIntensity;\n\tuniform vec3 specularColor;\n\t#ifdef USE_SPECULAR_COLORMAP\n\t\tuniform sampler2D specularColorMap;\n\t#endif\n\t#ifdef USE_SPECULAR_INTENSITYMAP\n\t\tuniform sampler2D specularIntensityMap;\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_SHEEN_COLORMAP\n\t\tuniform sampler2D sheenColorMap;\n\t#endif\n\t#ifdef USE_SHEEN_ROUGHNESSMAP\n\t\tuniform sampler2D sheenRoughnessMap;\n\t#endif\n#endif\n#ifdef USE_ANISOTROPY\n\tuniform vec2 anisotropyVector;\n\t#ifdef USE_ANISOTROPYMAP\n\t\tuniform sampler2D anisotropyMap;\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 <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_pars_fragment>\n#include <aomap_pars_fragment>\n#include <lightmap_pars_fragment>\n#include <emissivemap_pars_fragment>\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 <alphahash_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 <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_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 <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 <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 <map_pars_fragment>\n#include <alphamap_pars_fragment>\n#include <alphatest_pars_fragment>\n#include <alphahash_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 <alphahash_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 <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_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>\n#ifdef USE_POINTS_UV\n\tvarying vec2 vUv;\n\tuniform mat3 uvTransform;\n#endif\nvoid main() {\n\t#ifdef USE_POINTS_UV\n\t\tvUv = ( uvTransform * vec3( uv, 1 ) ).xy;\n\t#endif\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 <alphahash_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\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_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 <logdepthbuf_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 <logdepthbuf_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 <logdepthbuf_pars_fragment>\n#include <shadowmap_pars_fragment>\n#include <shadowmask_pars_fragment>\nvoid main() {\n\t#include <logdepthbuf_fragment>\n\tgl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) );\n\t#include <tonemapping_fragment>\n\t#include <colorspace_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 <alphahash_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\t#include <alphahash_fragment>\n\toutgoingLight = diffuseColor.rgb;\n\t#include <opaque_fragment>\n\t#include <tonemapping_fragment>\n\t#include <colorspace_fragment>\n\t#include <fog_fragment>\n}"},is={common:{diffuse:{value:new Hi(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new jn},alphaMap:{value:null},alphaMapTransform:{value:new jn},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new jn}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new jn}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new jn}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new jn},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new jn},normalScale:{value:new Wn(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new jn},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new jn}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new jn}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new jn}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Hi(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 Hi(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new jn},alphaTest:{value:0},uvTransform:{value:new jn}},sprite:{diffuse:{value:new Hi(16777215)},opacity:{value:1},center:{value:new Wn(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new jn},alphaMap:{value:null},alphaMapTransform:{value:new jn},alphaTest:{value:0}}},as={basic:{uniforms:Na([is.common,is.specularmap,is.envmap,is.aomap,is.lightmap,is.fog]),vertexShader:rs.meshbasic_vert,fragmentShader:rs.meshbasic_frag},lambert:{uniforms:Na([is.common,is.specularmap,is.envmap,is.aomap,is.lightmap,is.emissivemap,is.bumpmap,is.normalmap,is.displacementmap,is.fog,is.lights,{emissive:{value:new Hi(0)}}]),vertexShader:rs.meshlambert_vert,fragmentShader:rs.meshlambert_frag},phong:{uniforms:Na([is.common,is.specularmap,is.envmap,is.aomap,is.lightmap,is.emissivemap,is.bumpmap,is.normalmap,is.displacementmap,is.fog,is.lights,{emissive:{value:new Hi(0)},specular:{value:new Hi(1118481)},shininess:{value:30}}]),vertexShader:rs.meshphong_vert,fragmentShader:rs.meshphong_frag},standard:{uniforms:Na([is.common,is.envmap,is.aomap,is.lightmap,is.emissivemap,is.bumpmap,is.normalmap,is.displacementmap,is.roughnessmap,is.metalnessmap,is.fog,is.lights,{emissive:{value:new Hi(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:rs.meshphysical_vert,fragmentShader:rs.meshphysical_frag},toon:{uniforms:Na([is.common,is.aomap,is.lightmap,is.emissivemap,is.bumpmap,is.normalmap,is.displacementmap,is.gradientmap,is.fog,is.lights,{emissive:{value:new Hi(0)}}]),vertexShader:rs.meshtoon_vert,fragmentShader:rs.meshtoon_frag},matcap:{uniforms:Na([is.common,is.bumpmap,is.normalmap,is.displacementmap,is.fog,{matcap:{value:null}}]),vertexShader:rs.meshmatcap_vert,fragmentShader:rs.meshmatcap_frag},points:{uniforms:Na([is.points,is.fog]),vertexShader:rs.points_vert,fragmentShader:rs.points_frag},dashed:{uniforms:Na([is.common,is.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:rs.linedashed_vert,fragmentShader:rs.linedashed_frag},depth:{uniforms:Na([is.common,is.displacementmap]),vertexShader:rs.depth_vert,fragmentShader:rs.depth_frag},normal:{uniforms:Na([is.common,is.bumpmap,is.normalmap,is.displacementmap,{opacity:{value:1}}]),vertexShader:rs.meshnormal_vert,fragmentShader:rs.meshnormal_frag},sprite:{uniforms:Na([is.sprite,is.fog]),vertexShader:rs.sprite_vert,fragmentShader:rs.sprite_frag},background:{uniforms:{uvTransform:{value:new jn},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:rs.background_vert,fragmentShader:rs.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:rs.backgroundCube_vert,fragmentShader:rs.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:rs.cube_vert,fragmentShader:rs.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:rs.equirect_vert,fragmentShader:rs.equirect_frag},distanceRGBA:{uniforms:Na([is.common,is.displacementmap,{referencePosition:{value:new br},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:rs.distanceRGBA_vert,fragmentShader:rs.distanceRGBA_frag},shadow:{uniforms:Na([is.lights,is.fog,{color:{value:new Hi(0)},opacity:{value:1}}]),vertexShader:rs.shadow_vert,fragmentShader:rs.shadow_frag}};as.physical={uniforms:Na([as.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new jn},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new jn},clearcoatNormalScale:{value:new Wn(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new jn},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new jn},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new jn},sheen:{value:0},sheenColor:{value:new Hi(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new jn},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new jn},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new jn},transmissionSamplerSize:{value:new Wn},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new jn},attenuationDistance:{value:0},attenuationColor:{value:new Hi(0)},specularColor:{value:new Hi(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new jn},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new jn},anisotropyVector:{value:new Wn},anisotropyMap:{value:null},anisotropyMapTransform:{value:new jn}}]),vertexShader:rs.meshphysical_vert,fragmentShader:rs.meshphysical_frag};const ss={r:0,b:0,g:0};function os(e,t,n,r,i,a,s){const o=new Hi(0);let l,c,u=!0===a?0:1,h=null,d=0,p=null;function g(t,n){t.getRGB(ss,Oa(e)),r.buffers.color.setClear(ss.r,ss.g,ss.b,n,s)}return{getClearColor:function(){return o},setClearColor:function(e,t=1){o.set(e),u=t,g(o,u)},getClearAlpha:function(){return u},setClearAlpha:function(e){u=e,g(o,u)},render:function(a,v){let y=!1,x=!0===v.isScene?v.background:null;switch(x&&x.isTexture&&(x=(v.backgroundBlurriness>0?n:t).get(x)),null===x?g(o,u):x&&x.isColor&&(g(x,1),y=!0),e.xr.getEnvironmentBlendMode()){case"opaque":y=!0;break;case"additive":r.buffers.color.setClear(0,0,0,1,s),y=!0;break;case"alpha-blend":r.buffers.color.setClear(0,0,0,0,s),y=!0}(e.autoClear||y)&&e.clear(e.autoClearColor,e.autoClearDepth,e.autoClearStencil),x&&(x.isCubeTexture||x.mapping===le)?(void 0===c&&(c=new Ia(new Fa(1,1,1),new za({name:"BackgroundCubeMaterial",uniforms:Ua(as.backgroundCube.uniforms),vertexShader:as.backgroundCube.vertexShader,fragmentShader:as.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=x,c.material.uniforms.flipEnvMap.value=x.isCubeTexture&&!1===x.isRenderTargetTexture?-1:1,c.material.uniforms.backgroundBlurriness.value=v.backgroundBlurriness,c.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,c.material.toneMapped=x.colorSpace!==Ht,h===x&&d===x.version&&p===e.toneMapping||(c.material.needsUpdate=!0,h=x,d=x.version,p=e.toneMapping),c.layers.enableAll(),a.unshift(c,c.geometry,c.material,0,0,null)):x&&x.isTexture&&(void 0===l&&(l=new Ia(new ns(2,2),new za({name:"BackgroundMaterial",uniforms:Ua(as.background.uniforms),vertexShader:as.background.vertexShader,fragmentShader:as.background.fragmentShader,side:f,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=x,l.material.uniforms.backgroundIntensity.value=v.backgroundIntensity,l.material.toneMapped=x.colorSpace!==Ht,!0===x.matrixAutoUpdate&&x.updateMatrix(),l.material.uniforms.uvTransform.value.copy(x.matrix),h===x&&d===x.version&&p===e.toneMapping||(l.material.needsUpdate=!0,h=x,d=x.version,p=e.toneMapping),l.layers.enableAll(),a.unshift(l,l.geometry,l.material,0,0,null))}}}function ls(e,t,n,r){const i=e.getParameter(e.MAX_VERTEX_ATTRIBS),a=r.isWebGL2?null:t.get("OES_vertex_array_object"),s=r.isWebGL2||null!==a,o={},l=p(null);let c=l,u=!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 p(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 f(){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,s=c.enabledAttributes,o=c.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=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,r,i,a,s,o){!0===o?e.vertexAttribIPointer(t,n,r,a,s):e.vertexAttribPointer(t,n,r,i,a,s)}function x(){_(),u=!0,c!==l&&(c=l,h(c.object))}function _(){l.geometry=null,l.program=null,l.wireframe=!1}return{setup:function(i,l,d,x,_){let b=!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 c=l[n.id];void 0===c&&(c={},l[n.id]=c);let u=c[s];return void 0===u&&(u=p(r.isWebGL2?e.createVertexArray():a.createVertexArrayOES()),c[s]=u),u}(x,d,l);c!==t&&(c=t,h(c.object)),b=function(e,t,n,r){const i=c.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 c.attributesNum!==s||c.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++}c.attributes=i,c.attributesNum=s,c.index=r}(i,x,d,_)}else{const e=!0===l.wireframe;c.geometry===x.id&&c.program===d.id&&c.wireframe===e||(c.geometry=x.id,c.program=d.id,c.wireframe=e,b=!0)}null!==_&&n.update(_,e.ELEMENT_ARRAY_BUFFER),(b||u)&&(u=!1,function(i,a,s,o){if(!1===r.isWebGL2&&(i.isInstancedMesh||o.isInstancedBufferGeometry)&&null===t.get("ANGLE_instanced_arrays"))return;f();const l=o.attributes,c=s.getAttributes(),u=a.defaultAttributeValues;for(const t in c){const a=c[t];if(a.location>=0){let s=l[t];if(void 0===s&&("instanceMatrix"===t&&i.instanceMatrix&&(s=i.instanceMatrix),"instanceColor"===t&&i.instanceColor&&(s=i.instanceColor)),void 0!==s){const t=s.normalized,l=s.itemSize,c=n.get(s);if(void 0===c)continue;const u=c.buffer,h=c.type,d=c.bytesPerElement,p=!0===r.isWebGL2&&(h===e.INT||h===e.UNSIGNED_INT||s.gpuType===we);if(s.isInterleavedBufferAttribute){const n=s.data,r=n.stride,c=s.offset;if(n.isInstancedInterleavedBuffer){for(let e=0;e<a.locationSize;e++)g(a.location+e,n.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=n.meshPerAttribute*n.count)}else for(let e=0;e<a.locationSize;e++)m(a.location+e);e.bindBuffer(e.ARRAY_BUFFER,u);for(let e=0;e<a.locationSize;e++)y(a.location+e,l/a.locationSize,h,t,r*d,(c+l/a.locationSize*e)*d,p)}else{if(s.isInstancedBufferAttribute){for(let e=0;e<a.locationSize;e++)g(a.location+e,s.meshPerAttribute);!0!==i.isInstancedMesh&&void 0===o._maxInstanceCount&&(o._maxInstanceCount=s.meshPerAttribute*s.count)}else for(let e=0;e<a.locationSize;e++)m(a.location+e);e.bindBuffer(e.ARRAY_BUFFER,u);for(let e=0;e<a.locationSize;e++)y(a.location+e,l/a.locationSize,h,t,l*d,l/a.locationSize*e*d,p)}}else if(void 0!==u){const n=u[t];if(void 0!==n)switch(n.length){case 2:e.vertexAttrib2fv(a.location,n);break;case 3:e.vertexAttrib3fv(a.location,n);break;case 4:e.vertexAttrib4fv(a.location,n);break;default:e.vertexAttrib1fv(a.location,n)}}}}v()}(i,l,d,x),null!==_&&e.bindBuffer(e.ELEMENT_ARRAY_BUFFER,n.get(_).buffer))},reset:x,resetDefaultState:_,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:f,enableAttribute:m,disableUnusedAttributes:v}}function cs(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,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,s,o),n.update(s,a,o)}}function us(e,t,n){let r;function i(t){if("highp"===t){if(e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.HIGH_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.HIGH_FLOAT).precision>0)return"highp";t="mediump"}return"mediump"===t&&e.getShaderPrecisionFormat(e.VERTEX_SHADER,e.MEDIUM_FLOAT).precision>0&&e.getShaderPrecisionFormat(e.FRAGMENT_SHADER,e.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const a="undefined"!=typeof WebGL2RenderingContext&&"WebGL2RenderingContext"===e.constructor.name;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"),c=!0===n.logarithmicDepthBuffer,u=e.getParameter(e.MAX_TEXTURE_IMAGE_UNITS),h=e.getParameter(e.MAX_VERTEX_TEXTURE_IMAGE_UNITS),d=e.getParameter(e.MAX_TEXTURE_SIZE),p=e.getParameter(e.MAX_CUBE_MAP_TEXTURE_SIZE),f=e.getParameter(e.MAX_VERTEX_ATTRIBS),m=e.getParameter(e.MAX_VERTEX_UNIFORM_VECTORS),g=e.getParameter(e.MAX_VARYING_VECTORS),v=e.getParameter(e.MAX_FRAGMENT_UNIFORM_VECTORS),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:c,maxTextures:u,maxVertexTextures:h,maxTextureSize:d,maxCubemapSize:p,maxAttributes:f,maxVertexUniforms:m,maxVaryings:g,maxFragmentUniforms:v,vertexTextures:y,floatFragmentTextures:x,floatVertexTextures:y&&x,maxSamples:a?e.getParameter(e.MAX_SAMPLES):0}}function hs(e){const t=this;let n=null,r=0,i=!1,a=!1;const s=new qa,o=new jn,l={value:null,needsUpdate:!1};function c(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;o.getNormalMatrix(i),(null===c||c.length<t)&&(c=new Float32Array(t));for(let t=0,n=r;t!==a;++t,n+=4)s.copy(e[t]).applyMatrix4(i,o),s.normal.toArray(c,n),c[n+3]=s.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){const n=0!==e.length||t||0!==r||i;return i=t,r=e.length,n},this.beginShadows=function(){a=!0,c(null)},this.endShadows=function(){a=!1},this.setGlobalState=function(e,t){n=c(e,t,0)},this.setState=function(s,o,u){const h=s.clippingPlanes,d=s.clipIntersection,p=s.clipShadows,f=e.get(s);if(!i||null===h||0===h.length||a&&!p)a?c(null):(l.value!==n&&(l.value=n,l.needsUpdate=r>0),t.numPlanes=r,t.numIntersection=0);else{const e=a?0:r,t=4*e;let i=f.clippingState||null;l.value=i,i=c(h,o,t,u);for(let e=0;e!==t;++e)i[e]=n[e];f.clippingState=i,this.numIntersection=d?this.numPlanes:0,this.numPlanes+=e}}}function ds(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 Xa(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 ps 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,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.coordinateSystem),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 fs=[.125,.215,.35,.446,.526,.582],ms=new ps,gs=new Hi;let vs=null;const ys=(1+Math.sqrt(5))/2,xs=1/ys,_s=[new br(1,1,1),new br(-1,1,1),new br(1,1,-1),new br(-1,1,-1),new br(0,ys,xs),new br(0,ys,-xs),new br(xs,0,ys),new br(-xs,0,ys),new br(ys,xs,0),new br(-ys,xs,0)];class bs{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){vs=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=Es(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){null===this._equirectMaterial&&(this._equirectMaterial=Ss(),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(vs),e.scissorTest=!1,Ms(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),vs=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,colorSpace:Gt,depthBuffer:!1},r=As(e,t,n);if(null===this._pingPongRenderTarget||this._pingPongRenderTarget.width!==e||this._pingPongRenderTarget.height!==t){null!==this._pingPongRenderTarget&&this._dispose(),this._pingPongRenderTarget=As(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+fs.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=fs[s-e+4-1]:0===s&&(o=0),r.push(o);const l=1/(a-2),c=-l,u=1+l,h=[c,c,u,c,u,u,c,c,u,u,c,u],d=6,p=6,f=3,m=2,g=1,v=new Float32Array(f*p*d),y=new Float32Array(m*p*d),x=new Float32Array(g*p*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,f*p*e),y.set(h,m*p*e);const i=[e,e,e,e,e,e];x.set(i,g*p*e)}const _=new ma;_.setAttribute("position",new Qi(v,f)),_.setAttribute("uv",new Qi(y,m)),_.setAttribute("faceIndex",new Qi(x,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 br(0,1,0);return new za({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,ms)}_sceneToCubeUV(e,t,n,r){const i=new Ga(90,1,t,n),a=[1,-1,1,1,1,1],s=[1,1,1,-1,-1,-1],o=this._renderer,l=o.autoClear,c=o.toneMapping;o.getClearColor(gs),o.toneMapping=Q,o.autoClear=!1;const u=new Vi({name:"PMREM.Background",side:m,depthWrite:!1,depthTest:!1}),h=new Ia(new Fa,u);let d=!1;const p=e.background;p?p.isColor&&(u.color.copy(p),e.background=null,d=!0):(u.color.copy(gs),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;Ms(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=c,o.autoClear=l,e.background=p}_textureToCubeUV(e,t){const n=this._renderer,r=e.mapping===ie||e.mapping===ae;r?(null===this._cubemapMaterial&&(this._cubemapMaterial=Es()),this._cubemapMaterial.uniforms.flipEnvMap.value=!1===e.isRenderTargetTexture?-1:1):null===this._equirectMaterial&&(this._equirectMaterial=Ss());const i=r?this._cubemapMaterial:this._equirectMaterial,a=new Ia(this._lodPlanes[0],i);i.uniforms.envMap.value=e;const s=this._cubeSize;Ms(t,0,0,3*s,2*s),n.setRenderTarget(t),n.render(a,ms)}_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=_s[(t-1)%_s.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 c=new Ia(this._lodPlanes[r],l),u=l.uniforms,h=this._sizeLods[n]-1,d=isFinite(i)?Math.PI/(2*h):2*Math.PI/39,p=i/d,f=isFinite(i)?1+Math.floor(3*p):20;f>20&&console.warn(`sigmaRadians, ${i}, is too large and will clip, as it requested ${f} samples when the maximum is set to 20`);const m=[];let g=0;for(let e=0;e<20;++e){const t=e/p,n=Math.exp(-t*t/2);m.push(n),0===e?g+=n:e<f&&(g+=2*n)}for(let e=0;e<m.length;e++)m[e]=m[e]/g;u.envMap.value=e.texture,u.samples.value=f,u.weights.value=m,u.latitudinal.value="latitudinal"===a,s&&(u.poleAxis.value=s);const{_lodMax:v}=this;u.dTheta.value=d,u.mipInt.value=v-n;const y=this._sizeLods[r];Ms(t,3*y*(r>v-4?r-v+4:0),4*(this._cubeSize-y),3*y,2*y),o.setRenderTarget(t),o.render(c,ms)}}function As(e,t,n){const r=new fr(e,t,n);return r.texture.mapping=le,r.texture.name="PMREM.cubeUv",r.scissorTest=!0,r}function Ms(e,t,n,r,i){e.viewport.set(t,n,r,i),e.scissor.set(t,n,r,i)}function Ss(){return new za({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 Es(){return new za({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 ws(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 bs(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 bs(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 Ts(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 Cs(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]);for(const e in o.morphAttributes){const n=o.morphAttributes[e];for(let e=0,r=n.length;e<r;e++)t.remove(n[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(Jn(n)?ia:na)(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(n){const r=n.attributes;for(const n in r)t.update(r[n],e.ARRAY_BUFFER);const i=n.morphAttributes;for(const n in i){const r=i[n];for(let n=0,i=r.length;n<i;n++)t.update(r[n],e.ARRAY_BUFFER)}},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 Rs(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,c){if(0===c)return;let u,h;if(i)u=e,h="drawElementsInstanced";else if(u=t.get("ANGLE_instanced_arrays"),h="drawElementsInstancedANGLE",null===u)return void console.error("THREE.WebGLIndexedBufferRenderer: using THREE.InstancedBufferGeometry but hardware does not support extension ANGLE_instanced_arrays.");u[h](a,l,s,r*o,c),n.update(l,a,c)}}function Ps(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.calls=0,t.triangles=0,t.points=0,t.lines=0},update:function(n,r,i){switch(t.calls++,r){case e.TRIANGLES:t.triangles+=i*(n/3);break;case e.LINES:t.lines+=i*(n/2);break;case e.LINE_STRIP:t.lines+=i*(n-1);break;case e.LINE_LOOP:t.lines+=i*n;break;case e.POINTS:t.points+=i*n;break;default:console.error("THREE.WebGLInfo: Unknown draw mode:",r)}}}}function Bs(e,t){return e[0]-t[0]}function Ls(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 pr,o=[];for(let e=0;e<8;e++)o[e]=[e,0];return{update:function(l,c,u){const h=l.morphTargetInfluences;if(!0===t.isWebGL2){const d=c.morphAttributes.position||c.morphAttributes.normal||c.morphAttributes.color,p=void 0!==d?d.length:0;let f=a.get(c);if(void 0===f||f.count!==p){void 0!==f&&f.texture.dispose();const v=void 0!==c.morphAttributes.position,y=void 0!==c.morphAttributes.normal,x=void 0!==c.morphAttributes.color,_=c.morphAttributes.position||[],b=c.morphAttributes.normal||[],A=c.morphAttributes.color||[];let M=0;!0===v&&(M=1),!0===y&&(M=2),!0===x&&(M=3);let S=c.attributes.position.count*M,E=1;S>t.maxTextureSize&&(E=Math.ceil(S/t.maxTextureSize),S=t.maxTextureSize);const w=new Float32Array(S*E*4*p),T=new mr(w,S,E,p);T.type=Ce,T.needsUpdate=!0;const C=4*M;for(let P=0;P<p;P++){const B=_[P],L=b[P],I=A[P],D=S*E*4*P;for(let F=0;F<B.count;F++){const U=F*C;!0===v&&(s.fromBufferAttribute(B,F),w[D+U+0]=s.x,w[D+U+1]=s.y,w[D+U+2]=s.z,w[D+U+3]=0),!0===y&&(s.fromBufferAttribute(L,F),w[D+U+4]=s.x,w[D+U+5]=s.y,w[D+U+6]=s.z,w[D+U+7]=0),!0===x&&(s.fromBufferAttribute(I,F),w[D+U+8]=s.x,w[D+U+9]=s.y,w[D+U+10]=s.z,w[D+U+11]=4===I.itemSize?s.w:1)}}function R(){T.dispose(),a.delete(c),c.removeEventListener("dispose",R)}f={count:p,texture:T,size:new Wn(S,E)},a.set(c,f),c.addEventListener("dispose",R)}let m=0;for(let N=0;N<h.length;N++)m+=h[N];const g=c.morphTargetsRelative?1:1-m;u.getUniforms().setValue(e,"morphTargetBaseInfluence",g),u.getUniforms().setValue(e,"morphTargetInfluences",h),u.getUniforms().setValue(e,"morphTargetsTexture",f.texture,n),u.getUniforms().setValue(e,"morphTargetsTextureSize",f.size)}else{const O=void 0===h?0:h.length;let k=r[c.id];if(void 0===k||k.length!==O){k=[];for(let W=0;W<O;W++)k[W]=[W,0];r[c.id]=k}for(let j=0;j<O;j++){const X=k[j];X[0]=j,X[1]=h[j]}k.sort(Ls);for(let J=0;J<8;J++)J<O&&k[J][1]?(o[J][0]=k[J][0],o[J][1]=k[J][1]):(o[J][0]=Number.MAX_SAFE_INTEGER,o[J][1]=0);o.sort(Bs);const z=c.morphAttributes.position,H=c.morphAttributes.normal;let G=0;for(let Y=0;Y<8;Y++){const K=o[Y],q=K[0],Q=K[1];q!==Number.MAX_SAFE_INTEGER&&Q?(z&&c.getAttribute("morphTarget"+Y)!==z[q]&&c.setAttribute("morphTarget"+Y,z[q]),H&&c.getAttribute("morphNormal"+Y)!==H[q]&&c.setAttribute("morphNormal"+Y,H[q]),i[Y]=Q,G+=Q):(z&&!0===c.hasAttribute("morphTarget"+Y)&&c.deleteAttribute("morphTarget"+Y),H&&!0===c.hasAttribute("morphNormal"+Y)&&c.deleteAttribute("morphNormal"+Y),i[Y]=0)}const V=c.morphTargetsRelative?1:1-G;u.getUniforms().setValue(e,"morphTargetBaseInfluence",V),u.getUniforms().setValue(e,"morphTargetInfluences",i)}}}}function Ds(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(s){const o=r.render.frame,l=s.geometry,c=t.get(s,l);if(i.get(c)!==o&&(t.update(c),i.set(c,o)),s.isInstancedMesh&&(!1===s.hasEventListener("dispose",a)&&s.addEventListener("dispose",a),i.get(s)!==o&&(n.update(s.instanceMatrix,e.ARRAY_BUFFER),null!==s.instanceColor&&n.update(s.instanceColor,e.ARRAY_BUFFER),i.set(s,o))),s.isSkinnedMesh){const e=s.skeleton;i.get(e)!==o&&(e.update(),i.set(e,o))}return c},dispose:function(){i=new WeakMap}}}const Fs=new dr,Us=new mr,Ns=new vr,Os=new ja,ks=[],zs=[],Hs=new Float32Array(16),Gs=new Float32Array(9),Vs=new Float32Array(4);function Ws(e,t,n){const r=e[0];if(r<=0||r>0)return e;const i=t*n;let a=ks[i];if(void 0===a&&(a=new Float32Array(i),ks[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 js(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 Xs(e,t){for(let n=0,r=t.length;n<r;n++)e[n]=t[n]}function Js(e,t){let n=zs[t];void 0===n&&(n=new Int32Array(t),zs[t]=n);for(let r=0;r!==t;++r)n[r]=e.allocateTextureUnit();return n}function Ys(e,t){const n=this.cache;n[0]!==t&&(e.uniform1f(this.addr,t),n[0]=t)}function Ks(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(js(n,t))return;e.uniform2fv(this.addr,t),Xs(n,t)}}function qs(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(js(n,t))return;e.uniform3fv(this.addr,t),Xs(n,t)}}function Qs(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(js(n,t))return;e.uniform4fv(this.addr,t),Xs(n,t)}}function Zs(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(js(n,t))return;e.uniformMatrix2fv(this.addr,!1,t),Xs(n,t)}else{if(js(n,r))return;Vs.set(r),e.uniformMatrix2fv(this.addr,!1,Vs),Xs(n,r)}}function $s(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(js(n,t))return;e.uniformMatrix3fv(this.addr,!1,t),Xs(n,t)}else{if(js(n,r))return;Gs.set(r),e.uniformMatrix3fv(this.addr,!1,Gs),Xs(n,r)}}function eo(e,t){const n=this.cache,r=t.elements;if(void 0===r){if(js(n,t))return;e.uniformMatrix4fv(this.addr,!1,t),Xs(n,t)}else{if(js(n,r))return;Hs.set(r),e.uniformMatrix4fv(this.addr,!1,Hs),Xs(n,r)}}function to(e,t){const n=this.cache;n[0]!==t&&(e.uniform1i(this.addr,t),n[0]=t)}function no(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(js(n,t))return;e.uniform2iv(this.addr,t),Xs(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(js(n,t))return;e.uniform3iv(this.addr,t),Xs(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&&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(js(n,t))return;e.uniform4iv(this.addr,t),Xs(n,t)}}function ao(e,t){const n=this.cache;n[0]!==t&&(e.uniform1ui(this.addr,t),n[0]=t)}function so(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(js(n,t))return;e.uniform2uiv(this.addr,t),Xs(n,t)}}function oo(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(js(n,t))return;e.uniform3uiv(this.addr,t),Xs(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(js(n,t))return;e.uniform4uiv(this.addr,t),Xs(n,t)}}function co(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2D(t||Fs,i)}function uo(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture3D(t||Ns,i)}function ho(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTextureCube(t||Os,i)}function po(e,t,n){const r=this.cache,i=n.allocateTextureUnit();r[0]!==i&&(e.uniform1i(this.addr,i),r[0]=i),n.setTexture2DArray(t||Us,i)}function fo(e,t){e.uniform1fv(this.addr,t)}function mo(e,t){const n=Ws(t,this.size,2);e.uniform2fv(this.addr,n)}function go(e,t){const n=Ws(t,this.size,3);e.uniform3fv(this.addr,n)}function vo(e,t){const n=Ws(t,this.size,4);e.uniform4fv(this.addr,n)}function yo(e,t){const n=Ws(t,this.size,4);e.uniformMatrix2fv(this.addr,!1,n)}function xo(e,t){const n=Ws(t,this.size,9);e.uniformMatrix3fv(this.addr,!1,n)}function _o(e,t){const n=Ws(t,this.size,16);e.uniformMatrix4fv(this.addr,!1,n)}function bo(e,t){e.uniform1iv(this.addr,t)}function Ao(e,t){e.uniform2iv(this.addr,t)}function Mo(e,t){e.uniform3iv(this.addr,t)}function So(e,t){e.uniform4iv(this.addr,t)}function Eo(e,t){e.uniform1uiv(this.addr,t)}function wo(e,t){e.uniform2uiv(this.addr,t)}function To(e,t){e.uniform3uiv(this.addr,t)}function Co(e,t){e.uniform4uiv(this.addr,t)}function Ro(e,t,n){const r=this.cache,i=t.length,a=Js(n,i);js(r,a)||(e.uniform1iv(this.addr,a),Xs(r,a));for(let e=0;e!==i;++e)n.setTexture2D(t[e]||Fs,a[e])}function Po(e,t,n){const r=this.cache,i=t.length,a=Js(n,i);js(r,a)||(e.uniform1iv(this.addr,a),Xs(r,a));for(let e=0;e!==i;++e)n.setTexture3D(t[e]||Ns,a[e])}function Bo(e,t,n){const r=this.cache,i=t.length,a=Js(n,i);js(r,a)||(e.uniform1iv(this.addr,a),Xs(r,a));for(let e=0;e!==i;++e)n.setTextureCube(t[e]||Os,a[e])}function Lo(e,t,n){const r=this.cache,i=t.length,a=Js(n,i);js(r,a)||(e.uniform1iv(this.addr,a),Xs(r,a));for(let e=0;e!==i;++e)n.setTexture2DArray(t[e]||Us,a[e])}class Io{constructor(e,t,n){this.id=e,this.addr=n,this.cache=[],this.setValue=function(e){switch(e){case 5126:return Ys;case 35664:return Ks;case 35665:return qs;case 35666:return Qs;case 35674:return Zs;case 35675:return $s;case 35676:return eo;case 5124:case 35670:return to;case 35667:case 35671:return no;case 35668:case 35672:return ro;case 35669:case 35673:return io;case 5125:return ao;case 36294:return so;case 36295:return oo;case 36296:return lo;case 35678:case 36198:case 36298:case 36306:case 35682:return co;case 35679:case 36299:case 36307:return uo;case 35680:case 36300:case 36308:case 36293:return ho;case 36289:case 36303:case 36311:case 36292:return po}}(t.type)}}class Do{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 fo;case 35664:return mo;case 35665:return go;case 35666:return vo;case 35674:return yo;case 35675:return xo;case 35676:return _o;case 5124:case 35670:return bo;case 35667:case 35671:return Ao;case 35668:case 35672:return Mo;case 35669:case 35673:return So;case 5125:return Eo;case 36294:return wo;case 36295:return To;case 36296:return Co;case 35678:case 36198:case 36298:case 36306:case 35682:return Ro;case 35679:case 36299:case 36307:return Po;case 35680:case 36300:case 36308:case 36293:return Bo;case 36289:case 36303:case 36311:case 36292:return Lo}}(t.type)}}class Fo{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 Uo=/(\w+)(\])?(\[|\.)?/g;function No(e,t){e.seq.push(t),e.map[t.id]=t}function Oo(e,t,n){const r=e.name,i=r.length;for(Uo.lastIndex=0;;){const a=Uo.exec(r),s=Uo.lastIndex;let o=a[1];const l="]"===a[2],c=a[3];if(l&&(o|=0),void 0===c||"["===c&&s+2===i){No(n,void 0===c?new Io(o,e,t):new Do(o,e,t));break}{let e=n.map[o];void 0===e&&(e=new Fo(o),No(n,e)),n=e}}}class ko{constructor(e,t){this.seq=[],this.map={};const n=e.getProgramParameter(t,e.ACTIVE_UNIFORMS);for(let r=0;r<n;++r){const n=e.getActiveUniform(t,r);Oo(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 zo(e,t,n){const r=e.createShader(t);return e.shaderSource(r,n),e.compileShader(r),r}let Ho=0;function Go(e,t,n){const r=e.getShaderParameter(t,e.COMPILE_STATUS),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 Vo(e,t){const n=function(e){switch(e){case Gt:return["Linear","( value )"];case Ht:return["sRGB","( value )"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",e),["Linear","( value )"]}}(t);return"vec4 "+e+"( vec4 value ) { return LinearTo"+n[0]+n[1]+"; }"}function Wo(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 jo(e){return""!==e}function Xo(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 Jo(e,t){return e.replace(/NUM_CLIPPING_PLANES/g,t.numClippingPlanes).replace(/UNION_CLIPPING_PLANES/g,t.numClippingPlanes-t.numClipIntersection)}const Yo=/^[ \t]*#include +<([\w\d./]+)>/gm;function Ko(e){return e.replace(Yo,Qo)}const qo=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function Qo(e,t){let n=rs[t];if(void 0===n){const e=qo.get(t);if(void 0===e)throw new Error("Can not resolve #include <"+t+">");n=rs[e],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',t,e)}return Ko(n)}const Zo=/#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 $o(e){return e.replace(Zo,el)}function el(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 tl(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 nl(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===p&&(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),f=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.normalMapTangentSpace||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(jo).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=["#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(jo).join("\n"),x.length>0&&(x+="\n"),_=[g,"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v].filter(jo).join("\n"),_.length>0&&(_+="\n")):(x=[tl(n),"#define SHADER_TYPE "+n.shaderType,"#define SHADER_NAME "+n.shaderName,v,n.instancing?"#define USE_INSTANCING":"",n.instancingColor?"#define USE_INSTANCING_COLOR":"",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.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.displacementMap?"#define USE_DISPLACEMENTMAP":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",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.specularMap?"#define USE_SPECULARMAP":"",n.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.mapUv?"#define MAP_UV "+n.mapUv:"",n.alphaMapUv?"#define ALPHAMAP_UV "+n.alphaMapUv:"",n.lightMapUv?"#define LIGHTMAP_UV "+n.lightMapUv:"",n.aoMapUv?"#define AOMAP_UV "+n.aoMapUv:"",n.emissiveMapUv?"#define EMISSIVEMAP_UV "+n.emissiveMapUv:"",n.bumpMapUv?"#define BUMPMAP_UV "+n.bumpMapUv:"",n.normalMapUv?"#define NORMALMAP_UV "+n.normalMapUv:"",n.displacementMapUv?"#define DISPLACEMENTMAP_UV "+n.displacementMapUv:"",n.metalnessMapUv?"#define METALNESSMAP_UV "+n.metalnessMapUv:"",n.roughnessMapUv?"#define ROUGHNESSMAP_UV "+n.roughnessMapUv:"",n.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+n.anisotropyMapUv:"",n.clearcoatMapUv?"#define CLEARCOATMAP_UV "+n.clearcoatMapUv:"",n.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+n.clearcoatNormalMapUv:"",n.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+n.clearcoatRoughnessMapUv:"",n.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+n.iridescenceMapUv:"",n.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+n.iridescenceThicknessMapUv:"",n.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+n.sheenColorMapUv:"",n.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+n.sheenRoughnessMapUv:"",n.specularMapUv?"#define SPECULARMAP_UV "+n.specularMapUv:"",n.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+n.specularColorMapUv:"",n.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+n.specularIntensityMapUv:"",n.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+n.transmissionMapUv:"",n.thicknessMapUv?"#define THICKNESSMAP_UV "+n.thicknessMapUv:"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",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.useLegacyLights?"#define LEGACY_LIGHTS":"",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_UV1","\tattribute vec2 uv1;","#endif","#ifdef USE_UV2","\tattribute vec2 uv2;","#endif","#ifdef USE_UV3","\tattribute vec2 uv3;","#endif","#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(jo).join("\n"),_=[g,tl(n),"#define SHADER_TYPE "+n.shaderType,"#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 "+f:"",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.bumpMap?"#define USE_BUMPMAP":"",n.normalMap?"#define USE_NORMALMAP":"",n.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",n.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",n.emissiveMap?"#define USE_EMISSIVEMAP":"",n.anisotropy?"#define USE_ANISOTROPY":"",n.anisotropyMap?"#define USE_ANISOTROPYMAP":"",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.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",n.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",n.roughnessMap?"#define USE_ROUGHNESSMAP":"",n.metalnessMap?"#define USE_METALNESSMAP":"",n.alphaMap?"#define USE_ALPHAMAP":"",n.alphaTest?"#define USE_ALPHATEST":"",n.alphaHash?"#define USE_ALPHAHASH":"",n.sheen?"#define USE_SHEEN":"",n.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",n.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",n.transmission?"#define USE_TRANSMISSION":"",n.transmissionMap?"#define USE_TRANSMISSIONMAP":"",n.thicknessMap?"#define USE_THICKNESSMAP":"",n.vertexTangents&&!1===n.flatShading?"#define USE_TANGENT":"",n.vertexColors||n.instancingColor?"#define USE_COLOR":"",n.vertexAlphas?"#define USE_COLOR_ALPHA":"",n.vertexUv1s?"#define USE_UV1":"",n.vertexUv2s?"#define USE_UV2":"",n.vertexUv3s?"#define USE_UV3":"",n.pointsUvs?"#define USE_POINTS_UV":"",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.useLegacyLights?"#define LEGACY_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?rs.tonemapping_pars_fragment:"",n.toneMapping!==Q?Wo("toneMapping",n.toneMapping):"",n.dithering?"#define DITHERING":"",n.opaque?"#define OPAQUE":"",rs.colorspace_pars_fragment,Vo("linearToOutputTexel",n.outputColorSpace),n.useDepthPacking?"#define DEPTH_PACKING "+n.depthPacking:"","\n"].filter(jo).join("\n")),s=Ko(s),s=Xo(s,n),s=Jo(s,n),o=Ko(o),o=Xo(o,n),o=Jo(o,n),s=$o(s),o=$o(o),n.isWebGL2&&!0!==n.isRawShaderMaterial&&(b="#version 300 es\n",x=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join("\n")+"\n"+x,_=["#define varying in",n.glslVersion===En?"":"layout(location = 0) out highp vec4 pc_fragColor;",n.glslVersion===En?"":"#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 A=b+x+s,M=b+_+o,S=zo(i,i.VERTEX_SHADER,A),E=zo(i,i.FRAGMENT_SHADER,M);if(i.attachShader(y,S),i.attachShader(y,E),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 t=i.getProgramInfoLog(y).trim(),n=i.getShaderInfoLog(S).trim(),r=i.getShaderInfoLog(E).trim();let a=!0,s=!0;if(!1===i.getProgramParameter(y,i.LINK_STATUS))if(a=!1,"function"==typeof e.debug.onShaderError)e.debug.onShaderError(i,y,S,E);else{const e=Go(i,S,"vertex"),n=Go(i,E,"fragment");console.error("THREE.WebGLProgram: Shader Error "+i.getError()+" - VALIDATE_STATUS "+i.getProgramParameter(y,i.VALIDATE_STATUS)+"\n\nProgram Info Log: "+t+"\n"+e+"\n"+n)}else""!==t?console.warn("THREE.WebGLProgram: Program Info Log:",t):""!==n&&""!==r||(s=!1);s&&(this.diagnostics={runnable:a,programLog:t,vertexShader:{log:n,prefix:x},fragmentShader:{log:r,prefix:_}})}let w,T;return i.deleteShader(S),i.deleteShader(E),this.getUniforms=function(){return void 0===w&&(w=new ko(i,y)),w},this.getAttributes=function(){return void 0===T&&(T=function(e,t){const n={},r=e.getProgramParameter(t,e.ACTIVE_ATTRIBUTES);for(let i=0;i<r;i++){const r=e.getActiveAttrib(t,i),a=r.name;let s=1;r.type===e.FLOAT_MAT2&&(s=2),r.type===e.FLOAT_MAT3&&(s=3),r.type===e.FLOAT_MAT4&&(s=4),n[a]={type:r.type,location:e.getAttribLocation(t,a),locationSize:s}}return n}(i,y)),T},this.destroy=function(){r.releaseStatesOfProgram(this),i.deleteProgram(y),this.program=void 0},this.type=n.shaderType,this.name=n.shaderName,this.id=Ho++,this.cacheKey=t,this.usedTimes=1,this.program=y,this.vertexShader=S,this.fragmentShader=E,this}let rl=0;class il{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 al(e),t.set(e,n)),n}}class al{constructor(e){this.id=rl++,this.code=e,this.usedTimes=0}}function sl(e,t,n,r,i,a,s){const o=new li,l=new il,c=[],u=i.isWebGL2,h=i.logarithmicDepthBuffer,d=i.vertexTextures;let p=i.precision;const f={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"};function v(e){return 0===e?"uv":`uv${e}`}return{getParameters:function(a,o,c,y,_){const b=y.fog,A=_.geometry,M=a.isMeshStandardMaterial?y.environment:null,S=(a.isMeshStandardMaterial?n:t).get(a.envMap||M),E=S&&S.mapping===le?S.image.height:null,w=f[a.type];null!==a.precision&&(p=i.getMaxPrecision(a.precision),p!==a.precision&&console.warn("THREE.WebGLProgram.getParameters:",a.precision,"not supported, using",p,"instead."));const T=A.morphAttributes.position||A.morphAttributes.normal||A.morphAttributes.color,C=void 0!==T?T.length:0;let R,P,B,L,I=0;if(void 0!==A.morphAttributes.position&&(I=1),void 0!==A.morphAttributes.normal&&(I=2),void 0!==A.morphAttributes.color&&(I=3),w){const e=as[w];R=e.vertexShader,P=e.fragmentShader}else R=a.vertexShader,P=a.fragmentShader,l.update(a),B=l.getVertexShaderID(a),L=l.getFragmentShaderID(a);const D=e.getRenderTarget(),F=!0===_.isInstancedMesh,U=!!a.map,N=!!a.matcap,O=!!S,k=!!a.aoMap,z=!!a.lightMap,H=!!a.bumpMap,G=!!a.normalMap,V=!!a.displacementMap,W=!!a.emissiveMap,j=!!a.metalnessMap,X=!!a.roughnessMap,J=a.anisotropy>0,Y=a.clearcoat>0,K=a.iridescence>0,q=a.sheen>0,Z=a.transmission>0,$=J&&!!a.anisotropyMap,ee=Y&&!!a.clearcoatMap,te=Y&&!!a.clearcoatNormalMap,ne=Y&&!!a.clearcoatRoughnessMap,re=K&&!!a.iridescenceMap,ie=K&&!!a.iridescenceThicknessMap,ae=q&&!!a.sheenColorMap,se=q&&!!a.sheenRoughnessMap,oe=!!a.specularMap,ce=!!a.specularColorMap,ue=!!a.specularIntensityMap,he=Z&&!!a.transmissionMap,de=Z&&!!a.thicknessMap,pe=!!a.gradientMap,fe=!!a.alphaMap,me=a.alphaTest>0,ge=!!a.alphaHash,ve=!!a.extensions,ye=!!A.attributes.uv1,xe=!!A.attributes.uv2,_e=!!A.attributes.uv3;return{isWebGL2:u,shaderID:w,shaderType:a.type,shaderName:a.name,vertexShader:R,fragmentShader:P,defines:a.defines,customVertexShaderID:B,customFragmentShaderID:L,isRawShaderMaterial:!0===a.isRawShaderMaterial,glslVersion:a.glslVersion,precision:p,instancing:F,instancingColor:F&&null!==_.instanceColor,supportsVertexTextures:d,outputColorSpace:null===D?e.outputColorSpace:!0===D.isXRRenderTarget?D.texture.colorSpace:Gt,map:U,matcap:N,envMap:O,envMapMode:O&&S.mapping,envMapCubeUVHeight:E,aoMap:k,lightMap:z,bumpMap:H,normalMap:G,displacementMap:d&&V,emissiveMap:W,normalMapObjectSpace:G&&a.normalMapType===kt,normalMapTangentSpace:G&&a.normalMapType===Ot,metalnessMap:j,roughnessMap:X,anisotropy:J,anisotropyMap:$,clearcoat:Y,clearcoatMap:ee,clearcoatNormalMap:te,clearcoatRoughnessMap:ne,iridescence:K,iridescenceMap:re,iridescenceThicknessMap:ie,sheen:q,sheenColorMap:ae,sheenRoughnessMap:se,specularMap:oe,specularColorMap:ce,specularIntensityMap:ue,transmission:Z,transmissionMap:he,thicknessMap:de,gradientMap:pe,opaque:!1===a.transparent&&a.blending===x,alphaMap:fe,alphaTest:me,alphaHash:ge,combine:a.combine,mapUv:U&&v(a.map.channel),aoMapUv:k&&v(a.aoMap.channel),lightMapUv:z&&v(a.lightMap.channel),bumpMapUv:H&&v(a.bumpMap.channel),normalMapUv:G&&v(a.normalMap.channel),displacementMapUv:V&&v(a.displacementMap.channel),emissiveMapUv:W&&v(a.emissiveMap.channel),metalnessMapUv:j&&v(a.metalnessMap.channel),roughnessMapUv:X&&v(a.roughnessMap.channel),anisotropyMapUv:$&&v(a.anisotropyMap.channel),clearcoatMapUv:ee&&v(a.clearcoatMap.channel),clearcoatNormalMapUv:te&&v(a.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:ne&&v(a.clearcoatRoughnessMap.channel),iridescenceMapUv:re&&v(a.iridescenceMap.channel),iridescenceThicknessMapUv:ie&&v(a.iridescenceThicknessMap.channel),sheenColorMapUv:ae&&v(a.sheenColorMap.channel),sheenRoughnessMapUv:se&&v(a.sheenRoughnessMap.channel),specularMapUv:oe&&v(a.specularMap.channel),specularColorMapUv:ce&&v(a.specularColorMap.channel),specularIntensityMapUv:ue&&v(a.specularIntensityMap.channel),transmissionMapUv:he&&v(a.transmissionMap.channel),thicknessMapUv:de&&v(a.thicknessMap.channel),alphaMapUv:fe&&v(a.alphaMap.channel),vertexTangents:!!A.attributes.tangent&&(G||J),vertexColors:a.vertexColors,vertexAlphas:!0===a.vertexColors&&!!A.attributes.color&&4===A.attributes.color.itemSize,vertexUv1s:ye,vertexUv2s:xe,vertexUv3s:_e,pointsUvs:!0===_.isPoints&&!!A.attributes.uv&&(U||fe),fog:!!b,useFog:!0===a.fog,fogExp2:b&&b.isFogExp2,flatShading:!0===a.flatShading,sizeAttenuation:!0===a.sizeAttenuation,logarithmicDepthBuffer:h,skinning:!0===_.isSkinnedMesh,morphTargets:void 0!==A.morphAttributes.position,morphNormals:void 0!==A.morphAttributes.normal,morphColors:void 0!==A.morphAttributes.color,morphTargetsCount:C,morphTextureStride:I,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&&c.length>0,shadowMapType:e.shadowMap.type,toneMapping:a.toneMapped?e.toneMapping:Q,useLegacyLights:e.useLegacyLights,premultipliedAlpha:a.premultipliedAlpha,doubleSided:a.side===g,flipSided:a.side===m,useDepthPacking:a.depthPacking>=0,depthPacking:a.depthPacking||0,index0AttributeName:a.index0AttributeName,extensionDerivatives:ve&&!0===a.extensions.derivatives,extensionFragDepth:ve&&!0===a.extensions.fragDepth,extensionDrawBuffers:ve&&!0===a.extensions.drawBuffers,extensionShaderTextureLOD:ve&&!0===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.outputColorSpace),e.push(t.envMapMode),e.push(t.envMapCubeUVHeight),e.push(t.mapUv),e.push(t.alphaMapUv),e.push(t.lightMapUv),e.push(t.aoMapUv),e.push(t.bumpMapUv),e.push(t.normalMapUv),e.push(t.displacementMapUv),e.push(t.emissiveMapUv),e.push(t.metalnessMapUv),e.push(t.roughnessMapUv),e.push(t.anisotropyMapUv),e.push(t.clearcoatMapUv),e.push(t.clearcoatNormalMapUv),e.push(t.clearcoatRoughnessMapUv),e.push(t.iridescenceMapUv),e.push(t.iridescenceThicknessMapUv),e.push(t.sheenColorMapUv),e.push(t.sheenRoughnessMapUv),e.push(t.specularMapUv),e.push(t.specularColorMapUv),e.push(t.specularIntensityMapUv),e.push(t.transmissionMapUv),e.push(t.thicknessMapUv),e.push(t.combine),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.matcap&&o.enable(4),t.envMap&&o.enable(5),t.normalMapObjectSpace&&o.enable(6),t.normalMapTangentSpace&&o.enable(7),t.clearcoat&&o.enable(8),t.iridescence&&o.enable(9),t.alphaTest&&o.enable(10),t.vertexColors&&o.enable(11),t.vertexAlphas&&o.enable(12),t.vertexUv1s&&o.enable(13),t.vertexUv2s&&o.enable(14),t.vertexUv3s&&o.enable(15),t.vertexTangents&&o.enable(16),t.anisotropy&&o.enable(17),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.useLegacyLights&&o.enable(10),t.doubleSided&&o.enable(11),t.flipSided&&o.enable(12),t.useDepthPacking&&o.enable(13),t.dithering&&o.enable(14),t.transmission&&o.enable(15),t.sheen&&o.enable(16),t.opaque&&o.enable(17),t.pointsUvs&&o.enable(18),e.push(o.mask)}(n,t),n.push(e.outputColorSpace)),n.push(t.customProgramCacheKey),n.join()},getUniforms:function(e){const t=f[e.type];let n;if(t){const e=as[t];n=ka.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 nl(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 ol(){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 ll(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 cl(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 ul(){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,c){const u=a(e,t,s,o,l,c);s.transmission>0?r.push(u):!0===s.transparent?i.push(u):n.push(u)},unshift:function(e,t,s,o,l,c){const u=a(e,t,s,o,l,c);s.transmission>0?r.unshift(u):!0===s.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||ll),r.length>1&&r.sort(t||cl),i.length>1&&i.sort(t||cl)}}}function hl(){let e=new WeakMap;return{get:function(t,n){const r=e.get(t);let i;return void 0===r?(i=new ul,e.set(t,[i])):n>=r.length?(i=new ul,r.push(i)):i=r[n],i},dispose:function(){e=new WeakMap}}}function dl(){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 br,color:new Hi};break;case"SpotLight":n={position:new br,direction:new br,color:new Hi,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":n={position:new br,color:new Hi,distance:0,decay:0};break;case"HemisphereLight":n={direction:new br,skyColor:new Hi,groundColor:new Hi};break;case"RectAreaLight":n={color:new Hi,position:new br,halfWidth:new br,halfHeight:new br}}return e[t.id]=n,n}}}let pl=0;function fl(e,t){return(t.castShadow?2:0)-(e.castShadow?2:0)+(t.map?1:0)-(e.map?1:0)}function ml(e,t){const n=new dl,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 Wn};break;case"PointLight":n={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new Wn,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 br);const a=new br,s=new Qr,o=new Qr;return{setup:function(a,s){let o=0,l=0,c=0;for(let e=0;e<9;e++)i.probe[e].set(0,0,0);let u=0,h=0,d=0,p=0,f=0,m=0,g=0,v=0,y=0,x=0;a.sort(fl);const _=!0===s?Math.PI:1;for(let e=0,t=a.length;e<t;e++){const t=a[e],s=t.color,b=t.intensity,A=t.distance,M=t.shadow&&t.shadow.map?t.shadow.map.texture:null;if(t.isAmbientLight)o+=s.r*b*_,l+=s.g*b*_,c+=s.b*b*_;else if(t.isLightProbe)for(let e=0;e<9;e++)i.probe[e].addScaledVector(t.sh.coefficients[e],b);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(s).multiplyScalar(b*_),e.distance=A,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(b),e.halfWidth.set(.5*t.width,0,0),e.halfHeight.set(0,.5*t.height,0),i.rectArea[p]=e,p++}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[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[f]=e,f++}}p>0&&(t.isWebGL2||!0===e.has("OES_texture_float_linear")?(i.rectAreaLTC1=is.LTC_FLOAT_1,i.rectAreaLTC2=is.LTC_FLOAT_2):!0===e.has("OES_texture_half_float_linear")?(i.rectAreaLTC1=is.LTC_HALF_1,i.rectAreaLTC2=is.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]=c;const b=i.hash;b.directionalLength===u&&b.pointLength===h&&b.spotLength===d&&b.rectAreaLength===p&&b.hemiLength===f&&b.numDirectionalShadows===m&&b.numPointShadows===g&&b.numSpotShadows===v&&b.numSpotMaps===y||(i.directional.length=u,i.spot.length=d,i.rectArea.length=p,i.point.length=h,i.hemi.length=f,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,b.directionalLength=u,b.pointLength=h,b.spotLength=d,b.rectAreaLength=p,b.hemiLength=f,b.numDirectionalShadows=m,b.numPointShadows=g,b.numSpotShadows=v,b.numSpotMaps=y,i.version=pl++)},setupView:function(e,t){let n=0,r=0,l=0,c=0,u=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[c];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),c++}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[u];e.direction.setFromMatrixPosition(d.matrixWorld),e.direction.transformDirection(h),u++}}},state:i}}function gl(e,t){const n=new ml(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 vl(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 gl(e,t),n.set(r,[s])):i>=a.length?(s=new gl(e,t),a.push(s)):s=a[i],s},dispose:function(){n=new WeakMap}}}class yl extends Ui{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=Ut,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 xl extends Ui{constructor(e){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",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.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}}function _l(e,t,n){let r=new $a;const i=new Wn,a=new Wn,s=new pr,o=new yl({depthPacking:Nt}),l=new xl,c={},u=n.maxTextureSize,d={[f]:m,[m]:f,[g]:g},v=new za({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new Wn},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 _=new ma;_.setAttribute("position",new Qi(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const b=new Ia(_,v),A=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=h;let M=this.type;function S(n,r){const a=t.update(b);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 fr(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,b,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,b,null)}function E(t,n,r,i){let a=null;const s=!0===r.isPointLight?t.customDistanceMaterial:t.customDepthMaterial;if(void 0!==s)a=s;else if(a=!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=a.uuid,t=n.uuid;let r=c[e];void 0===r&&(r={},c[e]=r);let i=r[t];void 0===i&&(i=a.clone(),r[t]=i),a=i}return a.visible=n.visible,a.wireframe=n.wireframe,a.side=i===p?null!==n.shadowSide?n.shadowSide:n.side:null!==n.shadowSide?n.shadowSide:d[n.side],a.alphaMap=n.alphaMap,a.alphaTest=n.alphaTest,a.map=n.map,a.clipShadows=n.clipShadows,a.clippingPlanes=n.clippingPlanes,a.clipIntersection=n.clipIntersection,a.displacementMap=n.displacementMap,a.displacementScale=n.displacementScale,a.displacementBias=n.displacementBias,a.wireframeLinewidth=n.wireframeLinewidth,a.linewidth=n.linewidth,!0===r.isPointLight&&!0===a.isMeshDistanceMaterial&&(e.properties.get(a).light=r),a}function w(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===p)&&(!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=E(n,u,s,o);e.renderBufferDirect(a,null,r,t,n,c)}}}else if(i.visible){const t=E(n,i,s,o);e.renderBufferDirect(a,null,r,t,n,null)}}const l=n.children;for(let e=0,t=l.length;e<t;e++)w(l[e],i,a,s,o)}this.render=function(t,n,o){if(!1===A.enabled)return;if(!1===A.autoUpdate&&!1===A.needsUpdate)return;if(0===t.length)return;const l=e.getRenderTarget(),c=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);const f=M!==p&&this.type===p,m=M===p&&this.type!==p;for(let l=0,c=t.length;l<c;l++){const c=t[l],h=c.shadow;if(void 0===h){console.warn("THREE.WebGLShadowMap:",c,"has no shadow.");continue}if(!1===h.autoUpdate&&!1===h.needsUpdate)continue;i.copy(h.mapSize);const g=h.getFrameExtents();if(i.multiply(g),a.copy(h.mapSize),(i.x>u||i.y>u)&&(i.x>u&&(a.x=Math.floor(u/g.x),i.x=a.x*g.x,h.mapSize.x=a.x),i.y>u&&(a.y=Math.floor(u/g.y),i.y=a.y*g.y,h.mapSize.y=a.y)),null===h.map||!0===f||!0===m){const e=this.type!==p?{minFilter:de,magFilter:de}:{};null!==h.map&&h.map.dispose(),h.map=new fr(i.x,i.y,e),h.map.texture.name=c.name+".shadowMap",h.camera.updateProjectionMatrix()}e.setRenderTarget(h.map),e.clear();const v=h.getViewportCount();for(let e=0;e<v;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(c,e),r=h.getFrustum(),w(n,o,h.camera,c,this.type)}!0!==h.isPointLightShadow&&this.type===p&&S(h,o),h.needsUpdate=!1}M=this.type,A.needsUpdate=!1,e.setRenderTarget(l,c,h)}}function bl(e,t,n){const r=n.isWebGL2,i=new function(){let t=!1;const n=new pr;let r=null;const i=new pr(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(t){t?be(e.DEPTH_TEST):Ae(e.DEPTH_TEST)},setMask:function(r){n===r||t||(e.depthMask(r),n=r)},setFunc:function(t){if(r!==t){switch(t){case z:e.depthFunc(e.NEVER);break;case H:e.depthFunc(e.ALWAYS);break;case G:e.depthFunc(e.LESS);break;case V:e.depthFunc(e.LEQUAL);break;case W:e.depthFunc(e.EQUAL);break;case j:e.depthFunc(e.GEQUAL);break;case X:e.depthFunc(e.GREATER);break;case J:e.depthFunc(e.NOTEQUAL);break;default:e.depthFunc(e.LEQUAL)}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,s=null,o=null,l=null,c=null;return{setTest:function(n){t||(n?be(e.STENCIL_TEST):Ae(e.STENCIL_TEST))},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){c!==t&&(e.clearStencil(t),c=t)},reset:function(){t=!1,n=null,r=null,i=null,a=null,s=null,o=null,l=null,c=null}}},u=new WeakMap,h=new WeakMap;let d={},p={},f=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 ce=e.getParameter(e.MAX_COMBINED_TEXTURE_IMAGE_UNITS);let ue=!1,he=0;const de=e.getParameter(e.VERSION);-1!==de.indexOf("WebGL")?(he=parseFloat(/^WebGL (\d)/.exec(de)[1]),ue=he>=1):-1!==de.indexOf("OpenGL ES")&&(he=parseFloat(/^OpenGL ES (\d)/.exec(de)[1]),ue=he>=2);let pe=null,fe={};const me=e.getParameter(e.SCISSOR_BOX),ge=e.getParameter(e.VIEWPORT),ve=(new pr).fromArray(me),ye=(new pr).fromArray(ge);function xe(t,n,i,a){const s=new Uint8Array(4),o=e.createTexture();e.bindTexture(t,o),e.texParameteri(t,e.TEXTURE_MIN_FILTER,e.NEAREST),e.texParameteri(t,e.TEXTURE_MAG_FILTER,e.NEAREST);for(let o=0;o<i;o++)!r||t!==e.TEXTURE_3D&&t!==e.TEXTURE_2D_ARRAY?e.texImage2D(n+o,0,e.RGBA,1,1,0,e.RGBA,e.UNSIGNED_BYTE,s):e.texImage3D(n,0,e.RGBA,1,1,a,0,e.RGBA,e.UNSIGNED_BYTE,s);return o}const _e={};function be(t){!0!==d[t]&&(e.enable(t),d[t]=!0)}function Ae(t){!1!==d[t]&&(e.disable(t),d[t]=!1)}_e[e.TEXTURE_2D]=xe(e.TEXTURE_2D,e.TEXTURE_2D,1),_e[e.TEXTURE_CUBE_MAP]=xe(e.TEXTURE_CUBE_MAP,e.TEXTURE_CUBE_MAP_POSITIVE_X,6),r&&(_e[e.TEXTURE_2D_ARRAY]=xe(e.TEXTURE_2D_ARRAY,e.TEXTURE_2D_ARRAY,1,1),_e[e.TEXTURE_3D]=xe(e.TEXTURE_3D,e.TEXTURE_3D,1,1)),i.setClear(0,0,0,1),a.setClear(1),c.setClear(0),be(e.DEPTH_TEST),a.setFunc(V),we(!1),Te(o),be(e.CULL_FACE),Ee(y);const Me={[S]:e.FUNC_ADD,[E]:e.FUNC_SUBTRACT,[w]:e.FUNC_REVERSE_SUBTRACT};if(r)Me[T]=e.MIN,Me[C]=e.MAX;else{const e=t.get("EXT_blend_minmax");null!==e&&(Me[T]=e.MIN_EXT,Me[C]=e.MAX_EXT)}const Se={[R]:e.ZERO,[P]:e.ONE,[B]:e.SRC_COLOR,[I]:e.SRC_ALPHA,[k]:e.SRC_ALPHA_SATURATE,[N]:e.DST_COLOR,[F]:e.DST_ALPHA,[L]:e.ONE_MINUS_SRC_COLOR,[D]:e.ONE_MINUS_SRC_ALPHA,[O]:e.ONE_MINUS_DST_COLOR,[U]:e.ONE_MINUS_DST_ALPHA};function Ee(t,n,r,i,a,s,o,l){if(t!==y){if(!1===K&&(be(e.BLEND),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(e.FUNC_ADD),Q=S,ee=S),l)switch(t){case x:e.blendFuncSeparate(e.ONE,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case _:e.blendFunc(e.ONE,e.ONE);break;case b:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case A:e.blendFuncSeparate(e.ZERO,e.SRC_COLOR,e.ZERO,e.SRC_ALPHA);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}else switch(t){case x:e.blendFuncSeparate(e.SRC_ALPHA,e.ONE_MINUS_SRC_ALPHA,e.ONE,e.ONE_MINUS_SRC_ALPHA);break;case _:e.blendFunc(e.SRC_ALPHA,e.ONE);break;case b:e.blendFuncSeparate(e.ZERO,e.ONE_MINUS_SRC_COLOR,e.ZERO,e.ONE);break;case A:e.blendFunc(e.ZERO,e.SRC_COLOR);break;default:console.error("THREE.WebGLState: Invalid blending: ",t)}Z=null,$=null,te=null,ne=null,q=t,re=l}}else!0===K&&(Ae(e.BLEND),K=!1)}function we(t){ie!==t&&(t?e.frontFace(e.CW):e.frontFace(e.CCW),ie=t)}function Te(t){t!==s?(be(e.CULL_FACE),t!==ae&&(t===o?e.cullFace(e.BACK):t===l?e.cullFace(e.FRONT):e.cullFace(e.FRONT_AND_BACK))):Ae(e.CULL_FACE),ae=t}function Ce(t,n,r){t?(be(e.POLYGON_OFFSET_FILL),oe===n&&le===r||(e.polygonOffset(n,r),oe=n,le=r)):Ae(e.POLYGON_OFFSET_FILL)}return{buffers:{color:i,depth:a,stencil:c},enable:be,disable:Ae,bindFramebuffer:function(t,n){return p[t]!==n&&(e.bindFramebuffer(t,n),p[t]=n,r&&(t===e.DRAW_FRAMEBUFFER&&(p[e.FRAMEBUFFER]=n),t===e.FRAMEBUFFER&&(p[e.DRAW_FRAMEBUFFER]=n)),!0)},drawBuffers:function(r,i){let a=v,s=!1;if(r)if(a=f.get(i),void 0===a&&(a=[],f.set(i,a)),r.isWebGLMultipleRenderTargets){const t=r.texture;if(a.length!==t.length||a[0]!==e.COLOR_ATTACHMENT0){for(let n=0,r=t.length;n<r;n++)a[n]=e.COLOR_ATTACHMENT0+n;a.length=t.length,s=!0}}else a[0]!==e.COLOR_ATTACHMENT0&&(a[0]=e.COLOR_ATTACHMENT0,s=!0);else a[0]!==e.BACK&&(a[0]=e.BACK,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:Ee,setMaterial:function(t,n){t.side===g?Ae(e.CULL_FACE):be(e.CULL_FACE);let r=t.side===m;n&&(r=!r),we(r),t.blending===x&&!1===t.transparent?Ee(y):Ee(t.blending,t.blendEquation,t.blendSrc,t.blendDst,t.blendEquationAlpha,t.blendSrcAlpha,t.blendDstAlpha,t.premultipliedAlpha),a.setFunc(t.depthFunc),a.setTest(t.depthTest),a.setMask(t.depthWrite),i.setMask(t.colorWrite);const s=t.stencilWrite;c.setTest(s),s&&(c.setMask(t.stencilWriteMask),c.setFunc(t.stencilFunc,t.stencilRef,t.stencilFuncMask),c.setOp(t.stencilFail,t.stencilZFail,t.stencilZPass)),Ce(t.polygonOffset,t.polygonOffsetFactor,t.polygonOffsetUnits),!0===t.alphaToCoverage?be(e.SAMPLE_ALPHA_TO_COVERAGE):Ae(e.SAMPLE_ALPHA_TO_COVERAGE)},setFlipSided:we,setCullFace:Te,setLineWidth:function(t){t!==se&&(ue&&e.lineWidth(t),se=t)},setPolygonOffset:Ce,setScissorTest:function(t){t?be(e.SCISSOR_TEST):Ae(e.SCISSOR_TEST)},activeTexture:function(t){void 0===t&&(t=e.TEXTURE0+ce-1),pe!==t&&(e.activeTexture(t),pe=t)},bindTexture:function(t,n,r){void 0===r&&(r=null===pe?e.TEXTURE0+ce-1:pe);let i=fe[r];void 0===i&&(i={type:void 0,texture:void 0},fe[r]=i),i.type===t&&i.texture===n||(pe!==r&&(e.activeTexture(r),pe=r),e.bindTexture(t,n||_e[t]),i.type=t,i.texture=n)},unbindTexture:function(){const t=fe[pe];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);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(e.BLEND),e.disable(e.CULL_FACE),e.disable(e.DEPTH_TEST),e.disable(e.POLYGON_OFFSET_FILL),e.disable(e.SCISSOR_TEST),e.disable(e.STENCIL_TEST),e.disable(e.SAMPLE_ALPHA_TO_COVERAGE),e.blendEquation(e.FUNC_ADD),e.blendFunc(e.ONE,e.ZERO),e.blendFuncSeparate(e.ONE,e.ZERO,e.ONE,e.ZERO),e.colorMask(!0,!0,!0,!0),e.clearColor(0,0,0,0),e.depthMask(!0),e.depthFunc(e.LESS),e.clearDepth(1),e.stencilMask(4294967295),e.stencilFunc(e.ALWAYS,0,4294967295),e.stencilOp(e.KEEP,e.KEEP,e.KEEP),e.clearStencil(0),e.cullFace(e.BACK),e.frontFace(e.CCW),e.polygonOffset(0,0),e.activeTexture(e.TEXTURE0),e.bindFramebuffer(e.FRAMEBUFFER,null),!0===r&&(e.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),e.bindFramebuffer(e.READ_FRAMEBUFFER,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={},pe=null,fe={},p={},f=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(),c.reset()}}}function Al(e,t,n,r,i,a,s){const o=i.isWebGL2,l=i.maxTextures,c=i.maxCubemapSize,u=i.maxTextureSize,h=i.maxSamples,d=t.has("WEBGL_multisampled_render_to_texture")?t.get("WEBGL_multisampled_render_to_texture"):null,p="undefined"!=typeof navigator&&/OculusBrowser/g.test(navigator.userAgent),f=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):qn("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?zn: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 _(e){return On(e.width)&&On(e.height)}function b(e,t){return e.generateMipmaps&&t&&e.minFilter!==de&&e.minFilter!==ve}function A(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 r===e.RED&&(i===e.FLOAT&&(l=e.R32F),i===e.HALF_FLOAT&&(l=e.R16F),i===e.UNSIGNED_BYTE&&(l=e.R8)),r===e.RG&&(i===e.FLOAT&&(l=e.RG32F),i===e.HALF_FLOAT&&(l=e.RG16F),i===e.UNSIGNED_BYTE&&(l=e.RG8)),r===e.RGBA&&(i===e.FLOAT&&(l=e.RGBA32F),i===e.HALF_FLOAT&&(l=e.RGBA16F),i===e.UNSIGNED_BYTE&&(l=a===Ht&&!1===s?e.SRGB8_ALPHA8:e.RGBA8),i===e.UNSIGNED_SHORT_4_4_4_4&&(l=e.RGBA4),i===e.UNSIGNED_SHORT_5_5_5_1&&(l=e.RGB5_A1)),l!==e.R16F&&l!==e.R32F&&l!==e.RG16F&&l!==e.RG32F&&l!==e.RGBA16F&&l!==e.RGBA32F||t.get("EXT_color_buffer_float"),l}function S(e,t,n){return!0===b(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 E(t){return t===de||t===pe||t===me?e.NEAREST:e.LINEAR}function w(e){const t=e.target;t.removeEventListener("dispose",w),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&&C(e),0===Object.keys(i).length&&g.delete(n)}r.remove(e)}(t),t.isVideoTexture&&f.delete(t)}function T(t){const n=t.target;n.removeEventListener("dispose",T),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 C(t){const n=r.get(t);e.deleteTexture(n.__webglTexture);const i=t.source;delete g.get(i)[n.__cacheKey],s.memory.textures--}let R=0;function P(t,i){const a=r.get(t);if(t.isVideoTexture&&function(e){const t=s.render.frame;f.get(e)!==t&&(f.set(e,t),e.update())}(t),!1===t.isRenderTargetTexture&&t.version>0&&a.__version!==t.version){const e=t.image;if(null===e)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else{if(!1!==e.complete)return void U(a,t,i);console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete")}}n.bindTexture(e.TEXTURE_2D,a.__webglTexture,e.TEXTURE0+i)}const B={[ce]:e.REPEAT,[ue]:e.CLAMP_TO_EDGE,[he]:e.MIRRORED_REPEAT},L={[de]:e.NEAREST,[pe]:e.NEAREST_MIPMAP_NEAREST,[me]:e.NEAREST_MIPMAP_LINEAR,[ve]:e.LINEAR,[ye]:e.LINEAR_MIPMAP_NEAREST,[_e]:e.LINEAR_MIPMAP_LINEAR},I={[on]:e.NEVER,[fn]:e.ALWAYS,[ln]:e.LESS,[un]:e.LEQUAL,[cn]:e.EQUAL,[pn]:e.GEQUAL,[hn]:e.GREATER,[dn]:e.NOTEQUAL};function D(n,a,s){if(s?(e.texParameteri(n,e.TEXTURE_WRAP_S,B[a.wrapS]),e.texParameteri(n,e.TEXTURE_WRAP_T,B[a.wrapT]),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,B[a.wrapR]),e.texParameteri(n,e.TEXTURE_MAG_FILTER,L[a.magFilter]),e.texParameteri(n,e.TEXTURE_MIN_FILTER,L[a.minFilter])):(e.texParameteri(n,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(n,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),n!==e.TEXTURE_3D&&n!==e.TEXTURE_2D_ARRAY||e.texParameteri(n,e.TEXTURE_WRAP_R,e.CLAMP_TO_EDGE),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,e.TEXTURE_MAG_FILTER,E(a.magFilter)),e.texParameteri(n,e.TEXTURE_MIN_FILTER,E(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.")),a.compareFunction&&(e.texParameteri(n,e.TEXTURE_COMPARE_MODE,e.COMPARE_REF_TO_TEXTURE),e.texParameteri(n,e.TEXTURE_COMPARE_FUNC,I[a.compareFunction])),!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!==_e)return;if(a.type===Ce&&!1===t.has("OES_texture_float_linear"))return;if(!1===o&&a.type===Re&&!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 F(t,n){let r=!1;void 0===t.__webglInit&&(t.__webglInit=!0,n.addEventListener("dispose",w));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.colorSpace),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&&C(n)),t.__cacheKey=o,t.__webglTexture=a[o].texture}return r}function U(t,i,s){let l=e.TEXTURE_2D;(i.isDataArrayTexture||i.isCompressedArrayTexture)&&(l=e.TEXTURE_2D_ARRAY),i.isData3DTexture&&(l=e.TEXTURE_3D);const c=F(t,i),h=i.source;n.bindTexture(l,t.__webglTexture,e.TEXTURE0+s);const d=r.get(h);if(h.version!==d.__version||!0===c){n.activeTexture(e.TEXTURE0+s),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);const t=function(e){return!o&&(e.wrapS!==ue||e.wrapT!==ue||e.minFilter!==de&&e.minFilter!==ve)}(i)&&!1===_(i.image);let r=x(i.image,t,!1,u);r=G(i,r);const p=_(r)||o,f=a.convert(i.format,i.colorSpace);let m,g=a.convert(i.type),v=M(i.internalFormat,f,g,i.colorSpace);D(l,i,p);const y=i.mipmaps,E=o&&!0!==i.isVideoTexture,w=void 0===d.__version||!0===c,T=S(i,r,p);if(i.isDepthTexture)v=e.DEPTH_COMPONENT,o?v=i.type===Ce?e.DEPTH_COMPONENT32F:i.type===Te?e.DEPTH_COMPONENT24:i.type===Le?e.DEPTH24_STENCIL8:e.DEPTH_COMPONENT16:i.type===Ce&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),i.format===Ne&&v===e.DEPTH_COMPONENT&&i.type!==Ee&&i.type!==Te&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),i.type=Te,g=a.convert(i.type)),i.format===Oe&&v===e.DEPTH_COMPONENT&&(v=e.DEPTH_STENCIL,i.type!==Le&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),i.type=Le,g=a.convert(i.type))),w&&(E?n.texStorage2D(e.TEXTURE_2D,1,v,r.width,r.height):n.texImage2D(e.TEXTURE_2D,0,v,r.width,r.height,0,f,g,null));else if(i.isDataTexture)if(y.length>0&&p){E&&w&&n.texStorage2D(e.TEXTURE_2D,T,v,y[0].width,y[0].height);for(let t=0,r=y.length;t<r;t++)m=y[t],E?n.texSubImage2D(e.TEXTURE_2D,t,0,0,m.width,m.height,f,g,m.data):n.texImage2D(e.TEXTURE_2D,t,v,m.width,m.height,0,f,g,m.data);i.generateMipmaps=!1}else E?(w&&n.texStorage2D(e.TEXTURE_2D,T,v,r.width,r.height),n.texSubImage2D(e.TEXTURE_2D,0,0,0,r.width,r.height,f,g,r.data)):n.texImage2D(e.TEXTURE_2D,0,v,r.width,r.height,0,f,g,r.data);else if(i.isCompressedTexture)if(i.isCompressedArrayTexture){E&&w&&n.texStorage3D(e.TEXTURE_2D_ARRAY,T,v,y[0].width,y[0].height,r.depth);for(let t=0,a=y.length;t<a;t++)m=y[t],i.format!==De?null!==f?E?n.compressedTexSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,m.width,m.height,r.depth,f,m.data,0,0):n.compressedTexImage3D(e.TEXTURE_2D_ARRAY,t,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()"):E?n.texSubImage3D(e.TEXTURE_2D_ARRAY,t,0,0,0,m.width,m.height,r.depth,f,g,m.data):n.texImage3D(e.TEXTURE_2D_ARRAY,t,v,m.width,m.height,r.depth,0,f,g,m.data)}else{E&&w&&n.texStorage2D(e.TEXTURE_2D,T,v,y[0].width,y[0].height);for(let t=0,r=y.length;t<r;t++)m=y[t],i.format!==De?null!==f?E?n.compressedTexSubImage2D(e.TEXTURE_2D,t,0,0,m.width,m.height,f,m.data):n.compressedTexImage2D(e.TEXTURE_2D,t,v,m.width,m.height,0,m.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):E?n.texSubImage2D(e.TEXTURE_2D,t,0,0,m.width,m.height,f,g,m.data):n.texImage2D(e.TEXTURE_2D,t,v,m.width,m.height,0,f,g,m.data)}else if(i.isDataArrayTexture)E?(w&&n.texStorage3D(e.TEXTURE_2D_ARRAY,T,v,r.width,r.height,r.depth),n.texSubImage3D(e.TEXTURE_2D_ARRAY,0,0,0,0,r.width,r.height,r.depth,f,g,r.data)):n.texImage3D(e.TEXTURE_2D_ARRAY,0,v,r.width,r.height,r.depth,0,f,g,r.data);else if(i.isData3DTexture)E?(w&&n.texStorage3D(e.TEXTURE_3D,T,v,r.width,r.height,r.depth),n.texSubImage3D(e.TEXTURE_3D,0,0,0,0,r.width,r.height,r.depth,f,g,r.data)):n.texImage3D(e.TEXTURE_3D,0,v,r.width,r.height,r.depth,0,f,g,r.data);else if(i.isFramebufferTexture){if(w)if(E)n.texStorage2D(e.TEXTURE_2D,T,v,r.width,r.height);else{let t=r.width,i=r.height;for(let r=0;r<T;r++)n.texImage2D(e.TEXTURE_2D,r,v,t,i,0,f,g,null),t>>=1,i>>=1}}else if(y.length>0&&p){E&&w&&n.texStorage2D(e.TEXTURE_2D,T,v,y[0].width,y[0].height);for(let t=0,r=y.length;t<r;t++)m=y[t],E?n.texSubImage2D(e.TEXTURE_2D,t,0,0,f,g,m):n.texImage2D(e.TEXTURE_2D,t,v,f,g,m);i.generateMipmaps=!1}else E?(w&&n.texStorage2D(e.TEXTURE_2D,T,v,r.width,r.height),n.texSubImage2D(e.TEXTURE_2D,0,0,0,f,g,r)):n.texImage2D(e.TEXTURE_2D,0,v,f,g,r);b(i,p)&&A(l),d.__version=h.version,i.onUpdate&&i.onUpdate(i)}t.__version=i.version}function N(t,i,s,o,l){const c=a.convert(s.format,s.colorSpace),u=a.convert(s.type),h=M(s.internalFormat,c,u,s.colorSpace);r.get(i).__hasExternalTextures||(l===e.TEXTURE_3D||l===e.TEXTURE_2D_ARRAY?n.texImage3D(l,0,h,i.width,i.height,i.depth,0,c,u,null):n.texImage2D(l,0,h,i.width,i.height,0,c,u,null)),n.bindFramebuffer(e.FRAMEBUFFER,t),H(i)?d.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,o,l,r.get(s).__webglTexture,0,z(i)):(l===e.TEXTURE_2D||l>=e.TEXTURE_CUBE_MAP_POSITIVE_X&&l<=e.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&e.framebufferTexture2D(e.FRAMEBUFFER,o,l,r.get(s).__webglTexture,0),n.bindFramebuffer(e.FRAMEBUFFER,null)}function O(t,n,r){if(e.bindRenderbuffer(e.RENDERBUFFER,t),n.depthBuffer&&!n.stencilBuffer){let i=e.DEPTH_COMPONENT16;if(r||H(n)){const t=n.depthTexture;t&&t.isDepthTexture&&(t.type===Ce?i=e.DEPTH_COMPONENT32F:t.type===Te&&(i=e.DEPTH_COMPONENT24));const r=z(n);H(n)?d.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,r,i,n.width,n.height):e.renderbufferStorageMultisample(e.RENDERBUFFER,r,i,n.width,n.height)}else e.renderbufferStorage(e.RENDERBUFFER,i,n.width,n.height);e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.RENDERBUFFER,t)}else if(n.depthBuffer&&n.stencilBuffer){const i=z(n);r&&!1===H(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):H(n)?d.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,i,e.DEPTH24_STENCIL8,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,e.DEPTH_STENCIL,n.width,n.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.RENDERBUFFER,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.colorSpace),l=a.convert(s.type),c=M(s.internalFormat,o,l,s.colorSpace),u=z(n);r&&!1===H(n)?e.renderbufferStorageMultisample(e.RENDERBUFFER,u,c,n.width,n.height):H(n)?d.renderbufferStorageMultisampleEXT(e.RENDERBUFFER,u,c,n.width,n.height):e.renderbufferStorage(e.RENDERBUFFER,c,n.width,n.height)}}e.bindRenderbuffer(e.RENDERBUFFER,null)}function k(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(e.FRAMEBUFFER,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)H(i)?d.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,a,0,s):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_ATTACHMENT,e.TEXTURE_2D,a,0);else{if(i.depthTexture.format!==Oe)throw new Error("Unknown depthTexture format");H(i)?d.framebufferTexture2DMultisampleEXT(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,a,0,s):e.framebufferTexture2D(e.FRAMEBUFFER,e.DEPTH_STENCIL_ATTACHMENT,e.TEXTURE_2D,a,0)}}(i.__webglFramebuffer,t)}else if(a){i.__webglDepthbuffer=[];for(let r=0;r<6;r++)n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer[r]),i.__webglDepthbuffer[r]=e.createRenderbuffer(),O(i.__webglDepthbuffer[r],t,!1)}else n.bindFramebuffer(e.FRAMEBUFFER,i.__webglFramebuffer),i.__webglDepthbuffer=e.createRenderbuffer(),O(i.__webglDepthbuffer,t,!1);n.bindFramebuffer(e.FRAMEBUFFER,null)}function z(e){return Math.min(h,e.samples)}function H(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.colorSpace,i=e.format,a=e.type;return!0===e.isCompressedTexture||e.format===wn||r!==Gt&&r!==zt&&(r===Ht?!1===o?!0===t.has("EXT_sRGB")&&i===De?(e.format=wn,e.minFilter=ve,e.generateMipmaps=!1):n=or.sRGBToLinear(n):i===De&&a===Ae||console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",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=P,this.setTexture2DArray=function(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?U(a,t,i):n.bindTexture(e.TEXTURE_2D_ARRAY,a.__webglTexture,e.TEXTURE0+i)},this.setTexture3D=function(t,i){const a=r.get(t);t.version>0&&a.__version!==t.version?U(a,t,i):n.bindTexture(e.TEXTURE_3D,a.__webglTexture,e.TEXTURE0+i)},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=F(t,i),u=i.source;n.bindTexture(e.TEXTURE_CUBE_MAP,t.__webglTexture,e.TEXTURE0+s);const h=r.get(u);if(u.version!==h.__version||!0===l){n.activeTexture(e.TEXTURE0+s),e.pixelStorei(e.UNPACK_FLIP_Y_WEBGL,i.flipY),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,i.premultiplyAlpha),e.pixelStorei(e.UNPACK_ALIGNMENT,i.unpackAlignment),e.pixelStorei(e.UNPACK_COLORSPACE_CONVERSION_WEBGL,e.NONE);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,c),d[e]=G(i,d[e]);const p=d[0],f=_(p)||o,m=a.convert(i.format,i.colorSpace),g=a.convert(i.type),v=M(i.internalFormat,m,g,i.colorSpace),y=o&&!0!==i.isVideoTexture,E=void 0===h.__version||!0===l;let w,T=S(i,p,f);if(D(e.TEXTURE_CUBE_MAP,i,f),t){y&&E&&n.texStorage2D(e.TEXTURE_CUBE_MAP,T,v,p.width,p.height);for(let t=0;t<6;t++){w=d[t].mipmaps;for(let r=0;r<w.length;r++){const a=w[r];i.format!==De?null!==m?y?n.compressedTexSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,a.width,a.height,m,a.data):n.compressedTexImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,v,a.width,a.height,0,a.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):y?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,0,0,a.width,a.height,m,g,a.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r,v,a.width,a.height,0,m,g,a.data)}}}else{w=i.mipmaps,y&&E&&(w.length>0&&T++,n.texStorage2D(e.TEXTURE_CUBE_MAP,T,v,d[0].width,d[0].height));for(let t=0;t<6;t++)if(r){y?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,d[t].width,d[t].height,m,g,d[t].data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,v,d[t].width,d[t].height,0,m,g,d[t].data);for(let r=0;r<w.length;r++){const i=w[r].image[t].image;y?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,0,0,i.width,i.height,m,g,i.data):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,v,i.width,i.height,0,m,g,i.data)}}else{y?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,0,0,m,g,d[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,0,v,m,g,d[t]);for(let r=0;r<w.length;r++){const i=w[r];y?n.texSubImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,0,0,m,g,i.image[t]):n.texImage2D(e.TEXTURE_CUBE_MAP_POSITIVE_X+t,r+1,v,m,g,i.image[t])}}}b(i,f)&&A(e.TEXTURE_CUBE_MAP),h.__version=u.version,i.onUpdate&&i.onUpdate(i)}t.__version=i.version}(s,t,i):n.bindTexture(e.TEXTURE_CUBE_MAP,s.__webglTexture,e.TEXTURE0+i)},this.rebindTextures=function(t,n,i){const a=r.get(t);void 0!==n&&N(a.__webglFramebuffer,t,t.texture,e.COLOR_ATTACHMENT0,e.TEXTURE_2D),void 0!==i&&k(t)},this.setupRenderTarget=function(t){const l=t.texture,c=r.get(t),u=r.get(l);t.addEventListener("dispose",T),!0!==t.isWebGLMultipleRenderTargets&&(void 0===u.__webglTexture&&(u.__webglTexture=e.createTexture()),u.__version=l.version,s.memory.textures++);const h=!0===t.isWebGLCubeRenderTarget,d=!0===t.isWebGLMultipleRenderTargets,p=_(t)||o;if(h){c.__webglFramebuffer=[];for(let t=0;t<6;t++)c.__webglFramebuffer[t]=e.createFramebuffer()}else{if(c.__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===H(t)){const r=d?l:[l];c.__webglMultisampledFramebuffer=e.createFramebuffer(),c.__webglColorRenderbuffer=[],n.bindFramebuffer(e.FRAMEBUFFER,c.__webglMultisampledFramebuffer);for(let n=0;n<r.length;n++){const i=r[n];c.__webglColorRenderbuffer[n]=e.createRenderbuffer(),e.bindRenderbuffer(e.RENDERBUFFER,c.__webglColorRenderbuffer[n]);const s=a.convert(i.format,i.colorSpace),o=a.convert(i.type),l=M(i.internalFormat,s,o,i.colorSpace,!0===t.isXRRenderTarget),u=z(t);e.renderbufferStorageMultisample(e.RENDERBUFFER,u,l,t.width,t.height),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+n,e.RENDERBUFFER,c.__webglColorRenderbuffer[n])}e.bindRenderbuffer(e.RENDERBUFFER,null),t.depthBuffer&&(c.__webglDepthRenderbuffer=e.createRenderbuffer(),O(c.__webglDepthRenderbuffer,t,!0)),n.bindFramebuffer(e.FRAMEBUFFER,null)}}if(h){n.bindTexture(e.TEXTURE_CUBE_MAP,u.__webglTexture),D(e.TEXTURE_CUBE_MAP,l,p);for(let n=0;n<6;n++)N(c.__webglFramebuffer[n],t,l,e.COLOR_ATTACHMENT0,e.TEXTURE_CUBE_MAP_POSITIVE_X+n);b(l,p)&&A(e.TEXTURE_CUBE_MAP),n.unbindTexture()}else if(d){const i=t.texture;for(let a=0,s=i.length;a<s;a++){const s=i[a],o=r.get(s);n.bindTexture(e.TEXTURE_2D,o.__webglTexture),D(e.TEXTURE_2D,s,p),N(c.__webglFramebuffer,t,s,e.COLOR_ATTACHMENT0+a,e.TEXTURE_2D),b(s,p)&&A(e.TEXTURE_2D)}n.unbindTexture()}else{let r=e.TEXTURE_2D;(t.isWebGL3DRenderTarget||t.isWebGLArrayRenderTarget)&&(o?r=t.isWebGL3DRenderTarget?e.TEXTURE_3D:e.TEXTURE_2D_ARRAY:console.error("THREE.WebGLTextures: THREE.Data3DTexture and THREE.DataArrayTexture only supported with WebGL2.")),n.bindTexture(r,u.__webglTexture),D(r,l,p),N(c.__webglFramebuffer,t,l,e.COLOR_ATTACHMENT0,r),b(l,p)&&A(r),n.unbindTexture()}t.depthBuffer&&k(t)},this.updateRenderTargetMipmap=function(t){const i=_(t)||o,a=!0===t.isWebGLMultipleRenderTargets?t.texture:[t.texture];for(let s=0,o=a.length;s<o;s++){const o=a[s];if(b(o,i)){const i=t.isWebGLCubeRenderTarget?e.TEXTURE_CUBE_MAP:e.TEXTURE_2D,a=r.get(o).__webglTexture;n.bindTexture(i,a),A(i),n.unbindTexture()}}},this.updateMultisampleRenderTarget=function(t){if(o&&t.samples>0&&!1===H(t)){const i=t.isWebGLMultipleRenderTargets?t.texture:[t.texture],a=t.width,s=t.height;let o=e.COLOR_BUFFER_BIT;const l=[],c=t.stencilBuffer?e.DEPTH_STENCIL_ATTACHMENT:e.DEPTH_ATTACHMENT,u=r.get(t),h=!0===t.isWebGLMultipleRenderTargets;if(h)for(let t=0;t<i.length;t++)n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,null),n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,null,0);n.bindFramebuffer(e.READ_FRAMEBUFFER,u.__webglMultisampledFramebuffer),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglFramebuffer);for(let n=0;n<i.length;n++){l.push(e.COLOR_ATTACHMENT0+n),t.depthBuffer&&l.push(c);const d=void 0!==u.__ignoreDepthValues&&u.__ignoreDepthValues;if(!1===d&&(t.depthBuffer&&(o|=e.DEPTH_BUFFER_BIT),t.stencilBuffer&&(o|=e.STENCIL_BUFFER_BIT)),h&&e.framebufferRenderbuffer(e.READ_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.RENDERBUFFER,u.__webglColorRenderbuffer[n]),!0===d&&(e.invalidateFramebuffer(e.READ_FRAMEBUFFER,[c]),e.invalidateFramebuffer(e.DRAW_FRAMEBUFFER,[c])),h){const t=r.get(i[n]).__webglTexture;e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0,e.TEXTURE_2D,t,0)}e.blitFramebuffer(0,0,a,s,0,0,a,s,o,e.NEAREST),p&&e.invalidateFramebuffer(e.READ_FRAMEBUFFER,l)}if(n.bindFramebuffer(e.READ_FRAMEBUFFER,null),n.bindFramebuffer(e.DRAW_FRAMEBUFFER,null),h)for(let t=0;t<i.length;t++){n.bindFramebuffer(e.FRAMEBUFFER,u.__webglMultisampledFramebuffer),e.framebufferRenderbuffer(e.FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.RENDERBUFFER,u.__webglColorRenderbuffer[t]);const a=r.get(i[t]).__webglTexture;n.bindFramebuffer(e.FRAMEBUFFER,u.__webglFramebuffer),e.framebufferTexture2D(e.DRAW_FRAMEBUFFER,e.COLOR_ATTACHMENT0+t,e.TEXTURE_2D,a,0)}n.bindFramebuffer(e.DRAW_FRAMEBUFFER,u.__webglMultisampledFramebuffer)}},this.setupDepthRenderbuffer=k,this.setupFrameBufferTexture=N,this.useMultisampledRTT=H}function Ml(e,t,n){const r=n.isWebGL2;return{convert:function(n,i=zt){let a;if(n===Ae)return e.UNSIGNED_BYTE;if(n===Pe)return e.UNSIGNED_SHORT_4_4_4_4;if(n===Be)return e.UNSIGNED_SHORT_5_5_5_1;if(n===Me)return e.BYTE;if(n===Se)return e.SHORT;if(n===Ee)return e.UNSIGNED_SHORT;if(n===we)return e.INT;if(n===Te)return e.UNSIGNED_INT;if(n===Ce)return e.FLOAT;if(n===Re)return r?e.HALF_FLOAT:(a=t.get("OES_texture_half_float"),null!==a?a.HALF_FLOAT_OES:null);if(n===Ie)return e.ALPHA;if(n===De)return e.RGBA;if(n===Fe)return e.LUMINANCE;if(n===Ue)return e.LUMINANCE_ALPHA;if(n===Ne)return e.DEPTH_COMPONENT;if(n===Oe)return e.DEPTH_STENCIL;if(n===wn)return a=t.get("EXT_sRGB"),null!==a?a.SRGB_ALPHA_EXT:null;if(n===ke)return e.RED;if(n===ze)return e.RED_INTEGER;if(n===He)return e.RG;if(n===Ge)return e.RG_INTEGER;if(n===Ve)return e.RGBA_INTEGER;if(n===We||n===je||n===Xe||n===Je)if(i===Ht){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===Je)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===Je)return a.COMPRESSED_RGBA_S3TC_DXT5_EXT}if(n===Ye||n===Ke||n===qe||n===Qe){if(a=t.get("WEBGL_compressed_texture_pvrtc"),null===a)return null;if(n===Ye)return a.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(n===Ke)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===$e||n===et){if(a=t.get("WEBGL_compressed_texture_etc"),null===a)return null;if(n===$e)return i===Ht?a.COMPRESSED_SRGB8_ETC2:a.COMPRESSED_RGB8_ETC2;if(n===et)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:a.COMPRESSED_RGBA8_ETC2_EAC}if(n===tt||n===nt||n===rt||n===it||n===at||n===st||n===ot||n===lt||n===ct||n===ut||n===ht||n===dt||n===pt||n===ft){if(a=t.get("WEBGL_compressed_texture_astc"),null===a)return null;if(n===tt)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:a.COMPRESSED_RGBA_ASTC_4x4_KHR;if(n===nt)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:a.COMPRESSED_RGBA_ASTC_5x4_KHR;if(n===rt)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:a.COMPRESSED_RGBA_ASTC_5x5_KHR;if(n===it)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:a.COMPRESSED_RGBA_ASTC_6x5_KHR;if(n===at)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:a.COMPRESSED_RGBA_ASTC_6x6_KHR;if(n===st)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:a.COMPRESSED_RGBA_ASTC_8x5_KHR;if(n===ot)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:a.COMPRESSED_RGBA_ASTC_8x6_KHR;if(n===lt)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:a.COMPRESSED_RGBA_ASTC_8x8_KHR;if(n===ct)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:a.COMPRESSED_RGBA_ASTC_10x5_KHR;if(n===ut)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:a.COMPRESSED_RGBA_ASTC_10x6_KHR;if(n===ht)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:a.COMPRESSED_RGBA_ASTC_10x8_KHR;if(n===dt)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:a.COMPRESSED_RGBA_ASTC_10x10_KHR;if(n===pt)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:a.COMPRESSED_RGBA_ASTC_12x10_KHR;if(n===ft)return i===Ht?a.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:a.COMPRESSED_RGBA_ASTC_12x12_KHR}if(n===mt){if(a=t.get("EXT_texture_compression_bptc"),null===a)return null;if(n===mt)return i===Ht?a.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:a.COMPRESSED_RGBA_BPTC_UNORM_EXT}if(n===gt||n===vt||n===yt||n===xt){if(a=t.get("EXT_texture_compression_rgtc"),null===a)return null;if(n===mt)return a.COMPRESSED_RED_RGTC1_EXT;if(n===vt)return a.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(n===yt)return a.COMPRESSED_RED_GREEN_RGTC2_EXT;if(n===xt)return a.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}return n===Le?r?e.UNSIGNED_INT_24_8:(a=t.get("WEBGL_depth_texture"),null!==a?a.UNSIGNED_INT_24_8_WEBGL:null):void 0!==e[n]?e[n]:null}}}class Sl extends Ga{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class El extends Ai{constructor(){super(),this.isGroup=!0,this.type="Group"}}const wl={type:"move"};class Tl{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return null===this._hand&&(this._hand=new El,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 El,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new br,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new br),this._targetRay}getGripSpace(){return null===this._grip&&(this._grip=new El,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new br,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new br),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.matrixWorldNeedsUpdate=!0,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,c=.005;l.inputState.pinching&&s>o+c?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&s<=o-c&&(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),o.matrixWorldNeedsUpdate=!0,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),s.matrixWorldNeedsUpdate=!0,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(wl)))}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 El;n.matrixAutoUpdate=!1,n.visible=!1,e.joints[t.jointName]=n,e.add(n)}return e.joints[t.jointName]}}class Cl extends dr{constructor(e,t,n,r,i,a,s,o,l,c){if((c=void 0!==c?c:Ne)!==Ne&&c!==Oe)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");void 0===n&&c===Ne&&(n=Te),void 0===n&&c===Oe&&(n=Le),super(null,r,i,a,s,o,c,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,this.compareFunction=null}copy(e){return super.copy(e),this.compareFunction=e.compareFunction,this}toJSON(e){const t=super.toJSON(e);return null!==this.compareFunction&&(t.compareFunction=this.compareFunction),t}}class Rl extends Rn{constructor(e,t){super();const n=this;let r=null,i=1,a=null,s="local-floor",o=1,l=null,c=null,u=null,h=null,d=null,p=null;const f=t.getContextAttributes();let m=null,g=null;const v=[],y=[],x=new Ga;x.layers.enable(1),x.viewport=new pr;const _=new Ga;_.layers.enable(2),_.viewport=new pr;const b=[x,_],A=new Sl;A.layers.enable(1),A.layers.enable(2);let M=null,S=null;function E(e){const t=y.indexOf(e.inputSource);if(-1===t)return;const n=v[t];void 0!==n&&(n.update(e.inputSource,e.frame,l||a),n.dispatchEvent({type:e.type,data:e.inputSource}))}function w(){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",w),r.removeEventListener("inputsourceschange",T);for(let e=0;e<v.length;e++){const t=y[e];null!==t&&(y[e]=null,v[e].disconnect(t))}M=null,S=null,e.setRenderTarget(m),d=null,h=null,u=null,r=null,g=null,L.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=y.indexOf(n);r>=0&&(y[r]=null,v[r].disconnect(n))}for(let t=0;t<e.added.length;t++){const n=e.added[t];let r=y.indexOf(n);if(-1===r){for(let e=0;e<v.length;e++){if(e>=y.length){y.push(n),r=e;break}if(null===y[e]){y[e]=n,r=e;break}}if(-1===r)break}const i=v[r];i&&i.connect(n)}}this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(e){let t=v[e];return void 0===t&&(t=new Tl,v[e]=t),t.getTargetRaySpace()},this.getControllerGrip=function(e){let t=v[e];return void 0===t&&(t=new Tl,v[e]=t),t.getGripSpace()},this.getHand=function(e){let t=v[e];return void 0===t&&(t=new Tl,v[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 l||a},this.setReferenceSpace=function(e){l=e},this.getBaseLayer=function(){return null!==h?h:d},this.getBinding=function(){return u},this.getFrame=function(){return p},this.getSession=function(){return r},this.setSession=async function(c){if(r=c,null!==r){if(m=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",w),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:!0,depth:f.depth,stencil:f.stencil,framebufferScaleFactor:i};d=new XRWebGLLayer(r,t,n),r.updateRenderState({baseLayer:d}),g=new fr(d.framebufferWidth,d.framebufferHeight,{format:De,type:Ae,colorSpace:e.outputColorSpace,stencilBuffer:f.stencil})}else{let n=null,a=null,s=null;f.depth&&(s=f.stencil?t.DEPTH24_STENCIL8:t.DEPTH_COMPONENT24,n=f.stencil?Oe:Ne,a=f.stencil?Le:Te);const o={colorFormat:t.RGBA8,depthFormat:s,scaleFactor:i};u=new XRWebGLBinding(r,t),h=u.createProjectionLayer(o),r.updateRenderState({layers:[h]}),g=new fr(h.textureWidth,h.textureHeight,{format:De,type:Ae,depthTexture:new Cl(h.textureWidth,h.textureHeight,a,void 0,void 0,void 0,void 0,void 0,void 0,n),stencilBuffer:f.stencil,colorSpace:e.outputColorSpace,samples:f.antialias?4:0}),e.properties.get(g).__ignoreDepthValues=h.ignoreDepthValues}g.isXRRenderTarget=!0,this.setFoveation(o),l=null,a=await r.requestReferenceSpace(s),L.setContext(r),L.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}},this.getEnvironmentBlendMode=function(){if(null!==r)return r.environmentBlendMode};const C=new br,R=new br;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;A.near=_.near=x.near=e.near,A.far=_.far=x.far=e.far,M===A.near&&S===A.far||(r.updateRenderState({depthNear:A.near,depthFar:A.far}),M=A.near,S=A.far);const t=e.parent,n=A.cameras;P(A,t);for(let e=0;e<n.length;e++)P(n[e],t);2===n.length?function(e,t,n){C.setFromMatrixPosition(t.matrixWorld),R.setFromMatrixPosition(n.matrixWorld);const r=C.distanceTo(R),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],c=(i[9]-1)/i[5],u=(i[8]-1)/i[0],h=(a[8]+1)/a[0],d=s*u,p=s*h,f=r/(-u+h),m=f*-u;t.matrixWorld.decompose(e.position,e.quaternion,e.scale),e.translateX(m),e.translateZ(f),e.matrixWorld.compose(e.position,e.quaternion,e.scale),e.matrixWorldInverse.copy(e.matrixWorld).invert();const g=s+f,v=o+f,y=d-m,x=p+(r-m),_=l*o/v*g,b=c*o/v*g;e.projectionMatrix.makePerspective(y,x,_,b,g,v),e.projectionMatrixInverse.copy(e.projectionMatrix).invert()}(A,x,_):A.projectionMatrix.copy(x.projectionMatrix),function(e,t,n){null===n?e.matrix.copy(t.matrixWorld):(e.matrix.copy(n.matrixWorld),e.matrix.invert(),e.matrix.multiply(t.matrixWorld)),e.matrix.decompose(e.position,e.quaternion,e.scale),e.updateMatrixWorld(!0);const r=e.children;for(let e=0,t=r.length;e<t;e++)r[e].updateMatrixWorld(!0);e.projectionMatrix.copy(t.projectionMatrix),e.projectionMatrixInverse.copy(t.projectionMatrixInverse),e.isPerspectiveCamera&&(e.fov=2*In*Math.atan(1/e.projectionMatrix.elements[5]),e.zoom=1)}(e,A,t)},this.getCamera=function(){return A},this.getFoveation=function(){if(null!==h||null!==d)return o},this.setFoveation=function(e){o=e,null!==h&&(h.fixedFoveation=e),null!==d&&void 0!==d.fixedFoveation&&(d.fixedFoveation=e)};let B=null;const L=new es;L.setAnimationLoop((function(t,r){if(c=r.getViewerPose(l||a),p=r,null!==c){const t=c.views;null!==d&&(e.setRenderTargetFramebuffer(g,d.framebuffer),e.setRenderTarget(g));let n=!1;t.length!==A.cameras.length&&(A.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=u.getViewSubImage(h,i);a=t.viewport,0===r&&(e.setRenderTargetTextures(g,t.colorTexture,h.ignoreDepthValues?void 0:t.depthStencilTexture),e.setRenderTarget(g))}let s=b[r];void 0===s&&(s=new Ga,s.layers.enable(r),s.viewport=new pr,b[r]=s),s.matrix.fromArray(i.transform.matrix),s.matrix.decompose(s.position,s.quaternion,s.scale),s.projectionMatrix.fromArray(i.projectionMatrix),s.projectionMatrixInverse.copy(s.projectionMatrix).invert(),s.viewport.set(a.x,a.y,a.width,a.height),0===r&&(A.matrix.copy(s.matrix),A.matrix.decompose(A.position,A.quaternion,A.scale)),!0===n&&A.cameras.push(s)}}for(let e=0;e<v.length;e++){const t=y[e],n=v[e];null!==t&&void 0!==n&&n.update(t,r,l||a)}B&&B(t,r),r.detectedPlanes&&n.dispatchEvent({type:"planesdetected",data:r}),p=null})),this.setAnimationLoop=function(e){B=e},this.dispose=function(){}}}function Pl(e,t){function n(e,t){!0===e.matrixAutoUpdate&&e.updateMatrix(),t.value.copy(e.matrix)}function r(r,i){r.opacity.value=i.opacity,i.color&&r.diffuse.value.copy(i.color),i.emissive&&r.emissive.value.copy(i.emissive).multiplyScalar(i.emissiveIntensity),i.map&&(r.map.value=i.map,n(i.map,r.mapTransform)),i.alphaMap&&(r.alphaMap.value=i.alphaMap,n(i.alphaMap,r.alphaMapTransform)),i.bumpMap&&(r.bumpMap.value=i.bumpMap,n(i.bumpMap,r.bumpMapTransform),r.bumpScale.value=i.bumpScale,i.side===m&&(r.bumpScale.value*=-1)),i.normalMap&&(r.normalMap.value=i.normalMap,n(i.normalMap,r.normalMapTransform),r.normalScale.value.copy(i.normalScale),i.side===m&&r.normalScale.value.negate()),i.displacementMap&&(r.displacementMap.value=i.displacementMap,n(i.displacementMap,r.displacementMapTransform),r.displacementScale.value=i.displacementScale,r.displacementBias.value=i.displacementBias),i.emissiveMap&&(r.emissiveMap.value=i.emissiveMap,n(i.emissiveMap,r.emissiveMapTransform)),i.specularMap&&(r.specularMap.value=i.specularMap,n(i.specularMap,r.specularMapTransform)),i.alphaTest>0&&(r.alphaTest.value=i.alphaTest);const a=t.get(i).envMap;if(a&&(r.envMap.value=a,r.flipEnvMap.value=a.isCubeTexture&&!1===a.isRenderTargetTexture?-1:1,r.reflectivity.value=i.reflectivity,r.ior.value=i.ior,r.refractionRatio.value=i.refractionRatio),i.lightMap){r.lightMap.value=i.lightMap;const t=!0===e.useLegacyLights?Math.PI:1;r.lightMapIntensity.value=i.lightMapIntensity*t,n(i.lightMap,r.lightMapTransform)}i.aoMap&&(r.aoMap.value=i.aoMap,r.aoMapIntensity.value=i.aoMapIntensity,n(i.aoMap,r.aoMapTransform))}return{refreshFogUniforms:function(t,n){n.color.getRGB(t.fogColor.value,Oa(e)),n.isFog?(t.fogNear.value=n.near,t.fogFar.value=n.far):n.isFogExp2&&(t.fogDensity.value=n.density)},refreshMaterialUniforms:function(e,i,a,s,o){i.isMeshBasicMaterial||i.isMeshLambertMaterial?r(e,i):i.isMeshToonMaterial?(r(e,i),function(e,t){t.gradientMap&&(e.gradientMap.value=t.gradientMap)}(e,i)):i.isMeshPhongMaterial?(r(e,i),function(e,t){e.specular.value.copy(t.specular),e.shininess.value=Math.max(t.shininess,1e-4)}(e,i)):i.isMeshStandardMaterial?(r(e,i),function(e,r){e.metalness.value=r.metalness,r.metalnessMap&&(e.metalnessMap.value=r.metalnessMap,n(r.metalnessMap,e.metalnessMapTransform)),e.roughness.value=r.roughness,r.roughnessMap&&(e.roughnessMap.value=r.roughnessMap,n(r.roughnessMap,e.roughnessMapTransform)),t.get(r).envMap&&(e.envMapIntensity.value=r.envMapIntensity)}(e,i),i.isMeshPhysicalMaterial&&function(e,t,r){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,n(t.sheenColorMap,e.sheenColorMapTransform)),t.sheenRoughnessMap&&(e.sheenRoughnessMap.value=t.sheenRoughnessMap,n(t.sheenRoughnessMap,e.sheenRoughnessMapTransform))),t.clearcoat>0&&(e.clearcoat.value=t.clearcoat,e.clearcoatRoughness.value=t.clearcoatRoughness,t.clearcoatMap&&(e.clearcoatMap.value=t.clearcoatMap,n(t.clearcoatMap,e.clearcoatMapTransform)),t.clearcoatRoughnessMap&&(e.clearcoatRoughnessMap.value=t.clearcoatRoughnessMap,n(t.clearcoatRoughnessMap,e.clearcoatRoughnessMapTransform)),t.clearcoatNormalMap&&(e.clearcoatNormalMap.value=t.clearcoatNormalMap,n(t.clearcoatNormalMap,e.clearcoatNormalMapTransform),e.clearcoatNormalScale.value.copy(t.clearcoatNormalScale),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,n(t.iridescenceMap,e.iridescenceMapTransform)),t.iridescenceThicknessMap&&(e.iridescenceThicknessMap.value=t.iridescenceThicknessMap,n(t.iridescenceThicknessMap,e.iridescenceThicknessMapTransform))),t.transmission>0&&(e.transmission.value=t.transmission,e.transmissionSamplerMap.value=r.texture,e.transmissionSamplerSize.value.set(r.width,r.height),t.transmissionMap&&(e.transmissionMap.value=t.transmissionMap,n(t.transmissionMap,e.transmissionMapTransform)),e.thickness.value=t.thickness,t.thicknessMap&&(e.thicknessMap.value=t.thicknessMap,n(t.thicknessMap,e.thicknessMapTransform)),e.attenuationDistance.value=t.attenuationDistance,e.attenuationColor.value.copy(t.attenuationColor)),t.anisotropy>0&&(e.anisotropyVector.value.set(t.anisotropy*Math.cos(t.anisotropyRotation),t.anisotropy*Math.sin(t.anisotropyRotation)),t.anisotropyMap&&(e.anisotropyMap.value=t.anisotropyMap,n(t.anisotropyMap,e.anisotropyMapTransform))),e.specularIntensity.value=t.specularIntensity,e.specularColor.value.copy(t.specularColor),t.specularColorMap&&(e.specularColorMap.value=t.specularColorMap,n(t.specularColorMap,e.specularColorMapTransform)),t.specularIntensityMap&&(e.specularIntensityMap.value=t.specularIntensityMap,n(t.specularIntensityMap,e.specularIntensityMapTransform))}(e,i,o)):i.isMeshMatcapMaterial?(r(e,i),function(e,t){t.matcap&&(e.matcap.value=t.matcap)}(e,i)):i.isMeshDepthMaterial?r(e,i):i.isMeshDistanceMaterial?(r(e,i),function(e,n){const r=t.get(n).light;e.referencePosition.value.setFromMatrixPosition(r.matrixWorld),e.nearDistance.value=r.shadow.camera.near,e.farDistance.value=r.shadow.camera.far}(e,i)):i.isMeshNormalMaterial?r(e,i):i.isLineBasicMaterial?(function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform))}(e,i),i.isLineDashedMaterial&&function(e,t){e.dashSize.value=t.dashSize,e.totalSize.value=t.dashSize+t.gapSize,e.scale.value=t.scale}(e,i)):i.isPointsMaterial?function(e,t,r,i){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.size.value=t.size*r,e.scale.value=.5*i,t.map&&(e.map.value=t.map,n(t.map,e.uvTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i,a,s):i.isSpriteMaterial?function(e,t){e.diffuse.value.copy(t.color),e.opacity.value=t.opacity,e.rotation.value=t.rotation,t.map&&(e.map.value=t.map,n(t.map,e.mapTransform)),t.alphaMap&&(e.alphaMap.value=t.alphaMap,n(t.alphaMap,e.alphaMapTransform)),t.alphaTest>0&&(e.alphaTest.value=t.alphaTest)}(e,i):i.isShadowMaterial?(e.color.value.copy(i.color),e.opacity.value=i.opacity):i.isShaderMaterial&&(i.uniformsNeedUpdate=!1)}}}function Bl(e,t,n,r){let i={},a={},s=[];const o=n.isWebGL2?e.getParameter(e.MAX_UNIFORM_BUFFER_BINDINGS):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=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=c(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(e.UNIFORM_BUFFER,r),e.bufferData(e.UNIFORM_BUFFER,i,a),e.bindBuffer(e.UNIFORM_BUFFER,null),e.bindBufferBase(e.UNIFORM_BUFFER,n,r),r}(n),i[n.id]=d,n.addEventListener("dispose",u));const p=h.program;r.updateUBOMapping(n,p);const f=t.render.frame;a[n.id]!==f&&(function(t){const n=i[t.id],r=t.uniforms,a=t.__cache;e.bindBuffer(e.UNIFORM_BUFFER,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=c(s);"number"==typeof s?(n.__data[0]=s,e.bufferSubData(e.UNIFORM_BUFFER,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(e.UNIFORM_BUFFER,t,n.__data)}}e.bindBuffer(e.UNIFORM_BUFFER,null)}(n),a[n.id]=f)},dispose:function(){for(const t in i)e.deleteBuffer(i[t]);s=[],i={},a={}}}}function Ll(){const e=qn("canvas");return e.style.display="block",e}class Il{constructor(e={}){const{canvas:t=Ll(),context:n=null,depth:i=!0,stencil:a=!0,alpha:s=!1,antialias:o=!1,premultipliedAlpha:l=!0,preserveDrawingBuffer:c=!1,powerPreference:u="default",failIfMajorPerformanceCaveat:h=!1}=e;let d;this.isWebGLRenderer=!0,d=null!==n?n.getContextAttributes().alpha:s;const p=new Uint32Array(4),v=new Int32Array(4);let y=null,x=null;const _=[],b=[];this.domElement=t,this.debug={checkShaderErrors:!0,onShaderError:null},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.outputColorSpace=Ht,this.useLegacyLights=!0,this.toneMapping=Q,this.toneMappingExposure=1;const A=this;let M=!1,S=0,E=0,w=null,T=-1,C=null;const R=new pr,P=new pr;let B=null;const L=new Hi(0);let I=0,D=t.width,F=t.height,U=1,N=null,O=null;const k=new pr(0,0,D,F),z=new pr(0,0,D,F);let H=!1;const G=new $a;let V=!1,W=!1,j=null;const X=new Qr,J=new Wn,Y=new br,K={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function q(){return null===w?U:1}let Z,$,ee,te,ne,re,ie,ae,se,oe,le,ce,ue,he,de,pe,fe,me,ge,ve,ye,xe,be,Me,Se=n;function we(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:l,preserveDrawingBuffer:c,powerPreference:u,failIfMajorPerformanceCaveat:h};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${r}`),t.addEventListener("webglcontextlost",Ue,!1),t.addEventListener("webglcontextrestored",Ne,!1),t.addEventListener("webglcontextcreationerror",Oe,!1),null===Se){const t=["webgl2","webgl","experimental-webgl"];if(!0===A.isWebGL1Renderer&&t.shift(),Se=we(t,e),null===Se)throw we(t)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}"undefined"!=typeof WebGLRenderingContext&&Se instanceof WebGLRenderingContext&&console.warn("THREE.WebGLRenderer: WebGL 1 support was deprecated in r153 and will be removed in r163."),void 0===Se.getShaderPrecisionFormat&&(Se.getShaderPrecisionFormat=function(){return{rangeMin:1,rangeMax:1,precision:1}})}catch(e){throw console.error("THREE.WebGLRenderer: "+e.message),e}function Ie(){Z=new Ts(Se),$=new us(Se,Z,e),Z.init($),xe=new Ml(Se,Z,$),ee=new bl(Se,Z,$),te=new Ps(Se),ne=new ol,re=new Al(Se,Z,ee,ne,$,xe,te),ie=new ds(A),ae=new ws(A),se=new ts(Se,$),be=new ls(Se,Z,se,$),oe=new Cs(Se,se,te,be),le=new Ds(Se,oe,se,te),ge=new Is(Se,$,re),pe=new hs(ne),ce=new sl(A,ie,ae,Z,$,be,pe),ue=new Pl(A,ne),he=new hl,de=new vl(Z,$),me=new os(A,ie,ae,ee,le,d,l),fe=new _l(A,le,$),Me=new Bl(Se,te,$,ee),ve=new cs(Se,Z,te,$),ye=new Rs(Se,Z,te,$),te.programs=ce.programs,A.capabilities=$,A.extensions=Z,A.properties=ne,A.renderLists=he,A.shadowMap=fe,A.state=ee,A.info=te}Ie();const Fe=new Rl(A,Se);function Ue(e){e.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),M=!0}function Ne(){console.log("THREE.WebGLRenderer: Context Restored."),M=!1;const e=te.autoReset,t=fe.enabled,n=fe.autoUpdate,r=fe.needsUpdate,i=fe.type;Ie(),te.autoReset=e,fe.enabled=t,fe.autoUpdate=n,fe.needsUpdate=r,fe.type=i}function Oe(e){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",e.statusMessage)}function ke(e){const t=e.target;t.removeEventListener("dispose",ke),function(e){(function(e){const t=ne.get(e).programs;void 0!==t&&(t.forEach((function(e){ce.releaseProgram(e)})),e.isShaderMaterial&&ce.releaseShaderCache(e))})(e),ne.remove(e)}(t)}this.xr=Fe,this.getContext=function(){return Se},this.getContextAttributes=function(){return Se.getContextAttributes()},this.forceContextLoss=function(){const e=Z.get("WEBGL_lose_context");e&&e.loseContext()},this.forceContextRestore=function(){const e=Z.get("WEBGL_lose_context");e&&e.restoreContext()},this.getPixelRatio=function(){return U},this.setPixelRatio=function(e){void 0!==e&&(U=e,this.setSize(D,F,!1))},this.getSize=function(e){return e.set(D,F)},this.setSize=function(e,n,r=!0){Fe.isPresenting?console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting."):(D=e,F=n,t.width=Math.floor(e*U),t.height=Math.floor(n*U),!0===r&&(t.style.width=e+"px",t.style.height=n+"px"),this.setViewport(0,0,e,n))},this.getDrawingBufferSize=function(e){return e.set(D*U,F*U).floor()},this.setDrawingBufferSize=function(e,n,r){D=e,F=n,U=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(R)},this.getViewport=function(e){return e.copy(k)},this.setViewport=function(e,t,n,r){e.isVector4?k.set(e.x,e.y,e.z,e.w):k.set(e,t,n,r),ee.viewport(R.copy(k).multiplyScalar(U).floor())},this.getScissor=function(e){return e.copy(z)},this.setScissor=function(e,t,n,r){e.isVector4?z.set(e.x,e.y,e.z,e.w):z.set(e,t,n,r),ee.scissor(P.copy(z).multiplyScalar(U).floor())},this.getScissorTest=function(){return H},this.setScissorTest=function(e){ee.setScissorTest(H=e)},this.setOpaqueSort=function(e){N=e},this.setTransparentSort=function(e){O=e},this.getClearColor=function(e){return e.copy(me.getClearColor())},this.setClearColor=function(){me.setClearColor.apply(me,arguments)},this.getClearAlpha=function(){return me.getClearAlpha()},this.setClearAlpha=function(){me.setClearAlpha.apply(me,arguments)},this.clear=function(e=!0,t=!0,n=!0){let r=0;if(e){let e=!1;if(null!==w){const t=w.texture.format;e=t===Ve||t===Ge||t===ze}if(e){const e=w.texture.type,t=e===Ae||e===Te||e===Ee||e===Le||e===Pe||e===Be,n=me.getClearColor(),r=me.getClearAlpha(),i=n.r,a=n.g,s=n.b;t?(p[0]=i,p[1]=a,p[2]=s,p[3]=r,Se.clearBufferuiv(Se.COLOR,0,p)):(v[0]=i,v[1]=a,v[2]=s,v[3]=r,Se.clearBufferiv(Se.COLOR,0,v))}else r|=Se.COLOR_BUFFER_BIT}t&&(r|=Se.DEPTH_BUFFER_BIT),n&&(r|=Se.STENCIL_BUFFER_BIT),Se.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",Ue,!1),t.removeEventListener("webglcontextrestored",Ne,!1),t.removeEventListener("webglcontextcreationerror",Oe,!1),he.dispose(),de.dispose(),ne.dispose(),ie.dispose(),ae.dispose(),le.dispose(),be.dispose(),Me.dispose(),ce.dispose(),Fe.dispose(),Fe.removeEventListener("sessionstart",We),Fe.removeEventListener("sessionend",je),j&&(j.dispose(),j=null),Xe.stop()},this.renderBufferDirect=function(e,t,n,r,i,a){null===t&&(t=K);const s=i.isMesh&&i.matrixWorld.determinant()<0,o=function(e,t,n,r,i){!0!==t.isScene&&(t=K),re.resetTextureUnits();const a=t.fog,s=r.isMeshStandardMaterial?t.environment:null,o=null===w?A.outputColorSpace:!0===w.isXRRenderTarget?w.texture.colorSpace:Gt,l=(r.isMeshStandardMaterial?ae:ie).get(r.envMap||s),c=!0===r.vertexColors&&!!n.attributes.color&&4===n.attributes.color.itemSize,u=!!n.attributes.tangent&&(!!r.normalMap||r.anisotropy>0),h=!!n.morphAttributes.position,d=!!n.morphAttributes.normal,p=!!n.morphAttributes.color,f=r.toneMapped?A.toneMapping:Q,m=n.morphAttributes.position||n.morphAttributes.normal||n.morphAttributes.color,g=void 0!==m?m.length:0,v=ne.get(r),y=x.state.lights;if(!0===V&&(!0===W||e!==C)){const t=e===C&&r.id===T;pe.setState(r,e,t)}let _=!1;r.version===v.__version?v.needsLights&&v.lightsStateVersion!==y.state.version||v.outputColorSpace!==o||i.isInstancedMesh&&!1===v.instancing?_=!0:i.isInstancedMesh||!0!==v.instancing?i.isSkinnedMesh&&!1===v.skinning?_=!0:i.isSkinnedMesh||!0!==v.skinning?v.envMap!==l||!0===r.fog&&v.fog!==a?_=!0:void 0===v.numClippingPlanes||v.numClippingPlanes===pe.numPlanes&&v.numIntersection===pe.numIntersection?(v.vertexAlphas!==c||v.vertexTangents!==u||v.morphTargets!==h||v.morphNormals!==d||v.morphColors!==p||v.toneMapping!==f||!0===$.isWebGL2&&v.morphTargetsCount!==g)&&(_=!0):_=!0:_=!0:_=!0:(_=!0,v.__version=r.version);let b=v.currentProgram;!0===_&&(b=Qe(r,t,i));let M=!1,S=!1,E=!1;const R=b.getUniforms(),P=v.uniforms;if(ee.useProgram(b.program)&&(M=!0,S=!0,E=!0),r.id!==T&&(T=r.id,S=!0),M||C!==e){if(R.setValue(Se,"projectionMatrix",e.projectionMatrix),$.logarithmicDepthBuffer&&R.setValue(Se,"logDepthBufFC",2/(Math.log(e.far+1)/Math.LN2)),C!==e&&(C=e,S=!0,E=!0),r.isShaderMaterial||r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshStandardMaterial||r.envMap){const t=R.map.cameraPosition;void 0!==t&&t.setValue(Se,Y.setFromMatrixPosition(e.matrixWorld))}(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial)&&R.setValue(Se,"isOrthographic",!0===e.isOrthographicCamera),(r.isMeshPhongMaterial||r.isMeshToonMaterial||r.isMeshLambertMaterial||r.isMeshBasicMaterial||r.isMeshStandardMaterial||r.isShaderMaterial||r.isShadowMaterial||i.isSkinnedMesh)&&R.setValue(Se,"viewMatrix",e.matrixWorldInverse)}if(i.isSkinnedMesh){R.setOptional(Se,i,"bindMatrix"),R.setOptional(Se,i,"bindMatrixInverse");const e=i.skeleton;e&&($.floatVertexTextures?(null===e.boneTexture&&e.computeBoneTexture(),R.setValue(Se,"boneTexture",e.boneTexture,re),R.setValue(Se,"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 B=n.morphAttributes;var L,I;if((void 0!==B.position||void 0!==B.normal||void 0!==B.color&&!0===$.isWebGL2)&&ge.update(i,n,b),(S||v.receiveShadow!==i.receiveShadow)&&(v.receiveShadow=i.receiveShadow,R.setValue(Se,"receiveShadow",i.receiveShadow)),r.isMeshGouraudMaterial&&null!==r.envMap&&(P.envMap.value=l,P.flipEnvMap.value=l.isCubeTexture&&!1===l.isRenderTargetTexture?-1:1),S&&(R.setValue(Se,"toneMappingExposure",A.toneMappingExposure),v.needsLights&&(I=E,(L=P).ambientLightColor.needsUpdate=I,L.lightProbe.needsUpdate=I,L.directionalLights.needsUpdate=I,L.directionalLightShadows.needsUpdate=I,L.pointLights.needsUpdate=I,L.pointLightShadows.needsUpdate=I,L.spotLights.needsUpdate=I,L.spotLightShadows.needsUpdate=I,L.rectAreaLights.needsUpdate=I,L.hemisphereLights.needsUpdate=I),a&&!0===r.fog&&ue.refreshFogUniforms(P,a),ue.refreshMaterialUniforms(P,r,U,F,j),ko.upload(Se,v.uniformsList,P,re)),r.isShaderMaterial&&!0===r.uniformsNeedUpdate&&(ko.upload(Se,v.uniformsList,P,re),r.uniformsNeedUpdate=!1),r.isSpriteMaterial&&R.setValue(Se,"center",i.center),R.setValue(Se,"modelViewMatrix",i.modelViewMatrix),R.setValue(Se,"normalMatrix",i.normalMatrix),R.setValue(Se,"modelMatrix",i.matrixWorld),r.isShaderMaterial||r.isRawShaderMaterial){const e=r.uniformsGroups;for(let t=0,n=e.length;t<n;t++)if($.isWebGL2){const n=e[t];Me.update(n,b),Me.bind(n,b)}else console.warn("THREE.WebGLRenderer: Uniform Buffer Objects can only be used with WebGL 2.")}return b}(e,t,n,r,i);ee.setMaterial(r,s);let l=n.index,c=1;!0===r.wireframe&&(l=oe.getWireframeAttribute(n),c=2);const u=n.drawRange,h=n.attributes.position;let d=u.start*c,p=(u.start+u.count)*c;null!==a&&(d=Math.max(d,a.start*c),p=Math.min(p,(a.start+a.count)*c)),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 f=p-d;if(f<0||f===1/0)return;let m;be.setup(i,r,o,n,l);let g=ve;if(null!==l&&(m=se.get(l),g=ye,g.setIndex(m)),i.isMesh)!0===r.wireframe?(ee.setLineWidth(r.wireframeLinewidth*q()),g.setMode(Se.LINES)):g.setMode(Se.TRIANGLES);else if(i.isLine){let e=r.linewidth;void 0===e&&(e=1),ee.setLineWidth(e*q()),i.isLineSegments?g.setMode(Se.LINES):i.isLineLoop?g.setMode(Se.LINE_LOOP):g.setMode(Se.LINE_STRIP)}else i.isPoints?g.setMode(Se.POINTS):i.isSprite&&g.setMode(Se.TRIANGLES);if(i.isInstancedMesh)g.renderInstances(d,f,i.count);else if(n.isInstancedBufferGeometry){const e=void 0!==n._maxInstanceCount?n._maxInstanceCount:1/0,t=Math.min(n.instanceCount,e);g.renderInstances(d,f,t)}else g.render(d,f)},this.compile=function(e,t){function n(e,t,n){!0===e.transparent&&e.side===g&&!1===e.forceSinglePass?(e.side=m,e.needsUpdate=!0,Qe(e,t,n),e.side=f,e.needsUpdate=!0,Qe(e,t,n),e.side=g):Qe(e,t,n)}x=de.get(e),x.init(),b.push(x),e.traverseVisible((function(e){e.isLight&&e.layers.test(t.layers)&&(x.pushLight(e),e.castShadow&&x.pushShadow(e))})),x.setupLights(A.useLegacyLights),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)})),b.pop(),x=null};let He=null;function We(){Xe.stop()}function je(){Xe.start()}const Xe=new es;function Je(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)x.pushLight(e),e.castShadow&&x.pushShadow(e);else if(e.isSprite){if(!e.frustumCulled||G.intersectsSprite(e)){r&&Y.setFromMatrixPosition(e.matrixWorld).applyMatrix4(X);const t=le.update(e),i=e.material;i.visible&&y.push(e,t,i,n,Y.z,null)}}else if((e.isMesh||e.isLine||e.isPoints)&&(!e.frustumCulled||G.intersectsObject(e))){const t=le.update(e),i=e.material;if(r&&(void 0!==e.boundingSphere?(null===e.boundingSphere&&e.computeBoundingSphere(),Y.copy(e.boundingSphere.center)):(null===t.boundingSphere&&t.computeBoundingSphere(),Y.copy(t.boundingSphere.center)),Y.applyMatrix4(e.matrixWorld).applyMatrix4(X)),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&&y.push(e,t,o,n,Y.z,s)}}else i.visible&&y.push(e,t,i,n,Y.z,null)}const i=e.children;for(let e=0,a=i.length;e<a;e++)Je(i[e],t,n,r)}function Ye(e,t,n,r){const i=e.opaque,a=e.transmissive,s=e.transparent;x.setupLightsView(n),!0===V&&pe.setGlobalState(A.clippingPlanes,n),a.length>0&&function(e,t,n,r){const i=$.isWebGL2;null===j&&(j=new fr(1,1,{generateMipmaps:!0,type:Z.has("EXT_color_buffer_half_float")?Re:Ae,minFilter:_e,samples:i?4:0})),A.getDrawingBufferSize(J),i?j.setSize(J.x,J.y):j.setSize(zn(J.x),zn(J.y));const a=A.getRenderTarget();A.setRenderTarget(j),A.getClearColor(L),I=A.getClearAlpha(),I<1&&A.setClearColor(16777215,.5),A.clear();const s=A.toneMapping;A.toneMapping=Q,Ke(e,n,r),re.updateMultisampleRenderTarget(j),re.updateRenderTargetMipmap(j);let o=!1;for(let e=0,i=t.length;e<i;e++){const i=t[e],a=i.object,s=i.geometry,l=i.material,c=i.group;if(l.side===g&&a.layers.test(r.layers)){const e=l.side;l.side=m,l.needsUpdate=!0,qe(a,n,r,s,l,c),l.side=e,l.needsUpdate=!0,o=!0}}!0===o&&(re.updateMultisampleRenderTarget(j),re.updateRenderTargetMipmap(j)),A.setRenderTarget(a),A.setClearColor(L,I),A.toneMapping=s}(i,a,t,n),r&&ee.viewport(R.copy(r)),i.length>0&&Ke(i,t,n),a.length>0&&Ke(a,t,n),s.length>0&&Ke(s,t,n),ee.buffers.depth.setTest(!0),ee.buffers.depth.setMask(!0),ee.buffers.color.setMask(!0),ee.setPolygonOffset(!1)}function Ke(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,c=a.group;s.layers.test(n.layers)&&qe(s,t,n,o,l,c)}}function qe(e,t,n,r,i,a){e.onBeforeRender(A,t,n,r,i,a),e.modelViewMatrix.multiplyMatrices(n.matrixWorldInverse,e.matrixWorld),e.normalMatrix.getNormalMatrix(e.modelViewMatrix),i.onBeforeRender(A,t,n,r,e,a),!0===i.transparent&&i.side===g&&!1===i.forceSinglePass?(i.side=m,i.needsUpdate=!0,A.renderBufferDirect(n,t,r,i,e,a),i.side=f,i.needsUpdate=!0,A.renderBufferDirect(n,t,r,i,e,a),i.side=g):A.renderBufferDirect(n,t,r,i,e,a),e.onAfterRender(A,t,n,r,i,a)}function Qe(e,t,n){!0!==t.isScene&&(t=K);const r=ne.get(e),i=x.state.lights,a=x.state.shadowsArray,s=i.state.version,o=ce.getParameters(e,i.state,a,t,n),l=ce.getProgramCacheKey(o);let c=r.programs;r.environment=e.isMeshStandardMaterial?t.environment:null,r.fog=t.fog,r.envMap=(e.isMeshStandardMaterial?ae:ie).get(e.envMap||r.environment),void 0===c&&(e.addEventListener("dispose",ke),c=new Map,r.programs=c);let u=c.get(l);if(void 0!==u){if(r.currentProgram===u&&r.lightsStateVersion===s)return Ze(e,o),u}else o.uniforms=ce.getUniforms(e),e.onBuild(n,o,A),e.onBeforeCompile(o,A),u=ce.acquireProgram(o,l),c.set(l,u),r.uniforms=o.uniforms;const h=r.uniforms;(e.isShaderMaterial||e.isRawShaderMaterial)&&!0!==e.clipping||(h.clippingPlanes=pe.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=u.getUniforms(),p=ko.seqWithValue(d.seq,h);return r.currentProgram=u,r.uniformsList=p,u}function Ze(e,t){const n=ne.get(e);n.outputColorSpace=t.outputColorSpace,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}Xe.setAnimationLoop((function(e){He&&He(e)})),"undefined"!=typeof self&&Xe.setContext(self),this.setAnimationLoop=function(e){He=e,Fe.setAnimationLoop(e),null===e?Xe.stop():Xe.start()},Fe.addEventListener("sessionstart",We),Fe.addEventListener("sessionend",je),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===M)return;!0===e.matrixWorldAutoUpdate&&e.updateMatrixWorld(),null===t.parent&&!0===t.matrixWorldAutoUpdate&&t.updateMatrixWorld(),!0===Fe.enabled&&!0===Fe.isPresenting&&(!0===Fe.cameraAutoUpdate&&Fe.updateCamera(t),t=Fe.getCamera()),!0===e.isScene&&e.onBeforeRender(A,e,t,w),x=de.get(e,b.length),x.init(),b.push(x),X.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),G.setFromProjectionMatrix(X),W=this.localClippingEnabled,V=pe.init(this.clippingPlanes,W),y=he.get(e,_.length),y.init(),_.push(y),Je(e,t,0,A.sortObjects),y.finish(),!0===A.sortObjects&&y.sort(N,O),this.info.render.frame++,!0===V&&pe.beginShadows();const n=x.state.shadowsArray;if(fe.render(n,e,t),!0===V&&pe.endShadows(),!0===this.info.autoReset&&this.info.reset(),me.render(y,e),x.setupLights(A.useLegacyLights),t.isArrayCamera){const n=t.cameras;for(let t=0,r=n.length;t<r;t++){const r=n[t];Ye(y,e,r,r.viewport)}}else Ye(y,e,t);null!==w&&(re.updateMultisampleRenderTarget(w),re.updateRenderTargetMipmap(w)),!0===e.isScene&&e.onAfterRender(A,e,t),be.resetDefaultState(),T=-1,C=null,b.pop(),x=b.length>0?b[b.length-1]:null,_.pop(),y=_.length>0?_[_.length-1]:null},this.getActiveCubeFace=function(){return S},this.getActiveMipmapLevel=function(){return E},this.getRenderTarget=function(){return w},this.setRenderTargetTextures=function(e,t,n){ne.get(e.texture).__webglTexture=t,ne.get(e.depthTexture).__webglTexture=n;const r=ne.get(e);r.__hasExternalTextures=!0,r.__hasExternalTextures&&(r.__autoAllocateDepthBuffer=void 0===n,r.__autoAllocateDepthBuffer||!0===Z.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=ne.get(e);n.__webglFramebuffer=t,n.__useDefaultFramebuffer=void 0===t},this.setRenderTarget=function(e,t=0,n=0){w=e,S=t,E=n;let r=!0,i=null,a=!1,s=!1;if(e){const n=ne.get(e);void 0!==n.__useDefaultFramebuffer?(ee.bindFramebuffer(Se.FRAMEBUFFER,null),r=!1):void 0===n.__webglFramebuffer?re.setupRenderTarget(e):n.__hasExternalTextures&&re.rebindTextures(e,ne.get(e.texture).__webglTexture,ne.get(e.depthTexture).__webglTexture);const o=e.texture;(o.isData3DTexture||o.isDataArrayTexture||o.isCompressedArrayTexture)&&(s=!0);const l=ne.get(e).__webglFramebuffer;e.isWebGLCubeRenderTarget?(i=l[t],a=!0):i=$.isWebGL2&&e.samples>0&&!1===re.useMultisampledRTT(e)?ne.get(e).__webglMultisampledFramebuffer:l,R.copy(e.viewport),P.copy(e.scissor),B=e.scissorTest}else R.copy(k).multiplyScalar(U).floor(),P.copy(z).multiplyScalar(U).floor(),B=H;if(ee.bindFramebuffer(Se.FRAMEBUFFER,i)&&$.drawBuffers&&r&&ee.drawBuffers(e,i),ee.viewport(R),ee.scissor(P),ee.setScissorTest(B),a){const r=ne.get(e.texture);Se.framebufferTexture2D(Se.FRAMEBUFFER,Se.COLOR_ATTACHMENT0,Se.TEXTURE_CUBE_MAP_POSITIVE_X+t,r.__webglTexture,n)}else if(s){const r=ne.get(e.texture),i=t||0;Se.framebufferTextureLayer(Se.FRAMEBUFFER,Se.COLOR_ATTACHMENT0,r.__webglTexture,n||0,i)}T=-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=ne.get(e).__webglFramebuffer;if(e.isWebGLCubeRenderTarget&&void 0!==s&&(o=o[s]),o){ee.bindFramebuffer(Se.FRAMEBUFFER,o);try{const s=e.texture,o=s.format,l=s.type;if(o!==De&&xe.convert(o)!==Se.getParameter(Se.IMPLEMENTATION_COLOR_READ_FORMAT))return void console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");const c=l===Re&&(Z.has("EXT_color_buffer_half_float")||$.isWebGL2&&Z.has("EXT_color_buffer_float"));if(!(l===Ae||xe.convert(l)===Se.getParameter(Se.IMPLEMENTATION_COLOR_READ_TYPE)||l===Ce&&($.isWebGL2||Z.has("OES_texture_float")||Z.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&&Se.readPixels(t,n,r,i,xe.convert(o),xe.convert(l),a)}finally{const e=null!==w?ne.get(w).__webglFramebuffer:null;ee.bindFramebuffer(Se.FRAMEBUFFER,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);re.setTexture2D(t,0),Se.copyTexSubImage2D(Se.TEXTURE_2D,n,0,0,e.x,e.y,i,a),ee.unbindTexture()},this.copyTextureToTexture=function(e,t,n,r=0){const i=t.image.width,a=t.image.height,s=xe.convert(n.format),o=xe.convert(n.type);re.setTexture2D(n,0),Se.pixelStorei(Se.UNPACK_FLIP_Y_WEBGL,n.flipY),Se.pixelStorei(Se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,n.premultiplyAlpha),Se.pixelStorei(Se.UNPACK_ALIGNMENT,n.unpackAlignment),t.isDataTexture?Se.texSubImage2D(Se.TEXTURE_2D,r,e.x,e.y,i,a,s,o,t.image.data):t.isCompressedTexture?Se.compressedTexSubImage2D(Se.TEXTURE_2D,r,e.x,e.y,t.mipmaps[0].width,t.mipmaps[0].height,s,t.mipmaps[0].data):Se.texSubImage2D(Se.TEXTURE_2D,r,e.x,e.y,s,o,t.image),0===r&&n.generateMipmaps&&Se.generateMipmap(Se.TEXTURE_2D),ee.unbindTexture()},this.copyTextureToTexture3D=function(e,t,n,r,i=0){if(A.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=xe.convert(r.format),c=xe.convert(r.type);let u;if(r.isData3DTexture)re.setTexture3D(r,0),u=Se.TEXTURE_3D;else{if(!r.isDataArrayTexture)return void console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");re.setTexture2DArray(r,0),u=Se.TEXTURE_2D_ARRAY}Se.pixelStorei(Se.UNPACK_FLIP_Y_WEBGL,r.flipY),Se.pixelStorei(Se.UNPACK_PREMULTIPLY_ALPHA_WEBGL,r.premultiplyAlpha),Se.pixelStorei(Se.UNPACK_ALIGNMENT,r.unpackAlignment);const h=Se.getParameter(Se.UNPACK_ROW_LENGTH),d=Se.getParameter(Se.UNPACK_IMAGE_HEIGHT),p=Se.getParameter(Se.UNPACK_SKIP_PIXELS),f=Se.getParameter(Se.UNPACK_SKIP_ROWS),m=Se.getParameter(Se.UNPACK_SKIP_IMAGES),g=n.isCompressedTexture?n.mipmaps[0]:n.image;Se.pixelStorei(Se.UNPACK_ROW_LENGTH,g.width),Se.pixelStorei(Se.UNPACK_IMAGE_HEIGHT,g.height),Se.pixelStorei(Se.UNPACK_SKIP_PIXELS,e.min.x),Se.pixelStorei(Se.UNPACK_SKIP_ROWS,e.min.y),Se.pixelStorei(Se.UNPACK_SKIP_IMAGES,e.min.z),n.isDataTexture||n.isData3DTexture?Se.texSubImage3D(u,i,t.x,t.y,t.z,a,s,o,l,c,g.data):n.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),Se.compressedTexSubImage3D(u,i,t.x,t.y,t.z,a,s,o,l,g.data)):Se.texSubImage3D(u,i,t.x,t.y,t.z,a,s,o,l,c,g),Se.pixelStorei(Se.UNPACK_ROW_LENGTH,h),Se.pixelStorei(Se.UNPACK_IMAGE_HEIGHT,d),Se.pixelStorei(Se.UNPACK_SKIP_PIXELS,p),Se.pixelStorei(Se.UNPACK_SKIP_ROWS,f),Se.pixelStorei(Se.UNPACK_SKIP_IMAGES,m),0===i&&r.generateMipmaps&&Se.generateMipmap(u),ee.unbindTexture()},this.initTexture=function(e){e.isCubeTexture?re.setTextureCube(e,0):e.isData3DTexture?re.setTexture3D(e,0):e.isDataArrayTexture||e.isCompressedArrayTexture?re.setTexture2DArray(e,0):re.setTexture2D(e,0),ee.unbindTexture()},this.resetState=function(){S=0,E=0,w=null,ee.reset(),be.reset()},"undefined"!=typeof __THREE_DEVTOOLS__&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Tn}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(e){console.warn("THREE.WebGLRenderer: the property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!e}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Ht?Ft:Dt}set outputEncoding(e){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=e===Ft?Ht:Gt}}class Dl extends Il{}Dl.prototype.isWebGL1Renderer=!0;class Fl{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Hi(e),this.density=t}clone(){return new Fl(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}}class Ul{constructor(e,t=1,n=1e3){this.isFog=!0,this.name="",this.color=new Hi(e),this.near=t,this.far=n}clone(){return new Ul(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}}class Nl extends Ai{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.object.backgroundBlurriness=this.backgroundBlurriness),1!==this.backgroundIntensity&&(t.object.backgroundIntensity=this.backgroundIntensity),t}}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=mn,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Dn()}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=Dn()),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=Dn()),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 kl=new br;class zl{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++)kl.fromBufferAttribute(this,t),kl.applyMatrix4(e),this.setXYZ(t,kl.x,kl.y,kl.z);return this}applyNormalMatrix(e){for(let t=0,n=this.count;t<n;t++)kl.fromBufferAttribute(this,t),kl.applyNormalMatrix(e),this.setXYZ(t,kl.x,kl.y,kl.z);return this}transformDirection(e){for(let t=0,n=this.count;t<n;t++)kl.fromBufferAttribute(this,t),kl.transformDirection(e),this.setXYZ(t,kl.x,kl.y,kl.z);return this}setX(e,t){return this.normalized&&(t=Gn(t,this.array)),this.data.array[e*this.data.stride+this.offset]=t,this}setY(e,t){return this.normalized&&(t=Gn(t,this.array)),this.data.array[e*this.data.stride+this.offset+1]=t,this}setZ(e,t){return this.normalized&&(t=Gn(t,this.array)),this.data.array[e*this.data.stride+this.offset+2]=t,this}setW(e,t){return this.normalized&&(t=Gn(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=Hn(t,this.array)),t}getY(e){let t=this.data.array[e*this.data.stride+this.offset+1];return this.normalized&&(t=Hn(t,this.array)),t}getZ(e){let t=this.data.array[e*this.data.stride+this.offset+2];return this.normalized&&(t=Hn(t,this.array)),t}getW(e){let t=this.data.array[e*this.data.stride+this.offset+3];return this.normalized&&(t=Hn(t,this.array)),t}setXY(e,t,n){return e=e*this.data.stride+this.offset,this.normalized&&(t=Gn(t,this.array),n=Gn(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=Gn(t,this.array),n=Gn(n,this.array),r=Gn(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=Gn(t,this.array),n=Gn(n,this.array),r=Gn(r,this.array),i=Gn(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 Qi(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 zl(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 Hl extends Ui{constructor(e){super(),this.isSpriteMaterial=!0,this.type="SpriteMaterial",this.color=new Hi(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 Gl;const Vl=new br,Wl=new br,jl=new br,Xl=new Wn,Jl=new Wn,Yl=new Qr,Kl=new br,ql=new br,Ql=new br,Zl=new Wn,$l=new Wn,ec=new Wn;class tc extends Ai{constructor(e){if(super(),this.isSprite=!0,this.type="Sprite",void 0===Gl){Gl=new ma;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);Gl.setIndex([0,1,2,0,2,3]),Gl.setAttribute("position",new zl(t,3,0,!1)),Gl.setAttribute("uv",new zl(t,2,3,!1))}this.geometry=Gl,this.material=void 0!==e?e:new Hl,this.center=new Wn(.5,.5)}raycast(e,t){null===e.camera&&console.error('THREE.Sprite: "Raycaster.camera" needs to be set in order to raycast against sprites.'),Wl.setFromMatrixScale(this.matrixWorld),Yl.copy(e.camera.matrixWorld),this.modelViewMatrix.multiplyMatrices(e.camera.matrixWorldInverse,this.matrixWorld),jl.setFromMatrixPosition(this.modelViewMatrix),e.camera.isPerspectiveCamera&&!1===this.material.sizeAttenuation&&Wl.multiplyScalar(-jl.z);const n=this.material.rotation;let r,i;0!==n&&(i=Math.cos(n),r=Math.sin(n));const a=this.center;nc(Kl.set(-.5,-.5,0),jl,a,Wl,r,i),nc(ql.set(.5,-.5,0),jl,a,Wl,r,i),nc(Ql.set(.5,.5,0),jl,a,Wl,r,i),Zl.set(0,0),$l.set(1,0),ec.set(1,1);let s=e.ray.intersectTriangle(Kl,ql,Ql,!1,Vl);if(null===s&&(nc(ql.set(-.5,.5,0),jl,a,Wl,r,i),$l.set(0,1),s=e.ray.intersectTriangle(Kl,Ql,ql,!1,Vl),null===s))return;const o=e.ray.origin.distanceTo(Vl);o<e.near||o>e.far||t.push({distance:o,point:Vl.clone(),uv:Di.getInterpolation(Vl,Kl,ql,Ql,Zl,$l,ec,new Wn),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 nc(e,t,n,r,i,a){Xl.subVectors(e,n).addScalar(.5).multiply(r),void 0!==i?(Jl.x=a*Xl.x-i*Xl.y,Jl.y=i*Xl.x+a*Xl.y):Jl.copy(Xl),e.copy(t),e.x+=Jl.x,e.y+=Jl.y,e.applyMatrix4(Yl)}const rc=new br,ic=new br;class ac extends Ai{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){rc.setFromMatrixPosition(this.matrixWorld);const n=e.ray.origin.distanceTo(rc);this.getObjectForDistance(n).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){rc.setFromMatrixPosition(e.matrixWorld),ic.setFromMatrixPosition(this.matrixWorld);const n=rc.distanceTo(ic)/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 sc=new br,oc=new pr,lc=new pr,cc=new br,uc=new Qr,hc=new br,dc=new Gr,pc=new Qr,fc=new qr;class mc extends Ia{constructor(e,t){super(e,t),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode="attached",this.bindMatrix=new Qr,this.bindMatrixInverse=new Qr,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const e=this.geometry;null===this.boundingBox&&(this.boundingBox=new Sr),this.boundingBox.makeEmpty();const t=e.getAttribute("position");for(let e=0;e<t.count;e++)hc.fromBufferAttribute(t,e),this.applyBoneTransform(e,hc),this.boundingBox.expandByPoint(hc)}computeBoundingSphere(){const e=this.geometry;null===this.boundingSphere&&(this.boundingSphere=new Gr),this.boundingSphere.makeEmpty();const t=e.getAttribute("position");for(let e=0;e<t.count;e++)hc.fromBufferAttribute(t,e),this.applyBoneTransform(e,hc),this.boundingSphere.expandByPoint(hc)}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,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),this}raycast(e,t){const n=this.material,r=this.matrixWorld;void 0!==n&&(null===this.boundingSphere&&this.computeBoundingSphere(),dc.copy(this.boundingSphere),dc.applyMatrix4(r),!1!==e.ray.intersectsSphere(dc)&&(pc.copy(r).invert(),fc.copy(e.ray).applyMatrix4(pc),null!==this.boundingBox&&!1===fc.intersectsBox(this.boundingBox)||this._computeIntersections(e,t,fc)))}getVertexPosition(e,t){return super.getVertexPosition(e,t),this.applyBoneTransform(e,t),t}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 pr,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)}applyBoneTransform(e,t){const n=this.skeleton,r=this.geometry;oc.fromBufferAttribute(r.attributes.skinIndex,e),lc.fromBufferAttribute(r.attributes.skinWeight,e),sc.copy(t).applyMatrix4(this.bindMatrix),t.set(0,0,0);for(let e=0;e<4;e++){const r=lc.getComponent(e);if(0!==r){const i=oc.getComponent(e);uc.multiplyMatrices(n.bones[i].matrixWorld,n.boneInverses[i]),t.addScaledVector(cc.copy(sc).applyMatrix4(uc),r)}}return t.applyMatrix4(this.bindMatrixInverse)}boneTransform(e,t){return console.warn("THREE.SkinnedMesh: .boneTransform() was renamed to .applyBoneTransform() in r151."),this.applyBoneTransform(e,t)}}class gc extends Ai{constructor(){super(),this.isBone=!0,this.type="Bone"}}class vc extends dr{constructor(e=null,t=1,n=1,r,i,a,s,o,l=de,c=de,u,h){super(null,a,s,o,l,c,r,i,u,h),this.isDataTexture=!0,this.image={data:e,width:t,height:n},this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}const yc=new Qr,xc=new Qr;class _c{constructor(e=[],t=[]){this.uuid=Dn(),this.bones=e.slice(0),this.boneInverses=t,this.boneMatrices=null,this.boneTexture=null,this.boneTextureSize=0,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 Qr)}}calculateInverses(){this.boneInverses.length=0;for(let e=0,t=this.bones.length;e<t;e++){const t=new Qr;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:xc;yc.multiplyMatrices(i,t[r]),yc.toArray(n,16*r)}null!==r&&(r.needsUpdate=!0)}clone(){return new _c(this.bones,this.boneInverses)}computeBoneTexture(){let e=Math.sqrt(4*this.bones.length);e=kn(e),e=Math.max(e,4);const t=new Float32Array(e*e*4);t.set(this.boneMatrices);const n=new vc(t,e,e,De,Ce);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 gc),this.bones.push(i),this.boneInverses.push((new Qr).fromArray(e.boneInverses[n]))}return this.init(),this}toJSON(){const e={metadata:{version:4.6,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 bc extends Qi{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 Ac=new Qr,Mc=new Qr,Sc=[],Ec=new Sr,wc=new Qr,Tc=new Ia,Cc=new Gr;class Rc extends Ia{constructor(e,t,n){super(e,t),this.isInstancedMesh=!0,this.instanceMatrix=new bc(new Float32Array(16*n),16),this.instanceColor=null,this.count=n,this.boundingBox=null,this.boundingSphere=null;for(let e=0;e<n;e++)this.setMatrixAt(e,wc)}computeBoundingBox(){const e=this.geometry,t=this.count;null===this.boundingBox&&(this.boundingBox=new Sr),null===e.boundingBox&&e.computeBoundingBox(),this.boundingBox.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Ac),Ec.copy(e.boundingBox).applyMatrix4(Ac),this.boundingBox.union(Ec)}computeBoundingSphere(){const e=this.geometry,t=this.count;null===this.boundingSphere&&(this.boundingSphere=new Gr),null===e.boundingSphere&&e.computeBoundingSphere(),this.boundingSphere.makeEmpty();for(let n=0;n<t;n++)this.getMatrixAt(n,Ac),Cc.copy(e.boundingSphere).applyMatrix4(Ac),this.boundingSphere.union(Cc)}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,null!==e.boundingBox&&(this.boundingBox=e.boundingBox.clone()),null!==e.boundingSphere&&(this.boundingSphere=e.boundingSphere.clone()),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(Tc.geometry=this.geometry,Tc.material=this.material,void 0!==Tc.material&&(null===this.boundingSphere&&this.computeBoundingSphere(),Cc.copy(this.boundingSphere),Cc.applyMatrix4(n),!1!==e.ray.intersectsSphere(Cc)))for(let i=0;i<r;i++){this.getMatrixAt(i,Ac),Mc.multiplyMatrices(n,Ac),Tc.matrixWorld=Mc,Tc.raycast(e,Sc);for(let e=0,n=Sc.length;e<n;e++){const n=Sc[e];n.instanceId=i,n.object=this,t.push(n)}Sc.length=0}}setColorAt(e,t){null===this.instanceColor&&(this.instanceColor=new bc(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 Pc extends Ui{constructor(e){super(),this.isLineBasicMaterial=!0,this.type="LineBasicMaterial",this.color=new Hi(16777215),this.map=null,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.map=e.map,this.linewidth=e.linewidth,this.linecap=e.linecap,this.linejoin=e.linejoin,this.fog=e.fog,this}}const Bc=new br,Lc=new br,Ic=new Qr,Dc=new qr,Fc=new Gr;class Uc extends Ai{constructor(e=new ma,t=new Pc){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++)Bc.fromBufferAttribute(t,e-1),Lc.fromBufferAttribute(t,e),n[e]=n[e-1],n[e]+=Bc.distanceTo(Lc);e.setAttribute("lineDistance",new sa(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(),Fc.copy(n.boundingSphere),Fc.applyMatrix4(r),Fc.radius+=i,!1===e.ray.intersectsSphere(Fc))return;Ic.copy(r).invert(),Dc.copy(e.ray).applyMatrix4(Ic);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,l=new br,c=new br,u=new br,h=new br,d=this.isLineSegments?2:1,p=n.index,f=n.attributes.position;if(null!==p)for(let n=Math.max(0,a.start),r=Math.min(p.count,a.start+a.count)-1;n<r;n+=d){const r=p.getX(n),i=p.getX(n+1);if(l.fromBufferAttribute(f,r),c.fromBufferAttribute(f,i),Dc.distanceSqToSegment(l,c,h,u)>o)continue;h.applyMatrix4(this.matrixWorld);const a=e.ray.origin.distanceTo(h);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(f.count,a.start+a.count)-1;n<r;n+=d){if(l.fromBufferAttribute(f,n),c.fromBufferAttribute(f,n+1),Dc.distanceSqToSegment(l,c,h,u)>o)continue;h.applyMatrix4(this.matrixWorld);const r=e.ray.origin.distanceTo(h);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 Nc=new br,Oc=new br;class kc extends Uc{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)Nc.fromBufferAttribute(t,e),Oc.fromBufferAttribute(t,e+1),n[e]=0===e?0:n[e-1],n[e+1]=n[e]+Nc.distanceTo(Oc);e.setAttribute("lineDistance",new sa(n,1))}else console.warn("THREE.LineSegments.computeLineDistances(): Computation only possible with non-indexed BufferGeometry.");return this}}class zc extends Uc{constructor(e,t){super(e,t),this.isLineLoop=!0,this.type="LineLoop"}}class Hc extends Ui{constructor(e){super(),this.isPointsMaterial=!0,this.type="PointsMaterial",this.color=new Hi(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 Gc=new Qr,Vc=new qr,Wc=new Gr,jc=new br;class Xc extends Ai{constructor(e=new ma,t=new Hc){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(),Wc.copy(n.boundingSphere),Wc.applyMatrix4(r),Wc.radius+=i,!1===e.ray.intersectsSphere(Wc))return;Gc.copy(r).invert(),Vc.copy(e.ray).applyMatrix4(Gc);const s=i/((this.scale.x+this.scale.y+this.scale.z)/3),o=s*s,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);jc.fromBufferAttribute(c,i),Jc(jc,i,o,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++)jc.fromBufferAttribute(c,n),Jc(jc,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 Jc(e,t,n,r,i,a,s){const o=Vc.distanceSqToPoint(e);if(o<n){const n=new br;Vc.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 Yc extends dr{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 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 Kc extends dr{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=de,this.minFilter=de,this.generateMipmaps=!1,this.needsUpdate=!0}}class qc extends dr{constructor(e,t,n,r,i,a,s,o,l,c,u,h){super(null,a,s,o,l,c,r,i,u,h),this.isCompressedTexture=!0,this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class Qc extends qc{constructor(e,t,n,r,i,a){super(e,t,n,i,a),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=ue}}class Zc extends dr{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 $c{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 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),s=this.getPoint(i),o=t||(a.isVector2?new Wn:new br);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 br,r=[],i=[],a=[],s=new br,o=new Qr;for(let t=0;t<=e;t++){const n=t/e;r[t]=this.getTangentAt(n,new br)}i[0]=new br,a[0]=new br;let l=Number.MAX_VALUE;const c=Math.abs(r[0].x),u=Math.abs(r[0].y),h=Math.abs(r[0].z);c<=l&&(l=c,n.set(1,0,0)),u<=l&&(l=u,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(Fn(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(Fn(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.6,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}}class eu extends $c{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 Wn,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 tu extends eu{constructor(e,t,n,r,i,a){super(e,t,n,n,r,i,a),this.isArcCurve=!0,this.type="ArcCurve"}}function nu(){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,c=(n-t)/s-(r-t)/(s+o)+(r-n)/o;l*=s,c*=s,i(t,n,l,c)},calc:function(i){const a=i*i;return e+t*i+n*a+r*(a*i)}}}const ru=new br,iu=new nu,au=new nu,su=new nu;class ou extends $c{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 br){const n=t,r=this.points,i=r.length,a=(i-(this.closed?0:1))*e;let s,o,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?s=r[(l-1)%i]:(ru.subVectors(r[0],r[1]).add(r[0]),s=ru);const u=r[l%i],h=r[(l+1)%i];if(this.closed||l+2<i?o=r[(l+2)%i]:(ru.subVectors(r[i-1],r[i-2]).add(r[i-1]),o=ru),"centripetal"===this.curveType||"chordal"===this.curveType){const e="chordal"===this.curveType?.5:.25;let t=Math.pow(s.distanceToSquared(u),e),n=Math.pow(u.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),iu.initNonuniformCatmullRom(s.x,u.x,h.x,o.x,t,n,r),au.initNonuniformCatmullRom(s.y,u.y,h.y,o.y,t,n,r),su.initNonuniformCatmullRom(s.z,u.z,h.z,o.z,t,n,r)}else"catmullrom"===this.curveType&&(iu.initCatmullRom(s.x,u.x,h.x,o.x,this.tension),au.initCatmullRom(s.y,u.y,h.y,o.y,this.tension),su.initCatmullRom(s.z,u.z,h.z,o.z,this.tension));return n.set(iu.calc(c),au.calc(c),su.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 br).fromArray(n))}return this.closed=e.closed,this.curveType=e.curveType,this.tension=e.tension,this}}function lu(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 uu(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 hu extends $c{constructor(e=new Wn,t=new Wn,n=new Wn,r=new Wn){super(),this.isCubicBezierCurve=!0,this.type="CubicBezierCurve",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new Wn){const n=t,r=this.v0,i=this.v1,a=this.v2,s=this.v3;return n.set(uu(e,r.x,i.x,a.x,s.x),uu(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 du extends $c{constructor(e=new br,t=new br,n=new br,r=new br){super(),this.isCubicBezierCurve3=!0,this.type="CubicBezierCurve3",this.v0=e,this.v1=t,this.v2=n,this.v3=r}getPoint(e,t=new br){const n=t,r=this.v0,i=this.v1,a=this.v2,s=this.v3;return n.set(uu(e,r.x,i.x,a.x,s.x),uu(e,r.y,i.y,a.y,s.y),uu(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 $c{constructor(e=new Wn,t=new Wn){super(),this.isLineCurve=!0,this.type="LineCurve",this.v1=e,this.v2=t}getPoint(e,t=new Wn){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=new Wn){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(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 fu extends $c{constructor(e=new br,t=new br){super(),this.isLineCurve3=!0,this.type="LineCurve3",this.v1=e,this.v2=t}getPoint(e,t=new br){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=new br){return t.subVectors(this.v2,this.v1).normalize()}getTangentAt(e,t){return this.getTangent(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 mu extends $c{constructor(e=new Wn,t=new Wn,n=new Wn){super(),this.isQuadraticBezierCurve=!0,this.type="QuadraticBezierCurve",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new Wn){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 gu extends $c{constructor(e=new br,t=new br,n=new br){super(),this.isQuadraticBezierCurve3=!0,this.type="QuadraticBezierCurve3",this.v0=e,this.v1=t,this.v2=n}getPoint(e,t=new br){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 vu extends $c{constructor(e=[]){super(),this.isSplineCurve=!0,this.type="SplineCurve",this.points=e}getPoint(e,t=new Wn){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],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(lu(s,o.x,l.x,c.x,u.x),lu(s,o.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 Wn).fromArray(n))}return this}}var yu=Object.freeze({__proto__:null,ArcCurve:tu,CatmullRomCurve3:ou,CubicBezierCurve:hu,CubicBezierCurve3:du,EllipseCurve:eu,LineCurve:pu,LineCurve3:fu,QuadraticBezierCurve:mu,QuadraticBezierCurve3:gu,SplineCurve:vu});class xu extends $c{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 yu[n.type]).fromJSON(n))}return this}}class _u extends xu{constructor(e){super(),this.type="Path",this.currentPoint=new Wn,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 Wn(e,t));return this.curves.push(n),this.currentPoint.set(e,t),this}quadraticCurveTo(e,t,n,r){const i=new mu(this.currentPoint.clone(),new Wn(e,t),new Wn(n,r));return this.curves.push(i),this.currentPoint.set(n,r),this}bezierCurveTo(e,t,n,r,i,a){const s=new hu(this.currentPoint.clone(),new Wn(e,t),new Wn(n,r),new Wn(i,a));return this.curves.push(s),this.currentPoint.set(i,a),this}splineThru(e){const t=[this.currentPoint.clone()].concat(e),n=new vu(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,c=this.currentPoint.y;return this.absellipse(e+l,t+c,n,r,i,a,s,o),this}absellipse(e,t,n,r,i,a,s,o){const l=new eu(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 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 bu extends ma{constructor(e=[new Wn(0,-.5),new Wn(.5,0),new Wn(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=Fn(r,0,2*Math.PI);const i=[],a=[],s=[],o=[],l=[],c=1/t,u=new br,h=new Wn,d=new br,p=new br,f=new br;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,f.copy(d),d.normalize(),o.push(d.x,d.y,d.z);break;case e.length-1:o.push(f.x,f.y,f.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,p.copy(d),d.x+=f.x,d.y+=f.y,d.z+=f.z,d.normalize(),o.push(d.x,d.y,d.z),f.copy(p)}for(let i=0;i<=t;i++){const d=n+i*c*r,p=Math.sin(d),f=Math.cos(d);for(let n=0;n<=e.length-1;n++){u.x=e[n].x*p,u.y=e[n].y,u.z=e[n].x*f,a.push(u.x,u.y,u.z),h.x=i/t,h.y=n/(e.length-1),s.push(h.x,h.y);const r=o[3*n+0]*p,c=o[3*n+1],d=o[3*n+0]*f;l.push(r,c,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 sa(a,3)),this.setAttribute("uv",new sa(s,2)),this.setAttribute("normal",new sa(l,3))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new bu(e.points,e.segments,e.phiStart,e.phiLength)}}class Au extends bu{constructor(e=1,t=1,n=4,r=8){const i=new _u;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 Au(e.radius,e.length,e.capSegments,e.radialSegments)}}class Mu extends ma{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 br,c=new Wn;a.push(0,0,0),s.push(0,0,1),o.push(.5,.5);for(let i=0,u=3;i<=t;i++,u+=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),c.x=(a[u]/e+1)/2,c.y=(a[u+1]/e+1)/2,o.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 sa(a,3)),this.setAttribute("normal",new sa(s,3)),this.setAttribute("uv",new sa(o,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Mu(e.radius,e.segments,e.thetaStart,e.thetaLength)}}class Su extends ma{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 c=[],u=[],h=[],d=[];let p=0;const f=[],m=n/2;let g=0;function v(n){const i=p,a=new Wn,f=new br;let v=0;const y=!0===n?e:t,x=!0===n?1:-1;for(let e=1;e<=r;e++)u.push(0,m*x,0),h.push(0,x,0),d.push(.5,.5),p++;const _=p;for(let e=0;e<=r;e++){const t=e/r*o+s,n=Math.cos(t),i=Math.sin(t);f.x=y*i,f.y=m*x,f.z=y*n,u.push(f.x,f.y,f.z),h.push(0,x,0),a.x=.5*n+.5,a.y=.5*i*x+.5,d.push(a.x,a.y),p++}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 br,v=new br;let y=0;const x=(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*o+s,l=Math.sin(i),f=Math.cos(i);v.x=y*l,v.y=-g*n+m,v.z=y*f,u.push(v.x,v.y,v.z),a.set(l,x,f).normalize(),h.push(a.x,a.y,a.z),d.push(t,1-g),c.push(p++)}f.push(c)}for(let e=0;e<r;e++)for(let t=0;t<i;t++){const n=f[t][e],r=f[t+1][e],i=f[t+1][e+1],a=f[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 sa(u,3)),this.setAttribute("normal",new sa(h,3)),this.setAttribute("uv",new sa(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new Su(e.radiusTop,e.radiusBottom,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class Eu extends Su{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 Eu(e.radius,e.height,e.radialSegments,e.heightSegments,e.openEnded,e.thetaStart,e.thetaLength)}}class wu extends ma{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 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 br,r=new br,i=new br;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 br;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 br;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,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 br,t=new br,n=new br,r=new br,s=new Wn,o=new Wn,l=new Wn;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 p=u(r);c(s,d+0,e,p),c(o,d+2,t,p),c(l,d+4,n,p)}})(),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 sa(i,3)),this.setAttribute("normal",new sa(i.slice(),3)),this.setAttribute("uv",new sa(a,2)),0===r?this.computeVertexNormals():this.normalizeNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new wu(e.vertices,e.indices,e.radius,e.details)}}class Tu extends wu{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 Tu(e.radius,e.detail)}}const Cu=new br,Ru=new br,Pu=new br,Bu=new Di;class Lu extends ma{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(Ln*t),a=e.getIndex(),s=e.getAttribute("position"),o=a?a.count:s.count,l=[0,0,0],c=["a","b","c"],u=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}=Bu;if(t.fromBufferAttribute(s,l[0]),n.fromBufferAttribute(s,l[1]),o.fromBufferAttribute(s,l[2]),Bu.getNormal(Pu),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(o.x*r)},${Math.round(o.y*r)},${Math.round(o.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=Bu[c[e]],s=Bu[c[t]],o=`${n}_${r}`,p=`${r}_${n}`;p in h&&h[p]?(Pu.dot(h[p].normal)<=i&&(d.push(a.x,a.y,a.z),d.push(s.x,s.y,s.z)),h[p]=null):o in h||(h[o]={index0:l[e],index1:l[t],normal:Pu.clone()})}}for(const e in h)if(h[e]){const{index0:t,index1:n}=h[e];Cu.fromBufferAttribute(s,t),Ru.fromBufferAttribute(s,n),d.push(Cu.x,Cu.y,Cu.z),d.push(Ru.x,Ru.y,Ru.z)}this.setAttribute("position",new sa(d,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}class Iu extends _u{constructor(e){super(e),this.uuid=Dn(),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 _u).fromJSON(n))}return this}}function Du(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=th(a,e[a],e[a+1],s);else for(a=n-r;a>=t;a-=r)s=th(a,e[a],e[a+1],s);return s&&Ku(s,s.next)&&(nh(s),s=s.next),s}function Fu(e,t){if(!e)return e;t||(t=e);let n,r=e;do{if(n=!1,r.steiner||!Ku(r,r.next)&&0!==Yu(r.prev,r,r.next))r=r.next;else{if(nh(r),r=t=r.prev,r===r.next)break;n=!0}}while(n||r!==t);return t}function Uu(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=Wu(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,c=1;do{for(n=e,e=null,a=null,s=0;n;){for(s++,r=n,o=0,t=0;t<c&&(o++,r=r.nextZ,r);t++);for(l=c;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,c*=2}while(s>1)}(i)}(e,r,i,a);let o,l,c=e;for(;e.prev!==e.next;)if(o=e.prev,l=e.next,a?Ou(e,r,i,a):Nu(e))t.push(o.i/n|0),t.push(e.i/n|0),t.push(l.i/n|0),nh(e),e=l.next,c=l.next;else if((e=l)===c){s?1===s?Uu(e=ku(Fu(e),t,n),t,n,r,i,a,2):2===s&&zu(e,t,n,r,i,a):Uu(Fu(e),t,n,r,i,a,1);break}}function Nu(e){const t=e.prev,n=e,r=e.next;if(Yu(t,n,r)>=0)return!1;const i=t.x,a=n.x,s=r.x,o=t.y,l=n.y,c=r.y,u=i<a?i<s?i:s:a<s?a:s,h=o<l?o<c?o:c:l<c?l:c,d=i>a?i>s?i:s:a>s?a:s,p=o>l?o>c?o:c:l>c?l:c;let f=r.next;for(;f!==t;){if(f.x>=u&&f.x<=d&&f.y>=h&&f.y<=p&&Xu(i,o,a,l,s,c,f.x,f.y)&&Yu(f.prev,f,f.next)>=0)return!1;f=f.next}return!0}function Ou(e,t,n,r){const i=e.prev,a=e,s=e.next;if(Yu(i,a,s)>=0)return!1;const o=i.x,l=a.x,c=s.x,u=i.y,h=a.y,d=s.y,p=o<l?o<c?o:c:l<c?l:c,f=u<h?u<d?u:d:h<d?h:d,m=o>l?o>c?o:c:l>c?l:c,g=u>h?u>d?u:d:h>d?h:d,v=Wu(p,f,t,n,r),y=Wu(m,g,t,n,r);let x=e.prevZ,_=e.nextZ;for(;x&&x.z>=v&&_&&_.z<=y;){if(x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==i&&x!==s&&Xu(o,u,l,h,c,d,x.x,x.y)&&Yu(x.prev,x,x.next)>=0)return!1;if(x=x.prevZ,_.x>=p&&_.x<=m&&_.y>=f&&_.y<=g&&_!==i&&_!==s&&Xu(o,u,l,h,c,d,_.x,_.y)&&Yu(_.prev,_,_.next)>=0)return!1;_=_.nextZ}for(;x&&x.z>=v;){if(x.x>=p&&x.x<=m&&x.y>=f&&x.y<=g&&x!==i&&x!==s&&Xu(o,u,l,h,c,d,x.x,x.y)&&Yu(x.prev,x,x.next)>=0)return!1;x=x.prevZ}for(;_&&_.z<=y;){if(_.x>=p&&_.x<=m&&_.y>=f&&_.y<=g&&_!==i&&_!==s&&Xu(o,u,l,h,c,d,_.x,_.y)&&Yu(_.prev,_,_.next)>=0)return!1;_=_.nextZ}return!0}function ku(e,t,n){let r=e;do{const i=r.prev,a=r.next.next;!Ku(i,a)&&qu(i,r,r.next,a)&&$u(i,a)&&$u(a,i)&&(t.push(i.i/n|0),t.push(r.i/n|0),t.push(a.i/n|0),nh(r),nh(r.next),r=e=a),r=r.next}while(r!==e);return Fu(r)}function zu(e,t,n,r,i,a){let s=e;do{let e=s.next.next;for(;e!==s.prev;){if(s.i!==e.i&&Ju(s,e)){let o=eh(s,e);return s=Fu(s,s.next),o=Fu(o,o.next),Uu(s,t,n,r,i,a,0),void Uu(o,t,n,r,i,a,0)}e=e.next}s=s.next}while(s!==e)}function Hu(e,t){return e.x-t.x}function Gu(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,c=n.y;let u,h=1/0;r=n;do{a>=r.x&&r.x>=l&&a!==r.x&&Xu(s<c?a:i,s,l,c,s<c?i:a,s,r.x,r.y)&&(u=Math.abs(s-r.y)/(a-r.x),$u(r,e)&&(u<h||u===h&&(r.x>n.x||r.x===n.x&&Vu(n,r)))&&(n=r,h=u)),r=r.next}while(r!==o);return n}(e,t);if(!n)return t;const r=eh(n,e);return Fu(r,r.next),Fu(n,n.next)}function Vu(e,t){return Yu(e.prev,e,t.prev)<0&&Yu(t.next,e,e.next)<0}function Wu(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 ju(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 Xu(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 Ju(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&&qu(n,n.next,e,t))return!0;n=n.next}while(n!==e);return!1}(e,t)&&($u(e,t)&&$u(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)&&(Yu(e.prev,e,t.prev)||Yu(e,t.prev,t))||Ku(e,t)&&Yu(e.prev,e,e.next)>0&&Yu(t.prev,t,t.next)>0)}function Yu(e,t,n){return(t.y-e.y)*(n.x-t.x)-(t.x-e.x)*(n.y-t.y)}function Ku(e,t){return e.x===t.x&&e.y===t.y}function qu(e,t,n,r){const i=Zu(Yu(e,t,n)),a=Zu(Yu(e,t,r)),s=Zu(Yu(n,r,e)),o=Zu(Yu(n,r,t));return i!==a&&s!==o||!(0!==i||!Qu(e,n,t))||!(0!==a||!Qu(e,r,t))||!(0!==s||!Qu(n,e,r))||!(0!==o||!Qu(n,t,r))}function Qu(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 Zu(e){return e>0?1:e<0?-1:0}function $u(e,t){return Yu(e.prev,e,e.next)<0?Yu(e,t,e.next)>=0&&Yu(e,e.prev,t)>=0:Yu(e,t,e.prev)<0||Yu(e,e.next,t)<0}function eh(e,t){const n=new rh(e.i,e.x,e.y),r=new rh(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 th(e,t,n,r){const i=new rh(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 nh(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 rh(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 ih{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 ih.area(e)<0}static triangulateShape(e,t){const n=[],r=[],i=[];ah(e),sh(n,e);let a=e.length;t.forEach(ah);for(let e=0;e<t.length;e++)r.push(a),a+=t[e].length,sh(n,t[e]);const s=function(e,t,n=2){const r=t&&t.length,i=r?t[0]*n:e.length;let a=Du(e,0,i,n,!0);const s=[];if(!a||a.next===a.prev)return s;let o,l,c,u,h,d,p;if(r&&(a=function(e,t,n,r){const i=[];let a,s,o,l,c;for(a=0,s=t.length;a<s;a++)o=t[a]*r,l=a<s-1?t[a+1]*r:e.length,c=Du(e,o,l,r,!1),c===c.next&&(c.steiner=!0),i.push(ju(c));for(i.sort(Hu),a=0;a<i.length;a++)n=Gu(i[a],n);return n}(e,t,a,n)),e.length>80*n){o=c=e[0],l=u=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>c&&(c=h),d>u&&(u=d);p=Math.max(c-o,u-l),p=0!==p?32767/p:0}return Uu(a,s,n,o,l,p,0),s}(n,r);for(let e=0;e<s.length;e+=3)i.push(s.slice(e,e+3));return i}}function ah(e){const t=e.length;t>2&&e[t-1].equals(e[0])&&e.pop()}function sh(e,t){for(let n=0;n<t.length;n++)e.push(t[n].x),e.push(t[n].y)}class oh extends ma{constructor(e=new Iu([new Wn(.5,.5),new Wn(-.5,.5),new Wn(-.5,-.5),new Wn(.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 c=void 0===t.bevelEnabled||t.bevelEnabled,u=void 0!==t.bevelThickness?t.bevelThickness:.2,h=void 0!==t.bevelSize?t.bevelSize:u-.1,d=void 0!==t.bevelOffset?t.bevelOffset:0,p=void 0!==t.bevelSegments?t.bevelSegments:3;const f=t.extrudePath,m=void 0!==t.UVGenerator?t.UVGenerator:lh;let g,v,y,x,_,b=!1;f&&(g=f.getSpacedPoints(o),b=!0,c=!1,v=f.computeFrenetFrames(o,!1),y=new br,x=new br,_=new br),c||(p=0,u=0,h=0,d=0);const A=e.extractPoints(s);let M=A.shape;const S=A.holes;if(!ih.isClockWise(M)){M=M.reverse();for(let e=0,t=S.length;e<t;e++){const t=S[e];ih.isClockWise(t)&&(S[e]=t.reverse())}}const E=ih.triangulateShape(M,S),w=M;for(let e=0,t=S.length;e<t;e++){const t=S[e];M=M.concat(t)}function T(e,t,n){return t||console.error("THREE.ExtrudeGeometry: vec does not exist"),e.clone().addScaledVector(t,n)}const C=M.length,R=E.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,c=n.y-e.y,u=s*s+o*o,h=s*c-o*l;if(Math.abs(h)>Number.EPSILON){const h=Math.sqrt(u),d=Math.sqrt(l*l+c*c),p=t.x-o/h,f=t.y+s/h,m=((n.x-c/d-p)*c-(n.y+l/d-f)*l)/(s*c-o*l);r=p+s*m-e.x,i=f+o*m-e.y;const g=r*r+i*i;if(g<=2)return new Wn(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(c)&&(e=!0),e?(r=-o,i=s,a=Math.sqrt(u)):(r=s,i=o,a=Math.sqrt(u/2))}return new Wn(r/a,i/a)}const B=[];for(let e=0,t=w.length,n=t-1,r=e+1;e<t;e++,n++,r++)n===t&&(n=0),r===t&&(r=0),B[e]=P(w[e],w[n],w[r]);const L=[];let I,D=B.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]=P(t[e],t[r],t[i]);L.push(I),D=D.concat(I)}for(let e=0;e<p;e++){const t=e/p,n=u*Math.cos(t*Math.PI/2),r=h*Math.sin(t*Math.PI/2)+d;for(let e=0,t=w.length;e<t;e++){const t=T(w[e],B[e],r);N(t.x,t.y,-n)}for(let e=0,t=S.length;e<t;e++){const t=S[e];I=L[e];for(let e=0,i=t.length;e<i;e++){const i=T(t[e],I[e],r);N(i.x,i.y,-n)}}}const F=h+d;for(let e=0;e<C;e++){const t=c?T(M[e],D[e],F):M[e];b?(x.copy(v.normals[0]).multiplyScalar(t.x),y.copy(v.binormals[0]).multiplyScalar(t.y),_.copy(g[0]).add(x).add(y),N(_.x,_.y,_.z)):N(t.x,t.y,0)}for(let e=1;e<=o;e++)for(let t=0;t<C;t++){const n=c?T(M[t],D[t],F):M[t];b?(x.copy(v.normals[e]).multiplyScalar(n.x),y.copy(v.binormals[e]).multiplyScalar(n.y),_.copy(g[e]).add(x).add(y),N(_.x,_.y,_.z)):N(n.x,n.y,l/o*e)}for(let e=p-1;e>=0;e--){const t=e/p,n=u*Math.cos(t*Math.PI/2),r=h*Math.sin(t*Math.PI/2)+d;for(let e=0,t=w.length;e<t;e++){const t=T(w[e],B[e],r);N(t.x,t.y,l+n)}for(let e=0,t=S.length;e<t;e++){const t=S[e];I=L[e];for(let e=0,i=t.length;e<i;e++){const i=T(t[e],I[e],r);b?N(i.x,i.y+g[o-1].y,g[o-1].x+n):N(i.x,i.y,l+n)}}}function U(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*p;e<n;e++){const n=C*e,a=C*(e+1);k(t+r+n,t+i+n,t+i+a,t+r+a)}}}function N(e,t,n){a.push(e),a.push(t),a.push(n)}function O(e,t,i){z(e),z(t),z(i);const a=r.length/3,s=m.generateTopUV(n,r,a-3,a-2,a-1);H(s[0]),H(s[1]),H(s[2])}function k(e,t,i,a){z(e),z(t),z(a),z(t),z(i),z(a);const s=r.length/3,o=m.generateSideWallUV(n,r,s-6,s-3,s-2,s-1);H(o[0]),H(o[1]),H(o[3]),H(o[1]),H(o[2]),H(o[3])}function z(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=C*e;for(let e=0;e<R;e++){const n=E[e];O(n[2]+t,n[1]+t,n[0]+t)}e=o+2*p,t=C*e;for(let e=0;e<R;e++){const n=E[e];O(n[0]+t,n[1]+t,n[2]+t)}}else{for(let e=0;e<R;e++){const t=E[e];O(t[2],t[1],t[0])}for(let e=0;e<R;e++){const t=E[e];O(t[0]+C*o,t[1]+C*o,t[2]+C*o)}}n.addGroup(e,r.length/3-e,0)}(),function(){const e=r.length/3;let t=0;U(w,t),t+=w.length;for(let e=0,n=S.length;e<n;e++){const n=S[e];U(n,t),t+=n.length}n.addGroup(e,r.length/3-e,1)}()}this.setAttribute("position",new sa(r,3)),this.setAttribute("uv",new sa(i,2)),this.computeVertexNormals()}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}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 yu[r.type]).fromJSON(r)),new oh(n,e.options)}}const lh={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],c=t[3*i],u=t[3*i+1];return[new Wn(a,s),new Wn(o,l),new Wn(c,u)]},generateSideWallUV:function(e,t,n,r,i,a){const s=t[3*n],o=t[3*n+1],l=t[3*n+2],c=t[3*r],u=t[3*r+1],h=t[3*r+2],d=t[3*i],p=t[3*i+1],f=t[3*i+2],m=t[3*a],g=t[3*a+1],v=t[3*a+2];return Math.abs(o-u)<Math.abs(s-c)?[new Wn(s,1-l),new Wn(c,1-h),new Wn(d,1-f),new Wn(m,1-v)]:[new Wn(o,1-l),new Wn(u,1-h),new Wn(p,1-f),new Wn(g,1-v)]}};class ch extends wu{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 ch(e.radius,e.detail)}}class uh extends wu{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 uh(e.radius,e.detail)}}class hh extends ma{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=[],c=[];let u=e;const h=(t-e)/(r=Math.max(1,r)),d=new br,p=new Wn;for(let e=0;e<=r;e++){for(let e=0;e<=n;e++){const r=i+e/n*a;d.x=u*Math.cos(r),d.y=u*Math.sin(r),o.push(d.x,d.y,d.z),l.push(0,0,1),p.x=(d.x/t+1)/2,p.y=(d.y/t+1)/2,c.push(p.x,p.y)}u+=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 sa(o,3)),this.setAttribute("normal",new sa(l,3)),this.setAttribute("uv",new sa(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new hh(e.innerRadius,e.outerRadius,e.thetaSegments,e.phiSegments,e.thetaStart,e.thetaLength)}}class dh extends ma{constructor(e=new Iu([new Wn(0,.5),new Wn(-.5,-.5),new Wn(.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 c=l.shape;const u=l.holes;!1===ih.isClockWise(c)&&(c=c.reverse());for(let e=0,t=u.length;e<t;e++){const t=u[e];!0===ih.isClockWise(t)&&(u[e]=t.reverse())}const h=ih.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=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 sa(r,3)),this.setAttribute("normal",new sa(i,3)),this.setAttribute("uv",new sa(a,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}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 dh(n,e.curveSegments)}}class ph extends ma{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 c=[],u=new br,h=new br,d=[],p=[],f=[],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;u.x=-e*Math.cos(r+o*i)*Math.sin(a+v*s),u.y=e*Math.cos(a+v*s),u.z=e*Math.sin(r+o*i)*Math.sin(a+v*s),p.push(u.x,u.y,u.z),h.copy(u).normalize(),f.push(h.x,h.y,h.z),m.push(o+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],s=c[e+1][r],l=c[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 sa(p,3)),this.setAttribute("normal",new sa(f,3)),this.setAttribute("uv",new sa(m,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new ph(e.radius,e.widthSegments,e.heightSegments,e.phiStart,e.phiLength,e.thetaStart,e.thetaLength)}}class fh extends wu{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 fh(e.radius,e.detail)}}class mh extends ma{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=[],c=new br,u=new br,h=new br;for(let a=0;a<=n;a++)for(let d=0;d<=r;d++){const p=d/r*i,f=a/n*Math.PI*2;u.x=(e+t*Math.cos(f))*Math.cos(p),u.y=(e+t*Math.cos(f))*Math.sin(p),u.z=t*Math.sin(f),s.push(u.x,u.y,u.z),c.x=e*Math.cos(p),c.y=e*Math.sin(p),h.subVectors(u,c).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 sa(s,3)),this.setAttribute("normal",new sa(o,3)),this.setAttribute("uv",new sa(l,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new mh(e.radius,e.tube,e.radialSegments,e.tubularSegments,e.arc)}}class gh extends ma{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=[],c=[],u=new br,h=new br,d=new br,p=new br,f=new br,m=new br,g=new br;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,p),m.subVectors(p,d),g.addVectors(p,d),f.crossVectors(m,g),g.crossVectors(f,m),f.normalize(),g.normalize();for(let e=0;e<=r;++e){const i=e/r*Math.PI*2,a=-t*Math.cos(i),p=t*Math.sin(i);u.x=d.x+(a*g.x+p*f.x),u.y=d.y+(a*g.y+p*f.y),u.z=d.z+(a*g.z+p*f.z),o.push(u.x,u.y,u.z),h.subVectors(u,d).normalize(),l.push(h.x,h.y,h.z),c.push(s/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,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 sa(o,3)),this.setAttribute("normal",new sa(l,3)),this.setAttribute("uv",new sa(c,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}static fromJSON(e){return new gh(e.radius,e.tube,e.tubularSegments,e.radialSegments,e.p,e.q)}}class vh extends ma{constructor(e=new gu(new br(-1,-1,0),new br(-1,1,0),new br(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 br,o=new br,l=new Wn;let c=new br;const u=[],h=[],d=[],p=[];function f(i){c=e.getPointAt(i/t,c);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=c.x+n*o.x,s.y=c.y+n*o.y,s.z=c.z+n*o.z,u.push(s.x,s.y,s.z)}}!function(){for(let e=0;e<t;e++)f(e);f(!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;p.push(n,i,s),p.push(i,a,s)}}()}(),this.setIndex(p),this.setAttribute("position",new sa(u,3)),this.setAttribute("normal",new sa(h,3)),this.setAttribute("uv",new sa(d,2))}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON();return e.path=this.parameters.path.toJSON(),e}static fromJSON(e){return new vh((new yu[e.path.type]).fromJSON(e.path),e.tubularSegments,e.radius,e.radialSegments,e.closed)}}class yh extends ma{constructor(e=null){if(super(),this.type="WireframeGeometry",this.parameters={geometry:e},null!==e){const t=[],n=new Set,r=new br,i=new br;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],c=l.start;for(let e=c,o=c+l.count;e<o;e+=3)for(let o=0;o<3;o++){const l=s.getX(e+o),c=s.getX(e+(o+1)%3);r.fromBufferAttribute(a,l),i.fromBufferAttribute(a,c),!0===xh(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===xh(r,i,n)&&(t.push(r.x,r.y,r.z),t.push(i.x,i.y,i.z))}}this.setAttribute("position",new sa(t,3))}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}}function xh(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 _h=Object.freeze({__proto__:null,BoxGeometry:Fa,CapsuleGeometry:Au,CircleGeometry:Mu,ConeGeometry:Eu,CylinderGeometry:Su,DodecahedronGeometry:Tu,EdgesGeometry:Lu,ExtrudeGeometry:oh,IcosahedronGeometry:ch,LatheGeometry:bu,OctahedronGeometry:uh,PlaneGeometry:ns,PolyhedronGeometry:wu,RingGeometry:hh,ShapeGeometry:dh,SphereGeometry:ph,TetrahedronGeometry:fh,TorusGeometry:mh,TorusKnotGeometry:gh,TubeGeometry:vh,WireframeGeometry:yh});class bh extends Ui{constructor(e){super(),this.isShadowMaterial=!0,this.type="ShadowMaterial",this.color=new Hi(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 Ah extends za{constructor(e){super(e),this.isRawShaderMaterial=!0,this.type="RawShaderMaterial"}}class Mh extends Ui{constructor(e){super(),this.isMeshStandardMaterial=!0,this.defines={STANDARD:""},this.type="MeshStandardMaterial",this.color=new Hi(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 Hi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ot,this.normalScale=new Wn(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 Sh extends Mh{constructor(e){super(),this.isMeshPhysicalMaterial=!0,this.defines={STANDARD:"",PHYSICAL:""},this.type="MeshPhysicalMaterial",this.anisotropyRotation=0,this.anisotropyMap=null,this.clearcoatMap=null,this.clearcoatRoughness=0,this.clearcoatRoughnessMap=null,this.clearcoatNormalScale=new Wn(1,1),this.clearcoatNormalMap=null,this.ior=1.5,Object.defineProperty(this,"reflectivity",{get:function(){return Fn(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 Hi(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 Hi(1,1,1),this.specularIntensity=1,this.specularIntensityMap=null,this.specularColor=new Hi(1,1,1),this.specularColorMap=null,this._anisotropy=0,this._clearcoat=0,this._iridescence=0,this._sheen=0,this._transmission=0,this.setValues(e)}get anisotropy(){return this._anisotropy}set anisotropy(e){this._anisotropy>0!=e>0&&this.version++,this._anisotropy=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 sheen(){return this._sheen}set sheen(e){this._sheen>0!=e>0&&this.version++,this._sheen=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.anisotropy=e.anisotropy,this.anisotropyRotation=e.anisotropyRotation,this.anisotropyMap=e.anisotropyMap,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 Eh extends Ui{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Hi(16777215),this.specular=new Hi(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ot,this.normalScale=new Wn(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 wh extends Ui{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Hi(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ot,this.normalScale=new Wn(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 Th extends Ui{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ot,this.normalScale=new Wn(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 Ch extends Ui{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Hi(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hi(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ot,this.normalScale=new Wn(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 Rh extends Ui{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Hi(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Ot,this.normalScale=new Wn(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 Ph extends Pc{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 Bh(e,t,n){return Ih(e)?new e.constructor(e.subarray(t,void 0!==n?n:e.length)):e.slice(t,n)}function Lh(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 Ih(e){return ArrayBuffer.isView(e)&&!(e instanceof DataView)}function Dh(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 Fh(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 Uh(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)}const Nh={arraySlice:Bh,convertArray:Lh,isTypedArray:Ih,getKeyframeOrder:Dh,sortedArray:Fh,flattenJSON:Uh,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=[],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<o;++n)c.push(t.values[e*o+n])}}0!==l.length&&(t.times=Lh(l,t.times.constructor),t.values=Lh(c,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 c=0;const u=s.getValueSize();s.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline&&(c=u/3);const h=r.times.length-1;let d;if(a<=r.times[0]){const e=o,t=l-o;d=Bh(r.values,e,t)}else if(a>=r.times[h]){const e=h*l+o,t=e+l-o;d=Bh(r.values,e,t)}else{const e=r.createInterpolant(),t=o,n=l-o;e.evaluate(a),d=Bh(e.resultBuffer,t,n)}"quaternion"===i&&(new _r).fromArray(d).normalize().conjugate().toArray(d);const p=s.times.length;for(let e=0;e<p;++e){const t=e*u+c;if("quaternion"===i)_r.multiplyQuaternionsFlat(s.values,t,d,0,s.values,t);else{const e=u-2*c;for(let n=0;n<e;++n)s.values[t+n]-=d[n]}}}return e.blendMode=Pt,e}};class Oh{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 kh extends Oh{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:wt,endingEnd:wt}}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 Tt:i=e,s=2*t-n;break;case Ct: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 Tt:a=e,o=2*n-t;break;case Ct:a=1,o=n+r[1]-r[0];break;default:a=e-1,o=t}const l=.5*(n-t),c=this.valueSize;this._weightPrev=l/(t-s),this._weightNext=l/(o-n),this._offsetPrev=i*c,this._offsetNext=a*c}interpolate_(e,t,n,r){const i=this.resultBuffer,a=this.sampleValues,s=this.valueSize,o=e*s,l=o-s,c=this._offsetPrev,u=this._offsetNext,h=this._weightPrev,d=this._weightNext,p=(n-t)/(r-t),f=p*p,m=f*p,g=-h*m+2*h*f-h*p,v=(1+h)*m+(-1.5-2*h)*f+(-.5+h)*p+1,y=(-1-d)*m+(1.5+d)*f+.5*p,x=d*m-d*f;for(let e=0;e!==s;++e)i[e]=g*a[c+e]+v*a[l+e]+y*a[o+e]+x*a[u+e];return i}}class zh extends Oh{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,c=(n-t)/(r-t),u=1-c;for(let e=0;e!==s;++e)i[e]=a[l+e]*u+a[o+e]*c;return i}}class Hh extends Oh{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e){return this.copySampleValue_(e-1)}}class Gh{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=Lh(t,this.TimeBufferType),this.values=Lh(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:Lh(e.times,Array),values:Lh(e.values,Array)};const t=e.getInterpolation();t!==e.DefaultInterpolation&&(n.interpolation=t)}return n.type=e.ValueTypeName,n}InterpolantFactoryMethodDiscrete(e){return new Hh(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodLinear(e){return new zh(this.times,this.values,this.getValueSize(),e)}InterpolantFactoryMethodSmooth(e){return new kh(this.times,this.values,this.getValueSize(),e)}setInterpolation(e){let t;switch(e){case Mt:t=this.InterpolantFactoryMethodDiscrete;break;case St:t=this.InterpolantFactoryMethodLinear;break;case Et: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 Mt;case this.InterpolantFactoryMethodLinear:return St;case this.InterpolantFactoryMethodSmooth:return Et}}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=Bh(n,i,a),this.values=Bh(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&&Ih(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=Bh(this.times),t=Bh(this.values),n=this.getValueSize(),r=this.getInterpolation()===Et,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=Bh(e,0,a),this.values=Bh(t,0,a*n)):(this.times=e,this.values=t),this}clone(){const e=Bh(this.times,0),t=Bh(this.values,0),n=new(0,this.constructor)(this.name,e,t);return n.createInterpolant=this.createInterpolant,n}}Gh.prototype.TimeBufferType=Float32Array,Gh.prototype.ValueBufferType=Float32Array,Gh.prototype.DefaultInterpolation=St;class Vh extends Gh{}Vh.prototype.ValueTypeName="bool",Vh.prototype.ValueBufferType=Array,Vh.prototype.DefaultInterpolation=Mt,Vh.prototype.InterpolantFactoryMethodLinear=void 0,Vh.prototype.InterpolantFactoryMethodSmooth=void 0;class Wh extends Gh{}Wh.prototype.ValueTypeName="color";class jh extends Gh{}jh.prototype.ValueTypeName="number";class Xh extends Oh{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)_r.slerpFlat(i,0,a,l-s,a,l,o);return i}}class Jh extends Gh{InterpolantFactoryMethodLinear(e){return new Xh(this.times,this.values,this.getValueSize(),e)}}Jh.prototype.ValueTypeName="quaternion",Jh.prototype.DefaultInterpolation=St,Jh.prototype.InterpolantFactoryMethodSmooth=void 0;class Yh extends Gh{}Yh.prototype.ValueTypeName="string",Yh.prototype.ValueBufferType=Array,Yh.prototype.DefaultInterpolation=Mt,Yh.prototype.InterpolantFactoryMethodLinear=void 0,Yh.prototype.InterpolantFactoryMethodSmooth=void 0;class Kh extends Gh{}Kh.prototype.ValueTypeName="vector";class qh{constructor(e,t=-1,n,r=Rt){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=Dn(),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(Qh(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(Gh.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=Dh(s);s=Fh(s,1,l),o=Fh(o,1,l),r||0!==s[0]||(s.push(i),o.push(o[0])),a.push(new jh(".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=[];Uh(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 jh(".morphTargetInfluence["+n+"]",e,a))}o=e.length*a}else{const a=".bones["+t[e].name+"]";n(Kh,a+".position",i,"pos",r),n(Jh,a+".quaternion",i,"rot",r),n(Kh,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 Qh(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 jh;case"vector":case"vector2":case"vector3":case"vector4":return Kh;case"color":return Wh;case"quaternion":return Jh;case"bool":case"boolean":return Vh;case"string":return Yh}throw new Error("THREE.KeyframeTrack: Unsupported typeName: "+e)}(e.type);if(void 0===e.times){const t=[],n=[];Uh(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 Zh={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 $h{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 ed=new $h;class td{constructor(e){this.manager=void 0!==e?e:ed,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}}td.DEFAULT_MATERIAL_NAME="__DEFAULT";const nd={};class rd extends Error{constructor(e,t){super(e),this.response=t}}class id extends td{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=Zh.get(e);if(void 0!==i)return this.manager.itemStart(e),setTimeout((()=>{t&&t(i),this.manager.itemEnd(e)}),0),i;if(void 0!==nd[e])return void nd[e].push({onLoad:t,onProgress:n,onError:r});nd[e]=[],nd[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=nd[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 rd(`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=>{Zh.add(e,t);const n=nd[e];delete nd[e];for(let e=0,r=n.length;e<r;e++){const r=n[e];r.onLoad&&r.onLoad(t)}})).catch((t=>{const n=nd[e];if(void 0===n)throw this.manager.itemError(e),t;delete nd[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 ad extends td{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new id(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=qh.parse(e[n]);t.push(r)}return t}}class sd extends td{constructor(e){super(e)}load(e,t,n,r){const i=this,a=[],s=new qc,o=new id(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(i.withCredentials);let l=0;function c(c){o.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&&(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)c(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 od extends td{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=Zh.get(e);if(void 0!==a)return i.manager.itemStart(e),setTimeout((function(){t&&t(a),i.manager.itemEnd(e)}),0),a;const s=qn("img");function o(){c(),Zh.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(){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 ld extends td{constructor(e){super(e)}load(e,t,n,r){const i=new ja;i.colorSpace=Ht;const a=new od(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 cd extends td{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new vc,s=new id(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: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.colorSpace?a.colorSpace=n.colorSpace: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 ud extends td{constructor(e){super(e)}load(e,t,n,r){const i=new dr,a=new od(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 hd extends Ai{constructor(e,t=1){super(),this.isLight=!0,this.type="Light",this.color=new Hi(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 dd extends hd{constructor(e,t,n){super(e,n),this.isHemisphereLight=!0,this.type="HemisphereLight",this.position.copy(Ai.DEFAULT_UP),this.updateMatrix(),this.groundColor=new Hi(t)}copy(e,t){return super.copy(e,t),this.groundColor.copy(e.groundColor),this}}const pd=new Qr,fd=new br,md=new br;class gd{constructor(e){this.camera=e,this.bias=0,this.normalBias=0,this.radius=1,this.blurSamples=8,this.mapSize=new Wn(512,512),this.map=null,this.mapPass=null,this.matrix=new Qr,this.autoUpdate=!0,this.needsUpdate=!1,this._frustum=new $a,this._frameExtents=new Wn(1,1),this._viewportCount=1,this._viewports=[new pr(0,0,1,1)]}getViewportCount(){return this._viewportCount}getFrustum(){return this._frustum}updateMatrices(e){const t=this.camera,n=this.matrix;fd.setFromMatrixPosition(e.matrixWorld),t.position.copy(fd),md.setFromMatrixPosition(e.target.matrixWorld),t.lookAt(md),t.updateMatrixWorld(),pd.multiplyMatrices(t.projectionMatrix,t.matrixWorldInverse),this._frustum.setFromProjectionMatrix(pd),n.set(.5,0,0,.5,0,.5,0,.5,0,0,.5,.5,0,0,0,1),n.multiply(pd)}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 vd extends gd{constructor(){super(new Ga(50,1,.5,500)),this.isSpotLightShadow=!0,this.focus=1}updateMatrices(e){const t=this.camera,n=2*In*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 yd extends hd{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(Ai.DEFAULT_UP),this.updateMatrix(),this.target=new Ai,this.distance=n,this.angle=r,this.penumbra=i,this.decay=a,this.map=null,this.shadow=new vd}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 xd=new Qr,_d=new br,bd=new br;class Ad extends gd{constructor(){super(new Ga(90,1,.5,500)),this.isPointLightShadow=!0,this._frameExtents=new Wn(4,2),this._viewportCount=6,this._viewports=[new pr(2,1,1,1),new pr(0,1,1,1),new pr(3,1,1,1),new pr(1,1,1,1),new pr(3,0,1,1),new pr(1,0,1,1)],this._cubeDirections=[new br(1,0,0),new br(-1,0,0),new br(0,0,1),new br(0,0,-1),new br(0,1,0),new br(0,-1,0)],this._cubeUps=[new br(0,1,0),new br(0,1,0),new br(0,1,0),new br(0,1,0),new br(0,0,1),new br(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()),_d.setFromMatrixPosition(e.matrixWorld),n.position.copy(_d),bd.copy(n.position),bd.add(this._cubeDirections[t]),n.up.copy(this._cubeUps[t]),n.lookAt(bd),n.updateMatrixWorld(),r.makeTranslation(-_d.x,-_d.y,-_d.z),xd.multiplyMatrices(n.projectionMatrix,n.matrixWorldInverse),this._frustum.setFromProjectionMatrix(xd)}}class Md extends hd{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 Ad}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 Sd extends gd{constructor(){super(new ps(-5,5,5,-5,.5,500)),this.isDirectionalLightShadow=!0}}class Ed extends hd{constructor(e,t){super(e,t),this.isDirectionalLight=!0,this.type="DirectionalLight",this.position.copy(Ai.DEFAULT_UP),this.updateMatrix(),this.target=new Ai,this.shadow=new Sd}dispose(){this.shadow.dispose()}copy(e){return super.copy(e),this.target=e.target.clone(),this.shadow=e.shadow.clone(),this}}class wd extends hd{constructor(e,t){super(e,t),this.isAmbientLight=!0,this.type="AmbientLight"}}class Td extends hd{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 Cd{constructor(){this.isSphericalHarmonics3=!0,this.coefficients=[];for(let e=0;e<9;e++)this.coefficients.push(new br)}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 Rd extends hd{constructor(e=new Cd,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 Pd extends td{constructor(e){super(e),this.textures={}}load(e,t,n,r){const i=this,a=new id(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=Pd.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 Hi).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.anisotropy&&(r.anisotropy=e.anisotropy),void 0!==e.anisotropyRotation&&(r.anisotropyRotation=e.anisotropyRotation),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.alphaHash&&(r.alphaHash=e.alphaHash),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.forceSinglePass&&(r.forceSinglePass=e.forceSinglePass),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 Hi).setHex(i.value);break;case"v2":r.uniforms[t].value=(new Wn).fromArray(i.value);break;case"v3":r.uniforms[t].value=(new br).fromArray(i.value);break;case"v4":r.uniforms[t].value=(new pr).fromArray(i.value);break;case"m3":r.uniforms[t].value=(new jn).fromArray(i.value);break;case"m4":r.uniforms[t].value=(new Qr).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.lights&&(r.lights=e.lights),void 0!==e.clipping&&(r.clipping=e.clipping),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 Wn).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 Wn).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.anisotropyMap&&(r.anisotropyMap=n(e.anisotropyMap)),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:bh,SpriteMaterial:Hl,RawShaderMaterial:Ah,ShaderMaterial:za,PointsMaterial:Hc,MeshPhysicalMaterial:Sh,MeshStandardMaterial:Mh,MeshPhongMaterial:Eh,MeshToonMaterial:wh,MeshNormalMaterial:Th,MeshLambertMaterial:Ch,MeshDepthMaterial:yl,MeshDistanceMaterial:xl,MeshBasicMaterial:Vi,MeshMatcapMaterial:Rh,LineDashedMaterial:Ph,LineBasicMaterial:Pc,Material:Ui}[e]}}class Bd{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 Ld extends ma{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 Id extends td{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new id(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 Ld:new ma,a=e.data.index;if(void 0!==a){const e=Kn(a.type,a.array);i.setIndex(new Qi(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 zl(t,n.itemSize,n.offset,n.normalized)}else{const e=Kn(n.type,n.array);a=new(n.isInstancedBufferAttribute?bc:Qi)(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 zl(t,i.itemSize,i.offset,i.normalized)}else{const e=Kn(i.type,i.array);s=new Qi(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 c=e.data.boundingSphere;if(void 0!==c){const e=new br;void 0!==c.center&&e.fromArray(c.center),i.boundingSphere=new Gr(e,c.radius)}return e.name&&(i.name=e.name),e.userData&&(i.userData=e.userData),i}}class Dd extends td{constructor(e){super(e)}load(e,t,n,r){const i=this,a=""===this.path?Bd.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||a;const s=new id(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?Bd.extractUrlBase(e):this.path;this.resourcePath=this.resourcePath||n;const r=new id(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),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),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 Iu).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 _c).fromJSON(e[t],r);n[i.uuid]=i}return n}parseGeometries(e,t){const n={};if(void 0!==e){const r=new Id;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 _h?a=_h[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),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 Pd;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=qh.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 $h(t);i=new od(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 vc(n.data,n.width,n.height)))}r[n.uuid]=new cr(e)}else{const e=a(n.url);r[n.uuid]=new cr(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 od(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 vc(r.data,r.width,r.height)))}n[r.uuid]=new cr(e)}else{const e=await i(r.url);n[r.uuid]=new cr(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 ja,6===o.length&&(l.needsUpdate=!0)):(l=o&&o.data?new vc:new dr,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,Fd)),void 0!==a.channel&&(l.channel=a.channel),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],Ud),l.wrapT=n(a.wrap[1],Ud)),void 0!==a.format&&(l.format=a.format),void 0!==a.internalFormat&&(l.internalFormat=a.internalFormat),void 0!==a.type&&(l.type=a.type),void 0!==a.colorSpace&&(l.colorSpace=a.colorSpace),void 0!==a.encoding&&(l.encoding=a.encoding),void 0!==a.minFilter&&(l.minFilter=n(a.minFilter,Nd)),void 0!==a.magFilter&&(l.magFilter=n(a.magFilter,Nd)),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.compareFunction&&(l.compareFunction=a.compareFunction),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 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 Nl,void 0!==e.background&&(Number.isInteger(e.background)?a.background=new Hi(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 Ul(e.fog.color,e.fog.near,e.fog.far):"FogExp2"===e.fog.type&&(a.fog=new Fl(e.fog.color,e.fog.density))),void 0!==e.backgroundBlurriness&&(a.backgroundBlurriness=e.backgroundBlurriness),void 0!==e.backgroundIntensity&&(a.backgroundIntensity=e.backgroundIntensity);break;case"PerspectiveCamera":a=new Ga(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 ps(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 wd(e.color,e.intensity);break;case"DirectionalLight":a=new Ed(e.color,e.intensity);break;case"PointLight":a=new Md(e.color,e.intensity,e.distance,e.decay);break;case"RectAreaLight":a=new Td(e.color,e.intensity,e.width,e.height);break;case"SpotLight":a=new yd(e.color,e.intensity,e.distance,e.angle,e.penumbra,e.decay);break;case"HemisphereLight":a=new dd(e.color,e.groundColor,e.intensity);break;case"LightProbe":a=(new Rd).fromJSON(e);break;case"SkinnedMesh":s=l(e.geometry),o=c(e.material),a=new mc(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=c(e.material),a=new Ia(s,o);break;case"InstancedMesh":s=l(e.geometry),o=c(e.material);const t=e.count,n=e.instanceMatrix,r=e.instanceColor;a=new Rc(s,o,t),a.instanceMatrix=new bc(new Float32Array(n.array),16),void 0!==r&&(a.instanceColor=new bc(new Float32Array(r.array),r.itemSize));break;case"LOD":a=new ac;break;case"Line":a=new Uc(l(e.geometry),c(e.material));break;case"LineLoop":a=new zc(l(e.geometry),c(e.material));break;case"LineSegments":a=new kc(l(e.geometry),c(e.material));break;case"PointCloud":case"Points":a=new Xc(l(e.geometry),c(e.material));break;case"Sprite":a=new tc(c(e.material));break;case"Group":a=new El;break;case"Bone":a=new gc;break;default:a=new Ai}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.up&&a.up.fromArray(e.up),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 Fd={UVMapping:re,CubeReflectionMapping:ie,CubeRefractionMapping:ae,EquirectangularReflectionMapping:se,EquirectangularRefractionMapping:oe,CubeUVReflectionMapping:le},Ud={RepeatWrapping:ce,ClampToEdgeWrapping:ue,MirroredRepeatWrapping:he},Nd={NearestFilter:de,NearestMipmapNearestFilter:pe,NearestMipmapLinearFilter:me,LinearFilter:ve,LinearMipmapNearestFilter:ye,LinearMipmapLinearFilter:_e};class Od extends td{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=Zh.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){Zh.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 kd;class zd{static getContext(){return void 0===kd&&(kd=new(window.AudioContext||window.webkitAudioContext)),kd}static setContext(e){kd=e}}class Hd extends td{constructor(e){super(e)}load(e,t,n,r){const i=this,a=new id(this.manager);function s(t){r?r(t):console.error(t),i.manager.itemError(e)}a.setResponseType("arraybuffer"),a.setPath(this.path),a.setRequestHeader(this.requestHeader),a.setWithCredentials(this.withCredentials),a.load(e,(function(e){try{const n=e.slice(0);zd.getContext().decodeAudioData(n,(function(e){t(e)}),s)}catch(e){s(e)}}),n,r)}}class Gd extends Rd{constructor(e,t,n=1){super(void 0,n),this.isHemisphereLightProbe=!0;const r=(new Hi).set(e),i=(new Hi).set(t),a=new br(r.r,r.g,r.b),s=new br(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 Vd extends Rd{constructor(e,t=1){super(void 0,t),this.isAmbientLightProbe=!0;const n=(new Hi).set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}}const Wd=new Qr,jd=new Qr,Xd=new Qr;class Jd{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ga,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ga,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,Xd.copy(e.projectionMatrix);const n=t.eyeSep/2,r=n*t.near/t.focus,i=t.near*Math.tan(Ln*t.fov*.5)/t.zoom;let a,s;jd.elements[12]=-n,Wd.elements[12]=n,a=-i*t.aspect+r,s=i*t.aspect+r,Xd.elements[0]=2*t.near/(s-a),Xd.elements[8]=(s+a)/(s-a),this.cameraL.projectionMatrix.copy(Xd),a=-i*t.aspect-r,s=i*t.aspect-r,Xd.elements[0]=2*t.near/(s-a),Xd.elements[8]=(s+a)/(s-a),this.cameraR.projectionMatrix.copy(Xd)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(jd),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(Wd)}}class Yd{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Kd(),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=Kd();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function Kd(){return("undefined"==typeof performance?Date:performance).now()}const qd=new br,Qd=new _r,Zd=new br,$d=new br;class ep extends Ai{constructor(){super(),this.type="AudioListener",this.context=zd.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Yd}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(qd,Qd,Zd),$d.set(0,0,-1).applyQuaternion(Qd),t.positionX){const e=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(qd.x,e),t.positionY.linearRampToValueAtTime(qd.y,e),t.positionZ.linearRampToValueAtTime(qd.z,e),t.forwardX.linearRampToValueAtTime($d.x,e),t.forwardY.linearRampToValueAtTime($d.y,e),t.forwardZ.linearRampToValueAtTime($d.z,e),t.upX.linearRampToValueAtTime(n.x,e),t.upY.linearRampToValueAtTime(n.y,e),t.upZ.linearRampToValueAtTime(n.z,e)}else t.setPosition(qd.x,qd.y,qd.z),t.setOrientation($d.x,$d.y,$d.z,n.x,n.y,n.z)}}class tp extends Ai{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,null!==this.source&&(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 np=new br,rp=new _r,ip=new br,ap=new br;class sp extends tp{constructor(e){super(e),this.panner=this.context.createPanner(),this.panner.panningModel="HRTF",this.panner.connect(this.gain)}connect(){super.connect(),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(np,rp,ip),ap.set(0,0,1).applyQuaternion(rp);const t=this.panner;if(t.positionX){const e=this.context.currentTime+this.listener.timeDelta;t.positionX.linearRampToValueAtTime(np.x,e),t.positionY.linearRampToValueAtTime(np.y,e),t.positionZ.linearRampToValueAtTime(np.z,e),t.orientationX.linearRampToValueAtTime(ap.x,e),t.orientationY.linearRampToValueAtTime(ap.y,e),t.orientationZ.linearRampToValueAtTime(ap.z,e)}else t.setPosition(np.x,np.y,np.z),t.setOrientation(ap.x,ap.y,ap.z)}}class op{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 lp{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){_r.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,i){const a=this._workIndex*i;_r.multiplyQuaternionsFlat(e,a,e,t,e,n),_r.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 cp=new RegExp("[\\[\\]\\.:\\/]","g"),up="[^\\[\\]\\.:\\/]",hp="[^"+"\\[\\]\\.:\\/".replace("\\.","")+"]",dp=new RegExp("^"+/((?:WC+[\/:])*)/.source.replace("WC",up)+/(WCOD+)?/.source.replace("WCOD",hp)+/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",up)+/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",up)+"$"),pp=["material","materials","bones","map"];class fp{constructor(e,t,n){this.path=t,this.parsedPath=n||fp.parseTrackName(t),this.node=fp.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,n){return e&&e.isAnimationObjectGroup?new fp.Composite(e,t,n):new fp(e,t,n)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(cp,"")}static parseTrackName(e){const t=dp.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!==pp.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=fp.findNode(this.rootNode,t.nodeName),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}}fp.Composite=class{constructor(e,t,n){const r=n||fp.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()}},fp.prototype.BindingType={Direct:0,EntireArray:1,ArrayElement:2,HasFromToArray:3},fp.prototype.Versioning={None:0,NeedsUpdate:1,MatrixWorldNeedsUpdate:2},fp.prototype.GetterByBindingType=[fp.prototype._getValue_direct,fp.prototype._getValue_array,fp.prototype._getValue_arrayElement,fp.prototype._getValue_toArray],fp.prototype.SetterByBindingTypeAndVersioning=[[fp.prototype._setValue_direct,fp.prototype._setValue_direct_setNeedsUpdate,fp.prototype._setValue_direct_setMatrixWorldNeedsUpdate],[fp.prototype._setValue_array,fp.prototype._setValue_array_setNeedsUpdate,fp.prototype._setValue_array_setMatrixWorldNeedsUpdate],[fp.prototype._setValue_arrayElement,fp.prototype._setValue_arrayElement_setNeedsUpdate,fp.prototype._setValue_arrayElement_setMatrixWorldNeedsUpdate],[fp.prototype._setValue_fromArray,fp.prototype._setValue_fromArray_setNeedsUpdate,fp.prototype._setValue_fromArray_setMatrixWorldNeedsUpdate]];class mp{constructor(){this.isAnimationObjectGroup=!0,this.uuid=Dn(),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 c=0,u=arguments.length;c!==u;++c){const u=arguments[c],h=u.uuid;let d=t[h];if(void 0===d){d=o++,t[h]=d,e.push(u);for(let e=0,t=a;e!==t;++e)i[e].push(new fp(u,n[e],r[e]))}else if(d<l){s=e[d];const o=--l,c=e[o];t[c.uuid]=d,e[d]=c,t[h]=o,e[o]=u;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 fp(u,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++,c=e[a];t[c.uuid]=l,e[l]=c,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],c=--a,u=e[c];t[o.uuid]=l,e[l]=o,t[u.uuid]=s,e[s]=u,e.pop();for(let e=0,t=r;e!==t;++e){const t=n[e],r=t[s],i=t[c];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,c=this.nCachedObjects_,u=new Array(l);r=i.length,n[e]=r,a.push(e),s.push(t),i.push(u);for(let n=c,r=o.length;n!==r;++n){const r=o[n];u[n]=new fp(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,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 gp{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:wt,endingEnd:wt};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=bt,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===Pt)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===At;if(0===e)return-1===i?r:a&&1==(1&i)?t-r:r;if(n===_t){-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=Tt,r.endingEnd=Tt):(r.endingStart=e?this.zeroSlopeAtStart?Tt:wt:Ct,r.endingEnd=t?this.zeroSlopeAtEnd?Tt:wt:Ct)}_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 vp=new Float32Array(1);class yp extends Rn{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 c=l[o];void 0===c&&(c={},l[o]=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,o,l));continue}const r=t&&t._propertyBindings[e].binding.parsedPath;u=new lp(fp.create(n,l,r),i.ValueTypeName,i.getValueSize()),++u.referenceCount,this._addInactiveBinding(u,o,l),a[e]=u}s[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,s=a[i],o=s.knownActions,l=o[o.length-1],c=e._byClipCacheIndex;l._byClipCacheIndex=c,o[c]=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 zh(new Float32Array(2),new Float32Array(2),1,vp),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?qh.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:Rt),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 c=new gp(this,a,t,n);return this._bindAction(c,l),this._addInactiveAction(c,s,i),c}existingAction(e,t){const n=t||this._root,r=n.uuid,i="string"==typeof e?qh.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 xp{constructor(e){this.value=e}clone(){return new xp(void 0===this.value.clone?this.value:this.value.clone())}}let _p=0;class bp extends Rn{constructor(){super(),this.isUniformsGroup=!0,Object.defineProperty(this,"id",{value:_p++}),this.name="",this.usage=mn,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 Ap 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 Mp{constructor(e,t,n,r,i){this.isGLBufferAttribute=!0,this.name="",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 Sp{constructor(e,t,n=0,r=1/0){this.ray=new qr(e,t),this.near=n,this.far=r,this.camera=null,this.layers=new li,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 wp(e,this,n,t),n.sort(Ep),n}intersectObjects(e,t=!0,n=[]){for(let r=0,i=e.length;r<i;r++)wp(e[r],this,n,t);return n.sort(Ep),n}}function Ep(e,t){return e.distance-t.distance}function wp(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++)wp(r[e],t,n,!0)}}class Tp{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(Fn(t/this.radius,-1,1))),this}clone(){return(new this.constructor).copy(this)}}class Cp{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 Rp=new Wn;class Pp{constructor(e=new Wn(1/0,1/0),t=new Wn(-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=Rp.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 this.clampPoint(e,Rp).distanceTo(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}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 Bp=new br,Lp=new br;class Ip{constructor(e=new br,t=new br){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){Bp.subVectors(e,this.start),Lp.subVectors(this.end,this.start);const n=Lp.dot(Lp);let r=Lp.dot(Bp)/n;return t&&(r=Fn(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 Dp=new br;class Fp extends Ai{constructor(e,t){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const n=new ma,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 sa(r,3));const i=new Pc({fog:!1,toneMapped:!1});this.cone=new kc(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),Dp.setFromMatrixPosition(this.light.target.matrixWorld),this.cone.lookAt(Dp),void 0!==this.color?this.cone.material.color.set(this.color):this.cone.material.color.copy(this.light.color)}}const Up=new br,Np=new Qr,Op=new Qr;class kp extends kc{constructor(e){const t=zp(e),n=new ma,r=[],i=[],a=new Hi(0,0,1),s=new Hi(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 sa(r,3)),n.setAttribute("color",new sa(i,3)),super(n,new Pc({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");Op.copy(this.root.matrixWorld).invert();for(let e=0,n=0;e<t.length;e++){const i=t[e];i.parent&&i.parent.isBone&&(Np.multiplyMatrices(Op,i.matrixWorld),Up.setFromMatrixPosition(Np),r.setXYZ(n,Up.x,Up.y,Up.z),Np.multiplyMatrices(Op,i.parent.matrixWorld),Up.setFromMatrixPosition(Np),r.setXYZ(n+1,Up.x,Up.y,Up.z),n+=2)}n.getAttribute("position").needsUpdate=!0,super.updateMatrixWorld(e)}dispose(){this.geometry.dispose(),this.material.dispose()}}function zp(e){const t=[];!0===e.isBone&&t.push(e);for(let n=0;n<e.children.length;n++)t.push.apply(t,zp(e.children[n]));return t}class Hp extends Ia{constructor(e,t,n){super(new ph(t,4,2),new Vi({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 Gp=new br,Vp=new Hi,Wp=new Hi;class jp extends Ai{constructor(e,t,n){super(),this.light=e,this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=n,this.type="HemisphereLightHelper";const r=new uh(t);r.rotateY(.5*Math.PI),this.material=new Vi({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 Qi(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");Vp.copy(this.light.color),Wp.copy(this.light.groundColor);for(let e=0,n=t.count;e<n;e++){const r=e<n/2?Vp:Wp;t.setXYZ(e,r.r,r.g,r.b)}t.needsUpdate=!0}this.light.updateWorldMatrix(!0,!1),e.lookAt(Gp.setFromMatrixPosition(this.light.matrixWorld).negate())}}class Xp extends kc{constructor(e=10,t=10,n=4473924,r=8947848){n=new Hi(n),r=new Hi(r);const i=t/2,a=e/t,s=e/2,o=[],l=[];for(let e=0,c=0,u=-s;e<=t;e++,u+=a){o.push(-s,0,u,s,0,u),o.push(u,0,-s,u,0,s);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 ma;c.setAttribute("position",new sa(o,3)),c.setAttribute("color",new sa(l,3)),super(c,new Pc({vertexColors:!0,toneMapped:!1})),this.type="GridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}class Jp extends kc{constructor(e=10,t=16,n=8,r=64,i=4473924,a=8947848){i=new Hi(i),a=new Hi(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,c=Math.cos(r)*e;s.push(0,0,0),s.push(l,0,c);const u=1&n?i:a;o.push(u.r,u.g,u.b),o.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;s.push(n,0,i),o.push(l.r,l.g,l.b),t=(e+1)/r*(2*Math.PI),n=Math.sin(t)*c,i=Math.cos(t)*c,s.push(n,0,i),o.push(l.r,l.g,l.b)}}const l=new ma;l.setAttribute("position",new sa(s,3)),l.setAttribute("color",new sa(o,3)),super(l,new Pc({vertexColors:!0,toneMapped:!1})),this.type="PolarGridHelper"}dispose(){this.geometry.dispose(),this.material.dispose()}}const Yp=new br,Kp=new br,qp=new br;class Qp extends Ai{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 ma;r.setAttribute("position",new sa([-t,t,0,t,t,0,t,-t,0,-t,-t,0,-t,t,0],3));const i=new Pc({fog:!1,toneMapped:!1});this.lightPlane=new Uc(r,i),this.add(this.lightPlane),r=new ma,r.setAttribute("position",new sa([0,0,0,0,0,1],3)),this.targetLine=new Uc(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),Yp.setFromMatrixPosition(this.light.matrixWorld),Kp.setFromMatrixPosition(this.light.target.matrixWorld),qp.subVectors(Kp,Yp),this.lightPlane.lookAt(Kp),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(Kp),this.targetLine.scale.z=qp.length()}}const Zp=new br,$p=new Ha;class ef extends kc{constructor(e){const t=new ma,n=new Pc({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 sa(r,3)),t.setAttribute("color",new sa(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 Hi(16755200),c=new Hi(16711680),u=new Hi(43775),h=new Hi(16777215),d=new Hi(3355443);this.setColors(l,c,u,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;$p.projectionMatrixInverse.copy(this.camera.projectionMatrixInverse),tf("c",t,e,$p,0,0,-1),tf("t",t,e,$p,0,0,1),tf("n1",t,e,$p,-1,-1,-1),tf("n2",t,e,$p,1,-1,-1),tf("n3",t,e,$p,-1,1,-1),tf("n4",t,e,$p,1,1,-1),tf("f1",t,e,$p,-1,-1,1),tf("f2",t,e,$p,1,-1,1),tf("f3",t,e,$p,-1,1,1),tf("f4",t,e,$p,1,1,1),tf("u1",t,e,$p,.7,1.1,-1),tf("u2",t,e,$p,-.7,1.1,-1),tf("u3",t,e,$p,0,2,-1),tf("cf1",t,e,$p,-1,0,1),tf("cf2",t,e,$p,1,0,1),tf("cf3",t,e,$p,0,-1,1),tf("cf4",t,e,$p,0,1,1),tf("cn1",t,e,$p,-1,0,-1),tf("cn2",t,e,$p,1,0,-1),tf("cn3",t,e,$p,0,-1,-1),tf("cn4",t,e,$p,0,1,-1),e.getAttribute("position").needsUpdate=!0}dispose(){this.geometry.dispose(),this.material.dispose()}}function tf(e,t,n,r,i,a,s){Zp.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],Zp.x,Zp.y,Zp.z)}}const nf=new Sr;class rf extends kc{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 ma;i.setIndex(new Qi(n,1)),i.setAttribute("position",new Qi(r,3)),super(i,new Pc({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&&nf.setFromObject(this.object),nf.isEmpty())return;const t=nf.min,n=nf.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 af extends kc{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 ma;r.setIndex(new Qi(n,1)),r.setAttribute("position",new sa([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 Pc({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 sf extends Uc{constructor(e,t=1,n=16776960){const r=n,i=new ma;i.setAttribute("position",new sa([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 Pc({color:r,toneMapped:!1})),this.type="PlaneHelper",this.plane=e,this.size=t;const a=new ma;a.setAttribute("position",new sa([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 Vi({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 of=new br;let lf,cf;class uf extends Ai{constructor(e=new br(0,0,1),t=new br(0,0,0),n=1,r=16776960,i=.2*n,a=.2*i){super(),this.type="ArrowHelper",void 0===lf&&(lf=new ma,lf.setAttribute("position",new sa([0,0,0,0,1,0],3)),cf=new Su(0,.5,1,5,1),cf.translate(0,-.5,0)),this.position.copy(t),this.line=new Uc(lf,new Pc({color:r,toneMapped:!1})),this.line.matrixAutoUpdate=!1,this.add(this.line),this.cone=new Ia(cf,new Vi({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{of.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(of,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 hf extends kc{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 ma;n.setAttribute("position",new sa(t,3)),n.setAttribute("color",new sa([1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],3)),super(n,new Pc({vertexColors:!0,toneMapped:!1})),this.type="AxesHelper"}setColors(e,t,n){const r=new Hi,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 df{constructor(){this.type="ShapePath",this.color=new Hi,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new _u,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=ih.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 Iu,s.curves=a.curves,o.push(s),o;let l=!n(r[0].getPoints());l=e?!l:l;const c=[],u=[];let h,d,p=[],f=0;u[f]=void 0,p[f]=[];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&&u[f]&&f++,u[f]={s:new Iu,p:h},u[f].s.curves=a.curves,l&&f++,p[f]=[]):p[f].push({h:a,p:h[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 Iu;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=p[r];for(let a=0;a<i.length;a++){const s=i[a];let o=!0;for(let i=0;i<u.length;i++)t(s.p,u[i].p)&&(r!==i&&n++,o?(o=!1,c[i].push(s)):e=!0);o&&c[r].push(s)}}n>0&&!1===e&&(p=c)}for(let e=0,t=u.length;e<t;e++){s=u[e].s,o.push(s),d=p[e];for(let e=0,t=d.length;e<t;e++)s.holes.push(d[e].h)}return o}}"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);var pf=n(745),ff=n(576);const mf="undefined"==typeof window||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent)?t.useEffect:t.useLayoutEffect;var gf=n(525),vf=n.n(gf),yf=n(840);const xf=[];function _f(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}function bf(e,t=null,n=!1,r={}){null===t&&(t=[e]);for(const e of xf)if(_f(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 r.lifespan&&r.lifespan>0&&(e.timeout&&clearTimeout(e.timeout),e.timeout=setTimeout(e.remove,r.lifespan)),e.response;if(!n)throw e.promise}const i={keys:t,equal:r.equal,remove:()=>{const e=xf.indexOf(i);-1!==e&&xf.splice(e,1)},promise:(a=e,"object"==typeof a&&"function"==typeof a.then?e:e(...t)).then((e=>{i.response=e,r.lifespan&&r.lifespan>0&&(i.timeout=setTimeout(i.remove,r.lifespan))})).catch((e=>i.error=e))};var a;if(xf.push(i),!n)throw i.promise}const Af={};var Mf,Sf;const Ef=e=>"colorSpace"in e||"outputColorSpace"in e,wf=()=>{var e;return null!=(e=Af.ColorManagement)?e:null},Tf=e=>e&&e.isOrthographicCamera,Cf="undefined"!=typeof window&&(null!=(Mf=window.document)&&Mf.createElement||"ReactNative"===(null==(Sf=window.navigator)?void 0:Sf.product))?t.useLayoutEffect:t.useEffect;function Rf(e){const n=t.useRef(e);return Cf((()=>{n.current=e}),[e]),n}function Pf({set:e}){return Cf((()=>(e(new Promise((()=>null))),()=>e(!1))),[e]),null}class Bf extends t.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}Bf.getDerivedStateFromError=()=>({error:!0});const Lf="__default",If=new Map;function Df(e){var t;const n="undefined"!=typeof window?null!=(t=window.devicePixelRatio)?t:2:1;return Array.isArray(e)?Math.min(Math.max(e[0],n),e[1]):e}const Ff=e=>{var t;return null==(t=e.__r3f)?void 0:t.root.getState()},Uf={obj:e=>e===Object(e)&&!Uf.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(Uf.str(e)||Uf.num(e))return e===t;const a=Uf.obj(e);if(a&&"reference"===r)return e===t;const s=Uf.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;if(a&&"shallow"===n&&"shallow"===r){for(o in i?t:e)if(!Uf.equ(e[o],t[o],{strict:i,objects:"reference"}))return!1}else for(o in i?t:e)if(e[o]!==t[o])return!1;if(Uf.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 Nf(e,t){return e.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...t},e}function Of(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 kf=/-\d+$/;function zf(e,t,n){if(Uf.str(n)){if(kf.test(n)){const t=n.replace(kf,""),{target:r,key:i}=Of(e,t);Array.isArray(r[i])||(r[i]=[])}const{target:r,key:i}=Of(e,n);t.__r3f.previousAttach=r[i],r[i]=t}else t.__r3f.previousAttach=n(e,t)}function Hf(e,t,n){var r,i;if(Uf.str(n)){const{target:r,key:i}=Of(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 Gf(e,{children:t,key:n,ref:r,...i},{children:a,key:s,ref:o,...l}={},c=!1){var u;const h=null!=(u=null==e?void 0:e.__r3f)?u:{},d=Object.entries(i),p=[];if(c){const e=Object.keys(l);for(let t=0;t<e.length;t++)i.hasOwnProperty(e[t])||d.unshift([e[t],Lf+"remove"])}d.forEach((([t,n])=>{var r;if(null!=(r=e.__r3f)&&r.primitive&&"object"===t)return;if(Uf.equ(n,l[t]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(t))return p.push([t,n,!0,[]]);let a=[];t.includes("-")&&(a=t.split("-")),p.push([t,n,!1,a]);for(const e in i){const n=i[e];e.startsWith(`${t}-`)&&p.push([e,n,!1,e.split("-")])}}));const f={...i};return h.memoizedProps&&h.memoizedProps.args&&(f.args=h.memoizedProps.args),h.memoizedProps&&h.memoizedProps.attach&&(f.attach=h.memoizedProps.attach),{memoized:f,changes:p}}function Vf(e,t){var n,r,i;const a=null!=(n=e.__r3f)?n:{},s=a.root,o=null!=(r=null==s||null==s.getState?void 0:s.getState())?r:{},{memoized:l,changes:c}=(u=t)&&u.memoized&&u.changes?t:Gf(e,t);var u;const h=a.eventCount;e.__r3f&&(e.__r3f.memoizedProps=l);for(let t=0;t<c.length;t++){let[n,r,i,s]=c[t];if(Ef(e)){const e=3001,t="srgb",i="srgb-linear";"encoding"===n?(n="colorSpace",r=r===e?t:i):"outputEncoding"===n&&(n="outputColorSpace",r=r===e?t:i)}let l=e,u=l[n];if(s.length&&(u=s.reduce(((e,t)=>e[t]),e),!u||!u.set)){const[t,...r]=s.reverse();l=r.reverse().reduce(((e,t)=>e[t]),e),n=t}if(r===Lf+"remove")if(l.constructor){let e=If.get(l.constructor);e||(e=new l.constructor,If.set(l.constructor,e)),r=e[n]}else r=0;if(i)r?a.handlers[n]=r:delete a.handlers[n],a.eventCount=Object.keys(a.handlers).length;else if(u&&u.set&&(u.copy||u instanceof li)){if(Array.isArray(r))u.fromArray?u.fromArray(r):u.set(...r);else if(u.copy&&r&&r.constructor&&u.constructor===r.constructor)u.copy(r);else if(void 0!==r){const e=u instanceof Hi;!e&&u.setScalar?u.setScalar(r):u instanceof li&&r instanceof li?u.mask=r.mask:u.set(r),wf()||o.linear||!e||u.convertSRGBToLinear()}}else if(l[n]=r,l[n]instanceof dr&&l[n].format===De&&l[n].type===Ae){const e=l[n];Ef(e)&&Ef(o.gl)?e.colorSpace=o.gl.outputColorSpace:e.encoding=o.gl.outputEncoding}Wf(e)}if(a.parent&&o.internal&&e.raycast&&h!==a.eventCount){const t=o.internal.interaction.indexOf(e);t>-1&&o.internal.interaction.splice(t,1),a.eventCount&&o.internal.interaction.push(e)}return!(1===c.length&&"onUpdate"===c[0][0])&&c.length&&null!=(i=e.__r3f)&&i.parent&&jf(e),e}function Wf(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 jf(e){null==e.onUpdate||e.onUpdate(e)}function Xf(e){return(e.eventObject||e.object).uuid+"/"+e.index+e.instanceId}function Jf(e,t,n,r){const i=n.get(t);i&&(n.delete(t),0===n.size&&(e.delete(r),i.target.releasePointerCapture(r)))}const Yf=e=>!(null==e||!e.render),Kf=t.createContext(null),qf=(e,n)=>{const r=function(e){const n=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),r=(e=n.getState,r=Object.is)=>{const[,i]=(0,t.useReducer)((e=>e+1),0),a=n.getState(),s=(0,t.useRef)(a),o=(0,t.useRef)(e),l=(0,t.useRef)(r),c=(0,t.useRef)(!1),u=(0,t.useRef)();let h;void 0===u.current&&(u.current=e(a));let d=!1;(s.current!==a||o.current!==e||l.current!==r||c.current)&&(h=e(a),d=!r(u.current,h)),mf((()=>{d&&(u.current=h),s.current=a,o.current=e,l.current=r,c.current=!1}));const p=(0,t.useRef)(a);mf((()=>{const e=()=>{try{const e=n.getState(),t=o.current(e);l.current(u.current,t)||(s.current=e,u.current=t,i())}catch(e){c.current=!0,i()}},t=n.subscribe(e);return n.getState()!==p.current&&e(),t}),[]);const f=d?h:u.current;return(0,t.useDebugValue)(f),f};return Object.assign(r,n),r[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const e=[r,n];return{next(){const t=e.length<=0;return{value:e.shift(),done:t}}}},r}(((r,i)=>{const a=new br,s=new br,o=new br;function l(e=i().camera,t=s,n=i().size){const{width:r,height:l,top:c,left:u}=n,h=r/l;t instanceof br?o.copy(t):o.set(...t);const d=e.getWorldPosition(a).distanceTo(o);if(Tf(e))return{width:r/e.zoom,height:l/e.zoom,top:c,left:u,factor:1,distance:d,aspect:h};{const t=e.fov*Math.PI/180,n=2*Math.tan(t/2)*d,i=n*(r/l);return{width:i,height:n,top:c,left:u,factor:r/i,distance:d,aspect:h}}}let c;const u=e=>r((t=>({performance:{...t.performance,current:e}}))),h=new Wn,d={set:r,get:i,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(t=1)=>e(i(),t),advance:(e,t)=>n(e,t,i()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new Yd,pointer:h,mouse:h,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const e=i();c&&clearTimeout(c),e.performance.current!==e.performance.min&&u(e.performance.min),c=setTimeout((()=>u(i().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:l},setEvents:e=>r((t=>({...t,events:{...t.events,...e}}))),setSize:(e,t,n,a,o)=>{const c=i().camera,u={width:e,height:t,top:a||0,left:o||0,updateStyle:n};r((e=>({size:u,viewport:{...e.viewport,...l(c,s,u)}})))},setDpr:e=>r((t=>{const n=Df(e);return{viewport:{...t.viewport,dpr:n,initialDpr:t.viewport.initialDpr||n}}})),setFrameloop:(e="always")=>{const t=i().clock;t.stop(),t.elapsedTime=0,"never"!==e&&(t.start(),t.elapsedTime=0),r((()=>({frameloop:e})))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:t.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(e,t,n)=>{const r=i().internal;return r.priority=r.priority+(t>0?1:0),r.subscribers.push({ref:e,priority:t,store:n}),r.subscribers=r.subscribers.sort(((e,t)=>e.priority-t.priority)),()=>{const n=i().internal;null!=n&&n.subscribers&&(n.priority=n.priority-(t>0?1:0),n.subscribers=n.subscribers.filter((t=>t.ref!==e)))}}}};return d})),i=r.getState();let a=i.size,s=i.viewport.dpr,o=i.camera;return r.subscribe((()=>{const{camera:e,size:t,viewport:n,gl:i,set:l}=r.getState();if(t!==a||n.dpr!==s){var c;a=t,s=n.dpr,function(e,t){e.manual||(Tf(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())}(e,t),i.setPixelRatio(n.dpr);const r=null!=(c=t.updateStyle)?c:"undefined"!=typeof HTMLCanvasElement&&i.domElement instanceof HTMLCanvasElement;i.setSize(t.width,t.height,r)}e!==o&&(o=e,l((t=>({viewport:{...t.viewport,...t.viewport.getCurrentViewport(e)}}))))})),r.subscribe((t=>e(t))),r};let Qf,Zf,$f,em=new Set,tm=new Set,nm=new Set;function rm(e,t){if(e.size)for(const{callback:n}of e.values())n(t)}function im(e,t){switch(e){case"before":return rm(em,t);case"after":return rm(tm,t);case"tail":return rm(nm,t)}}function am(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),Zf=t.internal.subscribers,Qf=0;Qf<Zf.length;Qf++)$f=Zf[Qf],$f.ref.current($f.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 sm(){const e=t.useContext(Kf);if(!e)throw new Error("R3F: Hooks can only be used within the Canvas component!");return e}function om(e,t=0){const n=sm(),r=n.getState().internal.subscribe,i=Rf(e);return Cf((()=>r(i,t,n)),[t,r,n]),null}function lm(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 cm(e,t,n,r){const i=Array.isArray(t)?t:[t],a=((e,t,n)=>bf(e,t,!1,n))(lm(n,r),[e,...i],{equal:Uf.equ});return Array.isArray(t)?a:a[0]}cm.preload=function(e,t,n){const r=Array.isArray(t)?t:[t];return((e,t,n)=>{bf(e,t,!0,void 0)})(lm(n),[e,...r])},cm.clear=function(e,t){return(e=>{if(void 0===e||0===e.length)xf.splice(0,xf.length);else{const t=xf.find((t=>_f(e,t.keys,t.equal)));t&&t.remove()}})([e,...Array.isArray(t)?t:[t]])};const um=new Map,{invalidate:hm,advance:dm}=function(e){let t,n,r,i=!1;function a(s){n=requestAnimationFrame(a),i=!0,t=0,im("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+=am(s,r))}if(im("after",s),0===t)return im("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&&im("before",t),r)am(t,r,i);else for(const n of e.values())am(t,n.store.getState());n&&im("after",t)}}}(um),{reconciler:pm,applyProps:fm}=function(e,t){function n(e,{args:t=[],attach:n,...r},i){let a,s=`${e[0].toUpperCase()}${e.slice(1)}`;if("primitive"===e){if(void 0===r.object)throw new Error("R3F: Primitives without 'object' are invalid!");a=Nf(r.object,{type:e,root:i,attach:n,primitive:!0})}else{const r=Af[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!");a=Nf(new r(...t),{type:e,root:i,attach:n,memoizedProps:{args:t}})}return void 0===a.__r3f.attach&&(a instanceof ma?a.__r3f.attach="geometry":a instanceof Ui&&(a.__r3f.attach="material")),"inject"!==s&&Vf(a,r),a}function r(e,t){let n=!1;var r,i;t&&(null!=(r=t.__r3f)&&r.attach?zf(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||Nf(t,{}),t.__r3f.parent=e,jf(t),Wf(t))}function i(e,t,n){let r=!1;if(t){var i,a;if(null!=(i=t.__r3f)&&i.attach)zf(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||Nf(t,{}),t.__r3f.parent=e,jf(t),Wf(t)}}function a(e,t,n=!1){e&&[...e].forEach((e=>s(t,e,n)))}function s(e,t,n){if(t){var r,i,s;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)Hf(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)=>{Jf(n.capturedMap,t,e,r)}))}(t.__r3f.root,t)}const c=null==(s=t.__r3f)?void 0:s.primitive,u=void 0===n?null!==t.dispose&&!c:n;var l;c||(a(null==(l=t.__r3f)?void 0:l.objects,t,u),a(t.children,t,u)),delete t.__r3f,u&&t.dispose&&"Scene"!==t.type&&(0,yf.unstable_scheduleCallback)(yf.unstable_IdlePriority,(()=>{try{t.dispose()}catch(e){}})),Wf(e)}}const o=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:vf()({createInstance:n,removeChild:s,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&&s(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){var i;if((null!=(i=null==e?void 0:e.__r3f)?i:{}).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 c=Gf(e,a,l,!0);return c.changes.length?[!1,c]:null}},commitUpdate(e,[t,i],a,o,l,c){t?function(e,t,i,a){var o;const l=null==(o=e.__r3f)?void 0:o.parent;if(!l)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||s(l,e),c.parent&&(c.__r3f.autoRemovedBeforeAppend=!0),r(l,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,l,c):Vf(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=>Nf(e.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(e){var t;const{attach:n,parent:r}=null!=(t=e.__r3f)?t:{};n&&r&&Hf(r,e,n),e.isObject3D&&(e.visible=!1),Wf(e)},unhideInstance(e,t){var n;const{attach:r,parent:i}=null!=(n=e.__r3f)?n:{};r&&i&&zf(i,e,r),(e.isObject3D&&null==t.visible||t.visible)&&(e.visible=!0),Wf(e)},createTextInstance:o,hideTextInstance:o,unhideTextInstance:o,getCurrentEventPriority:()=>t?t():ff.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:"undefined"!=typeof performance&&Uf.fun(performance.now)?performance.now:Uf.fun(Date.now)?Date.now:()=>0,scheduleTimeout:Uf.fun(setTimeout)?setTimeout:void 0,cancelTimeout:Uf.fun(clearTimeout)?clearTimeout:void 0}),applyProps:Vf}}(0,(function(){var e;const t="undefined"!=typeof self&&self||"undefined"!=typeof window&&window;if(!t)return ff.DefaultEventPriority;switch(null==(e=t.event)?void 0:e.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return ff.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return ff.ContinuousEventPriority;default:return ff.DefaultEventPriority}})),mm={objects:"shallow",strict:!1},gm=(e,t)=>{const n="function"==typeof e?e(t):e;return Yf(n)?n:new Il({powerPreference:"high-performance",canvas:t,antialias:!0,alpha:!0,...e})};function vm({store:e,children:n,onCreated:r,rootElement:i}){return Cf((()=>{const t=e.getState();t.set((e=>({internal:{...e.internal,active:!0}}))),r&&r(t),e.getState().events.connected||null==t.events.connect||t.events.connect(i)}),[]),t.createElement(Kf.Provider,{value:e},n)}function ym(e,t){const n=um.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),pm.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),um.delete(e),t&&t(e)}catch(e){}}),500)}))}}function xm(){return xm=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},xm.apply(this,arguments)}pm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:t.version}),t.unstable_act;var _m=n(296),bm=n.n(_m);function Am(e){let{debounce:n,scroll:r,polyfill:i,offsetSize:a}=void 0===e?{debounce:0,scroll:!1,offsetSize:!1}:e;const s=i||("undefined"==typeof window?class{}:window.ResizeObserver);if(!s)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[o,l]=(0,t.useState)({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=(0,t.useRef)({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),u=n?"number"==typeof n?n:n.scroll:null,h=n?"number"==typeof n?n:n.resize:null,d=(0,t.useRef)(!1);(0,t.useEffect)((()=>(d.current=!0,()=>{d.current=!1})));const[p,f,m]=(0,t.useMemo)((()=>{const e=()=>{if(!c.current.element)return;const{left:e,top:t,width:n,height:r,bottom:i,right:s,x:o,y:u}=c.current.element.getBoundingClientRect(),h={left:e,top:t,width:n,height:r,bottom:i,right:s,x:o,y:u};c.current.element instanceof HTMLElement&&a&&(h.height=c.current.element.offsetHeight,h.width=c.current.element.offsetWidth),Object.freeze(h),d.current&&!Em(c.current.lastBounds,h)&&l(c.current.lastBounds=h)};return[e,h?bm()(e,h):e,u?bm()(e,u):e]}),[l,a,u,h]);function g(){c.current.scrollContainers&&(c.current.scrollContainers.forEach((e=>e.removeEventListener("scroll",m,!0))),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function v(){c.current.element&&(c.current.resizeObserver=new s(m),c.current.resizeObserver.observe(c.current.element),r&&c.current.scrollContainers&&c.current.scrollContainers.forEach((e=>e.addEventListener("scroll",m,{capture:!0,passive:!0}))))}var y,x,_;return y=m,x=Boolean(r),(0,t.useEffect)((()=>{if(x){const e=y;return window.addEventListener("scroll",e,{capture:!0,passive:!0}),()=>{window.removeEventListener("scroll",e,!0)}}}),[y,x]),_=f,(0,t.useEffect)((()=>{const e=_;return window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}}),[_]),(0,t.useEffect)((()=>{g(),v()}),[r,m,f]),(0,t.useEffect)((()=>g),[]),[e=>{e&&e!==c.current.element&&(g(),c.current.element=e,c.current.scrollContainers=Mm(e),v())},o,p]}function Mm(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,...Mm(e.parentElement)]}const Sm=["x","y","top","bottom","left","right","width","height"],Em=(e,t)=>Sm.every((n=>e[n]===t[n]));var wm=Object.defineProperty,Tm=Object.defineProperties,Cm=Object.getOwnPropertyDescriptors,Rm=Object.getOwnPropertySymbols,Pm=Object.prototype.hasOwnProperty,Bm=Object.prototype.propertyIsEnumerable,Lm=(e,t,n)=>t in e?wm(e,t,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[t]=n,Im=(e,t)=>{for(var n in t||(t={}))Pm.call(t,n)&&Lm(e,n,t[n]);if(Rm)for(var n of Rm(t))Bm.call(t,n)&&Lm(e,n,t[n]);return e};function Dm(e,t,n){if(!e)return;if(!0===n(e))return e;let r=t?e.return:e.child;for(;r;){const e=Dm(r,t,n);if(e)return e;r=t?null:r.sibling}}function Fm(e){try{return Object.defineProperties(e,{_currentRenderer:{get:()=>null,set(){}},_currentRenderer2:{get:()=>null,set(){}}})}catch(t){return e}}const Um=Fm(t.createContext(null));class Nm extends t.Component{render(){return t.createElement(Um.Provider,{value:this._reactInternals},this.props.children)}}const{ReactCurrentOwner:Om,ReactCurrentDispatcher:km}=t.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED;function zm(){const e=function(){var e,n;const r=function(){const e=t.useContext(Um);if(null===e)throw new Error("its-fine: useFiber must be called within a <FiberProvider />!");const n=t.useId();return t.useMemo((()=>{for(const t of[null==Om?void 0:Om.current,e,null==e?void 0:e.alternate]){if(!t)continue;const e=Dm(t,!1,(e=>{let t=e.memoizedState;for(;t;){if(t.memoizedState===n)return!0;t=t.next}}));if(e)return e}}),[e,n])}(),[i]=t.useState((()=>new Map));i.clear();let a=r;for(;a;){const t=null==(e=a.type)?void 0:e._context;t&&t!==Um&&!i.has(t)&&i.set(t,null==(n=null==km?void 0:km.current)?void 0:n.readContext(Fm(t))),a=a.return}return i}();return t.useMemo((()=>Array.from(e.keys()).reduce(((n,r)=>i=>{return t.createElement(n,null,t.createElement(r.Provider,(a=Im({},i),s={value:e.get(r)},Tm(a,Cm(s)))));var a,s}),(e=>t.createElement(Nm,Im({},e))))),[e])}const Hm={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 Gm(e){const{handlePointer:t}=function(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(Xf(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)&&requestAnimationFrame((()=>{r.capturedMap.has(t.pointerId)&&(r.capturedMap.delete(t.pointerId),n([]))}))}}return function(a){const{onPointerMissed:s,internal:o}=e.getState();o.lastEvent.current=a;const l="onPointerMove"===i,c="onClick"===i||"onContextMenu"===i||"onDoubleClick"===i,u=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=Ff(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=Ff(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=Ff(e.object),r=Ff(t.object);return n&&r&&r.events.priority-n.events.priority||e.distance-t.distance})).filter((e=>{const t=Xf(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(Xf(e.intersection))||a.push(e.intersection);return a}(a,l?t:void 0),h=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))}(a):0;"onPointerDown"===i&&(o.initialClick=[a.offsetX,a.offsetY],o.initialHits=u.map((e=>e.eventObject))),c&&!u.length&&h<=2&&(r(a,o.interaction),s&&s(a)),l&&n(u),function(t,r,i,a){const s=e.getState();if(t.length){const e={stopped:!1};for(const o of t){const l=Ff(o.object)||s,{raycaster:c,pointer:u,camera:h,internal:d}=l,p=new br(u.x,u.y,0).unproject(h),f=e=>{var t,n;return null!=(t=null==(n=d.capturedMap.get(e))?void 0:n.has(o.eventObject))&&t},m=e=>{const t={intersection:o,target:r.target};d.capturedMap.has(e)?d.capturedMap.get(e).set(o.eventObject,t):d.capturedMap.set(e,new Map([[o.eventObject,t]])),r.target.setPointerCapture(e)},g=e=>{const t=d.capturedMap.get(e);t&&Jf(d.capturedMap,o.eventObject,t,e)};let v={};for(let e in r){let t=r[e];"function"!=typeof t&&(v[e]=t)}let y={...o,...v,pointer:u,intersections:t,stopped:e.stopped,delta:i,unprojectedPoint:p,ray:c.ray,camera:h,stopPropagation(){const i="pointerId"in r&&d.capturedMap.get(r.pointerId);(!i||i.has(o.eventObject))&&(y.stopped=e.stopped=!0,d.hovered.size&&Array.from(d.hovered.values()).find((e=>e.eventObject===o.eventObject)))&&n([...t.slice(0,t.indexOf(o)),o])},target:{hasPointerCapture:f,setPointerCapture:m,releasePointerCapture:g},currentTarget:{hasPointerCapture:f,setPointerCapture:m,releasePointerCapture:g},nativeEvent:r};if(a(y),!0===e.stopped)break}}}(u,a,h,(function(e){const t=e.eventObject,n=t.__r3f,s=null==n?void 0:n.handlers;if(null!=n&&n.eventCount)if(l){if(s.onPointerOver||s.onPointerEnter||s.onPointerOut||s.onPointerLeave){const t=Xf(e),n=o.hovered.get(t);n?n.stopped&&e.stopPropagation():(o.hovered.set(t,e),null==s.onPointerOver||s.onPointerOver(e),null==s.onPointerEnter||s.onPointerEnter(e))}null==s.onPointerMove||s.onPointerMove(e)}else{const n=s[i];n?c&&!o.initialHits.includes(t)||(r(a,o.interaction.filter((e=>!o.initialHits.includes(e)))),n(e)):c&&o.initialHits.includes(t)&&r(a,o.interaction.filter((e=>!o.initialHits.includes(e))))}}))}}}}(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(Hm).reduce(((e,n)=>({...e,[n]:t(n)})),{}),update:()=>{var t;const{events:n,internal:r}=e.getState();null!=(t=r.lastEvent)&&t.current&&n.handlers&&n.handlers.onPointerMove(r.lastEvent.current)},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]=Hm[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]=Hm[e];n.connected.removeEventListener(r,t)}})),t((e=>({events:{...e.events,connected:void 0}}))))}}}const Vm=t.forwardRef((function({children:n,fallback:r,resize:i,style:a,gl:s,events:o=Gm,eventSource:l,eventPrefix:c,shadows:f,linear:m,flat:g,legacy:v,orthographic:y,frameloop:x,dpr:_,performance:b,raycaster:A,camera:M,onPointerMissed:S,onCreated:E,...w},T){t.useMemo((()=>{return t=e,void Object.assign(Af,t);var t}),[]);const C=zm(),[R,P]=Am({scroll:!0,debounce:{scroll:50,resize:0},...i}),B=t.useRef(null),L=t.useRef(null);t.useImperativeHandle(T,(()=>B.current));const I=Rf(S),[D,F]=t.useState(!1),[U,N]=t.useState(!1);if(D)throw D;if(U)throw U;const O=t.useRef(null);Cf((()=>{const e=B.current;P.width>0&&P.height>0&&e&&(O.current||(O.current=function(e){const n=um.get(e),r=null==n?void 0:n.fiber,i=null==n?void 0:n.store;n&&console.warn("R3F.createRoot should only be called once!");const a="function"==typeof reportError?reportError:console.error,s=i||qf(hm,dm),o=r||pm.createContainer(s,ff.ConcurrentRoot,null,!1,null,"",a,null);let l;n||um.set(e,{fiber:o,store:s});let c,f=!1;return{configure(t={}){let{gl:n,size:r,scene:i,events:a,onCreated:o,shadows:m=!1,linear:g=!1,flat:v=!1,legacy:y=!1,orthographic:x=!1,frameloop:_="always",dpr:b=[1,2],performance:A,raycaster:M,camera:S,onPointerMissed:E}=t,w=s.getState(),T=w.gl;w.gl||w.set({gl:T=gm(n,e)});let C=w.raycaster;C||w.set({raycaster:C=new Sp});const{params:R,...P}=M||{};if(Uf.equ(P,C,mm)||fm(C,{...P}),Uf.equ(R,C.params,mm)||fm(C,{params:{...C.params,...R}}),!w.camera||w.camera===c&&!Uf.equ(c,S,mm)){c=S;const e=S instanceof Ha,t=e?S:x?new ps(0,0,0,0,.1,1e3):new Ga(75,0,.1,1e3);e||(t.position.z=5,S&&fm(t,S),w.camera||null!=S&&S.rotation||t.lookAt(0,0,0)),w.set({camera:t})}if(!w.scene){let e;i instanceof Nl?e=i:(e=new Nl,i&&fm(e,i)),w.set({scene:Nf(e)})}if(!w.xr){const e=(e,t)=>{const n=s.getState();"never"!==n.frameloop&&dm(e,!0,n,t)},t=()=>{const t=s.getState();t.gl.xr.enabled=t.gl.xr.isPresenting,t.gl.xr.setAnimationLoop(t.gl.xr.isPresenting?e:null),t.gl.xr.isPresenting||hm(t)},n={connect(){const e=s.getState().gl;e.xr.addEventListener("sessionstart",t),e.xr.addEventListener("sessionend",t)},disconnect(){const e=s.getState().gl;e.xr.removeEventListener("sessionstart",t),e.xr.removeEventListener("sessionend",t)}};T.xr&&n.connect(),w.set({xr:n})}if(T.shadowMap){const e=T.shadowMap.enabled,t=T.shadowMap.type;if(T.shadowMap.enabled=!!m,Uf.boo(m))T.shadowMap.type=d;else if(Uf.str(m)){var B;const e={basic:u,percentage:h,soft:d,variance:p};T.shadowMap.type=null!=(B=e[m])?B:d}else Uf.obj(m)&&Object.assign(T.shadowMap,m);e===T.shadowMap.enabled&&t===T.shadowMap.type||(T.shadowMap.needsUpdate=!0)}const L=wf();L&&("enabled"in L?L.enabled=!y:"legacyMode"in L&&(L.legacyMode=y)),fm(T,{outputEncoding:g?3e3:3001,toneMapping:v?Q:te}),w.legacy!==y&&w.set((()=>({legacy:y}))),w.linear!==g&&w.set((()=>({linear:g}))),w.flat!==v&&w.set((()=>({flat:v}))),!n||Uf.fun(n)||Yf(n)||Uf.equ(n,T,mm)||fm(T,n),a&&!w.events.handlers&&w.set({events:a(s)});const I=function(e,t){if(t)return t;if("undefined"!=typeof HTMLCanvasElement&&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"undefined"!=typeof OffscreenCanvas&&e instanceof OffscreenCanvas?{width:e.width,height:e.height,top:0,left:0}:{width:0,height:0,top:0,left:0}}(e,r);return Uf.equ(I,w.size,mm)||w.setSize(I.width,I.height,I.updateStyle,I.top,I.left),b&&w.viewport.dpr!==Df(b)&&w.setDpr(b),w.frameloop!==_&&w.setFrameloop(_),w.onPointerMissed||w.set({onPointerMissed:E}),A&&!Uf.equ(A,w.performance,mm)&&w.set((e=>({performance:{...e.performance,...A}}))),l=o,f=!0,this},render(n){return f||this.configure(),pm.updateContainer(t.createElement(vm,{store:s,children:n,onCreated:l,rootElement:e}),o,null,(()=>{})),s},unmount(){ym(e)}}}(e)),O.current.configure({gl:s,events:o,shadows:f,linear:m,flat:g,legacy:v,orthographic:y,frameloop:x,dpr:_,performance:b,raycaster:A,camera:M,size:P,onPointerMissed:(...e)=>null==I.current?void 0:I.current(...e),onCreated:e=>{var t;null==e.events.connect||e.events.connect(l?(t=l)&&t.hasOwnProperty("current")?l.current:l:L.current),c&&e.setEvents({compute:(e,t)=>{const n=e[c+"X"],r=e[c+"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)}}),O.current.render(t.createElement(C,null,t.createElement(Bf,{set:N},t.createElement(t.Suspense,{fallback:t.createElement(Pf,{set:F})},n)))))})),t.useEffect((()=>{const e=B.current;if(e)return()=>ym(e)}),[]);const k=l?"none":"auto";return t.createElement("div",xm({ref:L,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:k,...a}},w),t.createElement("div",{ref:R,style:{width:"100%",height:"100%"}},t.createElement("canvas",{ref:B,style:{display:"block"}},r)))})),Wm=t.forwardRef((function(e,n){return t.createElement(Nm,null,t.createElement(Vm,xm({},e,{ref:n})))})),jm=new WeakMap;class Xm extends td{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,r){const i=new id(this.manager);i.setPath(this.path),i.setResponseType("arraybuffer"),i.setRequestHeader(this.requestHeader),i.setWithCredentials(this.withCredentials),i.load(e,(e=>{const n={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(e,n).then(t).catch(r)}),n,r)}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(jm.has(e)){const t=jm.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 i=this.workerNextTaskID++,a=e.byteLength,s=this._getWorker(i,a).then((n=>(r=n,new Promise(((n,a)=>{r._callbacks[i]={resolve:n,reject:a},r.postMessage({type:"decode",id:i,taskConfig:t,buffer:e},[e])}))))).then((e=>this._createGeometry(e.geometry)));return s.catch((()=>!0)).then((()=>{r&&i&&this._releaseTask(r,i)})),jm.set(e,{key:n,promise:s}),s}_createGeometry(e){const t=new ma;e.index&&t.setIndex(new Qi(e.index.array,1));for(let n=0;n<e.attributes.length;n++){const r=e.attributes[n],i=r.name,a=r.array,s=r.itemSize;t.setAttribute(i,new Qi(a,s))}return t}_loadLibrary(e,t){const n=new id(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=Jm.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 Jm(){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,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 h=new i(e.HEAPF32.buffer,u,o).slice();return e._free(u),{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 c=t.GetEncodedGeometryType(r);if(c===e.TRIANGULAR_MESH)o=new e.Mesh,l=t.DecodeBufferToMesh(r,o);else{if(c!==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 u={index:null,attributes:[]};for(const r in a){const l=self[s[r]];let c,h;if(i.useUniqueIDs)h=a[r],c=t.GetAttributeByUniqueId(o,h);else{if(h=t.GetAttributeId(o,e[a[r]]),-1===h)continue;c=t.GetAttribute(o,h)}u.attributes.push(n(e,t,o,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 s=new Uint32Array(e.HEAPF32.buffer,a,r).slice();return e._free(a),{array:s,itemSize:1}}(e,t,o)),e.destroy(o),u}(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)}}))}}}let Ym;function Km(e,t){if(t===Bt)return console.warn("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Geometry already defined as triangles."),e;if(t===It||t===Lt){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 r=n.count-2,i=[];if(n)if(t===It)for(let e=1;e<=r;e++)i.push(n.getX(0)),i.push(n.getX(e)),i.push(n.getX(e+1));else for(let e=0;e<r;e++)e%2==0?(i.push(n.getX(e)),i.push(n.getX(e+1)),i.push(n.getX(e+2))):(i.push(n.getX(e+2)),i.push(n.getX(e+1)),i.push(n.getX(e)));i.length/3!==r&&console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const a=e.clone();return a.setIndex(i),a.clearGroups(),a}return console.error("THREE.BufferGeometryUtils.toTrianglesDrawMode(): Unknown draw mode:",t),e}class qm extends td{constructor(e){super(e),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register((function(e){return new ng(e)})),this.register((function(e){return new ug(e)})),this.register((function(e){return new hg(e)})),this.register((function(e){return new dg(e)})),this.register((function(e){return new ig(e)})),this.register((function(e){return new ag(e)})),this.register((function(e){return new sg(e)})),this.register((function(e){return new og(e)})),this.register((function(e){return new tg(e)})),this.register((function(e){return new lg(e)})),this.register((function(e){return new rg(e)})),this.register((function(e){return new cg(e)})),this.register((function(e){return new $m(e)})),this.register((function(e){return new pg(e)})),this.register((function(e){return new fg(e)}))}load(e,t,n,r){const i=this;let a;a=""!==this.resourcePath?this.resourcePath:""!==this.path?this.path:Bd.extractUrlBase(e),this.manager.itemStart(e);const s=function(t){r?r(t):console.error(t),i.manager.itemError(e),i.manager.itemEnd(e)},o=new id(this.manager);o.setPath(this.path),o.setResponseType("arraybuffer"),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,(function(n){try{i.parse(n,a,(function(n){t(n),i.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,r){let i;const a={},s={};if("string"==typeof e)i=JSON.parse(e);else if(e instanceof ArrayBuffer)if(Bd.decodeText(new Uint8Array(e.slice(0,4)))===mg){try{a[Zm.KHR_BINARY_GLTF]=new gg(e)}catch(e){return void(r&&r(e))}i=JSON.parse(a[Zm.KHR_BINARY_GLTF].content)}else i=JSON.parse(Bd.decodeText(new Uint8Array(e)));else i=e;if(void 0===i.asset||i.asset.version[0]<2)return void(r&&r(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported.")));const o=new Og(i,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});o.fileLoader.setRequestHeader(this.requestHeader);for(let e=0;e<this.pluginCallbacks.length;e++){const t=this.pluginCallbacks[e](o);s[t.name]=t,a[t.name]=!0}if(i.extensionsUsed)for(let e=0;e<i.extensionsUsed.length;++e){const t=i.extensionsUsed[e],n=i.extensionsRequired||[];switch(t){case Zm.KHR_MATERIALS_UNLIT:a[t]=new eg;break;case Zm.KHR_DRACO_MESH_COMPRESSION:a[t]=new vg(i,this.dracoLoader);break;case Zm.KHR_TEXTURE_TRANSFORM:a[t]=new yg;break;case Zm.KHR_MESH_QUANTIZATION:a[t]=new xg;break;default:n.indexOf(t)>=0&&void 0===s[t]&&console.warn('THREE.GLTFLoader: Unknown extension "'+t+'".')}}o.setExtensions(a),o.setPlugins(s),o.parse(n,r)}parseAsync(e,t){const n=this;return new Promise((function(r,i){n.parse(e,t,r,i)}))}}function Qm(){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 Zm={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 $m{constructor(e){this.parser=e,this.name=Zm.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 r=t.cache.get(n);if(r)return r;const i=t.json,a=((i.extensions&&i.extensions[this.name]||{}).lights||[])[e];let s;const o=new Hi(16777215);void 0!==a.color&&o.fromArray(a.color);const l=void 0!==a.range?a.range:0;switch(a.type){case"directional":s=new Ed(o),s.target.position.set(0,0,-1),s.add(s.target);break;case"point":s=new Md(o),s.distance=l;break;case"spot":s=new yd(o),s.distance=l,a.spot=a.spot||{},a.spot.innerConeAngle=void 0!==a.spot.innerConeAngle?a.spot.innerConeAngle:0,a.spot.outerConeAngle=void 0!==a.spot.outerConeAngle?a.spot.outerConeAngle:Math.PI/4,s.angle=a.spot.outerConeAngle,s.penumbra=1-a.spot.innerConeAngle/a.spot.outerConeAngle,s.target.position.set(0,0,-1),s.add(s.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+a.type)}return s.position.set(0,0,0),s.decay=2,Lg(s,a),void 0!==a.intensity&&(s.intensity=a.intensity),s.name=t.createUniqueName(a.name||"light_"+e),r=Promise.resolve(s),t.cache.add(n,r),r}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 eg{constructor(){this.name=Zm.KHR_MATERIALS_UNLIT}getMaterialType(){return Vi}extendParams(e,t,n){const r=[];e.color=new Hi(1,1,1),e.opacity=1;const i=t.pbrMetallicRoughness;if(i){if(Array.isArray(i.baseColorFactor)){const t=i.baseColorFactor;e.color.fromArray(t),e.opacity=t[3]}void 0!==i.baseColorTexture&&r.push(n.assignTexture(e,"map",i.baseColorTexture,3001))}return Promise.all(r)}}class tg{constructor(e){this.parser=e,this.name=Zm.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 ng{constructor(e){this.parser=e,this.name=Zm.KHR_MATERIALS_CLEARCOAT}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Sh: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];if(void 0!==a.clearcoatFactor&&(t.clearcoat=a.clearcoatFactor),void 0!==a.clearcoatTexture&&i.push(n.assignTexture(t,"clearcoatMap",a.clearcoatTexture)),void 0!==a.clearcoatRoughnessFactor&&(t.clearcoatRoughness=a.clearcoatRoughnessFactor),void 0!==a.clearcoatRoughnessTexture&&i.push(n.assignTexture(t,"clearcoatRoughnessMap",a.clearcoatRoughnessTexture)),void 0!==a.clearcoatNormalTexture&&(i.push(n.assignTexture(t,"clearcoatNormalMap",a.clearcoatNormalTexture)),void 0!==a.clearcoatNormalTexture.scale)){const e=a.clearcoatNormalTexture.scale;t.clearcoatNormalScale=new Wn(e,e)}return Promise.all(i)}}class rg{constructor(e){this.parser=e,this.name=Zm.KHR_MATERIALS_IRIDESCENCE}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Sh: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 ig{constructor(e){this.parser=e,this.name=Zm.KHR_MATERIALS_SHEEN}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Sh: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=[];t.sheenColor=new Hi(0,0,0),t.sheenRoughness=0,t.sheen=1;const a=r.extensions[this.name];return void 0!==a.sheenColorFactor&&t.sheenColor.fromArray(a.sheenColorFactor),void 0!==a.sheenRoughnessFactor&&(t.sheenRoughness=a.sheenRoughnessFactor),void 0!==a.sheenColorTexture&&i.push(n.assignTexture(t,"sheenColorMap",a.sheenColorTexture,3001)),void 0!==a.sheenRoughnessTexture&&i.push(n.assignTexture(t,"sheenRoughnessMap",a.sheenRoughnessTexture)),Promise.all(i)}}class ag{constructor(e){this.parser=e,this.name=Zm.KHR_MATERIALS_TRANSMISSION}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Sh: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 sg{constructor(e){this.parser=e,this.name=Zm.KHR_MATERIALS_VOLUME}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Sh: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];t.thickness=void 0!==a.thicknessFactor?a.thicknessFactor:0,void 0!==a.thicknessTexture&&i.push(n.assignTexture(t,"thicknessMap",a.thicknessTexture)),t.attenuationDistance=a.attenuationDistance||1/0;const s=a.attenuationColor||[1,1,1];return t.attenuationColor=new Hi(s[0],s[1],s[2]),Promise.all(i)}}class og{constructor(e){this.parser=e,this.name=Zm.KHR_MATERIALS_IOR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Sh: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 lg{constructor(e){this.parser=e,this.name=Zm.KHR_MATERIALS_SPECULAR}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Sh: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];t.specularIntensity=void 0!==a.specularFactor?a.specularFactor:1,void 0!==a.specularTexture&&i.push(n.assignTexture(t,"specularIntensityMap",a.specularTexture));const s=a.specularColorFactor||[1,1,1];return t.specularColor=new Hi(s[0],s[1],s[2]),void 0!==a.specularColorTexture&&i.push(n.assignTexture(t,"specularColorMap",a.specularColorTexture,3001)),Promise.all(i)}}class cg{constructor(e){this.parser=e,this.name=Zm.KHR_MATERIALS_ANISOTROPY}getMaterialType(e){const t=this.parser.json.materials[e];return t.extensions&&t.extensions[this.name]?Sh: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 ug{constructor(e){this.parser=e,this.name=Zm.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 hg{constructor(e){this.parser=e,this.name=Zm.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 dg{constructor(e){this.parser=e,this.name=Zm.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 pg{constructor(e){this.name=Zm.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 fg{constructor(e){this.name=Zm.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 r=t.meshes[n.mesh];for(const e of r.primitives)if(e.mode!==Mg.TRIANGLES&&e.mode!==Mg.TRIANGLE_STRIP&&e.mode!==Mg.TRIANGLE_FAN&&void 0!==e.mode)return null;const i=n.extensions[this.name].attributes,a=[],s={};for(const e in i)a.push(this.parser.getDependency("accessor",i[e]).then((t=>(s[e]=t,s[e]))));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then((e=>{const t=e.pop(),n=t.isGroup?t.children:[t],r=e[0].count,i=[];for(const e of n){const t=new Qr,n=new br,a=new _r,o=new br(1,1,1),l=new Rc(e.geometry,e.material,r);for(let e=0;e<r;e++)s.TRANSLATION&&n.fromBufferAttribute(s.TRANSLATION,e),s.ROTATION&&a.fromBufferAttribute(s.ROTATION,e),s.SCALE&&o.fromBufferAttribute(s.SCALE,e),l.setMatrixAt(e,t.compose(n,a,o));for(const t in s)"TRANSLATION"!==t&&"ROTATION"!==t&&"SCALE"!==t&&e.geometry.setAttribute(t,s[t]);Ai.prototype.copy.call(l,e),this.parser.assignFinalMaterial(l),i.push(l)}return t.isGroup?(t.clear(),t.add(...i),t):i[0]})))}}const mg="glTF";class gg{constructor(e){this.name=Zm.KHR_BINARY_GLTF,this.content=null,this.body=null;const t=new DataView(e,0,12);if(this.header={magic:Bd.decodeText(new Uint8Array(e.slice(0,4))),version:t.getUint32(4,!0),length:t.getUint32(8,!0)},this.header.magic!==mg)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,r=new DataView(e,12);let i=0;for(;i<n;){const t=r.getUint32(i,!0);i+=4;const n=r.getUint32(i,!0);if(i+=4,1313821514===n){const n=new Uint8Array(e,12+i,t);this.content=Bd.decodeText(n)}else if(5130562===n){const n=12+i;this.body=e.slice(n,n+t)}i+=t}if(null===this.content)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class vg{constructor(e,t){if(!t)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Zm.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=Cg[e]||e.toLowerCase();s[t]=a[e]}for(const t in e.attributes){const r=Cg[t]||t.toLowerCase();if(void 0!==a[t]){const i=n.accessors[e.attributes[t]],a=Sg[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 yg{constructor(){this.name=Zm.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 xg{constructor(){this.name=Zm.KHR_MESH_QUANTIZATION}}class _g extends Oh{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,c=r-t,u=(n-t)/c,h=u*u,d=h*u,p=e*l,f=p-l,m=-2*d+3*h,g=d-h,v=1-m,y=g-h+u;for(let e=0;e!==s;e++){const t=a[f+e+s],n=a[f+e+o]*c,r=a[p+e+s],l=a[p+e]*c;i[e]=v*t+y*n+m*r+g*l}return i}}const bg=new _r;class Ag extends _g{interpolate_(e,t,n,r){const i=super.interpolate_(e,t,n,r);return bg.fromArray(i).normalize().toArray(i),i}}const Mg={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},Sg={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},Eg={9728:de,9729:ve,9984:pe,9985:ye,9986:me,9987:_e},wg={33071:ue,33648:he,10497:ce},Tg={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},Cg={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",...r.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"},Rg={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},Pg={CUBICSPLINE:void 0,LINEAR:St,STEP:Mt};function Bg(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 Lg(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 Ig(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 Dg(e){let t;const n=e.extensions&&e.extensions[Zm.KHR_DRACO_MESH_COMPRESSION];if(t=n?"draco:"+n.bufferView+":"+n.indices+":"+Fg(n.attributes):e.indices+":"+Fg(e.attributes)+":"+e.mode,void 0!==e.targets)for(let n=0,r=e.targets.length;n<r;n++)t+=":"+Fg(e.targets[n]);return t}function Fg(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 Ug(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 Ng=new Qr;class Og{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new Qm,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,r=!1,i=-1;"undefined"!=typeof navigator&&void 0!==navigator.userAgent&&(n=!0===/^((?!chrome|android).)*safari/i.test(navigator.userAgent),r=navigator.userAgent.indexOf("Firefox")>-1,i=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),"undefined"==typeof createImageBitmap||n||r&&i<98?this.textureLoader=new ud(this.options.manager):this.textureLoader=new Od(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new id(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:{}};Bg(i,a,r),Lg(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[Zm.KHR_BINARY_GLTF].body);const r=this.options;return new Promise((function(e,i){n.load(Bd.resolveURL(t.uri,r.path),e,void 0,(function(){i(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,r=this.json.accessors[e];if(void 0===r.bufferView&&void 0===r.sparse){const e=Tg[r.type],t=Sg[r.componentType],n=!0===r.normalized,i=new t(r.count*e);return Promise.resolve(new Qi(i,e,n))}const i=[];return void 0!==r.bufferView?i.push(this.getDependency("bufferView",r.bufferView)):i.push(null),void 0!==r.sparse&&(i.push(this.getDependency("bufferView",r.sparse.indices.bufferView)),i.push(this.getDependency("bufferView",r.sparse.values.bufferView))),Promise.all(i).then((function(e){const i=e[0],a=Tg[r.type],s=Sg[r.componentType],o=s.BYTES_PER_ELEMENT,l=o*a,c=r.byteOffset||0,u=void 0!==r.bufferView?n.bufferViews[r.bufferView].byteStride:void 0,h=!0===r.normalized;let d,p;if(u&&u!==l){const e=Math.floor(c/u),n="InterleavedBuffer:"+r.bufferView+":"+r.componentType+":"+e+":"+r.count;let l=t.cache.get(n);l||(d=new s(i,e*u,r.count*u/o),l=new Ol(d,u/o),t.cache.add(n,l)),p=new zl(l,a,c%u/o,h)}else d=null===i?new s(r.count*a):new s(i,c,r.count*a),p=new Qi(d,a,h);if(void 0!==r.sparse){const t=Tg.SCALAR,n=Sg[r.sparse.indices.componentType],o=r.sparse.indices.byteOffset||0,l=r.sparse.values.byteOffset||0,c=new n(e[1],o,r.sparse.count*t),u=new s(e[2],l,r.sparse.count*a);null!==i&&(p=new Qi(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,u[e*a]),a>=2&&p.setY(t,u[e*a+1]),a>=3&&p.setZ(t,u[e*a+2]),a>=4&&p.setW(t,u[e*a+3]),a>=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 r=this,i=this.json,a=i.textures[e],s=i.images[t],o=(s.uri||s.bufferView)+":"+a.sampler;if(this.textureCache[o])return this.textureCache[o];const l=this.loadImageSource(t,n).then((function(t){t.flipY=!1,t.name=a.name||s.name||"",""===t.name&&"string"==typeof s.uri&&!1===s.uri.startsWith("data:image/")&&(t.name=s.uri);const n=(i.samplers||{})[a.sampler]||{};return t.magFilter=Eg[n.magFilter]||ve,t.minFilter=Eg[n.minFilter]||_e,t.wrapS=wg[n.wrapS]||ce,t.wrapT=wg[n.wrapT]||ce,r.associations.set(t,{textures:e}),t})).catch((function(){return null}));return this.textureCache[o]=l,l}loadImageSource(e,t){const n=this.json,r=this.options;if(void 0!==this.sourceCache[e])return this.sourceCache[e].then((e=>e.clone()));const i=n.images[e],a=self.URL||self.webkitURL;let s=i.uri||"",o=!1;if(void 0!==i.bufferView)s=this.getDependency("bufferView",i.bufferView).then((function(e){o=!0;const t=new Blob([e],{type:i.mimeType});return s=a.createObjectURL(t),s}));else if(void 0===i.uri)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const l=Promise.resolve(s).then((function(e){return new Promise((function(n,i){let a=n;!0===t.isImageBitmapLoader&&(a=function(e){const t=new dr(e);t.needsUpdate=!0,n(t)}),t.load(Bd.resolveURL(e,r.path),a,void 0,i)}))})).then((function(e){var t;return!0===o&&a.revokeObjectURL(s),e.userData.mimeType=i.mimeType||((t=i.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]=l,l}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[Zm.KHR_TEXTURE_TRANSFORM]){const e=void 0!==n.extensions?n.extensions[Zm.KHR_TEXTURE_TRANSFORM]:void 0;if(e){const t=i.associations.get(a);a=i.extensions[Zm.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 r=void 0===t.attributes.tangent,i=void 0!==t.attributes.color,a=void 0===t.attributes.normal;if(e.isPoints){const e="PointsMaterial:"+n.uuid;let t=this.cache.get(e);t||(t=new Hc,Ui.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 Pc,Ui.prototype.copy.call(t,n),t.color.copy(n.color),t.map=n.map,this.cache.add(e,t)),n=t}if(r||i||a){let e="ClonedMaterial:"+n.uuid+":";r&&(e+="derivative-tangents:"),i&&(e+="vertex-colors:"),a&&(e+="flat-shading:");let t=this.cache.get(e);t||(t=n.clone(),i&&(t.vertexColors=!0),a&&(t.flatShading=!0),r&&(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 Mh}loadMaterial(e){const t=this,n=this.json,r=this.extensions,i=n.materials[e];let a;const s={},o=[];if((i.extensions||{})[Zm.KHR_MATERIALS_UNLIT]){const e=r[Zm.KHR_MATERIALS_UNLIT];a=e.getMaterialType(),o.push(e.extendParams(s,i,t))}else{const n=i.pbrMetallicRoughness||{};if(s.color=new Hi(1,1,1),s.opacity=1,Array.isArray(n.baseColorFactor)){const e=n.baseColorFactor;s.color.fromArray(e),s.opacity=e[3]}void 0!==n.baseColorTexture&&o.push(t.assignTexture(s,"map",n.baseColorTexture,3001)),s.metalness=void 0!==n.metallicFactor?n.metallicFactor:1,s.roughness=void 0!==n.roughnessFactor?n.roughnessFactor:1,void 0!==n.metallicRoughnessTexture&&(o.push(t.assignTexture(s,"metalnessMap",n.metallicRoughnessTexture)),o.push(t.assignTexture(s,"roughnessMap",n.metallicRoughnessTexture))),a=this._invokeOne((function(t){return t.getMaterialType&&t.getMaterialType(e)})),o.push(Promise.all(this._invokeAll((function(t){return t.extendMaterialParams&&t.extendMaterialParams(e,s)}))))}!0===i.doubleSided&&(s.side=g);const l=i.alphaMode||"OPAQUE";if("BLEND"===l?(s.transparent=!0,s.depthWrite=!1):(s.transparent=!1,"MASK"===l&&(s.alphaTest=void 0!==i.alphaCutoff?i.alphaCutoff:.5)),void 0!==i.normalTexture&&a!==Vi&&(o.push(t.assignTexture(s,"normalMap",i.normalTexture)),s.normalScale=new Wn(1,1),void 0!==i.normalTexture.scale)){const e=i.normalTexture.scale;s.normalScale.set(e,e)}return void 0!==i.occlusionTexture&&a!==Vi&&(o.push(t.assignTexture(s,"aoMap",i.occlusionTexture)),void 0!==i.occlusionTexture.strength&&(s.aoMapIntensity=i.occlusionTexture.strength)),void 0!==i.emissiveFactor&&a!==Vi&&(s.emissive=(new Hi).fromArray(i.emissiveFactor)),void 0!==i.emissiveTexture&&a!==Vi&&o.push(t.assignTexture(s,"emissiveMap",i.emissiveTexture,3001)),Promise.all(o).then((function(){const n=new a(s);return i.name&&(n.name=i.name),Lg(n,i),t.associations.set(n,{materials:e}),i.extensions&&Bg(r,n,i),n}))}createUniqueName(e){const t=fp.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,n=this.extensions,r=this.primitiveCache;function i(e){return n[Zm.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(e,t).then((function(n){return kg(n,e,t)}))}const a=[];for(let n=0,s=e.length;n<s;n++){const s=e[n],o=Dg(s),l=r[o];if(l)a.push(l.promise);else{let e;e=s.extensions&&s.extensions[Zm.KHR_DRACO_MESH_COMPRESSION]?i(s):kg(new ma,s,t),r[o]={primitive:s,promise:e},a.push(e)}}return Promise.all(a)}loadMesh(e){const t=this,n=this.json,r=this.extensions,i=n.meshes[e],a=i.primitives,s=[];for(let e=0,t=a.length;e<t;e++){const t=void 0===a[e].material?(void 0===(o=this.cache).DefaultMaterial&&(o.DefaultMaterial=new Mh({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:f})),o.DefaultMaterial):this.getDependency("material",a[e].material);s.push(t)}var o;return s.push(t.loadGeometries(a)),Promise.all(s).then((function(n){const s=n.slice(0,n.length-1),o=n[n.length-1],l=[];for(let n=0,c=o.length;n<c;n++){const c=o[n],u=a[n];let h;const d=s[n];if(u.mode===Mg.TRIANGLES||u.mode===Mg.TRIANGLE_STRIP||u.mode===Mg.TRIANGLE_FAN||void 0===u.mode)h=!0===i.isSkinnedMesh?new mc(c,d):new Ia(c,d),!0===h.isSkinnedMesh&&h.normalizeSkinWeights(),u.mode===Mg.TRIANGLE_STRIP?h.geometry=Km(h.geometry,Lt):u.mode===Mg.TRIANGLE_FAN&&(h.geometry=Km(h.geometry,It));else if(u.mode===Mg.LINES)h=new kc(c,d);else if(u.mode===Mg.LINE_STRIP)h=new Uc(c,d);else if(u.mode===Mg.LINE_LOOP)h=new zc(c,d);else{if(u.mode!==Mg.POINTS)throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+u.mode);h=new Xc(c,d)}Object.keys(h.geometry.morphAttributes).length>0&&Ig(h,i),h.name=t.createUniqueName(i.name||"mesh_"+e),Lg(h,i),u.extensions&&Bg(r,h,u),t.assignFinalMaterial(h),l.push(h)}for(let n=0,r=l.length;n<r;n++)t.associations.set(l[n],{meshes:e,primitives:n});if(1===l.length)return i.extensions&&Bg(r,l[0],i),l[0];const c=new El;i.extensions&&Bg(r,c,i),t.associations.set(c,{meshes:e});for(let e=0,t=l.length;e<t;e++)c.add(l[e]);return c}))}loadCamera(e){let t;const n=this.json.cameras[e],r=n[n.type];if(r)return"perspective"===n.type?t=new Ga(Vn.radToDeg(r.yfov),r.aspectRatio||1,r.znear||1,r.zfar||2e6):"orthographic"===n.type&&(t=new ps(-r.xmag,r.xmag,r.ymag,-r.ymag,r.znear,r.zfar)),n.name&&(t.name=this.createUniqueName(n.name)),Lg(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(),r=e,i=[],a=[];for(let e=0,s=r.length;e<s;e++){const s=r[e];if(s){i.push(s);const t=new Qr;null!==n&&t.fromArray(n.array,16*e),a.push(t)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',t.joints[e])}return new _c(i,a)}))}loadAnimation(e){const t=this.json.animations[e],n=t.name?t.name:"animation_"+e,r=[],i=[],a=[],s=[],o=[];for(let e=0,n=t.channels.length;e<n;e++){const n=t.channels[e],l=t.samplers[n.sampler],c=n.target,u=c.node,h=void 0!==t.parameters?t.parameters[l.input]:l.input,d=void 0!==t.parameters?t.parameters[l.output]:l.output;void 0!==c.node&&(r.push(this.getDependency("node",u)),i.push(this.getDependency("accessor",h)),a.push(this.getDependency("accessor",d)),s.push(l),o.push(c))}return Promise.all([Promise.all(r),Promise.all(i),Promise.all(a),Promise.all(s),Promise.all(o)]).then((function(e){const t=e[0],r=e[1],i=e[2],a=e[3],s=e[4],o=[];for(let e=0,n=t.length;e<n;e++){const n=t[e],l=r[e],c=i[e],u=a[e],h=s[e];if(void 0===n)continue;let d;switch(n.updateMatrix(),Rg[h.path]){case Rg.weights:d=jh;break;case Rg.rotation:d=Jh;break;default:d=Kh}const p=n.name?n.name:n.uuid,f=void 0!==u.interpolation?Pg[u.interpolation]:St,m=[];Rg[h.path]===Rg.weights?n.traverse((function(e){e.morphTargetInfluences&&m.push(e.name?e.name:e.uuid)})):m.push(p);let g=c.array;if(c.normalized){const e=Ug(g.constructor),t=new Float32Array(g.length);for(let n=0,r=g.length;n<r;n++)t[n]=g[n]*e;g=t}for(let e=0,t=m.length;e<t;e++){const t=new d(m[e]+"."+Rg[h.path],l.array,g,f);"CUBICSPLINE"===u.interpolation&&(t.createInterpolant=function(e){return new(this instanceof Jh?Ag:_g)(this.times,this.values,this.getValueSize()/3,e)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0),o.push(t)}}return new qh(n,void 0,o)}))}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,Ng)}));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,r=this;if(void 0!==this.nodeCache[e])return this.nodeCache[e];const i=t.nodes[e],a=i.name?r.createUniqueName(i.name):"",s=[],o=r._invokeOne((function(t){return t.createNodeMesh&&t.createNodeMesh(e)}));return o&&s.push(o),void 0!==i.camera&&s.push(r.getDependency("camera",i.camera).then((function(e){return r._getNodeRef(r.cameraCache,i.camera,e)}))),r._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===i.isBone?new gc:t.length>1?new El:1===t.length?t[0]:new Ai,s!==t[0])for(let e=0,n=t.length;e<n;e++)s.add(t[e]);if(i.name&&(s.userData.name=i.name,s.name=a),Lg(s,i),i.extensions&&Bg(n,s,i),void 0!==i.matrix){const e=new Qr;e.fromArray(i.matrix),s.applyMatrix4(e)}else void 0!==i.translation&&s.position.fromArray(i.translation),void 0!==i.rotation&&s.quaternion.fromArray(i.rotation),void 0!==i.scale&&s.scale.fromArray(i.scale);return r.associations.has(s)||r.associations.set(s,{}),r.associations.get(s).nodes=e,s})),this.nodeCache[e]}loadScene(e){const t=this.extensions,n=this.json.scenes[e],r=this,i=new El;n.name&&(i.name=r.createUniqueName(n.name)),Lg(i,n),n.extensions&&Bg(t,i,n);const a=n.nodes||[],s=[];for(let e=0,t=a.length;e<t;e++)s.push(r.getDependency("node",a[e]));return Promise.all(s).then((function(e){for(let t=0,n=e.length;t<n;t++)i.add(e[t]);return r.associations=(e=>{const t=new Map;for(const[e,n]of r.associations)(e instanceof Ui||e instanceof dr)&&t.set(e,n);return e.traverse((e=>{const n=r.associations.get(e);null!=n&&t.set(e,n)})),t})(i),i}))}}function kg(e,t,n){const r=t.attributes,i=[];function a(t,r){return n.getDependency("accessor",t).then((function(t){e.setAttribute(r,t)}))}for(const t in r){const n=Cg[t]||t.toLowerCase();n in e.attributes||i.push(a(r[t],n))}if(void 0!==t.indices&&!e.index){const r=n.getDependency("accessor",t.indices).then((function(t){e.setIndex(t)}));i.push(r)}return Lg(e,t),function(e,t,n){const r=t.attributes,i=new Sr;if(void 0===r.POSITION)return;{const e=n.json.accessors[r.POSITION],t=e.min,a=e.max;if(void 0===t||void 0===a)return void console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");if(i.set(new br(t[0],t[1],t[2]),new br(a[0],a[1],a[2])),e.normalized){const t=Ug(Sg[e.componentType]);i.min.multiplyScalar(t),i.max.multiplyScalar(t)}}const a=t.targets;if(void 0!==a){const e=new br,t=new br;for(let r=0,i=a.length;r<i;r++){const i=a[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=Ug(Sg[r.componentType]);t.multiplyScalar(e)}e.max(t)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(e)}e.boundingBox=i;const s=new Gr;i.getCenter(s.center),s.radius=i.min.distanceTo(i.max)/2,e.boundingSphere=s}(e,t,n),Promise.all(i).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 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;s.push(t)}if(i){const t=void 0!==u.NORMAL?n.getDependency("accessor",u.NORMAL):e.attributes.normal;o.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(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}))}let zg=null;function Hg(e,t,n){return r=>{n&&n(r),e&&(zg||(zg=new Xm),zg.setDecoderPath("string"==typeof e?e:"https://www.gstatic.com/draco/versioned/decoders/1.5.5/"),r.setDRACOLoader(zg)),t&&r.setMeshoptDecoder((()=>{if(Ym)return Ym;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,r="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)&&(r="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 i=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)}(r),{}).then((e=>{n=e.instance,n.exports.__wasm_call_ctors()}));function a(e,t,r,i,a,s){const o=n.exports.sbrk,l=r+3&-4,c=o(l*i),u=o(a.length),h=new Uint8Array(n.exports.memory.buffer);h.set(a,u);const d=e(c,r,i,u,a.length);if(0===d&&s&&s(c,l,i),t.set(h.subarray(c,c+r*i)),o(c-o(0)),0!==d)throw new Error(`Malformed buffer data: ${d}`)}const s={0:"",1:"meshopt_decodeFilterOct",2:"meshopt_decodeFilterQuat",3:"meshopt_decodeFilterExp",NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},o={0:"meshopt_decodeVertexBuffer",1:"meshopt_decodeIndexBuffer",2:"meshopt_decodeIndexSequence",ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"};return Ym={ready:i,supported:!0,decodeVertexBuffer(e,t,r,i,o){a(n.exports.meshopt_decodeVertexBuffer,e,t,r,i,n.exports[s[o]])},decodeIndexBuffer(e,t,r,i){a(n.exports.meshopt_decodeIndexBuffer,e,t,r,i)},decodeIndexSequence(e,t,r,i){a(n.exports.meshopt_decodeIndexSequence,e,t,r,i)},decodeGltfBuffer(e,t,r,i,l,c){a(n.exports[o[l]],e,t,r,i,n.exports[s[c]])}},Ym})())}}function Gg(e,t=!0,n=!0,r){return cm(qm,e,Hg(t,n,r))}Gg.preload=(e,t=!0,n=!0,r)=>cm.preload(qm,e,Hg(t,n,r)),Gg.clear=e=>cm.clear(qm,e);const Vg=t.forwardRef((function({follow:e=!0,lockX:n=!1,lockY:r=!1,lockZ:i=!1,...a},s){const o=t.useRef();return om((({camera:t})=>{if(!e||!o.current)return;const a=o.current.rotation.clone();t.getWorldQuaternion(o.current.quaternion),n&&(o.current.rotation.x=a.x),r&&(o.current.rotation.y=a.y),i&&(o.current.rotation.z=a.z)})),t.createElement("group",xm({ref:(l=[o,s],function(e){l.forEach((function(t){"function"==typeof t?t(e):null!=t&&(t.current=e)}))})},a));var l})),Wg=new br,jg=new br,Xg=new br;function Jg(e,t,n){const r=Wg.setFromMatrixPosition(e.matrixWorld);r.project(t);const i=n.width/2,a=n.height/2;return[r.x*i+i,-r.y*a+a]}const Yg=e=>Math.abs(e)<1e-10?0:e;function Kg(e,t,n=""){let r="matrix3d(";for(let n=0;16!==n;n++)r+=Yg(t[n]*e.elements[n])+(15!==n?",":")");return n+r}const qg=(Qg=[1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1],e=>Kg(e,Qg));var Qg;const Zg=t.forwardRef((({children:e,eps:n=.001,style:r,className:i,prepend:a,center:s,fullscreen:o,portal:l,distanceFactor:c,sprite:u=!1,transform:h=!1,occlude:d,onOcclude:p,castShadow:f,receiveShadow:m,material:v,geometry:y,zIndexRange:x=[16777271,0],calculatePosition:_=Jg,as:b="div",wrapperClass:A,pointerEvents:M="auto",...S},E)=>{const{gl:w,camera:T,scene:C,size:R,raycaster:P,events:B,viewport:L}=function(e=(e=>e),t){return sm()(e,t)}(),[I]=t.useState((()=>document.createElement(b))),D=t.useRef(),F=t.useRef(null),U=t.useRef(0),N=t.useRef([0,0]),O=t.useRef(null),k=t.useRef(null),z=(null==l?void 0:l.current)||B.connected||w.domElement.parentNode,H=t.useRef(null),G=t.useRef(!1),V=t.useMemo((()=>d&&"blending"!==d||Array.isArray(d)&&d.length&&function(e){return e&&"object"==typeof e&&"current"in e}(d[0])),[d]);t.useLayoutEffect((()=>{const e=w.domElement;d&&"blending"===d?(e.style.zIndex=`${Math.floor(x[0]/2)}`,e.style.position="absolute",e.style.pointerEvents="none"):(e.style.zIndex=null,e.style.position=null,e.style.pointerEvents=null)}),[d]),t.useLayoutEffect((()=>{if(F.current){const e=D.current=pf.s(I);if(C.updateMatrixWorld(),h)I.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const e=_(F.current,T,R);I.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${e[0]}px,${e[1]}px,0);transform-origin:0 0;`}return z&&(a?z.prepend(I):z.appendChild(I)),()=>{z&&z.removeChild(I),e.unmount()}}}),[z,h]),t.useLayoutEffect((()=>{A&&(I.className=A)}),[A]);const W=t.useMemo((()=>h?{position:"absolute",top:0,left:0,width:R.width,height:R.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-R.height/2,left:-R.width/2,width:R.width,height:R.height},...r}),[r,s,o,R,h]),j=t.useMemo((()=>({position:"absolute",pointerEvents:M})),[M]);t.useLayoutEffect((()=>{var n,a;G.current=!1,h?null==(n=D.current)||n.render(t.createElement("div",{ref:O,style:W},t.createElement("div",{ref:k,style:j},t.createElement("div",{ref:E,className:i,style:r,children:e})))):null==(a=D.current)||a.render(t.createElement("div",{ref:E,style:W,className:i,children:e}))}));const X=t.useRef(!0);om((e=>{if(F.current){T.updateMatrixWorld(),F.current.updateWorldMatrix(!0,!1);const e=h?N.current:_(F.current,T,R);if(h||Math.abs(U.current-T.zoom)>n||Math.abs(N.current[0]-e[0])>n||Math.abs(N.current[1]-e[1])>n){const t=function(e,t){const n=Wg.setFromMatrixPosition(e.matrixWorld),r=jg.setFromMatrixPosition(t.matrixWorld),i=n.sub(r),a=t.getWorldDirection(Xg);return i.angleTo(a)>Math.PI/2}(F.current,T);let n=!1;V&&("blending"!==d?n=[C]:Array.isArray(d)&&(n=d.map((e=>e.current))));const r=X.current;if(n){const e=function(e,t,n,r){const i=Wg.setFromMatrixPosition(e.matrixWorld),a=i.clone();a.project(t),n.setFromCamera(a,t);const s=n.intersectObjects(r,!0);if(s.length){const e=s[0].distance;return i.distanceTo(n.ray.origin)<e}return!0}(F.current,T,P,n);X.current=e&&!t}else X.current=!t;r!==X.current&&(p?p(!X.current):I.style.display=X.current?"block":"none");const i=Math.floor(x[0]/2),a=d?V?[x[0],i]:[i-1,0]:x;if(I.style.zIndex=`${function(e,t,n){if(t instanceof Ga||t instanceof ps){const r=Wg.setFromMatrixPosition(e.matrixWorld),i=jg.setFromMatrixPosition(t.matrixWorld),a=r.distanceTo(i),s=(n[1]-n[0])/(t.far-t.near),o=n[1]-s*t.far;return Math.round(s*a+o)}}(F.current,T,a)}`,h){const[e,t]=[R.width/2,R.height/2],n=T.projectionMatrix.elements[5]*t,{isOrthographicCamera:r,top:i,left:a,bottom:s,right:o}=T,l=qg(T.matrixWorldInverse),h=r?`scale(${n})translate(${Yg(-(o+a)/2)}px,${Yg((i+s)/2)}px)`:`translateZ(${n}px)`;let d=F.current.matrixWorld;u&&(d=T.matrixWorldInverse.clone().transpose().copyPosition(d).scale(F.current.scale),d.elements[3]=d.elements[7]=d.elements[11]=0,d.elements[15]=1),I.style.width=R.width+"px",I.style.height=R.height+"px",I.style.perspective=r?"":`${n}px`,O.current&&k.current&&(O.current.style.transform=`${h}${l}translate(${e}px,${t}px)`,k.current.style.transform=((e,t)=>{return Kg(e,[1/(n=t),1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1],"translate(-50%,-50%)");var n})(d,1/((c||10)/400)))}else{const t=void 0===c?1:function(e,t){if(t instanceof ps)return t.zoom;if(t instanceof Ga){const n=Wg.setFromMatrixPosition(e.matrixWorld),r=jg.setFromMatrixPosition(t.matrixWorld),i=t.fov*Math.PI/180,a=n.distanceTo(r);return 1/(2*Math.tan(i/2)*a)}return 1}(F.current,T)*c;I.style.transform=`translate3d(${e[0]}px,${e[1]}px,0) scale(${t})`}N.current=e,U.current=T.zoom}}if(!V&&H.current&&!G.current)if(h){if(O.current){const e=O.current.children[0];if(null!=e&&e.clientWidth&&null!=e&&e.clientHeight){const{isOrthographicCamera:t}=T;if(t||y)S.scale&&(Array.isArray(S.scale)?S.scale instanceof br?H.current.scale.copy(S.scale.clone().divideScalar(1)):H.current.scale.set(1/S.scale[0],1/S.scale[1],1/S.scale[2]):H.current.scale.setScalar(1/S.scale));else{const t=(c||10)/400,n=e.clientWidth*t,r=e.clientHeight*t;H.current.scale.set(n,r,1)}G.current=!0}}}else{const t=I.children[0];if(null!=t&&t.clientWidth&&null!=t&&t.clientHeight){const e=1/L.factor,n=t.clientWidth*e,r=t.clientHeight*e;H.current.scale.set(n,r,1),G.current=!0}H.current.lookAt(e.camera.position)}}));const J=t.useMemo((()=>({vertexShader:h?void 0:'\n /*\n This shader is from the THREE\'s SpriteMaterial.\n We need to turn the backing plane into a Sprite\n (make it always face the camera) if "transfrom" \n is false. \n */\n #include <common>\n\n void main() {\n vec2 center = vec2(0., 1.);\n float rotation = 0.0;\n \n // This is somewhat arbitrary, but it seems to work well\n // Need to figure out how to derive this dynamically if it even matters\n float size = 0.03;\n\n vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 );\n vec2 scale;\n scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) );\n scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) );\n\n bool isPerspective = isPerspectiveMatrix( projectionMatrix );\n if ( isPerspective ) scale *= - mvPosition.z;\n\n vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale * size;\n vec2 rotatedPosition;\n rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y;\n rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y;\n mvPosition.xy += rotatedPosition;\n\n gl_Position = projectionMatrix * mvPosition;\n }\n ',fragmentShader:"\n void main() {\n gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0);\n }\n "})),[h]);return t.createElement("group",xm({},S,{ref:F}),d&&!V&&t.createElement("mesh",{castShadow:f,receiveShadow:m,ref:H},y||t.createElement("planeGeometry",null),v||t.createElement("shaderMaterial",{side:g,vertexShader:J.vertexShader,fragmentShader:J.fragmentShader})))})),$g="undefined"!=typeof document,ev=$g?t.useLayoutEffect:t.useEffect;function tv(){const e=(0,t.useRef)(!1);return ev((()=>(e.current=!0,()=>{e.current=!1})),[]),e}const nv=e=>e,rv=["prepare","read","update","preRender","render","postRender"],{schedule:iv,cancel:av,state:sv,steps:ov}=function(e,t){let n=!1,r=!0;const i={delta:0,timestamp:0,isProcessing:!1},a=rv.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,c=l?t:n;return a&&s.add(e),-1===c.indexOf(e)&&(c.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}((()=>n=!0)),e)),{}),s=e=>a[e].process(i),o=t=>{n=!1,i.delta=r?1e3/60:Math.max(Math.min(t-i.timestamp,40),1),i.timestamp=t,i.isProcessing=!0,rv.forEach(s),i.isProcessing=!1,n&&(r=!1,e(o))};return{schedule:rv.reduce(((t,s)=>{const l=a[s];return t[s]=(t,a=!1,s=!1)=>(n||(n=!0,r=!0,i.isProcessing||e(o)),l.schedule(t,a,s)),t}),{}),cancel:e=>rv.forEach((t=>a[t].cancel(e))),state:i,steps:a}}("undefined"!=typeof requestAnimationFrame?requestAnimationFrame:nv),lv=(0,t.createContext)(null);function cv(e){const n=(0,t.useRef)(null);return null===n.current&&(n.current=e()),n.current}class uv extends t.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 hv({children:e,isPresent:n}){const r=(0,t.useId)(),i=(0,t.useRef)(null),a=(0,t.useRef)({width:0,height:0,top:0,left:0});return(0,t.useInsertionEffect)((()=>{const{width:e,height:t,top:s,left:o}=a.current;if(n||!i.current||!e||!t)return;i.current.dataset.motionPopId=r;const l=document.createElement("style");return document.head.appendChild(l),l.sheet&&l.sheet.insertRule(`\n [data-motion-pop-id="${r}"] {\n position: absolute !important;\n width: ${e}px !important;\n height: ${t}px !important;\n top: ${s}px !important;\n left: ${o}px !important;\n }\n `),()=>{document.head.removeChild(l)}}),[n]),t.createElement(uv,{isPresent:n,childRef:i,sizeRef:a},t.cloneElement(e,{ref:i}))}const dv=({children:e,initial:n,isPresent:r,onExitComplete:i,custom:a,presenceAffectsLayout:s,mode:o})=>{const l=cv(pv),c=(0,t.useId)(),u=(0,t.useMemo)((()=>({id:c,initial:n,isPresent:r,custom:a,onExitComplete:e=>{l.set(e,!0);for(const e of l.values())if(!e)return;i&&i()},register:e=>(l.set(e,!1),()=>l.delete(e))})),s?void 0:[r]);return(0,t.useMemo)((()=>{l.forEach(((e,t)=>l.set(t,!1)))}),[r]),t.useEffect((()=>{!r&&!l.size&&i&&i()}),[r]),"popLayout"===o&&(e=t.createElement(hv,{isPresent:r},e)),t.createElement(lv.Provider,{value:u},e)};function pv(){return new Map}const fv=(0,t.createContext)({});let mv=nv,gv=nv;const vv=e=>e.key||"",yv=({children:e,custom:n,initial:r=!0,onExitComplete:i,exitBeforeEnter:a,presenceAffectsLayout:s=!0,mode:o="sync"})=>{gv(!a,"Replace exitBeforeEnter with mode='wait'");const l=(0,t.useContext)(fv).forceRender||function(){const e=tv(),[n,r]=(0,t.useState)(0),i=(0,t.useCallback)((()=>{e.current&&r(n+1)}),[n]);return[(0,t.useCallback)((()=>iv.postRender(i)),[i]),n]}()[0],c=tv(),u=function(e){const n=[];return t.Children.forEach(e,(e=>{(0,t.isValidElement)(e)&&n.push(e)})),n}(e);let h=u;const d=(0,t.useRef)(new Map).current,p=(0,t.useRef)(h),f=(0,t.useRef)(new Map).current,m=(0,t.useRef)(!0);var g;if(ev((()=>{m.current=!1,function(e,t){e.forEach((e=>{const n=vv(e);t.set(n,e)}))}(u,f),p.current=h})),g=()=>{m.current=!0,f.clear(),d.clear()},(0,t.useEffect)((()=>()=>g()),[]),m.current)return t.createElement(t.Fragment,null,h.map((e=>t.createElement(dv,{key:vv(e),isPresent:!0,initial:!!r&&void 0,presenceAffectsLayout:s,mode:o},e))));h=[...h];const v=p.current.map(vv),y=u.map(vv),x=v.length;for(let e=0;e<x;e++){const t=v[e];-1!==y.indexOf(t)||d.has(t)||d.set(t,void 0)}return"wait"===o&&d.size&&(h=[]),d.forEach(((e,r)=>{if(-1!==y.indexOf(r))return;const a=f.get(r);if(!a)return;const m=v.indexOf(r);let g=e;if(!g){const e=()=>{f.delete(r),d.delete(r);const e=p.current.findIndex((e=>e.key===r));if(p.current.splice(e,1),!d.size){if(p.current=u,!1===c.current)return;l(),i&&i()}};g=t.createElement(dv,{key:vv(a),isPresent:!1,onExitComplete:e,custom:n,presenceAffectsLayout:s,mode:o},a),d.set(r,g)}h.splice(m,0,g)})),h=h.map((e=>{const n=e.key;return d.has(n)?e:t.createElement(dv,{key:vv(e),isPresent:!0,presenceAffectsLayout:s,mode:o},e)})),t.createElement(t.Fragment,null,d.size?h:h.map((e=>(0,t.cloneElement)(e))))},xv=(0,t.createContext)({transformPagePoint:e=>e,isStatic:!1,reducedMotion:"never"}),_v=(0,t.createContext)({}),bv=(0,t.createContext)({strict:!1});function Av(e){return"object"==typeof e&&Object.prototype.hasOwnProperty.call(e,"current")}function Mv(e){return"string"==typeof e||Array.isArray(e)}function Sv(e){return"object"==typeof e&&"function"==typeof e.start}const Ev=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],wv=["initial",...Ev];function Tv(e){return Sv(e.animate)||wv.some((t=>Mv(e[t])))}function Cv(e){return Boolean(Tv(e)||e.variants)}function Rv(e){return Array.isArray(e)?e.join(" "):e}const Pv={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Bv={};for(const e in Pv)Bv[e]={isEnabled:t=>Pv[e].some((e=>!!t[e]))};const Lv=(0,t.createContext)({}),Iv=Symbol.for("motionComponentSymbol");function Dv({preloadedFeatures:e,createVisualElement:n,useRender:r,useVisualState:i,Component:a}){e&&function(e){for(const t in e)Bv[t]={...Bv[t],...e[t]}}(e);const s=(0,t.forwardRef)((function(s,o){let l;const c={...(0,t.useContext)(xv),...s,layoutId:Fv(s)},{isStatic:u}=c,h=function(e){const{initial:n,animate:r}=function(e,t){if(Tv(e)){const{initial:t,animate:n}=e;return{initial:!1===t||Mv(t)?t:void 0,animate:Mv(n)?n:void 0}}return!1!==e.inherit?t:{}}(e,(0,t.useContext)(_v));return(0,t.useMemo)((()=>({initial:n,animate:r})),[Rv(n),Rv(r)])}(s),d=i(s,u);if(!u&&$g){h.visualElement=function(e,n,r,i){const{visualElement:a}=(0,t.useContext)(_v),s=(0,t.useContext)(bv),o=(0,t.useContext)(lv),l=(0,t.useContext)(xv).reducedMotion,c=(0,t.useRef)();i=i||s.renderer,!c.current&&i&&(c.current=i(e,{visualState:n,parent:a,props:r,presenceContext:o,blockInitialAnimation:!!o&&!1===o.initial,reducedMotionConfig:l}));const u=c.current;return(0,t.useInsertionEffect)((()=>{u&&u.update(r,o)})),ev((()=>{u&&u.render()})),(0,t.useEffect)((()=>{u&&u.updateFeatures()})),(window.HandoffAppearAnimations?ev:t.useEffect)((()=>{u&&u.animationState&&u.animationState.animateChanges()})),u}(a,d,c,n);const r=(0,t.useContext)(Lv),i=(0,t.useContext)(bv).strict;h.visualElement&&(l=h.visualElement.loadFeatures(c,i,e,r))}return t.createElement(_v.Provider,{value:h},l&&h.visualElement?t.createElement(l,{visualElement:h.visualElement,...c}):null,r(a,s,function(e,n,r){return(0,t.useCallback)((t=>{t&&e.mount&&e.mount(t),n&&(t?n.mount(t):n.unmount()),r&&("function"==typeof r?r(t):Av(r)&&(r.current=t))}),[n])}(d,h.visualElement,o),d,u,h.visualElement))}));return s[Iv]=a,s}function Fv({layoutId:e}){const n=(0,t.useContext)(fv).id;return n&&void 0!==e?n+"-"+e:e}function Uv(e){function t(t,n={}){return Dv(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 Nv=["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 Ov(e){return"string"==typeof e&&!e.includes("-")&&!!(Nv.indexOf(e)>-1||/[A-Z]/.test(e))}const kv={},zv=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],Hv=new Set(zv);function Gv(e,{layout:t,layoutId:n}){return Hv.has(e)||e.startsWith("origin")||(t||void 0!==n)&&(!!kv[e]||"opacity"===e)}const Vv=e=>Boolean(e&&e.getVelocity),Wv={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},jv=zv.length,Xv=e=>t=>"string"==typeof t&&t.startsWith(e),Jv=Xv("--"),Yv=Xv("var(--"),Kv=(e,t)=>t&&"number"==typeof e?t.transform(e):e,qv=(e,t,n)=>Math.min(Math.max(n,e),t),Qv={test:e=>"number"==typeof e,parse:parseFloat,transform:e=>e},Zv={...Qv,transform:e=>qv(0,1,e)},$v={...Qv,default:1},ey=e=>Math.round(1e5*e)/1e5,ty=/(-)?([\d]*\.?[\d])+/g,ny=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,ry=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function iy(e){return"string"==typeof e}const ay=e=>({test:t=>iy(t)&&t.endsWith(e)&&1===t.split(" ").length,parse:parseFloat,transform:t=>`${t}${e}`}),sy=ay("deg"),oy=ay("%"),ly=ay("px"),cy=ay("vh"),uy=ay("vw"),hy={...oy,parse:e=>oy.parse(e)/100,transform:e=>oy.transform(100*e)},dy={...Qv,transform:Math.round},py={borderWidth:ly,borderTopWidth:ly,borderRightWidth:ly,borderBottomWidth:ly,borderLeftWidth:ly,borderRadius:ly,radius:ly,borderTopLeftRadius:ly,borderTopRightRadius:ly,borderBottomRightRadius:ly,borderBottomLeftRadius:ly,width:ly,maxWidth:ly,height:ly,maxHeight:ly,size:ly,top:ly,right:ly,bottom:ly,left:ly,padding:ly,paddingTop:ly,paddingRight:ly,paddingBottom:ly,paddingLeft:ly,margin:ly,marginTop:ly,marginRight:ly,marginBottom:ly,marginLeft:ly,rotate:sy,rotateX:sy,rotateY:sy,rotateZ:sy,scale:$v,scaleX:$v,scaleY:$v,scaleZ:$v,skew:sy,skewX:sy,skewY:sy,distance:ly,translateX:ly,translateY:ly,translateZ:ly,x:ly,y:ly,z:ly,perspective:ly,transformPerspective:ly,opacity:Zv,originX:hy,originY:hy,originZ:ly,zIndex:dy,fillOpacity:Zv,strokeOpacity:Zv,numOctaves:dy};function fy(e,t,n,r){const{style:i,vars:a,transform:s,transformOrigin:o}=e;let l=!1,c=!1,u=!0;for(const e in t){const n=t[e];if(Jv(e)){a[e]=n;continue}const r=py[e],h=Kv(n,r);if(Hv.has(e)){if(l=!0,s[e]=h,!u)continue;n!==(r.default||0)&&(u=!1)}else e.startsWith("origin")?(c=!0,o[e]=h):i[e]=h}if(t.transform||(l||r?i.transform=function(e,{enableHardwareAcceleration:t=!0,allowTransformNone:n=!0},r,i){let a="";for(let t=0;t<jv;t++){const n=zv[t];void 0!==e[n]&&(a+=`${Wv[n]||n}(${e[n]}) `)}return t&&!e.z&&(a+="translateZ(0)"),a=a.trim(),i?a=i(e,r?"":a):n&&r&&(a="none"),a}(e.transform,n,u,r):i.transform&&(i.transform="none")),c){const{originX:e="50%",originY:t="50%",originZ:n=0}=o;i.transformOrigin=`${e} ${t} ${n}`}}function my(e,t,n){for(const r in t)Vv(t[r])||Gv(r,n)||(e[r]=t[r])}function gy(e,n,r){const i={},a=function(e,n,r){const i={};return my(i,e.style||{},e),Object.assign(i,function({transformTemplate:e},n,r){return(0,t.useMemo)((()=>{const t={style:{},transform:{},transformOrigin:{},vars:{}};return fy(t,n,{enableHardwareAcceleration:!r},e),Object.assign({},t.vars,t.style)}),[n])}(e,n,r)),e.transformValues?e.transformValues(i):i}(e,n,r);return e.drag&&!1!==e.dragListener&&(i.draggable=!1,a.userSelect=a.WebkitUserSelect=a.WebkitTouchCallout="none",a.touchAction=!0===e.drag?"none":"pan-"+("x"===e.drag?"y":"x")),void 0===e.tabIndex&&(e.onTap||e.onTapStart||e.whileTap)&&(i.tabIndex=0),i.style=a,i}const vy=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","ignoreStrict","viewport"]);function yy(e){return e.startsWith("while")||e.startsWith("drag")&&"draggable"!==e||e.startsWith("layout")||e.startsWith("onTap")||e.startsWith("onPan")||vy.has(e)}let xy=e=>!yy(e);try{(_y=require("@emotion/is-prop-valid").default)&&(xy=e=>e.startsWith("on")?!yy(e):_y(e))}catch(e){}var _y;function by(e,t,n){return"string"==typeof e?e:ly.transform(t+n*e)}const Ay={offset:"stroke-dashoffset",array:"stroke-dasharray"},My={offset:"strokeDashoffset",array:"strokeDasharray"};function Sy(e,{attrX:t,attrY:n,attrScale:r,originX:i,originY:a,pathLength:s,pathSpacing:o=1,pathOffset:l=0,...c},u,h,d){if(fy(e,c,u,d),h)return void(e.style.viewBox&&(e.attrs.viewBox=e.style.viewBox));e.attrs=e.style,e.style={};const{attrs:p,style:f,dimensions:m}=e;p.transform&&(m&&(f.transform=p.transform),delete p.transform),m&&(void 0!==i||void 0!==a||f.transform)&&(f.transformOrigin=function(e,t,n){return`${by(t,e.x,e.width)} ${by(n,e.y,e.height)}`}(m,void 0!==i?i:.5,void 0!==a?a:.5)),void 0!==t&&(p.x=t),void 0!==n&&(p.y=n),void 0!==r&&(p.scale=r),void 0!==s&&function(e,t,n=1,r=0,i=!0){e.pathLength=1;const a=i?Ay:My;e[a.offset]=ly.transform(-r);const s=ly.transform(t),o=ly.transform(n);e[a.array]=`${s} ${o}`}(p,s,o,l,!1)}const Ey=e=>"string"==typeof e&&"svg"===e.toLowerCase();function wy(e,n,r,i){const a=(0,t.useMemo)((()=>{const t={style:{},transform:{},transformOrigin:{},vars:{},attrs:{}};return Sy(t,n,{enableHardwareAcceleration:!1},Ey(i),e.transformTemplate),{...t.attrs,style:{...t.style}}}),[n]);if(e.style){const t={};my(t,e.style,e),a.style={...t,...a.style}}return a}function Ty(e=!1){return(n,r,i,{latestValues:a},s)=>{const o=(Ov(n)?wy:gy)(r,a,s,n),l=function(e,t,n){const r={};for(const i in e)"values"===i&&"object"==typeof e.values||(xy(i)||!0===n&&yy(i)||!t&&!yy(i)||e.draggable&&i.startsWith("onDrag"))&&(r[i]=e[i]);return r}(r,"string"==typeof n,e),c={...l,...o,ref:i},{children:u}=r,h=(0,t.useMemo)((()=>Vv(u)?u.get():u),[u]);return(0,t.createElement)(n,{...c,children:h})}}const Cy=e=>e.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();function Ry(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 Py=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 By(e,t,n,r){Ry(e,t,void 0,r);for(const n in t.attrs)e.setAttribute(Py.has(n)?n:Cy(n),t.attrs[n])}function Ly(e,t){const{style:n}=e,r={};for(const i in n)(Vv(n[i])||t.style&&Vv(t.style[i])||Gv(i,e))&&(r[i]=n[i]);return r}function Iy(e,t){const n=Ly(e,t);for(const r in e)(Vv(e[r])||Vv(t[r]))&&(n[-1!==zv.indexOf(r)?"attr"+r.charAt(0).toUpperCase()+r.substring(1):r]=e[r]);return n}function Dy(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 Fy=e=>Array.isArray(e);function Uy(e){const t=Vv(e)?e.get():e;return n=t,Boolean(n&&"object"==typeof n&&n.mix&&n.toValue)?t.toValue():t;var n}const Ny=e=>(n,r)=>{const i=(0,t.useContext)(_v),a=(0,t.useContext)(lv),s=()=>function({scrapeMotionValuesFromProps:e,createRenderState:t,onMount:n},r,i,a){const s={latestValues:Oy(r,i,a,e),renderState:t()};return n&&(s.mount=e=>n(r,e,s)),s}(e,n,i,a);return r?s():cv(s)};function Oy(e,t,n,r){const i={},a=r(e,{});for(const e in a)i[e]=Uy(a[e]);let{initial:s,animate:o}=e;const l=Tv(e),c=Cv(e);t&&c&&!l&&!1!==e.inherit&&(void 0===s&&(s=t.initial),void 0===o&&(o=t.animate));let u=!!n&&!1===n.initial;u=u||!1===s;const h=u?o:s;return h&&"boolean"!=typeof h&&!Sv(h)&&(Array.isArray(h)?h:[h]).forEach((t=>{const n=Dy(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[u?t.length-1:0]),null!==t&&(i[e]=t)}for(const e in r)i[e]=r[e]})),i}const ky={useVisualState:Ny({scrapeMotionValuesFromProps:Iy,createRenderState:()=>({style:{},transform:{},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}}Sy(n,r,{enableHardwareAcceleration:!1},Ey(t.tagName),e.transformTemplate),By(t,n)}})},zy={useVisualState:Ny({scrapeMotionValuesFromProps:Ly,createRenderState:()=>({style:{},transform:{},transformOrigin:{},vars:{}})})};function Hy(e,t,n,r={passive:!0}){return e.addEventListener(t,n,r),()=>e.removeEventListener(t,n)}const Gy=e=>"mouse"===e.pointerType?"number"!=typeof e.button||e.button<=0:!1!==e.isPrimary;function Vy(e,t="page"){return{point:{x:e[t+"X"],y:e[t+"Y"]}}}function Wy(e,t,n,r){return Hy(e,t,(e=>t=>Gy(t)&&e(t,Vy(t)))(n),r)}const jy=(e,t)=>n=>t(e(n)),Xy=(...e)=>e.reduce(jy);function Jy(e){let t=null;return()=>null===t&&(t=e,()=>{t=null})}const Yy=Jy("dragHorizontal"),Ky=Jy("dragVertical");function qy(e){let t=!1;if("y"===e)t=Ky();else if("x"===e)t=Yy();else{const e=Yy(),n=Ky();e&&n?t=()=>{e(),n()}:(e&&e(),n&&n())}return t}function Qy(){const e=qy(!0);return!e||(e(),!1)}class Zy{constructor(e){this.isMounted=!1,this.node=e}update(){}}function $y(e,t){const n="pointer"+(t?"enter":"leave"),r="onHover"+(t?"Start":"End");return Wy(e.current,n,((n,i)=>{if("touch"===n.type||Qy())return;const a=e.getProps();e.animationState&&a.whileHover&&e.animationState.setActive("whileHover",t),a[r]&&iv.update((()=>a[r](n,i)))}),{passive:!e.getProps()[r]})}const ex=(e,t)=>!!t&&(e===t||ex(e,t.parentElement));function tx(e,t){if(!t)return;const n=new PointerEvent("pointer"+e);t(n,Vy(n))}const nx=new WeakMap,rx=new WeakMap,ix=e=>{const t=nx.get(e.target);t&&t(e)},ax=e=>{e.forEach(ix)};const sx={some:0,all:1},ox={inView:{Feature:class extends Zy{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:n,amount:r="some",once:i}=e,a={root:t?t.current:void 0,rootMargin:n,threshold:"number"==typeof r?r:sx[r]};return function(e,t,n){const r=function({root:e,...t}){const n=e||document;rx.has(n)||rx.set(n,{});const r=rx.get(n),i=JSON.stringify(t);return r[i]||(r[i]=new IntersectionObserver(ax,{root:e,...t})),r[i]}(t);return nx.set(e,n),r.observe(e),()=>{nx.delete(e),r.unobserve(e)}}(this.node.current,a,(e=>{const{isIntersecting:t}=e;if(this.isInView===t)return;if(this.isInView=t,i&&!t&&this.hasEnteredView)return;t&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",t);const{onViewportEnter:n,onViewportLeave:r}=this.node.getProps(),a=t?n:r;a&&a(e)}))}mount(){this.startObserver()}update(){if("undefined"==typeof IntersectionObserver)return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(function({viewport:e={}},{viewport:t={}}={}){return n=>e[n]!==t[n]}(e,t))&&this.startObserver()}unmount(){}}},tap:{Feature:class extends Zy{constructor(){super(...arguments),this.removeStartListeners=nv,this.removeEndListeners=nv,this.removeAccessibleListeners=nv,this.startPointerPress=(e,t)=>{if(this.removeEndListeners(),this.isPressing)return;const n=this.node.getProps(),r=Wy(window,"pointerup",((e,t)=>{if(!this.checkPressEnd())return;const{onTap:n,onTapCancel:r}=this.node.getProps();iv.update((()=>{ex(this.node.current,e.target)?n&&n(e,t):r&&r(e,t)}))}),{passive:!(n.onTap||n.onPointerUp)}),i=Wy(window,"pointercancel",((e,t)=>this.cancelPress(e,t)),{passive:!(n.onTapCancel||n.onPointerCancel)});this.removeEndListeners=Xy(r,i),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=Hy(this.node.current,"keydown",(e=>{"Enter"!==e.key||this.isPressing||(this.removeEndListeners(),this.removeEndListeners=Hy(this.node.current,"keyup",(e=>{"Enter"===e.key&&this.checkPressEnd()&&tx("up",((e,t)=>{const{onTap:n}=this.node.getProps();n&&iv.update((()=>n(e,t)))}))})),tx("down",((e,t)=>{this.startPress(e,t)})))})),t=Hy(this.node.current,"blur",(()=>{this.isPressing&&tx("cancel",((e,t)=>this.cancelPress(e,t)))}));this.removeAccessibleListeners=Xy(e,t)}}startPress(e,t){this.isPressing=!0;const{onTapStart:n,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),n&&iv.update((()=>n(e,t)))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!Qy()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:n}=this.node.getProps();n&&iv.update((()=>n(e,t)))}mount(){const e=this.node.getProps(),t=Wy(this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),n=Hy(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Xy(t,n)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}},focus:{Feature:class extends Zy{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch(t){e=!0}e&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){this.isActive&&this.node.animationState&&(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Xy(Hy(this.node.current,"focus",(()=>this.onFocus())),Hy(this.node.current,"blur",(()=>this.onBlur())))}unmount(){}}},hover:{Feature:class extends Zy{mount(){this.unmount=Xy($y(this.node,!0),$y(this.node,!1))}unmount(){}}}};function lx(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 cx(e,t,n){const r=e.getProps();return Dy(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))}const ux="data-"+Cy("framerAppearId"),hx=e=>1e3*e,dx=e=>e/1e3,px=e=>Array.isArray(e)&&"number"==typeof e[0];function fx(e){return Boolean(!e||"string"==typeof e&&gx[e]||px(e)||Array.isArray(e)&&e.every(fx))}const mx=([e,t,n,r])=>`cubic-bezier(${e}, ${t}, ${n}, ${r})`,gx={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:mx([0,.65,.55,1]),circOut:mx([.55,0,1,.45]),backIn:mx([.31,.01,.66,-.59]),backOut:mx([.33,1.53,.69,.99])};function vx(e){if(e)return px(e)?mx(e):Array.isArray(e)?e.map(vx):gx[e]}const yx={waapi:()=>Object.hasOwnProperty.call(Element.prototype,"animate")},xx={},_x={};for(const e in yx)_x[e]=()=>(void 0===xx[e]&&(xx[e]=yx[e]()),xx[e]);const bx=(e,t,n)=>(((1-3*n+3*t)*e+(3*n-6*t))*e+3*t)*e;function Ax(e,t,n,r){if(e===t&&n===r)return nv;return i=>0===i||1===i?i:bx(function(e,t,n,r,i){let a,s,o=0;do{s=t+(n-t)/2,a=bx(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 Mx=Ax(.42,0,1,1),Sx=Ax(0,0,.58,1),Ex=Ax(.42,0,.58,1),wx=e=>t=>t<=.5?e(2*t)/2:(2-e(2*(1-t)))/2,Tx=e=>t=>1-e(1-t),Cx=e=>1-Math.sin(Math.acos(e)),Rx=Tx(Cx),Px=wx(Rx),Bx=Ax(.33,1.53,.69,.99),Lx=Tx(Bx),Ix=wx(Lx),Dx={linear:nv,easeIn:Mx,easeInOut:Ex,easeOut:Sx,circIn:Cx,circInOut:Px,circOut:Rx,backIn:Lx,backInOut:Ix,backOut:Bx,anticipate:e=>(e*=2)<1?.5*Lx(e):.5*(2-Math.pow(2,-10*(e-1)))},Fx=e=>{if(Array.isArray(e)){gv(4===e.length,"Cubic bezier arrays must contain four numerical values.");const[t,n,r,i]=e;return Ax(t,n,r,i)}return"string"==typeof e?(gv(void 0!==Dx[e],`Invalid easing type '${e}'`),Dx[e]):e},Ux=(e,t)=>n=>Boolean(iy(n)&&ry.test(n)&&n.startsWith(e)||t&&Object.prototype.hasOwnProperty.call(n,t)),Nx=(e,t,n)=>r=>{if(!iy(r))return r;const[i,a,s,o]=r.match(ty);return{[e]:parseFloat(i),[t]:parseFloat(a),[n]:parseFloat(s),alpha:void 0!==o?parseFloat(o):1}},Ox={...Qv,transform:e=>Math.round((e=>qv(0,255,e))(e))},kx={test:Ux("rgb","red"),parse:Nx("red","green","blue"),transform:({red:e,green:t,blue:n,alpha:r=1})=>"rgba("+Ox.transform(e)+", "+Ox.transform(t)+", "+Ox.transform(n)+", "+ey(Zv.transform(r))+")"},zx={test:Ux("#"),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:kx.transform},Hx={test:Ux("hsl","hue"),parse:Nx("hue","saturation","lightness"),transform:({hue:e,saturation:t,lightness:n,alpha:r=1})=>"hsla("+Math.round(e)+", "+oy.transform(ey(t))+", "+oy.transform(ey(n))+", "+ey(Zv.transform(r))+")"},Gx={test:e=>kx.test(e)||zx.test(e)||Hx.test(e),parse:e=>kx.test(e)?kx.parse(e):Hx.test(e)?Hx.parse(e):zx.parse(e),transform:e=>iy(e)?e:e.hasOwnProperty("red")?kx.transform(e):Hx.transform(e)},Vx=(e,t,n)=>-n*e+n*t+e;function Wx(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 jx=(e,t,n)=>{const r=e*e;return Math.sqrt(Math.max(0,n*(t*t-r)+r))},Xx=[zx,kx,Hx];function Jx(e){const t=(n=e,Xx.find((e=>e.test(n))));var n;gv(Boolean(t),`'${e}' is not an animatable color. Use the equivalent color code instead.`);let r=t.parse(e);return t===Hx&&(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=Wx(o,r,e+1/3),a=Wx(o,r,e),s=Wx(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 Yx=(e,t)=>{const n=Jx(e),r=Jx(t),i={...n};return e=>(i.red=jx(n.red,r.red,e),i.green=jx(n.green,r.green,e),i.blue=jx(n.blue,r.blue,e),i.alpha=Vx(n.alpha,r.alpha,e),kx.transform(i))},Kx={regex:/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,countKey:"Vars",token:"${v}",parse:nv},qx={regex:ny,countKey:"Colors",token:"${c}",parse:Gx.parse},Qx={regex:ty,countKey:"Numbers",token:"${n}",parse:Qv.parse};function Zx(e,{regex:t,countKey:n,token:r,parse:i}){const a=e.tokenised.match(t);a&&(e["num"+n]=a.length,e.tokenised=e.tokenised.replace(t,r),e.values.push(...a.map(i)))}function $x(e){const t=e.toString(),n={value:t,tokenised:t,values:[],numVars:0,numColors:0,numNumbers:0};return n.value.includes("var(--")&&Zx(n,Kx),Zx(n,qx),Zx(n,Qx),n}function e_(e){return $x(e).values}function t_(e){const{values:t,numColors:n,numVars:r,tokenised:i}=$x(e),a=t.length;return e=>{let t=i;for(let i=0;i<a;i++)t=i<r?t.replace(Kx.token,e[i]):i<r+n?t.replace(qx.token,Gx.transform(e[i])):t.replace(Qx.token,ey(e[i]));return t}}const n_=e=>"number"==typeof e?0:e,r_={test:function(e){var t,n;return isNaN(e)&&iy(e)&&((null===(t=e.match(ty))||void 0===t?void 0:t.length)||0)+((null===(n=e.match(ny))||void 0===n?void 0:n.length)||0)>0},parse:e_,createTransformer:t_,getAnimatableNone:function(e){const t=e_(e);return t_(e)(t.map(n_))}},i_=(e,t)=>n=>`${n>0?t:e}`;function a_(e,t){return"number"==typeof e?n=>Vx(e,t,n):Gx.test(e)?Yx(e,t):e.startsWith("var(")?i_(e,t):l_(e,t)}const s_=(e,t)=>{const n=[...e],r=n.length,i=e.map(((e,n)=>a_(e,t[n])));return e=>{for(let t=0;t<r;t++)n[t]=i[t](e);return n}},o_=(e,t)=>{const n={...e,...t},r={};for(const i in n)void 0!==e[i]&&void 0!==t[i]&&(r[i]=a_(e[i],t[i]));return e=>{for(const t in r)n[t]=r[t](e);return n}},l_=(e,t)=>{const n=r_.createTransformer(t),r=$x(e),i=$x(t);return r.numVars===i.numVars&&r.numColors===i.numColors&&r.numNumbers>=i.numNumbers?Xy(s_(r.values,i.values),n):(mv(!0,`Complex values '${e}' and '${t}' too different to mix. Ensure all colors are of the same type, and that each contains the same quantity of number and color values. Falling back to instant transition.`),i_(e,t))},c_=(e,t,n)=>{const r=t-e;return 0===r?1:(n-e)/r},u_=(e,t)=>n=>Vx(e,t,n);function h_(e,t,{clamp:n=!0,ease:r,mixer:i}={}){const a=e.length;if(gv(a===t.length,"Both input and output ranges must be the same length"),1===a)return()=>t[0];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])?u_:"string"==typeof a?Gx.test(a)?Yx:l_:Array.isArray(a)?s_:"object"==typeof a?o_:u_);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]||nv:t;a=Xy(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=c_(e[n],e[n+1],t);return s[n](r)};return n?t=>l(qv(e[0],e[a-1],t)):l}function d_({duration:e=300,keyframes:t,times:n,ease:r="easeInOut"}){const i=(e=>Array.isArray(e)&&"number"!=typeof e[0])(r)?r.map(Fx):Fx(r),a={done:!1,value:t[0]},s=function(e,t){return e.map((e=>e*t))}(n&&n.length===t.length?n:function(e){const t=[0];return function(e,t){const n=e[e.length-1];for(let r=1;r<=t;r++){const i=c_(0,t,r);e.push(Vx(n,1,i))}}(t,e.length-1),t}(t),e),o=h_(s,t,{ease:Array.isArray(i)?i:(l=t,c=i,l.map((()=>c||Ex)).splice(0,l.length-1))});var l,c;return{calculatedDuration:e,next:t=>(a.value=o(t),a.done=t>=e,a)}}function p_(e,t){return t?e*(1e3/t):0}function f_(e,t,n){const r=Math.max(t-5,0);return p_(n-e(r),t-r)}function m_(e,t){return e*Math.sqrt(1-t*t)}const g_=["duration","bounce"],v_=["stiffness","damping","mass"];function y_(e,t){return t.some((t=>void 0!==e[t]))}function x_({keyframes:e,restDelta:t,restSpeed:n,...r}){const i=e[0],a=e[e.length-1],s={done:!1,value:i},{stiffness:o,damping:l,mass:c,velocity:u,duration:h,isResolvedFromDuration:d}=function(e){let t={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...e};if(!y_(e,v_)&&y_(e,g_)){const n=function({duration:e=800,bounce:t=.25,velocity:n=0,mass:r=1}){let i,a;mv(e<=hx(10),"Spring duration must be 10 seconds or less");let s=1-t;s=qv(.05,1,s),e=qv(.01,10,dx(e)),s<1?(i=t=>{const r=t*s,i=r*e;return.001-(r-n)/m_(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),c=m_(Math.pow(t,2),s);return(.001-i(t)>0?-1:1)*((a-o)*l)/c}):(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=hx(e),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),p=u?-dx(u):0,f=l/(2*Math.sqrt(o*c)),m=a-i,g=dx(Math.sqrt(o/c)),v=Math.abs(m)<5;let y;if(n||(n=v?.01:2),t||(t=v?.005:.5),f<1){const e=m_(g,f);y=t=>{const n=Math.exp(-f*g*t);return a-n*((p+f*g*m)/e*Math.sin(e*t)+m*Math.cos(e*t))}}else if(1===f)y=e=>a-Math.exp(-g*e)*(m+(p+g*m)*e);else{const e=g*Math.sqrt(f*f-1);y=t=>{const n=Math.exp(-f*g*t),r=Math.min(e*t,300);return a-n*((p+f*g*m)*Math.sinh(r)+e*m*Math.cosh(r))/e}}return{calculatedDuration:d&&h||null,next:e=>{const r=y(e);if(d)s.done=e>=h;else{let i=p;0!==e&&(i=f<1?f_(y,e,r):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}}}function __({keyframes:e,velocity:t=0,power:n=.8,timeConstant:r=325,bounceDamping:i=10,bounceStiffness:a=500,modifyTarget:s,min:o,max:l,restDelta:c=.5,restSpeed:u}){const h=e[0],d={done:!1,value:h},p=e=>void 0===o?l:void 0===l||Math.abs(o-e)<Math.abs(l-e)?o:l;let f=n*t;const m=h+f,g=void 0===s?m:s(m);g!==m&&(f=g-h);const v=e=>-f*Math.exp(-e/r),y=e=>g+v(e),x=e=>{const t=v(e),n=y(e);d.done=Math.abs(t)<=c,d.value=d.done?g:n};let _,b;const A=e=>{var t;t=d.value,(void 0!==o&&t<o||void 0!==l&&t>l)&&(_=e,b=x_({keyframes:[d.value,p(d.value)],velocity:f_(y,e,d.value),damping:i,stiffness:a,restDelta:c,restSpeed:u}))};return A(0),{calculatedDuration:null,next:e=>{let t=!1;return b||void 0!==_||(t=!0,x(e),A(e)),void 0!==_&&e>_?b.next(e-_):(!t&&x(e),d)}}}const b_=e=>{const t=({timestamp:t})=>e(t);return{start:()=>iv.update(t,!0),stop:()=>av(t),now:()=>sv.isProcessing?sv.timestamp:performance.now()}};function A_(e){let t=0,n=e.next(t);for(;!n.done&&t<2e4;)t+=50,n=e.next(t);return t>=2e4?1/0:t}const M_={decay:__,inertia:__,tween:d_,keyframes:d_,spring:x_};function S_({autoplay:e=!0,delay:t=0,driver:n=b_,keyframes:r,type:i="keyframes",repeat:a=0,repeatDelay:s=0,repeatType:o="loop",onPlay:l,onStop:c,onComplete:u,onUpdate:h,...d}){let p,f,m=1,g=!1;const v=()=>{f=new Promise((e=>{p=e}))};let y;v();const x=M_[i]||d_;let _;x!==d_&&"number"!=typeof r[0]&&(_=h_([0,100],r,{clamp:!1}),r=[0,100]);const b=x({...d,keyframes:r});let A;"mirror"===o&&(A=x({...d,keyframes:[...r].reverse(),velocity:-(d.velocity||0)}));let M="idle",S=null,E=null,w=null;null===b.calculatedDuration&&a&&(b.calculatedDuration=A_(b));const{calculatedDuration:T}=b;let C=1/0,R=1/0;null!==T&&(C=T+s,R=C*(a+1)-s);let P=0;const B=e=>{if(null===E)return;m>0&&(E=Math.min(E,e)),m<0&&(E=Math.min(e-R/m,E)),P=null!==S?S:Math.round(e-E)*m;const n=P-t*(m>=0?1:-1),i=m>=0?n<0:n>R;P=Math.max(n,0),"finished"===M&&null===S&&(P=R);let l=P,c=b;if(a){const e=P/C;let t=Math.floor(e),n=e%1;!n&&e>=1&&(n=1),1===n&&t--,t=Math.min(t,a+1);const r=Boolean(t%2);r&&("reverse"===o?(n=1-n,s&&(n-=s/C)):"mirror"===o&&(c=A));let i=qv(0,1,n);P>R&&(i="reverse"===o&&r?1:0),l=i*C}const u=i?{done:!1,value:r[0]}:c.next(l);_&&(u.value=_(u.value));let{done:d}=u;i||null===T||(d=m>=0?P>=R:P<=0);const p=null===S&&("finished"===M||"running"===M&&d);return h&&h(u.value),p&&D(),u},L=()=>{y&&y.stop(),y=void 0},I=()=>{M="idle",L(),p(),v(),E=w=null},D=()=>{M="finished",u&&u(),L(),p()},F=()=>{if(g)return;y||(y=n(B));const e=y.now();l&&l(),null!==S?E=e-S:E&&"finished"!==M||(E=e),"finished"===M&&v(),w=E,S=null,M="running",y.start()};e&&F();const U={then:(e,t)=>f.then(e,t),get time(){return dx(P)},set time(e){e=hx(e),P=e,null===S&&y&&0!==m?E=y.now()-e/m:S=e},get duration(){const e=null===b.calculatedDuration?A_(b):b.calculatedDuration;return dx(e)},get speed(){return m},set speed(e){e!==m&&y&&(m=e,U.time=dx(P))},get state(){return M},play:F,pause:()=>{M="paused",S=P},stop:()=>{g=!0,"idle"!==M&&(M="idle",c&&c(),I())},cancel:()=>{null!==w&&B(w),I()},complete:()=>{M="finished"},sample:e=>(E=0,B(e))};return U}const E_=new Set(["opacity","clipPath","filter","transform","backgroundColor"]);const w_={type:"spring",stiffness:500,damping:25,restSpeed:10},T_={type:"keyframes",duration:.8},C_={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},R_=(e,{keyframes:t})=>t.length>2?T_:Hv.has(e)?e.startsWith("scale")?{type:"spring",stiffness:550,damping:0===t[1]?2*Math.sqrt(550):30,restSpeed:10}:w_:C_,P_=(e,t)=>!("zIndex"===e||"number"!=typeof t&&!Array.isArray(t)&&("string"!=typeof t||!r_.test(t)&&"0"!==t||t.startsWith("url("))),B_=new Set(["brightness","contrast","saturate","opacity"]);function L_(e){const[t,n]=e.slice(0,-1).split("(");if("drop-shadow"===t)return e;const[r]=n.match(ty)||[];if(!r)return e;const i=n.replace(r,"");let a=B_.has(t)?1:0;return r!==n&&(a*=100),t+"("+a+i+")"}const I_=/([a-z-]*)\(.*?\)/g,D_={...r_,getAnimatableNone:e=>{const t=e.match(I_);return t?t.map(L_).join(" "):e}},F_={...py,color:Gx,backgroundColor:Gx,outlineColor:Gx,fill:Gx,stroke:Gx,borderColor:Gx,borderTopColor:Gx,borderRightColor:Gx,borderBottomColor:Gx,borderLeftColor:Gx,filter:D_,WebkitFilter:D_},U_=e=>F_[e];function N_(e,t){let n=U_(e);return n!==D_&&(n=r_),n.getAnimatableNone?n.getAnimatableNone(t):void 0}const O_=e=>/^0[^.\s]+$/.test(e);function k_(e){return"number"==typeof e?0===e:null!==e?"none"===e||"0"===e||O_(e):void 0}function z_(e,t){return e[t]||e.default||e}const H_=(e,t,n,r={})=>i=>{const a=z_(r,e)||{},s=a.delay||r.delay||0;let{elapsed:o=0}=r;o-=hx(s);const l=function(e,t,n,r){const i=P_(t,n);let a;a=Array.isArray(n)?[...n]:[null,n];const s=void 0!==r.from?r.from:e.get();let o;const l=[];for(let e=0;e<a.length;e++)null===a[e]&&(a[e]=0===e?s:a[e-1]),k_(a[e])&&l.push(e),"string"==typeof a[e]&&"none"!==a[e]&&"0"!==a[e]&&(o=a[e]);if(i&&l.length&&o)for(let e=0;e<l.length;e++)a[l[e]]=N_(t,o);return a}(t,e,n,a),c=l[0],u=l[l.length-1],h=P_(e,c),d=P_(e,u);mv(h===d,`You are trying to animate ${e} from "${c}" to "${u}". ${c} is not an animatable value - to enable this animation set ${c} to a value animatable to ${u} via the \`style\` property.`);let p={keyframes:l,velocity:t.getVelocity(),ease:"easeOut",...a,delay:-o,onUpdate:e=>{t.set(e),a.onUpdate&&a.onUpdate(e)},onComplete:()=>{i(),a.onComplete&&a.onComplete()}};if(function({when:e,delay:t,delayChildren:n,staggerChildren:r,staggerDirection:i,repeat:a,repeatType:s,repeatDelay:o,from:l,elapsed:c,...u}){return!!Object.keys(u).length}(a)||(p={...p,...R_(e,p)}),p.duration&&(p.duration=hx(p.duration)),p.repeatDelay&&(p.repeatDelay=hx(p.repeatDelay)),!h||!d||!1===a.type)return function({keyframes:e,delay:t,onUpdate:n,onComplete:r}){const i=()=>(n&&n(e[e.length-1]),r&&r(),{time:0,speed:1,duration:0,play:nv,pause:nv,stop:nv,then:e=>(e(),Promise.resolve()),cancel:nv,complete:nv});return t?S_({keyframes:[0,1],duration:0,delay:t,onComplete:i}):i()}(p);if(t.owner&&t.owner.current instanceof HTMLElement&&!t.owner.getProps().onUpdate){const n=function(e,t,{onUpdate:n,onComplete:r,...i}){if(!_x.waapi()||!E_.has(t)||i.repeatDelay||"mirror"===i.repeatType||0===i.damping||"inertia"===i.type)return!1;let a,s,o=!1;const l=()=>{s=new Promise((e=>{a=e}))};l();let{keyframes:c,duration:u=300,ease:h,times:d}=i;if(((e,t)=>"spring"===t.type||"backgroundColor"===e||!fx(t.ease))(t,i)){const e=S_({...i,repeat:0,delay:0});let t={done:!1,value:c[0]};const n=[];let r=0;for(;!t.done&&r<2e4;)t=e.sample(r),n.push(t.value),r+=10;d=void 0,c=n,u=r-10,h="linear"}const p=function(e,t,n,{delay:r=0,duration:i,repeat:a=0,repeatType:s="loop",ease:o,times:l}={}){const c={[t]:n};l&&(c.offset=l);const u=vx(o);return Array.isArray(u)&&(c.easing=u),e.animate(c,{delay:r,duration:i,easing:Array.isArray(u)?"linear":u,fill:"both",iterations:a+1,direction:"reverse"===s?"alternate":"normal"})}(e.owner.current,t,c,{...i,duration:u,ease:h,times:d}),f=()=>p.cancel(),m=()=>{iv.update(f),a(),l()};return p.onfinish=()=>{e.set(function(e,{repeat:t,repeatType:n="loop"}){return e[t&&"loop"!==n&&t%2==1?0:e.length-1]}(c,i)),r&&r(),m()},{then:(e,t)=>s.then(e,t),get time(){return dx(p.currentTime||0)},set time(e){p.currentTime=hx(e)},get speed(){return p.playbackRate},set speed(e){p.playbackRate=e},get duration(){return dx(u)},play:()=>{o||(p.play(),av(f))},pause:()=>p.pause(),stop:()=>{if(o=!0,"idle"===p.playState)return;const{currentTime:t}=p;if(t){const n=S_({...i,autoplay:!1});e.setWithVelocity(n.sample(t-10).value,n.sample(t).value,10)}m()},complete:()=>p.finish(),cancel:m}}(t,e,p);if(n)return n}return S_(p)};function G_(e){return Boolean(Vv(e)&&e.add)}function V_(e,t){-1===e.indexOf(t)&&e.push(t)}function W_(e,t){const n=e.indexOf(t);n>-1&&e.splice(n,1)}class j_{constructor(){this.subscriptions=[]}add(e){return V_(this.subscriptions,e),()=>W_(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}}class X_{constructor(e,t={}){var n;this.version="10.12.22",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}=sv;this.lastUpdated!==r&&(this.timeDelta=n,this.lastUpdated=r,iv.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=()=>iv.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 j_);const n=this.events[e].add(t);return"change"===e?()=>{n(),iv.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?p_(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise((t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()})).then((()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()}))}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function J_(e,t){return new X_(e,t)}const Y_=e=>t=>t.test(e),K_=[Qv,ly,oy,sy,uy,cy,{test:e=>"auto"===e,parse:e=>e}],q_=e=>K_.find(Y_(e)),Q_=[...K_,Gx,r_];function Z_(e,t,n){e.hasValue(t)?e.getValue(t).set(n):e.addValue(t,J_(n))}function $_(e,t){if(t)return(t[e]||t.default||t).from}function eb({protectedKeys:e,needsAnimating:t},n){const r=e.hasOwnProperty(n)&&!0!==t[n];return t[n]=!1,r}function tb(e,t,{delay:n=0,transitionOverride:r,type:i}={}){let{transition:a=e.getDefaultTransition(),transitionEnd:s,...o}=e.makeTargetAnimatable(t);const l=e.getValue("willChange");r&&(a=r);const c=[],u=i&&e.animationState&&e.animationState.getState()[i];for(const t in o){const r=e.getValue(t),i=o[t];if(!r||void 0===i||u&&eb(u,t))continue;const s={delay:n,elapsed:0,...a};if(window.HandoffAppearAnimations&&!r.hasAnimated){const n=e.getProps()[ux];n&&(s.elapsed=window.HandoffAppearAnimations(n,t,r,iv))}r.start(H_(t,r,i,e.shouldReduceMotion&&Hv.has(t)?{type:!1}:s));const h=r.animation;G_(l)&&(l.add(t),h.then((()=>l.remove(t)))),c.push(h)}return s&&Promise.all(c).then((()=>{s&&function(e,t){const n=cx(e,t);let{transitionEnd:r={},transition:i={},...a}=n?e.makeTargetAnimatable(n,!1):{};a={...a,...r};for(const t in a)Z_(e,t,(s=a[t],Fy(s)?s[s.length-1]||0:s));var s}(e,s)})),c}function nb(e,t,n={}){const r=cx(e,t,n.custom);let{transition:i=e.getDefaultTransition()||{}}=r||{};n.transitionOverride&&(i=n.transitionOverride);const a=r?()=>Promise.all(tb(e,r,n)):()=>Promise.resolve(),s=e.variantChildren&&e.variantChildren.size?(r=0)=>{const{delayChildren:a=0,staggerChildren:s,staggerDirection:o}=i;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(rb).forEach(((e,r)=>{e.notify("AnimationStart",t),s.push(nb(e,t,{...a,delay:n+l(r)}).then((()=>e.notify("AnimationComplete",t))))})),Promise.all(s)}(e,t,a+r,s,o,n)}:()=>Promise.resolve(),{when:o}=i;if(o){const[e,t]="beforeChildren"===o?[a,s]:[s,a];return e().then((()=>t()))}return Promise.all([a(),s(n.delay)])}function rb(e,t){return e.sortNodePosition(t)}const ib=[...Ev].reverse(),ab=Ev.length;function sb(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=>nb(e,t,n)));r=Promise.all(i)}else if("string"==typeof t)r=nb(e,t,n);else{const i="function"==typeof t?cx(e,t,n.custom):t;r=Promise.all(tb(e,i,n))}return r.then((()=>e.notify("AnimationComplete",t)))}(e,t,n))))}(e);const n={animate:ob(!0),whileInView:ob(),whileHover:ob(),whileTap:ob(),whileDrag:ob(),whileFocus:ob(),exit:ob()};let r=!0;const i=(t,n)=>{const r=cx(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)||{},c=[],u=new Set;let h={},d=1/0;for(let t=0;t<ab;t++){const m=ib[t],g=n[m],v=void 0!==o[m]?o[m]:l[m],y=Mv(v),x=m===s?g.isActive:null;!1===x&&(d=t);let _=v===l[m]&&v!==o[m]&&y;if(_&&r&&e.manuallyAnimateOnMount&&(_=!1),g.protectedKeys={...h},!g.isActive&&null===x||!v&&!g.prevProp||Sv(v)||"boolean"==typeof v)continue;const b=(p=g.prevProp,"string"==typeof(f=v)?f!==p:!!Array.isArray(f)&&!lx(f,p));let A=b||m===s&&g.isActive&&!_&&y||t>d&&y;const M=Array.isArray(v)?v:[v];let S=M.reduce(i,{});!1===x&&(S={});const{prevResolvedValues:E={}}=g,w={...E,...S},T=e=>{A=!0,u.delete(e),g.needsAnimating[e]=!0};for(const e in w){const t=S[e],n=E[e];h.hasOwnProperty(e)||(t!==n?Fy(t)&&Fy(n)?!lx(t,n)||b?T(e):g.protectedKeys[e]=!0:void 0!==t?T(e):u.add(e):void 0!==t&&u.has(e)?T(e):g.protectedKeys[e]=!0)}g.prevProp=v,g.prevResolvedValues=S,g.isActive&&(h={...h,...S}),r&&e.blockInitialAnimation&&(A=!1),A&&!_&&c.push(...M.map((e=>({animation:e,options:{type:m,...a}}))))}var p,f;if(u.size){const t={};u.forEach((n=>{const r=e.getBaseTarget(n);void 0!==r&&(t[n]=r)})),c.push({animation:t})}let m=Boolean(c.length);return r&&!1===o.initial&&!e.manuallyAnimateOnMount&&(m=!1),r=!1,m?t(c):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 ob(e=!1){return{isActive:e,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}let lb=0;const cb={animation:{Feature:class extends Zy{constructor(e){super(e),e.animationState||(e.animationState=sb(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Sv(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}},exit:{Feature:class extends Zy{constructor(){super(...arguments),this.id=lb++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:n}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const i=this.node.animationState.setActive("exit",!e,{custom:null!=n?n:this.node.getProps().custom});t&&!e&&i.then((()=>t(this.id)))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}}},ub=(e,t)=>Math.abs(e-t);class hb{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=fb(this.lastMoveEventInfo,this.history),t=null!==this.startEvent,n=function(e,t){const n=ub(e.x,t.x),r=ub(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}=sv;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=db(t,this.transformPagePoint),iv.update(this.updatePoint,!0)},this.handlePointerUp=(e,t)=>{if(this.end(),!this.lastMoveEvent||!this.lastMoveEventInfo)return;const{onEnd:n,onSessionEnd:r}=this.handlers,i=fb("pointercancel"===e.type?this.lastMoveEventInfo:db(t,this.transformPagePoint),this.history);this.startEvent&&n&&n(e,i),r&&r(e,i)},!Gy(e))return;this.handlers=t,this.transformPagePoint=n;const r=db(Vy(e),this.transformPagePoint),{point:i}=r,{timestamp:a}=sv;this.history=[{...i,timestamp:a}];const{onSessionStart:s}=t;s&&s(e,fb(r,this.history)),this.removeListeners=Xy(Wy(window,"pointermove",this.handlePointerMove),Wy(window,"pointerup",this.handlePointerUp),Wy(window,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),av(this.updatePoint)}}function db(e,t){return t?{point:t(e.point)}:e}function pb(e,t){return{x:e.x-t.x,y:e.y-t.y}}function fb({point:e},t){return{point:e,delta:pb(e,gb(t)),offset:pb(e,mb(t)),velocity:vb(t,.1)}}function mb(e){return e[0]}function gb(e){return e[e.length-1]}function vb(e,t){if(e.length<2)return{x:0,y:0};let n=e.length-1,r=null;const i=gb(e);for(;n>=0&&(r=e[n],!(i.timestamp-r.timestamp>hx(t)));)n--;if(!r)return{x:0,y:0};const a=dx(i.timestamp-r.timestamp);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 yb(e){return e.max-e.min}function xb(e,t=0,n=.01){return Math.abs(e-t)<=n}function _b(e,t,n,r=.5){e.origin=r,e.originPoint=Vx(t.min,t.max,e.origin),e.scale=yb(n)/yb(t),(xb(e.scale,1,1e-4)||isNaN(e.scale))&&(e.scale=1),e.translate=Vx(n.min,n.max,e.origin)-e.originPoint,(xb(e.translate)||isNaN(e.translate))&&(e.translate=0)}function bb(e,t,n,r){_b(e.x,t.x,n.x,r?r.originX:void 0),_b(e.y,t.y,n.y,r?r.originY:void 0)}function Ab(e,t,n){e.min=n.min+t.min,e.max=e.min+yb(t)}function Mb(e,t,n){e.min=t.min-n.min,e.max=e.min+yb(t)}function Sb(e,t,n){Mb(e.x,t.x,n.x),Mb(e.y,t.y,n.y)}function Eb(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 wb(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 Tb=.35;function Cb(e,t,n){return{min:Rb(e,t),max:Rb(e,n)}}function Rb(e,t){return"number"==typeof e?e:e[t]||0}function Pb(e){return[e("x"),e("y")]}function Bb({top:e,left:t,right:n,bottom:r}){return{x:{min:t,max:n},y:{min:e,max:r}}}function Lb(e){return void 0===e||1===e}function Ib({scale:e,scaleX:t,scaleY:n}){return!Lb(e)||!Lb(t)||!Lb(n)}function Db(e){return Ib(e)||Fb(e)||e.z||e.rotate||e.rotateX||e.rotateY}function Fb(e){return Ub(e.x)||Ub(e.y)}function Ub(e){return e&&"0%"!==e}function Nb(e,t,n){return n+t*(e-n)}function Ob(e,t,n,r,i){return void 0!==i&&(e=Nb(e,i,r)),Nb(e,n,r)+t}function kb(e,t=0,n=1,r,i){e.min=Ob(e.min,t,n,r,i),e.max=Ob(e.max,t,n,r,i)}function zb(e,{x:t,y:n}){kb(e.x,t.translate,t.scale,t.originPoint),kb(e.y,n.translate,n.scale,n.originPoint)}function Hb(e){return Number.isInteger(e)||e>1.0000000000001||e<.999999999999?e:1}function Gb(e,t){e.min=e.min+t,e.max=e.max+t}function Vb(e,t,[n,r,i]){const a=void 0!==t[i]?t[i]:.5,s=Vx(e.min,e.max,a);kb(e,t[n],t[r],s,t.scale)}const Wb=["x","scaleX","originX"],jb=["y","scaleY","originY"];function Xb(e,t){Vb(e.x,t,Wb),Vb(e.y,t,jb)}function Jb(e,t){return Bb(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 Yb=new WeakMap;class Kb{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}={}){const{presenceContext:n}=this.visualElement;n&&!1===n.isPresent||(this.panSession=new hb(e,{onSessionStart:e=>{this.stopAnimation(),t&&this.snapToCursor(Vy(e,"page").point)},onStart:(e,t)=>{const{drag:n,dragPropagation:r,onDragStart:i}=this.getProps();if(n&&!r&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=qy(n),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),Pb((e=>{let t=this.getAxisMotionValue(e).get()||0;if(oy.test(t)){const{projection:n}=this.visualElement;if(n&&n.layout){const r=n.layout.layoutBox[e];r&&(t=yb(r)*(parseFloat(t)/100))}}this.originPoint[e]=t})),i&&iv.update((()=>i(e,t)),!1,!0);const{animationState:a}=this.visualElement;a&&a.setActive("whileDrag",!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&&i&&i(this.currentDirection));this.updateAxis("x",t.point,s),this.updateAxis("y",t.point,s),this.visualElement.render(),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();i&&iv.update((()=>i(e,t)))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:n}=this.getProps();!n&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,n){const{drag:r}=this.getProps();if(!n||!qb(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?Vx(t,e,r.min):Math.max(e,t):void 0!==n&&e>n&&(e=r?Vx(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&&Av(e)?this.constraints||(this.constraints=this.resolveRefConstraints()):this.constraints=!(!e||!n)&&function(e,{top:t,left:n,bottom:r,right:i}){return{x:Eb(e.x,n,i),y:Eb(e.y,t,r)}}(n.layoutBox,e),this.elastic=function(e=Tb){return!1===e?e=0:!0===e&&(e=Tb),{x:Cb(e,"left","right"),y:Cb(e,"top","bottom")}}(t),r!==this.constraints&&n&&this.constraints&&!this.hasMutatedConstraints&&Pb((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||!Av(e))return!1;const n=e.current;gv(null!==n,"If `dragConstraints` is set as a React ref, that ref must be passed to another component's `ref` prop.");const{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const i=function(e,t,n){const r=Jb(e,n),{scroll:i}=t;return i&&(Gb(r.x,i.offset.x),Gb(r.y,i.offset.y)),r}(n,r.root,this.visualElement.getTransformPagePoint());let a=function(e,t){return{x:wb(e.x,t.x),y:wb(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=Bb(e))}return a}startAnimation(e){const{drag:t,dragMomentum:n,dragElastic:r,dragTransition:i,dragSnapToOrigin:a,onDragTransitionEnd:s}=this.getProps(),o=this.constraints||{},l=Pb((s=>{if(!qb(s,t,this.currentDirection))return;let l=o&&o[s]||{};a&&(l={min:0,max:0});const c=r?200:1e6,u=r?40:1e7,h={type:"inertia",velocity:n?e[s]:0,bounceStiffness:c,bounceDamping:u,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(H_(e,n,0,t))}stopAnimation(){Pb((e=>this.getAxisMotionValue(e).stop()))}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),n=this.visualElement.getProps();return n[t]||this.visualElement.getValue(e,(n.initial?n.initial[e]:void 0)||0)}snapToCursor(e){Pb((t=>{const{drag:n}=this.getProps();if(!qb(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]-Vx(n,a,.5))}}))}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:n}=this.visualElement;if(!Av(t)||!n||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};Pb((e=>{const t=this.getAxisMotionValue(e);if(t){const n=t.get();r[e]=function(e,t){let n=.5;const r=yb(e),i=yb(t);return i>r?n=c_(t.min,t.max-r,e.min):r>i&&(n=c_(e.min,e.max-i,t.min)),qv(0,1,n)}({min:n,max:n},this.constraints[e])}}));const{transformTemplate:i}=this.visualElement.getProps();this.visualElement.current.style.transform=i?i({},""):"none",n.root&&n.root.updateScroll(),n.updateLayout(),this.resolveConstraints(),Pb((t=>{if(!qb(t,e,null))return;const n=this.getAxisMotionValue(t),{min:i,max:a}=this.constraints[t];n.set(Vx(i,a,r[t]))}))}addListeners(){if(!this.visualElement.current)return;Yb.set(this.visualElement,this);const e=Wy(this.visualElement.current,"pointerdown",(e=>{const{drag:t,dragListener:n=!0}=this.getProps();t&&n&&this.start(e)})),t=()=>{const{dragConstraints:e}=this.getProps();Av(e)&&(this.constraints=this.resolveRefConstraints())},{projection:n}=this.visualElement,r=n.addEventListener("measure",t);n&&!n.layout&&(n.root&&n.root.updateScroll(),n.updateLayout()),t();const i=Hy(window,"resize",(()=>this.scalePositionWithinConstraints())),a=n.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t})=>{this.isDragging&&t&&(Pb((t=>{const n=this.getAxisMotionValue(t);n&&(this.originPoint[t]+=e[t].translate,n.set(n.get()+e[t].translate))})),this.visualElement.render())}));return()=>{i(),e(),r(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:n=!1,dragPropagation:r=!1,dragConstraints:i=!1,dragElastic:a=Tb,dragMomentum:s=!0}=e;return{...e,drag:t,dragDirectionLock:n,dragPropagation:r,dragConstraints:i,dragElastic:a,dragMomentum:s}}}function qb(e,t,n){return!(!0!==t&&t!==e||null!==n&&n!==e)}const Qb=e=>(t,n)=>{e&&iv.update((()=>e(t,n)))},Zb={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function $b(e,t){return t.max===t.min?0:e/(t.max-t.min)*100}const eA={correct:(e,t)=>{if(!t.target)return e;if("string"==typeof e){if(!ly.test(e))return e;e=parseFloat(e)}return`${$b(e,t.target.x)}% ${$b(e,t.target.y)}%`}},tA={correct:(e,{treeScale:t,projectionDelta:n})=>{const r=e,i=r_.parse(e);if(i.length>5)return r;const a=r_.createTransformer(e),s="number"!=typeof i[0]?1:0,o=n.x.scale*t.x,l=n.y.scale*t.y;i[0+s]/=o,i[1+s]/=l;const c=Vx(o,l,.5);return"number"==typeof i[2+s]&&(i[2+s]/=c),"number"==typeof i[3+s]&&(i[3+s]/=c),a(i)}};class nA extends t.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n,layoutId:r}=this.props,{projection:i}=e;var a;a=iA,Object.assign(kv,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()})),Zb.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()||iv.postRender((()=>{const e=a.getStack();e&&e.members.length||this.safeToRemove()}))),null):null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask((()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()})))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:n}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),n&&n.deregister&&n.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function rA(e){const[n,r]=function(){const e=(0,t.useContext)(lv);if(null===e)return[!0,null];const{isPresent:n,onExitComplete:r,register:i}=e,a=(0,t.useId)();return(0,t.useEffect)((()=>i(a)),[]),!n&&r?[!1,()=>r&&r(a)]:[!0]}(),i=(0,t.useContext)(fv);return t.createElement(nA,{...e,layoutGroup:i,switchLayoutGroup:(0,t.useContext)(Lv),isPresent:n,safeToRemove:r})}const iA={borderRadius:{...eA,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:eA,borderTopRightRadius:eA,borderBottomLeftRadius:eA,borderBottomRightRadius:eA,boxShadow:tA},aA=["TopLeft","TopRight","BottomLeft","BottomRight"],sA=aA.length,oA=e=>"string"==typeof e?parseFloat(e):e,lA=e=>"number"==typeof e||ly.test(e);function cA(e,t){return void 0!==e[t]?e[t]:e.borderRadius}const uA=dA(0,.5,Rx),hA=dA(.5,.95,nv);function dA(e,t,n){return r=>r<e?0:r>t?1:n(c_(e,t,r))}function pA(e,t){e.min=t.min,e.max=t.max}function fA(e,t){pA(e.x,t.x),pA(e.y,t.y)}function mA(e,t,n,r,i){return e=Nb(e-=t,1/n,r),void 0!==i&&(e=Nb(e,1/i,r)),e}function gA(e,t,[n,r,i],a,s){!function(e,t=0,n=1,r=.5,i,a=e,s=e){if(oy.test(t)&&(t=parseFloat(t),t=Vx(s.min,s.max,t/100)-s.min),"number"!=typeof t)return;let o=Vx(a.min,a.max,r);e===a&&(o-=t),e.min=mA(e.min,t,n,o,i),e.max=mA(e.max,t,n,o,i)}(e,t[n],t[r],t[i],t.scale,a,s)}const vA=["x","scaleX","originX"],yA=["y","scaleY","originY"];function xA(e,t,n,r){gA(e.x,t,vA,n?n.x:void 0,r?r.x:void 0),gA(e.y,t,yA,n?n.y:void 0,r?r.y:void 0)}function _A(e){return 0===e.translate&&1===e.scale}function bA(e){return _A(e.x)&&_A(e.y)}function AA(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 yb(e.x)/yb(e.y)}class SA{constructor(){this.members=[]}add(e){V_(this.members,e),e.scheduleRender()}remove(e){if(W_(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){const n=this.lead;if(e!==n&&(this.prevLead=n,this.lead=e,e.show(),n)){n.instance&&n.scheduleRender(),e.scheduleRender(),e.resumeFrom=n,t&&(e.resumeFrom.preserveOpacity=!0),n.snapshot&&(e.snapshot=n.snapshot,e.snapshot.latestValues=n.animationValues||n.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;!1===r&&n.hide()}}exitAnimationComplete(){this.members.forEach((e=>{const{options:t,resumingFrom:n}=e;t.onExitComplete&&t.onExitComplete(),n&&n.options.onExitComplete&&n.options.onExitComplete()}))}scheduleRender(){this.members.forEach((e=>{e.instance&&e.scheduleRender(!1)}))}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function EA(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 wA=(e,t)=>e.depth-t.depth;class TA{constructor(){this.children=[],this.isDirty=!1}add(e){V_(this.children,e),this.isDirty=!0}remove(e){W_(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(wA),this.isDirty=!1,this.children.forEach(e)}}const CA=["","X","Y","Z"];let RA=0;const PA={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function BA({attachResizeListener:e,defaultParent:t,measureScroll:n,checkIsScrollRoot:r,resetTransform:i}){return class{constructor(e={},n=(null==t?void 0:t())){this.id=RA++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{var e;PA.totalNodes=PA.resolvedTargetDeltas=PA.recalculatedProjection=0,this.nodes.forEach(DA),this.nodes.forEach(HA),this.nodes.forEach(GA),this.nodes.forEach(FA),e=PA,window.MotionDebug&&window.MotionDebug.record(e)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=e,this.root=n?n.root||n:this,this.path=n?[...n.path,n]:[],this.parent=n,this.depth=n?n.depth+1:0;for(let e=0;e<this.path.length;e++)this.path[e].shouldResetTransform=!0;this.root===this&&(this.nodes=new TA)}addEventListener(e,t){return this.eventHandlers.has(e)||this.eventHandlers.set(e,new j_),this.eventHandlers.get(e).add(t)}notifyListeners(e,...t){const n=this.eventHandlers.get(e);n&&n.notify(...t)}hasListeners(e){return this.eventHandlers.has(e)}mount(t,n=this.root.hasTreeAnimated){if(this.instance)return;var r;this.isSVG=(r=t)instanceof SVGElement&&"svg"!==r.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),this.parent&&this.parent.children.add(this),n&&(a||i)&&(this.isLayoutDirty=!0),e){let n;const r=()=>this.root.updateBlockedByResize=!1;e(t,(()=>{this.root.updateBlockedByResize=!0,n&&n(),n=function(e,t){const n=performance.now(),r=({timestamp:t})=>{const i=t-n;i>=250&&(av(r),e(i-250))};return iv.read(r,!0),()=>av(r)}(r),Zb.hasAnimatedSinceResize&&(Zb.hasAnimatedSinceResize=!1,this.nodes.forEach(zA))}))}i&&this.root.registerSharedNode(i,this),!1!==this.options.animate&&s&&(i||a)&&this.addEventListener("didUpdate",(({delta:e,hasLayoutChanged:t,hasRelativeTargetChanged:n,layout:r})=>{if(this.isTreeAnimationBlocked())return this.target=void 0,void(this.relativeTarget=void 0);const i=this.options.transition||s.getDefaultTransition()||YA,{onLayoutAnimationStart:a,onLayoutAnimationComplete:o}=s.getProps(),l=!this.targetLayout||!AA(this.targetLayout,r)||n,c=!t&&n;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||c||t&&(l||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(e,c);const t={...z_(i,"layout"),onPlay:a,onComplete:o};(s.shouldReduceMotion||this.options.layoutRoot)&&(t.delay=0,t.type=!1),this.startAnimation(t)}else t||zA(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=r}))}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const e=this.getStack();e&&e.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,av(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(VA),this.animationId++)}getTransformTemplate(){const{visualElement:e}=this.options;return e&&e.getProps().transformTemplate}willUpdate(e=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked())return void(this.options.onExitComplete&&this.options.onExitComplete());if(!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:t,layout:n}=this.options;if(void 0===t&&!n)return;const r=this.getTransformTemplate();this.prevTransformTemplateValue=r?r(this.latestValues,""):void 0,this.updateSnapshot(),e&&this.notifyListeners("willUpdate")}update(){if(this.updateScheduled=!1,this.isUpdateBlocked())return this.unblockUpdate(),this.clearAllSnapshots(),void this.nodes.forEach(NA);this.isUpdating||this.nodes.forEach(OA),this.isUpdating=!1,this.nodes.forEach(kA),this.nodes.forEach(LA),this.nodes.forEach(IA),this.clearAllSnapshots();const e=performance.now();sv.delta=qv(0,1e3/60,e-sv.timestamp),sv.timestamp=e,sv.isProcessing=!0,ov.update.process(sv),ov.preRender.process(sv),ov.render.process(sv),sv.isProcessing=!1}didUpdate(){this.updateScheduled||(this.updateScheduled=!0,queueMicrotask((()=>this.update())))}clearAllSnapshots(){this.nodes.forEach(UA),this.sharedNodes.forEach(WA)}scheduleUpdateProjection(){iv.preRender(this.updateProjection,!1,!0)}scheduleCheckAfterUnmount(){iv.postRender((()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()}))}updateSnapshot(){!this.snapshot&&this.instance&&(this.snapshot=this.measure())}updateLayout(){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 e=this.layout;this.layout=this.measure(!1),this.layoutCorrected={x:{min:0,max:0},y:{min:0,max:0}},this.isLayoutDirty=!1,this.projectionDelta=void 0,this.notifyListeners("measure",this.layout.layoutBox);const{visualElement:t}=this.options;t&&t.notify("LayoutMeasure",this.layout.layoutBox,e?e.layoutBox:void 0)}updateScroll(e="measure"){let t=Boolean(this.options.layoutScroll&&this.instance);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(){if(!i)return;const e=this.isLayoutDirty||this.shouldResetTransform,t=this.projectionDelta&&!bA(this.projectionDelta),n=this.getTransformTemplate(),r=n?n(this.latestValues,""):void 0,a=r!==this.prevTransformTemplateValue;e&&(t||Db(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)),KA((r=n).x),KA(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&&(Gb(t.x,n.offset.x),Gb(t.y,n.offset.y)),t}removeElementScroll(e){const t={x:{min:0,max:0},y:{min:0,max:0}};fA(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){fA(t,e);const{scroll:n}=this.root;n&&(Gb(t.x,-n.offset.x),Gb(t.y,-n.offset.y))}Gb(t.x,i.offset.x),Gb(t.y,i.offset.y)}}return t}applyTransform(e,t=!1){const n={x:{min:0,max:0},y:{min:0,max:0}};fA(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&&Xb(n,{x:-r.scroll.offset.x,y:-r.scroll.offset.y}),Db(r.latestValues)&&Xb(n,r.latestValues)}return Db(this.latestValues)&&Xb(n,this.latestValues),n}removeTransform(e){const t={x:{min:0,max:0},y:{min:0,max:0}};fA(t,e);for(let e=0;e<this.path.length;e++){const n=this.path[e];if(!n.instance)continue;if(!Db(n.latestValues))continue;Ib(n.latestValues)&&n.updateSnapshot();const r={x:{min:0,max:0},y:{min:0,max:0}};fA(r,n.measurePageBox()),xA(t,n.latestValues,n.snapshot?n.snapshot.layoutBox:void 0,r)}return Db(this.latestValues)&&xA(t,this.latestValues),t}setTargetDelta(e){this.targetDelta=e,this.root.scheduleUpdateProjection(),this.isProjectionDirty=!0}setOptions(e){this.options={...this.options,...e,crossfade:void 0===e.crossfade||e.crossfade}}clearMeasurements(){this.scroll=void 0,this.layout=void 0,this.snapshot=void 0,this.prevTransformTemplateValue=void 0,this.targetDelta=void 0,this.target=void 0,this.isLayoutDirty=!1}forceRelativeParentToResolveTarget(){this.relativeParent&&this.relativeParent.resolvedRelativeTargetAt!==sv.timestamp&&this.relativeParent.resolveTargetDelta(!0)}resolveTargetDelta(e=!1){var t;const n=this.getLead();this.isProjectionDirty||(this.isProjectionDirty=n.isProjectionDirty),this.isTransformDirty||(this.isTransformDirty=n.isTransformDirty),this.isSharedProjectionDirty||(this.isSharedProjectionDirty=n.isSharedProjectionDirty);const r=Boolean(this.resumingFrom)||this!==n;if(!(e||r&&this.isSharedProjectionDirty||this.isProjectionDirty||(null===(t=this.parent)||void 0===t?void 0:t.isProjectionDirty)||this.attemptToResolveRelativeTarget))return;const{layout:i,layoutId:a}=this.options;if(this.layout&&(i||a)){if(this.resolvedRelativeTargetAt=sv.timestamp,!this.targetDelta&&!this.relativeTarget){const e=this.getClosestProjectingParent();e&&e.layout&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Sb(this.relativeTargetOrigin,this.layout.layoutBox,e.layout.layoutBox),fA(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}if(this.relativeTarget||this.targetDelta){var s,o,l;if(this.target||(this.target={x:{min:0,max:0},y:{min:0,max:0}},this.targetWithTransforms={x:{min:0,max:0},y:{min:0,max:0}}),this.relativeTarget&&this.relativeTargetOrigin&&this.relativeParent&&this.relativeParent.target?(this.forceRelativeParentToResolveTarget(),s=this.target,o=this.relativeTarget,l=this.relativeParent.target,Ab(s.x,o.x,l.x),Ab(s.y,o.y,l.y)):this.targetDelta?(Boolean(this.resumingFrom)?this.target=this.applyTransform(this.layout.layoutBox):fA(this.target,this.layout.layoutBox),zb(this.target,this.targetDelta)):fA(this.target,this.layout.layoutBox),this.attemptToResolveRelativeTarget){this.attemptToResolveRelativeTarget=!1;const e=this.getClosestProjectingParent();e&&Boolean(e.resumingFrom)===Boolean(this.resumingFrom)&&!e.options.layoutScroll&&e.target&&1!==this.animationProgress?(this.relativeParent=e,this.forceRelativeParentToResolveTarget(),this.relativeTarget={x:{min:0,max:0},y:{min:0,max:0}},this.relativeTargetOrigin={x:{min:0,max:0},y:{min:0,max:0}},Sb(this.relativeTargetOrigin,this.target,e.target),fA(this.relativeTarget,this.relativeTargetOrigin)):this.relativeParent=this.relativeTarget=void 0}PA.resolvedTargetDeltas++}}}getClosestProjectingParent(){if(this.parent&&!Ib(this.parent.latestValues)&&!Fb(this.parent.latestValues))return this.parent.isProjecting()?this.parent:this.parent.getClosestProjectingParent()}isProjecting(){return Boolean((this.relativeTarget||this.targetDelta||this.options.layoutRoot)&&this.layout)}calcProjection(){var e;const t=this.getLead(),n=Boolean(this.resumingFrom)||this!==t;let r=!0;if((this.isProjectionDirty||(null===(e=this.parent)||void 0===e?void 0:e.isProjectionDirty))&&(r=!1),n&&(this.isSharedProjectionDirty||this.isTransformDirty)&&(r=!1),this.resolvedRelativeTargetAt===sv.timestamp&&(r=!1),r)return;const{layout:i,layoutId:a}=this.options;if(this.isTreeAnimating=Boolean(this.parent&&this.parent.isTreeAnimating||this.currentAnimation||this.pendingAnimation),this.isTreeAnimating||(this.targetDelta=this.relativeTarget=void 0),!this.layout||!i&&!a)return;fA(this.layoutCorrected,this.layout.layoutBox);const s=this.treeScale.x,o=this.treeScale.y;!function(e,t,n,r=!1){const i=n.length;if(!i)return;let a,s;t.x=t.y=1;for(let o=0;o<i;o++){a=n[o],s=a.projectionDelta;const i=a.instance;i&&i.style&&"contents"===i.style.display||(r&&a.options.layoutScroll&&a.scroll&&a!==a.root&&Xb(e,{x:-a.scroll.offset.x,y:-a.scroll.offset.y}),s&&(t.x*=s.x.scale,t.y*=s.y.scale,zb(e,s)),r&&Db(a.latestValues)&&Xb(e,a.latestValues))}t.x=Hb(t.x),t.y=Hb(t.y)}(this.layoutCorrected,this.treeScale,this.path,n),!t.layout||t.target||1===this.treeScale.x&&1===this.treeScale.y||(t.target=t.layout.layoutBox);const{target:l}=t;if(!l)return void(this.projectionTransform&&(this.projectionDelta={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}},this.projectionTransform="none",this.scheduleRender()));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 c=this.projectionTransform;bb(this.projectionDelta,this.layoutCorrected,l,this.latestValues),this.projectionTransform=EA(this.projectionDelta,this.treeScale),this.projectionTransform===c&&this.treeScale.x===s&&this.treeScale.y===o||(this.hasProjected=!0,this.scheduleRender(),this.notifyListeners("projectionUpdate",l)),PA.recalculatedProjection++}hide(){this.isVisible=!1}show(){this.isVisible=!0}scheduleRender(e=!0){if(this.options.scheduleRender&&this.options.scheduleRender(),e){const e=this.getStack();e&&e.scheduleRender()}this.resumingFrom&&!this.resumingFrom.instance&&(this.resumingFrom=void 0)}setAnimationOrigin(e,t=!1){const n=this.snapshot,r=n?n.latestValues:{},i={...this.latestValues},a={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};this.relativeParent&&this.relativeParent.options.layoutRoot||(this.relativeTarget=this.relativeTargetOrigin=void 0),this.attemptToResolveRelativeTarget=!t;const s={x:{min:0,max:0},y:{min:0,max:0}},o=(n?n.source:void 0)!==(this.layout?this.layout.source:void 0),l=this.getStack(),c=!l||l.members.length<=1,u=Boolean(o&&!c&&!0===this.options.crossfade&&!this.path.some(JA));let h;this.animationProgress=0,this.mixTargetDelta=t=>{const n=t/1e3;var l,d,p,f;jA(a.x,e.x,n),jA(a.y,e.y,n),this.setTargetDelta(a),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(Sb(s,this.layout.layoutBox,this.relativeParent.layout.layoutBox),l=this.relativeTarget,d=this.relativeTargetOrigin,p=s,f=n,XA(l.x,d.x,p.x,f),XA(l.y,d.y,p.y,f),h&&AA(this.relativeTarget,h)&&(this.isProjectionDirty=!1),h||(h={x:{min:0,max:0},y:{min:0,max:0}}),fA(h,this.relativeTarget)),o&&(this.animationValues=i,function(e,t,n,r,i,a){i?(e.opacity=Vx(0,void 0!==n.opacity?n.opacity:1,uA(r)),e.opacityExit=Vx(void 0!==t.opacity?t.opacity:1,0,hA(r))):a&&(e.opacity=Vx(void 0!==t.opacity?t.opacity:1,void 0!==n.opacity?n.opacity:1,r));for(let i=0;i<sA;i++){const a=`border${aA[i]}Radius`;let s=cA(t,a),o=cA(n,a);void 0===s&&void 0===o||(s||(s=0),o||(o=0),0===s||0===o||lA(s)===lA(o)?(e[a]=Math.max(Vx(oA(s),oA(o),r),0),(oy.test(o)||oy.test(s))&&(e[a]+="%")):e[a]=o)}(t.rotate||n.rotate)&&(e.rotate=Vx(t.rotate||0,n.rotate||0,r))}(i,r,this.latestValues,n,u,c)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=n},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(e){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(av(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=iv.update((()=>{Zb.hasAnimatedSinceResize=!0,this.currentAnimation=function(e,t,n){const r=Vv(0)?0:J_(0);return r.start(H_("",r,1e3,n)),r.animation}(0,0,{...e,onUpdate:t=>{this.mixTargetDelta(t),e.onUpdate&&e.onUpdate(t)},onComplete:()=>{e.onComplete&&e.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0}))}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const e=this.getStack();e&&e.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(1e3),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const e=this.getLead();let{targetWithTransforms:t,target:n,layout:r,latestValues:i}=e;if(t&&n&&r){if(this!==e&&this.layout&&r&&qA(this.options.animationType,this.layout.layoutBox,r.layoutBox)){n=this.target||{x:{min:0,max:0},y:{min:0,max:0}};const t=yb(this.layout.layoutBox.x);n.x.min=e.target.x.min,n.x.max=n.x.min+t;const r=yb(this.layout.layoutBox.y);n.y.min=e.target.y.min,n.y.max=n.y.min+r}fA(t,n),Xb(t,i),bb(this.projectionDeltaWithTransform,this.layoutCorrected,t,i)}}registerSharedNode(e,t){this.sharedNodes.has(e)||this.sharedNodes.set(e,new SA),this.sharedNodes.get(e).add(t);const n=t.options.initialPromotionConfig;t.promote({transition:n?n.transition:void 0,preserveFollowOpacity:n&&n.shouldPreserveFollowOpacity?n.shouldPreserveFollowOpacity(t):void 0})}isLead(){const e=this.getStack();return!e||e.lead===this}getLead(){var e;const{layoutId:t}=this.options;return t&&(null===(e=this.getStack())||void 0===e?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<CA.length;t++){const i="rotate"+CA[t];n[i]&&(r[i]=n[i],e.setStaticValue(i,0))}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=Uy(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=Uy(e.pointerEvents)||""),this.hasProjected&&!Db(this.latestValues)&&(t.transform=i?i({},""):"none",this.hasProjected=!1),t}const s=a.animationValues||a.latestValues;this.applyTransformsToTarget(),r.transform=EA(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 kv){if(void 0===s[e])continue;const{correct:t,applyTo:n}=kv[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?Uy(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(NA),this.root.sharedNodes.clear()}}}function LA(e){e.updateLayout()}function IA(e){var t;const n=(null===(t=e.resumeFrom)||void 0===t?void 0:t.snapshot)||e.snapshot;if(e.isLead()&&e.layout&&n&&e.hasListeners("didUpdate")){const{layoutBox:t,measuredBox:r}=e.layout,{animationType:i}=e.options,a=n.source!==e.layout.source;"size"===i?Pb((e=>{const r=a?n.measuredBox[e]:n.layoutBox[e],i=yb(r);r.min=t[e].min,r.max=r.min+i})):qA(i,n.layoutBox,t)&&Pb((r=>{const i=a?n.measuredBox[r]:n.layoutBox[r],s=yb(t[r]);i.max=i.min+s,e.relativeTarget&&!e.currentAnimation&&(e.isProjectionDirty=!0,e.relativeTarget[r].max=e.relativeTarget[r].min+s)}));const s={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};bb(s,t,n.layoutBox);const o={x:{translate:0,scale:1,origin:0,originPoint:0},y:{translate:0,scale:1,origin:0,originPoint:0}};a?bb(o,e.applyTransform(r,!0),n.measuredBox):bb(o,t,n.layoutBox);const l=!bA(s);let c=!1;if(!e.resumeFrom){const r=e.getClosestProjectingParent();if(r&&!r.resumeFrom){const{snapshot:i,layout:a}=r;if(i&&a){const s={x:{min:0,max:0},y:{min:0,max:0}};Sb(s,n.layoutBox,i.layoutBox);const o={x:{min:0,max:0},y:{min:0,max:0}};Sb(o,t,a.layoutBox),AA(s,o)||(c=!0),r.options.layoutRoot&&(e.relativeTarget=o,e.relativeTargetOrigin=s,e.relativeParent=r)}}}e.notifyListeners("didUpdate",{layout:t,snapshot:n,delta:o,layoutDelta:s,hasLayoutChanged:l,hasRelativeTargetChanged:c})}else if(e.isLead()){const{onExitComplete:t}=e.options;t&&t()}e.options.transition=void 0}function DA(e){PA.totalNodes++,e.parent&&(e.isProjecting()||(e.isProjectionDirty=e.parent.isProjectionDirty),e.isSharedProjectionDirty||(e.isSharedProjectionDirty=Boolean(e.isProjectionDirty||e.parent.isProjectionDirty||e.parent.isSharedProjectionDirty)),e.isTransformDirty||(e.isTransformDirty=e.parent.isTransformDirty))}function FA(e){e.isProjectionDirty=e.isSharedProjectionDirty=e.isTransformDirty=!1}function UA(e){e.clearSnapshot()}function NA(e){e.clearMeasurements()}function OA(e){e.isLayoutDirty=!1}function kA(e){const{visualElement:t}=e.options;t&&t.getProps().onBeforeLayoutMeasure&&t.notify("BeforeLayoutMeasure"),e.resetTransform()}function zA(e){e.finishAnimation(),e.targetDelta=e.relativeTarget=e.target=void 0,e.isProjectionDirty=!0}function HA(e){e.resolveTargetDelta()}function GA(e){e.calcProjection()}function VA(e){e.resetRotation()}function WA(e){e.removeLeadSnapshot()}function jA(e,t,n){e.translate=Vx(t.translate,0,n),e.scale=Vx(t.scale,1,n),e.origin=t.origin,e.originPoint=t.originPoint}function XA(e,t,n,r){e.min=Vx(t.min,n.min,r),e.max=Vx(t.max,n.max,r)}function JA(e){return e.animationValues&&void 0!==e.animationValues.opacityExit}const YA={duration:.45,ease:[.4,0,.1,1]};function KA(e){e.min=Math.round(2*e.min)/2,e.max=Math.round(2*e.max)/2}function qA(e,t,n){return"position"===e||"preserve-aspect"===e&&!xb(MA(t),MA(n),.2)}const QA=BA({attachResizeListener:(e,t)=>Hy(e,"resize",t),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),ZA={current:void 0},$A=BA({measureScroll:e=>({x:e.scrollLeft,y:e.scrollTop}),defaultParent:()=>{if(!ZA.current){const e=new QA({});e.mount(window),e.setOptions({layoutScroll:!0}),ZA.current=e}return ZA.current},resetTransform:(e,t)=>{e.style.transform=void 0!==t?t:"none"},checkIsScrollRoot:e=>Boolean("fixed"===window.getComputedStyle(e).position)}),eM={pan:{Feature:class extends Zy{constructor(){super(...arguments),this.removePointerDownListener=nv}onPointerDown(e){this.session=new hb(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint()})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:n,onPanEnd:r}=this.node.getProps();return{onSessionStart:Qb(e),onStart:Qb(t),onMove:n,onEnd:(e,t)=>{delete this.session,r&&iv.update((()=>r(e,t)))}}}mount(){this.removePointerDownListener=Wy(this.node.current,"pointerdown",(e=>this.onPointerDown(e)))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}},drag:{Feature:class extends Zy{constructor(e){super(e),this.removeGroupControls=nv,this.removeListeners=nv,this.controls=new Kb(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||nv}unmount(){this.removeGroupControls(),this.removeListeners()}},ProjectionNode:$A,MeasureLayout:rA}},tM=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function nM(e,t,n=1){gv(n<=4,`Max CSS variable fallback depth detected in property "${e}". This may indicate a circular fallback dependency.`);const[r,i]=function(e){const t=tM.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():Yv(i)?nM(i,t,n+1):i}const rM=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),iM=e=>rM.has(e),aM=e=>e===Qv||e===ly,sM=(e,t)=>parseFloat(e.split(", ")[t]),oM=(e,t)=>(n,{transform:r})=>{if("none"===r||!r)return 0;const i=r.match(/^matrix3d\((.+)\)$/);if(i)return sM(i[1],t);{const t=r.match(/^matrix\((.+)\)$/);return t?sM(t[1],e):0}},lM=new Set(["x","y","z"]),cM=zv.filter((e=>!lM.has(e))),uM={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:oM(4,13),y:oM(5,14)};uM.translateX=uM.x,uM.translateY=uM.y;function hM(e,t,n,r){return(e=>Object.keys(e).some(iM))(t)?((e,t,n={},r={})=>{t={...t},r={...r};const i=Object.keys(t).filter(iM);let a=[],s=!1;const o=[];if(i.forEach((i=>{const l=e.getValue(i);if(!e.hasValue(i))return;let c=n[i],u=q_(c);const h=t[i];let d;if(Fy(h)){const e=h.length,t=null===h[0]?1:0;c=h[t],u=q_(c);for(let n=t;n<e&&null!==h[n];n++)d?gv(q_(h[n])===d,"All keyframes must be of the same type"):(d=q_(h[n]),gv(d===u||aM(u)&&aM(d),"Keyframes must be of the same dimension as the current value"))}else d=q_(h);if(u!==d)if(aM(u)&&aM(d)){const e=l.get();"string"==typeof e&&l.set(parseFloat(e)),"string"==typeof h?t[i]=parseFloat(h):Array.isArray(h)&&d===ly&&(t[i]=h.map(parseFloat))}else(null==u?void 0:u.transform)&&(null==d?void 0:d.transform)&&(0===c||0===h)?0===c?l.set(d.transform(c)):t[i]=u.transform(h):(s||(a=function(e){const t=[];return cM.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]=uM[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]=uM[n](l,a)})),e})(t,e,o);return a.length&&a.forEach((([t,n])=>{e.getValue(t).set(n)})),e.render(),$g&&null!==n&&window.scrollTo({top:n}),{target:i,transitionEnd:r}}return{target:t,transitionEnd:r}})(e,t,n,r):{target:t,transitionEnd:r}}const dM={current:null},pM={current:!1},fM=new WeakMap,mM=Object.keys(Bv),gM=mM.length,vM=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],yM=wv.length;class xM extends class{constructor({parent:e,props:t,presenceContext:n,reducedMotionConfig:r,visualState:i},a={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>iv.render(this.render,!1,!0);const{latestValues:s,renderState:o}=i;this.latestValues=s,this.baseTarget={...s},this.initialValues=t.initial?{...s}:{},this.renderState=o,this.parent=e,this.props=t,this.presenceContext=n,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=a,this.isControllingVariants=Tv(t),this.isVariantNode=Cv(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=Boolean(e&&e.current);const{willChange:l,...c}=this.scrapeMotionValuesFromProps(t,{});for(const e in c){const t=c[e];void 0!==s[e]&&Vv(t)&&(t.set(s[e],!1),G_(l)&&l.add(e))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,fM.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach(((e,t)=>this.bindToMotionValue(t,e))),pM.current||function(){if(pM.current=!0,$g)if(window.matchMedia){const e=window.matchMedia("(prefers-reduced-motion)"),t=()=>dM.current=e.matches;e.addListener(t),t()}else dM.current=!1}(),this.shouldReduceMotion="never"!==this.reducedMotionConfig&&("always"===this.reducedMotionConfig||dM.current),this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){fM.delete(this.current),this.projection&&this.projection.unmount(),av(this.notifyUpdate),av(this.render),this.valueSubscriptions.forEach((e=>e())),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const n=Hv.has(e),r=t.on("change",(t=>{this.latestValues[e]=t,this.props.onUpdate&&iv.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){let a,s;for(let e=0;e<gM;e++){const n=mM[e],{isEnabled:r,Feature:i,ProjectionNode:o,MeasureLayout:l}=Bv[n];o&&(a=o),r(t)&&(!this.features[n]&&i&&(this.features[n]=new i(this)),l&&(s=l))}if(!this.projection&&a){this.projection=new a(this.latestValues,this.parent&&this.parent.projection);const{layoutId:e,layout:n,drag:r,dragConstraints:s,layoutScroll:o,layoutRoot:l}=t;this.projection.setOptions({layoutId:e,layout:n,alwaysMeasureLayout:Boolean(r)||s&&Av(s),visualElement:this,scheduleRender:()=>this.scheduleRender(),animationType:"string"==typeof n?n:"both",initialPromotionConfig:i,layoutScroll:o,layoutRoot:l})}return s}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}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)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let t=0;t<vM.length;t++){const n=vM[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(Vv(a))e.addValue(i,a),G_(r)&&r.add(i);else if(Vv(s))e.addValue(i,J_(a,{owner:e})),G_(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,J_(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,this.prevProps),this.prevMotionValues),this.handleChildMotionValue&&this.handleChildMotionValue()}getProps(){return this.props}getVariant(e){return this.props.variants?this.props.variants[e]:void 0}getDefaultTransition(){return this.props.transition}getTransformPagePoint(){return this.props.transformPagePoint}getClosestVariantNode(){return this.isVariantNode?this:this.parent?this.parent.getClosestVariantNode():void 0}getVariantContext(e=!1){if(e)return this.parent?this.parent.getVariantContext():void 0;if(!this.isControllingVariants){const e=this.parent&&this.parent.getVariantContext()||{};return void 0!==this.props.initial&&(e.initial=this.props.initial),e}const t={};for(let e=0;e<yM;e++){const n=wv[e],r=this.props[n];(Mv(r)||!1===r)&&(t[n]=r)}return t}addVariantChild(e){const t=this.getClosestVariantNode();if(t)return t.variantChildren&&t.variantChildren.add(e),()=>t.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){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let n=this.values.get(e);return void 0===n&&void 0!==t&&(n=J_(t,{owner:this}),this.addValue(e,n)),n}readValue(e){var t;return void 0===this.latestValues[e]&&this.current?null!==(t=this.getBaseTargetFromProps(this.props,e))&&void 0!==t?t: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=Dy(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||Vv(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 j_),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}{sortInstanceNodePosition(e,t){return 2&e.compareDocumentPosition(t)?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:n}){delete t[e],delete n[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...n},{transformValues:r},i){let a=function(e,t,n){const r={};for(const i in e){const e=$_(i,t);if(void 0!==e)r[i]=e;else{const e=n.getValue(i);e&&(r[i]=e.get())}}return r}(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 l=0;l<s;l++){const s=a[l],c=t[s];let u=null;Array.isArray(c)&&(u=c[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)||O_(u))?u=parseFloat(u):(o=u,!Q_.find(Y_(o))&&r_.test(c)&&(u=N_(s,c))),e.addValue(s,J_(u,{owner:e})),void 0===n[s]&&(n[s]=u),null!==u&&e.setBaseTarget(s,u))}var o}(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(!Yv(t))return;const n=nM(t,r);n&&e.set(n)}));for(const e in t){const i=t[e];if(!Yv(i))continue;const a=nM(i,r);a&&(t[e]=a,n||(n={}),void 0===n[e]&&(n[e]=i))}return{target:t,transitionEnd:n}}(e,t,r);return hM(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 _M extends xM{readValueFromInstance(e,t){if(Hv.has(t)){const e=U_(t);return e&&e.default||0}{const r=(n=e,window.getComputedStyle(n)),i=(Jv(t)?r.getPropertyValue(t):r[t])||0;return"string"==typeof i?i.trim():i}var n}measureInstanceViewportBox(e,{transformPagePoint:t}){return Jb(e,t)}build(e,t,n,r){fy(e,t,n,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return Ly(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Vv(e)&&(this.childSubscription=e.on("change",(e=>{this.current&&(this.current.textContent=`${e}`)})))}renderInstance(e,t,n,r){Ry(e,t,n,r)}}class bM extends xM{constructor(){super(...arguments),this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(Hv.has(t)){const e=U_(t);return e&&e.default||0}return t=Py.has(t)?t:Cy(t),e.getAttribute(t)}measureInstanceViewportBox(){return{x:{min:0,max:0},y:{min:0,max:0}}}scrapeMotionValuesFromProps(e,t){return Iy(e,t)}build(e,t,n,r){Sy(e,t,n,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,n,r){By(e,t,0,r)}mount(e){this.isSVGTag=Ey(e.tagName),super.mount(e)}}const AM=(e,t)=>Ov(e)?new bM(t,{enableHardwareAcceleration:!1}):new _M(t,{enableHardwareAcceleration:!0}),MM={...cb,...ox,...eM,layout:{ProjectionNode:$A,MeasureLayout:rA}},SM=Uv(((e,t)=>function(e,{forwardMotionProps:t=!1},n,r){return{...Ov(e)?ky:zy,preloadedFeatures:n,useRender:Ty(t),createVisualElement:r,Component:e}}(e,t,MM,AM)));function EM(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){if("undefined"!=typeof Symbol&&Symbol.iterator in Object(e)){var n=[],r=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(r=(s=o.next()).done)&&(n.push(s.value),!t||n.length!==t);r=!0);}catch(e){i=!0,a=e}finally{try{r||null==o.return||o.return()}finally{if(i)throw a}}return n}}(e,t)||function(e,t){if(e){if("string"==typeof e)return wM(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)?wM(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 wM(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 TM(){return TM=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},TM.apply(this,arguments)}var CM=[1,2,3,4,5,6];function RM(e,t){return Math.random()*(t-e)+e}function PM(e,t,n){var r=e*(Math.PI/180),i=-t*(Math.PI/180);return[Math.cos(r)*Math.cos(i)*n,Math.sin(r)*n,Math.cos(r)*Math.sin(i)*n]}function BM(e){var n=Gg(globeUrl),r=n.nodes,i=n.materials,a=e.globe,s=e.focusPoint;return t.createElement("group",TM({},e,{ref:a,dispose:null}),t.createElement("mesh",{castShadow:!1,receiveShadow:!1,geometry:r["3838432_World+map"].geometry,material:i.World_map,rotation:[Math.PI/2,0,0]}),globePoints.map((function(e){if(!e.coords)return null;var n=e.coords.latitude*(Math.PI/180),r=-e.coords.longitude*(Math.PI/180),i=[Math.cos(n)*Math.cos(r)*1,1*Math.sin(n),Math.cos(n)*Math.sin(r)*1];return t.createElement(Vg,{follow:!0,key:e.name,position:i},t.createElement(Zg,null,t.createElement(yv,null,(null==s?void 0:s.id)===e.id&&t.createElement(SM.p,{key:"point-name",initial:{opacity:0,scale:0,x:"-125%",y:"-125%"},animate:{opacity:1,scale:1,x:"-125%",y:"-125%"},exit:{opacity:0,scale:0,x:"-125%",y:"-125%"},transition:{duration:.3},style:{position:"absolute",fontFamily:"var(--bs-body-font-family)",fontSize:"1.5em"}},e.name),(null==s?void 0:s.id)===e.id&&t.createElement("svg",{style:{position:"absolute",transform:"translate(-45%, -30%)"},width:"965",height:"313",fill:"none",xmlns:"http://www.w3.org/2000/svg"},t.createElement(SM.circle,{initial:{r:0},animate:{r:8},transition:{duration:.3},cx:"441",cy:"91",r:"8",fill:"#FE5C0E"}),CM.map((function(e,n){var r=RM(0,882),i=RM(-882,882);return t.createElement(SM.path,{key:"line".concat(n),id:"line".concat(n),initial:{d:"M441 91 L441 91Z"},animate:{d:["M441 91 L441 91Z","M440.9 91 L".concat(r," ").concat(i,"Z"),"M".concat(r," ").concat(i," L").concat(r," ").concat(i,"Z")]},transition:{duration:1,delay:.3,ease:"easeInOut"},stroke:"#FE5C0E",strokeWidth:3,strokeDasharray:3})}))))))})))}var LM=0,IM=function(){var e=EM((0,t.useState)(null),2),n=e[0],r=e[1],i=EM((0,t.useState)(5),2),a=i[0],s=i[1],o=(0,t.useRef)(null),l=new br;return(0,t.useEffect)((function(){var e=document.querySelector('[data-action="mapView"]').closest(".has-mega-menu");e&&(e.addEventListener("mouseover",(function(){s(6)})),e.addEventListener("mouseleave",(function(){s(5)})))}),[]),(0,t.useEffect)((function(){var e=[].slice.call(document.querySelectorAll('[data-action="mapView"]'));e&&e.forEach((function(e){e.addEventListener("mouseover",(function(){var t=globePoints.find((function(t){return parseInt(t.id)===parseInt(e.dataset.id)}));t.coords&&r(t)})),e.addEventListener("mouseleave",(function(){r(null)}))}))}),[]),om((function(e){if(null===n){var t=PM(25,LM+=.03,a);e.camera.lookAt(0,0,0),e.camera.position.lerp(l.set(t[0],t[1],t[2]),.01)}else{var r=PM(null==n?void 0:n.coords.latitude,null==n?void 0:n.coords.longitude,a);e.camera.lookAt(0,0,0),e.camera.position.lerp(l.set(r[0],r[1],r[2]),.1),null!==n&&n.coords&&n.coords.longitude&&(LM=null==n?void 0:n.coords.longitude)}})),t.createElement(t.Fragment,null,t.createElement("ambientLight",{intensity:.1}),t.createElement(t.Suspense,{fallback:null},t.createElement(BM,{focusPoint:n,globe:o,scale:[4,4,4],position:[0,-.6,0]})))},DM=function(){var e=EM((0,t.useState)(!1),2),n=e[0],r=e[1];return(0,t.useEffect)((function(){"complete"===document.readyState?r(!0):window.addEventListener("load",(function(){return r(!0)}),!1)}),[]),t.createElement(Wm,{camera:{position:[10,10,10]}},n&&t.createElement(IM,null))};document.addEventListener("DOMContentLoaded",(function(){var e=document.querySelector(".globe .stage");e&&(0,pf.s)(e).render(t.createElement(t.Fragment,null,t.createElement(DM,null)))}),!1)})()})(); </script> <script crossorigin="anonymous" src="https://kit.fontawesome.com/6ab589422f.js?ver=6.7.1" id="acffa_font-awesome-kit-js"></script> <script>console.log("Page generated in 0.1299 seconds. 140 database queries")</script> <!-- Start of HubSpot Embed Code --> <script type="text/javascript" id="hs-script-loader" async defer src="//js.hs-scripts.com/7280898.js"></script> <style type="text/css"> div#hs-eu-cookie-confirmation { position: fixed; bottom: 0; top: auto; } @media only screen and (max-width: 960px) { div#hs-eu-cookie-confirmation { bottom: 60px; } } </style> <!-- End of HubSpot Embed Code --> <script type='application/ld+json'> { "@context": "https://schema.org", "@type": "Organization", "name": "Crowd", "url": "https://thisiscrowd.com", "description": "", "sameAs": [ https://facebook.com,https://twitter.com/test ] } </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>

Pages: 1 2 3 4 5 6 7 8 9 10