diff --git a/Eyeball.jsx b/Eyeball.jsx deleted file mode 100644 index c1879a4..0000000 --- a/Eyeball.jsx +++ /dev/null @@ -1,27 +0,0 @@ -/* eslint-disable react/no-unknown-property */ -/* -Auto-generated by: https://github.com/pmndrs/gltfjsx -Command: npx gltfjsx@6.5.2 eyeball.gltf -Author: memartel (https://sketchfab.com/memartel) -License: CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/) -Source: https://sketchfab.com/3d-models/blue-eyeball-free-f3c0a0638e784fa0b018e1ad8856eb7a -Title: blue_eyeball_free -*/ - -// eslint-disable-next-line no-unused-vars -import React from 'react' -import { useGLTF } from '@react-three/drei' - -export default function Model(props) { - const { nodes, materials } = useGLTF('/eyeball.gltf') - return ( - - {/* Rotate the entire model to face upwards */} - - - - - ) -} - -useGLTF.preload('/eyeball.gltf') diff --git a/assets/PregnantLady-aQkl7n1m.svg b/assets/PregnantLady-aQkl7n1m.svg new file mode 100644 index 0000000..d3388e8 --- /dev/null +++ b/assets/PregnantLady-aQkl7n1m.svg @@ -0,0 +1,4046 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/assets/index-CagyC3Sd.css b/assets/index-1V_ZLMl8.css similarity index 89% rename from assets/index-CagyC3Sd.css rename to assets/index-1V_ZLMl8.css index 9de4eec..7fce9d7 100644 --- a/assets/index-CagyC3Sd.css +++ b/assets/index-1V_ZLMl8.css @@ -1 +1 @@ -*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }@media (min-width: 250px){.container{max-width:250px}}@media (min-width: 320px){.container{max-width:320px}}@media (min-width: 420px){.container{max-width:420px}}@media (min-width: 460px){.container{max-width:460px}}@media (min-width: 685px){.container{max-width:685px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.relative{position:relative}.bottom-12{bottom:3rem}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-\[\.2rem\]{top:.2rem}.z-40{z-index:40}.z-\[5\]{z-index:5}.m-auto{margin:auto}.-mt-4{margin-top:-1rem}.ml-8{margin-left:2rem}.ml-\[1rem\]{margin-left:1rem}.mr-\[1rem\]{margin-right:1rem}.mt-\[3rem\]{margin-top:3rem}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-\[100px\]{height:100px}.h-\[50px\]{height:50px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-\[225px\]{min-width:225px}.scale-x-\[-1\]{--tw-scale-x: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.px-8{padding-left:2rem;padding-right:2rem}.font-Kingthings_Petrock{font-family:Kingthings_Petrock,cursive}.font-Nosifer-Regular{font-family:Nosifer-Regular,cursive}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[\#87ceeb\]{--tw-text-opacity: 1;color:rgb(135 206 235 / var(--tw-text-opacity))}.text-\[\#abdbee\]{--tw-text-opacity: 1;color:rgb(171 219 238 / var(--tw-text-opacity))}.text-\[\#fcb54d\]{--tw-text-opacity: 1;color:rgb(252 181 77 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity))}.text-yellow-100{--tw-text-opacity: 1;color:rgb(254 249 195 / var(--tw-text-opacity))}:root{background-image:linear-gradient(#377cb1 15%,#414f5b 60%,#414f5b -80%,#979190)}body{top:0;left:0;right:0;bottom:0;width:screen;height:screen;position:fixed;background-image:linear-gradient(#377cb2 15%,#414f5b 60%,#414f5b -80%,#979190)}@font-face{font-family:DM_Serif_Display;src:url(./DMSerifDisplay-Regular-BB3xDZ4A.ttf)}@font-face{font-family:Archivo_Black;src:url(./ArchivoBlack-Regular-CrNC9wvr.ttf)}@font-face{font-family:Aclonica-Regular;src:url(./Aclonica-Regular-BGQGNgmo.ttf)}@font-face{font-family:ArchivoBlack-Regular;src:url(./ArchivoBlack-Regular-CrNC9wvr.ttf)}@font-face{font-family:Blackbeard-ld7V;src:url(./Blackbeard-ld7V-Dg8k87KE.ttf)}@font-face{font-family:BlackOpsOne-Regular;src:url(./BlackOpsOne-Regular-NJiuZT8Q.ttf)}@font-face{font-family:Borel-Regular;src:url(./Borel-Regular-6nnjaT-3.ttf)}@font-face{font-family:Caprasimo-Regular;src:url(./Caprasimo-Regular-BXxQ1plz.ttf)}@font-face{font-family:Changa-Regular;src:url(./Changa-Regular-D_6aZcbj.ttf)}@font-face{font-family:Changa-VariableFont_wght;src:url(./Changa-VariableFont_wght-e5Q_zvFM.ttf)}@font-face{font-family:ChunkFive-Regular;src:url(./ChunkFive-Regular-DbsgiVYs.otf)}@font-face{font-family:Creepster-Regular;src:url(./Creepster-Regular-mOh_PY0X.ttf)}@font-face{font-family:DMSerifDisplay-Italic;src:url(./DMSerifDisplay-Italic-D1fnzAS9.ttf)}@font-face{font-family:DM_Serif_Display;src:url(./DMSerifDisplay-Regular-BB3xDZ4A.ttf)}@font-face{font-family:EmilysCandy-Regular;src:url(./EmilysCandy-Regular-lJM2SeFT.ttf)}@font-face{font-family:Iceberg-Regular;src:url(./Iceberg-Regular-gG15dCtb.ttf)}@font-face{font-family:HoltwoodOneSC-Regular;src:url(./HoltwoodOneSC-Regular-BqrWHXPW.ttf)}@font-face{font-family:Itim-Regular;src:url(./Itim-Regular-C81TTF-z.ttf)}@font-face{font-family:Kranky-Regular;src:url(./Kranky-Regular-C5SlX586.ttf)}@font-face{font-family:LibreBaskerville-Bold;src:url(./LibreBaskerville-Bold-De2z11Hm.ttf)}@font-face{font-family:LibreBaskerville-Italic;src:url(./LibreBaskerville-Italic-ayaR8-zC.ttf)}@font-face{font-family:Kingthings_Petrock;src:url(./Kingthings_Petrock-CmQ7tZPw.ttf)}@font-face{font-family:LibreBaskerville-Regular;src:url(./LibreBaskerville-Regular-BQmEVCCQ.ttf)}@font-face{font-family:MedievalSharp-Regular;src:url(./MedievalSharp-Regular-BN2kGNB9.ttf)}@font-face{font-family:MetalMania-Regular;src:url(./MetalMania-Regular-BQ9h36zR.ttf)}@font-face{font-family:Metamorphous-Regular;src:url(./Metamorphous-Regular-DuZn8MeX.ttf)}@font-face{font-family:Nosifer-Regular;src:url(./Nosifer-Regular-CXzrgB0K.ttf)}@font-face{font-family:"NotoSans-Italic-VariableFont_wdth,wght";src:url(./NotoSans-Italic-VariableFont_wdth_wght-DO_x-GzF.ttf)}@font-face{font-family:"NotoSans-VariableFont_wdth,wght";src:url(./NotoSans-VariableFont_wdth_wght-CE1q1VrM.ttf)}@font-face{font-family:NovaCut-Regular;src:url(./NovaCut-Regular-CT0JCcTB.ttf)}@font-face{font-family:Orbitron-Regular;src:url(./Orbitron-Regular-tiCwdeKa.ttf)}@font-face{font-family:Orbitron-VariableFont_wght;src:url(./Orbitron-VariableFont_wght-B7vC4a4m.ttf)}@font-face{font-family:PermanentMarker-Regular;src:url(./PermanentMarker-Regular-ClowKQab.ttf)}@font-face{font-family:PTSerif-Bold;src:url(./PTSerif-Bold-BPUuxP6Y.ttf)}@font-face{font-family:PTSerif-BoldItalic;src:url(./PTSerif-BoldItalic-BnTgqcEZ.ttf)}@font-face{font-family:PTSerif-Italic;src:url(./PTSerif-Italic-CchVwZ9c.ttf)}@font-face{font-family:PTSerif-Regular;src:url(./PTSerif-Regular-DPh-w9Z0.ttf)}@font-face{font-family:Rye-Regular;src:url(./Rye-Regular-BAwH82du.ttf)}@font-face{font-family:Sansita-Italic;src:url(./Sansita-Italic-BOD9p6yC.ttf)}@font-face{font-family:Sansita-Regular;src:url(./Sansita-Regular-Bt9NTbWc.ttf)}@font-face{font-family:Sixtyfour-Regular-VariableFont;src:url(./Sixtyfour-Regular-VariableFont-X6uf1FjI.ttf)}@font-face{font-family:Sixtyfour-Regular;src:url(./Sixtyfour-Regular-GF5tKbXz.ttf)}@font-face{font-family:Yellowtail-Regular;src:url(./Yellowtail-Regular-CUIy8YKq.ttf)}@media (min-width: 250px){.xxxs\:justify-center{justify-content:center}}@media (min-width: 460px){.sm\:ml-4{margin-left:1rem}.sm\:justify-between{justify-content:space-between}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-\[10px\]{font-size:10px}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media (min-width: 685px){.md\:ml-0{margin-left:0}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-5xl{font-size:3rem;line-height:1}}@media (min-width: 1024px){.lg\:min-w-\[335px\]{min-width:335px}.lg\:text-4xl{font-size:2.25rem;line-height:2.5rem}.lg\:text-6xl{font-size:3.75rem;line-height:1}.lg\:text-sm{font-size:.875rem;line-height:1.25rem}}.container{width:100%}.fixed{position:fixed}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.right-5{right:1.25rem}.m-0{margin:0}.m-4{margin:1rem}.m-8{margin:2rem}.flex{display:flex}.h-\[100vh\]{height:100vh}.w-\[282px\]{width:282px}.translate-y-14{--tw-translate-y: 3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-6{--tw-rotate: -6deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-\[57deg\]{--tw-rotate: 57deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.scroll-smooth{scroll-behavior:smooth}.whitespace-nowrap{white-space:nowrap}.border-2{border-width:2px}.border-b-2{border-bottom-width:2px}.border-t-2{border-top-width:2px}.border-\[\#2dd760\]{--tw-border-opacity: 1;border-color:rgb(45 215 96 / var(--tw-border-opacity))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity))}.border-orange-950{--tw-border-opacity: 1;border-color:rgb(67 20 7 / var(--tw-border-opacity))}.bg-\[\#eba937\]{--tw-bg-opacity: 1;background-color:rgb(235 169 55 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[8px\]{font-size:8px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.container{width:100%;max-width:100%;height:100vh;display:flex;justify-content:center;align-items:center;border-radius:10px;background-color:transparent;margin:0 auto;padding:10px}.topParagraphWrapper{text-align:center}@media screen and (max-width: 500px){.topParagraphWrapper{letter-spacing:3px;position:fixed;display:flex;text-align:center;left:50%;margin-top:40px;padding:2px;transform:translate(-50%);width:-moz-fit-content;width:fit-content;height:auto;text-shadow:white .5px .5px;font-weight:400;text-decoration:none;color:#00f}}.topParagraph{position:relative;color:#2dd760;text-shadow:#151515 .75px .75px;margin:auto}.cube{position:relative;width:150px;height:150px;transform-style:preserve-3d;transform:rotateX(-15deg);animation:animate 20s linear infinite;z-index:-1}.item{width:100px;height:100px}@keyframes animate{0%{transform:rotateX(-15deg) rotateY(360deg)}to{transform:rotateX(-15deg) rotateY(0)}}.outerCubeDiv{position:relative;justify-content:center;align-items:center}.cube div{position:absolute;top:0%;left:0%;min-width:100%;min-height:100%;transform-style:preserve-3d}.cube div span{position:absolute;top:0%;left:0%;min-width:100%;min-height:100%;background:linear-gradient(#151515,#2dd760);transform:rotateY(calc(90deg * var(--i))) translateZ(75px)}.top{display:flex;justify-content:center;align-items:center;top:0;left:0;min-width:100%;min-height:100%;background:#222;transform:rotateX(90deg) translateZ(75px)}.top:before{content:"";position:absolute;top:0;left:0;width:150px;height:150px;background:#2dd760;transform:translateZ(-220px);filter:blur(20px);box-shadow:0 0 120px #2dd760,0 0 200px #2dd760,0 0 300px #2dd760,0 0 400px #2dd760,0 0 500px #2dd760}.post{width:400px;font-family:creepster}.post-image{display:block;width:100%}.material-symbols-outlined{font-variation-settings:"FILL" 1,"wght" 400,"GRAD" 0,"opsz" 24}.post-ratings-container{display:flex;overflow:hidden;align-items:center;padding:12px 0;text-shadow:2px 2px 4px rgba(0,0,0,.5);margin:0 auto -1rem 2rem;width:100%}.post-rating{display:flex;align-items:center;cursor:default}.post-rating:not(:last-child){margin-right:12px}.post-rating-button{margin-right:6px;cursor:pointer;color:#87ceeb}.post-rating-selected>.post-rating-button,.post-rating-selected>.post-rating-count{color:#009578}.post-rating:not(.post-rating-selected)>.post-rating-button:hover{color:#ff4500}@media screen and (min-width: 300px){.container{max-width:300px}}@media screen and (min-width: 350px){.container{max-width:350px}}@media screen and (min-width: 400px){.container{max-width:400px}}@media screen and (min-width: 500px){.container{max-width:500px}}@media screen and (min-width: 900px) and (min-height: 450px){.top:before{content:"";position:absolute;top:0;left:0;width:300px;height:300px;background:#2dd760;transform:translateZ(-400px);filter:blur(40px);box-shadow:0 0 240px #2dd760,0 0 400px #2dd760,0 0 600px #2dd760,0 0 800px #2dd760,0 0 900px #2dd760}.cube{width:300px;height:300px;animation:animate 40s linear infinite}.top{display:flex;justify-content:center;align-items:center;top:0;left:0;min-width:100%;min-height:100%;background:#222;transform:rotateX(90deg) translateZ(150px)}.cube div span{position:absolute;top:0%;left:0%;min-width:100%;min-height:100%;background:linear-gradient(#151515,#2dd760);transform:rotateY(calc(90deg * var(--i))) translateZ(150px)}}.hover\:bg-sky-800:hover{--tw-bg-opacity: 1;background-color:rgb(7 89 133 / var(--tw-bg-opacity))}@media screen and (min-width: 640px){.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-\[10px\]{font-size:10px}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media screen and (min-width: 768px){.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}}@media screen and (min-width: 1024px){.lg\:text-4xl{font-size:2.25rem;line-height:2.5rem}.lg\:text-sm{font-size:.875rem;line-height:1.25rem}}@media screen and (min-width: 640px){.container{max-width:640px}}@media screen and (min-width: 768px){.container{max-width:768px}}@media screen and (min-width: 1024px){.container{max-width:1024px}}@media screen and (min-width: 1280px){.container{max-width:1280px}}@media screen and (min-width: 1536px){.container{max-width:1536px}}.timerStyles{font-family:Aclonica-Regular,Aclonica-Regular,Times,serif;color:#bfdbfe;font-weight:700;text-shadow:1px 1px 0 #000}.timerStylesSmall{font-family:Aclonica-Regular,Aclonica-Regular,Times,serif;color:#d3d3d3;text-shadow:1px 1px 0 #000;font-size:55%}#demo{padding:2px;text-shadow:#151515 .5px .5px;white-space:nowrap;letter-spacing:.15px;margin-right:1.5rem}.timerStylesFinished1,.timerStylesFinished2,.timerStylesFinished3{color:#f4a460;font-style:italic;font-size:2rem;font-weight:700;text-shadow:1px 1px 0 black;font-family:Trebuchet MS,Lucida Sans Unicode,Lucida Grande,Lucida Sans,Arial,sans-serif}.clockIcon{font-size:1.5rem;color:#bfdbfe;text-shadow:1px 1px 0 black;padding:2px;margin-right:.25rem}@media screen and (max-width: 500px){.demoWrapper{letter-spacing:3px;position:relative;display:flex;flex-direction:row;justify-content:center;width:100%;height:-moz-max-content;height:max-content;text-shadow:#151515 .5px .5px;font-weight:400;text-decoration:none}}.canvasWrapper{width:200px;height:200px;margin:-2rem auto;z-index:-1}canvas{position:relative;display:flex;justify-content:center}.speaker,.pauseButton{margin-inline:1rem}@media only screen and (max-width: 470px){.volumeUp,.volumeDown{display:none}}.dataToolTip82:hover:before,.dataToolTip82:hover:after{--scale: 1}.dataToolTip82:before{background:radial-gradient(#e2dede,#b17065);width:-moz-max-content;width:max-content;position:absolute;content:attr(data-tool-tip);padding:.1em .1em .2em;transform:translate(-50%) scale(var(--scale));transform-origin:right;transition:ease-in .25s;top:.59rem;right:3.1rem;border:1px solid salmon;border-radius:10px;color:#c31616;padding-left:2rem;padding-right:2rem;padding-top:3px;padding-bottom:3px;--scale: 0;z-index:51}.dataToolTip82:after{content:"";width:15px;height:15px;position:absolute;padding:.1em;transform:translate(-50%) scale(var(--scale));transform-origin:left;transition:.35s;top:.5rem;right:7.9rem;border:15px solid transparent;border-left:salmon 10px solid;border-radius:15px;--scale: 0;z-index:49}.dataToolTip81:hover:before,.dataToolTip81:hover:after{--scale: 1}.dataToolTip81:before{background:radial-gradient(#e2dede,#b17065);width:-moz-max-content;width:max-content;position:absolute;content:attr(data-tool-tip);padding:.1em .1em .2em;top:.59rem;left:17.3rem;transform:translate(-50%) scale(var(--scale));transform-origin:left;transition:ease-in .25s;border:1px solid salmon;border-radius:10px;color:#c31616;padding-left:2rem;padding-right:2rem;padding-top:3px;padding-bottom:3px;--scale: 0;z-index:50}.dataToolTip81:after{content:"";width:15px;height:15px;position:absolute;padding:.1em;transform:translate(-50%) scale(var(--scale));transform-origin:right;transition:.35s;top:.5rem;left:9.28rem;bottom:.8rem;border:15px solid transparent;border-right:salmon 10px solid;border-radius:15px;--scale: 0;z-index:49}.rewind{transform:scaleX(-1)}@media screen and (max-width:550px){.dataToolTip81:before,.dataToolTip81:after,.dataToolTip82:before,.dataToolTip82:after{display:none}} +*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,[type=button],[type=reset],[type=submit]{-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: }@media (min-width: 250px){.container{max-width:250px}}@media (min-width: 320px){.container{max-width:320px}}@media (min-width: 420px){.container{max-width:420px}}@media (min-width: 460px){.container{max-width:460px}}@media (min-width: 685px){.container{max-width:685px}}@media (min-width: 1024px){.container{max-width:1024px}}@media (min-width: 1280px){.container{max-width:1280px}}@media (min-width: 1536px){.container{max-width:1536px}}.relative{position:relative}.bottom-12{bottom:3rem}.left-0{left:0}.right-0{right:0}.top-0{top:0}.top-\[\.2rem\]{top:.2rem}.z-40{z-index:40}.z-\[5\]{z-index:5}.m-auto{margin:auto}.-mt-4{margin-top:-1rem}.ml-8{margin-left:2rem}.ml-\[1rem\]{margin-left:1rem}.mr-\[1rem\]{margin-right:1rem}.mt-\[3rem\]{margin-top:3rem}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-\[100px\]{height:100px}.h-\[50px\]{height:50px}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.w-screen{width:100vw}.min-w-\[225px\]{min-width:225px}.scale-x-\[-1\]{--tw-scale-x: -1;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.justify-start{justify-content:flex-start}.justify-between{justify-content:space-between}.px-8{padding-left:2rem;padding-right:2rem}.font-Kingthings_Petrock{font-family:Kingthings_Petrock,cursive}.font-Nosifer-Regular{font-family:Nosifer-Regular,cursive}.text-3xl{font-size:1.875rem;line-height:2.25rem}.text-\[\#87ceeb\]{--tw-text-opacity: 1;color:rgb(135 206 235 / var(--tw-text-opacity))}.text-\[\#abdbee\]{--tw-text-opacity: 1;color:rgb(171 219 238 / var(--tw-text-opacity))}.text-\[\#fcb54d\]{--tw-text-opacity: 1;color:rgb(252 181 77 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-orange-400{--tw-text-opacity: 1;color:rgb(251 146 60 / var(--tw-text-opacity))}.text-yellow-100{--tw-text-opacity: 1;color:rgb(254 249 195 / var(--tw-text-opacity))}:root{background-image:linear-gradient(#377cb1 15%,#414f5b 60%,#414f5b -80%,#979190)}body{top:0;left:0;right:0;bottom:0;width:screen;height:screen;position:fixed;background-image:linear-gradient(#377cb2 15%,#414f5b 60%,#414f5b -80%,#979190)}@font-face{font-family:DM_Serif_Display;src:url(./DMSerifDisplay-Regular-BB3xDZ4A.ttf)}@font-face{font-family:Archivo_Black;src:url(./ArchivoBlack-Regular-CrNC9wvr.ttf)}@font-face{font-family:Aclonica-Regular;src:url(./Aclonica-Regular-BGQGNgmo.ttf)}@font-face{font-family:ArchivoBlack-Regular;src:url(./ArchivoBlack-Regular-CrNC9wvr.ttf)}@font-face{font-family:Blackbeard-ld7V;src:url(./Blackbeard-ld7V-Dg8k87KE.ttf)}@font-face{font-family:BlackOpsOne-Regular;src:url(./BlackOpsOne-Regular-NJiuZT8Q.ttf)}@font-face{font-family:Borel-Regular;src:url(./Borel-Regular-6nnjaT-3.ttf)}@font-face{font-family:Caprasimo-Regular;src:url(./Caprasimo-Regular-BXxQ1plz.ttf)}@font-face{font-family:Changa-Regular;src:url(./Changa-Regular-D_6aZcbj.ttf)}@font-face{font-family:Changa-VariableFont_wght;src:url(./Changa-VariableFont_wght-e5Q_zvFM.ttf)}@font-face{font-family:ChunkFive-Regular;src:url(./ChunkFive-Regular-DbsgiVYs.otf)}@font-face{font-family:Creepster-Regular;src:url(./Creepster-Regular-mOh_PY0X.ttf)}@font-face{font-family:DMSerifDisplay-Italic;src:url(./DMSerifDisplay-Italic-D1fnzAS9.ttf)}@font-face{font-family:DM_Serif_Display;src:url(./DMSerifDisplay-Regular-BB3xDZ4A.ttf)}@font-face{font-family:EmilysCandy-Regular;src:url(./EmilysCandy-Regular-lJM2SeFT.ttf)}@font-face{font-family:Iceberg-Regular;src:url(./Iceberg-Regular-gG15dCtb.ttf)}@font-face{font-family:HoltwoodOneSC-Regular;src:url(./HoltwoodOneSC-Regular-BqrWHXPW.ttf)}@font-face{font-family:Itim-Regular;src:url(./Itim-Regular-C81TTF-z.ttf)}@font-face{font-family:Kranky-Regular;src:url(./Kranky-Regular-C5SlX586.ttf)}@font-face{font-family:LibreBaskerville-Bold;src:url(./LibreBaskerville-Bold-De2z11Hm.ttf)}@font-face{font-family:LibreBaskerville-Italic;src:url(./LibreBaskerville-Italic-ayaR8-zC.ttf)}@font-face{font-family:Kingthings_Petrock;src:url(./Kingthings_Petrock-CmQ7tZPw.ttf)}@font-face{font-family:LibreBaskerville-Regular;src:url(./LibreBaskerville-Regular-BQmEVCCQ.ttf)}@font-face{font-family:MedievalSharp-Regular;src:url(./MedievalSharp-Regular-BN2kGNB9.ttf)}@font-face{font-family:MetalMania-Regular;src:url(./MetalMania-Regular-BQ9h36zR.ttf)}@font-face{font-family:Metamorphous-Regular;src:url(./Metamorphous-Regular-DuZn8MeX.ttf)}@font-face{font-family:Nosifer-Regular;src:url(./Nosifer-Regular-CXzrgB0K.ttf)}@font-face{font-family:"NotoSans-Italic-VariableFont_wdth,wght";src:url(./NotoSans-Italic-VariableFont_wdth_wght-DO_x-GzF.ttf)}@font-face{font-family:"NotoSans-VariableFont_wdth,wght";src:url(./NotoSans-VariableFont_wdth_wght-CE1q1VrM.ttf)}@font-face{font-family:NovaCut-Regular;src:url(./NovaCut-Regular-CT0JCcTB.ttf)}@font-face{font-family:Orbitron-Regular;src:url(./Orbitron-Regular-tiCwdeKa.ttf)}@font-face{font-family:Orbitron-VariableFont_wght;src:url(./Orbitron-VariableFont_wght-B7vC4a4m.ttf)}@font-face{font-family:PermanentMarker-Regular;src:url(./PermanentMarker-Regular-ClowKQab.ttf)}@font-face{font-family:PTSerif-Bold;src:url(./PTSerif-Bold-BPUuxP6Y.ttf)}@font-face{font-family:PTSerif-BoldItalic;src:url(./PTSerif-BoldItalic-BnTgqcEZ.ttf)}@font-face{font-family:PTSerif-Italic;src:url(./PTSerif-Italic-CchVwZ9c.ttf)}@font-face{font-family:PTSerif-Regular;src:url(./PTSerif-Regular-DPh-w9Z0.ttf)}@font-face{font-family:Rye-Regular;src:url(./Rye-Regular-BAwH82du.ttf)}@font-face{font-family:Sansita-Italic;src:url(./Sansita-Italic-BOD9p6yC.ttf)}@font-face{font-family:Sansita-Regular;src:url(./Sansita-Regular-Bt9NTbWc.ttf)}@font-face{font-family:Sixtyfour-Regular-VariableFont;src:url(./Sixtyfour-Regular-VariableFont-X6uf1FjI.ttf)}@font-face{font-family:Sixtyfour-Regular;src:url(./Sixtyfour-Regular-GF5tKbXz.ttf)}@font-face{font-family:Yellowtail-Regular;src:url(./Yellowtail-Regular-CUIy8YKq.ttf)}@media (min-width: 250px){.xxxs\:justify-center{justify-content:center}}@media (min-width: 460px){.sm\:ml-4{margin-left:1rem}.sm\:justify-between{justify-content:space-between}.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:text-4xl{font-size:2.25rem;line-height:2.5rem}.sm\:text-\[10px\]{font-size:10px}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media (min-width: 685px){.md\:ml-0{margin-left:0}.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-5xl{font-size:3rem;line-height:1}}@media (min-width: 1024px){.lg\:min-w-\[335px\]{min-width:335px}.lg\:text-4xl{font-size:2.25rem;line-height:2.5rem}.lg\:text-6xl{font-size:3.75rem;line-height:1}.lg\:text-sm{font-size:.875rem;line-height:1.25rem}}.container{width:100%}.fixed{position:fixed}.bottom-0{bottom:0}.bottom-2{bottom:.5rem}.right-5{right:1.25rem}.m-0{margin:0}.m-4{margin:1rem}.m-8{margin:2rem}.flex{display:flex}.h-\[100vh\]{height:100vh}.w-\[282px\]{width:282px}.translate-y-14{--tw-translate-y: 3.5rem;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.-rotate-6{--tw-rotate: -6deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.rotate-\[57deg\]{--tw-rotate: 57deg;transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.transform{transform:translate(var(--tw-translate-x),var(--tw-translate-y)) rotate(var(--tw-rotate)) skew(var(--tw-skew-x)) skewY(var(--tw-skew-y)) scaleX(var(--tw-scale-x)) scaleY(var(--tw-scale-y))}.items-center{align-items:center}.justify-center{justify-content:center}.scroll-smooth{scroll-behavior:smooth}.whitespace-nowrap{white-space:nowrap}.border-2{border-width:2px}.border-b-2{border-bottom-width:2px}.border-t-2{border-top-width:2px}.border-\[\#2dd760\]{--tw-border-opacity: 1;border-color:rgb(45 215 96 / var(--tw-border-opacity))}.border-orange-500{--tw-border-opacity: 1;border-color:rgb(249 115 22 / var(--tw-border-opacity))}.border-orange-950{--tw-border-opacity: 1;border-color:rgb(67 20 7 / var(--tw-border-opacity))}.bg-\[\#eba937\]{--tw-bg-opacity: 1;background-color:rgb(235 169 55 / var(--tw-bg-opacity))}.bg-blue-700{--tw-bg-opacity: 1;background-color:rgb(29 78 216 / var(--tw-bg-opacity))}.bg-red-700{--tw-bg-opacity: 1;background-color:rgb(185 28 28 / var(--tw-bg-opacity))}.px-4{padding-left:1rem;padding-right:1rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.text-2xl{font-size:1.5rem;line-height:2rem}.text-\[8px\]{font-size:8px}.text-lg{font-size:1.125rem;line-height:1.75rem}.text-green-400{--tw-text-opacity: 1;color:rgb(74 222 128 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.container{width:100%;max-width:100%;height:100vh;display:flex;justify-content:center;align-items:center;border-radius:10px;background-color:transparent;margin:0 auto;padding:10px}.topParagraphWrapper{text-align:center}@media screen and (max-width: 500px){.topParagraphWrapper{letter-spacing:3px;position:fixed;display:flex;text-align:center;left:50%;margin-top:40px;padding:2px;transform:translate(-50%);width:-moz-fit-content;width:fit-content;height:auto;text-shadow:white .5px .5px;font-weight:400;text-decoration:none;color:#00f}}.topParagraph{position:relative;color:#2dd760;text-shadow:#151515 .75px .75px;margin:auto}.cube{position:relative;width:150px;height:150px;transform-style:preserve-3d;transform:rotateX(-15deg);animation:animate 20s linear infinite;z-index:-1}.item{width:100px;height:100px}@keyframes animate{0%{transform:rotateX(-15deg) rotateY(360deg)}to{transform:rotateX(-15deg) rotateY(0)}}.outerCubeDiv{position:relative;justify-content:center;align-items:center}.cube div{position:absolute;top:0%;left:0%;min-width:100%;min-height:100%;transform-style:preserve-3d}.cube div span{position:absolute;top:0%;left:0%;min-width:100%;min-height:100%;background:linear-gradient(#151515,#2dd760);transform:rotateY(calc(90deg * var(--i))) translateZ(75px)}.top{display:flex;justify-content:center;align-items:center;top:0;left:0;min-width:100%;min-height:100%;background:#222;transform:rotateX(90deg) translateZ(75px)}.top:before{content:"";position:absolute;top:0;left:0;width:150px;height:150px;background:#2dd760;transform:translateZ(-220px);filter:blur(20px);box-shadow:0 0 120px #2dd760,0 0 200px #2dd760,0 0 300px #2dd760,0 0 400px #2dd760,0 0 500px #2dd760}.post{width:400px;font-family:creepster}.post-image{display:block;width:100%}.material-symbols-outlined{font-variation-settings:"FILL" 1,"wght" 400,"GRAD" 0,"opsz" 24}.post-ratings-container{display:flex;overflow:hidden;align-items:center;padding:12px 0;text-shadow:2px 2px 4px rgba(0,0,0,.5);margin:0 auto -1rem 2rem;width:100%}.post-rating{display:flex;align-items:center;cursor:default}.post-rating:not(:last-child){margin-right:12px}.post-rating-button{margin-right:6px;cursor:pointer;color:#87ceeb}.post-rating-selected>.post-rating-button,.post-rating-selected>.post-rating-count{color:#009578}.post-rating:not(.post-rating-selected)>.post-rating-button:hover{color:#ff4500}@media screen and (min-width: 300px){.container{max-width:300px}}@media screen and (min-width: 350px){.container{max-width:350px}}@media screen and (min-width: 400px){.container{max-width:400px}}@media screen and (min-width: 500px){.container{max-width:500px}}@media screen and (min-width: 900px) and (min-height: 450px){.top:before{content:"";position:absolute;top:0;left:0;width:300px;height:300px;background:#2dd760;transform:translateZ(-400px);filter:blur(40px);box-shadow:0 0 240px #2dd760,0 0 400px #2dd760,0 0 600px #2dd760,0 0 800px #2dd760,0 0 900px #2dd760}.cube{width:300px;height:300px;animation:animate 40s linear infinite}.top{display:flex;justify-content:center;align-items:center;top:0;left:0;min-width:100%;min-height:100%;background:#222;transform:rotateX(90deg) translateZ(150px)}.cube div span{position:absolute;top:0%;left:0%;min-width:100%;min-height:100%;background:linear-gradient(#151515,#2dd760);transform:rotateY(calc(90deg * var(--i))) translateZ(150px)}}.hover\:bg-sky-800:hover{--tw-bg-opacity: 1;background-color:rgb(7 89 133 / var(--tw-bg-opacity))}@media screen and (min-width: 640px){.sm\:px-8{padding-left:2rem;padding-right:2rem}.sm\:text-3xl{font-size:1.875rem;line-height:2.25rem}.sm\:text-\[10px\]{font-size:10px}.sm\:text-lg{font-size:1.125rem;line-height:1.75rem}}@media screen and (min-width: 768px){.md\:text-2xl{font-size:1.5rem;line-height:2rem}.md\:text-4xl{font-size:2.25rem;line-height:2.5rem}}@media screen and (min-width: 1024px){.lg\:text-4xl{font-size:2.25rem;line-height:2.5rem}.lg\:text-sm{font-size:.875rem;line-height:1.25rem}}@media screen and (min-width: 640px){.container{max-width:640px}}@media screen and (min-width: 768px){.container{max-width:768px}}@media screen and (min-width: 1024px){.container{max-width:1024px}}@media screen and (min-width: 1280px){.container{max-width:1280px}}@media screen and (min-width: 1536px){.container{max-width:1536px}}.timerStyles{font-family:Aclonica-Regular,Aclonica-Regular,Times,serif;color:#bfdbfe;font-weight:700;text-shadow:1px 1px 0 #000}.timerStylesSmall{font-family:Aclonica-Regular,Aclonica-Regular,Times,serif;color:#d3d3d3;text-shadow:1px 1px 0 #000;font-size:55%}#demo{padding:2px;text-shadow:#151515 .5px .5px;white-space:nowrap;letter-spacing:.15px;margin-right:1.5rem}.timerStylesFinished1,.timerStylesFinished2,.timerStylesFinished3{color:#f4a460;font-style:italic;font-size:2rem;font-weight:700;text-shadow:1px 1px 0 black;font-family:Trebuchet MS,Lucida Sans Unicode,Lucida Grande,Lucida Sans,Arial,sans-serif}.clockIcon{font-size:1.5rem;color:#bfdbfe;text-shadow:1px 1px 0 black;padding:2px;margin-right:.25rem}@media screen and (max-width: 500px){.demoWrapper{letter-spacing:3px;position:relative;display:flex;flex-direction:row;justify-content:center;width:100%;height:-moz-max-content;height:max-content;text-shadow:#151515 .5px .5px;font-weight:400;text-decoration:none}}.speaker,.pauseButton{margin-inline:1rem}@media only screen and (max-width: 470px){.volumeUp,.volumeDown{display:none}}.dataToolTip82:hover:before,.dataToolTip82:hover:after{--scale: 1}.dataToolTip82:before{background:radial-gradient(#e2dede,#b17065);width:-moz-max-content;width:max-content;position:absolute;content:attr(data-tool-tip);padding:.1em .1em .2em;transform:translate(-50%) scale(var(--scale));transform-origin:right;transition:ease-in .25s;top:.59rem;right:3.1rem;border:1px solid salmon;border-radius:10px;color:#c31616;padding-left:2rem;padding-right:2rem;padding-top:3px;padding-bottom:3px;--scale: 0;z-index:51}.dataToolTip82:after{content:"";width:15px;height:15px;position:absolute;padding:.1em;transform:translate(-50%) scale(var(--scale));transform-origin:left;transition:.35s;top:.5rem;right:7.9rem;border:15px solid transparent;border-left:salmon 10px solid;border-radius:15px;--scale: 0;z-index:49}.dataToolTip81:hover:before,.dataToolTip81:hover:after{--scale: 1}.dataToolTip81:before{background:radial-gradient(#e2dede,#b17065);width:-moz-max-content;width:max-content;position:absolute;content:attr(data-tool-tip);padding:.1em .1em .2em;top:.59rem;left:17.3rem;transform:translate(-50%) scale(var(--scale));transform-origin:left;transition:ease-in .25s;border:1px solid salmon;border-radius:10px;color:#c31616;padding-left:2rem;padding-right:2rem;padding-top:3px;padding-bottom:3px;--scale: 0;z-index:50}.dataToolTip81:after{content:"";width:15px;height:15px;position:absolute;padding:.1em;transform:translate(-50%) scale(var(--scale));transform-origin:right;transition:.35s;top:.5rem;left:9.28rem;bottom:.8rem;border:15px solid transparent;border-right:salmon 10px solid;border-radius:15px;--scale: 0;z-index:49}.rewind{transform:scaleX(-1)}@media screen and (max-width:550px){.dataToolTip81:before,.dataToolTip81:after,.dataToolTip82:before,.dataToolTip82:after{display:none}} diff --git a/assets/index-BP0nPbCT.js b/assets/index-BP0nPbCT.js deleted file mode 100644 index e743dc2..0000000 --- a/assets/index-BP0nPbCT.js +++ /dev/null @@ -1,3934 +0,0 @@ -(function(){const e=document.createElement("link").relList;if(e&&e.supports&&e.supports("modulepreload"))return;for(const r of document.querySelectorAll('link[rel="modulepreload"]'))i(r);new MutationObserver(r=>{for(const s of r)if(s.type==="childList")for(const o of s.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&i(o)}).observe(document,{childList:!0,subtree:!0});function t(r){const s={};return r.integrity&&(s.integrity=r.integrity),r.referrerPolicy&&(s.referrerPolicy=r.referrerPolicy),r.crossOrigin==="use-credentials"?s.credentials="include":r.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}function i(r){if(r.ep)return;r.ep=!0;const s=t(r);fetch(r.href,s)}})();function v_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}var tw={exports:{}},Mm={},nw={exports:{}},bt={};/** - * @license React - * react.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var pf=Symbol.for("react.element"),B2=Symbol.for("react.portal"),P2=Symbol.for("react.fragment"),I2=Symbol.for("react.strict_mode"),L2=Symbol.for("react.profiler"),D2=Symbol.for("react.provider"),N2=Symbol.for("react.context"),F2=Symbol.for("react.forward_ref"),U2=Symbol.for("react.suspense"),O2=Symbol.for("react.memo"),k2=Symbol.for("react.lazy"),OS=Symbol.iterator;function z2(n){return n===null||typeof n!="object"?null:(n=OS&&n[OS]||n["@@iterator"],typeof n=="function"?n:null)}var iw={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},rw=Object.assign,sw={};function pc(n,e,t){this.props=n,this.context=e,this.refs=sw,this.updater=t||iw}pc.prototype.isReactComponent={};pc.prototype.setState=function(n,e){if(typeof n!="object"&&typeof n!="function"&&n!=null)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,n,e,"setState")};pc.prototype.forceUpdate=function(n){this.updater.enqueueForceUpdate(this,n,"forceUpdate")};function ow(){}ow.prototype=pc.prototype;function y_(n,e,t){this.props=n,this.context=e,this.refs=sw,this.updater=t||iw}var __=y_.prototype=new ow;__.constructor=y_;rw(__,pc.prototype);__.isPureReactComponent=!0;var kS=Array.isArray,aw=Object.prototype.hasOwnProperty,x_={current:null},lw={key:!0,ref:!0,__self:!0,__source:!0};function cw(n,e,t){var i,r={},s=null,o=null;if(e!=null)for(i in e.ref!==void 0&&(o=e.ref),e.key!==void 0&&(s=""+e.key),e)aw.call(e,i)&&!lw.hasOwnProperty(i)&&(r[i]=e[i]);var a=arguments.length-2;if(a===1)r.children=t;else if(1>>1,ye=L[q];if(0>>1;qr(pe,G))Eer(Ae,pe)?(L[q]=Ae,L[Ee]=G,q=Ee):(L[q]=pe,L[ie]=G,q=ie);else if(Eer(Ae,G))L[q]=Ae,L[Ee]=G,q=Ee;else break e}}return V}function r(L,V){var G=L.sortIndex-V.sortIndex;return G!==0?G:L.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var u=[],f=[],h=1,d=null,p=3,v=!1,y=!1,M=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(L){for(var V=t(f);V!==null;){if(V.callback===null)i(f);else if(V.startTime<=L)i(f),V.sortIndex=V.expirationTime,e(u,V);else break;V=t(f)}}function w(L){if(M=!1,S(L),!y)if(t(u)!==null)y=!0,Z(P);else{var V=t(f);V!==null&&ve(w,V.startTime-L)}}function P(L,V){y=!1,M&&(M=!1,g(D),D=-1),v=!0;var G=p;try{for(S(V),d=t(u);d!==null&&(!(d.expirationTime>V)||L&&!b());){var q=d.callback;if(typeof q=="function"){d.callback=null,p=d.priorityLevel;var ye=q(d.expirationTime<=V);V=n.unstable_now(),typeof ye=="function"?d.callback=ye:d===t(u)&&i(u),S(V)}else i(u);d=t(u)}if(d!==null)var Ne=!0;else{var ie=t(f);ie!==null&&ve(w,ie.startTime-V),Ne=!1}return Ne}finally{d=null,p=G,v=!1}}var R=!1,B=null,D=-1,z=5,C=-1;function b(){return!(n.unstable_now()-CL||125q?(L.sortIndex=G,e(f,L),t(u)===null&&L===t(f)&&(M?(g(D),D=-1):M=!0,ve(w,G-q))):(L.sortIndex=ye,e(u,L),y||v||(y=!0,Z(P))),L},n.unstable_shouldYield=b,n.unstable_wrapCallback=function(L){var V=p;return function(){var G=p;p=V;try{return L.apply(this,arguments)}finally{p=G}}}})(dw);hw.exports=dw;var Z2=hw.exports;/** - * @license React - * react-dom.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var pw=Xe,Gi=Z2;function Me(n){for(var e="https://reactjs.org/docs/error-decoder.html?invariant="+n,t=1;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),iy=Object.prototype.hasOwnProperty,q2=/^[: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]*$/,HS={},GS={};function $2(n){return iy.call(GS,n)?!0:iy.call(HS,n)?!1:q2.test(n)?GS[n]=!0:(HS[n]=!0,!1)}function eB(n,e,t,i){if(t!==null&&t.type===0)return!1;switch(typeof e){case"function":case"symbol":return!0;case"boolean":return i?!1:t!==null?!t.acceptsBooleans:(n=n.toLowerCase().slice(0,5),n!=="data-"&&n!=="aria-");default:return!1}}function tB(n,e,t,i){if(e===null||typeof e>"u"||eB(n,e,t,i))return!0;if(i)return!1;if(t!==null)switch(t.type){case 3:return!e;case 4:return e===!1;case 5:return isNaN(e);case 6:return isNaN(e)||1>e}return!1}function vi(n,e,t,i,r,s,o){this.acceptsBooleans=e===2||e===3||e===4,this.attributeName=i,this.attributeNamespace=r,this.mustUseProperty=t,this.propertyName=n,this.type=e,this.sanitizeURL=s,this.removeEmptyString=o}var Wn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){Wn[n]=new vi(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];Wn[e]=new vi(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){Wn[n]=new vi(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){Wn[n]=new vi(n,2,!1,n,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(n){Wn[n]=new vi(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){Wn[n]=new vi(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){Wn[n]=new vi(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){Wn[n]=new vi(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){Wn[n]=new vi(n,5,!1,n.toLowerCase(),null,!1,!1)});var S_=/[\-:]([a-z])/g;function M_(n){return n[1].toUpperCase()}"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(n){var e=n.replace(S_,M_);Wn[e]=new vi(e,1,!1,n,null,!1,!1)});"xlink:actuate xlink:arcrole xlink:role xlink:show xlink:title xlink:type".split(" ").forEach(function(n){var e=n.replace(S_,M_);Wn[e]=new vi(e,1,!1,n,"http://www.w3.org/1999/xlink",!1,!1)});["xml:base","xml:lang","xml:space"].forEach(function(n){var e=n.replace(S_,M_);Wn[e]=new vi(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){Wn[n]=new vi(n,1,!1,n.toLowerCase(),null,!1,!1)});Wn.xlinkHref=new vi("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){Wn[n]=new vi(n,1,!1,n.toLowerCase(),null,!0,!0)});function E_(n,e,t,i){var r=Wn.hasOwnProperty(e)?Wn[e]:null;(r!==null?r.type!==0:i||!(2a||r[o]!==s[a]){var u=` -`+r[o].replace(" at new "," at ");return n.displayName&&u.includes("")&&(u=u.replace("",n.displayName)),u}while(1<=o&&0<=a);break}}}finally{R0=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?hu(n):""}function nB(n){switch(n.tag){case 5:return hu(n.type);case 16:return hu("Lazy");case 13:return hu("Suspense");case 19:return hu("SuspenseList");case 0:case 2:case 15:return n=b0(n.type,!1),n;case 11:return n=b0(n.type.render,!1),n;case 1:return n=b0(n.type,!0),n;default:return""}}function ay(n){if(n==null)return null;if(typeof n=="function")return n.displayName||n.name||null;if(typeof n=="string")return n;switch(n){case bl:return"Fragment";case Rl:return"Portal";case ry:return"Profiler";case w_:return"StrictMode";case sy:return"Suspense";case oy:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case vw:return(n.displayName||"Context")+".Consumer";case gw:return(n._context.displayName||"Context")+".Provider";case C_:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case T_:return e=n.displayName||null,e!==null?e:ay(n.type)||"Memo";case io:e=n._payload,n=n._init;try{return ay(n(e))}catch{}}return null}function iB(n){var e=n.type;switch(n.tag){case 24:return"Cache";case 9:return(e.displayName||"Context")+".Consumer";case 10:return(e._context.displayName||"Context")+".Provider";case 18:return"DehydratedFragment";case 11:return n=e.render,n=n.displayName||n.name||"",e.displayName||(n!==""?"ForwardRef("+n+")":"ForwardRef");case 7:return"Fragment";case 5:return e;case 4:return"Portal";case 3:return"Root";case 6:return"Text";case 16:return ay(e);case 8:return e===w_?"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(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e}return null}function Ao(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function _w(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function rB(n){var e=_w(n)?"checked":"value",t=Object.getOwnPropertyDescriptor(n.constructor.prototype,e),i=""+n[e];if(!n.hasOwnProperty(e)&&typeof t<"u"&&typeof t.get=="function"&&typeof t.set=="function"){var r=t.get,s=t.set;return Object.defineProperty(n,e,{configurable:!0,get:function(){return r.call(this)},set:function(o){i=""+o,s.call(this,o)}}),Object.defineProperty(n,e,{enumerable:t.enumerable}),{getValue:function(){return i},setValue:function(o){i=""+o},stopTracking:function(){n._valueTracker=null,delete n[e]}}}}function Fh(n){n._valueTracker||(n._valueTracker=rB(n))}function xw(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=_w(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function cp(n){if(n=n||(typeof document<"u"?document:void 0),typeof n>"u")return null;try{return n.activeElement||n.body}catch{return n.body}}function ly(n,e){var t=e.checked;return cn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function WS(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=Ao(e.value!=null?e.value:t),n._wrapperState={initialChecked:i,initialValue:t,controlled:e.type==="checkbox"||e.type==="radio"?e.checked!=null:e.value!=null}}function Aw(n,e){e=e.checked,e!=null&&E_(n,"checked",e,!1)}function cy(n,e){Aw(n,e);var t=Ao(e.value),i=e.type;if(t!=null)i==="number"?(t===0&&n.value===""||n.value!=t)&&(n.value=""+t):n.value!==""+t&&(n.value=""+t);else if(i==="submit"||i==="reset"){n.removeAttribute("value");return}e.hasOwnProperty("value")?uy(n,e.type,t):e.hasOwnProperty("defaultValue")&&uy(n,e.type,Ao(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function XS(n,e,t){if(e.hasOwnProperty("value")||e.hasOwnProperty("defaultValue")){var i=e.type;if(!(i!=="submit"&&i!=="reset"||e.value!==void 0&&e.value!==null))return;e=""+n._wrapperState.initialValue,t||e===n.value||(n.value=e),n.defaultValue=e}t=n.name,t!==""&&(n.name=""),n.defaultChecked=!!n._wrapperState.initialChecked,t!==""&&(n.name=t)}function uy(n,e,t){(e!=="number"||cp(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var du=Array.isArray;function Wl(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Uh.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function Uu(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var yu={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},sB=["Webkit","ms","Moz","O"];Object.keys(yu).forEach(function(n){sB.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),yu[e]=yu[n]})});function ww(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||yu.hasOwnProperty(n)&&yu[n]?(""+e).trim():e+"px"}function Cw(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=ww(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var oB=cn({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 dy(n,e){if(e){if(oB[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(Me(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(Me(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(Me(61))}if(e.style!=null&&typeof e.style!="object")throw Error(Me(62))}}function py(n,e){if(n.indexOf("-")===-1)return typeof e.is=="string";switch(n){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 my=null;function R_(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var gy=null,Xl=null,Jl=null;function KS(n){if(n=vf(n)){if(typeof gy!="function")throw Error(Me(280));var e=n.stateNode;e&&(e=Rm(e),gy(n.stateNode,n.type,e))}}function Tw(n){Xl?Jl?Jl.push(n):Jl=[n]:Xl=n}function Rw(){if(Xl){var n=Xl,e=Jl;if(Jl=Xl=null,KS(n),e)for(n=0;n>>=0,n===0?32:31-(vB(n)/yB|0)|0}var Oh=64,kh=4194304;function pu(n){switch(n&-n){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 n&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return n&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return n}}function dp(n,e){var t=n.pendingLanes;if(t===0)return 0;var i=0,r=n.suspendedLanes,s=n.pingedLanes,o=t&268435455;if(o!==0){var a=o&~r;a!==0?i=pu(a):(s&=o,s!==0&&(i=pu(s)))}else o=t&~r,o!==0?i=pu(o):s!==0&&(i=pu(s));if(i===0)return 0;if(e!==0&&e!==i&&!(e&r)&&(r=i&-i,s=e&-e,r>=s||r===16&&(s&4194240)!==0))return e;if(i&4&&(i|=t&16),e=n.entangledLanes,e!==0)for(n=n.entanglements,e&=i;0t;t++)e.push(n);return e}function mf(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-wr(e),n[e]=t}function SB(n,e){var t=n.pendingLanes&~e;n.pendingLanes=e,n.suspendedLanes=0,n.pingedLanes=0,n.expiredLanes&=e,n.mutableReadLanes&=e,n.entangledLanes&=e,e=n.entanglements;var i=n.eventTimes;for(n=n.expirationTimes;0=xu),i1=" ",r1=!1;function Kw(n,e){switch(n){case"keyup":return QB.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Yw(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Bl=!1;function qB(n,e){switch(n){case"compositionend":return Yw(e);case"keypress":return e.which!==32?null:(r1=!0,i1);case"textInput":return n=e.data,n===i1&&r1?null:n;default:return null}}function $B(n,e){if(Bl)return n==="compositionend"||!F_&&Kw(n,e)?(n=Jw(),Qd=L_=lo=null,Bl=!1,n):null;switch(n){case"paste":return null;case"keypress":if(!(e.ctrlKey||e.altKey||e.metaKey)||e.ctrlKey&&e.altKey){if(e.char&&1=e)return{node:t,offset:e-n};n=i}e:{for(;t;){if(t.nextSibling){t=t.nextSibling;break e}t=t.parentNode}t=void 0}t=l1(t)}}function $w(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?$w(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function eC(){for(var n=window,e=cp();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=cp(n.document)}return e}function U_(n){var e=n&&n.nodeName&&n.nodeName.toLowerCase();return e&&(e==="input"&&(n.type==="text"||n.type==="search"||n.type==="tel"||n.type==="url"||n.type==="password")||e==="textarea"||n.contentEditable==="true")}function lP(n){var e=eC(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&$w(t.ownerDocument.documentElement,t)){if(i!==null&&U_(t)){if(e=i.start,n=i.end,n===void 0&&(n=e),"selectionStart"in t)t.selectionStart=e,t.selectionEnd=Math.min(n,t.value.length);else if(n=(e=t.ownerDocument||document)&&e.defaultView||window,n.getSelection){n=n.getSelection();var r=t.textContent.length,s=Math.min(i.start,r);i=i.end===void 0?s:Math.min(i.end,r),!n.extend&&s>i&&(r=i,i=s,s=r),r=c1(t,s);var o=c1(t,i);r&&o&&(n.rangeCount!==1||n.anchorNode!==r.node||n.anchorOffset!==r.offset||n.focusNode!==o.node||n.focusOffset!==o.offset)&&(e=e.createRange(),e.setStart(r.node,r.offset),n.removeAllRanges(),s>i?(n.addRange(e),n.extend(o.node,o.offset)):(e.setEnd(o.node,o.offset),n.addRange(e)))}}for(e=[],n=t;n=n.parentNode;)n.nodeType===1&&e.push({element:n,left:n.scrollLeft,top:n.scrollTop});for(typeof t.focus=="function"&&t.focus(),t=0;t=document.documentMode,Pl=null,Sy=null,Su=null,My=!1;function u1(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;My||Pl==null||Pl!==cp(i)||(i=Pl,"selectionStart"in i&&U_(i)?i={start:i.selectionStart,end:i.selectionEnd}:(i=(i.ownerDocument&&i.ownerDocument.defaultView||window).getSelection(),i={anchorNode:i.anchorNode,anchorOffset:i.anchorOffset,focusNode:i.focusNode,focusOffset:i.focusOffset}),Su&&Vu(Su,i)||(Su=i,i=gp(Sy,"onSelect"),0Dl||(n.current=by[Dl],by[Dl]=null,Dl--)}function Yt(n,e){Dl++,by[Dl]=n.current,n.current=e}var So={},ii=To(So),Ci=To(!1),Ea=So;function ec(n,e){var t=n.type.contextTypes;if(!t)return So;var i=n.stateNode;if(i&&i.__reactInternalMemoizedUnmaskedChildContext===e)return i.__reactInternalMemoizedMaskedChildContext;var r={},s;for(s in t)r[s]=e[s];return i&&(n=n.stateNode,n.__reactInternalMemoizedUnmaskedChildContext=e,n.__reactInternalMemoizedMaskedChildContext=r),r}function Ti(n){return n=n.childContextTypes,n!=null}function yp(){Zt(Ci),Zt(ii)}function v1(n,e,t){if(ii.current!==So)throw Error(Me(168));Yt(ii,e),Yt(Ci,t)}function cC(n,e,t){var i=n.stateNode;if(e=e.childContextTypes,typeof i.getChildContext!="function")return t;i=i.getChildContext();for(var r in i)if(!(r in e))throw Error(Me(108,iB(n)||"Unknown",r));return cn({},t,i)}function _p(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||So,Ea=ii.current,Yt(ii,n),Yt(Ci,Ci.current),!0}function y1(n,e,t){var i=n.stateNode;if(!i)throw Error(Me(169));t?(n=cC(n,e,Ea),i.__reactInternalMemoizedMergedChildContext=n,Zt(Ci),Zt(ii),Yt(ii,n)):Zt(Ci),Yt(Ci,t)}var ms=null,bm=!1,V0=!1;function uC(n){ms===null?ms=[n]:ms.push(n)}function xP(n){bm=!0,uC(n)}function Ro(){if(!V0&&ms!==null){V0=!0;var n=0,e=Wt;try{var t=ms;for(Wt=1;n>=o,r-=o,_s=1<<32-wr(e)+r|t<D?(z=B,B=null):z=B.sibling;var C=p(g,B,S[D],w);if(C===null){B===null&&(B=z);break}n&&B&&C.alternate===null&&e(g,B),A=s(C,A,D),R===null?P=C:R.sibling=C,R=C,B=z}if(D===S.length)return t(g,B),tn&&ea(g,D),P;if(B===null){for(;DD?(z=B,B=null):z=B.sibling;var b=p(g,B,C.value,w);if(b===null){B===null&&(B=z);break}n&&B&&b.alternate===null&&e(g,B),A=s(b,A,D),R===null?P=b:R.sibling=b,R=b,B=z}if(C.done)return t(g,B),tn&&ea(g,D),P;if(B===null){for(;!C.done;D++,C=S.next())C=d(g,C.value,w),C!==null&&(A=s(C,A,D),R===null?P=C:R.sibling=C,R=C);return tn&&ea(g,D),P}for(B=i(g,B);!C.done;D++,C=S.next())C=v(B,g,D,C.value,w),C!==null&&(n&&C.alternate!==null&&B.delete(C.key===null?D:C.key),A=s(C,A,D),R===null?P=C:R.sibling=C,R=C);return n&&B.forEach(function(J){return e(g,J)}),tn&&ea(g,D),P}function x(g,A,S,w){if(typeof S=="object"&&S!==null&&S.type===bl&&S.key===null&&(S=S.props.children),typeof S=="object"&&S!==null){switch(S.$$typeof){case Nh:e:{for(var P=S.key,R=A;R!==null;){if(R.key===P){if(P=S.type,P===bl){if(R.tag===7){t(g,R.sibling),A=r(R,S.props.children),A.return=g,g=A;break e}}else if(R.elementType===P||typeof P=="object"&&P!==null&&P.$$typeof===io&&w1(P)===R.type){t(g,R.sibling),A=r(R,S.props),A.ref=jc(g,R,S),A.return=g,g=A;break e}t(g,R);break}else e(g,R);R=R.sibling}S.type===bl?(A=ya(S.props.children,g.mode,w,S.key),A.return=g,g=A):(w=rp(S.type,S.key,S.props,null,g.mode,w),w.ref=jc(g,A,S),w.return=g,g=w)}return o(g);case Rl:e:{for(R=S.key;A!==null;){if(A.key===R)if(A.tag===4&&A.stateNode.containerInfo===S.containerInfo&&A.stateNode.implementation===S.implementation){t(g,A.sibling),A=r(A,S.children||[]),A.return=g,g=A;break e}else{t(g,A);break}else e(g,A);A=A.sibling}A=Z0(S,g.mode,w),A.return=g,g=A}return o(g);case io:return R=S._init,x(g,A,R(S._payload),w)}if(du(S))return y(g,A,S,w);if(Gc(S))return M(g,A,S,w);Jh(g,S)}return typeof S=="string"&&S!==""||typeof S=="number"?(S=""+S,A!==null&&A.tag===6?(t(g,A.sibling),A=r(A,S),A.return=g,g=A):(t(g,A),A=Q0(S,g.mode,w),A.return=g,g=A),o(g)):t(g,A)}return x}var nc=yC(!0),_C=yC(!1),yf={},Yr=To(yf),ju=To(yf),Ku=To(yf);function ca(n){if(n===yf)throw Error(Me(174));return n}function J_(n,e){switch(Yt(Ku,e),Yt(ju,n),Yt(Yr,yf),n=e.nodeType,n){case 9:case 11:e=(e=e.documentElement)?e.namespaceURI:hy(null,"");break;default:n=n===8?e.parentNode:e,e=n.namespaceURI||null,n=n.tagName,e=hy(e,n)}Zt(Yr),Yt(Yr,e)}function ic(){Zt(Yr),Zt(ju),Zt(Ku)}function xC(n){ca(Ku.current);var e=ca(Yr.current),t=hy(e,n.type);e!==t&&(Yt(ju,n),Yt(Yr,t))}function j_(n){ju.current===n&&(Zt(Yr),Zt(ju))}var sn=To(0);function wp(n){for(var e=n;e!==null;){if(e.tag===13){var t=e.memoizedState;if(t!==null&&(t=t.dehydrated,t===null||t.data==="$?"||t.data==="$!"))return e}else if(e.tag===19&&e.memoizedProps.revealOrder!==void 0){if(e.flags&128)return e}else if(e.child!==null){e.child.return=e,e=e.child;continue}if(e===n)break;for(;e.sibling===null;){if(e.return===null||e.return===n)return null;e=e.return}e.sibling.return=e.return,e=e.sibling}return null}var W0=[];function K_(){for(var n=0;nt?t:4,n(!0);var i=X0.transition;X0.transition={};try{n(!1),e()}finally{Wt=t,X0.transition=i}}function FC(){return ur().memoizedState}function EP(n,e,t){var i=yo(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},UC(n))OC(e,t);else if(t=pC(n,e,t,i),t!==null){var r=pi();Cr(t,n,i,r),kC(t,e,i)}}function wP(n,e,t){var i=yo(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(UC(n))OC(e,r);else{var s=n.alternate;if(n.lanes===0&&(s===null||s.lanes===0)&&(s=e.lastRenderedReducer,s!==null))try{var o=e.lastRenderedState,a=s(o,t);if(r.hasEagerState=!0,r.eagerState=a,Tr(a,o)){var u=e.interleaved;u===null?(r.next=r,W_(e)):(r.next=u.next,u.next=r),e.interleaved=r;return}}catch{}finally{}t=pC(n,e,r,i),t!==null&&(r=pi(),Cr(t,n,i,r),kC(t,e,i))}}function UC(n){var e=n.alternate;return n===ln||e!==null&&e===ln}function OC(n,e){Mu=Cp=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function kC(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,B_(n,t)}}var Tp={readContext:cr,useCallback:Yn,useContext:Yn,useEffect:Yn,useImperativeHandle:Yn,useInsertionEffect:Yn,useLayoutEffect:Yn,useMemo:Yn,useReducer:Yn,useRef:Yn,useState:Yn,useDebugValue:Yn,useDeferredValue:Yn,useTransition:Yn,useMutableSource:Yn,useSyncExternalStore:Yn,useId:Yn,unstable_isNewReconciler:!1},CP={readContext:cr,useCallback:function(n,e){return Wr().memoizedState=[n,e===void 0?null:e],n},useContext:cr,useEffect:T1,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,ep(4194308,4,PC.bind(null,e,n),t)},useLayoutEffect:function(n,e){return ep(4194308,4,n,e)},useInsertionEffect:function(n,e){return ep(4,2,n,e)},useMemo:function(n,e){var t=Wr();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=Wr();return e=t!==void 0?t(e):e,i.memoizedState=i.baseState=e,n={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:n,lastRenderedState:e},i.queue=n,n=n.dispatch=EP.bind(null,ln,n),[i.memoizedState,n]},useRef:function(n){var e=Wr();return n={current:n},e.memoizedState=n},useState:C1,useDebugValue:$_,useDeferredValue:function(n){return Wr().memoizedState=n},useTransition:function(){var n=C1(!1),e=n[0];return n=MP.bind(null,n[1]),Wr().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=ln,r=Wr();if(tn){if(t===void 0)throw Error(Me(407));t=t()}else{if(t=e(),Un===null)throw Error(Me(349));Ca&30||MC(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,T1(wC.bind(null,i,s,n),[n]),i.flags|=2048,Zu(9,EC.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=Wr(),e=Un.identifierPrefix;if(tn){var t=xs,i=_s;t=(i&~(1<<32-wr(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=Yu++,0<\/script>",n=n.removeChild(n.firstChild)):typeof i.is=="string"?n=o.createElement(t,{is:i.is}):(n=o.createElement(t),t==="select"&&(o=n,i.multiple?o.multiple=!0:i.size&&(o.size=i.size))):n=o.createElementNS(n,t),n[Xr]=e,n[Ju]=i,KC(n,e,!1,!1),e.stateNode=n;e:{switch(o=py(t,i),t){case"dialog":Qt("cancel",n),Qt("close",n),r=i;break;case"iframe":case"object":case"embed":Qt("load",n),r=i;break;case"video":case"audio":for(r=0;rsc&&(e.flags|=128,i=!0,Kc(s,!1),e.lanes=4194304)}else{if(!i)if(n=wp(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),Kc(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!tn)return Qn(e),null}else 2*yn()-s.renderingStartTime>sc&&t!==1073741824&&(e.flags|=128,i=!0,Kc(s,!1),e.lanes=4194304);s.isBackwards?(o.sibling=e.child,e.child=o):(t=s.last,t!==null?t.sibling=o:e.child=o,s.last=o)}return s.tail!==null?(e=s.tail,s.rendering=e,s.tail=e.sibling,s.renderingStartTime=yn(),e.sibling=null,t=sn.current,Yt(sn,i?t&1|2:t&1),e):(Qn(e),null);case 22:case 23:return sx(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Fi&1073741824&&(Qn(e),e.subtreeFlags&6&&(e.flags|=8192)):Qn(e),null;case 24:return null;case 25:return null}throw Error(Me(156,e.tag))}function DP(n,e){switch(k_(e),e.tag){case 1:return Ti(e.type)&&yp(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return ic(),Zt(Ci),Zt(ii),K_(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return j_(e),null;case 13:if(Zt(sn),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(Me(340));tc()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Zt(sn),null;case 4:return ic(),null;case 10:return V_(e.type._context),null;case 22:case 23:return sx(),null;case 24:return null;default:return null}}var Kh=!1,ei=!1,NP=typeof WeakSet=="function"?WeakSet:Set,Je=null;function Ol(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){dn(n,e,i)}else t.current=null}function Hy(n,e,t){try{t()}catch(i){dn(n,e,i)}}var F1=!1;function FP(n,e){if(Ey=pp,n=eC(),U_(n)){if("selectionStart"in n)var t={start:n.selectionStart,end:n.selectionEnd};else e:{t=(t=n.ownerDocument)&&t.defaultView||window;var i=t.getSelection&&t.getSelection();if(i&&i.rangeCount!==0){t=i.anchorNode;var r=i.anchorOffset,s=i.focusNode;i=i.focusOffset;try{t.nodeType,s.nodeType}catch{t=null;break e}var o=0,a=-1,u=-1,f=0,h=0,d=n,p=null;t:for(;;){for(var v;d!==t||r!==0&&d.nodeType!==3||(a=o+r),d!==s||i!==0&&d.nodeType!==3||(u=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(v=d.firstChild)!==null;)p=d,d=v;for(;;){if(d===n)break t;if(p===t&&++f===r&&(a=o),p===s&&++h===i&&(u=o),(v=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=v}t=a===-1||u===-1?null:{start:a,end:u}}else t=null}t=t||{start:0,end:0}}else t=null;for(wy={focusedElem:n,selectionRange:t},pp=!1,Je=e;Je!==null;)if(e=Je,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Je=n;else for(;Je!==null;){e=Je;try{var y=e.alternate;if(e.flags&1024)switch(e.tag){case 0:case 11:case 15:break;case 1:if(y!==null){var M=y.memoizedProps,x=y.memoizedState,g=e.stateNode,A=g.getSnapshotBeforeUpdate(e.elementType===e.type?M:_r(e.type,M),x);g.__reactInternalSnapshotBeforeUpdate=A}break;case 3:var S=e.stateNode.containerInfo;S.nodeType===1?S.textContent="":S.nodeType===9&&S.documentElement&&S.removeChild(S.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(Me(163))}}catch(w){dn(e,e.return,w)}if(n=e.sibling,n!==null){n.return=e.return,Je=n;break}Je=e.return}return y=F1,F1=!1,y}function Eu(n,e,t){var i=e.updateQueue;if(i=i!==null?i.lastEffect:null,i!==null){var r=i=i.next;do{if((r.tag&n)===n){var s=r.destroy;r.destroy=void 0,s!==void 0&&Hy(e,t,s)}r=r.next}while(r!==i)}}function Im(n,e){if(e=e.updateQueue,e=e!==null?e.lastEffect:null,e!==null){var t=e=e.next;do{if((t.tag&n)===n){var i=t.create;t.destroy=i()}t=t.next}while(t!==e)}}function Gy(n){var e=n.ref;if(e!==null){var t=n.stateNode;switch(n.tag){case 5:n=t;break;default:n=t}typeof e=="function"?e(n):e.current=n}}function ZC(n){var e=n.alternate;e!==null&&(n.alternate=null,ZC(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[Xr],delete e[Ju],delete e[Ry],delete e[yP],delete e[_P])),n.stateNode=null,n.return=null,n.dependencies=null,n.memoizedProps=null,n.memoizedState=null,n.pendingProps=null,n.stateNode=null,n.updateQueue=null}function qC(n){return n.tag===5||n.tag===3||n.tag===4}function U1(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||qC(n.return))return null;n=n.return}for(n.sibling.return=n.return,n=n.sibling;n.tag!==5&&n.tag!==6&&n.tag!==18;){if(n.flags&2||n.child===null||n.tag===4)continue e;n.child.return=n,n=n.child}if(!(n.flags&2))return n.stateNode}}function Vy(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.nodeType===8?t.parentNode.insertBefore(n,e):t.insertBefore(n,e):(t.nodeType===8?(e=t.parentNode,e.insertBefore(n,t)):(e=t,e.appendChild(n)),t=t._reactRootContainer,t!=null||e.onclick!==null||(e.onclick=vp));else if(i!==4&&(n=n.child,n!==null))for(Vy(n,e,t),n=n.sibling;n!==null;)Vy(n,e,t),n=n.sibling}function Wy(n,e,t){var i=n.tag;if(i===5||i===6)n=n.stateNode,e?t.insertBefore(n,e):t.appendChild(n);else if(i!==4&&(n=n.child,n!==null))for(Wy(n,e,t),n=n.sibling;n!==null;)Wy(n,e,t),n=n.sibling}var Hn=null,Ar=!1;function Js(n,e,t){for(t=t.child;t!==null;)$C(n,e,t),t=t.sibling}function $C(n,e,t){if(Kr&&typeof Kr.onCommitFiberUnmount=="function")try{Kr.onCommitFiberUnmount(Em,t)}catch{}switch(t.tag){case 5:ei||Ol(t,e);case 6:var i=Hn,r=Ar;Hn=null,Js(n,e,t),Hn=i,Ar=r,Hn!==null&&(Ar?(n=Hn,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Hn.removeChild(t.stateNode));break;case 18:Hn!==null&&(Ar?(n=Hn,t=t.stateNode,n.nodeType===8?G0(n.parentNode,t):n.nodeType===1&&G0(n,t),Hu(n)):G0(Hn,t.stateNode));break;case 4:i=Hn,r=Ar,Hn=t.stateNode.containerInfo,Ar=!0,Js(n,e,t),Hn=i,Ar=r;break;case 0:case 11:case 14:case 15:if(!ei&&(i=t.updateQueue,i!==null&&(i=i.lastEffect,i!==null))){r=i=i.next;do{var s=r,o=s.destroy;s=s.tag,o!==void 0&&(s&2||s&4)&&Hy(t,e,o),r=r.next}while(r!==i)}Js(n,e,t);break;case 1:if(!ei&&(Ol(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){dn(t,e,a)}Js(n,e,t);break;case 21:Js(n,e,t);break;case 22:t.mode&1?(ei=(i=ei)||t.memoizedState!==null,Js(n,e,t),ei=i):Js(n,e,t);break;default:Js(n,e,t)}}function O1(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new NP),e.forEach(function(i){var r=XP.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function mr(n,e){var t=e.deletions;if(t!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=yn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*OP(i/1960))-i,10n?16:n,co===null)var i=!1;else{if(n=co,co=null,Bp=0,Ft&6)throw Error(Me(331));var r=Ft;for(Ft|=4,Je=n.current;Je!==null;){var s=Je,o=s.child;if(Je.flags&16){var a=s.deletions;if(a!==null){for(var u=0;uyn()-ix?va(n,0):nx|=t),Ri(n,e)}function aT(n,e){e===0&&(n.mode&1?(e=kh,kh<<=1,!(kh&130023424)&&(kh=4194304)):e=1);var t=pi();n=Rs(n,e),n!==null&&(mf(n,e,t),Ri(n,t))}function WP(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),aT(n,t)}function XP(n,e){var t=0;switch(n.tag){case 13:var i=n.stateNode,r=n.memoizedState;r!==null&&(t=r.retryLane);break;case 19:i=n.stateNode;break;default:throw Error(Me(314))}i!==null&&i.delete(e),aT(n,t)}var lT;lT=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Ci.current)Ei=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return Ei=!1,IP(n,e,t);Ei=!!(n.flags&131072)}else Ei=!1,tn&&e.flags&1048576&&fC(e,Ap,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;tp(n,e),n=e.pendingProps;var r=ec(e,ii.current);Kl(e,t),r=Q_(null,e,i,n,r,t);var s=Z_();return e.flags|=1,typeof r=="object"&&r!==null&&typeof r.render=="function"&&r.$$typeof===void 0?(e.tag=1,e.memoizedState=null,e.updateQueue=null,Ti(i)?(s=!0,_p(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,X_(e),r.updater=Bm,e.stateNode=r,r._reactInternals=e,Dy(e,i,n,t),e=Uy(null,e,i,!0,s,t)):(e.tag=0,tn&&s&&O_(e),hi(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(tp(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=jP(i),n=_r(i,n),r){case 0:e=Fy(null,e,i,n,t);break e;case 1:e=L1(null,e,i,n,t);break e;case 11:e=P1(null,e,i,n,t);break e;case 14:e=I1(null,e,i,_r(i.type,n),t);break e}throw Error(Me(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:_r(i,r),Fy(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:_r(i,r),L1(n,e,i,r,t);case 3:e:{if(XC(e),n===null)throw Error(Me(387));i=e.pendingProps,s=e.memoizedState,r=s.element,mC(n,e),Ep(e,i,null,t);var o=e.memoizedState;if(i=o.element,s.isDehydrated)if(s={element:i,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},e.updateQueue.baseState=s,e.memoizedState=s,e.flags&256){r=rc(Error(Me(423)),e),e=D1(n,e,i,t,r);break e}else if(i!==r){r=rc(Error(Me(424)),e),e=D1(n,e,i,t,r);break e}else for(Ui=mo(e.stateNode.containerInfo.firstChild),zi=e,tn=!0,Sr=null,t=_C(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(tc(),i===r){e=bs(n,e,t);break e}hi(n,e,i,t)}e=e.child}return e;case 5:return xC(e),n===null&&Py(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,Cy(i,r)?o=null:s!==null&&Cy(i,s)&&(e.flags|=32),WC(n,e),hi(n,e,o,t),e.child;case 6:return n===null&&Py(e),null;case 13:return JC(n,e,t);case 4:return J_(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=nc(e,null,i,t):hi(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:_r(i,r),P1(n,e,i,r,t);case 7:return hi(n,e,e.pendingProps,t),e.child;case 8:return hi(n,e,e.pendingProps.children,t),e.child;case 12:return hi(n,e,e.pendingProps.children,t),e.child;case 10:e:{if(i=e.type._context,r=e.pendingProps,s=e.memoizedProps,o=r.value,Yt(Sp,i._currentValue),i._currentValue=o,s!==null)if(Tr(s.value,o)){if(s.children===r.children&&!Ci.current){e=bs(n,e,t);break e}}else for(s=e.child,s!==null&&(s.return=e);s!==null;){var a=s.dependencies;if(a!==null){o=s.child;for(var u=a.firstContext;u!==null;){if(u.context===i){if(s.tag===1){u=Ms(-1,t&-t),u.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?u.next=u:(u.next=h.next,h.next=u),f.pending=u}}s.lanes|=t,u=s.alternate,u!==null&&(u.lanes|=t),Iy(s.return,t,e),a.lanes|=t;break}u=u.next}}else if(s.tag===10)o=s.type===e.type?null:s.child;else if(s.tag===18){if(o=s.return,o===null)throw Error(Me(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),Iy(o,t,e),o=s.sibling}else o=s.child;if(o!==null)o.return=s;else for(o=s;o!==null;){if(o===e){o=null;break}if(s=o.sibling,s!==null){s.return=o.return,o=s;break}o=o.return}s=o}hi(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Kl(e,t),r=cr(r),i=i(r),e.flags|=1,hi(n,e,i,t),e.child;case 14:return i=e.type,r=_r(i,e.pendingProps),r=_r(i.type,r),I1(n,e,i,r,t);case 15:return GC(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:_r(i,r),tp(n,e),e.tag=1,Ti(i)?(n=!0,_p(e)):n=!1,Kl(e,t),vC(e,i,r),Dy(e,i,r,t),Uy(null,e,i,!0,n,t);case 19:return jC(n,e,t);case 22:return VC(n,e,t)}throw Error(Me(156,e.tag))};function cT(n,e){return Nw(n,e)}function JP(n,e,t,i){this.tag=n,this.key=t,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=e,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=i,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function or(n,e,t,i){return new JP(n,e,t,i)}function ax(n){return n=n.prototype,!(!n||!n.isReactComponent)}function jP(n){if(typeof n=="function")return ax(n)?1:0;if(n!=null){if(n=n.$$typeof,n===C_)return 11;if(n===T_)return 14}return 2}function _o(n,e){var t=n.alternate;return t===null?(t=or(n.tag,e,n.key,n.mode),t.elementType=n.elementType,t.type=n.type,t.stateNode=n.stateNode,t.alternate=n,n.alternate=t):(t.pendingProps=e,t.type=n.type,t.flags=0,t.subtreeFlags=0,t.deletions=null),t.flags=n.flags&14680064,t.childLanes=n.childLanes,t.lanes=n.lanes,t.child=n.child,t.memoizedProps=n.memoizedProps,t.memoizedState=n.memoizedState,t.updateQueue=n.updateQueue,e=n.dependencies,t.dependencies=e===null?null:{lanes:e.lanes,firstContext:e.firstContext},t.sibling=n.sibling,t.index=n.index,t.ref=n.ref,t}function rp(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")ax(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case bl:return ya(t.children,r,s,e);case w_:o=8,r|=8;break;case ry:return n=or(12,t,e,r|2),n.elementType=ry,n.lanes=s,n;case sy:return n=or(13,t,e,r),n.elementType=sy,n.lanes=s,n;case oy:return n=or(19,t,e,r),n.elementType=oy,n.lanes=s,n;case yw:return Dm(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case gw:o=10;break e;case vw:o=9;break e;case C_:o=11;break e;case T_:o=14;break e;case io:o=16,i=null;break e}throw Error(Me(130,n==null?n:typeof n,""))}return e=or(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function ya(n,e,t,i){return n=or(7,n,i,e),n.lanes=t,n}function Dm(n,e,t,i){return n=or(22,n,i,e),n.elementType=yw,n.lanes=t,n.stateNode={isHidden:!1},n}function Q0(n,e,t){return n=or(6,n,null,e),n.lanes=t,n}function Z0(n,e,t){return e=or(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function KP(n,e,t,i,r){this.tag=e,this.containerInfo=n,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=-1,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=P0(0),this.expirationTimes=P0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=P0(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function lx(n,e,t,i,r,s,o,a,u){return n=new KP(n,e,t,a,u),e===1?(e=1,s===!0&&(e|=8)):e=0,s=or(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},X_(s),n}function YP(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(dT)}catch(n){console.error(n)}}dT(),fw.exports=Xi;var eI=fw.exports,J1=eI;ny.createRoot=J1.createRoot,ny.hydrateRoot=J1.hydrateRoot;const tI=""+new URL("whipSmack-C7QG-Ffb.mp3",import.meta.url).href,nI=""+new URL("GoodyBooby300-Dd9Vgh2s.jpg",import.meta.url).href,iI=""+new URL("FrankenDrink300-CTcOuElH.jpg",import.meta.url).href,rI=""+new URL("FrankenColumbus300-2-Aefr95.jpg",import.meta.url).href,sI=""+new URL("FrankenBride300-DlV4OIfT.jpg",import.meta.url).href,oI=""+new URL("Choctaw300-DBQ0t9wn.jpg",import.meta.url).href;function aI(){new Audio(tI).play()}const lI=()=>_e.jsx("div",{children:_e.jsxs("div",{className:"container ",children:[_e.jsx("br",{}),_e.jsxs("div",{className:"m-0 px-4 py-3 sm:px-8 ",children:[_e.jsx("a",{className:"cubeLink",href:"https://Mybabb.com",target:"_blank",rel:"noopener noreferrer",onClick:aI,children:_e.jsx("div",{className:"outerCubeDiv",children:_e.jsxs("div",{className:"cube",children:[_e.jsx("div",{className:"top",children:_e.jsx("img",{className:"Top",src:oI,alt:"Top",height:"300",width:"300"})}),_e.jsxs("div",{className:"boxSides",children:[_e.jsx("span",{className:"Side1 border-b-2 border-[#2dd760]",style:{"--i":1},children:_e.jsx("img",{src:iI,alt:"Side1",height:"300",width:"300"})}),_e.jsx("span",{className:"Side2 border-b-2 border-[#2dd760]",style:{"--i":2},children:_e.jsx("img",{src:nI,alt:"Side2",height:"300",width:"300"})}),_e.jsx("span",{className:"Side4 border-b-2 border-[#2dd760]",style:{"--i":4},children:_e.jsx("img",{src:rI,alt:"Side4",height:"300",width:"300"})}),_e.jsx("span",{className:"side3 border-b-2 border-[#2dd760]",style:{"--i":3},children:_e.jsx("img",{src:sI,alt:"Side3",height:"300",width:"300"})})]})]})})}),_e.jsx("p",{className:"fixed bottom-0 right-5 whitespace-nowrap text-[#abdbee]",children:_e.jsxs("span",{className:"text-[8px] text-[#abdbee] sm:text-[10px] lg:text-sm",children:["<<<©",_e.jsx("span",{className:"text-orange-400",children:"MyBaBB"})," ",_e.jsx("em",{children:"8-2023"}),">>>"]})})]})]})}),cI=()=>{var n=new Date("october 24, 2024 00:00:00 PST").getTime(),e=setInterval(function(){var t=new Date().getTime(),i=n-t,r=Math.floor(i/(1e3*60*60*24)),s=Math.floor(i%(1e3*60*60*24)/(1e3*60*60)),o=Math.floor(i%(1e3*60*60)/(1e3*60)),a=o<10?"0"+o:o;document.getElementById("demo").innerHTML=` - ${r} -  days  - ${s} - : - ${a} -  hrs - `,i<0&&(clearInterval(e),document.getElementById("demo").innerHTML=" Everybody Get Along ")},1e3)};var pT={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},j1=uo.createContext&&uo.createContext(pT),uI=["attr","size","title"];function fI(n,e){if(n==null)return{};var t=hI(n,e),i,r;if(Object.getOwnPropertySymbols){var s=Object.getOwnPropertySymbols(n);for(r=0;r=0)&&Object.prototype.propertyIsEnumerable.call(n,i)&&(t[i]=n[i])}return t}function hI(n,e){if(n==null)return{};var t={},i=Object.keys(n),r,s;for(s=0;s=0)&&(t[r]=n[r]);return t}function Lp(){return Lp=Object.assign?Object.assign.bind():function(n){for(var e=1;euo.createElement(e.tag,Dp({key:t},e.attr),mT(e.child)))}function Ds(n){return e=>uo.createElement(gI,Lp({attr:Dp({},n.attr)},e),mT(n.child))}function gI(n){var e=t=>{var{attr:i,size:r,title:s}=n,o=fI(n,uI),a=r||t.size||"1em",u;return t.className&&(u=t.className),n.className&&(u=(u?u+" ":"")+n.className),uo.createElement("svg",Lp({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},t.attr,i,o,{className:u,style:Dp(Dp({color:n.color||t.color},t.style),n.style),height:a,width:a,xmlns:"http://www.w3.org/2000/svg"}),s&&uo.createElement("title",null,s),n.children)};return j1!==void 0?uo.createElement(j1.Consumer,null,t=>e(t)):e(pT)}function vI(n){return Ds({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(n)}function yI(n){return Ds({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(n)}function _I(n){return Ds({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M466.27 225.31c4.674-22.647.864-44.538-8.99-62.99 2.958-23.868-4.021-48.565-17.34-66.99C438.986 39.423 404.117 0 327 0c-7 0-15 .01-22.22.01C201.195.01 168.997 40 128 40h-10.845c-5.64-4.975-13.042-8-21.155-8H32C14.327 32 0 46.327 0 64v240c0 17.673 14.327 32 32 32h64c11.842 0 22.175-6.438 27.708-16h7.052c19.146 16.953 46.013 60.653 68.76 83.4 13.667 13.667 10.153 108.6 71.76 108.6 57.58 0 95.27-31.936 95.27-104.73 0-18.41-3.93-33.73-8.85-46.54h36.48c48.602 0 85.82-41.565 85.82-85.58 0-19.15-4.96-34.99-13.73-49.84zM64 296c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm330.18 16.73H290.19c0 37.82 28.36 55.37 28.36 94.54 0 23.75 0 56.73-47.27 56.73-18.91-18.91-9.46-66.18-37.82-94.54C206.9 342.89 167.28 272 138.92 272H128V85.83c53.611 0 100.001-37.82 171.64-37.82h37.82c35.512 0 60.82 17.12 53.12 65.9 15.2 8.16 26.5 36.44 13.94 57.57 21.581 20.384 18.699 51.065 5.21 65.62 9.45 0 22.36 18.91 22.27 37.81-.09 18.91-16.71 37.82-37.82 37.82z"},child:[]}]})(n)}function xI(n){return Ds({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M466.27 286.69C475.04 271.84 480 256 480 236.85c0-44.015-37.218-85.58-85.82-85.58H357.7c4.92-12.81 8.85-28.13 8.85-46.54C366.55 31.936 328.86 0 271.28 0c-61.607 0-58.093 94.933-71.76 108.6-22.747 22.747-49.615 66.447-68.76 83.4H32c-17.673 0-32 14.327-32 32v240c0 17.673 14.327 32 32 32h64c14.893 0 27.408-10.174 30.978-23.95 44.509 1.001 75.06 39.94 177.802 39.94 7.22 0 15.22.01 22.22.01 77.117 0 111.986-39.423 112.94-95.33 13.319-18.425 20.299-43.122 17.34-66.99 9.854-18.452 13.664-40.343 8.99-62.99zm-61.75 53.83c12.56 21.13 1.26 49.41-13.94 57.57 7.7 48.78-17.608 65.9-53.12 65.9h-37.82c-71.639 0-118.029-37.82-171.64-37.82V240h10.92c28.36 0 67.98-70.89 94.54-97.46 28.36-28.36 18.91-75.63 37.82-94.54 47.27 0 47.27 32.98 47.27 56.73 0 39.17-28.36 56.72-28.36 94.54h103.99c21.11 0 37.73 18.91 37.82 37.82.09 18.9-12.82 37.81-22.27 37.81 13.489 14.555 16.371 45.236-5.21 65.62zM88 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"},child:[]}]})(n)}const AI=()=>_e.jsx("div",{children:_e.jsxs("div",{className:"post-ratings-container fixed bottom-2 ",children:[_e.jsxs("div",{className:"post-rating",children:[_e.jsx("span",{className:"post-rating-button material-symbols-outlined text-black",children:_e.jsx(xI,{})}),_e.jsx("span",{className:"rating-count text-[#87ceeb] ",children:"1818"})]}),_e.jsxs("div",{className:"post-rating",children:[_e.jsx("span",{className:"post-rating-button material-symbols-outlined text-black",children:_e.jsx(_I,{})}),_e.jsx("span",{className:"rating-count text-[#87ceeb] ",children:"1"})]})]})});function SI(n){return Ds({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M145.61 464h220.78c19.8 0 35.55-16.29 33.42-35.06C386.06 308 304 310 304 256s83.11-51 95.8-172.94c2-18.78-13.61-35.06-33.41-35.06H145.61c-19.8 0-35.37 16.28-33.41 35.06C124.89 205 208 201 208 256s-82.06 52-95.8 172.94c-2.14 18.77 13.61 35.06 33.41 35.06z"},child:[]},{tag:"path",attr:{d:"M343.3 432H169.13c-15.6 0-20-18-9.06-29.16C186.55 376 240 356.78 240 326V224c0-19.85-38-35-61.51-67.2-3.88-5.31-3.49-12.8 6.37-12.8h142.73c8.41 0 10.23 7.43 6.4 12.75C310.82 189 272 204.05 272 224v102c0 30.53 55.71 47 80.4 76.87 9.95 12.04 6.47 29.13-9.1 29.13z"},child:[]}]})(n)}const MI=""+new URL("wolf-whistle-BqoH1Rpj.wav",import.meta.url).href;function Y1(){new Audio(MI).play()}const EI=()=>_e.jsx("div",{className:"fixed left-0 top-0 w-screen",children:_e.jsxs("div",{className:"relative flex xxxs:justify-center sm:justify-between ",children:[_e.jsx("div",{className:" w-fit sm:ml-4 ",children:_e.jsx("a",{href:"https://Mybabb.com",target:"_blank",rel:"noopener noreferrer",onClick:Y1,className:` topParagraphWrapper \r - font-Kingthings_Petrock`,children:_e.jsxs("p",{className:`topParagraph whitespace-nowrap \r - text-3xl sm:text-4xl md:text-5xl lg:text-6xl `,children:[" ",_e.jsx("span",{className:"inline-block text-[#fcb54d] -mt-4 ",children:"Indigenous Day"})]})})}),_e.jsx("div",{className:"demoWrapper ",children:_e.jsx("a",{href:"https://Mybabb.com",target:"_blank",rel:"noopener noreferrer",onClick:Y1,children:_e.jsxs("div",{className:" relative flex min-w-[225px] lg:min-w-[335px] ",children:[_e.jsx("p",{id:"demo",className:`relative m-auto ml-8 flex w-full justify-start text-lg sm:text-lg md:ml-0 md:text-2xl lg:text-4xl\r - `}),_e.jsx("span",{className:"clockIcon ",children:_e.jsx(SI,{color:"lightgray"})})]})})})]})});/** - * @license - * Copyright 2010-2024 Three.js Authors - * SPDX-License-Identifier: MIT - */const _f="169",na={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},ia={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},gT=0,Yy=1,vT=2,wI=3,yT=0,km=1,Tu=2,xr=3,$r=0,mi=1,Er=2,Es=0,_a=1,Qy=2,Zy=3,qy=4,_T=5,ao=100,xT=101,AT=102,ST=103,MT=104,ET=200,wT=201,CT=202,TT=203,Np=204,Fp=205,RT=206,bT=207,BT=208,PT=209,IT=210,LT=211,DT=212,NT=213,FT=214,Up=0,Op=1,kp=2,ba=3,zp=4,Hp=5,Gp=6,Vp=7,xf=0,UT=1,OT=2,Qr=0,kT=1,zT=2,HT=3,hx=4,GT=5,VT=6,WT=7,$y="attached",XT="detached",zm=300,Bs=301,Mo=302,$u=303,ef=304,vc=306,Eo=1e3,Oi=1001,oc=1002,bn=1003,Hm=1004,CI=1004,ua=1005,TI=1005,mn=1006,Ql=1007,RI=1007,ar=1008,bI=1008,Rr=1009,dx=1010,px=1011,ac=1012,Gm=1013,Ps=1014,wi=1015,yc=1016,Vm=1017,Wm=1018,Ba=1020,mx=35902,gx=1021,vx=1022,ti=1023,yx=1024,_x=1025,xa=1026,Pa=1027,Xm=1028,Af=1029,xx=1030,Jm=1031,BI=1032,jm=1033,Ru=33776,bu=33777,Bu=33778,Pu=33779,Wp=35840,Xp=35841,Jp=35842,jp=35843,Kp=36196,Yp=37492,Qp=37496,Zp=37808,qp=37809,$p=37810,em=37811,tm=37812,nm=37813,im=37814,rm=37815,sm=37816,om=37817,am=37818,lm=37819,cm=37820,um=37821,Iu=36492,fm=36494,hm=36495,Ax=36283,dm=36284,pm=36285,mm=36286,JT=2200,jT=2201,KT=2202,lc=2300,cc=2301,sp=2302,fa=2400,ha=2401,tf=2402,Km=2500,Sx=2501,YT=0,Mx=1,gm=2,QT=3200,ZT=3201,PI=3202,II=3203,bo=0,qT=1,vs="",ir="srgb",Ns="srgb-linear",Ym="display-p3",Sf="display-p3-linear",nf="linear",jt="srgb",rf="rec709",sf="p3",LI=0,ra=7680,DI=7681,NI=7682,FI=7683,UI=34055,OI=34056,kI=5386,zI=512,HI=513,GI=514,VI=515,WI=516,XI=517,JI=518,e_=519,$T=512,eR=513,tR=514,Ex=515,nR=516,iR=517,rR=518,sR=519,of=35044,jI=35048,KI=35040,YI=35045,QI=35049,ZI=35041,qI=35046,$I=35050,eL=35042,tL="100",t_="300 es",Jr=2e3,af=2001;class Pr{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});const i=this._listeners;i[e]===void 0&&(i[e]=[]),i[e].indexOf(t)===-1&&i[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;const i=this._listeners;return i[e]!==void 0&&i[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;const r=this._listeners[e];if(r!==void 0){const s=r.indexOf(t);s!==-1&&r.splice(s,1)}}dispatchEvent(e){if(this._listeners===void 0)return;const i=this._listeners[e.type];if(i!==void 0){e.target=this;const r=i.slice(0);for(let s=0,o=r.length;s>8&255]+Zn[n>>16&255]+Zn[n>>24&255]+"-"+Zn[e&255]+Zn[e>>8&255]+"-"+Zn[e>>16&15|64]+Zn[e>>24&255]+"-"+Zn[t&63|128]+Zn[t>>8&255]+"-"+Zn[t>>16&255]+Zn[t>>24&255]+Zn[i&255]+Zn[i>>8&255]+Zn[i>>16&255]+Zn[i>>24&255]).toLowerCase()}function pn(n,e,t){return Math.max(e,Math.min(t,n))}function wx(n,e){return(n%e+e)%e}function nL(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function iL(n,e,t){return n!==e?(t-n)/(e-n):0}function Lu(n,e,t){return(1-t)*n+t*e}function rL(n,e,t,i){return Lu(n,e,1-Math.exp(-t*i))}function sL(n,e=1){return e-Math.abs(wx(n,e*2)-e)}function oL(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function aL(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function lL(n,e){return n+Math.floor(Math.random()*(e-n+1))}function cL(n,e){return n+Math.random()*(e-n)}function uL(n){return n*(.5-Math.random())}function fL(n){n!==void 0&&(Q1=n);let e=Q1+=1831565813;return e=Math.imul(e^e>>>15,e|1),e^=e+Math.imul(e^e>>>7,e|61),((e^e>>>14)>>>0)/4294967296}function hL(n){return n*Aa}function dL(n){return n*uc}function pL(n){return(n&n-1)===0&&n!==0}function mL(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function gL(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function vL(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),u=o(t/2),f=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),v=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,u*d,u*p,a*f);break;case"YZY":n.set(u*p,a*h,u*d,a*f);break;case"ZXZ":n.set(u*d,u*p,a*h,a*f);break;case"XZX":n.set(a*h,u*y,u*v,a*f);break;case"YXY":n.set(u*v,a*h,u*y,a*f);break;case"ZYZ":n.set(u*y,u*v,a*h,a*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function di(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return n/4294967295;case Uint16Array:return n/65535;case Uint8Array:return n/255;case Int32Array:return Math.max(n/2147483647,-1);case Int16Array:return Math.max(n/32767,-1);case Int8Array:return Math.max(n/127,-1);default:throw new Error("Invalid component type.")}}function At(n,e){switch(e.constructor){case Float32Array:return n;case Uint32Array:return Math.round(n*4294967295);case Uint16Array:return Math.round(n*65535);case Uint8Array:return Math.round(n*255);case Int32Array:return Math.round(n*2147483647);case Int16Array:return Math.round(n*32767);case Int8Array:return Math.round(n*127);default:throw new Error("Invalid component type.")}}const oR={DEG2RAD:Aa,RAD2DEG:uc,generateUUID:Hi,clamp:pn,euclideanModulo:wx,mapLinear:nL,inverseLerp:iL,lerp:Lu,damp:rL,pingpong:sL,smoothstep:oL,smootherstep:aL,randInt:lL,randFloat:cL,randFloatSpread:uL,seededRandom:fL,degToRad:hL,radToDeg:dL,isPowerOfTwo:pL,ceilPowerOfTwo:mL,floorPowerOfTwo:gL,setQuaternionFromProperEuler:vL,normalize:At,denormalize:di};class fe{constructor(e=0,t=0){fe.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,i=this.y,r=e.elements;return this.x=r[0]*t+r[3]*i+r[6],this.y=r[1]*t+r[4]*i+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 i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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=Math.trunc(this.x),this.y=Math.trunc(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(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(pn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y;return t*t+i*i}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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,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 i=Math.cos(t),r=Math.sin(t),s=this.x-e.x,o=this.y-e.y;return this.x=s*i-o*r+e.x,this.y=s*r+o*i+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class xt{constructor(e,t,i,r,s,o,a,u,f){xt.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,u,f)}set(e,t,i,r,s,o,a,u,f){const h=this.elements;return h[0]=e,h[1]=r,h[2]=a,h[3]=t,h[4]=s,h[5]=u,h[6]=i,h[7]=o,h[8]=f,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],this}extractBasis(e,t,i){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),i.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 i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[3],u=i[6],f=i[1],h=i[4],d=i[7],p=i[2],v=i[5],y=i[8],M=r[0],x=r[3],g=r[6],A=r[1],S=r[4],w=r[7],P=r[2],R=r[5],B=r[8];return s[0]=o*M+a*A+u*P,s[3]=o*x+a*S+u*R,s[6]=o*g+a*w+u*B,s[1]=f*M+h*A+d*P,s[4]=f*x+h*S+d*R,s[7]=f*g+h*w+d*B,s[2]=p*M+v*A+y*P,s[5]=p*x+v*S+y*R,s[8]=p*g+v*w+y*B,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],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],u=e[6],f=e[7],h=e[8];return t*o*h-t*a*f-i*s*h+i*a*u+r*s*f-r*o*u}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],u=e[6],f=e[7],h=e[8],d=h*o-a*f,p=a*u-h*s,v=f*s-o*u,y=t*d+i*p+r*v;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const M=1/y;return e[0]=d*M,e[1]=(r*f-h*i)*M,e[2]=(a*i-r*o)*M,e[3]=p*M,e[4]=(h*t-r*u)*M,e[5]=(r*s-a*t)*M,e[6]=v*M,e[7]=(i*u-f*t)*M,e[8]=(o*t-i*s)*M,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,i,r,s,o,a){const u=Math.cos(s),f=Math.sin(s);return this.set(i*u,i*f,-i*(u*o+f*a)+o+e,-r*f,r*u,-r*(-f*o+u*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(q0.makeScale(e,t)),this}rotate(e){return this.premultiply(q0.makeRotation(-e)),this}translate(e,t){return this.premultiply(q0.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),i=Math.sin(e);return this.set(t,-i,0,i,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,i=e.elements;for(let r=0;r<9;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<9;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e}clone(){return new this.constructor().fromArray(this.elements)}}const q0=new xt;function aR(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const yL={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function zl(n,e){return new yL[n](e)}function lf(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function lR(){const n=lf("canvas");return n.style.display="block",n}const Z1={};function op(n){n in Z1||(Z1[n]=!0,console.warn(n))}function _L(n,e,t){return new Promise(function(i,r){function s(){switch(n.clientWaitSync(e,n.SYNC_FLUSH_COMMANDS_BIT,0)){case n.WAIT_FAILED:r();break;case n.TIMEOUT_EXPIRED:setTimeout(s,t);break;default:i()}}setTimeout(s,t)})}function xL(n){const e=n.elements;e[2]=.5*e[2]+.5*e[3],e[6]=.5*e[6]+.5*e[7],e[10]=.5*e[10]+.5*e[11],e[14]=.5*e[14]+.5*e[15]}function AL(n){const e=n.elements;e[11]===-1?(e[10]=-e[10]-1,e[14]=-e[14]):(e[10]=-e[10],e[14]=-e[14]+1)}const q1=new xt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),$1=new xt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),Qc={[Ns]:{transfer:nf,primaries:rf,luminanceCoefficients:[.2126,.7152,.0722],toReference:n=>n,fromReference:n=>n},[ir]:{transfer:jt,primaries:rf,luminanceCoefficients:[.2126,.7152,.0722],toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[Sf]:{transfer:nf,primaries:sf,luminanceCoefficients:[.2289,.6917,.0793],toReference:n=>n.applyMatrix3($1),fromReference:n=>n.applyMatrix3(q1)},[Ym]:{transfer:jt,primaries:sf,luminanceCoefficients:[.2289,.6917,.0793],toReference:n=>n.convertSRGBToLinear().applyMatrix3($1),fromReference:n=>n.applyMatrix3(q1).convertLinearToSRGB()}},SL=new Set([Ns,Sf]),Gt={enabled:!0,_workingColorSpace:Ns,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!SL.has(n))throw new Error(`Unsupported working color space, "${n}".`);this._workingColorSpace=n},convert:function(n,e,t){if(this.enabled===!1||e===t||!e||!t)return n;const i=Qc[e].toReference,r=Qc[t].fromReference;return r(i(n))},fromWorkingColorSpace:function(n,e){return this.convert(n,this._workingColorSpace,e)},toWorkingColorSpace:function(n,e){return this.convert(n,e,this._workingColorSpace)},getPrimaries:function(n){return Qc[n].primaries},getTransfer:function(n){return n===vs?nf:Qc[n].transfer},getLuminanceCoefficients:function(n,e=this._workingColorSpace){return n.fromArray(Qc[e].luminanceCoefficients)}};function Zl(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function $0(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let ol;class cR{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{ol===void 0&&(ol=lf("canvas")),ol.width=e.width,ol.height=e.height;const i=ol.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=ol}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(typeof HTMLImageElement<"u"&&e instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&e instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&e instanceof ImageBitmap){const t=lf("canvas");t.width=e.width,t.height=e.height;const i=t.getContext("2d");i.drawImage(e,0,0,e.width,e.height);const r=i.getImageData(0,0,e.width,e.height),s=r.data;for(let o=0;o0&&(i.userData=this.userData),t||(e.textures[this.uuid]=i),i}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==zm)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Eo:e.x=e.x-Math.floor(e.x);break;case Oi:e.x=e.x<0?0:1;break;case oc:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case Eo:e.y=e.y-Math.floor(e.y);break;case Oi:e.y=e.y<0?0:1;break;case oc:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&(this.version++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}qt.DEFAULT_IMAGE=null;qt.DEFAULT_MAPPING=zm;qt.DEFAULT_ANISOTROPY=1;class Nt{constructor(e=0,t=0,i=0,r=1){Nt.prototype.isVector4=!0,this.x=e,this.y=t,this.z=i,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,i,r){return this.x=e,this.y=t,this.z=i,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=e.w!==void 0?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,i=this.y,r=this.z,s=this.w,o=e.elements;return this.x=o[0]*t+o[4]*i+o[8]*r+o[12]*s,this.y=o[1]*t+o[5]*i+o[9]*r+o[13]*s,this.z=o[2]*t+o[6]*i+o[10]*r+o[14]*s,this.w=o[3]*t+o[7]*i+o[11]*r+o[15]*s,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,i,r,s;const u=e.elements,f=u[0],h=u[4],d=u[8],p=u[1],v=u[5],y=u[9],M=u[2],x=u[6],g=u[10];if(Math.abs(h-p)<.01&&Math.abs(d-M)<.01&&Math.abs(y-x)<.01){if(Math.abs(h+p)<.1&&Math.abs(d+M)<.1&&Math.abs(y+x)<.1&&Math.abs(f+v+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const S=(f+1)/2,w=(v+1)/2,P=(g+1)/2,R=(h+p)/4,B=(d+M)/4,D=(y+x)/4;return S>w&&S>P?S<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(S),r=R/i,s=B/i):w>P?w<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(w),i=R/r,s=D/r):P<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(P),i=B/s,r=D/s),this.set(i,r,s,t),this}let A=Math.sqrt((x-y)*(x-y)+(d-M)*(d-M)+(p-h)*(p-h));return Math.abs(A)<.001&&(A=1),this.x=(x-y)/A,this.y=(d-M)/A,this.z=(p-h)/A,this.w=Math.acos((f+v+g-1)/2),this}setFromMatrixPosition(e){const t=e.elements;return this.x=t[12],this.y=t[13],this.z=t[14],this.w=t[15],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 i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this.w=e.w+(t.w-e.w)*i,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 uR extends Pr{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new Nt(0,0,e,t),this.scissorTest=!1,this.viewport=new Nt(0,0,e,t);const r={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:mn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const s=new qt(r,i.mapping,i.wrapS,i.wrapT,i.magFilter,i.minFilter,i.format,i.type,i.anisotropy,i.colorSpace);s.flipY=!1,s.generateMipmaps=i.generateMipmaps,s.internalFormat=i.internalFormat,this.textures=[];const o=i.count;for(let a=0;a=0?1:-1,S=1-g*g;if(S>Number.EPSILON){const P=Math.sqrt(S),R=Math.atan2(P,g*A);x=Math.sin(x*R)/P,a=Math.sin(a*R)/P}const w=a*A;if(u=u*x+p*w,f=f*x+v*w,h=h*x+y*w,d=d*x+M*w,x===1-a){const P=1/Math.sqrt(u*u+f*f+h*h+d*d);u*=P,f*=P,h*=P,d*=P}}e[t]=u,e[t+1]=f,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],u=i[r+1],f=i[r+2],h=i[r+3],d=s[o],p=s[o+1],v=s[o+2],y=s[o+3];return e[t]=a*y+h*d+u*v-f*p,e[t+1]=u*y+h*p+f*d-a*v,e[t+2]=f*y+h*v+a*p-u*d,e[t+3]=h*y-a*d-u*p-f*v,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,i,r){return this._x=e,this._y=t,this._z=i,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=!0){const i=e._x,r=e._y,s=e._z,o=e._order,a=Math.cos,u=Math.sin,f=a(i/2),h=a(r/2),d=a(s/2),p=u(i/2),v=u(r/2),y=u(s/2);switch(o){case"XYZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"YXZ":this._x=p*h*d+f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"ZXY":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d-p*v*y;break;case"ZYX":this._x=p*h*d-f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d+p*v*y;break;case"YZX":this._x=p*h*d+f*v*y,this._y=f*v*d+p*h*y,this._z=f*h*y-p*v*d,this._w=f*h*d-p*v*y;break;case"XZY":this._x=p*h*d-f*v*y,this._y=f*v*d-p*h*y,this._z=f*h*y+p*v*d,this._w=f*h*d+p*v*y;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+o)}return t===!0&&this._onChangeCallback(),this}setFromAxisAngle(e,t){const i=t/2,r=Math.sin(i);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(i),this._onChangeCallback(),this}setFromRotationMatrix(e){const t=e.elements,i=t[0],r=t[4],s=t[8],o=t[1],a=t[5],u=t[9],f=t[2],h=t[6],d=t[10],p=i+a+d;if(p>0){const v=.5/Math.sqrt(p+1);this._w=.25/v,this._x=(h-u)*v,this._y=(s-f)*v,this._z=(o-r)*v}else if(i>a&&i>d){const v=2*Math.sqrt(1+i-a-d);this._w=(h-u)/v,this._x=.25*v,this._y=(r+o)/v,this._z=(s+f)/v}else if(a>d){const v=2*Math.sqrt(1+a-i-d);this._w=(s-f)/v,this._x=(r+o)/v,this._y=.25*v,this._z=(u+h)/v}else{const v=2*Math.sqrt(1+d-i-a);this._w=(o-r)/v,this._x=(s+f)/v,this._y=(u+h)/v,this._z=.25*v}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let i=e.dot(t)+1;return iMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=i):(this._x=0,this._y=-e.z,this._z=e.y,this._w=i)):(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=i),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(pn(this.dot(e),-1,1)))}rotateTowards(e,t){const i=this.angleTo(e);if(i===0)return this;const r=Math.min(1,t/i);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 e===0?(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 i=e._x,r=e._y,s=e._z,o=e._w,a=t._x,u=t._y,f=t._z,h=t._w;return this._x=i*h+o*a+r*f-s*u,this._y=r*h+o*u+s*a-i*f,this._z=s*h+o*f+i*u-r*a,this._w=o*h-i*a-r*u-s*f,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);const i=this._x,r=this._y,s=this._z,o=this._w;let a=o*e._w+i*e._x+r*e._y+s*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=o,this._x=i,this._y=r,this._z=s,this;const u=1-a*a;if(u<=Number.EPSILON){const v=1-t;return this._w=v*o+t*this._w,this._x=v*i+t*this._x,this._y=v*r+t*this._y,this._z=v*s+t*this._z,this.normalize(),this}const f=Math.sqrt(u),h=Math.atan2(f,a),d=Math.sin((1-t)*h)/f,p=Math.sin(t*h)/f;return this._w=o*d+this._w*p,this._x=i*d+this._x*p,this._y=r*d+this._y*p,this._z=s*d+this._z*p,this._onChangeCallback(),this}slerpQuaternions(e,t,i){return this.copy(e).slerp(t,i)}random(){const e=2*Math.PI*Math.random(),t=2*Math.PI*Math.random(),i=Math.random(),r=Math.sqrt(1-i),s=Math.sqrt(i);return this.set(r*Math.sin(e),r*Math.cos(e),s*Math.sin(t),s*Math.cos(t))}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._onChangeCallback(),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 F{constructor(e=0,t=0,i=0){F.prototype.isVector3=!0,this.x=e,this.y=t,this.z=i}set(e,t,i){return i===void 0&&(i=this.z),this.x=e,this.y=t,this.z=i,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(eM.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(eM.setFromAxisAngle(e,t))}applyMatrix3(e){const t=this.x,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[3]*i+s[6]*r,this.y=s[1]*t+s[4]*i+s[7]*r,this.z=s[2]*t+s[5]*i+s[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){const t=this.x,i=this.y,r=this.z,s=e.elements,o=1/(s[3]*t+s[7]*i+s[11]*r+s[15]);return this.x=(s[0]*t+s[4]*i+s[8]*r+s[12])*o,this.y=(s[1]*t+s[5]*i+s[9]*r+s[13])*o,this.z=(s[2]*t+s[6]*i+s[10]*r+s[14])*o,this}applyQuaternion(e){const t=this.x,i=this.y,r=this.z,s=e.x,o=e.y,a=e.z,u=e.w,f=2*(o*r-a*i),h=2*(a*t-s*r),d=2*(s*i-o*t);return this.x=t+u*f+o*d-a*h,this.y=i+u*h+a*f-s*d,this.z=r+u*d+s*h-o*f,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,i=this.y,r=this.z,s=e.elements;return this.x=s[0]*t+s[4]*i+s[8]*r,this.y=s[1]*t+s[5]*i+s[9]*r,this.z=s[2]*t+s[6]*i+s[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 i=this.length();return this.divideScalar(i||1).multiplyScalar(Math.max(e,Math.min(t,i)))}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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(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,i){return this.x=e.x+(t.x-e.x)*i,this.y=e.y+(t.y-e.y)*i,this.z=e.z+(t.z-e.z)*i,this}cross(e){return this.crossVectors(this,e)}crossVectors(e,t){const i=e.x,r=e.y,s=e.z,o=t.x,a=t.y,u=t.z;return this.x=r*u-s*a,this.y=s*o-i*u,this.z=i*a-r*o,this}projectOnVector(e){const t=e.lengthSq();if(t===0)return this.set(0,0,0);const i=e.dot(this)/t;return this.copy(e).multiplyScalar(i)}projectOnPlane(e){return tv.copy(this).projectOnVector(e),this.sub(tv)}reflect(e){return this.sub(tv.copy(e).multiplyScalar(2*this.dot(e)))}angleTo(e){const t=Math.sqrt(this.lengthSq()*e.lengthSq());if(t===0)return Math.PI/2;const i=this.dot(e)/t;return Math.acos(pn(i,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){const t=this.x-e.x,i=this.y-e.y,r=this.z-e.z;return t*t+i*i+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,i){const r=Math.sin(t)*e;return this.x=r*Math.sin(i),this.y=Math.cos(t)*e,this.z=r*Math.cos(i),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,i){return this.x=e*Math.sin(t),this.y=i,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(),i=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=i,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}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=Math.random()*Math.PI*2,t=Math.random()*2-1,i=Math.sqrt(1-t*t);return this.x=i*Math.cos(e),this.y=t,this.z=i*Math.sin(e),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const tv=new F,eM=new On;class ni{constructor(e=new F(1/0,1/0,1/0),t=new F(-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,i=e.length;t=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,gr),gr.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,i;return e.normal.x>0?(t=e.normal.x*this.min.x,i=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,i=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,i+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,i+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,i+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,i+=e.normal.z*this.min.z),t<=-e.constant&&i>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Zc),qh.subVectors(this.max,Zc),al.subVectors(e.a,Zc),ll.subVectors(e.b,Zc),cl.subVectors(e.c,Zc),js.subVectors(ll,al),Ks.subVectors(cl,ll),Ho.subVectors(al,cl);let t=[0,-js.z,js.y,0,-Ks.z,Ks.y,0,-Ho.z,Ho.y,js.z,0,-js.x,Ks.z,0,-Ks.x,Ho.z,0,-Ho.x,-js.y,js.x,0,-Ks.y,Ks.x,0,-Ho.y,Ho.x,0];return!nv(t,al,ll,cl,qh)||(t=[1,0,0,0,1,0,0,0,1],!nv(t,al,ll,cl,qh))?!1:($h.crossVectors(js,Ks),t=[$h.x,$h.y,$h.z],nv(t,al,ll,cl,qh))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,gr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(gr).length()*.5),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()?this:(as[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),as[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),as[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),as[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),as[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),as[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),as[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),as[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(as),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 as=[new F,new F,new F,new F,new F,new F,new F,new F],gr=new F,Zh=new ni,al=new F,ll=new F,cl=new F,js=new F,Ks=new F,Ho=new F,Zc=new F,qh=new F,$h=new F,Go=new F;function nv(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){Go.fromArray(n,s);const a=r.x*Math.abs(Go.x)+r.y*Math.abs(Go.y)+r.z*Math.abs(Go.z),u=e.dot(Go),f=t.dot(Go),h=i.dot(Go);if(Math.max(-Math.max(u,f,h),Math.min(u,f,h))>a)return!1}return!0}const TL=new ni,qc=new F,iv=new F;class Vn{constructor(e=new F,t=-1){this.isSphere=!0,this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){const i=this.center;t!==void 0?i.copy(t):TL.setFromPoints(e).getCenter(i);let r=0;for(let s=0,o=e.length;sthis.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;qc.subVectors(e,this.center);const t=qc.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(qc,r/i),this.radius+=r}return this}union(e){return e.isEmpty()?this:this.isEmpty()?(this.copy(e),this):(this.center.equals(e.center)===!0?this.radius=Math.max(this.radius,e.radius):(iv.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(qc.copy(e.center).add(iv)),this.expandByPoint(qc.copy(e.center).sub(iv))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const ls=new F,rv=new F,ed=new F,Ys=new F,sv=new F,td=new F,ov=new F;class ka{constructor(e=new F,t=new F(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,ls)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);const i=t.dot(this.direction);return i<0?t.copy(this.origin):t.copy(this.origin).addScaledVector(this.direction,i)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){const t=ls.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(ls.copy(this.origin).addScaledVector(this.direction,t),ls.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){rv.copy(e).add(t).multiplyScalar(.5),ed.copy(t).sub(e).normalize(),Ys.copy(this.origin).sub(rv);const s=e.distanceTo(t)*.5,o=-this.direction.dot(ed),a=Ys.dot(this.direction),u=-Ys.dot(ed),f=Ys.lengthSq(),h=Math.abs(1-o*o);let d,p,v,y;if(h>0)if(d=o*u-a,p=o*a-u,y=s*h,d>=0)if(p>=-y)if(p<=y){const M=1/h;d*=M,p*=M,v=d*(d+o*p+2*a)+p*(o*d+p+2*u)+f}else p=s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*u)+f;else p=-s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*u)+f;else p<=-y?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-u),s),v=-d*d+p*(p+2*u)+f):p<=y?(d=0,p=Math.min(Math.max(-s,-u),s),v=p*(p+2*u)+f):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-u),s),v=-d*d+p*(p+2*u)+f);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),v=-d*d+p*(p+2*u)+f;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(rv).addScaledVector(ed,p),v}intersectSphere(e,t){ls.subVectors(e.center,this.origin);const i=ls.dot(this.direction),r=ls.dot(ls)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,u=i+o;return u<0?null:a<0?this.at(u,t):this.at(a,t)}intersectsSphere(e){return this.distanceSqToPoint(e.center)<=e.radius*e.radius}distanceToPlane(e){const t=e.normal.dot(this.direction);if(t===0)return e.distanceToPoint(this.origin)===0?0:null;const i=-(this.origin.dot(e.normal)+e.constant)/t;return i>=0?i:null}intersectPlane(e,t){const i=this.distanceToPlane(e);return i===null?null:this.at(i,t)}intersectsPlane(e){const t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let i,r,s,o,a,u;const f=1/this.direction.x,h=1/this.direction.y,d=1/this.direction.z,p=this.origin;return f>=0?(i=(e.min.x-p.x)*f,r=(e.max.x-p.x)*f):(i=(e.max.x-p.x)*f,r=(e.min.x-p.x)*f),h>=0?(s=(e.min.y-p.y)*h,o=(e.max.y-p.y)*h):(s=(e.max.y-p.y)*h,o=(e.min.y-p.y)*h),i>o||s>r||((s>i||isNaN(i))&&(i=s),(o=0?(a=(e.min.z-p.z)*d,u=(e.max.z-p.z)*d):(a=(e.max.z-p.z)*d,u=(e.min.z-p.z)*d),i>u||a>r)||((a>i||i!==i)&&(i=a),(u=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,ls)!==null}intersectTriangle(e,t,i,r,s){sv.subVectors(t,e),td.subVectors(i,e),ov.crossVectors(sv,td);let o=this.direction.dot(ov),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;Ys.subVectors(this.origin,e);const u=a*this.direction.dot(td.crossVectors(Ys,td));if(u<0)return null;const f=a*this.direction.dot(sv.cross(Ys));if(f<0||u+f>o)return null;const h=-a*Ys.dot(ov);return h<0?null:this.at(h/o,s)}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 rt{constructor(e,t,i,r,s,o,a,u,f,h,d,p,v,y,M,x){rt.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],e!==void 0&&this.set(e,t,i,r,s,o,a,u,f,h,d,p,v,y,M,x)}set(e,t,i,r,s,o,a,u,f,h,d,p,v,y,M,x){const g=this.elements;return g[0]=e,g[4]=t,g[8]=i,g[12]=r,g[1]=s,g[5]=o,g[9]=a,g[13]=u,g[2]=f,g[6]=h,g[10]=d,g[14]=p,g[3]=v,g[7]=y,g[11]=M,g[15]=x,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 rt().fromArray(this.elements)}copy(e){const t=this.elements,i=e.elements;return t[0]=i[0],t[1]=i[1],t[2]=i[2],t[3]=i[3],t[4]=i[4],t[5]=i[5],t[6]=i[6],t[7]=i[7],t[8]=i[8],t[9]=i[9],t[10]=i[10],t[11]=i[11],t[12]=i[12],t[13]=i[13],t[14]=i[14],t[15]=i[15],this}copyPosition(e){const t=this.elements,i=e.elements;return t[12]=i[12],t[13]=i[13],t[14]=i[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,i){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),i.setFromMatrixColumn(this,2),this}makeBasis(e,t,i){return this.set(e.x,t.x,i.x,0,e.y,t.y,i.y,0,e.z,t.z,i.z,0,0,0,0,1),this}extractRotation(e){const t=this.elements,i=e.elements,r=1/ul.setFromMatrixColumn(e,0).length(),s=1/ul.setFromMatrixColumn(e,1).length(),o=1/ul.setFromMatrixColumn(e,2).length();return t[0]=i[0]*r,t[1]=i[1]*r,t[2]=i[2]*r,t[3]=0,t[4]=i[4]*s,t[5]=i[5]*s,t[6]=i[6]*s,t[7]=0,t[8]=i[8]*o,t[9]=i[9]*o,t[10]=i[10]*o,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){const t=this.elements,i=e.x,r=e.y,s=e.z,o=Math.cos(i),a=Math.sin(i),u=Math.cos(r),f=Math.sin(r),h=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*h,v=o*d,y=a*h,M=a*d;t[0]=u*h,t[4]=-u*d,t[8]=f,t[1]=v+y*f,t[5]=p-M*f,t[9]=-a*u,t[2]=M-p*f,t[6]=y+v*f,t[10]=o*u}else if(e.order==="YXZ"){const p=u*h,v=u*d,y=f*h,M=f*d;t[0]=p+M*a,t[4]=y*a-v,t[8]=o*f,t[1]=o*d,t[5]=o*h,t[9]=-a,t[2]=v*a-y,t[6]=M+p*a,t[10]=o*u}else if(e.order==="ZXY"){const p=u*h,v=u*d,y=f*h,M=f*d;t[0]=p-M*a,t[4]=-o*d,t[8]=y+v*a,t[1]=v+y*a,t[5]=o*h,t[9]=M-p*a,t[2]=-o*f,t[6]=a,t[10]=o*u}else if(e.order==="ZYX"){const p=o*h,v=o*d,y=a*h,M=a*d;t[0]=u*h,t[4]=y*f-v,t[8]=p*f+M,t[1]=u*d,t[5]=M*f+p,t[9]=v*f-y,t[2]=-f,t[6]=a*u,t[10]=o*u}else if(e.order==="YZX"){const p=o*u,v=o*f,y=a*u,M=a*f;t[0]=u*h,t[4]=M-p*d,t[8]=y*d+v,t[1]=d,t[5]=o*h,t[9]=-a*h,t[2]=-f*h,t[6]=v*d+y,t[10]=p-M*d}else if(e.order==="XZY"){const p=o*u,v=o*f,y=a*u,M=a*f;t[0]=u*h,t[4]=-d,t[8]=f*h,t[1]=p*d+M,t[5]=o*h,t[9]=v*d-y,t[2]=y*d-v,t[6]=a*h,t[10]=M*d+p}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(RL,e,bL)}lookAt(e,t,i){const r=this.elements;return Di.subVectors(e,t),Di.lengthSq()===0&&(Di.z=1),Di.normalize(),Qs.crossVectors(i,Di),Qs.lengthSq()===0&&(Math.abs(i.z)===1?Di.x+=1e-4:Di.z+=1e-4,Di.normalize(),Qs.crossVectors(i,Di)),Qs.normalize(),nd.crossVectors(Di,Qs),r[0]=Qs.x,r[4]=nd.x,r[8]=Di.x,r[1]=Qs.y,r[5]=nd.y,r[9]=Di.y,r[2]=Qs.z,r[6]=nd.z,r[10]=Di.z,this}multiply(e){return this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){const i=e.elements,r=t.elements,s=this.elements,o=i[0],a=i[4],u=i[8],f=i[12],h=i[1],d=i[5],p=i[9],v=i[13],y=i[2],M=i[6],x=i[10],g=i[14],A=i[3],S=i[7],w=i[11],P=i[15],R=r[0],B=r[4],D=r[8],z=r[12],C=r[1],b=r[5],J=r[9],j=r[13],ee=r[2],ce=r[6],Z=r[10],ve=r[14],L=r[3],V=r[7],G=r[11],q=r[15];return s[0]=o*R+a*C+u*ee+f*L,s[4]=o*B+a*b+u*ce+f*V,s[8]=o*D+a*J+u*Z+f*G,s[12]=o*z+a*j+u*ve+f*q,s[1]=h*R+d*C+p*ee+v*L,s[5]=h*B+d*b+p*ce+v*V,s[9]=h*D+d*J+p*Z+v*G,s[13]=h*z+d*j+p*ve+v*q,s[2]=y*R+M*C+x*ee+g*L,s[6]=y*B+M*b+x*ce+g*V,s[10]=y*D+M*J+x*Z+g*G,s[14]=y*z+M*j+x*ve+g*q,s[3]=A*R+S*C+w*ee+P*L,s[7]=A*B+S*b+w*ce+P*V,s[11]=A*D+S*J+w*Z+P*G,s[15]=A*z+S*j+w*ve+P*q,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],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],u=e[9],f=e[13],h=e[2],d=e[6],p=e[10],v=e[14],y=e[3],M=e[7],x=e[11],g=e[15];return y*(+s*u*d-r*f*d-s*a*p+i*f*p+r*a*v-i*u*v)+M*(+t*u*v-t*f*p+s*o*p-r*o*v+r*f*h-s*u*h)+x*(+t*f*d-t*a*v-s*o*d+i*o*v+s*a*h-i*f*h)+g*(-r*a*h-t*u*d+t*a*p+r*o*d-i*o*p+i*u*h)}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,i){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]=i),this}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],u=e[6],f=e[7],h=e[8],d=e[9],p=e[10],v=e[11],y=e[12],M=e[13],x=e[14],g=e[15],A=d*x*f-M*p*f+M*u*v-a*x*v-d*u*g+a*p*g,S=y*p*f-h*x*f-y*u*v+o*x*v+h*u*g-o*p*g,w=h*M*f-y*d*f+y*a*v-o*M*v-h*a*g+o*d*g,P=y*d*u-h*M*u-y*a*p+o*M*p+h*a*x-o*d*x,R=t*A+i*S+r*w+s*P;if(R===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const B=1/R;return e[0]=A*B,e[1]=(M*p*s-d*x*s-M*r*v+i*x*v+d*r*g-i*p*g)*B,e[2]=(a*x*s-M*u*s+M*r*f-i*x*f-a*r*g+i*u*g)*B,e[3]=(d*u*s-a*p*s-d*r*f+i*p*f+a*r*v-i*u*v)*B,e[4]=S*B,e[5]=(h*x*s-y*p*s+y*r*v-t*x*v-h*r*g+t*p*g)*B,e[6]=(y*u*s-o*x*s-y*r*f+t*x*f+o*r*g-t*u*g)*B,e[7]=(o*p*s-h*u*s+h*r*f-t*p*f-o*r*v+t*u*v)*B,e[8]=w*B,e[9]=(y*d*s-h*M*s-y*i*v+t*M*v+h*i*g-t*d*g)*B,e[10]=(o*M*s-y*a*s+y*i*f-t*M*f-o*i*g+t*a*g)*B,e[11]=(h*a*s-o*d*s-h*i*f+t*d*f+o*i*v-t*a*v)*B,e[12]=P*B,e[13]=(h*M*r-y*d*r+y*i*p-t*M*p-h*i*x+t*d*x)*B,e[14]=(y*a*r-o*M*r-y*i*u+t*M*u+o*i*x-t*a*x)*B,e[15]=(o*d*r-h*a*r+h*i*u-t*d*u-o*i*p+t*a*p)*B,this}scale(e){const t=this.elements,i=e.x,r=e.y,s=e.z;return t[0]*=i,t[4]*=r,t[8]*=s,t[1]*=i,t[5]*=r,t[9]*=s,t[2]*=i,t[6]*=r,t[10]*=s,t[3]*=i,t[7]*=r,t[11]*=s,this}getMaxScaleOnAxis(){const e=this.elements,t=e[0]*e[0]+e[1]*e[1]+e[2]*e[2],i=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,i,r))}makeTranslation(e,t,i){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,i,0,0,0,1),this}makeRotationX(e){const t=Math.cos(e),i=Math.sin(e);return this.set(1,0,0,0,0,t,-i,0,0,i,t,0,0,0,0,1),this}makeRotationY(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,0,i,0,0,1,0,0,-i,0,t,0,0,0,0,1),this}makeRotationZ(e){const t=Math.cos(e),i=Math.sin(e);return this.set(t,-i,0,0,i,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){const i=Math.cos(t),r=Math.sin(t),s=1-i,o=e.x,a=e.y,u=e.z,f=s*o,h=s*a;return this.set(f*o+i,f*a-r*u,f*u+r*a,0,f*a+r*u,h*a+i,h*u-r*o,0,f*u-r*a,h*u+r*o,s*u*u+i,0,0,0,0,1),this}makeScale(e,t,i){return this.set(e,0,0,0,0,t,0,0,0,0,i,0,0,0,0,1),this}makeShear(e,t,i,r,s,o){return this.set(1,i,s,0,e,1,o,0,t,r,1,0,0,0,0,1),this}compose(e,t,i){const r=this.elements,s=t._x,o=t._y,a=t._z,u=t._w,f=s+s,h=o+o,d=a+a,p=s*f,v=s*h,y=s*d,M=o*h,x=o*d,g=a*d,A=u*f,S=u*h,w=u*d,P=i.x,R=i.y,B=i.z;return r[0]=(1-(M+g))*P,r[1]=(v+w)*P,r[2]=(y-S)*P,r[3]=0,r[4]=(v-w)*R,r[5]=(1-(p+g))*R,r[6]=(x+A)*R,r[7]=0,r[8]=(y+S)*B,r[9]=(x-A)*B,r[10]=(1-(p+M))*B,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,i){const r=this.elements;let s=ul.set(r[0],r[1],r[2]).length();const o=ul.set(r[4],r[5],r[6]).length(),a=ul.set(r[8],r[9],r[10]).length();this.determinant()<0&&(s=-s),e.x=r[12],e.y=r[13],e.z=r[14],vr.copy(this);const f=1/s,h=1/o,d=1/a;return vr.elements[0]*=f,vr.elements[1]*=f,vr.elements[2]*=f,vr.elements[4]*=h,vr.elements[5]*=h,vr.elements[6]*=h,vr.elements[8]*=d,vr.elements[9]*=d,vr.elements[10]*=d,t.setFromRotationMatrix(vr),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=Jr){const u=this.elements,f=2*s/(t-e),h=2*s/(i-r),d=(t+e)/(t-e),p=(i+r)/(i-r);let v,y;if(a===Jr)v=-(o+s)/(o-s),y=-2*o*s/(o-s);else if(a===af)v=-o/(o-s),y=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return u[0]=f,u[4]=0,u[8]=d,u[12]=0,u[1]=0,u[5]=h,u[9]=p,u[13]=0,u[2]=0,u[6]=0,u[10]=v,u[14]=y,u[3]=0,u[7]=0,u[11]=-1,u[15]=0,this}makeOrthographic(e,t,i,r,s,o,a=Jr){const u=this.elements,f=1/(t-e),h=1/(i-r),d=1/(o-s),p=(t+e)*f,v=(i+r)*h;let y,M;if(a===Jr)y=(o+s)*d,M=-2*d;else if(a===af)y=s*d,M=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return u[0]=2*f,u[4]=0,u[8]=0,u[12]=-p,u[1]=0,u[5]=2*h,u[9]=0,u[13]=-v,u[2]=0,u[6]=0,u[10]=M,u[14]=-y,u[3]=0,u[7]=0,u[11]=0,u[15]=1,this}equals(e){const t=this.elements,i=e.elements;for(let r=0;r<16;r++)if(t[r]!==i[r])return!1;return!0}fromArray(e,t=0){for(let i=0;i<16;i++)this.elements[i]=e[i+t];return this}toArray(e=[],t=0){const i=this.elements;return e[t]=i[0],e[t+1]=i[1],e[t+2]=i[2],e[t+3]=i[3],e[t+4]=i[4],e[t+5]=i[5],e[t+6]=i[6],e[t+7]=i[7],e[t+8]=i[8],e[t+9]=i[9],e[t+10]=i[10],e[t+11]=i[11],e[t+12]=i[12],e[t+13]=i[13],e[t+14]=i[14],e[t+15]=i[15],e}}const ul=new F,vr=new rt,RL=new F(0,0,0),bL=new F(1,1,1),Qs=new F,nd=new F,Di=new F,tM=new rt,nM=new On;class Vi{constructor(e=0,t=0,i=0,r=Vi.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=t,this._z=i,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,i,r=this._order){return this._x=e,this._y=t,this._z=i,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,i=!0){const r=e.elements,s=r[0],o=r[4],a=r[8],u=r[1],f=r[5],h=r[9],d=r[2],p=r[6],v=r[10];switch(t){case"XYZ":this._y=Math.asin(pn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,v),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,f),this._z=0);break;case"YXZ":this._x=Math.asin(-pn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,v),this._z=Math.atan2(u,f)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(pn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,v),this._z=Math.atan2(-o,f)):(this._y=0,this._z=Math.atan2(u,s));break;case"ZYX":this._y=Math.asin(-pn(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,v),this._z=Math.atan2(u,s)):(this._x=0,this._z=Math.atan2(-o,f));break;case"YZX":this._z=Math.asin(pn(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(-h,f),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,v));break;case"XZY":this._z=Math.asin(-pn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,f),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,v),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,i===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,i){return tM.makeRotationFromQuaternion(e),this.setFromRotationMatrix(tM,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return nM.setFromEuler(this),this.setFromQuaternion(nM,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],e[3]!==void 0&&(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}}Vi.DEFAULT_ORDER="XYZ";class Sa{constructor(){this.mask=1}set(e){this.mask=(1<>>0}enable(e){this.mask|=1<1){for(let t=0;t1){for(let i=0;i0&&(r.userData=this.userData),r.layers=this.layers.mask,r.matrix=this.matrix.toArray(),r.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(r.matrixAutoUpdate=!1),this.isInstancedMesh&&(r.type="InstancedMesh",r.count=this.count,r.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(r.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(r.type="BatchedMesh",r.perObjectFrustumCulled=this.perObjectFrustumCulled,r.sortObjects=this.sortObjects,r.drawRanges=this._drawRanges,r.reservedRanges=this._reservedRanges,r.visibility=this._visibility,r.active=this._active,r.bounds=this._bounds.map(a=>({boxInitialized:a.boxInitialized,boxMin:a.box.min.toArray(),boxMax:a.box.max.toArray(),sphereInitialized:a.sphereInitialized,sphereRadius:a.sphere.radius,sphereCenter:a.sphere.center.toArray()})),r.maxInstanceCount=this._maxInstanceCount,r.maxVertexCount=this._maxVertexCount,r.maxIndexCount=this._maxIndexCount,r.geometryInitialized=this._geometryInitialized,r.geometryCount=this._geometryCount,r.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(r.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(r.boundingSphere={center:r.boundingSphere.center.toArray(),radius:r.boundingSphere.radius}),this.boundingBox!==null&&(r.boundingBox={min:r.boundingBox.min.toArray(),max:r.boundingBox.max.toArray()}));function s(a,u){return a[u.uuid]===void 0&&(a[u.uuid]=u.toJSON(e)),u.uuid}if(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&&this.environment.isRenderTargetTexture!==!0&&(r.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){r.geometry=s(e.geometries,this.geometry);const a=this.geometry.parameters;if(a!==void 0&&a.shapes!==void 0){const u=a.shapes;if(Array.isArray(u))for(let f=0,h=u.length;f0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(i.geometries=a),u.length>0&&(i.materials=u),f.length>0&&(i.textures=f),h.length>0&&(i.images=h),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),v.length>0&&(i.animations=v),y.length>0&&(i.nodes=y)}return i.object=r,i;function o(a){const u=[];for(const f in a){const h=a[f];delete h.metadata,u.push(h)}return u}}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.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,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.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let i=0;i0?r.multiplyScalar(1/Math.sqrt(s)):r.set(0,0,0)}static getBarycoord(e,t,i,r,s){yr.subVectors(r,t),us.subVectors(i,t),lv.subVectors(e,t);const o=yr.dot(yr),a=yr.dot(us),u=yr.dot(lv),f=us.dot(us),h=us.dot(lv),d=o*f-a*a;if(d===0)return s.set(0,0,0),null;const p=1/d,v=(f*u-a*h)*p,y=(o*h-a*u)*p;return s.set(1-v-y,y,v)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,fs)===null?!1:fs.x>=0&&fs.y>=0&&fs.x+fs.y<=1}static getInterpolation(e,t,i,r,s,o,a,u){return this.getBarycoord(e,t,i,r,fs)===null?(u.x=0,u.y=0,"z"in u&&(u.z=0),"w"in u&&(u.w=0),null):(u.setScalar(0),u.addScaledVector(s,fs.x),u.addScaledVector(o,fs.y),u.addScaledVector(a,fs.z),u)}static getInterpolatedAttribute(e,t,i,r,s,o){return hv.setScalar(0),dv.setScalar(0),pv.setScalar(0),hv.fromBufferAttribute(e,t),dv.fromBufferAttribute(e,i),pv.fromBufferAttribute(e,r),o.setScalar(0),o.addScaledVector(hv,s.x),o.addScaledVector(dv,s.y),o.addScaledVector(pv,s.z),o}static isFrontFacing(e,t,i,r){return yr.subVectors(i,t),us.subVectors(e,t),yr.cross(us).dot(r)<0}set(e,t,i){return this.a.copy(e),this.b.copy(t),this.c.copy(i),this}setFromPointsAndIndices(e,t,i,r){return this.a.copy(e[t]),this.b.copy(e[i]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,i,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,i),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 yr.subVectors(this.c,this.b),us.subVectors(this.a,this.b),yr.cross(us).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Mi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Mi.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,s){return Mi.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return Mi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Mi.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){const i=this.a,r=this.b,s=this.c;let o,a;dl.subVectors(r,i),pl.subVectors(s,i),cv.subVectors(e,i);const u=dl.dot(cv),f=pl.dot(cv);if(u<=0&&f<=0)return t.copy(i);uv.subVectors(e,r);const h=dl.dot(uv),d=pl.dot(uv);if(h>=0&&d<=h)return t.copy(r);const p=u*d-h*f;if(p<=0&&u>=0&&h<=0)return o=u/(u-h),t.copy(i).addScaledVector(dl,o);fv.subVectors(e,s);const v=dl.dot(fv),y=pl.dot(fv);if(y>=0&&v<=y)return t.copy(s);const M=v*f-u*y;if(M<=0&&f>=0&&y<=0)return a=f/(f-y),t.copy(i).addScaledVector(pl,a);const x=h*y-v*d;if(x<=0&&d-h>=0&&v-y>=0)return lM.subVectors(s,r),a=(d-h)/(d-h+(v-y)),t.copy(r).addScaledVector(lM,a);const g=1/(x+M+p);return o=M*g,a=p*g,t.copy(i).addScaledVector(dl,o).addScaledVector(pl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const fR={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},Zs={h:0,s:0,l:0},rd={h:0,s:0,l:0};function mv(n,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?n+(e-n)*6*t:t<1/2?e:t<2/3?n+(e-n)*6*(2/3-t):n}class Ie{constructor(e,t,i){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(e,t,i)}set(e,t,i){if(t===void 0&&i===void 0){const r=e;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(e,t,i);return this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e,t=ir){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Gt.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Gt.workingColorSpace){return this.r=e,this.g=t,this.b=i,Gt.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Gt.workingColorSpace){if(e=wx(e,1),t=pn(t,0,1),i=pn(i,0,1),t===0)this.r=this.g=this.b=i;else{const s=i<=.5?i*(1+t):i+t-i*t,o=2*i-s;this.r=mv(o,s,e+1/3),this.g=mv(o,s,e),this.b=mv(o,s,e-1/3)}return Gt.toWorkingColorSpace(this,r),this}setStyle(e,t=ir){function i(s){s!==void 0&&parseFloat(s)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(e)){let s;const o=r[1],a=r[2];switch(o){case"rgb":case"rgba":if(s=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(255,parseInt(s[1],10))/255,Math.min(255,parseInt(s[2],10))/255,Math.min(255,parseInt(s[3],10))/255,t);if(s=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setRGB(Math.min(100,parseInt(s[1],10))/100,Math.min(100,parseInt(s[2],10))/100,Math.min(100,parseInt(s[3],10))/100,t);break;case"hsl":case"hsla":if(s=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return i(s[4]),this.setHSL(parseFloat(s[1])/360,parseFloat(s[2])/100,parseFloat(s[3])/100,t);break;default:console.warn("THREE.Color: Unknown color model "+e)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){const s=r[1],o=s.length;if(o===3)return this.setRGB(parseInt(s.charAt(0),16)/15,parseInt(s.charAt(1),16)/15,parseInt(s.charAt(2),16)/15,t);if(o===6)return this.setHex(parseInt(s,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=ir){const i=fR[e.toLowerCase()];return i!==void 0?this.setHex(i,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=Zl(e.r),this.g=Zl(e.g),this.b=Zl(e.b),this}copyLinearToSRGB(e){return this.r=$0(e.r),this.g=$0(e.g),this.b=$0(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=ir){return Gt.fromWorkingColorSpace(qn.copy(this),e),Math.round(pn(qn.r*255,0,255))*65536+Math.round(pn(qn.g*255,0,255))*256+Math.round(pn(qn.b*255,0,255))}getHexString(e=ir){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Gt.workingColorSpace){Gt.fromWorkingColorSpace(qn.copy(this),t);const i=qn.r,r=qn.g,s=qn.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let u,f;const h=(a+o)/2;if(a===o)u=0,f=0;else{const d=o-a;switch(f=h<=.5?d/(o+a):d/(2-o-a),o){case i:u=(r-s)/d+(r0!=e>0&&this.version++,this._alphaTest=e}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(const t in e){const i=e[t];if(i===void 0){console.warn(`THREE.Material: parameter '${t}' has value of undefined.`);continue}const r=this[t];if(r===void 0){console.warn(`THREE.Material: '${t}' is not a property of THREE.${this.type}.`);continue}r&&r.isColor?r.set(i):r&&r.isVector3&&i&&i.isVector3?r.copy(i):this[t]=i}}toJSON(e){const t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});const i={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};i.uuid=this.uuid,i.type=this.type,this.name!==""&&(i.name=this.name),this.color&&this.color.isColor&&(i.color=this.color.getHex()),this.roughness!==void 0&&(i.roughness=this.roughness),this.metalness!==void 0&&(i.metalness=this.metalness),this.sheen!==void 0&&(i.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(i.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(i.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(i.emissive=this.emissive.getHex()),this.emissiveIntensity!==void 0&&this.emissiveIntensity!==1&&(i.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(i.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(i.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(i.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(i.shininess=this.shininess),this.clearcoat!==void 0&&(i.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(i.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(i.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(i.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(i.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,i.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.dispersion!==void 0&&(i.dispersion=this.dispersion),this.iridescence!==void 0&&(i.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(i.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(i.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(i.iridescenceMap=this.iridescenceMap.toJSON(e).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(i.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(e).uuid),this.anisotropy!==void 0&&(i.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(i.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(i.anisotropyMap=this.anisotropyMap.toJSON(e).uuid),this.map&&this.map.isTexture&&(i.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(i.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(i.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(i.lightMap=this.lightMap.toJSON(e).uuid,i.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(i.aoMap=this.aoMap.toJSON(e).uuid,i.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(i.bumpMap=this.bumpMap.toJSON(e).uuid,i.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(i.normalMap=this.normalMap.toJSON(e).uuid,i.normalMapType=this.normalMapType,i.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(i.displacementMap=this.displacementMap.toJSON(e).uuid,i.displacementScale=this.displacementScale,i.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(i.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(i.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(i.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(i.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(i.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(i.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(i.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(i.combine=this.combine)),this.envMapRotation!==void 0&&(i.envMapRotation=this.envMapRotation.toArray()),this.envMapIntensity!==void 0&&(i.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(i.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(i.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(i.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(i.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(i.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(i.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(i.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(i.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(i.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(i.size=this.size),this.shadowSide!==null&&(i.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(i.sizeAttenuation=this.sizeAttenuation),this.blending!==_a&&(i.blending=this.blending),this.side!==$r&&(i.side=this.side),this.vertexColors===!0&&(i.vertexColors=!0),this.opacity<1&&(i.opacity=this.opacity),this.transparent===!0&&(i.transparent=!0),this.blendSrc!==Np&&(i.blendSrc=this.blendSrc),this.blendDst!==Fp&&(i.blendDst=this.blendDst),this.blendEquation!==ao&&(i.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(i.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(i.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(i.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(i.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(i.blendAlpha=this.blendAlpha),this.depthFunc!==ba&&(i.depthFunc=this.depthFunc),this.depthTest===!1&&(i.depthTest=this.depthTest),this.depthWrite===!1&&(i.depthWrite=this.depthWrite),this.colorWrite===!1&&(i.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(i.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==e_&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ra&&(i.stencilFail=this.stencilFail),this.stencilZFail!==ra&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==ra&&(i.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(i.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(i.rotation=this.rotation),this.polygonOffset===!0&&(i.polygonOffset=!0),this.polygonOffsetFactor!==0&&(i.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(i.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(i.linewidth=this.linewidth),this.dashSize!==void 0&&(i.dashSize=this.dashSize),this.gapSize!==void 0&&(i.gapSize=this.gapSize),this.scale!==void 0&&(i.scale=this.scale),this.dithering===!0&&(i.dithering=!0),this.alphaTest>0&&(i.alphaTest=this.alphaTest),this.alphaHash===!0&&(i.alphaHash=!0),this.alphaToCoverage===!0&&(i.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(i.premultipliedAlpha=!0),this.forceSinglePass===!0&&(i.forceSinglePass=!0),this.wireframe===!0&&(i.wireframe=!0),this.wireframeLinewidth>1&&(i.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(i.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(i.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(i.flatShading=!0),this.visible===!1&&(i.visible=!1),this.toneMapped===!1&&(i.toneMapped=!1),this.fog===!1&&(i.fog=!1),Object.keys(this.userData).length>0&&(i.userData=this.userData);function r(s){const o=[];for(const a in s){const u=s[a];delete u.metadata,o.push(u)}return o}if(t){const s=r(e.textures),o=r(e.images);s.length>0&&(i.textures=s),o.length>0&&(i.images=o)}return i}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.blendColor.copy(e.blendColor),this.blendAlpha=e.blendAlpha,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 i=null;if(t!==null){const r=t.length;i=new Array(r);for(let s=0;s!==r;++s)i[s]=t[s].clone()}return this.clippingPlanes=i,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){e===!0&&this.version++}onBuild(){console.warn("Material: onBuild() has been removed.")}}class ki extends En{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Ie(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.envMapRotation=new Vi,this.combine=xf,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.envMapRotation.copy(e.envMapRotation),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 ys=NL();function NL(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),r=new Uint32Array(512);for(let u=0;u<256;++u){const f=u-127;f<-27?(i[u]=0,i[u|256]=32768,r[u]=24,r[u|256]=24):f<-14?(i[u]=1024>>-f-14,i[u|256]=1024>>-f-14|32768,r[u]=-f-1,r[u|256]=-f-1):f<=15?(i[u]=f+15<<10,i[u|256]=f+15<<10|32768,r[u]=13,r[u|256]=13):f<128?(i[u]=31744,i[u|256]=64512,r[u]=24,r[u|256]=24):(i[u]=31744,i[u|256]=64512,r[u]=13,r[u|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let u=1;u<1024;++u){let f=u<<13,h=0;for(;!(f&8388608);)f<<=1,h-=8388608;f&=-8388609,h+=947912704,s[u]=f|h}for(let u=1024;u<2048;++u)s[u]=939524096+(u-1024<<13);for(let u=1;u<31;++u)o[u]=u<<23;o[31]=1199570944,o[32]=2147483648;for(let u=33;u<63;++u)o[u]=2147483648+(u-32<<23);o[63]=3347054592;for(let u=1;u<64;++u)u!==32&&(a[u]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function Ai(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=pn(n,-65504,65504),ys.floatView[0]=n;const e=ys.uint32View[0],t=e>>23&511;return ys.baseTable[t]+((e&8388607)>>ys.shiftTable[t])}function gu(n){const e=n>>10;return ys.uint32View[0]=ys.mantissaTable[ys.offsetTable[e]+(n&1023)]+ys.exponentTable[e],ys.floatView[0]}const FL={toHalfFloat:Ai,fromHalfFloat:gu},Sn=new F,sd=new fe;class Ut{constructor(e,t,i=!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=e!==void 0?e.length/t:0,this.normalized=i,this.usage=of,this.updateRanges=[],this.gpuType=wi,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}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,i){e*=this.itemSize,i*=t.itemSize;for(let r=0,s=this.itemSize;r0&&(e.userData=this.userData),this.parameters!==void 0){const u=this.parameters;for(const f in u)u[f]!==void 0&&(e[f]=u[f]);return e}e.data={attributes:{}};const t=this.index;t!==null&&(e.data.index={type:t.array.constructor.name,array:Array.prototype.slice.call(t.array)});const i=this.attributes;for(const u in i){const f=i[u];e.data.attributes[u]=f.toJSON(e.data)}const r={};let s=!1;for(const u in this.morphAttributes){const f=this.morphAttributes[u],h=[];for(let d=0,p=f.length;d0&&(r[u]=h,s=!0)}s&&(e.data.morphAttributes=r,e.data.morphTargetsRelative=this.morphTargetsRelative);const o=this.groups;o.length>0&&(e.data.groups=JSON.parse(JSON.stringify(o)));const a=this.boundingSphere;return a!==null&&(e.data.boundingSphere={center:a.center.toArray(),radius:a.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 i=e.index;i!==null&&this.setIndex(i.clone(t));const r=e.attributes;for(const f in r){const h=r[f];this.setAttribute(f,h.clone(t))}const s=e.morphAttributes;for(const f in s){const h=[],d=s[f];for(let p=0,v=d.length;p0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;s(e.far-e.near)**2))&&(cM.copy(s).invert(),Vo.copy(e.ray).applyMatrix4(cM),!(i.boundingBox!==null&&Vo.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,Vo)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,u=s.attributes.position,f=s.attributes.uv,h=s.attributes.uv1,d=s.attributes.normal,p=s.groups,v=s.drawRange;if(a!==null)if(Array.isArray(o))for(let y=0,M=p.length;yt.far?null:{distance:f,point:fd.clone(),object:n}}function hd(n,e,t,i,r,s,o,a,u,f){n.getVertexPosition(a,ad),n.getVertexPosition(u,ld),n.getVertexPosition(f,cd);const h=WL(n,e,t,i,ad,ld,cd,fM);if(h){const d=new F;Mi.getBarycoord(fM,ad,ld,cd,d),r&&(h.uv=Mi.getInterpolatedAttribute(r,a,u,f,d,new fe)),s&&(h.uv1=Mi.getInterpolatedAttribute(s,a,u,f,d,new fe)),o&&(h.normal=Mi.getInterpolatedAttribute(o,a,u,f,d,new F),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const p={a,b:u,c:f,normal:new F,materialIndex:0};Mi.getNormal(ad,ld,cd,p.normal),h.face=p,h.barycoord=d}return h}class za extends _t{constructor(e=1,t=1,i=1,r=1,s=1,o=1){super(),this.type="BoxGeometry",this.parameters={width:e,height:t,depth:i,widthSegments:r,heightSegments:s,depthSegments:o};const a=this;r=Math.floor(r),s=Math.floor(s),o=Math.floor(o);const u=[],f=[],h=[],d=[];let p=0,v=0;y("z","y","x",-1,-1,i,t,e,o,s,0),y("z","y","x",1,-1,i,t,-e,o,s,1),y("x","z","y",1,1,e,i,t,r,o,2),y("x","z","y",1,-1,e,i,-t,r,o,3),y("x","y","z",1,-1,e,t,i,r,s,4),y("x","y","z",-1,-1,e,t,-i,r,s,5),this.setIndex(u),this.setAttribute("position",new qe(f,3)),this.setAttribute("normal",new qe(h,3)),this.setAttribute("uv",new qe(d,2));function y(M,x,g,A,S,w,P,R,B,D,z){const C=w/B,b=P/D,J=w/2,j=P/2,ee=R/2,ce=B+1,Z=D+1;let ve=0,L=0;const V=new F;for(let G=0;G0?1:-1,h.push(V.x,V.y,V.z),d.push(ye/B),d.push(1-G/D),ve+=1}}for(let G=0;G0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const i={};for(const r in this.extensions)this.extensions[r]===!0&&(i[r]=!0);return Object.keys(i).length>0&&(t.extensions=i),t}}class Mf extends Bt{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new rt,this.projectionMatrix=new rt,this.projectionMatrixInverse=new rt,this.coordinateSystem=Jr}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){return super.getWorldDirection(e).negate()}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)}}const qs=new F,hM=new fe,dM=new fe;class on extends Mf{constructor(e=50,t=1,i=.1,r=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=i,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=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){const t=.5*this.getFilmHeight()/e;this.fov=uc*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(Aa*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return uc*2*Math.atan(Math.tan(Aa*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}getViewBounds(e,t,i){qs.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(qs.x,qs.y).multiplyScalar(-e/qs.z),qs.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(qs.x,qs.y).multiplyScalar(-e/qs.z)}getViewSize(e,t){return this.getViewBounds(e,hM,dM),t.subVectors(dM,hM)}setViewOffset(e,t,i,r,s,o){this.aspect=e/t,this.view===null&&(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=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=this.near;let t=e*Math.tan(Aa*.5*this.fov)/this.zoom,i=2*t,r=this.aspect*i,s=-.5*r;const o=this.view;if(this.view!==null&&this.view.enabled){const u=o.fullWidth,f=o.fullHeight;s+=o.offsetX*r/u,t-=o.offsetY*i/f,r*=o.width/u,i*=o.height/f}const a=this.filmOffset;a!==0&&(s+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(s,s+r,t,t-i,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,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}}const gl=-90,vl=1;class pR extends Bt{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new on(gl,vl,e,t);r.layers=this.layers,this.add(r);const s=new on(gl,vl,e,t);s.layers=this.layers,this.add(s);const o=new on(gl,vl,e,t);o.layers=this.layers,this.add(o);const a=new on(gl,vl,e,t);a.layers=this.layers,this.add(a);const u=new on(gl,vl,e,t);u.layers=this.layers,this.add(u);const f=new on(gl,vl,e,t);f.layers=this.layers,this.add(f)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,u]=t;for(const f of t)this.remove(f);if(e===Jr)i.up.set(0,1,0),i.lookAt(1,0,0),r.up.set(0,1,0),r.lookAt(-1,0,0),s.up.set(0,0,-1),s.lookAt(0,1,0),o.up.set(0,0,1),o.lookAt(0,-1,0),a.up.set(0,1,0),a.lookAt(0,0,1),u.up.set(0,1,0),u.lookAt(0,0,-1);else if(e===af)i.up.set(0,-1,0),i.lookAt(-1,0,0),r.up.set(0,-1,0),r.lookAt(1,0,0),s.up.set(0,0,1),s.lookAt(0,1,0),o.up.set(0,0,-1),o.lookAt(0,-1,0),a.up.set(0,-1,0),a.lookAt(0,0,1),u.up.set(0,-1,0),u.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+e);for(const f of t)this.add(f),f.updateMatrixWorld()}update(e,t){this.parent===null&&this.updateMatrixWorld();const{renderTarget:i,activeMipmapLevel:r}=this;this.coordinateSystem!==e.coordinateSystem&&(this.coordinateSystem=e.coordinateSystem,this.updateCoordinateSystem());const[s,o,a,u,f,h]=this.children,d=e.getRenderTarget(),p=e.getActiveCubeFace(),v=e.getActiveMipmapLevel(),y=e.xr.enabled;e.xr.enabled=!1;const M=i.texture.generateMipmaps;i.texture.generateMipmaps=!1,e.setRenderTarget(i,0,r),e.render(t,s),e.setRenderTarget(i,1,r),e.render(t,o),e.setRenderTarget(i,2,r),e.render(t,a),e.setRenderTarget(i,3,r),e.render(t,u),e.setRenderTarget(i,4,r),e.render(t,f),i.texture.generateMipmaps=M,e.setRenderTarget(i,5,r),e.render(t,h),e.setRenderTarget(d,p,v),e.xr.enabled=y,i.texture.needsPMREMUpdate=!0}}class Ef extends qt{constructor(e,t,i,r,s,o,a,u,f,h){e=e!==void 0?e:[],t=t!==void 0?t:Bs,super(e,t,i,r,s,o,a,u,f,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class mR extends br{constructor(e=1,t={}){super(e,e,t),this.isWebGLCubeRenderTarget=!0;const i={width:e,height:e,depth:1},r=[i,i,i,i,i,i];this.texture=new Ef(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=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:mn}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 i={uniforms:{tEquirect:{value:null}},vertexShader:` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - `,fragmentShader:` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); - - gl_FragColor = texture2D( tEquirect, sampleUV ); - - } - `},r=new za(5,5,5),s=new Br({name:"CubemapFromEquirect",uniforms:fc(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:mi,blending:Es});s.uniforms.tEquirect.value=t;const o=new _n(r,s),a=t.minFilter;return t.minFilter===ar&&(t.minFilter=mn),new pR(1,10,this).update(e,o),t.minFilter=a,o.geometry.dispose(),o.material.dispose(),this}clear(e,t,i,r){const s=e.getRenderTarget();for(let o=0;o<6;o++)e.setRenderTarget(this,o),e.clear(t,i,r);e.setRenderTarget(s)}}const yv=new F,KL=new F,YL=new xt;class gs{constructor(e=new F(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,i,r){return this.normal.set(e,t,i),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,i){const r=yv.subVectors(i,t).cross(KL.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 i=e.delta(yv),r=this.normal.dot(i);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;const s=-(e.start.dot(this.normal)+this.constant)/r;return s<0||s>1?null:t.copy(e.start).addScaledVector(i,s)}intersectsLine(e){const t=this.distanceToPoint(e.start),i=this.distanceToPoint(e.end);return t<0&&i>0||i<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 i=t||YL.getNormalMatrix(e),r=this.coplanarPoint(yv).applyMatrix4(e),s=this.normal.applyMatrix3(i).normalize();return this.constant=-r.dot(s),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 Wo=new Vn,dd=new F;class wf{constructor(e=new gs,t=new gs,i=new gs,r=new gs,s=new gs,o=new gs){this.planes=[e,t,i,r,s,o]}set(e,t,i,r,s,o){const a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(i),a[3].copy(r),a[4].copy(s),a[5].copy(o),this}copy(e){const t=this.planes;for(let i=0;i<6;i++)t[i].copy(e.planes[i]);return this}setFromProjectionMatrix(e,t=Jr){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],u=r[3],f=r[4],h=r[5],d=r[6],p=r[7],v=r[8],y=r[9],M=r[10],x=r[11],g=r[12],A=r[13],S=r[14],w=r[15];if(i[0].setComponents(u-s,p-f,x-v,w-g).normalize(),i[1].setComponents(u+s,p+f,x+v,w+g).normalize(),i[2].setComponents(u+o,p+h,x+y,w+A).normalize(),i[3].setComponents(u-o,p-h,x-y,w-A).normalize(),i[4].setComponents(u-a,p-d,x-M,w-S).normalize(),t===Jr)i[5].setComponents(u+a,p+d,x+M,w+S).normalize();else if(t===af)i[5].setComponents(a,d,M,S).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+t);return this}intersectsObject(e){if(e.boundingSphere!==void 0)e.boundingSphere===null&&e.computeBoundingSphere(),Wo.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),Wo.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(Wo)}intersectsSprite(e){return Wo.center.set(0,0,0),Wo.radius=.7071067811865476,Wo.applyMatrix4(e.matrixWorld),this.intersectsSphere(Wo)}intersectsSphere(e){const t=this.planes,i=e.center,r=-e.radius;for(let s=0;s<6;s++)if(t[s].distanceToPoint(i)0?e.max.x:e.min.x,dd.y=r.normal.y>0?e.max.y:e.min.y,dd.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(dd)<0)return!1}return!0}containsPoint(e){const t=this.planes;for(let i=0;i<6;i++)if(t[i].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function gR(){let n=null,e=!1,t=null,i=null;function r(s,o){t(s,o),i=n.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(i=n.requestAnimationFrame(r),e=!0)},stop:function(){n.cancelAnimationFrame(i),e=!1},setAnimationLoop:function(s){t=s},setContext:function(s){n=s}}}function QL(n){const e=new WeakMap;function t(a,u){const f=a.array,h=a.usage,d=f.byteLength,p=n.createBuffer();n.bindBuffer(u,p),n.bufferData(u,f,h),a.onUploadCallback();let v;if(f instanceof Float32Array)v=n.FLOAT;else if(f instanceof Uint16Array)a.isFloat16BufferAttribute?v=n.HALF_FLOAT:v=n.UNSIGNED_SHORT;else if(f instanceof Int16Array)v=n.SHORT;else if(f instanceof Uint32Array)v=n.UNSIGNED_INT;else if(f instanceof Int32Array)v=n.INT;else if(f instanceof Int8Array)v=n.BYTE;else if(f instanceof Uint8Array)v=n.UNSIGNED_BYTE;else if(f instanceof Uint8ClampedArray)v=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:p,type:v,bytesPerElement:f.BYTES_PER_ELEMENT,version:a.version,size:d}}function i(a,u,f){const h=u.array,d=u.updateRanges;if(n.bindBuffer(f,a),d.length===0)n.bufferSubData(f,0,h);else{d.sort((v,y)=>v.start-y.start);let p=0;for(let v=1;v 0 - vec4 plane; - #ifdef ALPHA_TO_COVERAGE - float distanceToPlane, distanceGradient; - float clipOpacity = 1.0; - #pragma unroll_loop_start - for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; - distanceGradient = fwidth( distanceToPlane ) / 2.0; - clipOpacity *= smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); - if ( clipOpacity == 0.0 ) discard; - } - #pragma unroll_loop_end - #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES - float unionClipOpacity = 1.0; - #pragma unroll_loop_start - for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - distanceToPlane = - dot( vClipPosition, plane.xyz ) + plane.w; - distanceGradient = fwidth( distanceToPlane ) / 2.0; - unionClipOpacity *= 1.0 - smoothstep( - distanceGradient, distanceGradient, distanceToPlane ); - } - #pragma unroll_loop_end - clipOpacity *= 1.0 - unionClipOpacity; - #endif - diffuseColor.a *= clipOpacity; - if ( diffuseColor.a == 0.0 ) discard; - #else - #pragma unroll_loop_start - for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; - } - #pragma unroll_loop_end - #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES - bool clipped = true; - #pragma unroll_loop_start - for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; - } - #pragma unroll_loop_end - if ( clipped ) discard; - #endif - #endif -#endif`,d3=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,p3=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; -#endif`,m3=`#if NUM_CLIPPING_PLANES > 0 - vClipPosition = - mvPosition.xyz; -#endif`,g3=`#if defined( USE_COLOR_ALPHA ) - diffuseColor *= vColor; -#elif defined( USE_COLOR ) - diffuseColor.rgb *= vColor; -#endif`,v3=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) - varying vec3 vColor; -#endif`,y3=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) - varying vec3 vColor; -#endif`,_3=`#if defined( USE_COLOR_ALPHA ) - vColor = vec4( 1.0 ); -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) - vColor = vec3( 1.0 ); -#endif -#ifdef USE_COLOR - vColor *= color; -#endif -#ifdef USE_INSTANCING_COLOR - vColor.xyz *= instanceColor.xyz; -#endif -#ifdef USE_BATCHING_COLOR - vec3 batchingColor = getBatchingColor( getIndirectIndex( gl_DrawID ) ); - vColor.xyz *= batchingColor.xyz; -#endif`,x3=`#define PI 3.141592653589793 -#define PI2 6.283185307179586 -#define PI_HALF 1.5707963267948966 -#define RECIPROCAL_PI 0.3183098861837907 -#define RECIPROCAL_PI2 0.15915494309189535 -#define EPSILON 1e-6 -#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -#define whiteComplement( a ) ( 1.0 - saturate( a ) ) -float pow2( const in float x ) { return x*x; } -vec3 pow2( const in vec3 x ) { return x*x; } -float pow3( const in float x ) { return x*x*x; } -float pow4( const in float x ) { float x2 = x*x; return x2*x2; } -float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } -float average( const in vec3 v ) { return dot( v, vec3( 0.3333333 ) ); } -highp float rand( const in vec2 uv ) { - const highp float a = 12.9898, b = 78.233, c = 43758.5453; - highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); - return fract( sin( sn ) * c ); -} -#ifdef HIGH_PRECISION - float precisionSafeLength( vec3 v ) { return length( v ); } -#else - float precisionSafeLength( vec3 v ) { - float maxComponent = max3( abs( v ) ); - return length( v / maxComponent ) * maxComponent; - } -#endif -struct IncidentLight { - vec3 color; - vec3 direction; - bool visible; -}; -struct ReflectedLight { - vec3 directDiffuse; - vec3 directSpecular; - vec3 indirectDiffuse; - vec3 indirectSpecular; -}; -#ifdef USE_ALPHAHASH - varying vec3 vPosition; -#endif -vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); -} -vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); -} -mat3 transposeMat3( const in mat3 m ) { - mat3 tmp; - tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); - tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); - tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); - return tmp; -} -bool isPerspectiveMatrix( mat4 m ) { - return m[ 2 ][ 3 ] == - 1.0; -} -vec2 equirectUv( in vec3 dir ) { - float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; - float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; - return vec2( u, v ); -} -vec3 BRDF_Lambert( const in vec3 diffuseColor ) { - return RECIPROCAL_PI * diffuseColor; -} -vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { - float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); - return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} -float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { - float fresnel = exp2( ( - 5.55473 * dotVH - 6.98316 ) * dotVH ); - return f0 * ( 1.0 - fresnel ) + ( f90 * fresnel ); -} // validated`,A3=`#ifdef ENVMAP_TYPE_CUBE_UV - #define cubeUV_minMipLevel 4.0 - #define cubeUV_minTileSize 16.0 - float getFace( vec3 direction ) { - vec3 absDirection = abs( direction ); - float face = - 1.0; - if ( absDirection.x > absDirection.z ) { - if ( absDirection.x > absDirection.y ) - face = direction.x > 0.0 ? 0.0 : 3.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } else { - if ( absDirection.z > absDirection.y ) - face = direction.z > 0.0 ? 2.0 : 5.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } - return face; - } - vec2 getUV( vec3 direction, float face ) { - vec2 uv; - if ( face == 0.0 ) { - uv = vec2( direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 1.0 ) { - uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); - } else if ( face == 2.0 ) { - uv = vec2( - direction.x, direction.y ) / abs( direction.z ); - } else if ( face == 3.0 ) { - uv = vec2( - direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 4.0 ) { - uv = vec2( - direction.x, direction.z ) / abs( direction.y ); - } else { - uv = vec2( direction.x, direction.y ) / abs( direction.z ); - } - return 0.5 * ( uv + 1.0 ); - } - vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { - float face = getFace( direction ); - float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); - mipInt = max( mipInt, cubeUV_minMipLevel ); - float faceSize = exp2( mipInt ); - highp vec2 uv = getUV( direction, face ) * ( faceSize - 2.0 ) + 1.0; - if ( face > 2.0 ) { - uv.y += faceSize; - face -= 3.0; - } - uv.x += face * faceSize; - uv.x += filterInt * 3.0 * cubeUV_minTileSize; - uv.y += 4.0 * ( exp2( CUBEUV_MAX_MIP ) - faceSize ); - uv.x *= CUBEUV_TEXEL_WIDTH; - uv.y *= CUBEUV_TEXEL_HEIGHT; - #ifdef texture2DGradEXT - return texture2DGradEXT( envMap, uv, vec2( 0.0 ), vec2( 0.0 ) ).rgb; - #else - return texture2D( envMap, uv ).rgb; - #endif - } - #define cubeUV_r0 1.0 - #define cubeUV_m0 - 2.0 - #define cubeUV_r1 0.8 - #define cubeUV_m1 - 1.0 - #define cubeUV_r4 0.4 - #define cubeUV_m4 2.0 - #define cubeUV_r5 0.305 - #define cubeUV_m5 3.0 - #define cubeUV_r6 0.21 - #define cubeUV_m6 4.0 - float roughnessToMip( float roughness ) { - float mip = 0.0; - if ( roughness >= cubeUV_r1 ) { - mip = ( cubeUV_r0 - roughness ) * ( cubeUV_m1 - cubeUV_m0 ) / ( cubeUV_r0 - cubeUV_r1 ) + cubeUV_m0; - } else if ( roughness >= cubeUV_r4 ) { - mip = ( cubeUV_r1 - roughness ) * ( cubeUV_m4 - cubeUV_m1 ) / ( cubeUV_r1 - cubeUV_r4 ) + cubeUV_m1; - } else if ( roughness >= cubeUV_r5 ) { - mip = ( cubeUV_r4 - roughness ) * ( cubeUV_m5 - cubeUV_m4 ) / ( cubeUV_r4 - cubeUV_r5 ) + cubeUV_m4; - } else if ( roughness >= cubeUV_r6 ) { - mip = ( cubeUV_r5 - roughness ) * ( cubeUV_m6 - cubeUV_m5 ) / ( cubeUV_r5 - cubeUV_r6 ) + cubeUV_m5; - } else { - mip = - 2.0 * log2( 1.16 * roughness ); } - return mip; - } - vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { - float mip = clamp( roughnessToMip( roughness ), cubeUV_m0, CUBEUV_MAX_MIP ); - float mipF = fract( mip ); - float mipInt = floor( mip ); - vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); - if ( mipF == 0.0 ) { - return vec4( color0, 1.0 ); - } else { - vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); - return vec4( mix( color0, color1, mipF ), 1.0 ); - } - } -#endif`,S3=`vec3 transformedNormal = objectNormal; -#ifdef USE_TANGENT - vec3 transformedTangent = objectTangent; -#endif -#ifdef USE_BATCHING - mat3 bm = mat3( batchingMatrix ); - transformedNormal /= vec3( dot( bm[ 0 ], bm[ 0 ] ), dot( bm[ 1 ], bm[ 1 ] ), dot( bm[ 2 ], bm[ 2 ] ) ); - transformedNormal = bm * transformedNormal; - #ifdef USE_TANGENT - transformedTangent = bm * transformedTangent; - #endif -#endif -#ifdef USE_INSTANCING - mat3 im = mat3( instanceMatrix ); - transformedNormal /= vec3( dot( im[ 0 ], im[ 0 ] ), dot( im[ 1 ], im[ 1 ] ), dot( im[ 2 ], im[ 2 ] ) ); - transformedNormal = im * transformedNormal; - #ifdef USE_TANGENT - transformedTangent = im * transformedTangent; - #endif -#endif -transformedNormal = normalMatrix * transformedNormal; -#ifdef FLIP_SIDED - transformedNormal = - transformedNormal; -#endif -#ifdef USE_TANGENT - transformedTangent = ( modelViewMatrix * vec4( transformedTangent, 0.0 ) ).xyz; - #ifdef FLIP_SIDED - transformedTangent = - transformedTangent; - #endif -#endif`,M3=`#ifdef USE_DISPLACEMENTMAP - uniform sampler2D displacementMap; - uniform float displacementScale; - uniform float displacementBias; -#endif`,E3=`#ifdef USE_DISPLACEMENTMAP - transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,w3=`#ifdef USE_EMISSIVEMAP - vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); - totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,C3=`#ifdef USE_EMISSIVEMAP - uniform sampler2D emissiveMap; -#endif`,T3="gl_FragColor = linearToOutputTexel( gl_FragColor );",R3=` -const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( - vec3( 0.8224621, 0.177538, 0.0 ), - vec3( 0.0331941, 0.9668058, 0.0 ), - vec3( 0.0170827, 0.0723974, 0.9105199 ) -); -const mat3 LINEAR_DISPLAY_P3_TO_LINEAR_SRGB = mat3( - vec3( 1.2249401, - 0.2249404, 0.0 ), - vec3( - 0.0420569, 1.0420571, 0.0 ), - vec3( - 0.0196376, - 0.0786361, 1.0982735 ) -); -vec4 LinearSRGBToLinearDisplayP3( in vec4 value ) { - return vec4( value.rgb * LINEAR_SRGB_TO_LINEAR_DISPLAY_P3, value.a ); -} -vec4 LinearDisplayP3ToLinearSRGB( in vec4 value ) { - return vec4( value.rgb * LINEAR_DISPLAY_P3_TO_LINEAR_SRGB, value.a ); -} -vec4 LinearTransferOETF( in vec4 value ) { - return value; -} -vec4 sRGBTransferOETF( in vec4 value ) { - return 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 ); -}`,b3=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vec3 cameraToFrag; - if ( isOrthographic ) { - cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToFrag = normalize( vWorldPosition - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vec3 reflectVec = reflect( cameraToFrag, worldNormal ); - #else - vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); - #endif - #else - vec3 reflectVec = vReflect; - #endif - #ifdef ENVMAP_TYPE_CUBE - vec4 envColor = textureCube( envMap, envMapRotation * vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); - #else - vec4 envColor = vec4( 0.0 ); - #endif - #ifdef ENVMAP_BLENDING_MULTIPLY - outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_MIX ) - outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_ADD ) - outgoingLight += envColor.xyz * specularStrength * reflectivity; - #endif -#endif`,B3=`#ifdef USE_ENVMAP - uniform float envMapIntensity; - uniform float flipEnvMap; - uniform mat3 envMapRotation; - #ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; - #else - uniform sampler2D envMap; - #endif - -#endif`,P3=`#ifdef USE_ENVMAP - uniform float reflectivity; - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - varying vec3 vWorldPosition; - uniform float refractionRatio; - #else - varying vec3 vReflect; - #endif -#endif`,I3=`#ifdef USE_ENVMAP - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - - varying vec3 vWorldPosition; - #else - varying vec3 vReflect; - uniform float refractionRatio; - #endif -#endif`,L3=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vWorldPosition = worldPosition.xyz; - #else - vec3 cameraToVertex; - if ( isOrthographic ) { - cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vReflect = reflect( cameraToVertex, worldNormal ); - #else - vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); - #endif - #endif -#endif`,D3=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; -#endif`,N3=`#ifdef USE_FOG - varying float vFogDepth; -#endif`,F3=`#ifdef USE_FOG - #ifdef FOG_EXP2 - float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); - #else - float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); - #endif - gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,U3=`#ifdef USE_FOG - uniform vec3 fogColor; - varying float vFogDepth; - #ifdef FOG_EXP2 - uniform float fogDensity; - #else - uniform float fogNear; - uniform float fogFar; - #endif -#endif`,O3=`#ifdef USE_GRADIENTMAP - uniform sampler2D gradientMap; -#endif -vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { - float dotNL = dot( normal, lightDirection ); - vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); - #ifdef USE_GRADIENTMAP - return vec3( texture2D( gradientMap, coord ).r ); - #else - vec2 fw = fwidth( coord ) * 0.5; - return mix( vec3( 0.7 ), vec3( 1.0 ), smoothstep( 0.7 - fw.x, 0.7 + fw.x, coord.x ) ); - #endif -}`,k3=`#ifdef USE_LIGHTMAP - uniform sampler2D lightMap; - uniform float lightMapIntensity; -#endif`,z3=`LambertMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,H3=`varying vec3 vViewPosition; -struct LambertMaterial { - vec3 diffuseColor; - float specularStrength; -}; -void RE_Direct_Lambert( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in LambertMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,G3=`uniform bool receiveShadow; -uniform vec3 ambientLightColor; -#if defined( USE_LIGHT_PROBES ) - uniform vec3 lightProbe[ 9 ]; -#endif -vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { - float x = normal.x, y = normal.y, z = normal.z; - vec3 result = shCoefficients[ 0 ] * 0.886227; - result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; - result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; - result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; - result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; - result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; - result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); - result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; - result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); - return result; -} -vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); - return irradiance; -} -vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { - vec3 irradiance = ambientLightColor; - return irradiance; -} -float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { - float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); - if ( cutoffDistance > 0.0 ) { - distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); - } - return distanceFalloff; -} -float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { - return smoothstep( coneCosine, penumbraCosine, angleCosine ); -} -#if NUM_DIR_LIGHTS > 0 - struct DirectionalLight { - vec3 direction; - vec3 color; - }; - uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; - void getDirectionalLightInfo( const in DirectionalLight directionalLight, out IncidentLight light ) { - light.color = directionalLight.color; - light.direction = directionalLight.direction; - light.visible = true; - } -#endif -#if NUM_POINT_LIGHTS > 0 - struct PointLight { - vec3 position; - vec3 color; - float distance; - float decay; - }; - uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; - void getPointLightInfo( const in PointLight pointLight, const in vec3 geometryPosition, out IncidentLight light ) { - vec3 lVector = pointLight.position - geometryPosition; - light.direction = normalize( lVector ); - float lightDistance = length( lVector ); - light.color = pointLight.color; - light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } -#endif -#if NUM_SPOT_LIGHTS > 0 - struct SpotLight { - vec3 position; - vec3 direction; - vec3 color; - float distance; - float decay; - float coneCos; - float penumbraCos; - }; - uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; - void getSpotLightInfo( const in SpotLight spotLight, const in vec3 geometryPosition, out IncidentLight light ) { - vec3 lVector = spotLight.position - geometryPosition; - light.direction = normalize( lVector ); - float angleCos = dot( light.direction, spotLight.direction ); - float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); - if ( spotAttenuation > 0.0 ) { - float lightDistance = length( lVector ); - light.color = spotLight.color * spotAttenuation; - light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } else { - light.color = vec3( 0.0 ); - light.visible = false; - } - } -#endif -#if NUM_RECT_AREA_LIGHTS > 0 - struct RectAreaLight { - vec3 color; - vec3 position; - vec3 halfWidth; - vec3 halfHeight; - }; - uniform sampler2D ltc_1; uniform sampler2D ltc_2; - uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; -#endif -#if NUM_HEMI_LIGHTS > 0 - struct HemisphereLight { - vec3 direction; - vec3 skyColor; - vec3 groundColor; - }; - uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; - vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { - float dotNL = dot( normal, hemiLight.direction ); - float hemiDiffuseWeight = 0.5 * dotNL + 0.5; - vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); - return irradiance; - } -#endif`,V3=`#ifdef USE_ENVMAP - vec3 getIBLIrradiance( const in vec3 normal ) { - #ifdef ENVMAP_TYPE_CUBE_UV - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, envMapRotation * worldNormal, 1.0 ); - return PI * envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } - vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { - #ifdef ENVMAP_TYPE_CUBE_UV - vec3 reflectVec = reflect( - viewDir, normal ); - reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); - reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, envMapRotation * reflectVec, roughness ); - return envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } - #ifdef USE_ANISOTROPY - vec3 getIBLAnisotropyRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness, const in vec3 bitangent, const in float anisotropy ) { - #ifdef ENVMAP_TYPE_CUBE_UV - vec3 bentNormal = cross( bitangent, viewDir ); - bentNormal = normalize( cross( bentNormal, bitangent ) ); - bentNormal = normalize( mix( bentNormal, normal, pow2( pow2( 1.0 - anisotropy * ( 1.0 - roughness ) ) ) ) ); - return getIBLRadiance( viewDir, bentNormal, roughness ); - #else - return vec3( 0.0 ); - #endif - } - #endif -#endif`,W3=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,X3=`varying vec3 vViewPosition; -struct ToonMaterial { - vec3 diffuseColor; -}; -void RE_Direct_Toon( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - vec3 irradiance = getGradientIrradiance( geometryNormal, directLight.direction ) * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,J3=`BlinnPhongMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularColor = specular; -material.specularShininess = shininess; -material.specularStrength = specularStrength;`,j3=`varying vec3 vViewPosition; -struct BlinnPhongMaterial { - vec3 diffuseColor; - vec3 specularColor; - float specularShininess; - float specularStrength; -}; -void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); - reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometryViewDir, geometryNormal, material.specularColor, material.specularShininess ) * material.specularStrength; -} -void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,K3=`PhysicalMaterial material; -material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); -vec3 dxy = max( abs( dFdx( nonPerturbedNormal ) ), abs( dFdy( nonPerturbedNormal ) ) ); -float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); -material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; -material.roughness = min( material.roughness, 1.0 ); -#ifdef IOR - material.ior = ior; - #ifdef USE_SPECULAR - float specularIntensityFactor = specularIntensity; - vec3 specularColorFactor = specularColor; - #ifdef USE_SPECULAR_COLORMAP - specularColorFactor *= texture2D( specularColorMap, vSpecularColorMapUv ).rgb; - #endif - #ifdef USE_SPECULAR_INTENSITYMAP - specularIntensityFactor *= texture2D( specularIntensityMap, vSpecularIntensityMapUv ).a; - #endif - material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); - #else - float specularIntensityFactor = 1.0; - vec3 specularColorFactor = vec3( 1.0 ); - material.specularF90 = 1.0; - #endif - material.specularColor = mix( min( pow2( ( material.ior - 1.0 ) / ( material.ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); -#else - material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); - material.specularF90 = 1.0; -#endif -#ifdef USE_CLEARCOAT - material.clearcoat = clearcoat; - material.clearcoatRoughness = clearcoatRoughness; - material.clearcoatF0 = vec3( 0.04 ); - material.clearcoatF90 = 1.0; - #ifdef USE_CLEARCOATMAP - material.clearcoat *= texture2D( clearcoatMap, vClearcoatMapUv ).x; - #endif - #ifdef USE_CLEARCOAT_ROUGHNESSMAP - material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vClearcoatRoughnessMapUv ).y; - #endif - material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); - material.clearcoatRoughness += geometryRoughness; - material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); -#endif -#ifdef USE_DISPERSION - material.dispersion = dispersion; -#endif -#ifdef USE_IRIDESCENCE - material.iridescence = iridescence; - material.iridescenceIOR = iridescenceIOR; - #ifdef USE_IRIDESCENCEMAP - material.iridescence *= texture2D( iridescenceMap, vIridescenceMapUv ).r; - #endif - #ifdef USE_IRIDESCENCE_THICKNESSMAP - material.iridescenceThickness = (iridescenceThicknessMaximum - iridescenceThicknessMinimum) * texture2D( iridescenceThicknessMap, vIridescenceThicknessMapUv ).g + iridescenceThicknessMinimum; - #else - material.iridescenceThickness = iridescenceThicknessMaximum; - #endif -#endif -#ifdef USE_SHEEN - material.sheenColor = sheenColor; - #ifdef USE_SHEEN_COLORMAP - material.sheenColor *= texture2D( sheenColorMap, vSheenColorMapUv ).rgb; - #endif - material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); - #ifdef USE_SHEEN_ROUGHNESSMAP - material.sheenRoughness *= texture2D( sheenRoughnessMap, vSheenRoughnessMapUv ).a; - #endif -#endif -#ifdef USE_ANISOTROPY - #ifdef USE_ANISOTROPYMAP - mat2 anisotropyMat = mat2( anisotropyVector.x, anisotropyVector.y, - anisotropyVector.y, anisotropyVector.x ); - vec3 anisotropyPolar = texture2D( anisotropyMap, vAnisotropyMapUv ).rgb; - vec2 anisotropyV = anisotropyMat * normalize( 2.0 * anisotropyPolar.rg - vec2( 1.0 ) ) * anisotropyPolar.b; - #else - vec2 anisotropyV = anisotropyVector; - #endif - material.anisotropy = length( anisotropyV ); - if( material.anisotropy == 0.0 ) { - anisotropyV = vec2( 1.0, 0.0 ); - } else { - anisotropyV /= material.anisotropy; - material.anisotropy = saturate( material.anisotropy ); - } - material.alphaT = mix( pow2( material.roughness ), 1.0, pow2( material.anisotropy ) ); - material.anisotropyT = tbn[ 0 ] * anisotropyV.x + tbn[ 1 ] * anisotropyV.y; - material.anisotropyB = tbn[ 1 ] * anisotropyV.x - tbn[ 0 ] * anisotropyV.y; -#endif`,Y3=`struct PhysicalMaterial { - vec3 diffuseColor; - float roughness; - vec3 specularColor; - float specularF90; - float dispersion; - #ifdef USE_CLEARCOAT - float clearcoat; - float clearcoatRoughness; - vec3 clearcoatF0; - float clearcoatF90; - #endif - #ifdef USE_IRIDESCENCE - float iridescence; - float iridescenceIOR; - float iridescenceThickness; - vec3 iridescenceFresnel; - vec3 iridescenceF0; - #endif - #ifdef USE_SHEEN - vec3 sheenColor; - float sheenRoughness; - #endif - #ifdef IOR - float ior; - #endif - #ifdef USE_TRANSMISSION - float transmission; - float transmissionAlpha; - float thickness; - float attenuationDistance; - vec3 attenuationColor; - #endif - #ifdef USE_ANISOTROPY - float anisotropy; - float alphaT; - vec3 anisotropyT; - vec3 anisotropyB; - #endif -}; -vec3 clearcoatSpecularDirect = vec3( 0.0 ); -vec3 clearcoatSpecularIndirect = vec3( 0.0 ); -vec3 sheenSpecularDirect = vec3( 0.0 ); -vec3 sheenSpecularIndirect = vec3(0.0 ); -vec3 Schlick_to_F0( const in vec3 f, const in float f90, const in float dotVH ) { - float x = clamp( 1.0 - dotVH, 0.0, 1.0 ); - float x2 = x * x; - float x5 = clamp( x * x2 * x2, 0.0, 0.9999 ); - return ( f - vec3( f90 ) * x5 ) / ( 1.0 - x5 ); -} -float V_GGX_SmithCorrelated( const in float alpha, const in float dotNL, const in float dotNV ) { - float a2 = pow2( alpha ); - float gv = dotNL * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNV ) ); - float gl = dotNV * sqrt( a2 + ( 1.0 - a2 ) * pow2( dotNL ) ); - return 0.5 / max( gv + gl, EPSILON ); -} -float D_GGX( const in float alpha, const in float dotNH ) { - float a2 = pow2( alpha ); - float denom = pow2( dotNH ) * ( a2 - 1.0 ) + 1.0; - return RECIPROCAL_PI * a2 / pow2( denom ); -} -#ifdef USE_ANISOTROPY - float 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 ) { - float gv = dotNL * length( vec3( alphaT * dotTV, alphaB * dotBV, dotNV ) ); - float gl = dotNV * length( vec3( alphaT * dotTL, alphaB * dotBL, dotNL ) ); - float v = 0.5 / ( gv + gl ); - return saturate(v); - } - float D_GGX_Anisotropic( const in float alphaT, const in float alphaB, const in float dotNH, const in float dotTH, const in float dotBH ) { - float a2 = alphaT * alphaB; - highp vec3 v = vec3( alphaB * dotTH, alphaT * dotBH, a2 * dotNH ); - highp float v2 = dot( v, v ); - float w2 = a2 / v2; - return RECIPROCAL_PI * a2 * pow2 ( w2 ); - } -#endif -#ifdef USE_CLEARCOAT - vec3 BRDF_GGX_Clearcoat( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material) { - vec3 f0 = material.clearcoatF0; - float f90 = material.clearcoatF90; - float roughness = material.clearcoatRoughness; - float alpha = pow2( roughness ); - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( f0, f90, dotVH ); - float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); - float D = D_GGX( alpha, dotNH ); - return F * ( V * D ); - } -#endif -vec3 BRDF_GGX( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in PhysicalMaterial material ) { - vec3 f0 = material.specularColor; - float f90 = material.specularF90; - float roughness = material.roughness; - float alpha = pow2( roughness ); - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( f0, f90, dotVH ); - #ifdef USE_IRIDESCENCE - F = mix( F, material.iridescenceFresnel, material.iridescence ); - #endif - #ifdef USE_ANISOTROPY - float dotTL = dot( material.anisotropyT, lightDir ); - float dotTV = dot( material.anisotropyT, viewDir ); - float dotTH = dot( material.anisotropyT, halfDir ); - float dotBL = dot( material.anisotropyB, lightDir ); - float dotBV = dot( material.anisotropyB, viewDir ); - float dotBH = dot( material.anisotropyB, halfDir ); - float V = V_GGX_SmithCorrelated_Anisotropic( material.alphaT, alpha, dotTV, dotBV, dotTL, dotBL, dotNV, dotNL ); - float D = D_GGX_Anisotropic( material.alphaT, alpha, dotNH, dotTH, dotBH ); - #else - float V = V_GGX_SmithCorrelated( alpha, dotNL, dotNV ); - float D = D_GGX( alpha, dotNH ); - #endif - return F * ( V * D ); -} -vec2 LTC_Uv( const in vec3 N, const in vec3 V, const in float roughness ) { - const float LUT_SIZE = 64.0; - const float LUT_SCALE = ( LUT_SIZE - 1.0 ) / LUT_SIZE; - const float LUT_BIAS = 0.5 / LUT_SIZE; - float dotNV = saturate( dot( N, V ) ); - vec2 uv = vec2( roughness, sqrt( 1.0 - dotNV ) ); - uv = uv * LUT_SCALE + LUT_BIAS; - return uv; -} -float LTC_ClippedSphereFormFactor( const in vec3 f ) { - float l = length( f ); - return max( ( l * l + f.z ) / ( l + 1.0 ), 0.0 ); -} -vec3 LTC_EdgeVectorFormFactor( const in vec3 v1, const in vec3 v2 ) { - float x = dot( v1, v2 ); - float y = abs( x ); - float a = 0.8543985 + ( 0.4965155 + 0.0145206 * y ) * y; - float b = 3.4175940 + ( 4.1616724 + y ) * y; - float v = a / b; - float theta_sintheta = ( x > 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; - return cross( v1, v2 ) * theta_sintheta; -} -vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { - vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; - vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; - vec3 lightNormal = cross( v1, v2 ); - if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); - vec3 T1, T2; - T1 = normalize( V - N * dot( V, N ) ); - T2 = - cross( N, T1 ); - mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); - vec3 coords[ 4 ]; - coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); - coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); - coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); - coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); - coords[ 0 ] = normalize( coords[ 0 ] ); - coords[ 1 ] = normalize( coords[ 1 ] ); - coords[ 2 ] = normalize( coords[ 2 ] ); - coords[ 3 ] = normalize( coords[ 3 ] ); - vec3 vectorFormFactor = vec3( 0.0 ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); - float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); - return vec3( result ); -} -#if defined( USE_SHEEN ) -float D_Charlie( float roughness, float dotNH ) { - float alpha = pow2( roughness ); - float invAlpha = 1.0 / alpha; - float cos2h = dotNH * dotNH; - float sin2h = max( 1.0 - cos2h, 0.0078125 ); - return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); -} -float V_Neubelt( float dotNV, float dotNL ) { - return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); -} -vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float D = D_Charlie( sheenRoughness, dotNH ); - float V = V_Neubelt( dotNV, dotNL ); - return sheenColor * ( D * V ); -} -#endif -float IBLSheenBRDF( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - float r2 = roughness * roughness; - float a = roughness < 0.25 ? -339.2 * r2 + 161.4 * roughness - 25.9 : -8.48 * r2 + 14.3 * roughness - 9.95; - float b = roughness < 0.25 ? 44.0 * r2 - 23.7 * roughness + 3.26 : 1.97 * r2 - 3.27 * roughness + 0.72; - float DG = exp( a * dotNV + b ) + ( roughness < 0.25 ? 0.0 : 0.1 * ( roughness - 0.25 ) ); - return saturate( DG * RECIPROCAL_PI ); -} -vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); - const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); - vec4 r = roughness * c0 + c1; - float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; - vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; - return fab; -} -vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { - vec2 fab = DFGApprox( normal, viewDir, roughness ); - return specularColor * fab.x + specularF90 * fab.y; -} -#ifdef USE_IRIDESCENCE -void 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 ) { -#else -void 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 ) { -#endif - vec2 fab = DFGApprox( normal, viewDir, roughness ); - #ifdef USE_IRIDESCENCE - vec3 Fr = mix( specularColor, iridescenceF0, iridescence ); - #else - vec3 Fr = specularColor; - #endif - vec3 FssEss = Fr * fab.x + specularF90 * fab.y; - float Ess = fab.x + fab.y; - float Ems = 1.0 - Ess; - vec3 Favg = Fr + ( 1.0 - Fr ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); - singleScatter += FssEss; - multiScatter += Fms * Ems; -} -#if NUM_RECT_AREA_LIGHTS > 0 - void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - vec3 normal = geometryNormal; - vec3 viewDir = geometryViewDir; - vec3 position = geometryPosition; - vec3 lightPos = rectAreaLight.position; - vec3 halfWidth = rectAreaLight.halfWidth; - vec3 halfHeight = rectAreaLight.halfHeight; - vec3 lightColor = rectAreaLight.color; - float roughness = material.roughness; - vec3 rectCoords[ 4 ]; - rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; - rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; - rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; - vec2 uv = LTC_Uv( normal, viewDir, roughness ); - vec4 t1 = texture2D( ltc_1, uv ); - vec4 t2 = texture2D( ltc_2, uv ); - mat3 mInv = mat3( - vec3( t1.x, 0, t1.y ), - vec3( 0, 1, 0 ), - vec3( t1.z, 0, t1.w ) - ); - vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); - reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); - reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); - } -#endif -void RE_Direct_Physical( const in IncidentLight directLight, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometryNormal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - #ifdef USE_CLEARCOAT - float dotNLcc = saturate( dot( geometryClearcoatNormal, directLight.direction ) ); - vec3 ccIrradiance = dotNLcc * directLight.color; - clearcoatSpecularDirect += ccIrradiance * BRDF_GGX_Clearcoat( directLight.direction, geometryViewDir, geometryClearcoatNormal, material ); - #endif - #ifdef USE_SHEEN - sheenSpecularDirect += irradiance * BRDF_Sheen( directLight.direction, geometryViewDir, geometryNormal, material.sheenColor, material.sheenRoughness ); - #endif - reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometryViewDir, geometryNormal, material ); - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in vec3 geometryPosition, const in vec3 geometryNormal, const in vec3 geometryViewDir, const in vec3 geometryClearcoatNormal, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { - #ifdef USE_CLEARCOAT - clearcoatSpecularIndirect += clearcoatRadiance * EnvironmentBRDF( geometryClearcoatNormal, geometryViewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - #ifdef USE_SHEEN - sheenSpecularIndirect += irradiance * material.sheenColor * IBLSheenBRDF( geometryNormal, geometryViewDir, material.sheenRoughness ); - #endif - vec3 singleScattering = vec3( 0.0 ); - vec3 multiScattering = vec3( 0.0 ); - vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; - #ifdef USE_IRIDESCENCE - computeMultiscatteringIridescence( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.iridescence, material.iridescenceFresnel, material.roughness, singleScattering, multiScattering ); - #else - computeMultiscattering( geometryNormal, geometryViewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); - #endif - vec3 totalScattering = singleScattering + multiScattering; - vec3 diffuse = material.diffuseColor * ( 1.0 - max( max( totalScattering.r, totalScattering.g ), totalScattering.b ) ); - reflectedLight.indirectSpecular += radiance * singleScattering; - reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; - reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; -} -#define RE_Direct RE_Direct_Physical -#define RE_Direct_RectArea RE_Direct_RectArea_Physical -#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical -#define RE_IndirectSpecular RE_IndirectSpecular_Physical -float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { - return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,Q3=` -vec3 geometryPosition = - vViewPosition; -vec3 geometryNormal = normal; -vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); -vec3 geometryClearcoatNormal = vec3( 0.0 ); -#ifdef USE_CLEARCOAT - geometryClearcoatNormal = clearcoatNormal; -#endif -#ifdef USE_IRIDESCENCE - float dotNVi = saturate( dot( normal, geometryViewDir ) ); - if ( material.iridescenceThickness == 0.0 ) { - material.iridescence = 0.0; - } else { - material.iridescence = saturate( material.iridescence ); - } - if ( material.iridescence > 0.0 ) { - material.iridescenceFresnel = evalIridescence( 1.0, material.iridescenceIOR, dotNVi, material.iridescenceThickness, material.specularColor ); - material.iridescenceF0 = Schlick_to_F0( material.iridescenceFresnel, 1.0, dotNVi ); - } -#endif -IncidentLight directLight; -#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) - PointLight pointLight; - #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { - pointLight = pointLights[ i ]; - getPointLightInfo( pointLight, geometryPosition, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) - pointLightShadow = pointLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowIntensity, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; - #endif - RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) - SpotLight spotLight; - vec4 spotColor; - vec3 spotLightCoord; - bool inSpotLightMap; - #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { - spotLight = spotLights[ i ]; - getSpotLightInfo( spotLight, geometryPosition, directLight ); - #if ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #define SPOT_LIGHT_MAP_INDEX UNROLLED_LOOP_INDEX - #elif ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - #define SPOT_LIGHT_MAP_INDEX NUM_SPOT_LIGHT_MAPS - #else - #define SPOT_LIGHT_MAP_INDEX ( UNROLLED_LOOP_INDEX - NUM_SPOT_LIGHT_SHADOWS + NUM_SPOT_LIGHT_SHADOWS_WITH_MAPS ) - #endif - #if ( SPOT_LIGHT_MAP_INDEX < NUM_SPOT_LIGHT_MAPS ) - spotLightCoord = vSpotLightCoord[ i ].xyz / vSpotLightCoord[ i ].w; - inSpotLightMap = all( lessThan( abs( spotLightCoord * 2. - 1. ), vec3( 1.0 ) ) ); - spotColor = texture2D( spotLightMap[ SPOT_LIGHT_MAP_INDEX ], spotLightCoord.xy ); - directLight.color = inSpotLightMap ? directLight.color * spotColor.rgb : directLight.color; - #endif - #undef SPOT_LIGHT_MAP_INDEX - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - spotLightShadow = spotLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowIntensity, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) - DirectionalLight directionalLight; - #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { - directionalLight = directionalLights[ i ]; - getDirectionalLightInfo( directionalLight, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) - directionalLightShadow = directionalLightShadows[ i ]; - directLight.color *= ( directLight.visible && receiveShadow ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowIntensity, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) - RectAreaLight rectAreaLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { - rectAreaLight = rectAreaLights[ i ]; - RE_Direct_RectArea( rectAreaLight, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if defined( RE_IndirectDiffuse ) - vec3 iblIrradiance = vec3( 0.0 ); - vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); - #if defined( USE_LIGHT_PROBES ) - irradiance += getLightProbeIrradiance( lightProbe, geometryNormal ); - #endif - #if ( NUM_HEMI_LIGHTS > 0 ) - #pragma unroll_loop_start - for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { - irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometryNormal ); - } - #pragma unroll_loop_end - #endif -#endif -#if defined( RE_IndirectSpecular ) - vec3 radiance = vec3( 0.0 ); - vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,Z3=`#if defined( RE_IndirectDiffuse ) - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); - vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; - irradiance += lightMapIrradiance; - #endif - #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) - iblIrradiance += getIBLIrradiance( geometryNormal ); - #endif -#endif -#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) - #ifdef USE_ANISOTROPY - radiance += getIBLAnisotropyRadiance( geometryViewDir, geometryNormal, material.roughness, material.anisotropyB, material.anisotropy ); - #else - radiance += getIBLRadiance( geometryViewDir, geometryNormal, material.roughness ); - #endif - #ifdef USE_CLEARCOAT - clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); - #endif -#endif`,q3=`#if defined( RE_IndirectDiffuse ) - RE_IndirectDiffuse( irradiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif -#if defined( RE_IndirectSpecular ) - RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometryPosition, geometryNormal, geometryViewDir, geometryClearcoatNormal, material, reflectedLight ); -#endif`,$3=`#if defined( USE_LOGDEPTHBUF ) - gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,eD=`#if defined( USE_LOGDEPTHBUF ) - uniform float logDepthBufFC; - varying float vFragDepth; - varying float vIsPerspective; -#endif`,tD=`#ifdef USE_LOGDEPTHBUF - varying float vFragDepth; - varying float vIsPerspective; -#endif`,nD=`#ifdef USE_LOGDEPTHBUF - vFragDepth = 1.0 + gl_Position.w; - vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); -#endif`,iD=`#ifdef USE_MAP - vec4 sampledDiffuseColor = texture2D( map, vMapUv ); - #ifdef DECODE_VIDEO_TEXTURE - sampledDiffuseColor = vec4( mix( pow( sampledDiffuseColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), sampledDiffuseColor.rgb * 0.0773993808, vec3( lessThanEqual( sampledDiffuseColor.rgb, vec3( 0.04045 ) ) ) ), sampledDiffuseColor.w ); - - #endif - diffuseColor *= sampledDiffuseColor; -#endif`,rD=`#ifdef USE_MAP - uniform sampler2D map; -#endif`,sD=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - #if defined( USE_POINTS_UV ) - vec2 uv = vUv; - #else - vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; - #endif -#endif -#ifdef USE_MAP - diffuseColor *= texture2D( map, uv ); -#endif -#ifdef USE_ALPHAMAP - diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,oD=`#if defined( USE_POINTS_UV ) - varying vec2 vUv; -#else - #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - uniform mat3 uvTransform; - #endif -#endif -#ifdef USE_MAP - uniform sampler2D map; -#endif -#ifdef USE_ALPHAMAP - uniform sampler2D alphaMap; -#endif`,aD=`float metalnessFactor = metalness; -#ifdef USE_METALNESSMAP - vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); - metalnessFactor *= texelMetalness.b; -#endif`,lD=`#ifdef USE_METALNESSMAP - uniform sampler2D metalnessMap; -#endif`,cD=`#ifdef USE_INSTANCING_MORPH - float morphTargetInfluences[ MORPHTARGETS_COUNT ]; - float morphTargetBaseInfluence = texelFetch( morphTexture, ivec2( 0, gl_InstanceID ), 0 ).r; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - morphTargetInfluences[i] = texelFetch( morphTexture, ivec2( i + 1, gl_InstanceID ), 0 ).r; - } -#endif`,uD=`#if defined( USE_MORPHCOLORS ) - vColor *= morphTargetBaseInfluence; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - #if defined( USE_COLOR_ALPHA ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ) * morphTargetInfluences[ i ]; - #elif defined( USE_COLOR ) - if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; - #endif - } -#endif`,fD=`#ifdef USE_MORPHNORMALS - objectNormal *= morphTargetBaseInfluence; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1 ).xyz * morphTargetInfluences[ i ]; - } -#endif`,hD=`#ifdef USE_MORPHTARGETS - #ifndef USE_INSTANCING_MORPH - uniform float morphTargetBaseInfluence; - uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; - #endif - uniform sampler2DArray morphTargetsTexture; - uniform ivec2 morphTargetsTextureSize; - vec4 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset ) { - int texelIndex = vertexIndex * MORPHTARGETS_TEXTURE_STRIDE + offset; - int y = texelIndex / morphTargetsTextureSize.x; - int x = texelIndex - y * morphTargetsTextureSize.x; - ivec3 morphUV = ivec3( x, y, morphTargetIndex ); - return texelFetch( morphTargetsTexture, morphUV, 0 ); - } -#endif`,dD=`#ifdef USE_MORPHTARGETS - transformed *= morphTargetBaseInfluence; - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] != 0.0 ) transformed += getMorph( gl_VertexID, i, 0 ).xyz * morphTargetInfluences[ i ]; - } -#endif`,pD=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; -#ifdef FLAT_SHADED - vec3 fdx = dFdx( vViewPosition ); - vec3 fdy = dFdy( vViewPosition ); - vec3 normal = normalize( cross( fdx, fdy ) ); -#else - vec3 normal = normalize( vNormal ); - #ifdef DOUBLE_SIDED - normal *= faceDirection; - #endif -#endif -#if defined( USE_NORMALMAP_TANGENTSPACE ) || defined( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) - #ifdef USE_TANGENT - mat3 tbn = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); - #else - mat3 tbn = getTangentFrame( - vViewPosition, normal, - #if defined( USE_NORMALMAP ) - vNormalMapUv - #elif defined( USE_CLEARCOAT_NORMALMAP ) - vClearcoatNormalMapUv - #else - vUv - #endif - ); - #endif - #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) - tbn[0] *= faceDirection; - tbn[1] *= faceDirection; - #endif -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - #ifdef USE_TANGENT - mat3 tbn2 = mat3( normalize( vTangent ), normalize( vBitangent ), normal ); - #else - mat3 tbn2 = getTangentFrame( - vViewPosition, normal, vClearcoatNormalMapUv ); - #endif - #if defined( DOUBLE_SIDED ) && ! defined( FLAT_SHADED ) - tbn2[0] *= faceDirection; - tbn2[1] *= faceDirection; - #endif -#endif -vec3 nonPerturbedNormal = normal;`,mD=`#ifdef USE_NORMALMAP_OBJECTSPACE - normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; - #ifdef FLIP_SIDED - normal = - normal; - #endif - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - normal = normalize( normalMatrix * normal ); -#elif defined( USE_NORMALMAP_TANGENTSPACE ) - vec3 mapN = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; - mapN.xy *= normalScale; - normal = normalize( tbn * mapN ); -#elif defined( USE_BUMPMAP ) - normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,gD=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,vD=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,yD=`#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #ifdef USE_TANGENT - vTangent = normalize( transformedTangent ); - vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); - #endif -#endif`,_D=`#ifdef USE_NORMALMAP - uniform sampler2D normalMap; - uniform vec2 normalScale; -#endif -#ifdef USE_NORMALMAP_OBJECTSPACE - uniform mat3 normalMatrix; -#endif -#if ! defined ( USE_TANGENT ) && ( defined ( USE_NORMALMAP_TANGENTSPACE ) || defined ( USE_CLEARCOAT_NORMALMAP ) || defined( USE_ANISOTROPY ) ) - mat3 getTangentFrame( vec3 eye_pos, vec3 surf_norm, vec2 uv ) { - vec3 q0 = dFdx( eye_pos.xyz ); - vec3 q1 = dFdy( eye_pos.xyz ); - vec2 st0 = dFdx( uv.st ); - vec2 st1 = dFdy( uv.st ); - vec3 N = surf_norm; - vec3 q1perp = cross( q1, N ); - vec3 q0perp = cross( N, q0 ); - vec3 T = q1perp * st0.x + q0perp * st1.x; - vec3 B = q1perp * st0.y + q0perp * st1.y; - float det = max( dot( T, T ), dot( B, B ) ); - float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); - return mat3( T * scale, B * scale, N ); - } -#endif`,xD=`#ifdef USE_CLEARCOAT - vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,AD=`#ifdef USE_CLEARCOAT_NORMALMAP - vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; - clearcoatMapN.xy *= clearcoatNormalScale; - clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,SD=`#ifdef USE_CLEARCOATMAP - uniform sampler2D clearcoatMap; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform sampler2D clearcoatNormalMap; - uniform vec2 clearcoatNormalScale; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform sampler2D clearcoatRoughnessMap; -#endif`,MD=`#ifdef USE_IRIDESCENCEMAP - uniform sampler2D iridescenceMap; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform sampler2D iridescenceThicknessMap; -#endif`,ED=`#ifdef OPAQUE -diffuseColor.a = 1.0; -#endif -#ifdef USE_TRANSMISSION -diffuseColor.a *= material.transmissionAlpha; -#endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,wD=`vec3 packNormalToRGB( const in vec3 normal ) { - return normalize( normal ) * 0.5 + 0.5; -} -vec3 unpackRGBToNormal( const in vec3 rgb ) { - return 2.0 * rgb.xyz - 1.0; -} -const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.;const float ShiftRight8 = 1. / 256.; -const float Inv255 = 1. / 255.; -const vec4 PackFactors = vec4( 1.0, 256.0, 256.0 * 256.0, 256.0 * 256.0 * 256.0 ); -const vec2 UnpackFactors2 = vec2( UnpackDownscale, 1.0 / PackFactors.g ); -const vec3 UnpackFactors3 = vec3( UnpackDownscale / PackFactors.rg, 1.0 / PackFactors.b ); -const vec4 UnpackFactors4 = vec4( UnpackDownscale / PackFactors.rgb, 1.0 / PackFactors.a ); -vec4 packDepthToRGBA( const in float v ) { - if( v <= 0.0 ) - return vec4( 0., 0., 0., 0. ); - if( v >= 1.0 ) - return vec4( 1., 1., 1., 1. ); - float vuf; - float af = modf( v * PackFactors.a, vuf ); - float bf = modf( vuf * ShiftRight8, vuf ); - float gf = modf( vuf * ShiftRight8, vuf ); - return vec4( vuf * Inv255, gf * PackUpscale, bf * PackUpscale, af ); -} -vec3 packDepthToRGB( const in float v ) { - if( v <= 0.0 ) - return vec3( 0., 0., 0. ); - if( v >= 1.0 ) - return vec3( 1., 1., 1. ); - float vuf; - float bf = modf( v * PackFactors.b, vuf ); - float gf = modf( vuf * ShiftRight8, vuf ); - return vec3( vuf * Inv255, gf * PackUpscale, bf ); -} -vec2 packDepthToRG( const in float v ) { - if( v <= 0.0 ) - return vec2( 0., 0. ); - if( v >= 1.0 ) - return vec2( 1., 1. ); - float vuf; - float gf = modf( v * 256., vuf ); - return vec2( vuf * Inv255, gf ); -} -float unpackRGBAToDepth( const in vec4 v ) { - return dot( v, UnpackFactors4 ); -} -float unpackRGBToDepth( const in vec3 v ) { - return dot( v, UnpackFactors3 ); -} -float unpackRGToDepth( const in vec2 v ) { - return v.r * UnpackFactors2.r + v.g * UnpackFactors2.g; -} -vec4 pack2HalfToRGBA( const in vec2 v ) { - vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); - return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); -} -vec2 unpackRGBATo2Half( const in vec4 v ) { - return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); -} -float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { - return ( viewZ + near ) / ( near - far ); -} -float orthographicDepthToViewZ( const in float depth, const in float near, const in float far ) { - return depth * ( near - far ) - near; -} -float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { - return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); -} -float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { - return ( near * far ) / ( ( far - near ) * depth - far ); -}`,CD=`#ifdef PREMULTIPLIED_ALPHA - gl_FragColor.rgb *= gl_FragColor.a; -#endif`,TD=`vec4 mvPosition = vec4( transformed, 1.0 ); -#ifdef USE_BATCHING - mvPosition = batchingMatrix * mvPosition; -#endif -#ifdef USE_INSTANCING - mvPosition = instanceMatrix * mvPosition; -#endif -mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,RD=`#ifdef DITHERING - gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,bD=`#ifdef DITHERING - vec3 dithering( vec3 color ) { - float grid_position = rand( gl_FragCoord.xy ); - vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); - dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); - return color + dither_shift_RGB; - } -#endif`,BD=`float roughnessFactor = roughness; -#ifdef USE_ROUGHNESSMAP - vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); - roughnessFactor *= texelRoughness.g; -#endif`,PD=`#ifdef USE_ROUGHNESSMAP - uniform sampler2D roughnessMap; -#endif`,ID=`#if NUM_SPOT_LIGHT_COORDS > 0 - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#if NUM_SPOT_LIGHT_MAPS > 0 - uniform sampler2D spotLightMap[ NUM_SPOT_LIGHT_MAPS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; - struct SpotLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif - float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { - return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); - } - vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { - return unpackRGBATo2Half( texture2D( shadow, uv ) ); - } - float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ - float occlusion = 1.0; - vec2 distribution = texture2DDistribution( shadow, uv ); - float hard_shadow = step( compare , distribution.x ); - if (hard_shadow != 1.0 ) { - float distance = compare - distribution.x ; - float variance = max( 0.00000, distribution.y * distribution.y ); - float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); - } - return occlusion; - } - float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord ) { - float shadow = 1.0; - shadowCoord.xyz /= shadowCoord.w; - shadowCoord.z += shadowBias; - bool inFrustum = shadowCoord.x >= 0.0 && shadowCoord.x <= 1.0 && shadowCoord.y >= 0.0 && shadowCoord.y <= 1.0; - bool frustumTest = inFrustum && shadowCoord.z <= 1.0; - if ( frustumTest ) { - #if defined( SHADOWMAP_TYPE_PCF ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx0 = - texelSize.x * shadowRadius; - float dy0 = - texelSize.y * shadowRadius; - float dx1 = + texelSize.x * shadowRadius; - float dy1 = + texelSize.y * shadowRadius; - float dx2 = dx0 / 2.0; - float dy2 = dy0 / 2.0; - float dx3 = dx1 / 2.0; - float dy3 = dy1 / 2.0; - shadow = ( - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) - ) * ( 1.0 / 17.0 ); - #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx = texelSize.x; - float dy = texelSize.y; - vec2 uv = shadowCoord.xy; - vec2 f = fract( uv * shadowMapSize + 0.5 ); - uv -= f * texelSize; - shadow = ( - texture2DCompare( shadowMap, uv, shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), - f.x ), - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), - f.x ), - f.y ) - ) * ( 1.0 / 9.0 ); - #elif defined( SHADOWMAP_TYPE_VSM ) - shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); - #else - shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); - #endif - } - return mix( 1.0, shadow, shadowIntensity ); - } - vec2 cubeToUV( vec3 v, float texelSizeY ) { - vec3 absV = abs( v ); - float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); - absV *= scaleToCube; - v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); - vec2 planar = v.xy; - float almostATexel = 1.5 * texelSizeY; - float almostOne = 1.0 - almostATexel; - if ( absV.z >= almostOne ) { - if ( v.z > 0.0 ) - planar.x = 4.0 - v.x; - } else if ( absV.x >= almostOne ) { - float signX = sign( v.x ); - planar.x = v.z * signX + 2.0 * signX; - } else if ( absV.y >= almostOne ) { - float signY = sign( v.y ); - planar.x = v.x + 2.0 * signY + 2.0; - planar.y = v.z * signY - 2.0; - } - return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); - } - float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowIntensity, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { - float shadow = 1.0; - vec3 lightToPosition = shadowCoord.xyz; - - float lightToPositionLength = length( lightToPosition ); - if ( lightToPositionLength - shadowCameraFar <= 0.0 && lightToPositionLength - shadowCameraNear >= 0.0 ) { - float dp = ( lightToPositionLength - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; - vec3 bd3D = normalize( lightToPosition ); - vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); - #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) - vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; - shadow = ( - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) - ) * ( 1.0 / 9.0 ); - #else - shadow = texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); - #endif - } - return mix( 1.0, shadow, shadowIntensity ); - } -#endif`,LD=`#if NUM_SPOT_LIGHT_COORDS > 0 - uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; - varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; -#endif -#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - struct SpotLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowIntensity; - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif -#endif`,DD=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) - vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - vec4 shadowWorldPosition; -#endif -#if defined( USE_SHADOWMAP ) - #if NUM_DIR_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); - vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); - vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif -#endif -#if NUM_SPOT_LIGHT_COORDS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_COORDS; i ++ ) { - shadowWorldPosition = worldPosition; - #if ( defined( USE_SHADOWMAP ) && UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - shadowWorldPosition.xyz += shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias; - #endif - vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end -#endif`,ND=`float getShadowMask() { - float shadow = 1.0; - #ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - directionalLight = directionalLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowIntensity, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { - spotLight = spotLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowIntensity, spotLight.shadowBias, spotLight.shadowRadius, vSpotLightCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - pointLight = pointLightShadows[ i ]; - shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowIntensity, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; - } - #pragma unroll_loop_end - #endif - #endif - return shadow; -}`,FD=`#ifdef USE_SKINNING - mat4 boneMatX = getBoneMatrix( skinIndex.x ); - mat4 boneMatY = getBoneMatrix( skinIndex.y ); - mat4 boneMatZ = getBoneMatrix( skinIndex.z ); - mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,UD=`#ifdef USE_SKINNING - uniform mat4 bindMatrix; - uniform mat4 bindMatrixInverse; - uniform highp sampler2D boneTexture; - mat4 getBoneMatrix( const in float i ) { - int size = textureSize( boneTexture, 0 ).x; - int j = int( i ) * 4; - int x = j % size; - int y = j / size; - vec4 v1 = texelFetch( boneTexture, ivec2( x, y ), 0 ); - vec4 v2 = texelFetch( boneTexture, ivec2( x + 1, y ), 0 ); - vec4 v3 = texelFetch( boneTexture, ivec2( x + 2, y ), 0 ); - vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); - return mat4( v1, v2, v3, v4 ); - } -#endif`,OD=`#ifdef USE_SKINNING - vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); - vec4 skinned = vec4( 0.0 ); - skinned += boneMatX * skinVertex * skinWeight.x; - skinned += boneMatY * skinVertex * skinWeight.y; - skinned += boneMatZ * skinVertex * skinWeight.z; - skinned += boneMatW * skinVertex * skinWeight.w; - transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,kD=`#ifdef USE_SKINNING - mat4 skinMatrix = mat4( 0.0 ); - skinMatrix += skinWeight.x * boneMatX; - skinMatrix += skinWeight.y * boneMatY; - skinMatrix += skinWeight.z * boneMatZ; - skinMatrix += skinWeight.w * boneMatW; - skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; - objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; - #ifdef USE_TANGENT - objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #endif -#endif`,zD=`float specularStrength; -#ifdef USE_SPECULARMAP - vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); - specularStrength = texelSpecular.r; -#else - specularStrength = 1.0; -#endif`,HD=`#ifdef USE_SPECULARMAP - uniform sampler2D specularMap; -#endif`,GD=`#if defined( TONE_MAPPING ) - gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,VD=`#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -uniform float toneMappingExposure; -vec3 LinearToneMapping( vec3 color ) { - return saturate( toneMappingExposure * color ); -} -vec3 ReinhardToneMapping( vec3 color ) { - color *= toneMappingExposure; - return saturate( color / ( vec3( 1.0 ) + color ) ); -} -vec3 CineonToneMapping( vec3 color ) { - color *= toneMappingExposure; - color = max( vec3( 0.0 ), color - 0.004 ); - return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); -} -vec3 RRTAndODTFit( vec3 v ) { - vec3 a = v * ( v + 0.0245786 ) - 0.000090537; - vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; - return a / b; -} -vec3 ACESFilmicToneMapping( vec3 color ) { - const mat3 ACESInputMat = mat3( - vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), - vec3( 0.04823, 0.01566, 0.83777 ) - ); - const mat3 ACESOutputMat = mat3( - vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), - vec3( -0.07367, -0.00605, 1.07602 ) - ); - color *= toneMappingExposure / 0.6; - color = ACESInputMat * color; - color = RRTAndODTFit( color ); - color = ACESOutputMat * color; - return saturate( color ); -} -const mat3 LINEAR_REC2020_TO_LINEAR_SRGB = mat3( - vec3( 1.6605, - 0.1246, - 0.0182 ), - vec3( - 0.5876, 1.1329, - 0.1006 ), - vec3( - 0.0728, - 0.0083, 1.1187 ) -); -const mat3 LINEAR_SRGB_TO_LINEAR_REC2020 = mat3( - vec3( 0.6274, 0.0691, 0.0164 ), - vec3( 0.3293, 0.9195, 0.0880 ), - vec3( 0.0433, 0.0113, 0.8956 ) -); -vec3 agxDefaultContrastApprox( vec3 x ) { - vec3 x2 = x * x; - vec3 x4 = x2 * x2; - return + 15.5 * x4 * x2 - - 40.14 * x4 * x - + 31.96 * x4 - - 6.868 * x2 * x - + 0.4298 * x2 - + 0.1191 * x - - 0.00232; -} -vec3 AgXToneMapping( vec3 color ) { - const mat3 AgXInsetMatrix = mat3( - vec3( 0.856627153315983, 0.137318972929847, 0.11189821299995 ), - vec3( 0.0951212405381588, 0.761241990602591, 0.0767994186031903 ), - vec3( 0.0482516061458583, 0.101439036467562, 0.811302368396859 ) - ); - const mat3 AgXOutsetMatrix = mat3( - vec3( 1.1271005818144368, - 0.1413297634984383, - 0.14132976349843826 ), - vec3( - 0.11060664309660323, 1.157823702216272, - 0.11060664309660294 ), - vec3( - 0.016493938717834573, - 0.016493938717834257, 1.2519364065950405 ) - ); - const float AgxMinEv = - 12.47393; const float AgxMaxEv = 4.026069; - color *= toneMappingExposure; - color = LINEAR_SRGB_TO_LINEAR_REC2020 * color; - color = AgXInsetMatrix * color; - color = max( color, 1e-10 ); color = log2( color ); - color = ( color - AgxMinEv ) / ( AgxMaxEv - AgxMinEv ); - color = clamp( color, 0.0, 1.0 ); - color = agxDefaultContrastApprox( color ); - color = AgXOutsetMatrix * color; - color = pow( max( vec3( 0.0 ), color ), vec3( 2.2 ) ); - color = LINEAR_REC2020_TO_LINEAR_SRGB * color; - color = clamp( color, 0.0, 1.0 ); - return color; -} -vec3 NeutralToneMapping( vec3 color ) { - const float StartCompression = 0.8 - 0.04; - const float Desaturation = 0.15; - color *= toneMappingExposure; - float x = min( color.r, min( color.g, color.b ) ); - float offset = x < 0.08 ? x - 6.25 * x * x : 0.04; - color -= offset; - float peak = max( color.r, max( color.g, color.b ) ); - if ( peak < StartCompression ) return color; - float d = 1. - StartCompression; - float newPeak = 1. - d * d / ( peak + d - StartCompression ); - color *= newPeak / peak; - float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); - return mix( color, vec3( newPeak ), g ); -} -vec3 CustomToneMapping( vec3 color ) { return color; }`,WD=`#ifdef USE_TRANSMISSION - material.transmission = transmission; - material.transmissionAlpha = 1.0; - material.thickness = thickness; - material.attenuationDistance = attenuationDistance; - material.attenuationColor = attenuationColor; - #ifdef USE_TRANSMISSIONMAP - material.transmission *= texture2D( transmissionMap, vTransmissionMapUv ).r; - #endif - #ifdef USE_THICKNESSMAP - material.thickness *= texture2D( thicknessMap, vThicknessMapUv ).g; - #endif - vec3 pos = vWorldPosition; - vec3 v = normalize( cameraPosition - pos ); - vec3 n = inverseTransformDirection( normal, viewMatrix ); - vec4 transmitted = getIBLVolumeRefraction( - n, v, material.roughness, material.diffuseColor, material.specularColor, material.specularF90, - pos, modelMatrix, viewMatrix, projectionMatrix, material.dispersion, material.ior, material.thickness, - material.attenuationColor, material.attenuationDistance ); - material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); - totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,XD=`#ifdef USE_TRANSMISSION - uniform float transmission; - uniform float thickness; - uniform float attenuationDistance; - uniform vec3 attenuationColor; - #ifdef USE_TRANSMISSIONMAP - uniform sampler2D transmissionMap; - #endif - #ifdef USE_THICKNESSMAP - uniform sampler2D thicknessMap; - #endif - uniform vec2 transmissionSamplerSize; - uniform sampler2D transmissionSamplerMap; - uniform mat4 modelMatrix; - uniform mat4 projectionMatrix; - varying vec3 vWorldPosition; - float w0( float a ) { - return ( 1.0 / 6.0 ) * ( a * ( a * ( - a + 3.0 ) - 3.0 ) + 1.0 ); - } - float w1( float a ) { - return ( 1.0 / 6.0 ) * ( a * a * ( 3.0 * a - 6.0 ) + 4.0 ); - } - float w2( float a ){ - return ( 1.0 / 6.0 ) * ( a * ( a * ( - 3.0 * a + 3.0 ) + 3.0 ) + 1.0 ); - } - float w3( float a ) { - return ( 1.0 / 6.0 ) * ( a * a * a ); - } - float g0( float a ) { - return w0( a ) + w1( a ); - } - float g1( float a ) { - return w2( a ) + w3( a ); - } - float h0( float a ) { - return - 1.0 + w1( a ) / ( w0( a ) + w1( a ) ); - } - float h1( float a ) { - return 1.0 + w3( a ) / ( w2( a ) + w3( a ) ); - } - vec4 bicubic( sampler2D tex, vec2 uv, vec4 texelSize, float lod ) { - uv = uv * texelSize.zw + 0.5; - vec2 iuv = floor( uv ); - vec2 fuv = fract( uv ); - float g0x = g0( fuv.x ); - float g1x = g1( fuv.x ); - float h0x = h0( fuv.x ); - float h1x = h1( fuv.x ); - float h0y = h0( fuv.y ); - float h1y = h1( fuv.y ); - vec2 p0 = ( vec2( iuv.x + h0x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; - vec2 p1 = ( vec2( iuv.x + h1x, iuv.y + h0y ) - 0.5 ) * texelSize.xy; - vec2 p2 = ( vec2( iuv.x + h0x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; - vec2 p3 = ( vec2( iuv.x + h1x, iuv.y + h1y ) - 0.5 ) * texelSize.xy; - return g0( fuv.y ) * ( g0x * textureLod( tex, p0, lod ) + g1x * textureLod( tex, p1, lod ) ) + - g1( fuv.y ) * ( g0x * textureLod( tex, p2, lod ) + g1x * textureLod( tex, p3, lod ) ); - } - vec4 textureBicubic( sampler2D sampler, vec2 uv, float lod ) { - vec2 fLodSize = vec2( textureSize( sampler, int( lod ) ) ); - vec2 cLodSize = vec2( textureSize( sampler, int( lod + 1.0 ) ) ); - vec2 fLodSizeInv = 1.0 / fLodSize; - vec2 cLodSizeInv = 1.0 / cLodSize; - vec4 fSample = bicubic( sampler, uv, vec4( fLodSizeInv, fLodSize ), floor( lod ) ); - vec4 cSample = bicubic( sampler, uv, vec4( cLodSizeInv, cLodSize ), ceil( lod ) ); - return mix( fSample, cSample, fract( lod ) ); - } - vec3 getVolumeTransmissionRay( const in vec3 n, const in vec3 v, const in float thickness, const in float ior, const in mat4 modelMatrix ) { - vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); - vec3 modelScale; - modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); - modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); - modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); - return normalize( refractionVector ) * thickness * modelScale; - } - float applyIorToRoughness( const in float roughness, const in float ior ) { - return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); - } - vec4 getTransmissionSample( const in vec2 fragCoord, const in float roughness, const in float ior ) { - float lod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); - return textureBicubic( transmissionSamplerMap, fragCoord.xy, lod ); - } - vec3 volumeAttenuation( const in float transmissionDistance, const in vec3 attenuationColor, const in float attenuationDistance ) { - if ( isinf( attenuationDistance ) ) { - return vec3( 1.0 ); - } else { - vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; - vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance; - } - } - vec4 getIBLVolumeRefraction( const in vec3 n, const in vec3 v, const in float roughness, const in vec3 diffuseColor, - const in vec3 specularColor, const in float specularF90, const in vec3 position, const in mat4 modelMatrix, - const in mat4 viewMatrix, const in mat4 projMatrix, const in float dispersion, const in float ior, const in float thickness, - const in vec3 attenuationColor, const in float attenuationDistance ) { - vec4 transmittedLight; - vec3 transmittance; - #ifdef USE_DISPERSION - float halfSpread = ( ior - 1.0 ) * 0.025 * dispersion; - vec3 iors = vec3( ior - halfSpread, ior, ior + halfSpread ); - for ( int i = 0; i < 3; i ++ ) { - vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, iors[ i ], modelMatrix ); - vec3 refractedRayExit = position + transmissionRay; - - vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); - vec2 refractionCoords = ndcPos.xy / ndcPos.w; - refractionCoords += 1.0; - refractionCoords /= 2.0; - - vec4 transmissionSample = getTransmissionSample( refractionCoords, roughness, iors[ i ] ); - transmittedLight[ i ] = transmissionSample[ i ]; - transmittedLight.a += transmissionSample.a; - transmittance[ i ] = diffuseColor[ i ] * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance )[ i ]; - } - transmittedLight.a /= 3.0; - - #else - - vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); - vec3 refractedRayExit = position + transmissionRay; - vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); - vec2 refractionCoords = ndcPos.xy / ndcPos.w; - refractionCoords += 1.0; - refractionCoords /= 2.0; - transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); - transmittance = diffuseColor * volumeAttenuation( length( transmissionRay ), attenuationColor, attenuationDistance ); - - #endif - vec3 attenuatedColor = transmittance * transmittedLight.rgb; - vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); - float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; - return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); - } -#endif`,JD=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) - varying vec2 vUv; -#endif -#ifdef USE_MAP - varying vec2 vMapUv; -#endif -#ifdef USE_ALPHAMAP - varying vec2 vAlphaMapUv; -#endif -#ifdef USE_LIGHTMAP - varying vec2 vLightMapUv; -#endif -#ifdef USE_AOMAP - varying vec2 vAoMapUv; -#endif -#ifdef USE_BUMPMAP - varying vec2 vBumpMapUv; -#endif -#ifdef USE_NORMALMAP - varying vec2 vNormalMapUv; -#endif -#ifdef USE_EMISSIVEMAP - varying vec2 vEmissiveMapUv; -#endif -#ifdef USE_METALNESSMAP - varying vec2 vMetalnessMapUv; -#endif -#ifdef USE_ROUGHNESSMAP - varying vec2 vRoughnessMapUv; -#endif -#ifdef USE_ANISOTROPYMAP - varying vec2 vAnisotropyMapUv; -#endif -#ifdef USE_CLEARCOATMAP - varying vec2 vClearcoatMapUv; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - varying vec2 vClearcoatNormalMapUv; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - varying vec2 vClearcoatRoughnessMapUv; -#endif -#ifdef USE_IRIDESCENCEMAP - varying vec2 vIridescenceMapUv; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - varying vec2 vIridescenceThicknessMapUv; -#endif -#ifdef USE_SHEEN_COLORMAP - varying vec2 vSheenColorMapUv; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - varying vec2 vSheenRoughnessMapUv; -#endif -#ifdef USE_SPECULARMAP - varying vec2 vSpecularMapUv; -#endif -#ifdef USE_SPECULAR_COLORMAP - varying vec2 vSpecularColorMapUv; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - varying vec2 vSpecularIntensityMapUv; -#endif -#ifdef USE_TRANSMISSIONMAP - uniform mat3 transmissionMapTransform; - varying vec2 vTransmissionMapUv; -#endif -#ifdef USE_THICKNESSMAP - uniform mat3 thicknessMapTransform; - varying vec2 vThicknessMapUv; -#endif`,jD=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) - varying vec2 vUv; -#endif -#ifdef USE_MAP - uniform mat3 mapTransform; - varying vec2 vMapUv; -#endif -#ifdef USE_ALPHAMAP - uniform mat3 alphaMapTransform; - varying vec2 vAlphaMapUv; -#endif -#ifdef USE_LIGHTMAP - uniform mat3 lightMapTransform; - varying vec2 vLightMapUv; -#endif -#ifdef USE_AOMAP - uniform mat3 aoMapTransform; - varying vec2 vAoMapUv; -#endif -#ifdef USE_BUMPMAP - uniform mat3 bumpMapTransform; - varying vec2 vBumpMapUv; -#endif -#ifdef USE_NORMALMAP - uniform mat3 normalMapTransform; - varying vec2 vNormalMapUv; -#endif -#ifdef USE_DISPLACEMENTMAP - uniform mat3 displacementMapTransform; - varying vec2 vDisplacementMapUv; -#endif -#ifdef USE_EMISSIVEMAP - uniform mat3 emissiveMapTransform; - varying vec2 vEmissiveMapUv; -#endif -#ifdef USE_METALNESSMAP - uniform mat3 metalnessMapTransform; - varying vec2 vMetalnessMapUv; -#endif -#ifdef USE_ROUGHNESSMAP - uniform mat3 roughnessMapTransform; - varying vec2 vRoughnessMapUv; -#endif -#ifdef USE_ANISOTROPYMAP - uniform mat3 anisotropyMapTransform; - varying vec2 vAnisotropyMapUv; -#endif -#ifdef USE_CLEARCOATMAP - uniform mat3 clearcoatMapTransform; - varying vec2 vClearcoatMapUv; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform mat3 clearcoatNormalMapTransform; - varying vec2 vClearcoatNormalMapUv; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform mat3 clearcoatRoughnessMapTransform; - varying vec2 vClearcoatRoughnessMapUv; -#endif -#ifdef USE_SHEEN_COLORMAP - uniform mat3 sheenColorMapTransform; - varying vec2 vSheenColorMapUv; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - uniform mat3 sheenRoughnessMapTransform; - varying vec2 vSheenRoughnessMapUv; -#endif -#ifdef USE_IRIDESCENCEMAP - uniform mat3 iridescenceMapTransform; - varying vec2 vIridescenceMapUv; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - uniform mat3 iridescenceThicknessMapTransform; - varying vec2 vIridescenceThicknessMapUv; -#endif -#ifdef USE_SPECULARMAP - uniform mat3 specularMapTransform; - varying vec2 vSpecularMapUv; -#endif -#ifdef USE_SPECULAR_COLORMAP - uniform mat3 specularColorMapTransform; - varying vec2 vSpecularColorMapUv; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - uniform mat3 specularIntensityMapTransform; - varying vec2 vSpecularIntensityMapUv; -#endif -#ifdef USE_TRANSMISSIONMAP - uniform mat3 transmissionMapTransform; - varying vec2 vTransmissionMapUv; -#endif -#ifdef USE_THICKNESSMAP - uniform mat3 thicknessMapTransform; - varying vec2 vThicknessMapUv; -#endif`,KD=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) - vUv = vec3( uv, 1 ).xy; -#endif -#ifdef USE_MAP - vMapUv = ( mapTransform * vec3( MAP_UV, 1 ) ).xy; -#endif -#ifdef USE_ALPHAMAP - vAlphaMapUv = ( alphaMapTransform * vec3( ALPHAMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_LIGHTMAP - vLightMapUv = ( lightMapTransform * vec3( LIGHTMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_AOMAP - vAoMapUv = ( aoMapTransform * vec3( AOMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_BUMPMAP - vBumpMapUv = ( bumpMapTransform * vec3( BUMPMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_NORMALMAP - vNormalMapUv = ( normalMapTransform * vec3( NORMALMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_DISPLACEMENTMAP - vDisplacementMapUv = ( displacementMapTransform * vec3( DISPLACEMENTMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_EMISSIVEMAP - vEmissiveMapUv = ( emissiveMapTransform * vec3( EMISSIVEMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_METALNESSMAP - vMetalnessMapUv = ( metalnessMapTransform * vec3( METALNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_ROUGHNESSMAP - vRoughnessMapUv = ( roughnessMapTransform * vec3( ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_ANISOTROPYMAP - vAnisotropyMapUv = ( anisotropyMapTransform * vec3( ANISOTROPYMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOATMAP - vClearcoatMapUv = ( clearcoatMapTransform * vec3( CLEARCOATMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - vClearcoatNormalMapUv = ( clearcoatNormalMapTransform * vec3( CLEARCOAT_NORMALMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - vClearcoatRoughnessMapUv = ( clearcoatRoughnessMapTransform * vec3( CLEARCOAT_ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_IRIDESCENCEMAP - vIridescenceMapUv = ( iridescenceMapTransform * vec3( IRIDESCENCEMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_IRIDESCENCE_THICKNESSMAP - vIridescenceThicknessMapUv = ( iridescenceThicknessMapTransform * vec3( IRIDESCENCE_THICKNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SHEEN_COLORMAP - vSheenColorMapUv = ( sheenColorMapTransform * vec3( SHEEN_COLORMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SHEEN_ROUGHNESSMAP - vSheenRoughnessMapUv = ( sheenRoughnessMapTransform * vec3( SHEEN_ROUGHNESSMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULARMAP - vSpecularMapUv = ( specularMapTransform * vec3( SPECULARMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULAR_COLORMAP - vSpecularColorMapUv = ( specularColorMapTransform * vec3( SPECULAR_COLORMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_SPECULAR_INTENSITYMAP - vSpecularIntensityMapUv = ( specularIntensityMapTransform * vec3( SPECULAR_INTENSITYMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_TRANSMISSIONMAP - vTransmissionMapUv = ( transmissionMapTransform * vec3( TRANSMISSIONMAP_UV, 1 ) ).xy; -#endif -#ifdef USE_THICKNESSMAP - vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,YD=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 - vec4 worldPosition = vec4( transformed, 1.0 ); - #ifdef USE_BATCHING - worldPosition = batchingMatrix * worldPosition; - #endif - #ifdef USE_INSTANCING - worldPosition = instanceMatrix * worldPosition; - #endif - worldPosition = modelMatrix * worldPosition; -#endif`;const QD=`varying vec2 vUv; -uniform mat3 uvTransform; -void main() { - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,ZD=`uniform sampler2D t2D; -uniform float backgroundIntensity; -varying vec2 vUv; -void main() { - vec4 texColor = texture2D( t2D, vUv ); - #ifdef DECODE_VIDEO_TEXTURE - texColor = vec4( mix( pow( texColor.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), texColor.rgb * 0.0773993808, vec3( lessThanEqual( texColor.rgb, vec3( 0.04045 ) ) ) ), texColor.w ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}`,qD=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,$D=`#ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; -#elif defined( ENVMAP_TYPE_CUBE_UV ) - uniform sampler2D envMap; -#endif -uniform float flipEnvMap; -uniform float backgroundBlurriness; -uniform float backgroundIntensity; -uniform mat3 backgroundRotation; -varying vec3 vWorldDirection; -#include -void main() { - #ifdef ENVMAP_TYPE_CUBE - vec4 texColor = textureCube( envMap, backgroundRotation * vec3( flipEnvMap * vWorldDirection.x, vWorldDirection.yz ) ); - #elif defined( ENVMAP_TYPE_CUBE_UV ) - vec4 texColor = textureCubeUV( envMap, backgroundRotation * vWorldDirection, backgroundBlurriness ); - #else - vec4 texColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - #endif - texColor.rgb *= backgroundIntensity; - gl_FragColor = texColor; - #include - #include -}`,eN=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,tN=`uniform samplerCube tCube; -uniform float tFlip; -uniform float opacity; -varying vec3 vWorldDirection; -void main() { - vec4 texColor = textureCube( tCube, vec3( tFlip * vWorldDirection.x, vWorldDirection.yz ) ); - gl_FragColor = texColor; - gl_FragColor.a *= opacity; - #include - #include -}`,nN=`#include -#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - #include - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vHighPrecisionZW = gl_Position.zw; -}`,iN=`#if DEPTH_PACKING == 3200 - uniform float opacity; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - vec4 diffuseColor = vec4( 1.0 ); - #include - #if DEPTH_PACKING == 3200 - diffuseColor.a = opacity; - #endif - #include - #include - #include - #include - #include - float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; - #if DEPTH_PACKING == 3200 - gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); - #elif DEPTH_PACKING == 3201 - gl_FragColor = packDepthToRGBA( fragCoordZ ); - #elif DEPTH_PACKING == 3202 - gl_FragColor = vec4( packDepthToRGB( fragCoordZ ), 1.0 ); - #elif DEPTH_PACKING == 3203 - gl_FragColor = vec4( packDepthToRG( fragCoordZ ), 0.0, 1.0 ); - #endif -}`,rN=`#define DISTANCE -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vWorldPosition = worldPosition.xyz; -}`,sN=`#define DISTANCE -uniform vec3 referencePosition; -uniform float nearDistance; -uniform float farDistance; -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -#include -#include -void main () { - vec4 diffuseColor = vec4( 1.0 ); - #include - #include - #include - #include - #include - float dist = length( vWorldPosition - referencePosition ); - dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); - dist = saturate( dist ); - gl_FragColor = packDepthToRGBA( dist ); -}`,oN=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include -}`,aN=`uniform sampler2D tEquirect; -varying vec3 vWorldDirection; -#include -void main() { - vec3 direction = normalize( vWorldDirection ); - vec2 sampleUV = equirectUv( direction ); - gl_FragColor = texture2D( tEquirect, sampleUV ); - #include - #include -}`,lN=`uniform float scale; -attribute float lineDistance; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -#include -void main() { - vLineDistance = scale * lineDistance; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,cN=`uniform vec3 diffuse; -uniform float opacity; -uniform float dashSize; -uniform float totalSize; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - if ( mod( vLineDistance, totalSize ) > dashSize ) { - discard; - } - vec3 outgoingLight = vec3( 0.0 ); - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,uN=`#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) - #include - #include - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,fN=`uniform vec3 diffuse; -uniform float opacity; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); - reflectedLight.indirectDiffuse += lightMapTexel.rgb * lightMapIntensity * RECIPROCAL_PI; - #else - reflectedLight.indirectDiffuse += vec3( 1.0 ); - #endif - #include - reflectedLight.indirectDiffuse *= diffuseColor.rgb; - vec3 outgoingLight = reflectedLight.indirectDiffuse; - #include - #include - #include - #include - #include - #include - #include -}`,hN=`#define LAMBERT -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,dN=`#define LAMBERT -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,pN=`#define MATCAP -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; -}`,mN=`#define MATCAP -uniform vec3 diffuse; -uniform float opacity; -uniform sampler2D matcap; -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 viewDir = normalize( vViewPosition ); - vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); - vec3 y = cross( viewDir, x ); - vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; - #ifdef USE_MATCAP - vec4 matcapColor = texture2D( matcap, uv ); - #else - vec4 matcapColor = vec4( vec3( mix( 0.2, 0.8, uv.y ) ), 1.0 ); - #endif - vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; - #include - #include - #include - #include - #include - #include -}`,gN=`#define NORMAL -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - vViewPosition = - mvPosition.xyz; -#endif -}`,vN=`#define NORMAL -uniform float opacity; -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( 0.0, 0.0, 0.0, opacity ); - #include - #include - #include - #include - gl_FragColor = vec4( packNormalToRGB( normal ), diffuseColor.a ); - #ifdef OPAQUE - gl_FragColor.a = 1.0; - #endif -}`,yN=`#define PHONG -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,_N=`#define PHONG -uniform vec3 diffuse; -uniform vec3 emissive; -uniform vec3 specular; -uniform float shininess; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,xN=`#define STANDARD -varying vec3 vViewPosition; -#ifdef USE_TRANSMISSION - varying vec3 vWorldPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -#ifdef USE_TRANSMISSION - vWorldPosition = worldPosition.xyz; -#endif -}`,AN=`#define STANDARD -#ifdef PHYSICAL - #define IOR - #define USE_SPECULAR -#endif -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float roughness; -uniform float metalness; -uniform float opacity; -#ifdef IOR - uniform float ior; -#endif -#ifdef USE_SPECULAR - uniform float specularIntensity; - uniform vec3 specularColor; - #ifdef USE_SPECULAR_COLORMAP - uniform sampler2D specularColorMap; - #endif - #ifdef USE_SPECULAR_INTENSITYMAP - uniform sampler2D specularIntensityMap; - #endif -#endif -#ifdef USE_CLEARCOAT - uniform float clearcoat; - uniform float clearcoatRoughness; -#endif -#ifdef USE_DISPERSION - uniform float dispersion; -#endif -#ifdef USE_IRIDESCENCE - uniform float iridescence; - uniform float iridescenceIOR; - uniform float iridescenceThicknessMinimum; - uniform float iridescenceThicknessMaximum; -#endif -#ifdef USE_SHEEN - uniform vec3 sheenColor; - uniform float sheenRoughness; - #ifdef USE_SHEEN_COLORMAP - uniform sampler2D sheenColorMap; - #endif - #ifdef USE_SHEEN_ROUGHNESSMAP - uniform sampler2D sheenRoughnessMap; - #endif -#endif -#ifdef USE_ANISOTROPY - uniform vec2 anisotropyVector; - #ifdef USE_ANISOTROPYMAP - uniform sampler2D anisotropyMap; - #endif -#endif -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; - vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; - #include - vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; - #ifdef USE_SHEEN - float sheenEnergyComp = 1.0 - 0.157 * max3( material.sheenColor ); - outgoingLight = outgoingLight * sheenEnergyComp + sheenSpecularDirect + sheenSpecularIndirect; - #endif - #ifdef USE_CLEARCOAT - float dotNVcc = saturate( dot( geometryClearcoatNormal, geometryViewDir ) ); - vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); - outgoingLight = outgoingLight * ( 1.0 - material.clearcoat * Fcc ) + ( clearcoatSpecularDirect + clearcoatSpecularIndirect ) * material.clearcoat; - #endif - #include - #include - #include - #include - #include - #include -}`,SN=`#define TOON -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -}`,MN=`#define TOON -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include -}`,EN=`uniform float size; -uniform float scale; -#include -#include -#include -#include -#include -#include -#ifdef USE_POINTS_UV - varying vec2 vUv; - uniform mat3 uvTransform; -#endif -void main() { - #ifdef USE_POINTS_UV - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - #endif - #include - #include - #include - #include - #include - #include - gl_PointSize = size; - #ifdef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); - #endif - #include - #include - #include - #include -}`,wN=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - vec3 outgoingLight = vec3( 0.0 ); - #include - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,CN=`#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,TN=`uniform vec3 color; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); - #include - #include - #include -}`,RN=`uniform float rotation; -uniform vec2 center; -#include -#include -#include -#include -#include -void main() { - #include - vec4 mvPosition = modelViewMatrix[ 3 ]; - vec2 scale = vec2( length( modelMatrix[ 0 ].xyz ), length( modelMatrix[ 1 ].xyz ) ); - #ifndef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - #endif - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - gl_Position = projectionMatrix * mvPosition; - #include - #include - #include -}`,bN=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - vec3 outgoingLight = vec3( 0.0 ); - #include - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include -}`,St={alphahash_fragment:ZL,alphahash_pars_fragment:qL,alphamap_fragment:$L,alphamap_pars_fragment:e3,alphatest_fragment:t3,alphatest_pars_fragment:n3,aomap_fragment:i3,aomap_pars_fragment:r3,batching_pars_vertex:s3,batching_vertex:o3,begin_vertex:a3,beginnormal_vertex:l3,bsdfs:c3,iridescence_fragment:u3,bumpmap_pars_fragment:f3,clipping_planes_fragment:h3,clipping_planes_pars_fragment:d3,clipping_planes_pars_vertex:p3,clipping_planes_vertex:m3,color_fragment:g3,color_pars_fragment:v3,color_pars_vertex:y3,color_vertex:_3,common:x3,cube_uv_reflection_fragment:A3,defaultnormal_vertex:S3,displacementmap_pars_vertex:M3,displacementmap_vertex:E3,emissivemap_fragment:w3,emissivemap_pars_fragment:C3,colorspace_fragment:T3,colorspace_pars_fragment:R3,envmap_fragment:b3,envmap_common_pars_fragment:B3,envmap_pars_fragment:P3,envmap_pars_vertex:I3,envmap_physical_pars_fragment:V3,envmap_vertex:L3,fog_vertex:D3,fog_pars_vertex:N3,fog_fragment:F3,fog_pars_fragment:U3,gradientmap_pars_fragment:O3,lightmap_pars_fragment:k3,lights_lambert_fragment:z3,lights_lambert_pars_fragment:H3,lights_pars_begin:G3,lights_toon_fragment:W3,lights_toon_pars_fragment:X3,lights_phong_fragment:J3,lights_phong_pars_fragment:j3,lights_physical_fragment:K3,lights_physical_pars_fragment:Y3,lights_fragment_begin:Q3,lights_fragment_maps:Z3,lights_fragment_end:q3,logdepthbuf_fragment:$3,logdepthbuf_pars_fragment:eD,logdepthbuf_pars_vertex:tD,logdepthbuf_vertex:nD,map_fragment:iD,map_pars_fragment:rD,map_particle_fragment:sD,map_particle_pars_fragment:oD,metalnessmap_fragment:aD,metalnessmap_pars_fragment:lD,morphinstance_vertex:cD,morphcolor_vertex:uD,morphnormal_vertex:fD,morphtarget_pars_vertex:hD,morphtarget_vertex:dD,normal_fragment_begin:pD,normal_fragment_maps:mD,normal_pars_fragment:gD,normal_pars_vertex:vD,normal_vertex:yD,normalmap_pars_fragment:_D,clearcoat_normal_fragment_begin:xD,clearcoat_normal_fragment_maps:AD,clearcoat_pars_fragment:SD,iridescence_pars_fragment:MD,opaque_fragment:ED,packing:wD,premultiplied_alpha_fragment:CD,project_vertex:TD,dithering_fragment:RD,dithering_pars_fragment:bD,roughnessmap_fragment:BD,roughnessmap_pars_fragment:PD,shadowmap_pars_fragment:ID,shadowmap_pars_vertex:LD,shadowmap_vertex:DD,shadowmask_pars_fragment:ND,skinbase_vertex:FD,skinning_pars_vertex:UD,skinning_vertex:OD,skinnormal_vertex:kD,specularmap_fragment:zD,specularmap_pars_fragment:HD,tonemapping_fragment:GD,tonemapping_pars_fragment:VD,transmission_fragment:WD,transmission_pars_fragment:XD,uv_pars_fragment:JD,uv_pars_vertex:jD,uv_vertex:KD,worldpos_vertex:YD,background_vert:QD,background_frag:ZD,backgroundCube_vert:qD,backgroundCube_frag:$D,cube_vert:eN,cube_frag:tN,depth_vert:nN,depth_frag:iN,distanceRGBA_vert:rN,distanceRGBA_frag:sN,equirect_vert:oN,equirect_frag:aN,linedashed_vert:lN,linedashed_frag:cN,meshbasic_vert:uN,meshbasic_frag:fN,meshlambert_vert:hN,meshlambert_frag:dN,meshmatcap_vert:pN,meshmatcap_frag:mN,meshnormal_vert:gN,meshnormal_frag:vN,meshphong_vert:yN,meshphong_frag:_N,meshphysical_vert:xN,meshphysical_frag:AN,meshtoon_vert:SN,meshtoon_frag:MN,points_vert:EN,points_frag:wN,shadow_vert:CN,shadow_frag:TN,sprite_vert:RN,sprite_frag:bN},De={common:{diffuse:{value:new Ie(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new xt},alphaMap:{value:null},alphaMapTransform:{value:new xt},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new xt}},envmap:{envMap:{value:null},envMapRotation:{value:new xt},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new xt}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new xt}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new xt},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new xt},normalScale:{value:new fe(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new xt},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new xt}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new xt}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new xt}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Ie(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowIntensity:1,shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowIntensity:1,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 Ie(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new xt},alphaTest:{value:0},uvTransform:{value:new xt}},sprite:{diffuse:{value:new Ie(16777215)},opacity:{value:1},center:{value:new fe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new xt},alphaMap:{value:null},alphaMapTransform:{value:new xt},alphaTest:{value:0}}},Mr={basic:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.fog]),vertexShader:St.meshbasic_vert,fragmentShader:St.meshbasic_frag},lambert:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.fog,De.lights,{emissive:{value:new Ie(0)}}]),vertexShader:St.meshlambert_vert,fragmentShader:St.meshlambert_frag},phong:{uniforms:fi([De.common,De.specularmap,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.fog,De.lights,{emissive:{value:new Ie(0)},specular:{value:new Ie(1118481)},shininess:{value:30}}]),vertexShader:St.meshphong_vert,fragmentShader:St.meshphong_frag},standard:{uniforms:fi([De.common,De.envmap,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.roughnessmap,De.metalnessmap,De.fog,De.lights,{emissive:{value:new Ie(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:St.meshphysical_vert,fragmentShader:St.meshphysical_frag},toon:{uniforms:fi([De.common,De.aomap,De.lightmap,De.emissivemap,De.bumpmap,De.normalmap,De.displacementmap,De.gradientmap,De.fog,De.lights,{emissive:{value:new Ie(0)}}]),vertexShader:St.meshtoon_vert,fragmentShader:St.meshtoon_frag},matcap:{uniforms:fi([De.common,De.bumpmap,De.normalmap,De.displacementmap,De.fog,{matcap:{value:null}}]),vertexShader:St.meshmatcap_vert,fragmentShader:St.meshmatcap_frag},points:{uniforms:fi([De.points,De.fog]),vertexShader:St.points_vert,fragmentShader:St.points_frag},dashed:{uniforms:fi([De.common,De.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:St.linedashed_vert,fragmentShader:St.linedashed_frag},depth:{uniforms:fi([De.common,De.displacementmap]),vertexShader:St.depth_vert,fragmentShader:St.depth_frag},normal:{uniforms:fi([De.common,De.bumpmap,De.normalmap,De.displacementmap,{opacity:{value:1}}]),vertexShader:St.meshnormal_vert,fragmentShader:St.meshnormal_frag},sprite:{uniforms:fi([De.sprite,De.fog]),vertexShader:St.sprite_vert,fragmentShader:St.sprite_frag},background:{uniforms:{uvTransform:{value:new xt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:St.background_vert,fragmentShader:St.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new xt}},vertexShader:St.backgroundCube_vert,fragmentShader:St.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:St.cube_vert,fragmentShader:St.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:St.equirect_vert,fragmentShader:St.equirect_frag},distanceRGBA:{uniforms:fi([De.common,De.displacementmap,{referencePosition:{value:new F},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:St.distanceRGBA_vert,fragmentShader:St.distanceRGBA_frag},shadow:{uniforms:fi([De.lights,De.fog,{color:{value:new Ie(0)},opacity:{value:1}}]),vertexShader:St.shadow_vert,fragmentShader:St.shadow_frag}};Mr.physical={uniforms:fi([Mr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new xt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new xt},clearcoatNormalScale:{value:new fe(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new xt},dispersion:{value:0},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new xt},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new xt},sheen:{value:0},sheenColor:{value:new Ie(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new xt},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new xt},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new xt},transmissionSamplerSize:{value:new fe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new xt},attenuationDistance:{value:0},attenuationColor:{value:new Ie(0)},specularColor:{value:new Ie(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new xt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new xt},anisotropyVector:{value:new fe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new xt}}]),vertexShader:St.meshphysical_vert,fragmentShader:St.meshphysical_frag};const pd={r:0,b:0,g:0},Xo=new Vi,BN=new rt;function PN(n,e,t,i,r,s,o){const a=new Ie(0);let u=s===!0?0:1,f,h,d=null,p=0,v=null;function y(A){let S=A.isScene===!0?A.background:null;return S&&S.isTexture&&(S=(A.backgroundBlurriness>0?t:e).get(S)),S}function M(A){let S=!1;const w=y(A);w===null?g(a,u):w&&w.isColor&&(g(w,1),S=!0);const P=n.xr.getEnvironmentBlendMode();P==="additive"?i.buffers.color.setClear(0,0,0,1,o):P==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||S)&&(i.buffers.depth.setTest(!0),i.buffers.depth.setMask(!0),i.buffers.color.setMask(!0),n.clear(n.autoClearColor,n.autoClearDepth,n.autoClearStencil))}function x(A,S){const w=y(S);w&&(w.isCubeTexture||w.mapping===vc)?(h===void 0&&(h=new _n(new za(1,1,1),new Br({name:"BackgroundCubeMaterial",uniforms:fc(Mr.backgroundCube.uniforms),vertexShader:Mr.backgroundCube.vertexShader,fragmentShader:Mr.backgroundCube.fragmentShader,side:mi,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(P,R,B){this.matrixWorld.copyPosition(B.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(h)),Xo.copy(S.backgroundRotation),Xo.x*=-1,Xo.y*=-1,Xo.z*=-1,w.isCubeTexture&&w.isRenderTargetTexture===!1&&(Xo.y*=-1,Xo.z*=-1),h.material.uniforms.envMap.value=w,h.material.uniforms.flipEnvMap.value=w.isCubeTexture&&w.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=S.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,h.material.uniforms.backgroundRotation.value.setFromMatrix4(BN.makeRotationFromEuler(Xo)),h.material.toneMapped=Gt.getTransfer(w.colorSpace)!==jt,(d!==w||p!==w.version||v!==n.toneMapping)&&(h.material.needsUpdate=!0,d=w,p=w.version,v=n.toneMapping),h.layers.enableAll(),A.unshift(h,h.geometry,h.material,0,0,null)):w&&w.isTexture&&(f===void 0&&(f=new _n(new _c(2,2),new Br({name:"BackgroundMaterial",uniforms:fc(Mr.background.uniforms),vertexShader:Mr.background.vertexShader,fragmentShader:Mr.background.fragmentShader,side:$r,depthTest:!1,depthWrite:!1,fog:!1})),f.geometry.deleteAttribute("normal"),Object.defineProperty(f.material,"map",{get:function(){return this.uniforms.t2D.value}}),r.update(f)),f.material.uniforms.t2D.value=w,f.material.uniforms.backgroundIntensity.value=S.backgroundIntensity,f.material.toneMapped=Gt.getTransfer(w.colorSpace)!==jt,w.matrixAutoUpdate===!0&&w.updateMatrix(),f.material.uniforms.uvTransform.value.copy(w.matrix),(d!==w||p!==w.version||v!==n.toneMapping)&&(f.material.needsUpdate=!0,d=w,p=w.version,v=n.toneMapping),f.layers.enableAll(),A.unshift(f,f.geometry,f.material,0,0,null))}function g(A,S){A.getRGB(pd,hR(n)),i.buffers.color.setClear(pd.r,pd.g,pd.b,S,o)}return{getClearColor:function(){return a},setClearColor:function(A,S=1){a.set(A),u=S,g(a,u)},getClearAlpha:function(){return u},setClearAlpha:function(A){u=A,g(a,u)},render:M,addToRenderList:x}}function IN(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},r=p(null);let s=r,o=!1;function a(C,b,J,j,ee){let ce=!1;const Z=d(j,J,b);s!==Z&&(s=Z,f(s.object)),ce=v(C,j,J,ee),ce&&y(C,j,J,ee),ee!==null&&e.update(ee,n.ELEMENT_ARRAY_BUFFER),(ce||o)&&(o=!1,w(C,b,J,j),ee!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(ee).buffer))}function u(){return n.createVertexArray()}function f(C){return n.bindVertexArray(C)}function h(C){return n.deleteVertexArray(C)}function d(C,b,J){const j=J.wireframe===!0;let ee=i[C.id];ee===void 0&&(ee={},i[C.id]=ee);let ce=ee[b.id];ce===void 0&&(ce={},ee[b.id]=ce);let Z=ce[j];return Z===void 0&&(Z=p(u()),ce[j]=Z),Z}function p(C){const b=[],J=[],j=[];for(let ee=0;ee=0){const G=ee[L];let q=ce[L];if(q===void 0&&(L==="instanceMatrix"&&C.instanceMatrix&&(q=C.instanceMatrix),L==="instanceColor"&&C.instanceColor&&(q=C.instanceColor)),G===void 0||G.attribute!==q||q&&G.data!==q.data)return!0;Z++}return s.attributesNum!==Z||s.index!==j}function y(C,b,J,j){const ee={},ce=b.attributes;let Z=0;const ve=J.getAttributes();for(const L in ve)if(ve[L].location>=0){let G=ce[L];G===void 0&&(L==="instanceMatrix"&&C.instanceMatrix&&(G=C.instanceMatrix),L==="instanceColor"&&C.instanceColor&&(G=C.instanceColor));const q={};q.attribute=G,G&&G.data&&(q.data=G.data),ee[L]=q,Z++}s.attributes=ee,s.attributesNum=Z,s.index=j}function M(){const C=s.newAttributes;for(let b=0,J=C.length;b=0){let V=ee[ve];if(V===void 0&&(ve==="instanceMatrix"&&C.instanceMatrix&&(V=C.instanceMatrix),ve==="instanceColor"&&C.instanceColor&&(V=C.instanceColor)),V!==void 0){const G=V.normalized,q=V.itemSize,ye=e.get(V);if(ye===void 0)continue;const Ne=ye.buffer,ie=ye.type,pe=ye.bytesPerElement,Ee=ie===n.INT||ie===n.UNSIGNED_INT||V.gpuType===Gm;if(V.isInterleavedBufferAttribute){const Ae=V.data,lt=Ae.stride,st=V.offset;if(Ae.isInstancedInterleavedBuffer){for(let ut=0;ut0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";B="mediump"}return B==="mediump"&&n.getShaderPrecisionFormat(n.VERTEX_SHADER,n.MEDIUM_FLOAT).precision>0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}let f=t.precision!==void 0?t.precision:"highp";const h=u(f);h!==f&&(console.warn("THREE.WebGLRenderer:",f,"not supported, using",h,"instead."),f=h);const d=t.logarithmicDepthBuffer===!0,p=t.reverseDepthBuffer===!0&&e.has("EXT_clip_control");if(p===!0){const B=e.get("EXT_clip_control");B.clipControlEXT(B.LOWER_LEFT_EXT,B.ZERO_TO_ONE_EXT)}const v=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),y=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),M=n.getParameter(n.MAX_TEXTURE_SIZE),x=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),g=n.getParameter(n.MAX_VERTEX_ATTRIBS),A=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),S=n.getParameter(n.MAX_VARYING_VECTORS),w=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),P=y>0,R=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:u,textureFormatReadable:o,textureTypeReadable:a,precision:f,logarithmicDepthBuffer:d,reverseDepthBuffer:p,maxTextures:v,maxVertexTextures:y,maxTextureSize:M,maxCubemapSize:x,maxAttributes:g,maxVertexUniforms:A,maxVaryings:S,maxFragmentUniforms:w,vertexTextures:P,maxSamples:R}}function NN(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new gs,a=new xt,u={value:null,needsUpdate:!1};this.uniform=u,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const v=d.length!==0||p||i!==0||r;return r=p,i=d.length,v},this.beginShadows=function(){s=!0,h(null)},this.endShadows=function(){s=!1},this.setGlobalState=function(d,p){t=h(d,p,0)},this.setState=function(d,p,v){const y=d.clippingPlanes,M=d.clipIntersection,x=d.clipShadows,g=n.get(d);if(!r||y===null||y.length===0||s&&!x)s?h(null):f();else{const A=s?0:i,S=A*4;let w=g.clippingState||null;u.value=w,w=h(y,p,S,v);for(let P=0;P!==S;++P)w[P]=t[P];g.clippingState=w,this.numIntersection=M?this.numPlanes:0,this.numPlanes+=A}};function f(){u.value!==t&&(u.value=t,u.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,v,y){const M=d!==null?d.length:0;let x=null;if(M!==0){if(x=u.value,y!==!0||x===null){const g=v+M*4,A=p.matrixWorldInverse;a.getNormalMatrix(A),(x===null||x.length0){const f=new mR(u.height);return f.fromEquirectangularTexture(n,o),e.set(o,f),o.addEventListener("dispose",r),t(f.texture,o.mapping)}else return null}}return o}function r(o){const a=o.target;a.removeEventListener("dispose",r);const u=e.get(a);u!==void 0&&(e.delete(a),u.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class jr extends Mf{constructor(e=-1,t=1,i=1,r=-1,s=.1,o=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=i,this.bottom=r,this.near=s,this.far=o,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=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,i,r,s,o){this.view===null&&(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=i,this.view.offsetY=r,this.view.width=s,this.view.height=o,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),i=(this.right+this.left)/2,r=(this.top+this.bottom)/2;let s=i-e,o=i+e,a=r+t,u=r-t;if(this.view!==null&&this.view.enabled){const f=(this.right-this.left)/this.view.fullWidth/this.zoom,h=(this.top-this.bottom)/this.view.fullHeight/this.zoom;s+=f*this.view.offsetX,o=s+f*this.view.width,a-=h*this.view.offsetY,u=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,u,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,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}}const Hl=4,pM=[.125,.215,.35,.446,.526,.582],oa=20,_v=new jr,mM=new Ie;let xv=null,Av=0,Sv=0,Mv=!1;const sa=(1+Math.sqrt(5))/2,yl=1/sa,gM=[new F(-sa,yl,0),new F(sa,yl,0),new F(-yl,0,sa),new F(yl,0,sa),new F(0,sa,-yl),new F(0,sa,yl),new F(-1,1,-1),new F(1,1,-1),new F(-1,1,1),new F(1,1,1)];class n_{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,i=.1,r=100){xv=this._renderer.getRenderTarget(),Av=this._renderer.getActiveCubeFace(),Sv=this._renderer.getActiveMipmapLevel(),Mv=this._renderer.xr.enabled,this._renderer.xr.enabled=!1,this._setSize(256);const s=this._allocateTargets();return s.depthBuffer=!0,this._sceneToCubeUV(e,i,r,s),t>0&&this._blur(s,0,0,t),this._applyPMREM(s),this._cleanup(s),s}fromEquirectangular(e,t=null){return this._fromTexture(e,t)}fromCubemap(e,t=null){return this._fromTexture(e,t)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=_M(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=yM(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(e){this._lodMax=Math.floor(Math.log2(e)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let e=0;e2?S:0,S,S),h.setRenderTarget(r),M&&h.render(y,a),h.render(e,a)}y.geometry.dispose(),y.material.dispose(),h.toneMapping=p,h.autoClear=d,e.background=x}_textureToCubeUV(e,t){const i=this._renderer,r=e.mapping===Bs||e.mapping===Mo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=_M()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=yM());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new _n(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const u=this._cubeSize;md(t,0,0,3*u,2*u),i.setRenderTarget(t),i.render(o,_v)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;soa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${oa}`);const g=[];let A=0;for(let B=0;BS-Hl?r-S+Hl:0),R=4*(this._cubeSize-w);md(t,P,R,3*w,2*w),u.setRenderTarget(t),u.render(d,_v)}}function UN(n){const e=[],t=[],i=[];let r=n;const s=n-Hl+1+pM.length;for(let o=0;on-Hl?u=pM[o-n+Hl-1]:o===0&&(u=0),i.push(u);const f=1/(a-2),h=-f,d=1+f,p=[h,h,d,h,d,d,h,h,d,d,h,d],v=6,y=6,M=3,x=2,g=1,A=new Float32Array(M*y*v),S=new Float32Array(x*y*v),w=new Float32Array(g*y*v);for(let R=0;R2?0:-1,z=[B,D,0,B+2/3,D,0,B+2/3,D+1,0,B,D,0,B+2/3,D+1,0,B,D+1,0];A.set(z,M*y*R),S.set(p,x*y*R);const C=[R,R,R,R,R,R];w.set(C,g*y*R)}const P=new _t;P.setAttribute("position",new Ut(A,M)),P.setAttribute("uv",new Ut(S,x)),P.setAttribute("faceIndex",new Ut(w,g)),e.push(P),r>Hl&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function vM(n,e,t){const i=new br(n,e,t);return i.texture.mapping=vc,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function md(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function ON(n,e,t){const i=new Float32Array(oa),r=new F(0,1,0);return new Br({name:"SphericalGaussianBlur",defines:{n:oa,CUBEUV_TEXEL_WIDTH:1/e,CUBEUV_TEXEL_HEIGHT:1/t,CUBEUV_MAX_MIP:`${n}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:i},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:r}},vertexShader:bx(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform int samples; - uniform float weights[ n ]; - uniform bool latitudinal; - uniform float dTheta; - uniform float mipInt; - uniform vec3 poleAxis; - - #define ENVMAP_TYPE_CUBE_UV - #include - - vec3 getSample( float theta, vec3 axis ) { - - float cosTheta = cos( theta ); - // Rodrigues' axis-angle rotation - vec3 sampleDirection = vOutputDirection * cosTheta - + cross( axis, vOutputDirection ) * sin( theta ) - + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); - - return bilinearCubeUV( envMap, sampleDirection, mipInt ); - - } - - void main() { - - vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); - - if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); - - } - - axis = normalize( axis ); - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); - - for ( int i = 1; i < n; i++ ) { - - if ( i >= samples ) { - - break; - - } - - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); - - } - - } - `,blending:Es,depthTest:!1,depthWrite:!1})}function yM(){return new Br({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:bx(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - - #include - - void main() { - - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); - - gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); - - } - `,blending:Es,depthTest:!1,depthWrite:!1})}function _M(){return new Br({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:bx(),fragmentShader:` - - precision mediump float; - precision mediump int; - - uniform float flipEnvMap; - - varying vec3 vOutputDirection; - - uniform samplerCube envMap; - - void main() { - - gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); - - } - `,blending:Es,depthTest:!1,depthWrite:!1})}function bx(){return` - - precision mediump float; - precision mediump int; - - attribute float faceIndex; - - varying vec3 vOutputDirection; - - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { - - uv = 2.0 * uv - 1.0; - - vec3 direction = vec3( uv, 1.0 ); - - if ( face == 0.0 ) { - - direction = direction.zyx; // ( 1, v, u ) pos x - - } else if ( face == 1.0 ) { - - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y - - } else if ( face == 2.0 ) { - - direction.x *= -1.0; // ( -u, v, 1 ) pos z - - } else if ( face == 3.0 ) { - - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x - - } else if ( face == 4.0 ) { - - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y - - } else if ( face == 5.0 ) { - - direction.z *= -1.0; // ( u, v, -1 ) neg z - - } - - return direction; - - } - - void main() { - - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); - - } - `}function kN(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const u=a.mapping,f=u===$u||u===ef,h=u===Bs||u===Mo;if(f||h){let d=e.get(a);const p=d!==void 0?d.texture.pmremVersion:0;if(a.isRenderTargetTexture&&a.pmremVersion!==p)return t===null&&(t=new n_(n)),d=f?t.fromEquirectangular(a,d):t.fromCubemap(a,d),d.texture.pmremVersion=a.pmremVersion,e.set(a,d),d.texture;if(d!==void 0)return d.texture;{const v=a.image;return f&&v&&v.height>0||h&&v&&r(v)?(t===null&&(t=new n_(n)),d=f?t.fromEquirectangular(a):t.fromCubemap(a),d.texture.pmremVersion=a.pmremVersion,e.set(a,d),a.addEventListener("dispose",s),d.texture):null}}}return a}function r(a){let u=0;const f=6;for(let h=0;he.maxTextureSize&&(P=Math.ceil(w/e.maxTextureSize),w=e.maxTextureSize);const R=new Float32Array(w*P*4*d),B=new Qm(R,w,P,d);B.type=wi,B.needsUpdate=!0;const D=S*4;for(let C=0;C0)return n;const r=e*t;let s=AM[r];if(s===void 0&&(s=new Float32Array(r),AM[r]=s),e!==0){i.toArray(s,0);for(let o=1,a=0;o!==e;++o)a+=t,n[o].toArray(s,a)}return s}function Bn(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` -`)}function kF(n){const e=Gt.getPrimaries(Gt.workingColorSpace),t=Gt.getPrimaries(n);let i;switch(e===t?i="":e===sf&&t===rf?i="LinearDisplayP3ToLinearSRGB":e===rf&&t===sf&&(i="LinearSRGBToLinearDisplayP3"),n){case Ns:case Sf:return[i,"LinearTransferOETF"];case ir:case Ym:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}function RM(n,e,t){const i=n.getShaderParameter(e,n.COMPILE_STATUS),r=n.getShaderInfoLog(e).trim();if(i&&r==="")return"";const s=/ERROR: 0:(\d+)/.exec(r);if(s){const o=parseInt(s[1]);return t.toUpperCase()+` - -`+r+` - -`+OF(n.getShaderSource(e),o)}else return r}function zF(n,e){const t=kF(e);return`vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function HF(n,e){let t;switch(e){case kT:t="Linear";break;case zT:t="Reinhard";break;case HT:t="Cineon";break;case hx:t="ACESFilmic";break;case VT:t="AgX";break;case WT:t="Neutral";break;case GT:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}const gd=new F;function GF(){Gt.getLuminanceCoefficients(gd);const n=gd.x.toFixed(4),e=gd.y.toFixed(4),t=gd.z.toFixed(4);return["float luminance( const in vec3 rgb ) {",` const vec3 weights = vec3( ${n}, ${e}, ${t} );`," return dot( weights, rgb );","}"].join(` -`)}function VF(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(vu).join(` -`)}function WF(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` -`)}function XF(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let r=0;r/gm;function i_(n){return n.replace(JF,KF)}const jF=new Map;function KF(n,e){let t=St[e];if(t===void 0){const i=jF.get(e);if(i!==void 0)t=St[i],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',e,i);else throw new Error("Can not resolve #include <"+e+">")}return i_(t)}const YF=/#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 PM(n){return n.replace(YF,QF)}function QF(n,e,t,i){let r="";for(let s=parseInt(e);s0&&(x+=` -`),g=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,y].filter(vu).join(` -`),g.length>0&&(g+=` -`)):(x=[IM(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,y,t.extensionClipCullDistance?"#define USE_CLIP_DISTANCE":"",t.batching?"#define USE_BATCHING":"",t.batchingColor?"#define USE_BATCHING_COLOR":"",t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.instancingMorph?"#define USE_INSTANCING_MORPH":"",t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+h:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.displacementMap?"#define USE_DISPLACEMENTMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.mapUv?"#define MAP_UV "+t.mapUv:"",t.alphaMapUv?"#define ALPHAMAP_UV "+t.alphaMapUv:"",t.lightMapUv?"#define LIGHTMAP_UV "+t.lightMapUv:"",t.aoMapUv?"#define AOMAP_UV "+t.aoMapUv:"",t.emissiveMapUv?"#define EMISSIVEMAP_UV "+t.emissiveMapUv:"",t.bumpMapUv?"#define BUMPMAP_UV "+t.bumpMapUv:"",t.normalMapUv?"#define NORMALMAP_UV "+t.normalMapUv:"",t.displacementMapUv?"#define DISPLACEMENTMAP_UV "+t.displacementMapUv:"",t.metalnessMapUv?"#define METALNESSMAP_UV "+t.metalnessMapUv:"",t.roughnessMapUv?"#define ROUGHNESSMAP_UV "+t.roughnessMapUv:"",t.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+t.anisotropyMapUv:"",t.clearcoatMapUv?"#define CLEARCOATMAP_UV "+t.clearcoatMapUv:"",t.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+t.clearcoatNormalMapUv:"",t.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+t.clearcoatRoughnessMapUv:"",t.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+t.iridescenceMapUv:"",t.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+t.iridescenceThicknessMapUv:"",t.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+t.sheenColorMapUv:"",t.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+t.sheenRoughnessMapUv:"",t.specularMapUv?"#define SPECULARMAP_UV "+t.specularMapUv:"",t.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+t.specularColorMapUv:"",t.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+t.specularIntensityMapUv:"",t.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+t.transmissionMapUv:"",t.thicknessMapUv?"#define THICKNESSMAP_UV "+t.thicknessMapUv:"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphColors?"#define USE_MORPHCOLORS":"",t.morphTargetsCount>0?"#define MORPHTARGETS_TEXTURE_STRIDE "+t.morphTextureStride:"",t.morphTargetsCount>0?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+u:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","#ifdef USE_INSTANCING_MORPH"," uniform sampler2D morphTexture;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_UV1"," attribute vec2 uv1;","#endif","#ifdef USE_UV2"," attribute vec2 uv2;","#endif","#ifdef USE_UV3"," attribute vec2 uv3;","#endif","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(vu).join(` -`),g=[IM(t),"#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,y,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.alphaToCoverage?"#define ALPHA_TO_COVERAGE":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+f:"",t.envMap?"#define "+h:"",t.envMap?"#define "+d:"",p?"#define CUBEUV_TEXEL_WIDTH "+p.texelWidth:"",p?"#define CUBEUV_TEXEL_HEIGHT "+p.texelHeight:"",p?"#define CUBEUV_MAX_MIP "+p.maxMip+".0":"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",t.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.anisotropy?"#define USE_ANISOTROPY":"",t.anisotropyMap?"#define USE_ANISOTROPYMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.dispersion?"#define USE_DISPERSION":"",t.iridescence?"#define USE_IRIDESCENCE":"",t.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",t.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",t.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.alphaHash?"#define USE_ALPHAHASH":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents&&t.flatShading===!1?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor||t.batchingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUv1s?"#define USE_UV1":"",t.vertexUv2s?"#define USE_UV2":"",t.vertexUv3s?"#define USE_UV3":"",t.pointsUvs?"#define USE_POINTS_UV":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+u:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.reverseDepthBuffer?"#define USE_REVERSEDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==Qr?"#define TONE_MAPPING":"",t.toneMapping!==Qr?St.tonemapping_pars_fragment:"",t.toneMapping!==Qr?HF("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",St.colorspace_pars_fragment,zF("linearToOutputTexel",t.outputColorSpace),GF(),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` -`].filter(vu).join(` -`)),o=i_(o),o=bM(o,t),o=BM(o,t),a=i_(a),a=bM(a,t),a=BM(a,t),o=PM(o),a=PM(a),t.isRawShaderMaterial!==!0&&(A=`#version 300 es -`,x=[v,"#define attribute in","#define varying out","#define texture2D texture"].join(` -`)+` -`+x,g=["#define varying in",t.glslVersion===t_?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===t_?"":"#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(` -`)+` -`+g);const S=A+x+o,w=A+g+a,P=TM(r,r.VERTEX_SHADER,S),R=TM(r,r.FRAGMENT_SHADER,w);r.attachShader(M,P),r.attachShader(M,R),t.index0AttributeName!==void 0?r.bindAttribLocation(M,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(M,0,"position"),r.linkProgram(M);function B(b){if(n.debug.checkShaderErrors){const J=r.getProgramInfoLog(M).trim(),j=r.getShaderInfoLog(P).trim(),ee=r.getShaderInfoLog(R).trim();let ce=!0,Z=!0;if(r.getProgramParameter(M,r.LINK_STATUS)===!1)if(ce=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,M,P,R);else{const ve=RM(r,P,"vertex"),L=RM(r,R,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(M,r.VALIDATE_STATUS)+` - -Material Name: `+b.name+` -Material Type: `+b.type+` - -Program Info Log: `+J+` -`+ve+` -`+L)}else J!==""?console.warn("THREE.WebGLProgram: Program Info Log:",J):(j===""||ee==="")&&(Z=!1);Z&&(b.diagnostics={runnable:ce,programLog:J,vertexShader:{log:j,prefix:x},fragmentShader:{log:ee,prefix:g}})}r.deleteShader(P),r.deleteShader(R),D=new ap(r,M),z=XF(r,M)}let D;this.getUniforms=function(){return D===void 0&&B(this),D};let z;this.getAttributes=function(){return z===void 0&&B(this),z};let C=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return C===!1&&(C=r.getProgramParameter(M,FF)),C},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(M),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=UF++,this.cacheKey=e,this.usedTimes=1,this.program=M,this.vertexShader=P,this.fragmentShader=R,this}let iU=0;class rU{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(e){const t=e.vertexShader,i=e.fragmentShader,r=this._getShaderStage(t),s=this._getShaderStage(i),o=this._getShaderCacheForMaterial(e);return o.has(r)===!1&&(o.add(r),r.usedTimes++),o.has(s)===!1&&(o.add(s),s.usedTimes++),this}remove(e){const t=this.materialCache.get(e);for(const i of t)i.usedTimes--,i.usedTimes===0&&this.shaderCache.delete(i.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 i=t.get(e);return i===void 0&&(i=new Set,t.set(e,i)),i}_getShaderStage(e){const t=this.shaderCache;let i=t.get(e);return i===void 0&&(i=new sU(e),t.set(e,i)),i}}class sU{constructor(e){this.id=iU++,this.code=e,this.usedTimes=0}}function oU(n,e,t,i,r,s,o){const a=new Sa,u=new rU,f=new Set,h=[],d=r.logarithmicDepthBuffer,p=r.reverseDepthBuffer,v=r.vertexTextures;let y=r.precision;const M={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 x(C){return f.add(C),C===0?"uv":`uv${C}`}function g(C,b,J,j,ee){const ce=j.fog,Z=ee.geometry,ve=C.isMeshStandardMaterial?j.environment:null,L=(C.isMeshStandardMaterial?t:e).get(C.envMap||ve),V=L&&L.mapping===vc?L.image.height:null,G=M[C.type];C.precision!==null&&(y=r.getMaxPrecision(C.precision),y!==C.precision&&console.warn("THREE.WebGLProgram.getParameters:",C.precision,"not supported, using",y,"instead."));const q=Z.morphAttributes.position||Z.morphAttributes.normal||Z.morphAttributes.color,ye=q!==void 0?q.length:0;let Ne=0;Z.morphAttributes.position!==void 0&&(Ne=1),Z.morphAttributes.normal!==void 0&&(Ne=2),Z.morphAttributes.color!==void 0&&(Ne=3);let ie,pe,Ee,Ae;if(G){const nn=Mr[G];ie=nn.vertexShader,pe=nn.fragmentShader}else ie=C.vertexShader,pe=C.fragmentShader,u.update(C),Ee=u.getVertexShaderID(C),Ae=u.getFragmentShaderID(C);const lt=n.getRenderTarget(),st=ee.isInstancedMesh===!0,ut=ee.isBatchedMesh===!0,ot=!!C.map,me=!!C.matcap,O=!!L,be=!!C.aoMap,Re=!!C.lightMap,xe=!!C.bumpMap,Be=!!C.normalMap,$e=!!C.displacementMap,ze=!!C.emissiveMap,U=!!C.metalnessMap,I=!!C.roughnessMap,$=C.anisotropy>0,ue=C.clearcoat>0,ge=C.dispersion>0,he=C.iridescence>0,Qe=C.sheen>0,Pe=C.transmission>0,Ge=$&&!!C.anisotropyMap,Tt=ue&&!!C.clearcoatMap,Se=ue&&!!C.clearcoatNormalMap,Ve=ue&&!!C.clearcoatRoughnessMap,dt=he&&!!C.iridescenceMap,ft=he&&!!C.iridescenceThicknessMap,We=Qe&&!!C.sheenColorMap,W=Qe&&!!C.sheenRoughnessMap,le=!!C.specularMap,Le=!!C.specularColorMap,H=!!C.specularIntensityMap,we=Pe&&!!C.transmissionMap,se=Pe&&!!C.thicknessMap,de=!!C.gradientMap,Ue=!!C.alphaMap,Oe=C.alphaTest>0,mt=!!C.alphaHash,Lt=!!C.extensions;let un=Qr;C.toneMapped&&(lt===null||lt.isXRRenderTarget===!0)&&(un=n.toneMapping);const Mt={shaderID:G,shaderType:C.type,shaderName:C.name,vertexShader:ie,fragmentShader:pe,defines:C.defines,customVertexShaderID:Ee,customFragmentShaderID:Ae,isRawShaderMaterial:C.isRawShaderMaterial===!0,glslVersion:C.glslVersion,precision:y,batching:ut,batchingColor:ut&&ee._colorsTexture!==null,instancing:st,instancingColor:st&&ee.instanceColor!==null,instancingMorph:st&&ee.morphTexture!==null,supportsVertexTextures:v,outputColorSpace:lt===null?n.outputColorSpace:lt.isXRRenderTarget===!0?lt.texture.colorSpace:Ns,alphaToCoverage:!!C.alphaToCoverage,map:ot,matcap:me,envMap:O,envMapMode:O&&L.mapping,envMapCubeUVHeight:V,aoMap:be,lightMap:Re,bumpMap:xe,normalMap:Be,displacementMap:v&&$e,emissiveMap:ze,normalMapObjectSpace:Be&&C.normalMapType===qT,normalMapTangentSpace:Be&&C.normalMapType===bo,metalnessMap:U,roughnessMap:I,anisotropy:$,anisotropyMap:Ge,clearcoat:ue,clearcoatMap:Tt,clearcoatNormalMap:Se,clearcoatRoughnessMap:Ve,dispersion:ge,iridescence:he,iridescenceMap:dt,iridescenceThicknessMap:ft,sheen:Qe,sheenColorMap:We,sheenRoughnessMap:W,specularMap:le,specularColorMap:Le,specularIntensityMap:H,transmission:Pe,transmissionMap:we,thicknessMap:se,gradientMap:de,opaque:C.transparent===!1&&C.blending===_a&&C.alphaToCoverage===!1,alphaMap:Ue,alphaTest:Oe,alphaHash:mt,combine:C.combine,mapUv:ot&&x(C.map.channel),aoMapUv:be&&x(C.aoMap.channel),lightMapUv:Re&&x(C.lightMap.channel),bumpMapUv:xe&&x(C.bumpMap.channel),normalMapUv:Be&&x(C.normalMap.channel),displacementMapUv:$e&&x(C.displacementMap.channel),emissiveMapUv:ze&&x(C.emissiveMap.channel),metalnessMapUv:U&&x(C.metalnessMap.channel),roughnessMapUv:I&&x(C.roughnessMap.channel),anisotropyMapUv:Ge&&x(C.anisotropyMap.channel),clearcoatMapUv:Tt&&x(C.clearcoatMap.channel),clearcoatNormalMapUv:Se&&x(C.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ve&&x(C.clearcoatRoughnessMap.channel),iridescenceMapUv:dt&&x(C.iridescenceMap.channel),iridescenceThicknessMapUv:ft&&x(C.iridescenceThicknessMap.channel),sheenColorMapUv:We&&x(C.sheenColorMap.channel),sheenRoughnessMapUv:W&&x(C.sheenRoughnessMap.channel),specularMapUv:le&&x(C.specularMap.channel),specularColorMapUv:Le&&x(C.specularColorMap.channel),specularIntensityMapUv:H&&x(C.specularIntensityMap.channel),transmissionMapUv:we&&x(C.transmissionMap.channel),thicknessMapUv:se&&x(C.thicknessMap.channel),alphaMapUv:Ue&&x(C.alphaMap.channel),vertexTangents:!!Z.attributes.tangent&&(Be||$),vertexColors:C.vertexColors,vertexAlphas:C.vertexColors===!0&&!!Z.attributes.color&&Z.attributes.color.itemSize===4,pointsUvs:ee.isPoints===!0&&!!Z.attributes.uv&&(ot||Ue),fog:!!ce,useFog:C.fog===!0,fogExp2:!!ce&&ce.isFogExp2,flatShading:C.flatShading===!0,sizeAttenuation:C.sizeAttenuation===!0,logarithmicDepthBuffer:d,reverseDepthBuffer:p,skinning:ee.isSkinnedMesh===!0,morphTargets:Z.morphAttributes.position!==void 0,morphNormals:Z.morphAttributes.normal!==void 0,morphColors:Z.morphAttributes.color!==void 0,morphTargetsCount:ye,morphTextureStride:Ne,numDirLights:b.directional.length,numPointLights:b.point.length,numSpotLights:b.spot.length,numSpotLightMaps:b.spotLightMap.length,numRectAreaLights:b.rectArea.length,numHemiLights:b.hemi.length,numDirLightShadows:b.directionalShadowMap.length,numPointLightShadows:b.pointShadowMap.length,numSpotLightShadows:b.spotShadowMap.length,numSpotLightShadowsWithMaps:b.numSpotLightShadowsWithMaps,numLightProbes:b.numLightProbes,numClippingPlanes:o.numPlanes,numClipIntersection:o.numIntersection,dithering:C.dithering,shadowMapEnabled:n.shadowMap.enabled&&J.length>0,shadowMapType:n.shadowMap.type,toneMapping:un,decodeVideoTexture:ot&&C.map.isVideoTexture===!0&&Gt.getTransfer(C.map.colorSpace)===jt,premultipliedAlpha:C.premultipliedAlpha,doubleSided:C.side===Er,flipSided:C.side===mi,useDepthPacking:C.depthPacking>=0,depthPacking:C.depthPacking||0,index0AttributeName:C.index0AttributeName,extensionClipCullDistance:Lt&&C.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:(Lt&&C.extensions.multiDraw===!0||ut)&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:C.customProgramCacheKey()};return Mt.vertexUv1s=f.has(1),Mt.vertexUv2s=f.has(2),Mt.vertexUv3s=f.has(3),f.clear(),Mt}function A(C){const b=[];if(C.shaderID?b.push(C.shaderID):(b.push(C.customVertexShaderID),b.push(C.customFragmentShaderID)),C.defines!==void 0)for(const J in C.defines)b.push(J),b.push(C.defines[J]);return C.isRawShaderMaterial===!1&&(S(b,C),w(b,C),b.push(n.outputColorSpace)),b.push(C.customProgramCacheKey),b.join()}function S(C,b){C.push(b.precision),C.push(b.outputColorSpace),C.push(b.envMapMode),C.push(b.envMapCubeUVHeight),C.push(b.mapUv),C.push(b.alphaMapUv),C.push(b.lightMapUv),C.push(b.aoMapUv),C.push(b.bumpMapUv),C.push(b.normalMapUv),C.push(b.displacementMapUv),C.push(b.emissiveMapUv),C.push(b.metalnessMapUv),C.push(b.roughnessMapUv),C.push(b.anisotropyMapUv),C.push(b.clearcoatMapUv),C.push(b.clearcoatNormalMapUv),C.push(b.clearcoatRoughnessMapUv),C.push(b.iridescenceMapUv),C.push(b.iridescenceThicknessMapUv),C.push(b.sheenColorMapUv),C.push(b.sheenRoughnessMapUv),C.push(b.specularMapUv),C.push(b.specularColorMapUv),C.push(b.specularIntensityMapUv),C.push(b.transmissionMapUv),C.push(b.thicknessMapUv),C.push(b.combine),C.push(b.fogExp2),C.push(b.sizeAttenuation),C.push(b.morphTargetsCount),C.push(b.morphAttributeCount),C.push(b.numDirLights),C.push(b.numPointLights),C.push(b.numSpotLights),C.push(b.numSpotLightMaps),C.push(b.numHemiLights),C.push(b.numRectAreaLights),C.push(b.numDirLightShadows),C.push(b.numPointLightShadows),C.push(b.numSpotLightShadows),C.push(b.numSpotLightShadowsWithMaps),C.push(b.numLightProbes),C.push(b.shadowMapType),C.push(b.toneMapping),C.push(b.numClippingPlanes),C.push(b.numClipIntersection),C.push(b.depthPacking)}function w(C,b){a.disableAll(),b.supportsVertexTextures&&a.enable(0),b.instancing&&a.enable(1),b.instancingColor&&a.enable(2),b.instancingMorph&&a.enable(3),b.matcap&&a.enable(4),b.envMap&&a.enable(5),b.normalMapObjectSpace&&a.enable(6),b.normalMapTangentSpace&&a.enable(7),b.clearcoat&&a.enable(8),b.iridescence&&a.enable(9),b.alphaTest&&a.enable(10),b.vertexColors&&a.enable(11),b.vertexAlphas&&a.enable(12),b.vertexUv1s&&a.enable(13),b.vertexUv2s&&a.enable(14),b.vertexUv3s&&a.enable(15),b.vertexTangents&&a.enable(16),b.anisotropy&&a.enable(17),b.alphaHash&&a.enable(18),b.batching&&a.enable(19),b.dispersion&&a.enable(20),b.batchingColor&&a.enable(21),C.push(a.mask),a.disableAll(),b.fog&&a.enable(0),b.useFog&&a.enable(1),b.flatShading&&a.enable(2),b.logarithmicDepthBuffer&&a.enable(3),b.reverseDepthBuffer&&a.enable(4),b.skinning&&a.enable(5),b.morphTargets&&a.enable(6),b.morphNormals&&a.enable(7),b.morphColors&&a.enable(8),b.premultipliedAlpha&&a.enable(9),b.shadowMapEnabled&&a.enable(10),b.doubleSided&&a.enable(11),b.flipSided&&a.enable(12),b.useDepthPacking&&a.enable(13),b.dithering&&a.enable(14),b.transmission&&a.enable(15),b.sheen&&a.enable(16),b.opaque&&a.enable(17),b.pointsUvs&&a.enable(18),b.decodeVideoTexture&&a.enable(19),b.alphaToCoverage&&a.enable(20),C.push(a.mask)}function P(C){const b=M[C.type];let J;if(b){const j=Mr[b];J=dR.clone(j.uniforms)}else J=C.uniforms;return J}function R(C,b){let J;for(let j=0,ee=h.length;j0?i.push(g):v.transparent===!0?r.push(g):t.push(g)}function u(d,p,v,y,M,x){const g=o(d,p,v,y,M,x);v.transmission>0?i.unshift(g):v.transparent===!0?r.unshift(g):t.unshift(g)}function f(d,p){t.length>1&&t.sort(d||lU),i.length>1&&i.sort(p||LM),r.length>1&&r.sort(p||LM)}function h(){for(let d=e,p=n.length;d=s.length?(o=new DM,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function uU(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new F,color:new Ie};break;case"SpotLight":t={position:new F,direction:new F,color:new Ie,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new F,color:new Ie,distance:0,decay:0};break;case"HemisphereLight":t={direction:new F,skyColor:new Ie,groundColor:new Ie};break;case"RectAreaLight":t={color:new Ie,position:new F,halfWidth:new F,halfHeight:new F};break}return n[e.id]=t,t}}}function fU(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe};break;case"SpotLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe};break;case"PointLight":t={shadowIntensity:1,shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new fe,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let hU=0;function dU(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function pU(n){const e=new uU,t=fU(),i={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1,numSpotMaps:-1,numLightProbes:-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,numLightProbes:0};for(let f=0;f<9;f++)i.probe.push(new F);const r=new F,s=new rt,o=new rt;function a(f){let h=0,d=0,p=0;for(let z=0;z<9;z++)i.probe[z].set(0,0,0);let v=0,y=0,M=0,x=0,g=0,A=0,S=0,w=0,P=0,R=0,B=0;f.sort(dU);for(let z=0,C=f.length;z0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=De.LTC_FLOAT_1,i.rectAreaLTC2=De.LTC_FLOAT_2):(i.rectAreaLTC1=De.LTC_HALF_1,i.rectAreaLTC2=De.LTC_HALF_2)),i.ambient[0]=h,i.ambient[1]=d,i.ambient[2]=p;const D=i.hash;(D.directionalLength!==v||D.pointLength!==y||D.spotLength!==M||D.rectAreaLength!==x||D.hemiLength!==g||D.numDirectionalShadows!==A||D.numPointShadows!==S||D.numSpotShadows!==w||D.numSpotMaps!==P||D.numLightProbes!==B)&&(i.directional.length=v,i.spot.length=M,i.rectArea.length=x,i.point.length=y,i.hemi.length=g,i.directionalShadow.length=A,i.directionalShadowMap.length=A,i.pointShadow.length=S,i.pointShadowMap.length=S,i.spotShadow.length=w,i.spotShadowMap.length=w,i.directionalShadowMatrix.length=A,i.pointShadowMatrix.length=S,i.spotLightMatrix.length=w+P-R,i.spotLightMap.length=P,i.numSpotLightShadowsWithMaps=R,i.numLightProbes=B,D.directionalLength=v,D.pointLength=y,D.spotLength=M,D.rectAreaLength=x,D.hemiLength=g,D.numDirectionalShadows=A,D.numPointShadows=S,D.numSpotShadows=w,D.numSpotMaps=P,D.numLightProbes=B,i.version=hU++)}function u(f,h){let d=0,p=0,v=0,y=0,M=0;const x=h.matrixWorldInverse;for(let g=0,A=f.length;g=o.length?(a=new NM(n),o.push(a)):a=o[s],a}function i(){e=new WeakMap}return{get:t,dispose:i}}class Px extends En{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=QT,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 Ix extends En{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}}const gU=`void main() { - gl_Position = vec4( position, 1.0 ); -}`,vU=`uniform sampler2D shadow_pass; -uniform vec2 resolution; -uniform float radius; -#include -void main() { - const float samples = float( VSM_SAMPLES ); - float mean = 0.0; - float squared_mean = 0.0; - float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); - float uvStart = samples <= 1.0 ? 0.0 : - 1.0; - for ( float i = 0.0; i < samples; i ++ ) { - float uvOffset = uvStart + i * uvStride; - #ifdef HORIZONTAL_PASS - vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); - mean += distribution.x; - squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; - #else - float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); - mean += depth; - squared_mean += depth * depth; - #endif - } - mean = mean / samples; - squared_mean = squared_mean / samples; - float std_dev = sqrt( squared_mean - mean * mean ); - gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function yU(n,e,t){let i=new wf;const r=new fe,s=new fe,o=new Nt,a=new Px({depthPacking:ZT}),u=new Ix,f={},h=t.maxTextureSize,d={[$r]:mi,[mi]:$r,[Er]:Er},p=new Br({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new fe},radius:{value:4}},vertexShader:gU,fragmentShader:vU}),v=p.clone();v.defines.HORIZONTAL_PASS=1;const y=new _t;y.setAttribute("position",new Ut(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const M=new _n(y,p),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=km;let g=this.type;this.render=function(R,B,D){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||R.length===0)return;const z=n.getRenderTarget(),C=n.getActiveCubeFace(),b=n.getActiveMipmapLevel(),J=n.state;J.setBlending(Es),J.buffers.color.setClear(1,1,1,1),J.buffers.depth.setTest(!0),J.setScissorTest(!1);const j=g!==xr&&this.type===xr,ee=g===xr&&this.type!==xr;for(let ce=0,Z=R.length;ceh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/V.x),r.x=s.x*V.x,L.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/V.y),r.y=s.y*V.y,L.mapSize.y=s.y)),L.map===null||j===!0||ee===!0){const q=this.type!==xr?{minFilter:bn,magFilter:bn}:{};L.map!==null&&L.map.dispose(),L.map=new br(r.x,r.y,q),L.map.texture.name=ve.name+".shadowMap",L.camera.updateProjectionMatrix()}n.setRenderTarget(L.map),n.clear();const G=L.getViewportCount();for(let q=0;q0||B.map&&B.alphaTest>0){const J=C.uuid,j=B.uuid;let ee=f[J];ee===void 0&&(ee={},f[J]=ee);let ce=ee[j];ce===void 0&&(ce=C.clone(),ee[j]=ce,B.addEventListener("dispose",P)),C=ce}if(C.visible=B.visible,C.wireframe=B.wireframe,z===xr?C.side=B.shadowSide!==null?B.shadowSide:B.side:C.side=B.shadowSide!==null?B.shadowSide:d[B.side],C.alphaMap=B.alphaMap,C.alphaTest=B.alphaTest,C.map=B.map,C.clipShadows=B.clipShadows,C.clippingPlanes=B.clippingPlanes,C.clipIntersection=B.clipIntersection,C.displacementMap=B.displacementMap,C.displacementScale=B.displacementScale,C.displacementBias=B.displacementBias,C.wireframeLinewidth=B.wireframeLinewidth,C.linewidth=B.linewidth,D.isPointLight===!0&&C.isMeshDistanceMaterial===!0){const J=n.properties.get(C);J.light=D}return C}function w(R,B,D,z,C){if(R.visible===!1)return;if(R.layers.test(B.layers)&&(R.isMesh||R.isLine||R.isPoints)&&(R.castShadow||R.receiveShadow&&C===xr)&&(!R.frustumCulled||i.intersectsObject(R))){R.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,R.matrixWorld);const j=e.update(R),ee=R.material;if(Array.isArray(ee)){const ce=j.groups;for(let Z=0,ve=ce.length;Z=1):ve.indexOf("OpenGL ES")!==-1&&(Z=parseFloat(/^OpenGL ES (\d)/.exec(ve)[1]),ce=Z>=2);let L=null,V={};const G=n.getParameter(n.SCISSOR_BOX),q=n.getParameter(n.VIEWPORT),ye=new Nt().fromArray(G),Ne=new Nt().fromArray(q);function ie(H,we,se,de){const Ue=new Uint8Array(4),Oe=n.createTexture();n.bindTexture(H,Oe),n.texParameteri(H,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(H,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let mt=0;mte?(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2):(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0),n}function SU(n,e){const t=n.image&&n.image.width?n.image.width/n.image.height:1;return t>e?(n.repeat.x=e/t,n.repeat.y=1,n.offset.x=(1-n.repeat.x)/2,n.offset.y=0):(n.repeat.x=1,n.repeat.y=t/e,n.offset.x=0,n.offset.y=(1-n.repeat.y)/2),n}function MU(n){return n.repeat.x=1,n.repeat.y=1,n.offset.x=0,n.offset.y=0,n}function r_(n,e,t,i){const r=EU(i);switch(t){case gx:return n*e;case yx:return n*e;case _x:return n*e*2;case Xm:return n*e/r.components*r.byteLength;case Af:return n*e/r.components*r.byteLength;case xx:return n*e*2/r.components*r.byteLength;case Jm:return n*e*2/r.components*r.byteLength;case vx:return n*e*3/r.components*r.byteLength;case ti:return n*e*4/r.components*r.byteLength;case jm:return n*e*4/r.components*r.byteLength;case Ru:case bu:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case Bu:case Pu:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case Xp:case jp:return Math.max(n,16)*Math.max(e,8)/4;case Wp:case Jp:return Math.max(n,8)*Math.max(e,8)/2;case Kp:case Yp:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*8;case Qp:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case Zp:return Math.floor((n+3)/4)*Math.floor((e+3)/4)*16;case qp:return Math.floor((n+4)/5)*Math.floor((e+3)/4)*16;case $p:return Math.floor((n+4)/5)*Math.floor((e+4)/5)*16;case em:return Math.floor((n+5)/6)*Math.floor((e+4)/5)*16;case tm:return Math.floor((n+5)/6)*Math.floor((e+5)/6)*16;case nm:return Math.floor((n+7)/8)*Math.floor((e+4)/5)*16;case im:return Math.floor((n+7)/8)*Math.floor((e+5)/6)*16;case rm:return Math.floor((n+7)/8)*Math.floor((e+7)/8)*16;case sm:return Math.floor((n+9)/10)*Math.floor((e+4)/5)*16;case om:return Math.floor((n+9)/10)*Math.floor((e+5)/6)*16;case am:return Math.floor((n+9)/10)*Math.floor((e+7)/8)*16;case lm:return Math.floor((n+9)/10)*Math.floor((e+9)/10)*16;case cm:return Math.floor((n+11)/12)*Math.floor((e+9)/10)*16;case um:return Math.floor((n+11)/12)*Math.floor((e+11)/12)*16;case Iu:case fm:case hm:return Math.ceil(n/4)*Math.ceil(e/4)*16;case Ax:case dm:return Math.ceil(n/4)*Math.ceil(e/4)*8;case pm:case mm:return Math.ceil(n/4)*Math.ceil(e/4)*16}throw new Error(`Unable to determine texture byte length for ${t} format.`)}function EU(n){switch(n){case Rr:case dx:return{byteLength:1,components:1};case ac:case px:case yc:return{byteLength:2,components:1};case Vm:case Wm:return{byteLength:2,components:4};case Ps:case Gm:case wi:return{byteLength:4,components:1};case mx:return{byteLength:4,components:3}}throw new Error(`Unknown texture type ${n}.`)}const wU={contain:AU,cover:SU,fill:MU,getByteLength:r_};function CU(n,e,t,i,r,s,o){const a=e.has("WEBGL_multisampled_render_to_texture")?e.get("WEBGL_multisampled_render_to_texture"):null,u=typeof navigator>"u"?!1:/OculusBrowser/g.test(navigator.userAgent),f=new fe,h=new WeakMap;let d;const p=new WeakMap;let v=!1;try{v=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y(U,I){return v?new OffscreenCanvas(U,I):lf("canvas")}function M(U,I,$){let ue=1;const ge=ze(U);if((ge.width>$||ge.height>$)&&(ue=$/Math.max(ge.width,ge.height)),ue<1)if(typeof HTMLImageElement<"u"&&U instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&U instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&U instanceof ImageBitmap||typeof VideoFrame<"u"&&U instanceof VideoFrame){const he=Math.floor(ue*ge.width),Qe=Math.floor(ue*ge.height);d===void 0&&(d=y(he,Qe));const Pe=I?y(he,Qe):d;return Pe.width=he,Pe.height=Qe,Pe.getContext("2d").drawImage(U,0,0,he,Qe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ge.width+"x"+ge.height+") to ("+he+"x"+Qe+")."),Pe}else return"data"in U&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ge.width+"x"+ge.height+")."),U;return U}function x(U){return U.generateMipmaps&&U.minFilter!==bn&&U.minFilter!==mn}function g(U){n.generateMipmap(U)}function A(U,I,$,ue,ge=!1){if(U!==null){if(n[U]!==void 0)return n[U];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+U+"'")}let he=I;if(I===n.RED&&($===n.FLOAT&&(he=n.R32F),$===n.HALF_FLOAT&&(he=n.R16F),$===n.UNSIGNED_BYTE&&(he=n.R8)),I===n.RED_INTEGER&&($===n.UNSIGNED_BYTE&&(he=n.R8UI),$===n.UNSIGNED_SHORT&&(he=n.R16UI),$===n.UNSIGNED_INT&&(he=n.R32UI),$===n.BYTE&&(he=n.R8I),$===n.SHORT&&(he=n.R16I),$===n.INT&&(he=n.R32I)),I===n.RG&&($===n.FLOAT&&(he=n.RG32F),$===n.HALF_FLOAT&&(he=n.RG16F),$===n.UNSIGNED_BYTE&&(he=n.RG8)),I===n.RG_INTEGER&&($===n.UNSIGNED_BYTE&&(he=n.RG8UI),$===n.UNSIGNED_SHORT&&(he=n.RG16UI),$===n.UNSIGNED_INT&&(he=n.RG32UI),$===n.BYTE&&(he=n.RG8I),$===n.SHORT&&(he=n.RG16I),$===n.INT&&(he=n.RG32I)),I===n.RGB_INTEGER&&($===n.UNSIGNED_BYTE&&(he=n.RGB8UI),$===n.UNSIGNED_SHORT&&(he=n.RGB16UI),$===n.UNSIGNED_INT&&(he=n.RGB32UI),$===n.BYTE&&(he=n.RGB8I),$===n.SHORT&&(he=n.RGB16I),$===n.INT&&(he=n.RGB32I)),I===n.RGBA_INTEGER&&($===n.UNSIGNED_BYTE&&(he=n.RGBA8UI),$===n.UNSIGNED_SHORT&&(he=n.RGBA16UI),$===n.UNSIGNED_INT&&(he=n.RGBA32UI),$===n.BYTE&&(he=n.RGBA8I),$===n.SHORT&&(he=n.RGBA16I),$===n.INT&&(he=n.RGBA32I)),I===n.RGB&&$===n.UNSIGNED_INT_5_9_9_9_REV&&(he=n.RGB9_E5),I===n.RGBA){const Qe=ge?nf:Gt.getTransfer(ue);$===n.FLOAT&&(he=n.RGBA32F),$===n.HALF_FLOAT&&(he=n.RGBA16F),$===n.UNSIGNED_BYTE&&(he=Qe===jt?n.SRGB8_ALPHA8:n.RGBA8),$===n.UNSIGNED_SHORT_4_4_4_4&&(he=n.RGBA4),$===n.UNSIGNED_SHORT_5_5_5_1&&(he=n.RGB5_A1)}return(he===n.R16F||he===n.R32F||he===n.RG16F||he===n.RG32F||he===n.RGBA16F||he===n.RGBA32F)&&e.get("EXT_color_buffer_float"),he}function S(U,I){let $;return U?I===null||I===Ps||I===Ba?$=n.DEPTH24_STENCIL8:I===wi?$=n.DEPTH32F_STENCIL8:I===ac&&($=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):I===null||I===Ps||I===Ba?$=n.DEPTH_COMPONENT24:I===wi?$=n.DEPTH_COMPONENT32F:I===ac&&($=n.DEPTH_COMPONENT16),$}function w(U,I){return x(U)===!0||U.isFramebufferTexture&&U.minFilter!==bn&&U.minFilter!==mn?Math.log2(Math.max(I.width,I.height))+1:U.mipmaps!==void 0&&U.mipmaps.length>0?U.mipmaps.length:U.isCompressedTexture&&Array.isArray(U.image)?I.mipmaps.length:1}function P(U){const I=U.target;I.removeEventListener("dispose",P),B(I),I.isVideoTexture&&h.delete(I)}function R(U){const I=U.target;I.removeEventListener("dispose",R),z(I)}function B(U){const I=i.get(U);if(I.__webglInit===void 0)return;const $=U.source,ue=p.get($);if(ue){const ge=ue[I.__cacheKey];ge.usedTimes--,ge.usedTimes===0&&D(U),Object.keys(ue).length===0&&p.delete($)}i.remove(U)}function D(U){const I=i.get(U);n.deleteTexture(I.__webglTexture);const $=U.source,ue=p.get($);delete ue[I.__cacheKey],o.memory.textures--}function z(U){const I=i.get(U);if(U.depthTexture&&U.depthTexture.dispose(),U.isWebGLCubeRenderTarget)for(let ue=0;ue<6;ue++){if(Array.isArray(I.__webglFramebuffer[ue]))for(let ge=0;ge=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+U+" texture units while this GPU supports only "+r.maxTextures),C+=1,U}function j(U){const I=[];return I.push(U.wrapS),I.push(U.wrapT),I.push(U.wrapR||0),I.push(U.magFilter),I.push(U.minFilter),I.push(U.anisotropy),I.push(U.internalFormat),I.push(U.format),I.push(U.type),I.push(U.generateMipmaps),I.push(U.premultiplyAlpha),I.push(U.flipY),I.push(U.unpackAlignment),I.push(U.colorSpace),I.join()}function ee(U,I){const $=i.get(U);if(U.isVideoTexture&&Be(U),U.isRenderTargetTexture===!1&&U.version>0&&$.__version!==U.version){const ue=U.image;if(ue===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(ue.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Ne($,U,I);return}}t.bindTexture(n.TEXTURE_2D,$.__webglTexture,n.TEXTURE0+I)}function ce(U,I){const $=i.get(U);if(U.version>0&&$.__version!==U.version){Ne($,U,I);return}t.bindTexture(n.TEXTURE_2D_ARRAY,$.__webglTexture,n.TEXTURE0+I)}function Z(U,I){const $=i.get(U);if(U.version>0&&$.__version!==U.version){Ne($,U,I);return}t.bindTexture(n.TEXTURE_3D,$.__webglTexture,n.TEXTURE0+I)}function ve(U,I){const $=i.get(U);if(U.version>0&&$.__version!==U.version){ie($,U,I);return}t.bindTexture(n.TEXTURE_CUBE_MAP,$.__webglTexture,n.TEXTURE0+I)}const L={[Eo]:n.REPEAT,[Oi]:n.CLAMP_TO_EDGE,[oc]:n.MIRRORED_REPEAT},V={[bn]:n.NEAREST,[Hm]:n.NEAREST_MIPMAP_NEAREST,[ua]:n.NEAREST_MIPMAP_LINEAR,[mn]:n.LINEAR,[Ql]:n.LINEAR_MIPMAP_NEAREST,[ar]:n.LINEAR_MIPMAP_LINEAR},G={[$T]:n.NEVER,[sR]:n.ALWAYS,[eR]:n.LESS,[Ex]:n.LEQUAL,[tR]:n.EQUAL,[rR]:n.GEQUAL,[nR]:n.GREATER,[iR]:n.NOTEQUAL};function q(U,I){if(I.type===wi&&e.has("OES_texture_float_linear")===!1&&(I.magFilter===mn||I.magFilter===Ql||I.magFilter===ua||I.magFilter===ar||I.minFilter===mn||I.minFilter===Ql||I.minFilter===ua||I.minFilter===ar)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(U,n.TEXTURE_WRAP_S,L[I.wrapS]),n.texParameteri(U,n.TEXTURE_WRAP_T,L[I.wrapT]),(U===n.TEXTURE_3D||U===n.TEXTURE_2D_ARRAY)&&n.texParameteri(U,n.TEXTURE_WRAP_R,L[I.wrapR]),n.texParameteri(U,n.TEXTURE_MAG_FILTER,V[I.magFilter]),n.texParameteri(U,n.TEXTURE_MIN_FILTER,V[I.minFilter]),I.compareFunction&&(n.texParameteri(U,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(U,n.TEXTURE_COMPARE_FUNC,G[I.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(I.magFilter===bn||I.minFilter!==ua&&I.minFilter!==ar||I.type===wi&&e.has("OES_texture_float_linear")===!1)return;if(I.anisotropy>1||i.get(I).__currentAnisotropy){const $=e.get("EXT_texture_filter_anisotropic");n.texParameterf(U,$.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(I.anisotropy,r.getMaxAnisotropy())),i.get(I).__currentAnisotropy=I.anisotropy}}}function ye(U,I){let $=!1;U.__webglInit===void 0&&(U.__webglInit=!0,I.addEventListener("dispose",P));const ue=I.source;let ge=p.get(ue);ge===void 0&&(ge={},p.set(ue,ge));const he=j(I);if(he!==U.__cacheKey){ge[he]===void 0&&(ge[he]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,$=!0),ge[he].usedTimes++;const Qe=ge[U.__cacheKey];Qe!==void 0&&(ge[U.__cacheKey].usedTimes--,Qe.usedTimes===0&&D(I)),U.__cacheKey=he,U.__webglTexture=ge[he].texture}return $}function Ne(U,I,$){let ue=n.TEXTURE_2D;(I.isDataArrayTexture||I.isCompressedArrayTexture)&&(ue=n.TEXTURE_2D_ARRAY),I.isData3DTexture&&(ue=n.TEXTURE_3D);const ge=ye(U,I),he=I.source;t.bindTexture(ue,U.__webglTexture,n.TEXTURE0+$);const Qe=i.get(he);if(he.version!==Qe.__version||ge===!0){t.activeTexture(n.TEXTURE0+$);const Pe=Gt.getPrimaries(Gt.workingColorSpace),Ge=I.colorSpace===vs?null:Gt.getPrimaries(I.colorSpace),Tt=I.colorSpace===vs||Pe===Ge?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,I.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,I.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,I.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,Tt);let Se=M(I.image,!1,r.maxTextureSize);Se=$e(I,Se);const Ve=s.convert(I.format,I.colorSpace),dt=s.convert(I.type);let ft=A(I.internalFormat,Ve,dt,I.colorSpace,I.isVideoTexture);q(ue,I);let We;const W=I.mipmaps,le=I.isVideoTexture!==!0,Le=Qe.__version===void 0||ge===!0,H=he.dataReady,we=w(I,Se);if(I.isDepthTexture)ft=S(I.format===Pa,I.type),Le&&(le?t.texStorage2D(n.TEXTURE_2D,1,ft,Se.width,Se.height):t.texImage2D(n.TEXTURE_2D,0,ft,Se.width,Se.height,0,Ve,dt,null));else if(I.isDataTexture)if(W.length>0){le&&Le&&t.texStorage2D(n.TEXTURE_2D,we,ft,W[0].width,W[0].height);for(let se=0,de=W.length;se0){const Ue=r_(We.width,We.height,I.format,I.type);for(const Oe of I.layerUpdates){const mt=We.data.subarray(Oe*Ue/We.data.BYTES_PER_ELEMENT,(Oe+1)*Ue/We.data.BYTES_PER_ELEMENT);t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,se,0,0,Oe,We.width,We.height,1,Ve,mt,0,0)}I.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,se,0,0,0,We.width,We.height,Se.depth,Ve,We.data,0,0)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,se,ft,We.width,We.height,Se.depth,0,We.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else le?H&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,se,0,0,0,We.width,We.height,Se.depth,Ve,dt,We.data):t.texImage3D(n.TEXTURE_2D_ARRAY,se,ft,We.width,We.height,Se.depth,0,Ve,dt,We.data)}else{le&&Le&&t.texStorage2D(n.TEXTURE_2D,we,ft,W[0].width,W[0].height);for(let se=0,de=W.length;se0){const se=r_(Se.width,Se.height,I.format,I.type);for(const de of I.layerUpdates){const Ue=Se.data.subarray(de*se/Se.data.BYTES_PER_ELEMENT,(de+1)*se/Se.data.BYTES_PER_ELEMENT);t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,de,Se.width,Se.height,1,Ve,dt,Ue)}I.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,Se.width,Se.height,Se.depth,Ve,dt,Se.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,ft,Se.width,Se.height,Se.depth,0,Ve,dt,Se.data);else if(I.isData3DTexture)le?(Le&&t.texStorage3D(n.TEXTURE_3D,we,ft,Se.width,Se.height,Se.depth),H&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,Se.width,Se.height,Se.depth,Ve,dt,Se.data)):t.texImage3D(n.TEXTURE_3D,0,ft,Se.width,Se.height,Se.depth,0,Ve,dt,Se.data);else if(I.isFramebufferTexture){if(Le)if(le)t.texStorage2D(n.TEXTURE_2D,we,ft,Se.width,Se.height);else{let se=Se.width,de=Se.height;for(let Ue=0;Ue>=1,de>>=1}}else if(W.length>0){if(le&&Le){const se=ze(W[0]);t.texStorage2D(n.TEXTURE_2D,we,ft,se.width,se.height)}for(let se=0,de=W.length;se0&&we++;const de=ze(Ve[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,we,W,de.width,de.height)}for(let de=0;de<6;de++)if(Se){le?H&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+de,0,0,0,Ve[de].width,Ve[de].height,ft,We,Ve[de].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+de,0,W,Ve[de].width,Ve[de].height,0,ft,We,Ve[de].data);for(let Ue=0;Ue>he),Ve=Math.max(1,I.height>>he);ge===n.TEXTURE_3D||ge===n.TEXTURE_2D_ARRAY?t.texImage3D(ge,he,Ge,Se,Ve,I.depth,0,Qe,Pe,null):t.texImage2D(ge,he,Ge,Se,Ve,0,Qe,Pe,null)}t.bindFramebuffer(n.FRAMEBUFFER,U),xe(I)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,ue,ge,i.get($).__webglTexture,0,Re(I)):(ge===n.TEXTURE_2D||ge>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&ge<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,ue,ge,i.get($).__webglTexture,he),t.bindFramebuffer(n.FRAMEBUFFER,null)}function Ee(U,I,$){if(n.bindRenderbuffer(n.RENDERBUFFER,U),I.depthBuffer){const ue=I.depthTexture,ge=ue&&ue.isDepthTexture?ue.type:null,he=S(I.stencilBuffer,ge),Qe=I.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Pe=Re(I);xe(I)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Pe,he,I.width,I.height):$?n.renderbufferStorageMultisample(n.RENDERBUFFER,Pe,he,I.width,I.height):n.renderbufferStorage(n.RENDERBUFFER,he,I.width,I.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,Qe,n.RENDERBUFFER,U)}else{const ue=I.textures;for(let ge=0;ge{delete I.__boundDepthTexture,delete I.__depthDisposeCallback,ue.removeEventListener("dispose",ge)};ue.addEventListener("dispose",ge),I.__depthDisposeCallback=ge}I.__boundDepthTexture=ue}if(U.depthTexture&&!I.__autoAllocateDepthBuffer){if($)throw new Error("target.depthTexture not supported in Cube render targets");Ae(I.__webglFramebuffer,U)}else if($){I.__webglDepthbuffer=[];for(let ue=0;ue<6;ue++)if(t.bindFramebuffer(n.FRAMEBUFFER,I.__webglFramebuffer[ue]),I.__webglDepthbuffer[ue]===void 0)I.__webglDepthbuffer[ue]=n.createRenderbuffer(),Ee(I.__webglDepthbuffer[ue],U,!1);else{const ge=U.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,he=I.__webglDepthbuffer[ue];n.bindRenderbuffer(n.RENDERBUFFER,he),n.framebufferRenderbuffer(n.FRAMEBUFFER,ge,n.RENDERBUFFER,he)}}else if(t.bindFramebuffer(n.FRAMEBUFFER,I.__webglFramebuffer),I.__webglDepthbuffer===void 0)I.__webglDepthbuffer=n.createRenderbuffer(),Ee(I.__webglDepthbuffer,U,!1);else{const ue=U.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,ge=I.__webglDepthbuffer;n.bindRenderbuffer(n.RENDERBUFFER,ge),n.framebufferRenderbuffer(n.FRAMEBUFFER,ue,n.RENDERBUFFER,ge)}t.bindFramebuffer(n.FRAMEBUFFER,null)}function st(U,I,$){const ue=i.get(U);I!==void 0&&pe(ue.__webglFramebuffer,U,U.texture,n.COLOR_ATTACHMENT0,n.TEXTURE_2D,0),$!==void 0&<(U)}function ut(U){const I=U.texture,$=i.get(U),ue=i.get(I);U.addEventListener("dispose",R);const ge=U.textures,he=U.isWebGLCubeRenderTarget===!0,Qe=ge.length>1;if(Qe||(ue.__webglTexture===void 0&&(ue.__webglTexture=n.createTexture()),ue.__version=I.version,o.memory.textures++),he){$.__webglFramebuffer=[];for(let Pe=0;Pe<6;Pe++)if(I.mipmaps&&I.mipmaps.length>0){$.__webglFramebuffer[Pe]=[];for(let Ge=0;Ge0){$.__webglFramebuffer=[];for(let Pe=0;Pe0&&xe(U)===!1){$.__webglMultisampledFramebuffer=n.createFramebuffer(),$.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,$.__webglMultisampledFramebuffer);for(let Pe=0;Pe0)for(let Ge=0;Ge0)for(let Ge=0;Ge0){if(xe(U)===!1){const I=U.textures,$=U.width,ue=U.height;let ge=n.COLOR_BUFFER_BIT;const he=U.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Qe=i.get(U),Pe=I.length>1;if(Pe)for(let Ge=0;Ge0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&I.__useRenderToTexture!==!1}function Be(U){const I=o.render.frame;h.get(U)!==I&&(h.set(U,I),U.update())}function $e(U,I){const $=U.colorSpace,ue=U.format,ge=U.type;return U.isCompressedTexture===!0||U.isVideoTexture===!0||$!==Ns&&$!==vs&&(Gt.getTransfer($)===jt?(ue!==ti||ge!==Rr)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",$)),I}function ze(U){return typeof HTMLImageElement<"u"&&U instanceof HTMLImageElement?(f.width=U.naturalWidth||U.width,f.height=U.naturalHeight||U.height):typeof VideoFrame<"u"&&U instanceof VideoFrame?(f.width=U.displayWidth,f.height=U.displayHeight):(f.width=U.width,f.height=U.height),f}this.allocateTextureUnit=J,this.resetTextureUnits=b,this.setTexture2D=ee,this.setTexture2DArray=ce,this.setTexture3D=Z,this.setTextureCube=ve,this.rebindTextures=st,this.setupRenderTarget=ut,this.updateRenderTargetMipmap=ot,this.updateMultisampleRenderTarget=be,this.setupDepthRenderbuffer=lt,this.setupFrameBufferTexture=pe,this.useMultisampledRTT=xe}function AR(n,e){function t(i,r=vs){let s;const o=Gt.getTransfer(r);if(i===Rr)return n.UNSIGNED_BYTE;if(i===Vm)return n.UNSIGNED_SHORT_4_4_4_4;if(i===Wm)return n.UNSIGNED_SHORT_5_5_5_1;if(i===mx)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===dx)return n.BYTE;if(i===px)return n.SHORT;if(i===ac)return n.UNSIGNED_SHORT;if(i===Gm)return n.INT;if(i===Ps)return n.UNSIGNED_INT;if(i===wi)return n.FLOAT;if(i===yc)return n.HALF_FLOAT;if(i===gx)return n.ALPHA;if(i===vx)return n.RGB;if(i===ti)return n.RGBA;if(i===yx)return n.LUMINANCE;if(i===_x)return n.LUMINANCE_ALPHA;if(i===xa)return n.DEPTH_COMPONENT;if(i===Pa)return n.DEPTH_STENCIL;if(i===Xm)return n.RED;if(i===Af)return n.RED_INTEGER;if(i===xx)return n.RG;if(i===Jm)return n.RG_INTEGER;if(i===jm)return n.RGBA_INTEGER;if(i===Ru||i===bu||i===Bu||i===Pu)if(o===jt)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===Ru)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===bu)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===Bu)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===Pu)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===Ru)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===bu)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===Bu)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===Pu)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===Wp||i===Xp||i===Jp||i===jp)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===Wp)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===Xp)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===Jp)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===jp)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===Kp||i===Yp||i===Qp)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===Kp||i===Yp)return o===jt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===Qp)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===Zp||i===qp||i===$p||i===em||i===tm||i===nm||i===im||i===rm||i===sm||i===om||i===am||i===lm||i===cm||i===um)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===Zp)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===qp)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===$p)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===em)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===tm)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===nm)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===im)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===rm)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===sm)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===om)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===am)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===lm)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===cm)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===um)return o===jt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===Iu||i===fm||i===hm)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===Iu)return o===jt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===fm)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===hm)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===Ax||i===dm||i===pm||i===mm)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===Iu)return s.COMPRESSED_RED_RGTC1_EXT;if(i===dm)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===pm)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===mm)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Ba?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}class SR extends on{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class As extends Bt{constructor(){super(),this.isGroup=!0,this.type="Group"}}const TU={type:"move"};class wv{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new As,this._hand.matrixAutoUpdate=!1,this._hand.visible=!1,this._hand.joints={},this._hand.inputState={pinching:!1}),this._hand}getTargetRaySpace(){return this._targetRay===null&&(this._targetRay=new As,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new F,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new F),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new As,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new F,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new F),this._grip}dispatchEvent(e){return this._targetRay!==null&&this._targetRay.dispatchEvent(e),this._grip!==null&&this._grip.dispatchEvent(e),this._hand!==null&&this._hand.dispatchEvent(e),this}connect(e){if(e&&e.hand){const t=this._hand;if(t)for(const i of e.hand.values())this._getHandJoint(t,i)}return this.dispatchEvent({type:"connected",data:e}),this}disconnect(e){return this.dispatchEvent({type:"disconnected",data:e}),this._targetRay!==null&&(this._targetRay.visible=!1),this._grip!==null&&(this._grip.visible=!1),this._hand!==null&&(this._hand.visible=!1),this}update(e,t,i){let r=null,s=null,o=null;const a=this._targetRay,u=this._grip,f=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(f&&e.hand){o=!0;for(const M of e.hand.values()){const x=t.getJointPose(M,i),g=this._getHandJoint(f,M);x!==null&&(g.matrix.fromArray(x.transform.matrix),g.matrix.decompose(g.position,g.rotation,g.scale),g.matrixWorldNeedsUpdate=!0,g.jointRadius=x.radius),g.visible=x!==null}const h=f.joints["index-finger-tip"],d=f.joints["thumb-tip"],p=h.position.distanceTo(d.position),v=.02,y=.005;f.inputState.pinching&&p>v+y?(f.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!f.inputState.pinching&&p<=v-y&&(f.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else u!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(u.matrix.fromArray(s.transform.matrix),u.matrix.decompose(u.position,u.rotation,u.scale),u.matrixWorldNeedsUpdate=!0,s.linearVelocity?(u.hasLinearVelocity=!0,u.linearVelocity.copy(s.linearVelocity)):u.hasLinearVelocity=!1,s.angularVelocity?(u.hasAngularVelocity=!0,u.angularVelocity.copy(s.angularVelocity)):u.hasAngularVelocity=!1));a!==null&&(r=t.getPose(e.targetRaySpace,i),r===null&&s!==null&&(r=s),r!==null&&(a.matrix.fromArray(r.transform.matrix),a.matrix.decompose(a.position,a.rotation,a.scale),a.matrixWorldNeedsUpdate=!0,r.linearVelocity?(a.hasLinearVelocity=!0,a.linearVelocity.copy(r.linearVelocity)):a.hasLinearVelocity=!1,r.angularVelocity?(a.hasAngularVelocity=!0,a.angularVelocity.copy(r.angularVelocity)):a.hasAngularVelocity=!1,this.dispatchEvent(TU)))}return a!==null&&(a.visible=r!==null),u!==null&&(u.visible=s!==null),f!==null&&(f.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new As;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const RU=` -void main() { - - gl_Position = vec4( position, 1.0 ); - -}`,bU=` -uniform sampler2DArray depthColor; -uniform float depthWidth; -uniform float depthHeight; - -void main() { - - vec2 coord = vec2( gl_FragCoord.x / depthWidth, gl_FragCoord.y / depthHeight ); - - if ( coord.x >= 1.0 ) { - - gl_FragDepth = texture( depthColor, vec3( coord.x - 1.0, coord.y, 1 ) ).r; - - } else { - - gl_FragDepth = texture( depthColor, vec3( coord.x, coord.y, 0 ) ).r; - - } - -}`;class BU{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const r=new qt,s=e.properties.get(r);s.__webglTexture=t.texture,(t.depthNear!=i.depthNear||t.depthFar!=i.depthFar)&&(this.depthNear=t.depthNear,this.depthFar=t.depthFar),this.texture=r}}getMesh(e){if(this.texture!==null&&this.mesh===null){const t=e.cameras[0].viewport,i=new Br({vertexShader:RU,fragmentShader:bU,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new _n(new _c(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}getDepthTexture(){return this.texture}}class PU extends Pr{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",u=1,f=null,h=null,d=null,p=null,v=null,y=null;const M=new BU,x=t.getContextAttributes();let g=null,A=null;const S=[],w=[],P=new fe;let R=null;const B=new on;B.layers.enable(1),B.viewport=new Nt;const D=new on;D.layers.enable(2),D.viewport=new Nt;const z=[B,D],C=new SR;C.layers.enable(1),C.layers.enable(2);let b=null,J=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(ie){let pe=S[ie];return pe===void 0&&(pe=new wv,S[ie]=pe),pe.getTargetRaySpace()},this.getControllerGrip=function(ie){let pe=S[ie];return pe===void 0&&(pe=new wv,S[ie]=pe),pe.getGripSpace()},this.getHand=function(ie){let pe=S[ie];return pe===void 0&&(pe=new wv,S[ie]=pe),pe.getHandSpace()};function j(ie){const pe=w.indexOf(ie.inputSource);if(pe===-1)return;const Ee=S[pe];Ee!==void 0&&(Ee.update(ie.inputSource,ie.frame,f||o),Ee.dispatchEvent({type:ie.type,data:ie.inputSource}))}function ee(){r.removeEventListener("select",j),r.removeEventListener("selectstart",j),r.removeEventListener("selectend",j),r.removeEventListener("squeeze",j),r.removeEventListener("squeezestart",j),r.removeEventListener("squeezeend",j),r.removeEventListener("end",ee),r.removeEventListener("inputsourceschange",ce);for(let ie=0;ie=0&&(w[Ae]=null,S[Ae].disconnect(Ee))}for(let pe=0;pe=w.length){w.push(Ee),Ae=st;break}else if(w[st]===null){w[st]=Ee,Ae=st;break}if(Ae===-1)break}const lt=S[Ae];lt&<.connect(Ee)}}const Z=new F,ve=new F;function L(ie,pe,Ee){Z.setFromMatrixPosition(pe.matrixWorld),ve.setFromMatrixPosition(Ee.matrixWorld);const Ae=Z.distanceTo(ve),lt=pe.projectionMatrix.elements,st=Ee.projectionMatrix.elements,ut=lt[14]/(lt[10]-1),ot=lt[14]/(lt[10]+1),me=(lt[9]+1)/lt[5],O=(lt[9]-1)/lt[5],be=(lt[8]-1)/lt[0],Re=(st[8]+1)/st[0],xe=ut*be,Be=ut*Re,$e=Ae/(-be+Re),ze=$e*-be;if(pe.matrixWorld.decompose(ie.position,ie.quaternion,ie.scale),ie.translateX(ze),ie.translateZ($e),ie.matrixWorld.compose(ie.position,ie.quaternion,ie.scale),ie.matrixWorldInverse.copy(ie.matrixWorld).invert(),lt[10]===-1)ie.projectionMatrix.copy(pe.projectionMatrix),ie.projectionMatrixInverse.copy(pe.projectionMatrixInverse);else{const U=ut+$e,I=ot+$e,$=xe-ze,ue=Be+(Ae-ze),ge=me*ot/I*U,he=O*ot/I*U;ie.projectionMatrix.makePerspective($,ue,ge,he,U,I),ie.projectionMatrixInverse.copy(ie.projectionMatrix).invert()}}function V(ie,pe){pe===null?ie.matrixWorld.copy(ie.matrix):ie.matrixWorld.multiplyMatrices(pe.matrixWorld,ie.matrix),ie.matrixWorldInverse.copy(ie.matrixWorld).invert()}this.updateCamera=function(ie){if(r===null)return;let pe=ie.near,Ee=ie.far;M.texture!==null&&(M.depthNear>0&&(pe=M.depthNear),M.depthFar>0&&(Ee=M.depthFar)),C.near=D.near=B.near=pe,C.far=D.far=B.far=Ee,(b!==C.near||J!==C.far)&&(r.updateRenderState({depthNear:C.near,depthFar:C.far}),b=C.near,J=C.far);const Ae=ie.parent,lt=C.cameras;V(C,Ae);for(let st=0;st0&&(x.alphaTest.value=g.alphaTest);const A=e.get(g),S=A.envMap,w=A.envMapRotation;S&&(x.envMap.value=S,Jo.copy(w),Jo.x*=-1,Jo.y*=-1,Jo.z*=-1,S.isCubeTexture&&S.isRenderTargetTexture===!1&&(Jo.y*=-1,Jo.z*=-1),x.envMapRotation.value.setFromMatrix4(IU.makeRotationFromEuler(Jo)),x.flipEnvMap.value=S.isCubeTexture&&S.isRenderTargetTexture===!1?-1:1,x.reflectivity.value=g.reflectivity,x.ior.value=g.ior,x.refractionRatio.value=g.refractionRatio),g.lightMap&&(x.lightMap.value=g.lightMap,x.lightMapIntensity.value=g.lightMapIntensity,t(g.lightMap,x.lightMapTransform)),g.aoMap&&(x.aoMap.value=g.aoMap,x.aoMapIntensity.value=g.aoMapIntensity,t(g.aoMap,x.aoMapTransform))}function o(x,g){x.diffuse.value.copy(g.color),x.opacity.value=g.opacity,g.map&&(x.map.value=g.map,t(g.map,x.mapTransform))}function a(x,g){x.dashSize.value=g.dashSize,x.totalSize.value=g.dashSize+g.gapSize,x.scale.value=g.scale}function u(x,g,A,S){x.diffuse.value.copy(g.color),x.opacity.value=g.opacity,x.size.value=g.size*A,x.scale.value=S*.5,g.map&&(x.map.value=g.map,t(g.map,x.uvTransform)),g.alphaMap&&(x.alphaMap.value=g.alphaMap,t(g.alphaMap,x.alphaMapTransform)),g.alphaTest>0&&(x.alphaTest.value=g.alphaTest)}function f(x,g){x.diffuse.value.copy(g.color),x.opacity.value=g.opacity,x.rotation.value=g.rotation,g.map&&(x.map.value=g.map,t(g.map,x.mapTransform)),g.alphaMap&&(x.alphaMap.value=g.alphaMap,t(g.alphaMap,x.alphaMapTransform)),g.alphaTest>0&&(x.alphaTest.value=g.alphaTest)}function h(x,g){x.specular.value.copy(g.specular),x.shininess.value=Math.max(g.shininess,1e-4)}function d(x,g){g.gradientMap&&(x.gradientMap.value=g.gradientMap)}function p(x,g){x.metalness.value=g.metalness,g.metalnessMap&&(x.metalnessMap.value=g.metalnessMap,t(g.metalnessMap,x.metalnessMapTransform)),x.roughness.value=g.roughness,g.roughnessMap&&(x.roughnessMap.value=g.roughnessMap,t(g.roughnessMap,x.roughnessMapTransform)),g.envMap&&(x.envMapIntensity.value=g.envMapIntensity)}function v(x,g,A){x.ior.value=g.ior,g.sheen>0&&(x.sheenColor.value.copy(g.sheenColor).multiplyScalar(g.sheen),x.sheenRoughness.value=g.sheenRoughness,g.sheenColorMap&&(x.sheenColorMap.value=g.sheenColorMap,t(g.sheenColorMap,x.sheenColorMapTransform)),g.sheenRoughnessMap&&(x.sheenRoughnessMap.value=g.sheenRoughnessMap,t(g.sheenRoughnessMap,x.sheenRoughnessMapTransform))),g.clearcoat>0&&(x.clearcoat.value=g.clearcoat,x.clearcoatRoughness.value=g.clearcoatRoughness,g.clearcoatMap&&(x.clearcoatMap.value=g.clearcoatMap,t(g.clearcoatMap,x.clearcoatMapTransform)),g.clearcoatRoughnessMap&&(x.clearcoatRoughnessMap.value=g.clearcoatRoughnessMap,t(g.clearcoatRoughnessMap,x.clearcoatRoughnessMapTransform)),g.clearcoatNormalMap&&(x.clearcoatNormalMap.value=g.clearcoatNormalMap,t(g.clearcoatNormalMap,x.clearcoatNormalMapTransform),x.clearcoatNormalScale.value.copy(g.clearcoatNormalScale),g.side===mi&&x.clearcoatNormalScale.value.negate())),g.dispersion>0&&(x.dispersion.value=g.dispersion),g.iridescence>0&&(x.iridescence.value=g.iridescence,x.iridescenceIOR.value=g.iridescenceIOR,x.iridescenceThicknessMinimum.value=g.iridescenceThicknessRange[0],x.iridescenceThicknessMaximum.value=g.iridescenceThicknessRange[1],g.iridescenceMap&&(x.iridescenceMap.value=g.iridescenceMap,t(g.iridescenceMap,x.iridescenceMapTransform)),g.iridescenceThicknessMap&&(x.iridescenceThicknessMap.value=g.iridescenceThicknessMap,t(g.iridescenceThicknessMap,x.iridescenceThicknessMapTransform))),g.transmission>0&&(x.transmission.value=g.transmission,x.transmissionSamplerMap.value=A.texture,x.transmissionSamplerSize.value.set(A.width,A.height),g.transmissionMap&&(x.transmissionMap.value=g.transmissionMap,t(g.transmissionMap,x.transmissionMapTransform)),x.thickness.value=g.thickness,g.thicknessMap&&(x.thicknessMap.value=g.thicknessMap,t(g.thicknessMap,x.thicknessMapTransform)),x.attenuationDistance.value=g.attenuationDistance,x.attenuationColor.value.copy(g.attenuationColor)),g.anisotropy>0&&(x.anisotropyVector.value.set(g.anisotropy*Math.cos(g.anisotropyRotation),g.anisotropy*Math.sin(g.anisotropyRotation)),g.anisotropyMap&&(x.anisotropyMap.value=g.anisotropyMap,t(g.anisotropyMap,x.anisotropyMapTransform))),x.specularIntensity.value=g.specularIntensity,x.specularColor.value.copy(g.specularColor),g.specularColorMap&&(x.specularColorMap.value=g.specularColorMap,t(g.specularColorMap,x.specularColorMapTransform)),g.specularIntensityMap&&(x.specularIntensityMap.value=g.specularIntensityMap,t(g.specularIntensityMap,x.specularIntensityMapTransform))}function y(x,g){g.matcap&&(x.matcap.value=g.matcap)}function M(x,g){const A=e.get(g).light;x.referencePosition.value.setFromMatrixPosition(A.matrixWorld),x.nearDistance.value=A.shadow.camera.near,x.farDistance.value=A.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function DU(n,e,t,i){let r={},s={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function u(A,S){const w=S.program;i.uniformBlockBinding(A,w)}function f(A,S){let w=r[A.id];w===void 0&&(y(A),w=h(A),r[A.id]=w,A.addEventListener("dispose",x));const P=S.program;i.updateUBOMapping(A,P);const R=e.render.frame;s[A.id]!==R&&(p(A),s[A.id]=R)}function h(A){const S=d();A.__bindingPointIndex=S;const w=n.createBuffer(),P=A.__size,R=A.usage;return n.bindBuffer(n.UNIFORM_BUFFER,w),n.bufferData(n.UNIFORM_BUFFER,P,R),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,S,w),w}function d(){for(let A=0;A0&&(w+=P-R),A.__size=w,A.__cache={},this}function M(A){const S={boundary:0,storage:0};return typeof A=="number"||typeof A=="boolean"?(S.boundary=4,S.storage=4):A.isVector2?(S.boundary=8,S.storage=8):A.isVector3||A.isColor?(S.boundary=16,S.storage=12):A.isVector4?(S.boundary=16,S.storage=16):A.isMatrix3?(S.boundary=48,S.storage=48):A.isMatrix4?(S.boundary=64,S.storage=64):A.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",A),S}function x(A){const S=A.target;S.removeEventListener("dispose",x);const w=o.indexOf(S.__bindingPointIndex);o.splice(w,1),n.deleteBuffer(r[S.id]),delete r[S.id],delete s[S.id]}function g(){for(const A in r)n.deleteBuffer(r[A]);o=[],r={},s={}}return{bind:u,update:f,dispose:g}}class MR{constructor(e={}){const{canvas:t=lR(),context:i=null,depth:r=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:u=!0,preserveDrawingBuffer:f=!1,powerPreference:h="default",failIfMajorPerformanceCaveat:d=!1}=e;this.isWebGLRenderer=!0;let p;if(i!==null){if(typeof WebGLRenderingContext<"u"&&i instanceof WebGLRenderingContext)throw new Error("THREE.WebGLRenderer: WebGL 1 is not supported since r163.");p=i.getContextAttributes().alpha}else p=o;const v=new Uint32Array(4),y=new Int32Array(4);let M=null,x=null;const g=[],A=[];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=ir,this.toneMapping=Qr,this.toneMappingExposure=1;const S=this;let w=!1,P=0,R=0,B=null,D=-1,z=null;const C=new Nt,b=new Nt;let J=null;const j=new Ie(0);let ee=0,ce=t.width,Z=t.height,ve=1,L=null,V=null;const G=new Nt(0,0,ce,Z),q=new Nt(0,0,ce,Z);let ye=!1;const Ne=new wf;let ie=!1,pe=!1;const Ee=new rt,Ae=new rt,lt=new F,st=new Nt,ut={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let ot=!1;function me(){return B===null?ve:1}let O=i;function be(N,K){return t.getContext(N,K)}try{const N={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:u,preserveDrawingBuffer:f,powerPreference:h,failIfMajorPerformanceCaveat:d};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${_f}`),t.addEventListener("webglcontextlost",de,!1),t.addEventListener("webglcontextrestored",Ue,!1),t.addEventListener("webglcontextcreationerror",Oe,!1),O===null){const K="webgl2";if(O=be(K,N),O===null)throw be(K)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(N){throw console.error("THREE.WebGLRenderer: "+N.message),N}let Re,xe,Be,$e,ze,U,I,$,ue,ge,he,Qe,Pe,Ge,Tt,Se,Ve,dt,ft,We,W,le,Le,H;function we(){Re=new zN(O),Re.init(),le=new AR(O,Re),xe=new DN(O,Re,e,le),Be=new xU(O),xe.reverseDepthBuffer&&Be.buffers.depth.setReversed(!0),$e=new VN(O),ze=new aU,U=new CU(O,Re,Be,ze,xe,le,$e),I=new FN(S),$=new kN(S),ue=new QL(O),Le=new IN(O,ue),ge=new HN(O,ue,$e,Le),he=new XN(O,ge,ue,$e),ft=new WN(O,xe,U),Se=new NN(ze),Qe=new oU(S,I,$,Re,xe,Le,Se),Pe=new LU(S,ze),Ge=new cU,Tt=new mU(Re),dt=new PN(S,I,$,Be,he,p,u),Ve=new yU(S,he,xe),H=new DU(O,$e,xe,Be),We=new LN(O,Re,$e),W=new GN(O,Re,$e),$e.programs=Qe.programs,S.capabilities=xe,S.extensions=Re,S.properties=ze,S.renderLists=Ge,S.shadowMap=Ve,S.state=Be,S.info=$e}we();const se=new PU(S,O);this.xr=se,this.getContext=function(){return O},this.getContextAttributes=function(){return O.getContextAttributes()},this.forceContextLoss=function(){const N=Re.get("WEBGL_lose_context");N&&N.loseContext()},this.forceContextRestore=function(){const N=Re.get("WEBGL_lose_context");N&&N.restoreContext()},this.getPixelRatio=function(){return ve},this.setPixelRatio=function(N){N!==void 0&&(ve=N,this.setSize(ce,Z,!1))},this.getSize=function(N){return N.set(ce,Z)},this.setSize=function(N,K,ne=!0){if(se.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}ce=N,Z=K,t.width=Math.floor(N*ve),t.height=Math.floor(K*ve),ne===!0&&(t.style.width=N+"px",t.style.height=K+"px"),this.setViewport(0,0,N,K)},this.getDrawingBufferSize=function(N){return N.set(ce*ve,Z*ve).floor()},this.setDrawingBufferSize=function(N,K,ne){ce=N,Z=K,ve=ne,t.width=Math.floor(N*ne),t.height=Math.floor(K*ne),this.setViewport(0,0,N,K)},this.getCurrentViewport=function(N){return N.copy(C)},this.getViewport=function(N){return N.copy(G)},this.setViewport=function(N,K,ne,re){N.isVector4?G.set(N.x,N.y,N.z,N.w):G.set(N,K,ne,re),Be.viewport(C.copy(G).multiplyScalar(ve).round())},this.getScissor=function(N){return N.copy(q)},this.setScissor=function(N,K,ne,re){N.isVector4?q.set(N.x,N.y,N.z,N.w):q.set(N,K,ne,re),Be.scissor(b.copy(q).multiplyScalar(ve).round())},this.getScissorTest=function(){return ye},this.setScissorTest=function(N){Be.setScissorTest(ye=N)},this.setOpaqueSort=function(N){L=N},this.setTransparentSort=function(N){V=N},this.getClearColor=function(N){return N.copy(dt.getClearColor())},this.setClearColor=function(){dt.setClearColor.apply(dt,arguments)},this.getClearAlpha=function(){return dt.getClearAlpha()},this.setClearAlpha=function(){dt.setClearAlpha.apply(dt,arguments)},this.clear=function(N=!0,K=!0,ne=!0){let re=0;if(N){let Q=!1;if(B!==null){const Te=B.texture.format;Q=Te===jm||Te===Jm||Te===Af}if(Q){const Te=B.texture.type,He=Te===Rr||Te===Ps||Te===ac||Te===Ba||Te===Vm||Te===Wm,je=dt.getClearColor(),Ke=dt.getClearAlpha(),ct=je.r,ht=je.g,et=je.b;He?(v[0]=ct,v[1]=ht,v[2]=et,v[3]=Ke,O.clearBufferuiv(O.COLOR,0,v)):(y[0]=ct,y[1]=ht,y[2]=et,y[3]=Ke,O.clearBufferiv(O.COLOR,0,y))}else re|=O.COLOR_BUFFER_BIT}K&&(re|=O.DEPTH_BUFFER_BIT,O.clearDepth(this.capabilities.reverseDepthBuffer?0:1)),ne&&(re|=O.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),O.clear(re)},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",de,!1),t.removeEventListener("webglcontextrestored",Ue,!1),t.removeEventListener("webglcontextcreationerror",Oe,!1),Ge.dispose(),Tt.dispose(),ze.dispose(),I.dispose(),$.dispose(),he.dispose(),Le.dispose(),H.dispose(),Qe.dispose(),se.dispose(),se.removeEventListener("sessionstart",Nf),se.removeEventListener("sessionend",Ff),es.stop()};function de(N){N.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),w=!0}function Ue(){console.log("THREE.WebGLRenderer: Context Restored."),w=!1;const N=$e.autoReset,K=Ve.enabled,ne=Ve.autoUpdate,re=Ve.needsUpdate,Q=Ve.type;we(),$e.autoReset=N,Ve.enabled=K,Ve.autoUpdate=ne,Ve.needsUpdate=re,Ve.type=Q}function Oe(N){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",N.statusMessage)}function mt(N){const K=N.target;K.removeEventListener("dispose",mt),Lt(K)}function Lt(N){un(N),ze.remove(N)}function un(N){const K=ze.get(N).programs;K!==void 0&&(K.forEach(function(ne){Qe.releaseProgram(ne)}),N.isShaderMaterial&&Qe.releaseShaderCache(N))}this.renderBufferDirect=function(N,K,ne,re,Q,Te){K===null&&(K=ut);const He=Q.isMesh&&Q.matrixWorld.determinant()<0,je=yg(N,K,ne,re,Q);Be.setMaterial(re,He);let Ke=ne.index,ct=1;if(re.wireframe===!0){if(Ke=ge.getWireframeAttribute(ne),Ke===void 0)return;ct=2}const ht=ne.drawRange,et=ne.attributes.position;let Dt=ht.start*ct,Ot=(ht.start+ht.count)*ct;Te!==null&&(Dt=Math.max(Dt,Te.start*ct),Ot=Math.min(Ot,(Te.start+Te.count)*ct)),Ke!==null?(Dt=Math.max(Dt,0),Ot=Math.min(Ot,Ke.count)):et!=null&&(Dt=Math.max(Dt,0),Ot=Math.min(Ot,et.count));const Vt=Ot-Dt;if(Vt<0||Vt===1/0)return;Le.setup(Q,re,je,ne,Ke);let wt,nt=We;if(Ke!==null&&(wt=ue.get(Ke),nt=W,nt.setIndex(wt)),Q.isMesh)re.wireframe===!0?(Be.setLineWidth(re.wireframeLinewidth*me()),nt.setMode(O.LINES)):nt.setMode(O.TRIANGLES);else if(Q.isLine){let Ze=re.linewidth;Ze===void 0&&(Ze=1),Be.setLineWidth(Ze*me()),Q.isLineSegments?nt.setMode(O.LINES):Q.isLineLoop?nt.setMode(O.LINE_LOOP):nt.setMode(O.LINE_STRIP)}else Q.isPoints?nt.setMode(O.POINTS):Q.isSprite&&nt.setMode(O.TRIANGLES);if(Q.isBatchedMesh)if(Q._multiDrawInstances!==null)nt.renderMultiDrawInstances(Q._multiDrawStarts,Q._multiDrawCounts,Q._multiDrawCount,Q._multiDrawInstances);else if(Re.get("WEBGL_multi_draw"))nt.renderMultiDraw(Q._multiDrawStarts,Q._multiDrawCounts,Q._multiDrawCount);else{const Ze=Q._multiDrawStarts,Pt=Q._multiDrawCounts,gt=Q._multiDrawCount,wn=Ke?ue.get(Ke).bytesPerElement:1,bi=ze.get(re).currentProgram.getUniforms();for(let Xt=0;Xt{function Te(){if(re.forEach(function(He){ze.get(He).currentProgram.isReady()&&re.delete(He)}),re.size===0){Q(N);return}setTimeout(Te,10)}Re.get("KHR_parallel_shader_compile")!==null?Te():setTimeout(Te,10)})};let nn=null;function kn(N){nn&&nn(N)}function Nf(){es.stop()}function Ff(){es.start()}const es=new gR;es.setAnimationLoop(kn),typeof self<"u"&&es.setContext(self),this.setAnimationLoop=function(N){nn=N,se.setAnimationLoop(N),N===null?es.stop():es.start()},se.addEventListener("sessionstart",Nf),se.addEventListener("sessionend",Ff),this.render=function(N,K){if(K!==void 0&&K.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(w===!0)return;if(N.matrixWorldAutoUpdate===!0&&N.updateMatrixWorld(),K.parent===null&&K.matrixWorldAutoUpdate===!0&&K.updateMatrixWorld(),se.enabled===!0&&se.isPresenting===!0&&(se.cameraAutoUpdate===!0&&se.updateCamera(K),K=se.getCamera()),N.isScene===!0&&N.onBeforeRender(S,N,K,B),x=Tt.get(N,A.length),x.init(K),A.push(x),Ae.multiplyMatrices(K.projectionMatrix,K.matrixWorldInverse),Ne.setFromProjectionMatrix(Ae),pe=this.localClippingEnabled,ie=Se.init(this.clippingPlanes,pe),M=Ge.get(N,g.length),M.init(),g.push(M),se.enabled===!0&&se.isPresenting===!0){const Te=S.xr.getDepthSensingMesh();Te!==null&&Wa(Te,K,-1/0,S.sortObjects)}Wa(N,K,0,S.sortObjects),M.finish(),S.sortObjects===!0&&M.sort(L,V),ot=se.enabled===!1||se.isPresenting===!1||se.hasDepthSensing()===!1,ot&&dt.addToRenderList(M,N),this.info.render.frame++,ie===!0&&Se.beginShadows();const ne=x.state.shadowsArray;Ve.render(ne,N,K),ie===!0&&Se.endShadows(),this.info.autoReset===!0&&this.info.reset();const re=M.opaque,Q=M.transmissive;if(x.setupLights(),K.isArrayCamera){const Te=K.cameras;if(Q.length>0)for(let He=0,je=Te.length;He0&&Uf(re,Q,N,K),ot&&dt.render(N),Xa(M,N,K);B!==null&&(U.updateMultisampleRenderTarget(B),U.updateRenderTargetMipmap(B)),N.isScene===!0&&N.onAfterRender(S,N,K),Le.resetDefaultState(),D=-1,z=null,A.pop(),A.length>0?(x=A[A.length-1],ie===!0&&Se.setGlobalState(S.clippingPlanes,x.state.camera)):x=null,g.pop(),g.length>0?M=g[g.length-1]:M=null};function Wa(N,K,ne,re){if(N.visible===!1)return;if(N.layers.test(K.layers)){if(N.isGroup)ne=N.renderOrder;else if(N.isLOD)N.autoUpdate===!0&&N.update(K);else if(N.isLight)x.pushLight(N),N.castShadow&&x.pushShadow(N);else if(N.isSprite){if(!N.frustumCulled||Ne.intersectsSprite(N)){re&&st.setFromMatrixPosition(N.matrixWorld).applyMatrix4(Ae);const He=he.update(N),je=N.material;je.visible&&M.push(N,He,je,ne,st.z,null)}}else if((N.isMesh||N.isLine||N.isPoints)&&(!N.frustumCulled||Ne.intersectsObject(N))){const He=he.update(N),je=N.material;if(re&&(N.boundingSphere!==void 0?(N.boundingSphere===null&&N.computeBoundingSphere(),st.copy(N.boundingSphere.center)):(He.boundingSphere===null&&He.computeBoundingSphere(),st.copy(He.boundingSphere.center)),st.applyMatrix4(N.matrixWorld).applyMatrix4(Ae)),Array.isArray(je)){const Ke=He.groups;for(let ct=0,ht=Ke.length;ct0&&Nr(Q,K,ne),Te.length>0&&Nr(Te,K,ne),He.length>0&&Nr(He,K,ne),Be.buffers.depth.setTest(!0),Be.buffers.depth.setMask(!0),Be.buffers.color.setMask(!0),Be.setPolygonOffset(!1)}function Uf(N,K,ne,re){if((ne.isScene===!0?ne.overrideMaterial:null)!==null)return;x.state.transmissionRenderTarget[re.id]===void 0&&(x.state.transmissionRenderTarget[re.id]=new br(1,1,{generateMipmaps:!0,type:Re.has("EXT_color_buffer_half_float")||Re.has("EXT_color_buffer_float")?yc:Rr,minFilter:ar,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Gt.workingColorSpace}));const Te=x.state.transmissionRenderTarget[re.id],He=re.viewport||C;Te.setSize(He.z,He.w);const je=S.getRenderTarget();S.setRenderTarget(Te),S.getClearColor(j),ee=S.getClearAlpha(),ee<1&&S.setClearColor(16777215,.5),S.clear(),ot&&dt.render(ne);const Ke=S.toneMapping;S.toneMapping=Qr;const ct=re.viewport;if(re.viewport!==void 0&&(re.viewport=void 0),x.setupLightsView(re),ie===!0&&Se.setGlobalState(S.clippingPlanes,re),Nr(N,ne,re),U.updateMultisampleRenderTarget(Te),U.updateRenderTargetMipmap(Te),Re.has("WEBGL_multisampled_render_to_texture")===!1){let ht=!1;for(let et=0,Dt=K.length;et0),et=!!ne.morphAttributes.position,Dt=!!ne.morphAttributes.normal,Ot=!!ne.morphAttributes.color;let Vt=Qr;re.toneMapped&&(B===null||B.isXRRenderTarget===!0)&&(Vt=S.toneMapping);const wt=ne.morphAttributes.position||ne.morphAttributes.normal||ne.morphAttributes.color,nt=wt!==void 0?wt.length:0,Ze=ze.get(re),Pt=x.state.lights;if(ie===!0&&(pe===!0||N!==z)){const oi=N===z&&re.id===D;Se.setState(re,N,oi)}let gt=!1;re.version===Ze.__version?(Ze.needsLights&&Ze.lightsStateVersion!==Pt.state.version||Ze.outputColorSpace!==je||Q.isBatchedMesh&&Ze.batching===!1||!Q.isBatchedMesh&&Ze.batching===!0||Q.isBatchedMesh&&Ze.batchingColor===!0&&Q.colorTexture===null||Q.isBatchedMesh&&Ze.batchingColor===!1&&Q.colorTexture!==null||Q.isInstancedMesh&&Ze.instancing===!1||!Q.isInstancedMesh&&Ze.instancing===!0||Q.isSkinnedMesh&&Ze.skinning===!1||!Q.isSkinnedMesh&&Ze.skinning===!0||Q.isInstancedMesh&&Ze.instancingColor===!0&&Q.instanceColor===null||Q.isInstancedMesh&&Ze.instancingColor===!1&&Q.instanceColor!==null||Q.isInstancedMesh&&Ze.instancingMorph===!0&&Q.morphTexture===null||Q.isInstancedMesh&&Ze.instancingMorph===!1&&Q.morphTexture!==null||Ze.envMap!==Ke||re.fog===!0&&Ze.fog!==Te||Ze.numClippingPlanes!==void 0&&(Ze.numClippingPlanes!==Se.numPlanes||Ze.numIntersection!==Se.numIntersection)||Ze.vertexAlphas!==ct||Ze.vertexTangents!==ht||Ze.morphTargets!==et||Ze.morphNormals!==Dt||Ze.morphColors!==Ot||Ze.toneMapping!==Vt||Ze.morphTargetsCount!==nt)&&(gt=!0):(gt=!0,Ze.__version=re.version);let wn=Ze.currentProgram;gt===!0&&(wn=Ja(re,K,Q));let bi=!1,Xt=!1,Fs=!1;const $t=wn.getUniforms(),hr=Ze.uniforms;if(Be.useProgram(wn.program)&&(bi=!0,Xt=!0,Fs=!0),re.id!==D&&(D=re.id,Xt=!0),bi||z!==N){xe.reverseDepthBuffer?(Ee.copy(N.projectionMatrix),xL(Ee),AL(Ee),$t.setValue(O,"projectionMatrix",Ee)):$t.setValue(O,"projectionMatrix",N.projectionMatrix),$t.setValue(O,"viewMatrix",N.matrixWorldInverse);const oi=$t.map.cameraPosition;oi!==void 0&&oi.setValue(O,lt.setFromMatrixPosition(N.matrixWorld)),xe.logarithmicDepthBuffer&&$t.setValue(O,"logDepthBufFC",2/(Math.log(N.far+1)/Math.LN2)),(re.isMeshPhongMaterial||re.isMeshToonMaterial||re.isMeshLambertMaterial||re.isMeshBasicMaterial||re.isMeshStandardMaterial||re.isShaderMaterial)&&$t.setValue(O,"isOrthographic",N.isOrthographicCamera===!0),z!==N&&(z=N,Xt=!0,Fs=!0)}if(Q.isSkinnedMesh){$t.setOptional(O,Q,"bindMatrix"),$t.setOptional(O,Q,"bindMatrixInverse");const oi=Q.skeleton;oi&&(oi.boneTexture===null&&oi.computeBoneTexture(),$t.setValue(O,"boneTexture",oi.boneTexture,U))}Q.isBatchedMesh&&($t.setOptional(O,Q,"batchingTexture"),$t.setValue(O,"batchingTexture",Q._matricesTexture,U),$t.setOptional(O,Q,"batchingIdTexture"),$t.setValue(O,"batchingIdTexture",Q._indirectTexture,U),$t.setOptional(O,Q,"batchingColorTexture"),Q._colorsTexture!==null&&$t.setValue(O,"batchingColorTexture",Q._colorsTexture,U));const Us=ne.morphAttributes;if((Us.position!==void 0||Us.normal!==void 0||Us.color!==void 0)&&ft.update(Q,ne,wn),(Xt||Ze.receiveShadow!==Q.receiveShadow)&&(Ze.receiveShadow=Q.receiveShadow,$t.setValue(O,"receiveShadow",Q.receiveShadow)),re.isMeshGouraudMaterial&&re.envMap!==null&&(hr.envMap.value=Ke,hr.flipEnvMap.value=Ke.isCubeTexture&&Ke.isRenderTargetTexture===!1?-1:1),re.isMeshStandardMaterial&&re.envMap===null&&K.environment!==null&&(hr.envMapIntensity.value=K.environmentIntensity),Xt&&($t.setValue(O,"toneMappingExposure",S.toneMappingExposure),Ze.needsLights&&_g(hr,Fs),Te&&re.fog===!0&&Pe.refreshFogUniforms(hr,Te),Pe.refreshMaterialUniforms(hr,re,ve,Z,x.state.transmissionRenderTarget[N.id]),ap.upload(O,kf(Ze),hr,U)),re.isShaderMaterial&&re.uniformsNeedUpdate===!0&&(ap.upload(O,kf(Ze),hr,U),re.uniformsNeedUpdate=!1),re.isSpriteMaterial&&$t.setValue(O,"center",Q.center),$t.setValue(O,"modelViewMatrix",Q.modelViewMatrix),$t.setValue(O,"normalMatrix",Q.normalMatrix),$t.setValue(O,"modelMatrix",Q.matrixWorld),re.isShaderMaterial||re.isRawShaderMaterial){const oi=re.uniformsGroups;for(let ai=0,Ag=oi.length;ai0&&U.useMultisampledRTT(N)===!1?Q=ze.get(N).__webglMultisampledFramebuffer:Array.isArray(ht)?Q=ht[ne]:Q=ht,C.copy(N.viewport),b.copy(N.scissor),J=N.scissorTest}else C.copy(G).multiplyScalar(ve).floor(),b.copy(q).multiplyScalar(ve).floor(),J=ye;if(Be.bindFramebuffer(O.FRAMEBUFFER,Q)&&re&&Be.drawBuffers(N,Q),Be.viewport(C),Be.scissor(b),Be.setScissorTest(J),Te){const Ke=ze.get(N.texture);O.framebufferTexture2D(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,O.TEXTURE_CUBE_MAP_POSITIVE_X+K,Ke.__webglTexture,ne)}else if(He){const Ke=ze.get(N.texture),ct=K||0;O.framebufferTextureLayer(O.FRAMEBUFFER,O.COLOR_ATTACHMENT0,Ke.__webglTexture,ne||0,ct)}D=-1},this.readRenderTargetPixels=function(N,K,ne,re,Q,Te,He){if(!(N&&N.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let je=ze.get(N).__webglFramebuffer;if(N.isWebGLCubeRenderTarget&&He!==void 0&&(je=je[He]),je){Be.bindFramebuffer(O.FRAMEBUFFER,je);try{const Ke=N.texture,ct=Ke.format,ht=Ke.type;if(!xe.textureFormatReadable(ct)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!xe.textureTypeReadable(ht)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}K>=0&&K<=N.width-re&&ne>=0&&ne<=N.height-Q&&O.readPixels(K,ne,re,Q,le.convert(ct),le.convert(ht),Te)}finally{const Ke=B!==null?ze.get(B).__webglFramebuffer:null;Be.bindFramebuffer(O.FRAMEBUFFER,Ke)}}},this.readRenderTargetPixelsAsync=async function(N,K,ne,re,Q,Te,He){if(!(N&&N.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let je=ze.get(N).__webglFramebuffer;if(N.isWebGLCubeRenderTarget&&He!==void 0&&(je=je[He]),je){const Ke=N.texture,ct=Ke.format,ht=Ke.type;if(!xe.textureFormatReadable(ct))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!xe.textureTypeReadable(ht))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(K>=0&&K<=N.width-re&&ne>=0&&ne<=N.height-Q){Be.bindFramebuffer(O.FRAMEBUFFER,je);const et=O.createBuffer();O.bindBuffer(O.PIXEL_PACK_BUFFER,et),O.bufferData(O.PIXEL_PACK_BUFFER,Te.byteLength,O.STREAM_READ),O.readPixels(K,ne,re,Q,le.convert(ct),le.convert(ht),0);const Dt=B!==null?ze.get(B).__webglFramebuffer:null;Be.bindFramebuffer(O.FRAMEBUFFER,Dt);const Ot=O.fenceSync(O.SYNC_GPU_COMMANDS_COMPLETE,0);return O.flush(),await _L(O,Ot,4),O.bindBuffer(O.PIXEL_PACK_BUFFER,et),O.getBufferSubData(O.PIXEL_PACK_BUFFER,0,Te),O.deleteBuffer(et),O.deleteSync(Ot),Te}else throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: requested read bounds are out of range.")}},this.copyFramebufferToTexture=function(N,K=null,ne=0){N.isTexture!==!0&&(op("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,N=arguments[1]);const re=Math.pow(2,-ne),Q=Math.floor(N.image.width*re),Te=Math.floor(N.image.height*re),He=K!==null?K.x:0,je=K!==null?K.y:0;U.setTexture2D(N,0),O.copyTexSubImage2D(O.TEXTURE_2D,ne,0,0,He,je,Q,Te),Be.unbindTexture()},this.copyTextureToTexture=function(N,K,ne=null,re=null,Q=0){N.isTexture!==!0&&(op("WebGLRenderer: copyTextureToTexture function signature has changed."),re=arguments[0]||null,N=arguments[1],K=arguments[2],Q=arguments[3]||0,ne=null);let Te,He,je,Ke,ct,ht;ne!==null?(Te=ne.max.x-ne.min.x,He=ne.max.y-ne.min.y,je=ne.min.x,Ke=ne.min.y):(Te=N.image.width,He=N.image.height,je=0,Ke=0),re!==null?(ct=re.x,ht=re.y):(ct=0,ht=0);const et=le.convert(K.format),Dt=le.convert(K.type);U.setTexture2D(K,0),O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,K.flipY),O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),O.pixelStorei(O.UNPACK_ALIGNMENT,K.unpackAlignment);const Ot=O.getParameter(O.UNPACK_ROW_LENGTH),Vt=O.getParameter(O.UNPACK_IMAGE_HEIGHT),wt=O.getParameter(O.UNPACK_SKIP_PIXELS),nt=O.getParameter(O.UNPACK_SKIP_ROWS),Ze=O.getParameter(O.UNPACK_SKIP_IMAGES),Pt=N.isCompressedTexture?N.mipmaps[Q]:N.image;O.pixelStorei(O.UNPACK_ROW_LENGTH,Pt.width),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,Pt.height),O.pixelStorei(O.UNPACK_SKIP_PIXELS,je),O.pixelStorei(O.UNPACK_SKIP_ROWS,Ke),N.isDataTexture?O.texSubImage2D(O.TEXTURE_2D,Q,ct,ht,Te,He,et,Dt,Pt.data):N.isCompressedTexture?O.compressedTexSubImage2D(O.TEXTURE_2D,Q,ct,ht,Pt.width,Pt.height,et,Pt.data):O.texSubImage2D(O.TEXTURE_2D,Q,ct,ht,Te,He,et,Dt,Pt),O.pixelStorei(O.UNPACK_ROW_LENGTH,Ot),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,Vt),O.pixelStorei(O.UNPACK_SKIP_PIXELS,wt),O.pixelStorei(O.UNPACK_SKIP_ROWS,nt),O.pixelStorei(O.UNPACK_SKIP_IMAGES,Ze),Q===0&&K.generateMipmaps&&O.generateMipmap(O.TEXTURE_2D),Be.unbindTexture()},this.copyTextureToTexture3D=function(N,K,ne=null,re=null,Q=0){N.isTexture!==!0&&(op("WebGLRenderer: copyTextureToTexture3D function signature has changed."),ne=arguments[0]||null,re=arguments[1]||null,N=arguments[2],K=arguments[3],Q=arguments[4]||0);let Te,He,je,Ke,ct,ht,et,Dt,Ot;const Vt=N.isCompressedTexture?N.mipmaps[Q]:N.image;ne!==null?(Te=ne.max.x-ne.min.x,He=ne.max.y-ne.min.y,je=ne.max.z-ne.min.z,Ke=ne.min.x,ct=ne.min.y,ht=ne.min.z):(Te=Vt.width,He=Vt.height,je=Vt.depth,Ke=0,ct=0,ht=0),re!==null?(et=re.x,Dt=re.y,Ot=re.z):(et=0,Dt=0,Ot=0);const wt=le.convert(K.format),nt=le.convert(K.type);let Ze;if(K.isData3DTexture)U.setTexture3D(K,0),Ze=O.TEXTURE_3D;else if(K.isDataArrayTexture||K.isCompressedArrayTexture)U.setTexture2DArray(K,0),Ze=O.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}O.pixelStorei(O.UNPACK_FLIP_Y_WEBGL,K.flipY),O.pixelStorei(O.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),O.pixelStorei(O.UNPACK_ALIGNMENT,K.unpackAlignment);const Pt=O.getParameter(O.UNPACK_ROW_LENGTH),gt=O.getParameter(O.UNPACK_IMAGE_HEIGHT),wn=O.getParameter(O.UNPACK_SKIP_PIXELS),bi=O.getParameter(O.UNPACK_SKIP_ROWS),Xt=O.getParameter(O.UNPACK_SKIP_IMAGES);O.pixelStorei(O.UNPACK_ROW_LENGTH,Vt.width),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,Vt.height),O.pixelStorei(O.UNPACK_SKIP_PIXELS,Ke),O.pixelStorei(O.UNPACK_SKIP_ROWS,ct),O.pixelStorei(O.UNPACK_SKIP_IMAGES,ht),N.isDataTexture||N.isData3DTexture?O.texSubImage3D(Ze,Q,et,Dt,Ot,Te,He,je,wt,nt,Vt.data):K.isCompressedArrayTexture?O.compressedTexSubImage3D(Ze,Q,et,Dt,Ot,Te,He,je,wt,Vt.data):O.texSubImage3D(Ze,Q,et,Dt,Ot,Te,He,je,wt,nt,Vt),O.pixelStorei(O.UNPACK_ROW_LENGTH,Pt),O.pixelStorei(O.UNPACK_IMAGE_HEIGHT,gt),O.pixelStorei(O.UNPACK_SKIP_PIXELS,wn),O.pixelStorei(O.UNPACK_SKIP_ROWS,bi),O.pixelStorei(O.UNPACK_SKIP_IMAGES,Xt),Q===0&&K.generateMipmaps&&O.generateMipmap(Ze),Be.unbindTexture()},this.initRenderTarget=function(N){ze.get(N).__webglFramebuffer===void 0&&U.setupRenderTarget(N)},this.initTexture=function(N){N.isCubeTexture?U.setTextureCube(N,0):N.isData3DTexture?U.setTexture3D(N,0):N.isDataArrayTexture||N.isCompressedArrayTexture?U.setTexture2DArray(N,0):U.setTexture2D(N,0),Be.unbindTexture()},this.resetState=function(){P=0,R=0,B=null,Be.reset(),Le.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Jr}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===Ym?"display-p3":"srgb",t.unpackColorSpace=Gt.workingColorSpace===Sf?"display-p3":"srgb"}}class qm{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new Ie(e),this.density=t}clone(){return new qm(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class $m{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new Ie(e),this.near=t,this.far=i}clone(){return new $m(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}let vm=class extends Bt{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.backgroundRotation=new Vi,this.environmentIntensity=1,this.environmentRotation=new Vi,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),this.backgroundBlurriness=e.backgroundBlurriness,this.backgroundIntensity=e.backgroundIntensity,this.backgroundRotation.copy(e.backgroundRotation),this.environmentIntensity=e.environmentIntensity,this.environmentRotation.copy(e.environmentRotation),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){const t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(t.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(t.object.backgroundIntensity=this.backgroundIntensity),t.object.backgroundRotation=this.backgroundRotation.toArray(),this.environmentIntensity!==1&&(t.object.environmentIntensity=this.environmentIntensity),t.object.environmentRotation=this.environmentRotation.toArray(),t}};class Cf{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=of,this.updateRanges=[],this.version=0,this.uuid=Hi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}addUpdateRange(e,t){this.updateRanges.push({start:e,count:t})}clearUpdateRanges(){this.updateRanges.length=0}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,i){e*=this.stride,i*=t.stride;for(let r=0,s=this.stride;re.far||t.push({distance:u,point:tu.clone(),uv:Mi.getInterpolation(tu,vd,iu,yd,FM,Cv,UM,new fe),face:null,object:this})}copy(e,t){return super.copy(e,t),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}}function _d(n,e,t,i,r,s){Sl.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(nu.x=s*Sl.x-r*Sl.y,nu.y=r*Sl.x+s*Sl.y):nu.copy(Sl),n.copy(e),n.x+=nu.x,n.y+=nu.y,n.applyMatrix4(ER)}const xd=new F,OM=new F;class CR extends Bt{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 i=0,r=t.length;i0){let i,r;for(i=1,r=t.length;i0){xd.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(xd);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){xd.setFromMatrixPosition(e.matrixWorld),OM.setFromMatrixPosition(this.matrixWorld);const i=xd.distanceTo(OM)/e.zoom;t[0].object.visible=!0;let r,s;for(r=1,s=t.length;r=o)t[r-1].object.visible=!1,t[r].object.visible=!0;else break}for(this._currentLevel=r-1;r=r.length&&r.push({start:-1,count:-1,z:-1,index:-1});const o=r[this.index];s.push(o),this.index++,o.start=e.start,o.count=e.count,o.z=t,o.index=i}reset(){this.list.length=0,this.index=0}}const $s=new rt,bv=new rt,HU=new rt,GU=new Ie(1,1,1),jM=new rt,Bv=new wf,Md=new ni,jo=new Vn,ou=new F,KM=new F,VU=new F,Pv=new zU,$n=new _n,Ed=[];function WU(n,e,t=0){const i=e.itemSize;if(n.isInterleavedBufferAttribute||n.array.constructor!==e.array.constructor){const r=n.count;for(let s=0;s65535?new Uint32Array(r):new Uint16Array(r);t.setIndex(new Ut(s,1))}this._geometryInitialized=!0}}_validateGeometry(e){const t=this.geometry;if(!!e.getIndex()!=!!t.getIndex())throw new Error('BatchedMesh: All geometries must consistently have "index".');for(const i in t.attributes){if(!e.hasAttribute(i))throw new Error(`BatchedMesh: Added geometry missing "${i}". All geometries must have consistent attributes.`);const r=e.getAttribute(i),s=t.getAttribute(i);if(r.itemSize!==s.itemSize||r.normalized!==s.normalized)throw new Error("BatchedMesh: All attributes must have a consistent itemSize and normalized value.")}}setCustomSort(e){return this.customSort=e,this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new ni);const e=this.boundingBox,t=this._drawInfo;e.makeEmpty();for(let i=0,r=t.length;i=this.maxInstanceCount&&this._availableInstanceIds.length===0)throw new Error("BatchedMesh: Maximum item count reached.");const i={visible:!0,active:!0,geometryIndex:e};let r=null;this._availableInstanceIds.length>0?(r=this._availableInstanceIds.pop(),this._drawInfo[r]=i):(r=this._drawInfo.length,this._drawInfo.push(i));const s=this._matricesTexture,o=s.image.data;HU.toArray(o,r*16),s.needsUpdate=!0;const a=this._colorsTexture;return a&&(GU.toArray(a.image.data,r*4),a.needsUpdate=!0),r}addGeometry(e,t=-1,i=-1){if(this._initializeGeometry(e),this._validateGeometry(e),this._drawInfo.length>=this._maxInstanceCount)throw new Error("BatchedMesh: Maximum item count reached.");const r={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let s=null;const o=this._reservedRanges,a=this._drawRanges,u=this._bounds;this._geometryCount!==0&&(s=o[o.length-1]),t===-1?r.vertexCount=e.getAttribute("position").count:r.vertexCount=t,s===null?r.vertexStart=0:r.vertexStart=s.vertexStart+s.vertexCount;const f=e.getIndex(),h=f!==null;if(h&&(i===-1?r.indexCount=f.count:r.indexCount=i,s===null?r.indexStart=0:r.indexStart=s.indexStart+s.indexCount),r.indexStart!==-1&&r.indexStart+r.indexCount>this._maxIndexCount||r.vertexStart+r.vertexCount>this._maxVertexCount)throw new Error("BatchedMesh: Reserved space request exceeds the maximum buffer size.");const d=this._geometryCount;return this._geometryCount++,o.push(r),a.push({start:h?r.indexStart:r.vertexStart,count:-1}),u.push({boxInitialized:!1,box:new ni,sphereInitialized:!1,sphere:new Vn}),this.setGeometryAt(d,e),d}setGeometryAt(e,t){if(e>=this._geometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");this._validateGeometry(t);const i=this.geometry,r=i.getIndex()!==null,s=i.getIndex(),o=t.getIndex(),a=this._reservedRanges[e];if(r&&o.count>a.indexCount||t.attributes.position.count>a.vertexCount)throw new Error("BatchedMesh: Reserved space not large enough for provided geometry.");const u=a.vertexStart,f=a.vertexCount;for(const v in i.attributes){const y=t.getAttribute(v),M=i.getAttribute(v);WU(y,M,u);const x=y.itemSize;for(let g=y.count,A=f;g=t.length||t[e].active===!1?this:(t[e].active=!1,this._availableInstanceIds.push(e),this._visibilityChanged=!0,this)}getBoundingBoxAt(e,t){if(e>=this._geometryCount)return null;const i=this._bounds[e],r=i.box,s=this.geometry;if(i.boxInitialized===!1){r.makeEmpty();const o=s.index,a=s.attributes.position,u=this._drawRanges[e];for(let f=u.start,h=u.start+u.count;f=this._geometryCount)return null;const i=this._bounds[e],r=i.sphere,s=this.geometry;if(i.sphereInitialized===!1){r.makeEmpty(),this.getBoundingBoxAt(e,Md),Md.getCenter(r.center);const o=s.index,a=s.attributes.position,u=this._drawRanges[e];let f=0;for(let h=u.start,d=u.start+u.count;h=i.length||i[e].active===!1?this:(t.toArray(s,e*16),r.needsUpdate=!0,this)}getMatrixAt(e,t){const i=this._drawInfo,r=this._matricesTexture.image.data;return e>=i.length||i[e].active===!1?null:t.fromArray(r,e*16)}setColorAt(e,t){this._colorsTexture===null&&this._initColorsTexture();const i=this._colorsTexture,r=this._colorsTexture.image.data,s=this._drawInfo;return e>=s.length||s[e].active===!1?this:(t.toArray(r,e*4),i.needsUpdate=!0,this)}getColorAt(e,t){const i=this._colorsTexture.image.data,r=this._drawInfo;return e>=r.length||r[e].active===!1?null:t.fromArray(i,e*4)}setVisibleAt(e,t){const i=this._drawInfo;return e>=i.length||i[e].active===!1||i[e].visible===t?this:(i[e].visible=t,this._visibilityChanged=!0,this)}getVisibleAt(e){const t=this._drawInfo;return e>=t.length||t[e].active===!1?!1:t[e].visible}setGeometryIdAt(e,t){const i=this._drawInfo;return e>=i.length||i[e].active===!1||t<0||t>=this._geometryCount?null:(i[e].geometryIndex=t,this)}getGeometryIdAt(e){const t=this._drawInfo;return e>=t.length||t[e].active===!1?-1:t[e].geometryIndex}getGeometryRangeAt(e,t={}){if(e<0||e>=this._geometryCount)return null;const i=this._drawRanges[e];return t.start=i.start,t.count=i.count,t}raycast(e,t){const i=this._drawInfo,r=this._drawRanges,s=this.matrixWorld,o=this.geometry;$n.material=this.material,$n.geometry.index=o.index,$n.geometry.attributes=o.attributes,$n.geometry.boundingBox===null&&($n.geometry.boundingBox=new ni),$n.geometry.boundingSphere===null&&($n.geometry.boundingSphere=new Vn);for(let a=0,u=i.length;a({...t})),this._reservedRanges=e._reservedRanges.map(t=>({...t})),this._drawInfo=e._drawInfo.map(t=>({...t})),this._bounds=e._bounds.map(t=>({boxInitialized:t.boxInitialized,box:t.box.clone(),sphereInitialized:t.sphereInitialized,sphere:t.sphere.clone()})),this._maxInstanceCount=e._maxInstanceCount,this._maxVertexCount=e._maxVertexCount,this._maxIndexCount=e._maxIndexCount,this._geometryInitialized=e._geometryInitialized,this._geometryCount=e._geometryCount,this._multiDrawCounts=e._multiDrawCounts.slice(),this._multiDrawStarts=e._multiDrawStarts.slice(),this._matricesTexture=e._matricesTexture.clone(),this._matricesTexture.image.data=this._matricesTexture.image.data.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.data.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=null,this._indirectTexture.dispose(),this._indirectTexture=null,this._colorsTexture!==null&&(this._colorsTexture.dispose(),this._colorsTexture=null),this}onBeforeRender(e,t,i,r,s){if(!this._visibilityChanged&&!this.perObjectFrustumCulled&&!this.sortObjects)return;const o=r.getIndex(),a=o===null?1:o.array.BYTES_PER_ELEMENT,u=this._drawInfo,f=this._multiDrawStarts,h=this._multiDrawCounts,d=this._drawRanges,p=this.perObjectFrustumCulled,v=this._indirectTexture,y=v.image.data;p&&(jM.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),Bv.setFromProjectionMatrix(jM,e.coordinateSystem));let M=0;if(this.sortObjects){bv.copy(this.matrixWorld).invert(),ou.setFromMatrixPosition(i.matrixWorld).applyMatrix4(bv),KM.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(bv);for(let A=0,S=u.length;A0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;si)return;Iv.applyMatrix4(n.matrixWorld);const u=e.ray.origin.distanceTo(Iv);if(!(ue.far))return{distance:u,point:QM.clone().applyMatrix4(n.matrixWorld),index:r,face:null,faceIndex:null,barycoord:null,object:n}}const ZM=new F,qM=new F;class Ir extends Is{constructor(e,t){super(e,t),this.isLineSegments=!0,this.type="LineSegments"}computeLineDistances(){const e=this.geometry;if(e.index===null){const t=e.attributes.position,i=[];for(let r=0,s=t.count;r0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;sr.far)return;s.push({distance:f,distanceToRay:Math.sqrt(a),point:u,index:e,face:null,faceIndex:null,barycoord:null,object:o})}}class XU extends qt{constructor(e,t,i,r,s,o,a,u,f){super(e,t,i,r,s,o,a,u,f),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:mn,this.magFilter=s!==void 0?s:mn,this.generateMipmaps=!1;const h=this;function d(){h.needsUpdate=!0,e.requestVideoFrameCallback(d)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(d)}clone(){return new this.constructor(this.image).copy(this)}update(){const e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class JU extends qt{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=bn,this.minFilter=bn,this.generateMipmaps=!1,this.needsUpdate=!0}}class ng extends qt{constructor(e,t,i,r,s,o,a,u,f,h,d,p){super(null,o,a,u,f,h,r,s,d,p),this.isCompressedTexture=!0,this.image={width:t,height:i},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}}class jU extends ng{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=Oi,this.layerUpdates=new Set}addLayerUpdate(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class KU extends ng{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,Bs),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class YU extends qt{constructor(e,t,i,r,s,o,a,u,f){super(e,t,i,r,s,o,a,u,f),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Lr{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(e,t){const i=this.getUtoTmapping(e);return this.getPoint(i,t)}getPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPoint(i/e));return t}getSpacedPoints(e=5){const t=[];for(let i=0;i<=e;i++)t.push(this.getPointAt(i/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 i,r=this.getPoint(0),s=0;t.push(0);for(let o=1;o<=e;o++)i=this.getPoint(o/e),s+=i.distanceTo(r),t.push(s),r=i;return this.cacheArcLengths=t,t}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(e,t){const i=this.getLengths();let r=0;const s=i.length;let o;t?o=t:o=e*i[s-1];let a=0,u=s-1,f;for(;a<=u;)if(r=Math.floor(a+(u-a)/2),f=i[r]-o,f<0)a=r+1;else if(f>0)u=r-1;else{u=r;break}if(r=u,i[r]===o)return r/(s-1);const h=i[r],p=i[r+1]-h,v=(o-h)/p;return(r+v)/(s-1)}getTangent(e,t){let r=e-1e-4,s=e+1e-4;r<0&&(r=0),s>1&&(s=1);const o=this.getPoint(r),a=this.getPoint(s),u=t||(o.isVector2?new fe:new F);return u.copy(a).sub(o).normalize(),u}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new F,r=[],s=[],o=[],a=new F,u=new rt;for(let v=0;v<=e;v++){const y=v/e;r[v]=this.getTangentAt(y,new F)}s[0]=new F,o[0]=new F;let f=Number.MAX_VALUE;const h=Math.abs(r[0].x),d=Math.abs(r[0].y),p=Math.abs(r[0].z);h<=f&&(f=h,i.set(1,0,0)),d<=f&&(f=d,i.set(0,1,0)),p<=f&&i.set(0,0,1),a.crossVectors(r[0],i).normalize(),s[0].crossVectors(r[0],a),o[0].crossVectors(r[0],s[0]);for(let v=1;v<=e;v++){if(s[v]=s[v-1].clone(),o[v]=o[v-1].clone(),a.crossVectors(r[v-1],r[v]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(pn(r[v-1].dot(r[v]),-1,1));s[v].applyMatrix4(u.makeRotationAxis(a,y))}o[v].crossVectors(r[v],s[v])}if(t===!0){let v=Math.acos(pn(s[0].dot(s[e]),-1,1));v/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(v=-v);for(let y=1;y<=e;y++)s[y].applyMatrix4(u.makeRotationAxis(r[y],v*y)),o[y].crossVectors(r[y],s[y])}return{tangents:r,normals:s,binormals:o}}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 ig extends Lr{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,u=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=i,this.yRadius=r,this.aStartAngle=s,this.aEndAngle=o,this.aClockwise=a,this.aRotation=u}getPoint(e,t=new fe){const i=t,r=Math.PI*2;let s=this.aEndAngle-this.aStartAngle;const o=Math.abs(s)r;)s-=r;s0?0:(Math.floor(Math.abs(a)/s)+1)*s:u===0&&a===s-1&&(a=s-2,u=1);let f,h;this.closed||a>0?f=r[(a-1)%s]:(bd.subVectors(r[0],r[1]).add(r[0]),f=bd);const d=r[a%s],p=r[(a+1)%s];if(this.closed||a+2r.length-2?r.length-1:o+1],d=r[o>r.length-3?r.length-1:o+2];return i.set(tE(a,u.x,f.x,h.x,d.x),tE(a,u.y,f.y,h.y,d.y)),i}copy(e){super.copy(e),this.points=[];for(let t=0,i=e.points.length;t=i){const o=r[s]-i,a=this.curves[s],u=a.getLength(),f=u===0?0:1-o/u;return a.getPointAt(f,t)}s++}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 i=0,r=this.curves.length;i1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,i=e.curves.length;t0){const d=f.getPoint(0);d.equals(this.currentPoint)||this.lineTo(d.x,d.y)}this.curves.push(f);const h=f.getPoint(1);return this.currentPoint.copy(h),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 Rf extends _t{constructor(e=[new fe(0,-.5),new fe(.5,0),new fe(0,.5)],t=12,i=0,r=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:e,segments:t,phiStart:i,phiLength:r},t=Math.floor(t),r=pn(r,0,Math.PI*2);const s=[],o=[],a=[],u=[],f=[],h=1/t,d=new F,p=new fe,v=new F,y=new F,M=new F;let x=0,g=0;for(let A=0;A<=e.length-1;A++)switch(A){case 0:x=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,v.x=g*1,v.y=-x,v.z=g*0,M.copy(v),v.normalize(),u.push(v.x,v.y,v.z);break;case e.length-1:u.push(M.x,M.y,M.z);break;default:x=e[A+1].x-e[A].x,g=e[A+1].y-e[A].y,v.x=g*1,v.y=-x,v.z=g*0,y.copy(v),v.x+=M.x,v.y+=M.y,v.z+=M.z,v.normalize(),u.push(v.x,v.y,v.z),M.copy(y)}for(let A=0;A<=t;A++){const S=i+A*h*r,w=Math.sin(S),P=Math.cos(S);for(let R=0;R<=e.length-1;R++){d.x=e[R].x*w,d.y=e[R].y,d.z=e[R].x*P,o.push(d.x,d.y,d.z),p.x=A/t,p.y=R/(e.length-1),a.push(p.x,p.y);const B=u[3*R+0]*w,D=u[3*R+1],z=u[3*R+0]*P;f.push(B,D,z)}}for(let A=0;A0&&S(!0),t>0&&S(!1)),this.setIndex(h),this.setAttribute("position",new qe(d,3)),this.setAttribute("normal",new qe(p,3)),this.setAttribute("uv",new qe(v,2));function A(){const w=new F,P=new F;let R=0;const B=(t-e)/i;for(let D=0;D<=s;D++){const z=[],C=D/s,b=C*(t-e)+e;for(let J=0;J<=r;J++){const j=J/r,ee=j*u+a,ce=Math.sin(ee),Z=Math.cos(ee);P.x=b*ce,P.y=-C*i+x,P.z=b*Z,d.push(P.x,P.y,P.z),w.set(ce,B,Z).normalize(),p.push(w.x,w.y,w.z),v.push(j,1-C),z.push(y++)}M.push(z)}for(let D=0;D0&&(h.push(C,b,j),R+=3),t>0&&(h.push(b,J,j),R+=3)}f.addGroup(g,R,0),g+=R}function S(w){const P=y,R=new fe,B=new F;let D=0;const z=w===!0?e:t,C=w===!0?1:-1;for(let J=1;J<=r;J++)d.push(0,x*C,0),p.push(0,C,0),v.push(.5,.5),y++;const b=y;for(let J=0;J<=r;J++){const ee=J/r*u+a,ce=Math.cos(ee),Z=Math.sin(ee);B.x=z*Z,B.y=x*C,B.z=z*ce,d.push(B.x,B.y,B.z),p.push(0,C,0),R.x=ce*.5+.5,R.y=Z*.5*C+.5,v.push(R.x,R.y),y++}for(let J=0;J.9&&B<.1&&(S<.2&&(o[A+0]+=1),w<.2&&(o[A+2]+=1),P<.2&&(o[A+4]+=1))}}function p(A){s.push(A.x,A.y,A.z)}function v(A,S){const w=A*3;S.x=e[w+0],S.y=e[w+1],S.z=e[w+2]}function y(){const A=new F,S=new F,w=new F,P=new F,R=new fe,B=new fe,D=new fe;for(let z=0,C=0;z80*t){a=f=n[0],u=h=n[1];for(let y=t;yf&&(f=d),p>h&&(h=p);v=Math.max(f-a,h-u),v=v!==0?32767/v:0}return uf(s,o,t,a,u,v,0),o}};function DR(n,e,t,i,r){let s,o;if(r===_O(n,e,t,i)>0)for(s=e;s=e;s-=i)o=nE(s,n[s],n[s+1],o);return o&&lg(o,o.next)&&(hf(o),o=o.next),o}function La(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(lg(t,t.next)||an(t.prev,t,t.next)===0)){if(hf(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function uf(n,e,t,i,r,s,o){if(!n)return;!o&&s&&dO(n,i,r,s);let a=n,u,f;for(;n.prev!==n.next;){if(u=n.prev,f=n.next,s?sO(n,i,r,s):rO(n)){e.push(u.i/t|0),e.push(n.i/t|0),e.push(f.i/t|0),hf(n),n=f.next,a=f.next;continue}if(n=f,n===a){o?o===1?(n=oO(La(n),e,t),uf(n,e,t,i,r,s,2)):o===2&&aO(n,e,t,i,r,s):uf(La(n),e,t,i,r,s,1);break}}}function rO(n){const e=n.prev,t=n,i=n.next;if(an(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,u=t.y,f=i.y,h=rs?r>o?r:o:s>o?s:o,v=a>u?a>f?a:f:u>f?u:f;let y=i.next;for(;y!==e;){if(y.x>=h&&y.x<=p&&y.y>=d&&y.y<=v&&Gl(r,a,s,u,o,f,y.x,y.y)&&an(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function sO(n,e,t,i){const r=n.prev,s=n,o=n.next;if(an(r,s,o)>=0)return!1;const a=r.x,u=s.x,f=o.x,h=r.y,d=s.y,p=o.y,v=au?a>f?a:f:u>f?u:f,x=h>d?h>p?h:p:d>p?d:p,g=o_(v,y,e,t,i),A=o_(M,x,e,t,i);let S=n.prevZ,w=n.nextZ;for(;S&&S.z>=g&&w&&w.z<=A;){if(S.x>=v&&S.x<=M&&S.y>=y&&S.y<=x&&S!==r&&S!==o&&Gl(a,h,u,d,f,p,S.x,S.y)&&an(S.prev,S,S.next)>=0||(S=S.prevZ,w.x>=v&&w.x<=M&&w.y>=y&&w.y<=x&&w!==r&&w!==o&&Gl(a,h,u,d,f,p,w.x,w.y)&&an(w.prev,w,w.next)>=0))return!1;w=w.nextZ}for(;S&&S.z>=g;){if(S.x>=v&&S.x<=M&&S.y>=y&&S.y<=x&&S!==r&&S!==o&&Gl(a,h,u,d,f,p,S.x,S.y)&&an(S.prev,S,S.next)>=0)return!1;S=S.prevZ}for(;w&&w.z<=A;){if(w.x>=v&&w.x<=M&&w.y>=y&&w.y<=x&&w!==r&&w!==o&&Gl(a,h,u,d,f,p,w.x,w.y)&&an(w.prev,w,w.next)>=0)return!1;w=w.nextZ}return!0}function oO(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!lg(r,s)&&NR(r,i,i.next,s)&&ff(r,s)&&ff(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),hf(i),hf(i.next),i=n=s),i=i.next}while(i!==n);return La(i)}function aO(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&gO(o,a)){let u=FR(o,a);o=La(o,o.next),u=La(u,u.next),uf(o,e,t,i,r,s,0),uf(u,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function lO(n,e,t,i){const r=[];let s,o,a,u,f;for(s=0,o=e.length;s=t.next.y&&t.next.y!==t.y){const p=t.x+(o-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(p<=s&&p>i&&(i=p,r=t.x=t.x&&t.x>=u&&s!==t.x&&Gl(or.x||t.x===r.x&&hO(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function hO(n,e){return an(n.prev,n,e.prev)<0&&an(e.next,n,n.next)<0}function dO(n,e,t,i){let r=n;do r.z===0&&(r.z=o_(r.x,r.y,e,t,i)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==n);r.prevZ.nextZ=null,r.prevZ=null,pO(r)}function pO(n){let e,t,i,r,s,o,a,u,f=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||u>0&&i;)a!==0&&(u===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,u--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,f*=2}while(o>1);return n}function o_(n,e,t,i,r){return n=(n-t)*r|0,e=(e-i)*r|0,n=(n|n<<8)&16711935,n=(n|n<<4)&252645135,n=(n|n<<2)&858993459,n=(n|n<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,n|e<<1}function mO(n){let e=n,t=n;do(e.x=(n-o)*(s-a)&&(n-o)*(i-a)>=(t-o)*(e-a)&&(t-o)*(s-a)>=(r-o)*(i-a)}function gO(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!vO(n,e)&&(ff(n,e)&&ff(e,n)&&yO(n,e)&&(an(n.prev,n,e.prev)||an(n,e.prev,e))||lg(n,e)&&an(n.prev,n,n.next)>0&&an(e.prev,e,e.next)>0)}function an(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function lg(n,e){return n.x===e.x&&n.y===e.y}function NR(n,e,t,i){const r=Dd(an(n,e,t)),s=Dd(an(n,e,i)),o=Dd(an(t,i,n)),a=Dd(an(t,i,e));return!!(r!==s&&o!==a||r===0&&Ld(n,t,e)||s===0&&Ld(n,i,e)||o===0&&Ld(t,n,i)||a===0&&Ld(t,e,i))}function Ld(n,e,t){return e.x<=Math.max(n.x,t.x)&&e.x>=Math.min(n.x,t.x)&&e.y<=Math.max(n.y,t.y)&&e.y>=Math.min(n.y,t.y)}function Dd(n){return n>0?1:n<0?-1:0}function vO(n,e){let t=n;do{if(t.i!==n.i&&t.next.i!==n.i&&t.i!==e.i&&t.next.i!==e.i&&NR(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function ff(n,e){return an(n.prev,n,n.next)<0?an(n,e,n.next)>=0&&an(n,n.prev,e)>=0:an(n,e,n.prev)<0||an(n,n.next,e)<0}function yO(n,e){let t=n,i=!1;const r=(n.x+e.x)/2,s=(n.y+e.y)/2;do t.y>s!=t.next.y>s&&t.next.y!==t.y&&r<(t.next.x-t.x)*(s-t.y)/(t.next.y-t.y)+t.x&&(i=!i),t=t.next;while(t!==n);return i}function FR(n,e){const t=new a_(n.i,n.x,n.y),i=new a_(e.i,e.x,e.y),r=n.next,s=e.prev;return n.next=e,e.prev=n,t.next=r,r.prev=t,i.next=t,t.prev=i,s.next=i,i.prev=s,i}function nE(n,e,t,i){const r=new a_(n,e,t);return i?(r.next=i.next,r.prev=i,i.next.prev=r,i.next=r):(r.prev=r,r.next=r),r}function hf(n){n.next.prev=n.prev,n.prev.next=n.next,n.prevZ&&(n.prevZ.nextZ=n.nextZ),n.nextZ&&(n.nextZ.prevZ=n.prevZ)}function a_(n,e,t){this.i=n,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function _O(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function rE(n,e){for(let t=0;tNumber.EPSILON){const ge=Math.sqrt($),he=Math.sqrt(U*U+I*I),Qe=O.x-ze/ge,Pe=O.y+$e/ge,Ge=be.x-I/he,Tt=be.y+U/he,Se=((Ge-Qe)*I-(Tt-Pe)*U)/($e*I-ze*U);Re=Qe+$e*Se-me.x,xe=Pe+ze*Se-me.y;const Ve=Re*Re+xe*xe;if(Ve<=2)return new fe(Re,xe);Be=Math.sqrt(Ve/2)}else{let ge=!1;$e>Number.EPSILON?U>Number.EPSILON&&(ge=!0):$e<-Number.EPSILON?U<-Number.EPSILON&&(ge=!0):Math.sign(ze)===Math.sign(I)&&(ge=!0),ge?(Re=-ze,xe=$e,Be=Math.sqrt($)):(Re=$e,xe=ze,Be=Math.sqrt($/2))}return new fe(Re/Be,xe/Be)}const V=[];for(let me=0,O=ee.length,be=O-1,Re=me+1;me=0;me--){const O=me/x,be=v*Math.cos(O*Math.PI/2),Re=y*Math.sin(O*Math.PI/2)+M;for(let xe=0,Be=ee.length;xe=0;){const Re=be;let xe=be-1;xe<0&&(xe=me.length-1);for(let Be=0,$e=h+x*2;Be<$e;Be++){const ze=Z*Be,U=Z*(Be+1),I=O+Re+ze,$=O+xe+ze,ue=O+xe+U,ge=O+Re+U;st(I,$,ue,ge)}}}function Ae(me,O,be){u.push(me),u.push(O),u.push(be)}function lt(me,O,be){ut(me),ut(O),ut(be);const Re=r.length/3,xe=A.generateTopUV(i,r,Re-3,Re-2,Re-1);ot(xe[0]),ot(xe[1]),ot(xe[2])}function st(me,O,be,Re){ut(me),ut(O),ut(Re),ut(O),ut(be),ut(Re);const xe=r.length/3,Be=A.generateSideWallUV(i,r,xe-6,xe-3,xe-2,xe-1);ot(Be[0]),ot(Be[1]),ot(Be[3]),ot(Be[1]),ot(Be[2]),ot(Be[3])}function ut(me){r.push(u[me*3+0]),r.push(u[me*3+1]),r.push(u[me*3+2])}function ot(me){s.push(me.x),s.push(me.y)}}}copy(e){return super.copy(e),this.parameters=Object.assign({},e.parameters),this}toJSON(){const e=super.toJSON(),t=this.parameters.shapes,i=this.parameters.options;return AO(t,i,e)}static fromJSON(e,t){const i=[];for(let s=0,o=e.shapes.length;s0)&&v.push(S,w,R),(g!==i-1||u0!=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 dispersion(){return this._dispersion}set dispersion(e){this._dispersion>0!=e>0&&this.version++,this._dispersion=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.dispersion=e.dispersion,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 zR extends En{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Ie(16777215),this.specular=new Ie(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ie(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=bo,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Vi,this.combine=xf,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.envMapRotation.copy(e.envMapRotation),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 HR extends En{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Ie(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ie(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=bo,this.normalScale=new fe(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 GR extends En{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=bo,this.normalScale=new fe(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 VR extends En{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Ie(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Ie(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=bo,this.normalScale=new fe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Vi,this.combine=xf,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.envMapRotation.copy(e.envMapRotation),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 WR extends En{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Ie(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=bo,this.normalScale=new fe(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 XR extends ri{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 pa(n,e,t){return!n||!t&&n.constructor===e?n:typeof e.BYTES_PER_ELEMENT=="number"?new e(n):Array.prototype.slice.call(n)}function JR(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function jR(n){function e(r,s){return n[r]-n[s]}const t=n.length,i=new Array(t);for(let r=0;r!==t;++r)i[r]=r;return i.sort(e),i}function l_(n,e,t){const i=n.length,r=new n.constructor(i);for(let s=0,o=0;o!==i;++s){const a=t[s]*e;for(let u=0;u!==e;++u)r[o++]=n[a+u]}return r}function Wx(n,e,t,i){let r=1,s=n[0];for(;s!==void 0&&s[i]===void 0;)s=n[r++];if(s===void 0)return;let o=s[i];if(o!==void 0)if(Array.isArray(o))do o=s[i],o!==void 0&&(e.push(s.time),t.push.apply(t,o)),s=n[r++];while(s!==void 0);else if(o.toArray!==void 0)do o=s[i],o!==void 0&&(e.push(s.time),o.toArray(t,t.length)),s=n[r++];while(s!==void 0);else do o=s[i],o!==void 0&&(e.push(s.time),t.push(o)),s=n[r++];while(s!==void 0)}function MO(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let u=0;u=i)){d.push(f.times[v]);for(let M=0;Ms.tracks[u].times[0]&&(a=s.tracks[u].times[0]);for(let u=0;u=a.times[y]){const g=y*d+h,A=g+d-h;M=a.values.slice(g,A)}else{const g=a.createInterpolant(),A=h,S=d-h;g.evaluate(s),M=g.resultBuffer.slice(A,S)}u==="quaternion"&&new On().fromArray(M).normalize().conjugate().toArray(M);const x=f.times.length;for(let g=0;g=s)){const a=t[1];e=s)break t}o=i,i=0;break n}break e}for(;i>>1;et;)--o;if(++o,s!==0||o!==r){s>=o&&(o=Math.max(o,1),s=o-1);const a=this.getValueSize();this.times=i.slice(s,o),this.values=this.values.slice(s*a,o*a)}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 i=this.times,r=this.values,s=i.length;s===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let o=null;for(let a=0;a!==s;a++){const u=i[a];if(typeof u=="number"&&isNaN(u)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,u),e=!1;break}if(o!==null&&o>u){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,u,o),e=!1;break}o=u}if(r!==void 0&&JR(r))for(let a=0,u=r.length;a!==u;++a){const f=r[a];if(isNaN(f)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,f),e=!1;break}}return e}optimize(){const e=this.times.slice(),t=this.values.slice(),i=this.getValueSize(),r=this.getInterpolation()===sp,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,u=o*i,f=0;f!==i;++f)t[u+f]=t[a+f];++o}return o!==e.length?(this.times=e.slice(0,o),this.values=t.slice(0,o*i)):(this.times=e,this.values=t),this}clone(){const e=this.times.slice(),t=this.values.slice(),i=this.constructor,r=new i(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}}Dr.prototype.TimeBufferType=Float32Array;Dr.prototype.ValueBufferType=Float32Array;Dr.prototype.DefaultInterpolation=cc;class Ha extends Dr{constructor(e,t,i){super(e,t,i)}}Ha.prototype.ValueTypeName="bool";Ha.prototype.ValueBufferType=Array;Ha.prototype.DefaultInterpolation=lc;Ha.prototype.InterpolantFactoryMethodLinear=void 0;Ha.prototype.InterpolantFactoryMethodSmooth=void 0;class Jx extends Dr{}Jx.prototype.ValueTypeName="color";class Da extends Dr{}Da.prototype.ValueTypeName="number";class QR extends Sc{constructor(e,t,i,r){super(e,t,i,r)}interpolate_(e,t,i,r){const s=this.resultBuffer,o=this.sampleValues,a=this.valueSize,u=(i-t)/(r-t);let f=e*a;for(let h=f+a;f!==h;f+=4)On.slerpFlat(s,0,o,f-a,o,f,u);return s}}class Na extends Dr{InterpolantFactoryMethodLinear(e){return new QR(this.times,this.values,this.getValueSize(),e)}}Na.prototype.ValueTypeName="quaternion";Na.prototype.InterpolantFactoryMethodSmooth=void 0;class Ga extends Dr{constructor(e,t,i){super(e,t,i)}}Ga.prototype.ValueTypeName="string";Ga.prototype.ValueBufferType=Array;Ga.prototype.DefaultInterpolation=lc;Ga.prototype.InterpolantFactoryMethodLinear=void 0;Ga.prototype.InterpolantFactoryMethodSmooth=void 0;class Fa extends Dr{}Fa.prototype.ValueTypeName="vector";class hc{constructor(e="",t=-1,i=[],r=Km){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Hi(),this.duration<0&&this.resetDuration()}static parse(e){const t=[],i=e.tracks,r=1/(e.fps||1);for(let o=0,a=i.length;o!==a;++o)t.push(TO(i[o]).scale(r));const s=new this(e.name,e.duration,t,e.blendMode);return s.uuid=e.uuid,s}static toJSON(e){const t=[],i=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let s=0,o=i.length;s!==o;++s)t.push(Dr.toJSON(i[s]));return r}static CreateFromMorphTargetSequence(e,t,i,r){const s=t.length,o=[];for(let a=0;a1){const d=h[1];let p=r[d];p||(r[d]=p=[]),p.push(f)}}const o=[];for(const a in r)o.push(this.CreateFromMorphTargetSequence(a,r[a],t,i));return o}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const i=function(d,p,v,y,M){if(v.length!==0){const x=[],g=[];Wx(v,x,g,y),x.length!==0&&M.push(new d(p,x,g))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let u=e.length||-1;const f=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(hs[e]!==void 0){hs[e].push({onLoad:t,onProgress:i,onError:r});return}hs[e]=[],hs[e].push({onLoad:t,onProgress:i,onError:r});const o=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),a=this.mimeType,u=this.responseType;fetch(o).then(f=>{if(f.status===200||f.status===0){if(f.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||f.body===void 0||f.body.getReader===void 0)return f;const h=hs[e],d=f.body.getReader(),p=f.headers.get("X-File-Size")||f.headers.get("Content-Length"),v=p?parseInt(p):0,y=v!==0;let M=0;const x=new ReadableStream({start(g){A();function A(){d.read().then(({done:S,value:w})=>{if(S)g.close();else{M+=w.byteLength;const P=new ProgressEvent("progress",{lengthComputable:y,loaded:M,total:v});for(let R=0,B=h.length;R{g.error(S)})}}});return new Response(x)}else throw new RO(`fetch for "${f.url}" responded with ${f.status}: ${f.statusText}`,f)}).then(f=>{switch(u){case"arraybuffer":return f.arrayBuffer();case"blob":return f.blob();case"document":return f.text().then(h=>new DOMParser().parseFromString(h,a));case"json":return f.json();default:if(a===void 0)return f.text();{const d=/charset="?([^;"\s]*)"?/i.exec(a),p=d&&d[1]?d[1].toLowerCase():void 0,v=new TextDecoder(p);return f.arrayBuffer().then(y=>v.decode(y))}}}).then(f=>{Ss.add(e,f);const h=hs[e];delete hs[e];for(let d=0,p=h.length;d{const h=hs[e];if(h===void 0)throw this.manager.itemError(e),f;delete hs[e];for(let d=0,p=h.length;d{this.manager.itemEnd(e)}),this.manager.itemStart(e)}setResponseType(e){return this.responseType=e,this}setMimeType(e){return this.mimeType=e,this}}class bO extends si{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Wi(this.manager);o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(a){try{t(s.parse(JSON.parse(a)))}catch(u){r?r(u):console.error(u),s.manager.itemError(e)}},i,r)}parse(e){const t=[];for(let i=0;i0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(const s in e.uniforms){const o=e.uniforms[s];switch(r.uniforms[s]={},o.type){case"t":r.uniforms[s].value=i(o.value);break;case"c":r.uniforms[s].value=new Ie().setHex(o.value);break;case"v2":r.uniforms[s].value=new fe().fromArray(o.value);break;case"v3":r.uniforms[s].value=new F().fromArray(o.value);break;case"v4":r.uniforms[s].value=new Nt().fromArray(o.value);break;case"m3":r.uniforms[s].value=new xt().fromArray(o.value);break;case"m4":r.uniforms[s].value=new rt().fromArray(o.value);break;default:r.uniforms[s].value=o.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.glslVersion!==void 0&&(r.glslVersion=e.glslVersion),e.extensions!==void 0)for(const s in e.extensions)r.extensions[s]=e.extensions[s];if(e.lights!==void 0&&(r.lights=e.lights),e.clipping!==void 0&&(r.clipping=e.clipping),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=i(e.map)),e.matcap!==void 0&&(r.matcap=i(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=i(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=i(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=i(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let s=e.normalScale;Array.isArray(s)===!1&&(s=[s,s]),r.normalScale=new fe().fromArray(s)}return e.displacementMap!==void 0&&(r.displacementMap=i(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=i(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=i(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=i(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=i(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=i(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=i(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=i(e.envMap)),e.envMapRotation!==void 0&&r.envMapRotation.fromArray(e.envMapRotation),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=i(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=i(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=i(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=i(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=i(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=i(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new fe().fromArray(e.clearcoatNormalScale)),e.iridescenceMap!==void 0&&(r.iridescenceMap=i(e.iridescenceMap)),e.iridescenceThicknessMap!==void 0&&(r.iridescenceThicknessMap=i(e.iridescenceThicknessMap)),e.transmissionMap!==void 0&&(r.transmissionMap=i(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=i(e.thicknessMap)),e.anisotropyMap!==void 0&&(r.anisotropyMap=i(e.anisotropyMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=i(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=i(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}createMaterialFromType(e){return vg.createMaterialFromType(e)}static createMaterialFromType(e){const t={ShadowMaterial:OR,SpriteMaterial:Lx,RawShaderMaterial:kR,ShaderMaterial:Br,PointsMaterial:tg,MeshPhysicalMaterial:fr,MeshStandardMaterial:Pf,MeshPhongMaterial:zR,MeshToonMaterial:HR,MeshNormalMaterial:GR,MeshLambertMaterial:VR,MeshDepthMaterial:Px,MeshDistanceMaterial:Ix,MeshBasicMaterial:ki,MeshMatcapMaterial:WR,LineDashedMaterial:XR,LineBasicMaterial:ri,Material:En};return new t[e]}}class xo{static decodeText(e){if(console.warn("THREE.LoaderUtils: decodeText() has been deprecated with r165 and will be removed with r175. Use TextDecoder instead."),typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let i=0,r=e.length;i0){const u=new jx(t);s=new df(u),s.setCrossOrigin(this.crossOrigin);for(let f=0,h=e.length;f0){r=new df(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{const x=new ni;x.min.fromArray(M.boxMin),x.max.fromArray(M.boxMax);const g=new Vn;return g.radius=M.sphereRadius,g.center.fromArray(M.sphereCenter),{boxInitialized:M.boxInitialized,box:x,sphereInitialized:M.sphereInitialized,sphere:g}}),o._maxInstanceCount=e.maxInstanceCount,o._maxVertexCount=e.maxVertexCount,o._maxIndexCount=e.maxIndexCount,o._geometryInitialized=e.geometryInitialized,o._geometryCount=e.geometryCount,o._matricesTexture=f(e.matricesTexture.uuid),e.colorsTexture!==void 0&&(o._colorsTexture=f(e.colorsTexture.uuid));break;case"LOD":o=new CR;break;case"Line":o=new Is(a(e.geometry),u(e.material));break;case"LineLoop":o=new Fx(a(e.geometry),u(e.material));break;case"LineSegments":o=new Ir(a(e.geometry),u(e.material));break;case"PointCloud":case"Points":o=new Ux(a(e.geometry),u(e.material));break;case"Sprite":o=new wR(u(e.material));break;case"Group":o=new As;break;case"Bone":o=new eg;break;default:o=new Bt}if(o.uuid=e.uuid,e.name!==void 0&&(o.name=e.name),e.matrix!==void 0?(o.matrix.fromArray(e.matrix),e.matrixAutoUpdate!==void 0&&(o.matrixAutoUpdate=e.matrixAutoUpdate),o.matrixAutoUpdate&&o.matrix.decompose(o.position,o.quaternion,o.scale)):(e.position!==void 0&&o.position.fromArray(e.position),e.rotation!==void 0&&o.rotation.fromArray(e.rotation),e.quaternion!==void 0&&o.quaternion.fromArray(e.quaternion),e.scale!==void 0&&o.scale.fromArray(e.scale)),e.up!==void 0&&o.up.fromArray(e.up),e.castShadow!==void 0&&(o.castShadow=e.castShadow),e.receiveShadow!==void 0&&(o.receiveShadow=e.receiveShadow),e.shadow&&(e.shadow.intensity!==void 0&&(o.shadow.intensity=e.shadow.intensity),e.shadow.bias!==void 0&&(o.shadow.bias=e.shadow.bias),e.shadow.normalBias!==void 0&&(o.shadow.normalBias=e.shadow.normalBias),e.shadow.radius!==void 0&&(o.shadow.radius=e.shadow.radius),e.shadow.mapSize!==void 0&&o.shadow.mapSize.fromArray(e.shadow.mapSize),e.shadow.camera!==void 0&&(o.shadow.camera=this.parseObject(e.shadow.camera))),e.visible!==void 0&&(o.visible=e.visible),e.frustumCulled!==void 0&&(o.frustumCulled=e.frustumCulled),e.renderOrder!==void 0&&(o.renderOrder=e.renderOrder),e.userData!==void 0&&(o.userData=e.userData),e.layers!==void 0&&(o.layers.mask=e.layers),e.children!==void 0){const p=e.children;for(let v=0;v"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,i,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);const s=this,o=Ss.get(e);if(o!==void 0){if(s.manager.itemStart(e),o.then){o.then(f=>{t&&t(f),s.manager.itemEnd(e)}).catch(f=>{r&&r(f)});return}return setTimeout(function(){t&&t(o),s.manager.itemEnd(e)},0),o}const a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader;const u=fetch(e,a).then(function(f){return f.blob()}).then(function(f){return createImageBitmap(f,Object.assign(s.options,{colorSpaceConversion:"none"}))}).then(function(f){return Ss.add(e,f),t&&t(f),s.manager.itemEnd(e),f}).catch(function(f){r&&r(f),Ss.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Ss.add(e,u),s.manager.itemStart(e)}}let Nd;class qx{static getContext(){return Nd===void 0&&(Nd=new(window.AudioContext||window.webkitAudioContext)),Nd}static setContext(e){Nd=e}}class OO extends si{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Wi(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(u){try{const f=u.slice(0);qx.getContext().decodeAudioData(f,function(d){t(d)}).catch(a)}catch(f){a(f)}},i,r);function a(u){r?r(u):console.error(u),s.manager.itemError(e)}}}const hE=new rt,dE=new rt,Ko=new rt;class kO{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new on,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new on,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,Ko.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(Aa*t.fov*.5)/t.zoom;let a,u;dE.elements[12]=-r,hE.elements[12]=r,a=-o*t.aspect+s,u=o*t.aspect+s,Ko.elements[0]=2*t.near/(u-a),Ko.elements[8]=(u+a)/(u-a),this.cameraL.projectionMatrix.copy(Ko),a=-o*t.aspect-s,u=o*t.aspect-s,Ko.elements[0]=2*t.near/(u-a),Ko.elements[8]=(u+a)/(u-a),this.cameraR.projectionMatrix.copy(Ko)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(dE),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(hE)}}class $x{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=pE(),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=pE();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function pE(){return performance.now()}const Yo=new F,mE=new On,zO=new F,Qo=new F;class HO extends Bt{constructor(){super(),this.type="AudioListener",this.context=qx.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new $x}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(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 this.filter!==null?(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,i=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Yo,mE,zO),Qo.set(0,0,-1).applyQuaternion(mE),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Yo.x,r),t.positionY.linearRampToValueAtTime(Yo.y,r),t.positionZ.linearRampToValueAtTime(Yo.z,r),t.forwardX.linearRampToValueAtTime(Qo.x,r),t.forwardY.linearRampToValueAtTime(Qo.y,r),t.forwardZ.linearRampToValueAtTime(Qo.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(Yo.x,Yo.y,Yo.z),t.setOrientation(Qo.x,Qo.y,Qo.z,i.x,i.y,i.z)}}let ab=class extends Bt{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(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}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(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(e=0){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source!==null&&(this.source.stop(this.context.currentTime+e),this.source.onended=null),this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(i,r,this._addIndex*t,1,t);for(let u=t,f=t+t;u!==f;++u)if(i[u]!==i[u+t]){a.setValue(i,r);break}}saveOriginalState(){const e=this.binding,t=this.buffer,i=this.valueSize,r=i*this._origIndex;e.getValue(t,r);for(let s=i,o=r;s!==o;++s)t[s]=t[r+s%i];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){const e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let i=e;i=.5)for(let o=0;o!==s;++o)e[t+o]=e[i+o]}_slerp(e,t,i,r){On.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;On.multiplyQuaternionsFlat(e,o,e,t,e,i),On.slerpFlat(e,t,e,t,e,o,r)}_lerp(e,t,i,r,s){const o=1-r;for(let a=0;a!==s;++a){const u=t+a;e[u]=e[u]*o+e[i+a]*r}}_lerpAdditive(e,t,i,r,s){for(let o=0;o!==s;++o){const a=t+o;e[a]=e[a]+e[i+o]*r}}}const eA="\\[\\]\\.:\\/",XO=new RegExp("["+eA+"]","g"),tA="[^"+eA+"]",JO="[^"+eA.replace("\\.","")+"]",jO=/((?:WC+[\/:])*)/.source.replace("WC",tA),KO=/(WCOD+)?/.source.replace("WCOD",JO),YO=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",tA),QO=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",tA),ZO=new RegExp("^"+jO+KO+YO+QO+"$"),qO=["material","materials","bones","map"];class $O{constructor(e,t,i){const r=i||It.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();const i=this._targetGroup.nCachedObjects_,r=this._bindings[i];r!==void 0&&r.getValue(e,t)}setValue(e,t){const i=this._bindings;for(let r=this._targetGroup.nCachedObjects_,s=i.length;r!==s;++r)i[r].setValue(e,t)}bind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].bind()}unbind(){const e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,i=e.length;t!==i;++t)e[t].unbind()}}class It{constructor(e,t,i){this.path=t,this.parsedPath=i||It.parseTrackName(t),this.node=It.findNode(e,this.parsedPath.nodeName),this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,t,i){return e&&e.isAnimationObjectGroup?new It.Composite(e,t,i):new It(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(XO,"")}static parseTrackName(e){const t=ZO.exec(e);if(t===null)throw new Error("PropertyBinding: Cannot parse trackName: "+e);const i={nodeName:t[2],objectName:t[3],objectIndex:t[4],propertyName:t[5],propertyIndex:t[6]},r=i.nodeName&&i.nodeName.lastIndexOf(".");if(r!==void 0&&r!==-1){const s=i.nodeName.substring(r+1);qO.indexOf(s)!==-1&&(i.nodeName=i.nodeName.substring(0,r),i.objectName=s)}if(i.propertyName===null||i.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return i}static findNode(e,t){if(t===void 0||t===""||t==="."||t===-1||t===e.name||t===e.uuid)return e;if(e.skeleton){const i=e.skeleton.getBoneByName(t);if(i!==void 0)return i}if(e.children){const i=function(s){for(let o=0;o=s){const d=s++,p=e[d];t[p.uuid]=h,e[h]=p,t[f]=d,e[d]=u;for(let v=0,y=r;v!==y;++v){const M=i[v],x=M[d],g=M[h];M[h]=x,M[d]=g}}}this.nCachedObjects_=s}uncache(){const e=this._objects,t=this._indicesByUUID,i=this._bindings,r=i.length;let s=this.nCachedObjects_,o=e.length;for(let a=0,u=arguments.length;a!==u;++a){const f=arguments[a],h=f.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[v.uuid]=d),e[d]=v,e.pop();for(let y=0,M=r;y!==M;++y){const x=i[y];x[d]=x[p],x.pop()}}}this.nCachedObjects_=s}subscribe_(e,t){const i=this._bindingsIndicesByPath;let r=i[e];const s=this._bindings;if(r!==void 0)return s[r];const o=this._paths,a=this._parsedPaths,u=this._objects,f=u.length,h=this.nCachedObjects_,d=new Array(f);r=s.length,i[e]=r,o.push(e),a.push(t),s.push(d);for(let p=h,v=u.length;p!==v;++p){const y=u[p];d[p]=new It(y,e,t)}return d}unsubscribe_(e){const t=this._bindingsIndicesByPath,i=t[e];if(i!==void 0){const r=this._paths,s=this._parsedPaths,o=this._bindings,a=o.length-1,u=o[a],f=e[a];t[f]=i,o[i]=u,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class cb{constructor(e,t,i=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=i,this.blendMode=r;const s=t.tracks,o=s.length,a=new Array(o),u={endingStart:fa,endingEnd:fa};for(let f=0;f!==o;++f){const h=s[f].createInterpolant(null);a[f]=h,h.settings=u}this._interpolantSettings=u,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=jT,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&&this.timeScale!==0&&this._startTime===null&&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,i){if(e.fadeOut(t),this.fadeIn(t),i){const r=this._clip.duration,s=e._clip.duration,o=s/r,a=r/s;e.warp(1,o,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,i){return e.crossFadeFrom(this,t,i)}stopFading(){const e=this._weightInterpolant;return e!==null&&(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,i){const r=this._mixer,s=r.time,o=this.timeScale;let a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);const u=a.parameterPositions,f=a.sampleValues;return u[0]=s,u[1]=s+i,f[0]=e/o,f[1]=t/o,this}stopWarping(){const e=this._timeScaleInterpolant;return e!==null&&(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,i,r){if(!this.enabled){this._updateWeight(e);return}const s=this._startTime;if(s!==null){const u=(e-s)*i;u<0||i===0?t=0:(this._startTime=null,t=i*u)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const u=this._interpolants,f=this._propertyBindings;switch(this.blendMode){case Sx:for(let h=0,d=u.length;h!==d;++h)u[h].evaluate(o),f[h].accumulateAdditive(a);break;case Km:default:for(let h=0,d=u.length;h!==d;++h)u[h].evaluate(o),f[h].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;const i=this._weightInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;const i=this._timeScaleInterpolant;if(i!==null){const r=i.evaluate(e)[0];t*=r,e>i.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){const t=this._clip.duration,i=this.loop;let r=this.time+e,s=this._loopCount;const o=i===KT;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===JT){s===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}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(s===-1&&(e>=0?(s=0,this._setEndings(!0,this.repetitions===0,o)):this._setEndings(this.repetitions===0,!0,o)),r>=t||r<0){const a=Math.floor(r/t);r-=t*a,s+=Math.abs(a);const u=this.repetitions-s;if(u<=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(u===1){const f=e<0;this._setEndings(f,!f,o)}else this._setEndings(!1,!1,o);this._loopCount=s,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(o&&(s&1)===1)return t-r}return r}_setEndings(e,t,i){const r=this._interpolantSettings;i?(r.endingStart=ha,r.endingEnd=ha):(e?r.endingStart=this.zeroSlopeAtStart?ha:fa:r.endingStart=tf,t?r.endingEnd=this.zeroSlopeAtEnd?ha:fa:r.endingEnd=tf)}_scheduleFading(e,t,i){const r=this._mixer,s=r.time;let o=this._weightInterpolant;o===null&&(o=r._lendControlInterpolant(),this._weightInterpolant=o);const a=o.parameterPositions,u=o.sampleValues;return a[0]=s,u[0]=t,a[1]=s+e,u[1]=i,this}}const tk=new Float32Array(1);class nk extends Pr{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){const i=e._localRoot||this._root,r=e._clip.tracks,s=r.length,o=e._propertyBindings,a=e._interpolants,u=i.uuid,f=this._bindingsByRootAndName;let h=f[u];h===void 0&&(h={},f[u]=h);for(let d=0;d!==s;++d){const p=r[d],v=p.name;let y=h[v];if(y!==void 0)++y.referenceCount,o[d]=y;else{if(y=o[d],y!==void 0){y._cacheIndex===null&&(++y.referenceCount,this._addInactiveBinding(y,u,v));continue}const M=t&&t._propertyBindings[d].binding.parsedPath;y=new lb(It.create(i,v,M),p.ValueTypeName,p.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,u,v),o[d]=y}a[d].resultBuffer=y.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){const i=(e._localRoot||this._root).uuid,r=e._clip.uuid,s=this._actionsByClip[r];this._bindAction(e,s&&s.knownActions[0]),this._addInactiveAction(e,r,i)}const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];s.useCount++===0&&(this._lendBinding(s),s.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){const t=e._propertyBindings;for(let i=0,r=t.length;i!==r;++i){const s=t[i];--s.useCount===0&&(s.restoreOriginalState(),this._takeBackBinding(s))}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 t!==null&&t=0;--i)e[i].stop();return this}update(e){e*=this.timeScale;const t=this._actions,i=this._nActiveActions,r=this.time+=e,s=Math.sign(e),o=this._accuIndex^=1;for(let f=0;f!==i;++f)t[f]._update(r,e,s,o);const a=this._bindings,u=this._nActiveBindings;for(let f=0;f!==u;++f)a[f].apply(o);return this}setTime(e){this.time=0;for(let t=0;t=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,_E).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 xE=new F,Fd=new F;class ck{constructor(e=new F,t=new F){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){xE.subVectors(e,this.start),Fd.subVectors(this.end,this.start);const i=Fd.dot(Fd);let s=Fd.dot(xE)/i;return t&&(s=pn(s,0,1)),s}closestPointToPoint(e,t,i){const r=this.closestPointToPointParameter(e,t);return this.delta(i).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 AE=new F;class uk extends Bt{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new _t,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 o=0,a=1,u=32;o1)for(let d=0;d.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{CE.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(CE,t)}}setLength(e,t=e*.2,i=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(i,t,i),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 Mk extends Ir{constructor(e=1){const t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],i=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new _t;r.setAttribute("position",new qe(t,3)),r.setAttribute("color",new qe(i,3));const s=new ri({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new Ie,s=this.geometry.attributes.color.array;return r.set(e),r.toArray(s,0),r.toArray(s,3),r.set(t),r.toArray(s,6),r.toArray(s,9),r.set(i),r.toArray(s,12),r.toArray(s,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class Ek{constructor(){this.type="ShapePath",this.color=new Ie,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new cf,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,i,r){return this.currentPath.quadraticCurveTo(e,t,i,r),this}bezierCurveTo(e,t,i,r,s,o){return this.currentPath.bezierCurveTo(e,t,i,r,s,o),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e){function t(g){const A=[];for(let S=0,w=g.length;SNumber.EPSILON){if(C<0&&(B=A[R],z=-z,D=A[P],C=-C),g.yD.y)continue;if(g.y===B.y){if(g.x===B.x)return!0}else{const b=C*(g.x-B.x)-z*(g.y-B.y);if(b===0)return!0;if(b<0)continue;w=!w}}else{if(g.y!==B.y)continue;if(D.x<=g.x&&g.x<=B.x||B.x<=g.x&&g.x<=D.x)return!0}}return w}const r=qr.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,u;const f=[];if(s.length===1)return a=s[0],u=new Ma,u.curves=a.curves,f.push(u),f;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let v=[],y=0,M;p[y]=void 0,v[y]=[];for(let g=0,A=s.length;g1){let g=!1,A=0;for(let S=0,w=p.length;S0&&g===!1&&(v=d)}let x;for(let g=0,A=p.length;g{const d=typeof f=="function"?f(e):f;if(d!==e){const p=e;e=h?d:Object.assign({},e,d),t.forEach(v=>v(e,p))}},r=()=>e,s=(f,h=r,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=h(e);function v(){const y=h(e);if(!d(p,y)){const M=p;f(p=y,M)}}return t.add(v),()=>t.delete(v)},u={setState:i,getState:r,subscribe:(f,h,d)=>h||d?s(f,h,d):(t.add(f),()=>t.delete(f)),destroy:()=>t.clear()};return e=n(i,r,u),u}const bk=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),TE=bk?Xe.useEffect:Xe.useLayoutEffect;function Bk(n){const e=typeof n=="function"?Rk(n):n,t=(i=e.getState,r=Object.is)=>{const[,s]=Xe.useReducer(x=>x+1,0),o=e.getState(),a=Xe.useRef(o),u=Xe.useRef(i),f=Xe.useRef(r),h=Xe.useRef(!1),d=Xe.useRef();d.current===void 0&&(d.current=i(o));let p,v=!1;(a.current!==o||u.current!==i||f.current!==r||h.current)&&(p=i(o),v=!r(d.current,p)),TE(()=>{v&&(d.current=p),a.current=o,u.current=i,f.current=r,h.current=!1});const y=Xe.useRef(o);TE(()=>{const x=()=>{try{const A=e.getState(),S=u.current(A);f.current(d.current,S)||(a.current=A,d.current=S,s())}catch{h.current=!0,s()}},g=e.subscribe(x);return e.getState()!==y.current&&x(),g},[]);const M=v?p:d.current;return Xe.useDebugValue(M),M};return Object.assign(t,e),t[Symbol.iterator]=function(){console.warn("[useStore, api] = create() is deprecated and will be removed in v4");const i=[t,e];return{next(){const r=i.length<=0;return{value:i.shift(),done:r}}}},t}const Pk=n=>typeof n=="object"&&typeof n.then=="function",ma=[];function db(n,e,t=(i,r)=>i===r){if(n===e)return!0;if(!n||!e)return!1;const i=n.length;if(e.length!==i)return!1;for(let r=0;r0&&(s.timeout&&clearTimeout(s.timeout),s.timeout=setTimeout(s.remove,i.lifespan)),s.response;if(!t)throw s.promise}const r={keys:e,equal:i.equal,remove:()=>{const s=ma.indexOf(r);s!==-1&&ma.splice(s,1)},promise:(Pk(n)?n:n(...e)).then(s=>{r.response=s,i.lifespan&&i.lifespan>0&&(r.timeout=setTimeout(r.remove,i.lifespan))}).catch(s=>r.error=s)};if(ma.push(r),!t)throw r.promise}const Ik=(n,e,t)=>pb(n,e,!1,t),Lk=(n,e,t)=>void pb(n,e,!0,t),Dk=n=>{if(n===void 0||n.length===0)ma.splice(0,ma.length);else{const e=ma.find(t=>db(n,t.keys,t.equal));e&&e.remove()}};var mb={exports:{}},Hv={exports:{}},Gv={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var RE;function Nk(){return RE||(RE=1,function(n){function e(L,V){var G=L.length;L.push(V);e:for(;0>>1,ye=L[q];if(0>>1;qr(pe,G))Eer(Ae,pe)?(L[q]=Ae,L[Ee]=G,q=Ee):(L[q]=pe,L[ie]=G,q=ie);else if(Eer(Ae,G))L[q]=Ae,L[Ee]=G,q=Ee;else break e}}return V}function r(L,V){var G=L.sortIndex-V.sortIndex;return G!==0?G:L.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var u=[],f=[],h=1,d=null,p=3,v=!1,y=!1,M=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(L){for(var V=t(f);V!==null;){if(V.callback===null)i(f);else if(V.startTime<=L)i(f),V.sortIndex=V.expirationTime,e(u,V);else break;V=t(f)}}function w(L){if(M=!1,S(L),!y)if(t(u)!==null)y=!0,Z(P);else{var V=t(f);V!==null&&ve(w,V.startTime-L)}}function P(L,V){y=!1,M&&(M=!1,g(D),D=-1),v=!0;var G=p;try{for(S(V),d=t(u);d!==null&&(!(d.expirationTime>V)||L&&!b());){var q=d.callback;if(typeof q=="function"){d.callback=null,p=d.priorityLevel;var ye=q(d.expirationTime<=V);V=n.unstable_now(),typeof ye=="function"?d.callback=ye:d===t(u)&&i(u),S(V)}else i(u);d=t(u)}if(d!==null)var Ne=!0;else{var ie=t(f);ie!==null&&ve(w,ie.startTime-V),Ne=!1}return Ne}finally{d=null,p=G,v=!1}}var R=!1,B=null,D=-1,z=5,C=-1;function b(){return!(n.unstable_now()-CL||125q?(L.sortIndex=G,e(f,L),t(u)===null&&L===t(f)&&(M?(g(D),D=-1):M=!0,ve(w,G-q))):(L.sortIndex=ye,e(u,L),y||v||(y=!0,Z(P))),L},n.unstable_shouldYield=b,n.unstable_wrapCallback=function(L){var V=p;return function(){var G=p;p=V;try{return L.apply(this,arguments)}finally{p=G}}}}(Gv)),Gv}var bE;function Fk(){return bE||(bE=1,Hv.exports=Nk()),Hv.exports}/** - * @license React - * react-reconciler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */var Uk=function(e){var t={},i=Xe,r=Fk(),s=Object.assign;function o(l){for(var c="https://reactjs.org/docs/error-decoder.html?invariant="+l,m=1;mX||E[k]!==T[X]){var ae=` -`+E[k].replace(" at new "," at ");return l.displayName&&ae.includes("")&&(ae=ae.replace("",l.displayName)),ae}while(1<=k&&0<=X);break}}}finally{ct=!1,Error.prepareStackTrace=m}return(l=l?l.displayName||l.name:"")?Ke(l):""}var et=Object.prototype.hasOwnProperty,Dt=[],Ot=-1;function Vt(l){return{current:l}}function wt(l){0>Ot||(l.current=Dt[Ot],Dt[Ot]=null,Ot--)}function nt(l,c){Ot++,Dt[Ot]=l.current,l.current=c}var Ze={},Pt=Vt(Ze),gt=Vt(!1),wn=Ze;function bi(l,c){var m=l.type.contextTypes;if(!m)return Ze;var _=l.stateNode;if(_&&_.__reactInternalMemoizedUnmaskedChildContext===c)return _.__reactInternalMemoizedMaskedChildContext;var E={},T;for(T in m)E[T]=c[T];return _&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=c,l.__reactInternalMemoizedMaskedChildContext=E),E}function Xt(l){return l=l.childContextTypes,l!=null}function Fs(){wt(gt),wt(Pt)}function $t(l,c,m){if(Pt.current!==Ze)throw Error(o(168));nt(Pt,c),nt(gt,m)}function hr(l,c,m){var _=l.stateNode;if(c=c.childContextTypes,typeof _.getChildContext!="function")return m;_=_.getChildContext();for(var E in _)if(!(E in c))throw Error(o(108,D(l)||"Unknown",E));return s({},m,_)}function Us(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||Ze,wn=Pt.current,nt(Pt,l),nt(gt,gt.current),!0}function oi(l,c,m){var _=l.stateNode;if(!_)throw Error(o(169));m?(l=hr(l,c,wn),_.__reactInternalMemoizedMergedChildContext=l,wt(gt),wt(Pt),nt(Pt,l)):wt(gt),nt(gt,m)}var ai=Math.clz32?Math.clz32:Hb,Ag=Math.log,Hf=Math.LN2;function Hb(l){return l>>>=0,l===0?32:31-(Ag(l)/Hf|0)|0}var Gf=64,Vf=4194304;function Mc(l){switch(l&-l){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 l&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return l&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return l}}function Wf(l,c){var m=l.pendingLanes;if(m===0)return 0;var _=0,E=l.suspendedLanes,T=l.pingedLanes,k=m&268435455;if(k!==0){var X=k&~E;X!==0?_=Mc(X):(T&=k,T!==0&&(_=Mc(T)))}else k=m&~E,k!==0?_=Mc(k):T!==0&&(_=Mc(T));if(_===0)return 0;if(c!==0&&c!==_&&!(c&E)&&(E=_&-_,T=c&-c,E>=T||E===16&&(T&4194240)!==0))return c;if(_&4&&(_|=m&16),c=l.entangledLanes,c!==0)for(l=l.entanglements,c&=_;0m;m++)c.push(l);return c}function Ec(l,c,m){l.pendingLanes|=c,c!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,c=31-ai(c),l[c]=m}function Wb(l,c){var m=l.pendingLanes&~c;l.pendingLanes=c,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=c,l.mutableReadLanes&=c,l.entangledLanes&=c,c=l.entanglements;var _=l.eventTimes;for(l=l.expirationTimes;0>=k,E-=k,is=1<<32-ai(c)+E|m<zt?(Dn=yt,yt=null):Dn=yt.sibling;var Ht=at(te,yt,oe[zt],ke);if(Ht===null){yt===null&&(yt=Dn);break}l&&yt&&Ht.alternate===null&&c(te,yt),Y=T(Ht,Y,zt),Et===null?tt=Ht:Et.sibling=Ht,Et=Ht,yt=Dn}if(zt===oe.length)return m(te,yt),en&&Lo(te,zt),tt;if(yt===null){for(;ztzt?(Dn=yt,yt=null):Dn=yt.sibling;var Xs=at(te,yt,Ht.value,ke);if(Xs===null){yt===null&&(yt=Dn);break}l&&yt&&Xs.alternate===null&&c(te,yt),Y=T(Xs,Y,zt),Et===null?tt=Xs:Et.sibling=Xs,Et=Xs,yt=Dn}if(Ht.done)return m(te,yt),en&&Lo(te,zt),tt;if(yt===null){for(;!Ht.done;zt++,Ht=oe.next())Ht=vt(te,Ht.value,ke),Ht!==null&&(Y=T(Ht,Y,zt),Et===null?tt=Ht:Et.sibling=Ht,Et=Ht);return en&&Lo(te,zt),tt}for(yt=_(te,yt);!Ht.done;zt++,Ht=oe.next())Ht=Jt(yt,te,zt,Ht.value,ke),Ht!==null&&(l&&Ht.alternate!==null&&yt.delete(Ht.key===null?zt:Ht.key),Y=T(Ht,Y,zt),Et===null?tt=Ht:Et.sibling=Ht,Et=Ht);return l&&yt.forEach(function(b2){return c(te,b2)}),en&&Lo(te,zt),tt}function er(te,Y,oe,ke){if(typeof oe=="object"&&oe!==null&&oe.type===h&&oe.key===null&&(oe=oe.props.children),typeof oe=="object"&&oe!==null){switch(oe.$$typeof){case u:e:{for(var tt=oe.key,Et=Y;Et!==null;){if(Et.key===tt){if(tt=oe.type,tt===h){if(Et.tag===7){m(te,Et.sibling),Y=E(Et,oe.props.children),Y.return=te,te=Y;break e}}else if(Et.elementType===tt||typeof tt=="object"&&tt!==null&&tt.$$typeof===S&&SA(tt)===Et.type){m(te,Et.sibling),Y=E(Et,oe.props),Y.ref=Tc(te,Et,oe),Y.return=te,te=Y;break e}m(te,Et);break}else c(te,Et);Et=Et.sibling}oe.type===h?(Y=zo(oe.props.children,te.mode,ke,oe.key),Y.return=te,te=Y):(ke=Ih(oe.type,oe.key,oe.props,null,te.mode,ke),ke.ref=Tc(te,Y,oe),ke.return=te,te=ke)}return k(te);case f:e:{for(Et=oe.key;Y!==null;){if(Y.key===Et)if(Y.tag===4&&Y.stateNode.containerInfo===oe.containerInfo&&Y.stateNode.implementation===oe.implementation){m(te,Y.sibling),Y=E(Y,oe.children||[]),Y.return=te,te=Y;break e}else{m(te,Y);break}else c(te,Y);Y=Y.sibling}Y=E0(oe,te.mode,ke),Y.return=te,te=Y}return k(te);case S:return Et=oe._init,er(te,Y,Et(oe._payload),ke)}if(ce(oe))return it(te,Y,oe,ke);if(R(oe))return Kn(te,Y,oe,ke);th(te,oe)}return typeof oe=="string"&&oe!==""||typeof oe=="number"?(oe=""+oe,Y!==null&&Y.tag===6?(m(te,Y.sibling),Y=E(Y,oe),Y.return=te,te=Y):(m(te,Y),Y=M0(oe,te.mode,ke),Y.return=te,te=Y),k(te)):m(te,Y)}return er}var qa=MA(!0),EA=MA(!1),Rc={},Qi=Vt(Rc),bc=Vt(Rc),$a=Vt(Rc);function zr(l){if(l===Rc)throw Error(o(174));return l}function Hg(l,c){nt($a,c),nt(bc,l),nt(Qi,Rc),l=ve(c),wt(Qi),nt(Qi,l)}function el(){wt(Qi),wt(bc),wt($a)}function wA(l){var c=zr($a.current),m=zr(Qi.current);c=L(m,l.type,c),m!==c&&(nt(bc,l),nt(Qi,c))}function Gg(l){bc.current===l&&(wt(Qi),wt(bc))}var rn=Vt(0);function nh(l){for(var c=l;c!==null;){if(c.tag===13){var m=c.memoizedState;if(m!==null&&(m=m.dehydrated,m===null||Wa(m)||Xa(m)))return c}else if(c.tag===19&&c.memoizedProps.revealOrder!==void 0){if(c.flags&128)return c}else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===l)break;for(;c.sibling===null;){if(c.return===null||c.return===l)return null;c=c.return}c.sibling.return=c.return,c=c.sibling}return null}var Vg=[];function Wg(){for(var l=0;lm?m:4,l(!0);var _=Zi.transition;Zi.transition={};try{l(!1),c()}finally{kt=m,Zi.transition=_}}function kA(){return Hr().memoizedState}function n2(l,c,m){var _=Gs(l);m={lane:_,action:m,hasEagerState:!1,eagerState:null,next:null},zA(l)?HA(c,m):(GA(l,c,m),m=ci(),l=qi(l,_,m),l!==null&&VA(l,c,_))}function i2(l,c,m){var _=Gs(l),E={lane:_,action:m,hasEagerState:!1,eagerState:null,next:null};if(zA(l))HA(c,E);else{GA(l,c,E);var T=l.alternate;if(l.lanes===0&&(T===null||T.lanes===0)&&(T=c.lastRenderedReducer,T!==null))try{var k=c.lastRenderedState,X=T(k,m);if(E.hasEagerState=!0,E.eagerState=X,Ur(X,k))return}catch{}finally{}m=ci(),l=qi(l,_,m),l!==null&&VA(l,c,_)}}function zA(l){var c=l.alternate;return l===fn||c!==null&&c===fn}function HA(l,c){Bc=rh=!0;var m=l.pending;m===null?c.next=c:(c.next=m.next,m.next=c),l.pending=c}function GA(l,c,m){xn!==null&&l.mode&1&&!(Ct&2)?(l=c.interleaved,l===null?(m.next=m,kr===null?kr=[c]:kr.push(c)):(m.next=l.next,l.next=m),c.interleaved=m):(l=c.pending,l===null?m.next=m:(m.next=l.next,l.next=m),c.pending=m)}function VA(l,c,m){if(m&4194240){var _=c.lanes;_&=l.pendingLanes,m|=_,c.lanes=m,Eg(l,m)}}var ch={readContext:ji,useCallback:Jn,useContext:Jn,useEffect:Jn,useImperativeHandle:Jn,useInsertionEffect:Jn,useLayoutEffect:Jn,useMemo:Jn,useReducer:Jn,useRef:Jn,useState:Jn,useDebugValue:Jn,useDeferredValue:Jn,useTransition:Jn,useMutableSource:Jn,useSyncExternalStore:Jn,useId:Jn,unstable_isNewReconciler:!1},r2={readContext:ji,useCallback:function(l,c){return ss().memoizedState=[l,c===void 0?null:c],l},useContext:ji,useEffect:Yg,useImperativeHandle:function(l,c,m){return m=m!=null?m.concat([l]):null,ah(4194308,4,NA.bind(null,c,l),m)},useLayoutEffect:function(l,c){return ah(4194308,4,l,c)},useInsertionEffect:function(l,c){return ah(4,2,l,c)},useMemo:function(l,c){var m=ss();return c=c===void 0?null:c,l=l(),m.memoizedState=[l,c],l},useReducer:function(l,c,m){var _=ss();return c=m!==void 0?m(c):c,_.memoizedState=_.baseState=c,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:c},_.queue=l,l=l.dispatch=n2.bind(null,fn,l),[_.memoizedState,l]},useRef:function(l){var c=ss();return l={current:l},c.memoizedState=l},useState:Kg,useDebugValue:Qg,useDeferredValue:function(l){var c=Kg(l),m=c[0],_=c[1];return Yg(function(){var E=Zi.transition;Zi.transition={};try{_(l)}finally{Zi.transition=E}},[l]),m},useTransition:function(){var l=Kg(!1),c=l[0];return l=t2.bind(null,l[1]),ss().memoizedState=l,[c,l]},useMutableSource:function(){},useSyncExternalStore:function(l,c,m){var _=fn,E=ss();if(en){if(m===void 0)throw Error(o(407));m=m()}else{if(m=c(),xn===null)throw Error(o(349));tl&30||RA(_,c,m)}E.memoizedState=m;var T={value:m,getSnapshot:c};return E.queue=T,Yg(BA.bind(null,_,T,l),[l]),_.flags|=2048,Ic(9,bA.bind(null,_,T,m,c),void 0,null),m},useId:function(){var l=ss(),c=xn.identifierPrefix;if(en){var m=rs,_=is;m=(_&~(1<<32-ai(_)-1)).toString(32)+m,c=":"+c+"R"+m,m=Pc++,0m0&&(c.flags|=128,_=!0,Fc(E,!1),c.lanes=4194304)}else{if(!_)if(l=nh(T),l!==null){if(c.flags|=128,_=!0,l=l.updateQueue,l!==null&&(c.updateQueue=l,c.flags|=4),Fc(E,!0),E.tail===null&&E.tailMode==="hidden"&&!T.alternate&&!en)return jn(c),null}else 2*In()-E.renderingStartTime>m0&&m!==1073741824&&(c.flags|=128,_=!0,Fc(E,!1),c.lanes=4194304);E.isBackwards?(T.sibling=c.child,c.child=T):(l=E.last,l!==null?l.sibling=T:c.child=T,E.last=T)}return E.tail!==null?(c=E.tail,E.rendering=c,E.tail=c.sibling,E.renderingStartTime=In(),c.sibling=null,l=rn.current,nt(rn,_?l&1|2:l&1),c):(jn(c),null);case 22:case 23:return x0(),_=c.memoizedState!==null,l!==null&&l.memoizedState!==null!==_&&(c.flags|=8192),_&&c.mode&1?Li&1073741824&&(jn(c),ot&&c.subtreeFlags&6&&(c.flags|=8192)):jn(c),null;case 24:return null;case 25:return null}throw Error(o(156,c.tag))}var c2=a.ReactCurrentOwner,Ii=!1;function li(l,c,m,_){c.child=l===null?EA(c,null,m,_):qa(c,l.child,m,_)}function ZA(l,c,m,_,E){m=m.render;var T=c.ref;return Ka(c,E),_=Jg(l,c,m,_,T,E),m=jg(),l!==null&&!Ii?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~E,os(l,c,E)):(en&&m&&Fg(c),c.flags|=1,li(l,c,_,E),c.child)}function qA(l,c,m,_,E){if(l===null){var T=m.type;return typeof T=="function"&&!S0(T)&&T.defaultProps===void 0&&m.compare===null&&m.defaultProps===void 0?(c.tag=15,c.type=T,$A(l,c,T,_,E)):(l=Ih(m.type,null,_,c,c.mode,E),l.ref=c.ref,l.return=c,c.child=l)}if(T=l.child,!(l.lanes&E)){var k=T.memoizedProps;if(m=m.compare,m=m!==null?m:jf,m(k,_)&&l.ref===c.ref)return os(l,c,E)}return c.flags|=1,l=Ws(T,_),l.ref=c.ref,l.return=c,c.child=l}function $A(l,c,m,_,E){if(l!==null&&jf(l.memoizedProps,_)&&l.ref===c.ref)if(Ii=!1,(l.lanes&E)!==0)l.flags&131072&&(Ii=!0);else return c.lanes=l.lanes,os(l,c,E);return $g(l,c,m,_,E)}function eS(l,c,m){var _=c.pendingProps,E=_.children,T=l!==null?l.memoizedState:null;if(_.mode==="hidden")if(!(c.mode&1))c.memoizedState={baseLanes:0,cachePool:null},nt(nl,Li),Li|=m;else if(m&1073741824)c.memoizedState={baseLanes:0,cachePool:null},_=T!==null?T.baseLanes:m,nt(nl,Li),Li|=_;else return l=T!==null?T.baseLanes|m:m,c.lanes=c.childLanes=1073741824,c.memoizedState={baseLanes:l,cachePool:null},c.updateQueue=null,nt(nl,Li),Li|=l,null;else T!==null?(_=T.baseLanes|m,c.memoizedState=null):_=m,nt(nl,Li),Li|=_;return li(l,c,E,m),c.child}function tS(l,c){var m=c.ref;(l===null&&m!==null||l!==null&&l.ref!==m)&&(c.flags|=512,c.flags|=2097152)}function $g(l,c,m,_,E){var T=Xt(m)?wn:Pt.current;return T=bi(c,T),Ka(c,E),m=Jg(l,c,m,_,T,E),_=jg(),l!==null&&!Ii?(c.updateQueue=l.updateQueue,c.flags&=-2053,l.lanes&=~E,os(l,c,E)):(en&&_&&Fg(c),c.flags|=1,li(l,c,m,E),c.child)}function nS(l,c,m,_,E){if(Xt(m)){var T=!0;Us(c)}else T=!1;if(Ka(c,E),c.stateNode===null)l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),gA(c,m,_),Ng(c,m,_,E),_=!0;else if(l===null){var k=c.stateNode,X=c.memoizedProps;k.props=X;var ae=k.context,Ce=m.contextType;typeof Ce=="object"&&Ce!==null?Ce=ji(Ce):(Ce=Xt(m)?wn:Pt.current,Ce=bi(c,Ce));var Ye=m.getDerivedStateFromProps,vt=typeof Ye=="function"||typeof k.getSnapshotBeforeUpdate=="function";vt||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(X!==_||ae!==Ce)&&vA(c,k,_,Ce),Os=!1;var at=c.memoizedState;k.state=at,Zf(c,_,k,E),ae=c.memoizedState,X!==_||at!==ae||gt.current||Os?(typeof Ye=="function"&&(Dg(c,m,Ye,_),ae=c.memoizedState),(X=Os||mA(c,m,X,_,at,ae,Ce))?(vt||typeof k.UNSAFE_componentWillMount!="function"&&typeof k.componentWillMount!="function"||(typeof k.componentWillMount=="function"&&k.componentWillMount(),typeof k.UNSAFE_componentWillMount=="function"&&k.UNSAFE_componentWillMount()),typeof k.componentDidMount=="function"&&(c.flags|=4194308)):(typeof k.componentDidMount=="function"&&(c.flags|=4194308),c.memoizedProps=_,c.memoizedState=ae),k.props=_,k.state=ae,k.context=Ce,_=X):(typeof k.componentDidMount=="function"&&(c.flags|=4194308),_=!1)}else{k=c.stateNode,fA(l,c),X=c.memoizedProps,Ce=c.type===c.elementType?X:dr(c.type,X),k.props=Ce,vt=c.pendingProps,at=k.context,ae=m.contextType,typeof ae=="object"&&ae!==null?ae=ji(ae):(ae=Xt(m)?wn:Pt.current,ae=bi(c,ae));var Jt=m.getDerivedStateFromProps;(Ye=typeof Jt=="function"||typeof k.getSnapshotBeforeUpdate=="function")||typeof k.UNSAFE_componentWillReceiveProps!="function"&&typeof k.componentWillReceiveProps!="function"||(X!==vt||at!==ae)&&vA(c,k,_,ae),Os=!1,at=c.memoizedState,k.state=at,Zf(c,_,k,E);var it=c.memoizedState;X!==vt||at!==it||gt.current||Os?(typeof Jt=="function"&&(Dg(c,m,Jt,_),it=c.memoizedState),(Ce=Os||mA(c,m,Ce,_,at,it,ae)||!1)?(Ye||typeof k.UNSAFE_componentWillUpdate!="function"&&typeof k.componentWillUpdate!="function"||(typeof k.componentWillUpdate=="function"&&k.componentWillUpdate(_,it,ae),typeof k.UNSAFE_componentWillUpdate=="function"&&k.UNSAFE_componentWillUpdate(_,it,ae)),typeof k.componentDidUpdate=="function"&&(c.flags|=4),typeof k.getSnapshotBeforeUpdate=="function"&&(c.flags|=1024)):(typeof k.componentDidUpdate!="function"||X===l.memoizedProps&&at===l.memoizedState||(c.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||X===l.memoizedProps&&at===l.memoizedState||(c.flags|=1024),c.memoizedProps=_,c.memoizedState=it),k.props=_,k.state=it,k.context=ae,_=Ce):(typeof k.componentDidUpdate!="function"||X===l.memoizedProps&&at===l.memoizedState||(c.flags|=4),typeof k.getSnapshotBeforeUpdate!="function"||X===l.memoizedProps&&at===l.memoizedState||(c.flags|=1024),_=!1)}return e0(l,c,m,_,T,E)}function e0(l,c,m,_,E,T){tS(l,c);var k=(c.flags&128)!==0;if(!_&&!k)return E&&oi(c,m,!1),os(l,c,T);_=c.stateNode,c2.current=c;var X=k&&typeof m.getDerivedStateFromError!="function"?null:_.render();return c.flags|=1,l!==null&&k?(c.child=qa(c,l.child,null,T),c.child=qa(c,null,X,T)):li(l,c,X,T),c.memoizedState=_.state,E&&oi(c,m,!0),c.child}function iS(l){var c=l.stateNode;c.pendingContext?$t(l,c.pendingContext,c.pendingContext!==c.context):c.context&&$t(l,c.context,!1),Hg(l,c.containerInfo)}function rS(l,c,m,_,E){return Za(),zg(E),c.flags|=256,li(l,c,m,_),c.child}var hh={dehydrated:null,treeContext:null,retryLane:0};function dh(l){return{baseLanes:l,cachePool:null}}function sS(l,c,m){var _=c.pendingProps,E=rn.current,T=!1,k=(c.flags&128)!==0,X;if((X=k)||(X=l!==null&&l.memoizedState===null?!1:(E&2)!==0),X?(T=!0,c.flags&=-129):(l===null||l.memoizedState!==null)&&(E|=1),nt(rn,E&1),l===null)return kg(c),l=c.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?(c.mode&1?Xa(l)?c.lanes=8:c.lanes=1073741824:c.lanes=1,null):(E=_.children,l=_.fallback,T?(_=c.mode,T=c.child,E={mode:"hidden",children:E},!(_&1)&&T!==null?(T.childLanes=0,T.pendingProps=E):T=Lh(E,_,0,null),l=zo(l,_,m,null),T.return=c,l.return=c,T.sibling=l,c.child=T,c.child.memoizedState=dh(m),c.memoizedState=hh,l):t0(c,E));if(E=l.memoizedState,E!==null){if(X=E.dehydrated,X!==null){if(k)return c.flags&256?(c.flags&=-257,ph(l,c,m,Error(o(422)))):c.memoizedState!==null?(c.child=l.child,c.flags|=128,null):(T=_.fallback,E=c.mode,_=Lh({mode:"visible",children:_.children},E,0,null),T=zo(T,E,m,null),T.flags|=2,_.return=c,T.return=c,_.sibling=T,c.child=_,c.mode&1&&qa(c,l.child,null,m),c.child.memoizedState=dh(m),c.memoizedState=hh,T);if(!(c.mode&1))c=ph(l,c,m,null);else if(Xa(X))c=ph(l,c,m,Error(o(419)));else if(_=(m&l.childLanes)!==0,Ii||_){if(_=xn,_!==null){switch(m&-m){case 4:T=2;break;case 16:T=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:T=32;break;case 536870912:T=268435456;break;default:T=0}_=T&(_.suspendedLanes|m)?0:T,_!==0&&_!==E.retryLane&&(E.retryLane=_,qi(l,_,-1))}A0(),c=ph(l,c,m,Error(o(421)))}else Wa(X)?(c.flags|=128,c.child=l.child,c=S2.bind(null,l),Uf(X,c),c=null):(m=E.treeContext,O&&(Pi=kf(X),Bi=c,en=!0,pr=null,wc=!1,m!==null&&(Ki[Yi++]=is,Ki[Yi++]=rs,Ki[Yi++]=Io,is=m.id,rs=m.overflow,Io=c)),c=t0(c,c.pendingProps.children),c.flags|=4096);return c}return T?(_=aS(l,c,_.children,_.fallback,m),T=c.child,E=l.child.memoizedState,T.memoizedState=E===null?dh(m):{baseLanes:E.baseLanes|m,cachePool:null},T.childLanes=l.childLanes&~m,c.memoizedState=hh,_):(m=oS(l,c,_.children,m),c.memoizedState=null,m)}return T?(_=aS(l,c,_.children,_.fallback,m),T=c.child,E=l.child.memoizedState,T.memoizedState=E===null?dh(m):{baseLanes:E.baseLanes|m,cachePool:null},T.childLanes=l.childLanes&~m,c.memoizedState=hh,_):(m=oS(l,c,_.children,m),c.memoizedState=null,m)}function t0(l,c){return c=Lh({mode:"visible",children:c},l.mode,0,null),c.return=l,l.child=c}function oS(l,c,m,_){var E=l.child;return l=E.sibling,m=Ws(E,{mode:"visible",children:m}),!(c.mode&1)&&(m.lanes=_),m.return=c,m.sibling=null,l!==null&&(_=c.deletions,_===null?(c.deletions=[l],c.flags|=16):_.push(l)),c.child=m}function aS(l,c,m,_,E){var T=c.mode;l=l.child;var k=l.sibling,X={mode:"hidden",children:m};return!(T&1)&&c.child!==l?(m=c.child,m.childLanes=0,m.pendingProps=X,c.deletions=null):(m=Ws(l,X),m.subtreeFlags=l.subtreeFlags&14680064),k!==null?_=Ws(k,_):(_=zo(_,T,E,null),_.flags|=2),_.return=c,m.return=c,m.sibling=_,c.child=m,_}function ph(l,c,m,_){return _!==null&&zg(_),qa(c,l.child,null,m),l=t0(c,c.pendingProps.children),l.flags|=2,c.memoizedState=null,l}function lS(l,c,m){l.lanes|=c;var _=l.alternate;_!==null&&(_.lanes|=c),Ig(l.return,c,m)}function n0(l,c,m,_,E){var T=l.memoizedState;T===null?l.memoizedState={isBackwards:c,rendering:null,renderingStartTime:0,last:_,tail:m,tailMode:E}:(T.isBackwards=c,T.rendering=null,T.renderingStartTime=0,T.last=_,T.tail=m,T.tailMode=E)}function cS(l,c,m){var _=c.pendingProps,E=_.revealOrder,T=_.tail;if(li(l,c,_.children,m),_=rn.current,_&2)_=_&1|2,c.flags|=128;else{if(l!==null&&l.flags&128)e:for(l=c.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&lS(l,m,c);else if(l.tag===19)lS(l,m,c);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===c)break e;for(;l.sibling===null;){if(l.return===null||l.return===c)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}_&=1}if(nt(rn,_),!(c.mode&1))c.memoizedState=null;else switch(E){case"forwards":for(m=c.child,E=null;m!==null;)l=m.alternate,l!==null&&nh(l)===null&&(E=m),m=m.sibling;m=E,m===null?(E=c.child,c.child=null):(E=m.sibling,m.sibling=null),n0(c,!1,E,m,T);break;case"backwards":for(m=null,E=c.child,c.child=null;E!==null;){if(l=E.alternate,l!==null&&nh(l)===null){c.child=E;break}l=E.sibling,E.sibling=m,m=E,E=l}n0(c,!0,m,null,T);break;case"together":n0(c,!1,null,null,void 0);break;default:c.memoizedState=null}return c.child}function os(l,c,m){if(l!==null&&(c.dependencies=l.dependencies),il|=c.lanes,!(m&c.childLanes))return null;if(l!==null&&c.child!==l.child)throw Error(o(153));if(c.child!==null){for(l=c.child,m=Ws(l,l.pendingProps),c.child=m,m.return=c;l.sibling!==null;)l=l.sibling,m=m.sibling=Ws(l,l.pendingProps),m.return=c;m.sibling=null}return c.child}function u2(l,c,m){switch(c.tag){case 3:iS(c),Za();break;case 5:wA(c);break;case 1:Xt(c.type)&&Us(c);break;case 4:Hg(c,c.stateNode.containerInfo);break;case 10:uA(c,c.type._context,c.memoizedProps.value);break;case 13:var _=c.memoizedState;if(_!==null)return _.dehydrated!==null?(nt(rn,rn.current&1),c.flags|=128,null):m&c.child.childLanes?sS(l,c,m):(nt(rn,rn.current&1),l=os(l,c,m),l!==null?l.sibling:null);nt(rn,rn.current&1);break;case 19:if(_=(m&c.childLanes)!==0,l.flags&128){if(_)return cS(l,c,m);c.flags|=128}var E=c.memoizedState;if(E!==null&&(E.rendering=null,E.tail=null,E.lastEffect=null),nt(rn,rn.current),_)break;return null;case 22:case 23:return c.lanes=0,eS(l,c,m)}return os(l,c,m)}function f2(l,c){switch(Ug(c),c.tag){case 1:return Xt(c.type)&&Fs(),l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 3:return el(),wt(gt),wt(Pt),Wg(),l=c.flags,l&65536&&!(l&128)?(c.flags=l&-65537|128,c):null;case 5:return Gg(c),null;case 13:if(wt(rn),l=c.memoizedState,l!==null&&l.dehydrated!==null){if(c.alternate===null)throw Error(o(340));Za()}return l=c.flags,l&65536?(c.flags=l&-65537|128,c):null;case 19:return wt(rn),null;case 4:return el(),null;case 10:return Pg(c.type._context),null;case 22:case 23:return x0(),null;case 24:return null;default:return null}}var mh=!1,No=!1,h2=typeof WeakSet=="function"?WeakSet:Set,Fe=null;function gh(l,c){var m=l.ref;if(m!==null)if(typeof m=="function")try{m(null)}catch(_){xi(l,c,_)}else m.current=null}function i0(l,c,m){try{m()}catch(_){xi(l,c,_)}}var uS=!1;function d2(l,c){for(V(l.containerInfo),Fe=c;Fe!==null;)if(l=Fe,c=l.child,(l.subtreeFlags&1028)!==0&&c!==null)c.return=l,Fe=c;else for(;Fe!==null;){l=Fe;try{var m=l.alternate;if(l.flags&1024)switch(l.tag){case 0:case 11:case 15:break;case 1:if(m!==null){var _=m.memoizedProps,E=m.memoizedState,T=l.stateNode,k=T.getSnapshotBeforeUpdate(l.elementType===l.type?_:dr(l.type,_),E);T.__reactInternalSnapshotBeforeUpdate=k}break;case 3:ot&&Ue(l.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(X){xi(l,l.return,X)}if(c=l.sibling,c!==null){c.return=l.return,Fe=c;break}Fe=l.return}return m=uS,uS=!1,m}function Fo(l,c,m){var _=c.updateQueue;if(_=_!==null?_.lastEffect:null,_!==null){var E=_=_.next;do{if((E.tag&l)===l){var T=E.destroy;E.destroy=void 0,T!==void 0&&i0(c,m,T)}E=E.next}while(E!==_)}}function Uc(l,c){if(c=c.updateQueue,c=c!==null?c.lastEffect:null,c!==null){var m=c=c.next;do{if((m.tag&l)===l){var _=m.create;m.destroy=_()}m=m.next}while(m!==c)}}function r0(l){var c=l.ref;if(c!==null){var m=l.stateNode;switch(l.tag){case 5:l=Z(m);break;default:l=m}typeof c=="function"?c(l):c.current=l}}function fS(l,c,m){if(Fr&&typeof Fr.onCommitFiberUnmount=="function")try{Fr.onCommitFiberUnmount(Xf,c)}catch{}switch(c.tag){case 0:case 11:case 14:case 15:if(l=c.updateQueue,l!==null&&(l=l.lastEffect,l!==null)){var _=l=l.next;do{var E=_,T=E.destroy;E=E.tag,T!==void 0&&(E&2||E&4)&&i0(c,m,T),_=_.next}while(_!==l)}break;case 1:if(gh(c,m),l=c.stateNode,typeof l.componentWillUnmount=="function")try{l.props=c.memoizedProps,l.state=c.memoizedState,l.componentWillUnmount()}catch(k){xi(c,m,k)}break;case 5:gh(c,m);break;case 4:ot?vS(l,c,m):me&&me&&(c=c.stateNode.containerInfo,m=mt(c),Mt(c,m))}}function hS(l,c,m){for(var _=c;;)if(fS(l,_,m),_.child===null||ot&&_.tag===4){if(_===c)break;for(;_.sibling===null;){if(_.return===null||_.return===c)return;_=_.return}_.sibling.return=_.return,_=_.sibling}else _.child.return=_,_=_.child}function dS(l){var c=l.alternate;c!==null&&(l.alternate=null,dS(c)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(c=l.stateNode,c!==null&&Be(c)),l.stateNode=null,l.return=null,l.dependencies=null,l.memoizedProps=null,l.memoizedState=null,l.pendingProps=null,l.stateNode=null,l.updateQueue=null}function pS(l){return l.tag===5||l.tag===3||l.tag===4}function mS(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||pS(l.return))return null;l=l.return}for(l.sibling.return=l.return,l=l.sibling;l.tag!==5&&l.tag!==6&&l.tag!==18;){if(l.flags&2||l.child===null||l.tag===4)continue e;l.child.return=l,l=l.child}if(!(l.flags&2))return l.stateNode}}function gS(l){if(ot){e:{for(var c=l.return;c!==null;){if(pS(c))break e;c=c.return}throw Error(o(160))}var m=c;switch(m.tag){case 5:c=m.stateNode,m.flags&32&&(Le(c),m.flags&=-33),m=mS(l),o0(l,m,c);break;case 3:case 4:c=m.stateNode.containerInfo,m=mS(l),s0(l,m,c);break;default:throw Error(o(161))}}}function s0(l,c,m){var _=l.tag;if(_===5||_===6)l=l.stateNode,c?We(m,l,c):Tt(m,l);else if(_!==4&&(l=l.child,l!==null))for(s0(l,c,m),l=l.sibling;l!==null;)s0(l,c,m),l=l.sibling}function o0(l,c,m){var _=l.tag;if(_===5||_===6)l=l.stateNode,c?ft(m,l,c):Ge(m,l);else if(_!==4&&(l=l.child,l!==null))for(o0(l,c,m),l=l.sibling;l!==null;)o0(l,c,m),l=l.sibling}function vS(l,c,m){for(var _=c,E=!1,T,k;;){if(!E){E=_.return;e:for(;;){if(E===null)throw Error(o(160));switch(T=E.stateNode,E.tag){case 5:k=!1;break e;case 3:T=T.containerInfo,k=!0;break e;case 4:T=T.containerInfo,k=!0;break e}E=E.return}E=!0}if(_.tag===5||_.tag===6)hS(l,_,m),k?le(T,_.stateNode):W(T,_.stateNode);else if(_.tag===18)k?re(T,_.stateNode):ne(T,_.stateNode);else if(_.tag===4){if(_.child!==null){T=_.stateNode.containerInfo,k=!0,_.child.return=_,_=_.child;continue}}else if(fS(l,_,m),_.child!==null){_.child.return=_,_=_.child;continue}if(_===c)break;for(;_.sibling===null;){if(_.return===null||_.return===c)return;_=_.return,_.tag===4&&(E=!1)}_.sibling.return=_.return,_=_.sibling}}function a0(l,c){if(ot){switch(c.tag){case 0:case 11:case 14:case 15:Fo(3,c,c.return),Uc(3,c),Fo(5,c,c.return);return;case 1:return;case 5:var m=c.stateNode;if(m!=null){var _=c.memoizedProps;l=l!==null?l.memoizedProps:_;var E=c.type,T=c.updateQueue;c.updateQueue=null,T!==null&&dt(m,T,E,l,_,c)}return;case 6:if(c.stateNode===null)throw Error(o(162));m=c.memoizedProps,Se(c.stateNode,l!==null?l.memoizedProps:m,m);return;case 3:O&&l!==null&&l.memoizedState.isDehydrated&&N(c.stateNode.containerInfo);return;case 12:return;case 13:vh(c);return;case 19:vh(c);return;case 17:return}throw Error(o(163))}switch(c.tag){case 0:case 11:case 14:case 15:Fo(3,c,c.return),Uc(3,c),Fo(5,c,c.return);return;case 12:return;case 13:vh(c);return;case 19:vh(c);return;case 3:O&&l!==null&&l.memoizedState.isDehydrated&&N(c.stateNode.containerInfo);break;case 22:case 23:return}e:if(me){switch(c.tag){case 1:case 5:case 6:break e;case 3:case 4:c=c.stateNode,Mt(c.containerInfo,c.pendingChildren);break e}throw Error(o(163))}}function vh(l){var c=l.updateQueue;if(c!==null){l.updateQueue=null;var m=l.stateNode;m===null&&(m=l.stateNode=new h2),c.forEach(function(_){var E=M2.bind(null,l,_);m.has(_)||(m.add(_),_.then(E,E))})}}function p2(l,c){for(Fe=c;Fe!==null;){c=Fe;var m=c.deletions;if(m!==null)for(var _=0;_";case _h:return":has("+(u0(l)||"")+")";case xh:return'[role="'+l.value+'"]';case Sh:return'"'+l.value+'"';case Ah:return'[data-testname="'+l.value+'"]';default:throw Error(o(365))}}function SS(l,c){var m=[];l=[l,0];for(var _=0;_E&&(E=k),_&=~T}if(_=E,_=In()-_,_=(120>_?120:480>_?480:1080>_?1080:1920>_?1920:3e3>_?3e3:4320>_?4320:1960*g2(_/1960))-_,10<_){l.timeoutHandle=Ae(Oo.bind(null,l,yi),_);break}Oo(l,yi);break;case 5:Oo(l,yi);break;default:throw Error(o(329))}}}return _i(l,In()),l.callbackNode===m?MS.bind(null,l):null}function y0(l,c){var m=zc;return l.current.memoizedState.isDehydrated&&(Uo(l,c).flags|=256),l=Ph(l,c),l!==2&&(c=yi,yi=m,c!==null&&_0(c)),l}function _0(l){yi===null?yi=l:yi.push.apply(yi,l)}function v2(l){for(var c=l;;){if(c.flags&16384){var m=c.updateQueue;if(m!==null&&(m=m.stores,m!==null))for(var _=0;_l?16:l,Hs===null)var _=!1;else{if(l=Hs,Hs=null,Th=0,Ct&6)throw Error(o(331));var E=Ct;for(Ct|=4,Fe=l.current;Fe!==null;){var T=Fe,k=T.child;if(Fe.flags&16){var X=T.deletions;if(X!==null){for(var ae=0;aeIn()-p0?Uo(l,0):d0|=m),_i(l,c)}function PS(l,c){c===0&&(l.mode&1?(c=Vf,Vf<<=1,!(Vf&130023424)&&(Vf=4194304)):c=1);var m=ci();l=Bh(l,c),l!==null&&(Ec(l,c,m),_i(l,m))}function S2(l){var c=l.memoizedState,m=0;c!==null&&(m=c.retryLane),PS(l,m)}function M2(l,c){var m=0;switch(l.tag){case 13:var _=l.stateNode,E=l.memoizedState;E!==null&&(m=E.retryLane);break;case 19:_=l.stateNode;break;default:throw Error(o(314))}_!==null&&_.delete(c),PS(l,m)}var IS;IS=function(l,c,m){if(l!==null)if(l.memoizedProps!==c.pendingProps||gt.current)Ii=!0;else{if(!(l.lanes&m)&&!(c.flags&128))return Ii=!1,u2(l,c,m);Ii=!!(l.flags&131072)}else Ii=!1,en&&c.flags&1048576&&yA(c,eh,c.index);switch(c.lanes=0,c.tag){case 2:var _=c.type;l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),l=c.pendingProps;var E=bi(c,Pt.current);Ka(c,m),E=Jg(null,c,_,l,E,m);var T=jg();return c.flags|=1,typeof E=="object"&&E!==null&&typeof E.render=="function"&&E.$$typeof===void 0?(c.tag=1,c.memoizedState=null,c.updateQueue=null,Xt(_)?(T=!0,Us(c)):T=!1,c.memoizedState=E.state!==null&&E.state!==void 0?E.state:null,Lg(c),E.updater=qf,c.stateNode=E,E._reactInternals=c,Ng(c,_,l,m),c=e0(null,c,_,!0,T,m)):(c.tag=0,en&&T&&Fg(c),li(null,c,E,m),c=c.child),c;case 16:_=c.elementType;e:{switch(l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),l=c.pendingProps,E=_._init,_=E(_._payload),c.type=_,E=c.tag=w2(_),l=dr(_,l),E){case 0:c=$g(null,c,_,l,m);break e;case 1:c=nS(null,c,_,l,m);break e;case 11:c=ZA(null,c,_,l,m);break e;case 14:c=qA(null,c,_,dr(_.type,l),m);break e}throw Error(o(306,_,""))}return c;case 0:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:dr(_,E),$g(l,c,_,E,m);case 1:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:dr(_,E),nS(l,c,_,E,m);case 3:e:{if(iS(c),l===null)throw Error(o(387));_=c.pendingProps,T=c.memoizedState,E=T.element,fA(l,c),Zf(c,_,null,m);var k=c.memoizedState;if(_=k.element,O&&T.isDehydrated)if(T={element:_,isDehydrated:!1,cache:k.cache,transitions:k.transitions},c.updateQueue.baseState=T,c.memoizedState=T,c.flags&256){E=Error(o(423)),c=rS(l,c,_,m,E);break e}else if(_!==E){E=Error(o(424)),c=rS(l,c,_,m,E);break e}else for(O&&(Pi=Ja(c.stateNode.containerInfo),Bi=c,en=!0,pr=null,wc=!1),m=EA(c,null,_,m),c.child=m;m;)m.flags=m.flags&-3|4096,m=m.sibling;else{if(Za(),_===E){c=os(l,c,m);break e}li(l,c,_,m)}c=c.child}return c;case 5:return wA(c),l===null&&kg(c),_=c.type,E=c.pendingProps,T=l!==null?l.memoizedProps:null,k=E.children,pe(_,E)?k=null:T!==null&&pe(_,T)&&(c.flags|=32),tS(l,c),li(l,c,k,m),c.child;case 6:return l===null&&kg(c),null;case 13:return sS(l,c,m);case 4:return Hg(c,c.stateNode.containerInfo),_=c.pendingProps,l===null?c.child=qa(c,null,_,m):li(l,c,_,m),c.child;case 11:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:dr(_,E),ZA(l,c,_,E,m);case 7:return li(l,c,c.pendingProps,m),c.child;case 8:return li(l,c,c.pendingProps.children,m),c.child;case 12:return li(l,c,c.pendingProps.children,m),c.child;case 10:e:{if(_=c.type._context,E=c.pendingProps,T=c.memoizedProps,k=E.value,uA(c,_,k),T!==null)if(Ur(T.value,k)){if(T.children===E.children&&!gt.current){c=os(l,c,m);break e}}else for(T=c.child,T!==null&&(T.return=c);T!==null;){var X=T.dependencies;if(X!==null){k=T.child;for(var ae=X.firstContext;ae!==null;){if(ae.context===_){if(T.tag===1){ae=ns(-1,m&-m),ae.tag=2;var Ce=T.updateQueue;if(Ce!==null){Ce=Ce.shared;var Ye=Ce.pending;Ye===null?ae.next=ae:(ae.next=Ye.next,Ye.next=ae),Ce.pending=ae}}T.lanes|=m,ae=T.alternate,ae!==null&&(ae.lanes|=m),Ig(T.return,m,c),X.lanes|=m;break}ae=ae.next}}else if(T.tag===10)k=T.type===c.type?null:T.child;else if(T.tag===18){if(k=T.return,k===null)throw Error(o(341));k.lanes|=m,X=k.alternate,X!==null&&(X.lanes|=m),Ig(k,m,c),k=T.sibling}else k=T.child;if(k!==null)k.return=T;else for(k=T;k!==null;){if(k===c){k=null;break}if(T=k.sibling,T!==null){T.return=k.return,k=T;break}k=k.return}T=k}li(l,c,E.children,m),c=c.child}return c;case 9:return E=c.type,_=c.pendingProps.children,Ka(c,m),E=ji(E),_=_(E),c.flags|=1,li(l,c,_,m),c.child;case 14:return _=c.type,E=dr(_,c.pendingProps),E=dr(_.type,E),qA(l,c,_,E,m);case 15:return $A(l,c,c.type,c.pendingProps,m);case 17:return _=c.type,E=c.pendingProps,E=c.elementType===_?E:dr(_,E),l!==null&&(l.alternate=null,c.alternate=null,c.flags|=2),c.tag=1,Xt(_)?(l=!0,Us(c)):l=!1,Ka(c,m),gA(c,_,E),Ng(c,_,E,m),e0(null,c,_,!0,l,m);case 19:return cS(l,c,m);case 22:return eS(l,c,m)}throw Error(o(156,c.tag))};function LS(l,c){return wg(l,c)}function E2(l,c,m,_){this.tag=l,this.key=m,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=c,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=_,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function $i(l,c,m,_){return new E2(l,c,m,_)}function S0(l){return l=l.prototype,!(!l||!l.isReactComponent)}function w2(l){if(typeof l=="function")return S0(l)?1:0;if(l!=null){if(l=l.$$typeof,l===M)return 11;if(l===A)return 14}return 2}function Ws(l,c){var m=l.alternate;return m===null?(m=$i(l.tag,c,l.key,l.mode),m.elementType=l.elementType,m.type=l.type,m.stateNode=l.stateNode,m.alternate=l,l.alternate=m):(m.pendingProps=c,m.type=l.type,m.flags=0,m.subtreeFlags=0,m.deletions=null),m.flags=l.flags&14680064,m.childLanes=l.childLanes,m.lanes=l.lanes,m.child=l.child,m.memoizedProps=l.memoizedProps,m.memoizedState=l.memoizedState,m.updateQueue=l.updateQueue,c=l.dependencies,m.dependencies=c===null?null:{lanes:c.lanes,firstContext:c.firstContext},m.sibling=l.sibling,m.index=l.index,m.ref=l.ref,m}function Ih(l,c,m,_,E,T){var k=2;if(_=l,typeof l=="function")S0(l)&&(k=1);else if(typeof l=="string")k=5;else e:switch(l){case h:return zo(m.children,E,T,c);case d:k=8,E|=8;break;case p:return l=$i(12,m,c,E|2),l.elementType=p,l.lanes=T,l;case x:return l=$i(13,m,c,E),l.elementType=x,l.lanes=T,l;case g:return l=$i(19,m,c,E),l.elementType=g,l.lanes=T,l;case w:return Lh(m,E,T,c);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case v:k=10;break e;case y:k=9;break e;case M:k=11;break e;case A:k=14;break e;case S:k=16,_=null;break e}throw Error(o(130,l==null?l:typeof l,""))}return c=$i(k,m,c,E),c.elementType=l,c.type=_,c.lanes=T,c}function zo(l,c,m,_){return l=$i(7,l,_,c),l.lanes=m,l}function Lh(l,c,m,_){return l=$i(22,l,_,c),l.elementType=w,l.lanes=m,l.stateNode={},l}function M0(l,c,m){return l=$i(6,l,null,c),l.lanes=m,l}function E0(l,c,m){return c=$i(4,l.children!==null?l.children:[],l.key,c),c.lanes=m,c.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},c}function C2(l,c,m,_,E){this.tag=c,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=st,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=Mg(0),this.expirationTimes=Mg(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Mg(0),this.identifierPrefix=_,this.onRecoverableError=E,O&&(this.mutableSourceEagerHydrationData=null)}function DS(l,c,m,_,E,T,k,X,ae){return l=new C2(l,c,m,X,ae),c===1?(c=1,T===!0&&(c|=8)):c=0,T=$i(3,null,null,c),l.current=T,T.stateNode=l,T.memoizedState={element:_,isDehydrated:m,cache:null,transitions:null},Lg(T),l}function NS(l){if(!l)return Ze;l=l._reactInternals;e:{if(z(l)!==l||l.tag!==1)throw Error(o(170));var c=l;do{switch(c.tag){case 3:c=c.stateNode.context;break e;case 1:if(Xt(c.type)){c=c.stateNode.__reactInternalMemoizedMergedChildContext;break e}}c=c.return}while(c!==null);throw Error(o(171))}if(l.tag===1){var m=l.type;if(Xt(m))return hr(l,m,c)}return c}function FS(l){var c=l._reactInternals;if(c===void 0)throw typeof l.render=="function"?Error(o(188)):(l=Object.keys(l).join(","),Error(o(268,l)));return l=J(c),l===null?null:l.stateNode}function US(l,c){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var m=l.retryLane;l.retryLane=m!==0&&m=Ce&&T>=vt&&E<=Ye&&k<=at){l.splice(c,1);break}else if(_!==Ce||m.width!==ae.width||atk){if(!(T!==vt||m.height!==ae.height||Ye<_||Ce>E)){Ce>_&&(ae.width+=Ce-_,ae.x=_),YeT&&(ae.height+=vt-T,ae.y=T),atm&&(m=k)),k ")+` - -No matching component was found for: - `)+l.join(" > ")}return null},t.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return Z(l.child.stateNode);default:return l.child.stateNode}},t.injectIntoDevTools=function(l){if(l={bundleType:l.bundleType,version:l.version,rendererPackageName:l.rendererPackageName,rendererConfig:l.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:T2,findFiberByHostInstance:l.findFiberByHostInstance||R2,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")l=!1;else{var c=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(c.isDisabled||!c.supportsFiber)l=!0;else{try{Xf=c.inject(l),Fr=c}catch{}l=!!c.checkDCE}}return l},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(l,c,m,_){if(!U)throw Error(o(363));l=f0(l,c);var E=Pe(l,m,_).disconnect;return{disconnect:function(){E()}}},t.registerMutableSourceForHydration=function(l,c){var m=c._getVersion;m=m(c._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[c,m]:l.mutableSourceEagerHydrationData.push(c,m)},t.runWithPriority=function(l,c){var m=kt;try{return kt=l,c()}finally{kt=m}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(l,c,m,_){var E=c.current,T=ci(),k=Gs(E);return m=NS(m),c.context===null?c.context=m:c.pendingContext=m,c=ns(T,k),c.payload={element:l},_=_===void 0?null:_,_!==null&&(c.callback=_),ks(E,c),l=qi(E,k,T),l!==null&&Qf(l,E,k),k},t};mb.exports=Uk;var Ok=mb.exports;const kk=v_(Ok);var gb={exports:{}},vb={};/** - * @license React - * scheduler.production.min.js - * - * Copyright (c) Facebook, Inc. and its affiliates. - * - * This source code is licensed under the MIT license found in the - * LICENSE file in the root directory of this source tree. - */(function(n){function e(L,V){var G=L.length;L.push(V);e:for(;0>>1,ye=L[q];if(0>>1;qr(pe,G))Eer(Ae,pe)?(L[q]=Ae,L[Ee]=G,q=Ee):(L[q]=pe,L[ie]=G,q=ie);else if(Eer(Ae,G))L[q]=Ae,L[Ee]=G,q=Ee;else break e}}return V}function r(L,V){var G=L.sortIndex-V.sortIndex;return G!==0?G:L.id-V.id}if(typeof performance=="object"&&typeof performance.now=="function"){var s=performance;n.unstable_now=function(){return s.now()}}else{var o=Date,a=o.now();n.unstable_now=function(){return o.now()-a}}var u=[],f=[],h=1,d=null,p=3,v=!1,y=!1,M=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,A=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function S(L){for(var V=t(f);V!==null;){if(V.callback===null)i(f);else if(V.startTime<=L)i(f),V.sortIndex=V.expirationTime,e(u,V);else break;V=t(f)}}function w(L){if(M=!1,S(L),!y)if(t(u)!==null)y=!0,Z(P);else{var V=t(f);V!==null&&ve(w,V.startTime-L)}}function P(L,V){y=!1,M&&(M=!1,g(D),D=-1),v=!0;var G=p;try{for(S(V),d=t(u);d!==null&&(!(d.expirationTime>V)||L&&!b());){var q=d.callback;if(typeof q=="function"){d.callback=null,p=d.priorityLevel;var ye=q(d.expirationTime<=V);V=n.unstable_now(),typeof ye=="function"?d.callback=ye:d===t(u)&&i(u),S(V)}else i(u);d=t(u)}if(d!==null)var Ne=!0;else{var ie=t(f);ie!==null&&ve(w,ie.startTime-V),Ne=!1}return Ne}finally{d=null,p=G,v=!1}}var R=!1,B=null,D=-1,z=5,C=-1;function b(){return!(n.unstable_now()-CL||125q?(L.sortIndex=G,e(f,L),t(u)===null&&L===t(f)&&(M?(g(D),D=-1):M=!0,ve(w,G-q))):(L.sortIndex=ye,e(u,L),y||v||(y=!0,Z(P))),L},n.unstable_shouldYield=b,n.unstable_wrapCallback=function(L){var V=p;return function(){var G=p;p=V;try{return L.apply(this,arguments)}finally{p=G}}}})(vb);gb.exports=vb;var BE=gb.exports;const rA={},zk=n=>void Object.assign(rA,n);function Hk(n,e){function t(h,{args:d=[],attach:p,...v},y){let M=`${h[0].toUpperCase()}${h.slice(1)}`,x;if(h==="primitive"){if(v.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=v.object;x=Cl(g,{type:h,root:y,attach:p,primitive:!0})}else{const g=rA[M];if(!g)throw new Error(`R3F: ${M} 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(d))throw new Error("R3F: The args prop must be an array!");x=Cl(new g(...d),{type:h,root:y,attach:p,memoizedProps:{args:d}})}return x.__r3f.attach===void 0&&(x instanceof _t?x.__r3f.attach="geometry":x instanceof En&&(x.__r3f.attach="material")),M!=="inject"&&Xv(x,v),x}function i(h,d){let p=!1;if(d){var v,y;(v=d.__r3f)!=null&&v.attach?Wv(h,d,d.__r3f.attach):d.isObject3D&&h.isObject3D&&(h.add(d),p=!0),p||(y=h.__r3f)==null||y.objects.push(d),d.__r3f||Cl(d,{}),d.__r3f.parent=h,h_(d),Tl(d)}}function r(h,d,p){let v=!1;if(d){var y,M;if((y=d.__r3f)!=null&&y.attach)Wv(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){d.parent=h,d.dispatchEvent({type:"added"}),h.dispatchEvent({type:"childadded",child:d});const x=h.children.filter(A=>A!==d),g=x.indexOf(p);h.children=[...x.slice(0,g),d,...x.slice(g)],v=!0}v||(M=h.__r3f)==null||M.objects.push(d),d.__r3f||Cl(d,{}),d.__r3f.parent=h,h_(d),Tl(d)}}function s(h,d,p=!1){h&&[...h].forEach(v=>o(d,v,p))}function o(h,d,p){if(d){var v,y,M;if(d.__r3f&&(d.__r3f.parent=null),(v=h.__r3f)!=null&&v.objects&&(h.__r3f.objects=h.__r3f.objects.filter(w=>w!==d)),(y=d.__r3f)!=null&&y.attach)NE(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var x;h.remove(d),(x=d.__r3f)!=null&&x.root&&Qk(lp(d),d)}const A=(M=d.__r3f)==null?void 0:M.primitive,S=!A&&(p===void 0?d.dispose!==null:p);if(!A){var g;s((g=d.__r3f)==null?void 0:g.objects,d,S),s(d.children,d,S)}if(delete d.__r3f,S&&d.dispose&&d.type!=="Scene"){const w=()=>{try{d.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?BE.unstable_scheduleCallback(BE.unstable_IdlePriority,w):w()}Tl(h)}}function a(h,d,p,v){var y;const M=(y=h.__r3f)==null?void 0:y.parent;if(!M)return;const x=t(d,p,h.__r3f.root);if(h.children){for(const g of h.children)g.__r3f&&i(x,g);h.children=h.children.filter(g=>!g.__r3f)}h.__r3f.objects.forEach(g=>i(x,g)),h.__r3f.objects=[],h.__r3f.autoRemovedBeforeAppend||o(M,h),x.parent&&(x.__r3f.autoRemovedBeforeAppend=!0),i(M,x),x.raycast&&x.__r3f.eventCount&&lp(x).getState().internal.interaction.push(x),[v,v.alternate].forEach(g=>{g!==null&&(g.stateNode=x,g.ref&&(typeof g.ref=="function"?g.ref(x):g.ref.current=x))})}const u=()=>{};return{reconciler:kk({createInstance:t,removeChild:o,appendChild:i,appendInitialChild:i,insertBefore:r,supportsMutation:!0,isPrimaryRenderer:!1,supportsPersistence:!1,supportsHydration:!1,noTimeout:-1,appendChildToContainer:(h,d)=>{if(!d)return;const p=h.getState().scene;p.__r3f&&(p.__r3f.root=h,i(p,d))},removeChildFromContainer:(h,d)=>{d&&o(h.getState().scene,d)},insertInContainerBefore:(h,d,p)=>{if(!d||!p)return;const v=h.getState().scene;v.__r3f&&r(v,d,p)},getRootHostContext:()=>null,getChildHostContext:h=>h,finalizeInitialChildren(h){var d;return!!((d=h==null?void 0:h.__r3f)!=null?d:{}).handlers},prepareUpdate(h,d,p,v){var y;if(((y=h==null?void 0:h.__r3f)!=null?y:{}).primitive&&v.object&&v.object!==h)return[!0];{const{args:x=[],children:g,...A}=v,{args:S=[],children:w,...P}=p;if(!Array.isArray(x))throw new Error("R3F: the args prop must be an array!");if(x.some((B,D)=>B!==S[D]))return[!0];const R=Eb(h,A,P,!0);return R.changes.length?[!1,R]:null}},commitUpdate(h,[d,p],v,y,M,x){d?a(h,v,M,x):Xv(h,p)},commitMount(h,d,p,v){var y;const M=(y=h.__r3f)!=null?y:{};h.raycast&&M.handlers&&M.eventCount&&lp(h).getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>Cl(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:v}=(d=h.__r3f)!=null?d:{};p&&v&&NE(v,h,p),h.isObject3D&&(h.visible=!1),Tl(h)},unhideInstance(h,d){var p;const{attach:v,parent:y}=(p=h.__r3f)!=null?p:{};v&&y&&Wv(y,h,v),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),Tl(h)},createTextInstance:u,hideTextInstance:u,unhideTextInstance:u,getCurrentEventPriority:()=>e?e():Vl.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&Kt.fun(performance.now)?performance.now:Kt.fun(Date.now)?Date.now:()=>0,scheduleTimeout:Kt.fun(setTimeout)?setTimeout:void 0,cancelTimeout:Kt.fun(clearTimeout)?clearTimeout:void 0}),applyProps:Xv}}var PE,IE;const Vv=n=>"colorSpace"in n||"outputColorSpace"in n,yb=()=>{var n;return(n=rA.ColorManagement)!=null?n:null},_b=n=>n&&n.isOrthographicCamera,Gk=n=>n&&n.hasOwnProperty("current"),If=typeof window<"u"&&((PE=window.document)!=null&&PE.createElement||((IE=window.navigator)==null?void 0:IE.product)==="ReactNative")?Xe.useLayoutEffect:Xe.useEffect;function xb(n){const e=Xe.useRef(n);return If(()=>void(e.current=n),[n]),e}function Vk({set:n}){return If(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class Ab extends Xe.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}Ab.getDerivedStateFromError=()=>({error:!0});const Sb="__default",LE=new Map,Wk=n=>n&&!!n.memoized&&!!n.changes;function Mb(n){var e;const t=typeof window<"u"?(e=window.devicePixelRatio)!=null?e:2:1;return Array.isArray(n)?Math.min(Math.max(n[0],t),n[1]):n}const cu=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()};function lp(n){let e=n.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const Kt={obj:n=>n===Object(n)&&!Kt.arr(n)&&typeof n!="function",fun:n=>typeof n=="function",str:n=>typeof n=="string",num:n=>typeof n=="number",boo:n=>typeof n=="boolean",und:n=>n===void 0,arr:n=>Array.isArray(n),equ(n,e,{arrays:t="shallow",objects:i="reference",strict:r=!0}={}){if(typeof n!=typeof e||!!n!=!!e)return!1;if(Kt.str(n)||Kt.num(n)||Kt.boo(n))return n===e;const s=Kt.obj(n);if(s&&i==="reference")return n===e;const o=Kt.arr(n);if(o&&t==="reference")return n===e;if((o||s)&&n===e)return!0;let a;for(a in n)if(!(a in e))return!1;if(s&&t==="shallow"&&i==="shallow"){for(a in r?e:n)if(!Kt.equ(n[a],e[a],{strict:r,objects:"reference"}))return!1}else for(a in r?e:n)if(n[a]!==e[a])return!1;if(Kt.und(a)){if(o&&n.length===0&&e.length===0||s&&Object.keys(n).length===0&&Object.keys(e).length===0)return!0;if(n!==e)return!1}return!0}};function Xk(n){const e={nodes:{},materials:{}};return n&&n.traverse(t=>{t.name&&(e.nodes[t.name]=t),t.material&&!e.materials[t.material.name]&&(e.materials[t.material.name]=t.material)}),e}function Jk(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function Cl(n,e){const t=n;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},n}function f_(n,e){let t=n;if(e.includes("-")){const i=e.split("-"),r=i.pop();return t=i.reduce((s,o)=>s[o],n),{target:t,key:r}}else return{target:t,key:e}}const DE=/-\d+$/;function Wv(n,e,t){if(Kt.str(t)){if(DE.test(t)){const s=t.replace(DE,""),{target:o,key:a}=f_(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=f_(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function NE(n,e,t){var i,r;if(Kt.str(t)){const{target:s,key:o}=f_(n,t),a=e.__r3f.previousAttach;a===void 0?delete s[o]:s[o]=a}else(i=e.__r3f)==null||i.previousAttach==null||i.previousAttach(n,e);(r=e.__r3f)==null||delete r.previousAttach}function Eb(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...u}={},f=!1){const h=n.__r3f,d=Object.entries(r),p=[];if(f){const y=Object.keys(u);for(let M=0;M{var x;if((x=n.__r3f)!=null&&x.primitive&&y==="object"||Kt.equ(M,u[y]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(y))return p.push([y,M,!0,[]]);let g=[];y.includes("-")&&(g=y.split("-")),p.push([y,M,!1,g]);for(const A in r){const S=r[A];A.startsWith(`${y}-`)&&p.push([A,S,!1,A.split("-")])}});const v={...r};return h!=null&&h.memoizedProps&&h!=null&&h.memoizedProps.args&&(v.args=h.memoizedProps.args),h!=null&&h.memoizedProps&&h!=null&&h.memoizedProps.attach&&(v.attach=h.memoizedProps.attach),{memoized:v,changes:p}}const jk=typeof process<"u"&&!1;function Xv(n,e){var t;const i=n.__r3f,r=i==null?void 0:i.root,s=r==null||r.getState==null?void 0:r.getState(),{memoized:o,changes:a}=Wk(e)?e:Eb(n,e),u=i==null?void 0:i.eventCount;n.__r3f&&(n.__r3f.memoizedProps=o);for(let h=0;hg[A],n),!(x&&x.set))){const[g,...A]=y.reverse();M=A.reverse().reduce((S,w)=>S[w],n),d=g}if(p===Sb+"remove")if(M.constructor){let g=LE.get(M.constructor);g||(g=new M.constructor,LE.set(M.constructor,g)),p=g[d]}else p=0;if(v&&i)p?i.handlers[d]=p:delete i.handlers[d],i.eventCount=Object.keys(i.handlers).length;else if(x&&x.set&&(x.copy||x instanceof Sa)){if(Array.isArray(p))x.fromArray?x.fromArray(p):x.set(...p);else if(x.copy&&p&&p.constructor&&(jk?x.constructor.name===p.constructor.name:x.constructor===p.constructor))x.copy(p);else if(p!==void 0){const g=x instanceof Ie;!g&&x.setScalar?x.setScalar(p):x instanceof Sa&&p instanceof Sa?x.mask=p.mask:x.set(p),!yb()&&s&&!s.linear&&g&&x.convertSRGBToLinear()}}else if(M[d]=p,M[d]instanceof qt&&M[d].format===ti&&M[d].type===Rr&&s){const g=M[d];Vv(g)&&Vv(s.gl)?g.colorSpace=s.gl.outputColorSpace:g.encoding=s.gl.outputEncoding}Tl(n)}if(i&&i.parent&&n.raycast&&u!==i.eventCount){const h=lp(n).getState().internal,d=h.interaction.indexOf(n);d>-1&&h.interaction.splice(d,1),i.eventCount&&h.interaction.push(n)}return!(a.length===1&&a[0][0]==="onUpdate")&&a.length&&(t=n.__r3f)!=null&&t.parent&&h_(n),n}function Tl(n){var e,t;const i=(e=n.__r3f)==null||(t=e.root)==null||t.getState==null?void 0:t.getState();i&&i.internal.frames===0&&i.invalidate()}function h_(n){n.onUpdate==null||n.onUpdate(n)}function Kk(n,e){n.manual||(_b(n)?(n.left=e.width/-2,n.right=e.width/2,n.top=e.height/2,n.bottom=e.height/-2):n.aspect=e.width/e.height,n.updateProjectionMatrix(),n.updateMatrixWorld())}function Gd(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function Yk(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Vl.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Vl.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Vl.ContinuousEventPriority;default:return Vl.DefaultEventPriority}}function wb(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function Qk(n,e){const{internal:t}=n.getState();t.interaction=t.interaction.filter(i=>i!==e),t.initialHits=t.initialHits.filter(i=>i!==e),t.hovered.forEach((i,r)=>{(i.eventObject===e||i.object===e)&&t.hovered.delete(r)}),t.capturedMap.forEach((i,r)=>{wb(t.capturedMap,e,i,r)})}function Zk(n){function e(u){const{internal:f}=n.getState(),h=u.offsetX-f.initialClick[0],d=u.offsetY-f.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(u){return u.filter(f=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=f.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(u,f){const h=n.getState(),d=new Set,p=[],v=f?f(h.internal.interaction):h.internal.interaction;for(let g=0;g{const S=cu(g.object),w=cu(A.object);return!S||!w?g.distance-A.distance:w.events.priority-S.events.priority||g.distance-A.distance}).filter(g=>{const A=Gd(g);return d.has(A)?!1:(d.add(A),!0)});h.events.filter&&(M=h.events.filter(M,h));for(const g of M){let A=g.object;for(;A;){var x;(x=A.__r3f)!=null&&x.eventCount&&p.push({...g,eventObject:A}),A=A.parent}}if("pointerId"in u&&h.internal.capturedMap.has(u.pointerId))for(let g of h.internal.capturedMap.get(u.pointerId).values())d.has(Gd(g.intersection))||p.push(g.intersection);return p}function r(u,f,h,d){const p=n.getState();if(u.length){const v={stopped:!1};for(const y of u){const M=cu(y.object)||p,{raycaster:x,pointer:g,camera:A,internal:S}=M,w=new F(g.x,g.y,0).unproject(A),P=C=>{var b,J;return(b=(J=S.capturedMap.get(C))==null?void 0:J.has(y.eventObject))!=null?b:!1},R=C=>{const b={intersection:y,target:f.target};S.capturedMap.has(C)?S.capturedMap.get(C).set(y.eventObject,b):S.capturedMap.set(C,new Map([[y.eventObject,b]])),f.target.setPointerCapture(C)},B=C=>{const b=S.capturedMap.get(C);b&&wb(S.capturedMap,y.eventObject,b,C)};let D={};for(let C in f){let b=f[C];typeof b!="function"&&(D[C]=b)}let z={...y,...D,pointer:g,intersections:u,stopped:v.stopped,delta:h,unprojectedPoint:w,ray:x.ray,camera:A,stopPropagation(){const C="pointerId"in f&&S.capturedMap.get(f.pointerId);if((!C||C.has(y.eventObject))&&(z.stopped=v.stopped=!0,S.hovered.size&&Array.from(S.hovered.values()).find(b=>b.eventObject===y.eventObject))){const b=u.slice(0,u.indexOf(y));s([...b,y])}},target:{hasPointerCapture:P,setPointerCapture:R,releasePointerCapture:B},currentTarget:{hasPointerCapture:P,setPointerCapture:R,releasePointerCapture:B},nativeEvent:f};if(d(z),v.stopped===!0)break}}return u}function s(u){const{internal:f}=n.getState();for(const h of f.hovered.values())if(!u.length||!u.find(d=>d.object===h.object&&d.index===h.index&&d.instanceId===h.instanceId)){const p=h.eventObject.__r3f,v=p==null?void 0:p.handlers;if(f.hovered.delete(Gd(h)),p!=null&&p.eventCount){const y={...h,intersections:u};v.onPointerOut==null||v.onPointerOut(y),v.onPointerLeave==null||v.onPointerLeave(y)}}}function o(u,f){for(let h=0;hs([]);case"onLostPointerCapture":return f=>{const{internal:h}=n.getState();"pointerId"in f&&h.capturedMap.has(f.pointerId)&&requestAnimationFrame(()=>{h.capturedMap.has(f.pointerId)&&(h.capturedMap.delete(f.pointerId),s([]))})}}return function(h){const{onPointerMissed:d,internal:p}=n.getState();p.lastEvent.current=h;const v=u==="onPointerMove",y=u==="onClick"||u==="onContextMenu"||u==="onDoubleClick",x=i(h,v?t:void 0),g=y?e(h):0;u==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=x.map(S=>S.eventObject)),y&&!x.length&&g<=2&&(o(h,p.interaction),d&&d(h)),v&&s(x);function A(S){const w=S.eventObject,P=w.__r3f,R=P==null?void 0:P.handlers;if(P!=null&&P.eventCount)if(v){if(R.onPointerOver||R.onPointerEnter||R.onPointerOut||R.onPointerLeave){const B=Gd(S),D=p.hovered.get(B);D?D.stopped&&S.stopPropagation():(p.hovered.set(B,S),R.onPointerOver==null||R.onPointerOver(S),R.onPointerEnter==null||R.onPointerEnter(S))}R.onPointerMove==null||R.onPointerMove(S)}else{const B=R[u];B?(!y||p.initialHits.includes(w))&&(o(h,p.interaction.filter(D=>!p.initialHits.includes(D))),B(S)):y&&p.initialHits.includes(w)&&o(h,p.interaction.filter(D=>!p.initialHits.includes(D)))}}r(x,h,g,A)}}return{handlePointer:a}}const Cb=n=>!!(n!=null&&n.render),Tb=Xe.createContext(null),qk=(n,e)=>{const t=Bk((a,u)=>{const f=new F,h=new F,d=new F;function p(g=u().camera,A=h,S=u().size){const{width:w,height:P,top:R,left:B}=S,D=w/P;A instanceof F?d.copy(A):d.set(...A);const z=g.getWorldPosition(f).distanceTo(d);if(_b(g))return{width:w/g.zoom,height:P/g.zoom,top:R,left:B,factor:1,distance:z,aspect:D};{const C=g.fov*Math.PI/180,b=2*Math.tan(C/2)*z,J=b*(w/P);return{width:J,height:b,top:R,left:B,factor:w/J,distance:z,aspect:D}}}let v;const y=g=>a(A=>({performance:{...A.performance,current:g}})),M=new fe;return{set:a,get:u,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>n(u(),g),advance:(g,A)=>e(g,A,u()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new $x,pointer:M,mouse:M,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=u();v&&clearTimeout(v),g.performance.current!==g.performance.min&&y(g.performance.min),v=setTimeout(()=>y(u().performance.max),g.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:p},setEvents:g=>a(A=>({...A,events:{...A.events,...g}})),setSize:(g,A,S,w,P)=>{const R=u().camera,B={width:g,height:A,top:w||0,left:P||0,updateStyle:S};a(D=>({size:B,viewport:{...D.viewport,...p(R,h,B)}}))},setDpr:g=>a(A=>{const S=Mb(g);return{viewport:{...A.viewport,dpr:S,initialDpr:A.viewport.initialDpr||S}}}),setFrameloop:(g="always")=>{const A=u().clock;A.stop(),A.elapsedTime=0,g!=="never"&&(A.start(),A.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:Xe.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,A,S)=>{const w=u().internal;return w.priority=w.priority+(A>0?1:0),w.subscribers.push({ref:g,priority:A,store:S}),w.subscribers=w.subscribers.sort((P,R)=>P.priority-R.priority),()=>{const P=u().internal;P!=null&&P.subscribers&&(P.priority=P.priority-(A>0?1:0),P.subscribers=P.subscribers.filter(R=>R.ref!==g))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:u,viewport:f,gl:h,set:d}=t.getState();if(u.width!==r.width||u.height!==r.height||f.dpr!==s){var p;r=u,s=f.dpr,Kk(a,u),h.setPixelRatio(f.dpr);const v=(p=u.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&h.domElement instanceof HTMLCanvasElement;h.setSize(u.width,u.height,v)}a!==o&&(o=a,d(v=>({viewport:{...v.viewport,...v.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Vd,$k=new Set,e4=new Set,t4=new Set;function Jv(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function uu(n,e){switch(n){case"before":return Jv($k,e);case"after":return Jv(e4,e);case"tail":return Jv(t4,e)}}let jv,Kv;function Yv(n,e,t){let i=e.clock.getDelta();for(e.frameloop==="never"&&typeof n=="number"&&(i=n-e.clock.elapsedTime,e.clock.oldTime=e.clock.elapsedTime,e.clock.elapsedTime=n),jv=e.internal.subscribers,Vd=0;Vd0)&&!((h=s.gl.xr)!=null&&h.isPresenting)&&(i+=Yv(f,s))}if(t=!1,uu("after",f),i===0)return uu("tail",f),e=!1,cancelAnimationFrame(r)}function a(f,h=1){var d;if(!f)return n.forEach(p=>a(p.store.getState(),h));(d=f.gl.xr)!=null&&d.isPresenting||!f.internal.active||f.frameloop==="never"||(h>1?f.internal.frames=Math.min(60,f.internal.frames+h):t?f.internal.frames=2:f.internal.frames=1,e||(e=!0,requestAnimationFrame(o)))}function u(f,h=!0,d,p){if(h&&uu("before",f),d)Yv(f,d,p);else for(const v of n.values())Yv(f,v.store.getState());h&&uu("after",f)}return{loop:o,invalidate:a,advance:u}}function Rb(){const n=Xe.useContext(Tb);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function to(n=t=>t,e){return Rb()(n,e)}function bb(n,e=0){const t=Rb(),i=t.getState().internal.subscribe,r=xb(n);return If(()=>i(r,e,t),[e,i,t]),null}const FE=new WeakMap;function Bb(n,e){return function(t,...i){let r=FE.get(t);return r||(r=new t,FE.set(t,r)),n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,u=>{u.scene&&Object.assign(u,Xk(u.scene)),o(u)},e,u=>a(new Error(`Could not load ${s}: ${u==null?void 0:u.message}`))))))}}function Lf(n,e,t,i){const r=Array.isArray(e)?e:[e],s=Ik(Bb(t,i),[n,...r],{equal:Kt.equ});return Array.isArray(e)?s:s[0]}Lf.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return Lk(Bb(t),[n,...i])};Lf.clear=function(n,e){const t=Array.isArray(e)?e:[e];return Dk([n,...t])};const dc=new Map,{invalidate:UE,advance:OE}=n4(dc),{reconciler:Am,applyProps:El}=Hk(dc,Yk),wl={objects:"shallow",strict:!1},i4=(n,e)=>{const t=typeof n=="function"?n(e):n;return Cb(t)?t:new MR({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function r4(n,e){const t=typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement;if(e){const{width:i,height:r,top:s,left:o,updateStyle:a=t}=e;return{width:i,height:r,top:s,left:o,updateStyle:a}}else if(typeof HTMLCanvasElement<"u"&&n instanceof HTMLCanvasElement&&n.parentElement){const{width:i,height:r,top:s,left:o}=n.parentElement.getBoundingClientRect();return{width:i,height:r,top:s,left:o,updateStyle:t}}else if(typeof OffscreenCanvas<"u"&&n instanceof OffscreenCanvas)return{width:n.width,height:n.height,top:0,left:0,updateStyle:t};return{width:0,height:0,top:0,left:0}}function s4(n){const e=dc.get(n),t=e==null?void 0:e.fiber,i=e==null?void 0:e.store;e&&console.warn("R3F.createRoot should only be called once!");const r=typeof reportError=="function"?reportError:console.error,s=i||qk(UE,OE),o=t||Am.createContainer(s,Vl.ConcurrentRoot,null,!1,null,"",r,null);e||dc.set(n,{fiber:o,store:s});let a,u=!1,f;return{configure(h={}){let{gl:d,size:p,scene:v,events:y,onCreated:M,shadows:x=!1,linear:g=!1,flat:A=!1,legacy:S=!1,orthographic:w=!1,frameloop:P="always",dpr:R=[1,2],performance:B,raycaster:D,camera:z,onPointerMissed:C}=h,b=s.getState(),J=b.gl;b.gl||b.set({gl:J=i4(d,n)});let j=b.raycaster;j||b.set({raycaster:j=new ub});const{params:ee,...ce}=D||{};if(Kt.equ(ce,j,wl)||El(j,{...ce}),Kt.equ(ee,j.params,wl)||El(j,{params:{...j.params,...ee}}),!b.camera||b.camera===f&&!Kt.equ(f,z,wl)){f=z;const G=z instanceof Mf,q=G?z:w?new jr(0,0,0,0,.1,1e3):new on(75,0,.1,1e3);G||(q.position.z=5,z&&(El(q,z),("aspect"in z||"left"in z||"right"in z||"bottom"in z||"top"in z)&&(q.manual=!0,q.updateProjectionMatrix())),!b.camera&&!(z!=null&&z.rotation)&&q.lookAt(0,0,0)),b.set({camera:q}),j.camera=q}if(!b.scene){let G;v instanceof vm?G=v:(G=new vm,v&&El(G,v)),b.set({scene:Cl(G)})}if(!b.xr){var Z;const G=(Ne,ie)=>{const pe=s.getState();pe.frameloop!=="never"&&OE(Ne,!0,pe,ie)},q=()=>{const Ne=s.getState();Ne.gl.xr.enabled=Ne.gl.xr.isPresenting,Ne.gl.xr.setAnimationLoop(Ne.gl.xr.isPresenting?G:null),Ne.gl.xr.isPresenting||UE(Ne)},ye={connect(){const Ne=s.getState().gl;Ne.xr.addEventListener("sessionstart",q),Ne.xr.addEventListener("sessionend",q)},disconnect(){const Ne=s.getState().gl;Ne.xr.removeEventListener("sessionstart",q),Ne.xr.removeEventListener("sessionend",q)}};typeof((Z=J.xr)==null?void 0:Z.addEventListener)=="function"&&ye.connect(),b.set({xr:ye})}if(J.shadowMap){const G=J.shadowMap.enabled,q=J.shadowMap.type;if(J.shadowMap.enabled=!!x,Kt.boo(x))J.shadowMap.type=Tu;else if(Kt.str(x)){var ve;const ye={basic:yT,percentage:km,soft:Tu,variance:xr};J.shadowMap.type=(ve=ye[x])!=null?ve:Tu}else Kt.obj(x)&&Object.assign(J.shadowMap,x);(G!==J.shadowMap.enabled||q!==J.shadowMap.type)&&(J.shadowMap.needsUpdate=!0)}const L=yb();L&&("enabled"in L?L.enabled=!S:"legacyMode"in L&&(L.legacyMode=S)),u||El(J,{outputEncoding:g?3e3:3001,toneMapping:A?Qr:hx}),b.legacy!==S&&b.set(()=>({legacy:S})),b.linear!==g&&b.set(()=>({linear:g})),b.flat!==A&&b.set(()=>({flat:A})),d&&!Kt.fun(d)&&!Cb(d)&&!Kt.equ(d,J,wl)&&El(J,d),y&&!b.events.handlers&&b.set({events:y(s)});const V=r4(n,p);return Kt.equ(V,b.size,wl)||b.setSize(V.width,V.height,V.updateStyle,V.top,V.left),R&&b.viewport.dpr!==Mb(R)&&b.setDpr(R),b.frameloop!==P&&b.setFrameloop(P),b.onPointerMissed||b.set({onPointerMissed:C}),B&&!Kt.equ(B,b.performance,wl)&&b.set(G=>({performance:{...G.performance,...B}})),a=M,u=!0,this},render(h){return u||this.configure(),Am.updateContainer(_e.jsx(o4,{store:s,children:h,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){Pb(n)}}}function o4({store:n,children:e,onCreated:t,rootElement:i}){return If(()=>{const r=n.getState();r.set(s=>({internal:{...s.internal,active:!0}})),t&&t(r),n.getState().events.connected||r.events.connect==null||r.events.connect(i)},[]),_e.jsx(Tb.Provider,{value:n,children:e})}function Pb(n,e){const t=dc.get(n),i=t==null?void 0:t.fiber;if(i){const r=t==null?void 0:t.store.getState();r&&(r.internal.active=!1),Am.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,u;r.events.disconnect==null||r.events.disconnect(),(s=r.gl)==null||(o=s.renderLists)==null||o.dispose==null||o.dispose(),(a=r.gl)==null||a.forceContextLoss==null||a.forceContextLoss(),(u=r.gl)!=null&&u.xr&&r.xr.disconnect(),Jk(r),dc.delete(n)}catch{}},500)})}}Am.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:Xe.version});const Qv={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 a4(n){const{handlePointer:e}=Zk(n);return{priority:1,enabled:!0,compute(t,i,r){i.pointer.set(t.offsetX/i.size.width*2-1,-(t.offsetY/i.size.height)*2+1),i.raycaster.setFromCamera(i.pointer,i.camera)},connected:void 0,handlers:Object.keys(Qv).reduce((t,i)=>({...t,[i]:e(i)}),{}),update:()=>{var t;const{events:i,internal:r}=n.getState();(t=r.lastEvent)!=null&&t.current&&i.handlers&&i.handlers.onPointerMove(r.lastEvent.current)},connect:t=>{var i;const{set:r,events:s}=n.getState();s.disconnect==null||s.disconnect(),r(o=>({events:{...o.events,connected:t}})),Object.entries((i=s.handlers)!=null?i:[]).forEach(([o,a])=>{const[u,f]=Qv[o];t.addEventListener(u,a,{passive:f})})},disconnect:()=>{const{set:t,events:i}=n.getState();if(i.connected){var r;Object.entries((r=i.handlers)!=null?r:[]).forEach(([s,o])=>{if(i&&i.connected instanceof HTMLElement){const[a]=Qv[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}function d_(n,e,t){var i,r,s,o,a;e==null&&(e=100);function u(){var h=Date.now()-o;h=0?i=setTimeout(u,e-h):(i=null,t||(a=n.apply(s,r),s=r=null))}var f=function(){s=this,r=arguments,o=Date.now();var h=t&&!i;return i||(i=setTimeout(u,e)),h&&(a=n.apply(s,r),s=r=null),a};return f.clear=function(){i&&(clearTimeout(i),i=null)},f.flush=function(){i&&(a=n.apply(s,r),s=r=null,clearTimeout(i),i=null)},f}d_.debounce=d_;var l4=d_;const kE=v_(l4);var c4=Object.defineProperty,u4=Object.defineProperties,f4=Object.getOwnPropertyDescriptors,zE=Object.getOwnPropertySymbols,h4=Object.prototype.hasOwnProperty,d4=Object.prototype.propertyIsEnumerable,HE=(n,e,t)=>e in n?c4(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,GE=(n,e)=>{for(var t in e||(e={}))h4.call(e,t)&&HE(n,t,e[t]);if(zE)for(var t of zE(e))d4.call(e,t)&&HE(n,t,e[t]);return n},p4=(n,e)=>u4(n,f4(e)),VE,WE;typeof window<"u"&&((VE=window.document)!=null&&VE.createElement||((WE=window.navigator)==null?void 0:WE.product)==="ReactNative")?Xe.useLayoutEffect:Xe.useEffect;function Ib(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=n.child;for(;i;){const r=Ib(i,e,t);if(r)return r;i=i.sibling}}function Lb(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const XE=console.error;console.error=function(){const n=[...arguments].join("");if(n!=null&&n.startsWith("Warning:")&&n.includes("useContext")){console.error=XE;return}return XE.apply(this,arguments)};const sA=Lb(Xe.createContext(null));class Db extends Xe.Component{render(){return Xe.createElement(sA.Provider,{value:this._reactInternals},this.props.children)}}function m4(){const n=Xe.useContext(sA);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=Xe.useId();return Xe.useMemo(()=>{for(const i of[n,n==null?void 0:n.alternate]){if(!i)continue;const r=Ib(i,!1,s=>{let o=s.memoizedState;for(;o;){if(o.memoizedState===e)return!0;o=o.next}});if(r)return r}},[n,e])}function g4(){const n=m4(),[e]=Xe.useState(()=>new Map);e.clear();let t=n;for(;t;){if(t.type&&typeof t.type=="object"){const r=t.type._context===void 0&&t.type.Provider===t.type?t.type:t.type._context;r&&r!==sA&&!e.has(r)&&e.set(r,Xe.useContext(Lb(r)))}t=t.return}return e}function v4(){const n=g4();return Xe.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>Xe.createElement(e,null,Xe.createElement(t.Provider,p4(GE({},i),{value:n.get(t)}))),e=>Xe.createElement(Db,GE({},e))),[n])}function y4({debounce:n,scroll:e,polyfill:t,offsetSize:i}={debounce:0,scroll:!1,offsetSize:!1}){const r=t||typeof window<"u"&&window.ResizeObserver,[s,o]=Xe.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0});if(!r)return s.width=1280,s.height=800,[()=>{},s,()=>{}];const a=Xe.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:s,orientationHandler:null}),u=n?typeof n=="number"?n:n.scroll:null,f=n?typeof n=="number"?n:n.resize:null,h=Xe.useRef(!1);Xe.useEffect(()=>(h.current=!0,()=>void(h.current=!1)));const[d,p,v]=Xe.useMemo(()=>{const g=()=>{if(!a.current.element)return;const{left:A,top:S,width:w,height:P,bottom:R,right:B,x:D,y:z}=a.current.element.getBoundingClientRect(),C={left:A,top:S,width:w,height:P,bottom:R,right:B,x:D,y:z};a.current.element instanceof HTMLElement&&i&&(C.height=a.current.element.offsetHeight,C.width=a.current.element.offsetWidth),Object.freeze(C),h.current&&!S4(a.current.lastBounds,C)&&o(a.current.lastBounds=C)};return[g,f?kE(g,f):g,u?kE(g,u):g]},[o,i,u,f]);function y(){a.current.scrollContainers&&(a.current.scrollContainers.forEach(g=>g.removeEventListener("scroll",v,!0)),a.current.scrollContainers=null),a.current.resizeObserver&&(a.current.resizeObserver.disconnect(),a.current.resizeObserver=null),a.current.orientationHandler&&screen.orientation.removeEventListener("orientationchange",a.current.orientationHandler)}function M(){a.current.element&&(a.current.resizeObserver=new r(v),a.current.resizeObserver.observe(a.current.element),e&&a.current.scrollContainers&&a.current.scrollContainers.forEach(g=>g.addEventListener("scroll",v,{capture:!0,passive:!0})),a.current.orientationHandler=()=>{v()})}const x=g=>{!g||g===a.current.element||(y(),a.current.element=g,a.current.scrollContainers=Nb(g),M())};return x4(v,!!e),_4(p),Xe.useEffect(()=>{y(),M()},[e,v,p]),Xe.useEffect(()=>y,[]),[x,s,d]}function _4(n){Xe.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function x4(n,e){Xe.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function Nb(n){const e=[];if(!n||n===document.body)return e;const{overflow:t,overflowX:i,overflowY:r}=window.getComputedStyle(n);return[t,i,r].some(s=>s==="auto"||s==="scroll")&&e.push(n),[...e,...Nb(n.parentElement)]}const A4=["x","y","top","bottom","left","right","width","height"],S4=(n,e)=>A4.every(t=>n[t]===e[t]),M4=Xe.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=a4,eventSource:a,eventPrefix:u,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:M,performance:x,raycaster:g,camera:A,scene:S,onPointerMissed:w,onCreated:P,...R},B){Xe.useMemo(()=>zk(Tk),[]);const D=v4(),[z,C]=y4({scroll:!0,debounce:{scroll:50,resize:0},...i}),b=Xe.useRef(null),J=Xe.useRef(null);Xe.useImperativeHandle(B,()=>b.current);const j=xb(w),[ee,ce]=Xe.useState(!1),[Z,ve]=Xe.useState(!1);if(ee)throw ee;if(Z)throw Z;const L=Xe.useRef(null);If(()=>{const G=b.current;C.width>0&&C.height>0&&G&&(L.current||(L.current=s4(G)),L.current.configure({gl:s,events:o,shadows:f,linear:h,flat:d,legacy:p,orthographic:v,frameloop:y,dpr:M,performance:x,raycaster:g,camera:A,scene:S,size:C,onPointerMissed:(...q)=>j.current==null?void 0:j.current(...q),onCreated:q=>{q.events.connect==null||q.events.connect(a?Gk(a)?a.current:a:J.current),u&&q.setEvents({compute:(ye,Ne)=>{const ie=ye[u+"X"],pe=ye[u+"Y"];Ne.pointer.set(ie/Ne.size.width*2-1,-(pe/Ne.size.height)*2+1),Ne.raycaster.setFromCamera(Ne.pointer,Ne.camera)}}),P==null||P(q)}}),L.current.render(_e.jsx(D,{children:_e.jsx(Ab,{set:ve,children:_e.jsx(Xe.Suspense,{fallback:_e.jsx(Vk,{set:ce}),children:e})})})))}),Xe.useEffect(()=>{const G=b.current;if(G)return()=>Pb(G)},[]);const V=a?"none":"auto";return _e.jsx("div",{ref:J,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:V,...r},...R,children:_e.jsx("div",{ref:z,style:{width:"100%",height:"100%"},children:_e.jsx("canvas",{ref:b,style:{display:"block"},children:t})})})}),E4=Xe.forwardRef(function(e,t){return _e.jsx(Db,{children:_e.jsx(M4,{...e,ref:t})})});function p_(){return p_=Object.assign?Object.assign.bind():function(n){for(var e=1;ee in n?C4(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,pt=(n,e,t)=>(T4(n,typeof e!="symbol"?e+"":e,t),t);const Wd=new ka,jE=new gs,R4=Math.cos(70*(Math.PI/180)),KE=(n,e)=>(n%e+e)%e;let b4=class extends Pr{constructor(e,t){super(),pt(this,"object"),pt(this,"domElement"),pt(this,"enabled",!0),pt(this,"target",new F),pt(this,"minDistance",0),pt(this,"maxDistance",1/0),pt(this,"minZoom",0),pt(this,"maxZoom",1/0),pt(this,"minPolarAngle",0),pt(this,"maxPolarAngle",Math.PI),pt(this,"minAzimuthAngle",-1/0),pt(this,"maxAzimuthAngle",1/0),pt(this,"enableDamping",!1),pt(this,"dampingFactor",.05),pt(this,"enableZoom",!0),pt(this,"zoomSpeed",1),pt(this,"enableRotate",!0),pt(this,"rotateSpeed",1),pt(this,"enablePan",!0),pt(this,"panSpeed",1),pt(this,"screenSpacePanning",!0),pt(this,"keyPanSpeed",7),pt(this,"zoomToCursor",!1),pt(this,"autoRotate",!1),pt(this,"autoRotateSpeed",2),pt(this,"reverseOrbit",!1),pt(this,"reverseHorizontalOrbit",!1),pt(this,"reverseVerticalOrbit",!1),pt(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),pt(this,"mouseButtons",{LEFT:na.ROTATE,MIDDLE:na.DOLLY,RIGHT:na.PAN}),pt(this,"touches",{ONE:ia.ROTATE,TWO:ia.DOLLY_PAN}),pt(this,"target0"),pt(this,"position0"),pt(this,"zoom0"),pt(this,"_domElementKeyEvents",null),pt(this,"getPolarAngle"),pt(this,"getAzimuthalAngle"),pt(this,"setPolarAngle"),pt(this,"setAzimuthalAngle"),pt(this,"getDistance"),pt(this,"listenToKeyEvents"),pt(this,"stopListenToKeyEvents"),pt(this,"saveState"),pt(this,"reset"),pt(this,"update"),pt(this,"connect"),pt(this,"dispose"),this.object=e,this.domElement=t,this.target0=this.target.clone(),this.position0=this.object.position.clone(),this.zoom0=this.object.zoom,this.getPolarAngle=()=>h.phi,this.getAzimuthalAngle=()=>h.theta,this.setPolarAngle=W=>{let le=KE(W,2*Math.PI),Le=h.phi;Le<0&&(Le+=2*Math.PI),le<0&&(le+=2*Math.PI);let H=Math.abs(le-Le);2*Math.PI-H{let le=KE(W,2*Math.PI),Le=h.theta;Le<0&&(Le+=2*Math.PI),le<0&&(le+=2*Math.PI);let H=Math.abs(le-Le);2*Math.PI-Hi.object.position.distanceTo(i.target),this.listenToKeyEvents=W=>{W.addEventListener("keydown",Pe),this._domElementKeyEvents=W},this.stopListenToKeyEvents=()=>{this._domElementKeyEvents.removeEventListener("keydown",Pe),this._domElementKeyEvents=null},this.saveState=()=>{i.target0.copy(i.target),i.position0.copy(i.object.position),i.zoom0=i.object.zoom},this.reset=()=>{i.target.copy(i.target0),i.object.position.copy(i.position0),i.object.zoom=i.zoom0,i.object.updateProjectionMatrix(),i.dispatchEvent(r),i.update(),u=a.NONE},this.update=(()=>{const W=new F,le=new F(0,1,0),Le=new On().setFromUnitVectors(e.up,le),H=Le.clone().invert(),we=new F,se=new On,de=2*Math.PI;return function(){const Oe=i.object.position;Le.setFromUnitVectors(e.up,le),H.copy(Le).invert(),W.copy(Oe).sub(i.target),W.applyQuaternion(Le),h.setFromVector3(W),i.autoRotate&&u===a.NONE&&ee(J()),i.enableDamping?(h.theta+=d.theta*i.dampingFactor,h.phi+=d.phi*i.dampingFactor):(h.theta+=d.theta,h.phi+=d.phi);let mt=i.minAzimuthAngle,Lt=i.maxAzimuthAngle;isFinite(mt)&&isFinite(Lt)&&(mt<-Math.PI?mt+=de:mt>Math.PI&&(mt-=de),Lt<-Math.PI?Lt+=de:Lt>Math.PI&&(Lt-=de),mt<=Lt?h.theta=Math.max(mt,Math.min(Lt,h.theta)):h.theta=h.theta>(mt+Lt)/2?Math.max(mt,h.theta):Math.min(Lt,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(v,i.dampingFactor):i.target.add(v),i.zoomToCursor&&z||i.object.isOrthographicCamera?h.radius=ye(h.radius):h.radius=ye(h.radius*p),W.setFromSpherical(h),W.applyQuaternion(H),Oe.copy(i.target).add(W),i.object.matrixAutoUpdate||i.object.updateMatrix(),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,v.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),v.set(0,0,0));let un=!1;if(i.zoomToCursor&&z){let Mt=null;if(i.object instanceof on&&i.object.isPerspectiveCamera){const nn=W.length();Mt=ye(nn*p);const kn=nn-Mt;i.object.position.addScaledVector(B,kn),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const nn=new F(D.x,D.y,0);nn.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),un=!0;const kn=new F(D.x,D.y,0);kn.unproject(i.object),i.object.position.sub(kn).add(nn),i.object.updateMatrixWorld(),Mt=W.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;Mt!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(Mt).add(i.object.position):(Wd.origin.copy(i.object.position),Wd.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(Wd.direction))f||8*(1-se.dot(i.object.quaternion))>f?(i.dispatchEvent(r),we.copy(i.object.position),se.copy(i.object.quaternion),un=!1,!0):!1}})(),this.connect=W=>{i.domElement=W,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Se),i.domElement.addEventListener("pointerdown",I),i.domElement.addEventListener("pointercancel",ue),i.domElement.addEventListener("wheel",Qe)},this.dispose=()=>{var W,le,Le,H,we,se;i.domElement&&(i.domElement.style.touchAction="auto"),(W=i.domElement)==null||W.removeEventListener("contextmenu",Se),(le=i.domElement)==null||le.removeEventListener("pointerdown",I),(Le=i.domElement)==null||Le.removeEventListener("pointercancel",ue),(H=i.domElement)==null||H.removeEventListener("wheel",Qe),(we=i.domElement)==null||we.ownerDocument.removeEventListener("pointermove",$),(se=i.domElement)==null||se.ownerDocument.removeEventListener("pointerup",ue),i._domElementKeyEvents!==null&&i._domElementKeyEvents.removeEventListener("keydown",Pe)};const i=this,r={type:"change"},s={type:"start"},o={type:"end"},a={NONE:-1,ROTATE:0,DOLLY:1,PAN:2,TOUCH_ROTATE:3,TOUCH_PAN:4,TOUCH_DOLLY_PAN:5,TOUCH_DOLLY_ROTATE:6};let u=a.NONE;const f=1e-6,h=new u_,d=new u_;let p=1;const v=new F,y=new fe,M=new fe,x=new fe,g=new fe,A=new fe,S=new fe,w=new fe,P=new fe,R=new fe,B=new F,D=new fe;let z=!1;const C=[],b={};function J(){return 2*Math.PI/60/60*i.autoRotateSpeed}function j(){return Math.pow(.95,i.zoomSpeed)}function ee(W){i.reverseOrbit||i.reverseHorizontalOrbit?d.theta+=W:d.theta-=W}function ce(W){i.reverseOrbit||i.reverseVerticalOrbit?d.phi+=W:d.phi-=W}const Z=(()=>{const W=new F;return function(Le,H){W.setFromMatrixColumn(H,0),W.multiplyScalar(-Le),v.add(W)}})(),ve=(()=>{const W=new F;return function(Le,H){i.screenSpacePanning===!0?W.setFromMatrixColumn(H,1):(W.setFromMatrixColumn(H,0),W.crossVectors(i.object.up,W)),W.multiplyScalar(Le),v.add(W)}})(),L=(()=>{const W=new F;return function(Le,H){const we=i.domElement;if(we&&i.object instanceof on&&i.object.isPerspectiveCamera){const se=i.object.position;W.copy(se).sub(i.target);let de=W.length();de*=Math.tan(i.object.fov/2*Math.PI/180),Z(2*Le*de/we.clientHeight,i.object.matrix),ve(2*H*de/we.clientHeight,i.object.matrix)}else we&&i.object instanceof jr&&i.object.isOrthographicCamera?(Z(Le*(i.object.right-i.object.left)/i.object.zoom/we.clientWidth,i.object.matrix),ve(H*(i.object.top-i.object.bottom)/i.object.zoom/we.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function V(W){i.object instanceof on&&i.object.isPerspectiveCamera||i.object instanceof jr&&i.object.isOrthographicCamera?p/=W:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function G(W){i.object instanceof on&&i.object.isPerspectiveCamera||i.object instanceof jr&&i.object.isOrthographicCamera?p*=W:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function q(W){if(!i.zoomToCursor||!i.domElement)return;z=!0;const le=i.domElement.getBoundingClientRect(),Le=W.clientX-le.left,H=W.clientY-le.top,we=le.width,se=le.height;D.x=Le/we*2-1,D.y=-(H/se)*2+1,B.set(D.x,D.y,1).unproject(i.object).sub(i.object.position).normalize()}function ye(W){return Math.max(i.minDistance,Math.min(i.maxDistance,W))}function Ne(W){y.set(W.clientX,W.clientY)}function ie(W){q(W),w.set(W.clientX,W.clientY)}function pe(W){g.set(W.clientX,W.clientY)}function Ee(W){M.set(W.clientX,W.clientY),x.subVectors(M,y).multiplyScalar(i.rotateSpeed);const le=i.domElement;le&&(ee(2*Math.PI*x.x/le.clientHeight),ce(2*Math.PI*x.y/le.clientHeight)),y.copy(M),i.update()}function Ae(W){P.set(W.clientX,W.clientY),R.subVectors(P,w),R.y>0?V(j()):R.y<0&&G(j()),w.copy(P),i.update()}function lt(W){A.set(W.clientX,W.clientY),S.subVectors(A,g).multiplyScalar(i.panSpeed),L(S.x,S.y),g.copy(A),i.update()}function st(W){q(W),W.deltaY<0?G(j()):W.deltaY>0&&V(j()),i.update()}function ut(W){let le=!1;switch(W.code){case i.keys.UP:L(0,i.keyPanSpeed),le=!0;break;case i.keys.BOTTOM:L(0,-i.keyPanSpeed),le=!0;break;case i.keys.LEFT:L(i.keyPanSpeed,0),le=!0;break;case i.keys.RIGHT:L(-i.keyPanSpeed,0),le=!0;break}le&&(W.preventDefault(),i.update())}function ot(){if(C.length==1)y.set(C[0].pageX,C[0].pageY);else{const W=.5*(C[0].pageX+C[1].pageX),le=.5*(C[0].pageY+C[1].pageY);y.set(W,le)}}function me(){if(C.length==1)g.set(C[0].pageX,C[0].pageY);else{const W=.5*(C[0].pageX+C[1].pageX),le=.5*(C[0].pageY+C[1].pageY);g.set(W,le)}}function O(){const W=C[0].pageX-C[1].pageX,le=C[0].pageY-C[1].pageY,Le=Math.sqrt(W*W+le*le);w.set(0,Le)}function be(){i.enableZoom&&O(),i.enablePan&&me()}function Re(){i.enableZoom&&O(),i.enableRotate&&ot()}function xe(W){if(C.length==1)M.set(W.pageX,W.pageY);else{const Le=We(W),H=.5*(W.pageX+Le.x),we=.5*(W.pageY+Le.y);M.set(H,we)}x.subVectors(M,y).multiplyScalar(i.rotateSpeed);const le=i.domElement;le&&(ee(2*Math.PI*x.x/le.clientHeight),ce(2*Math.PI*x.y/le.clientHeight)),y.copy(M)}function Be(W){if(C.length==1)A.set(W.pageX,W.pageY);else{const le=We(W),Le=.5*(W.pageX+le.x),H=.5*(W.pageY+le.y);A.set(Le,H)}S.subVectors(A,g).multiplyScalar(i.panSpeed),L(S.x,S.y),g.copy(A)}function $e(W){const le=We(W),Le=W.pageX-le.x,H=W.pageY-le.y,we=Math.sqrt(Le*Le+H*H);P.set(0,we),R.set(0,Math.pow(P.y/w.y,i.zoomSpeed)),V(R.y),w.copy(P)}function ze(W){i.enableZoom&&$e(W),i.enablePan&&Be(W)}function U(W){i.enableZoom&&$e(W),i.enableRotate&&xe(W)}function I(W){var le,Le;i.enabled!==!1&&(C.length===0&&((le=i.domElement)==null||le.ownerDocument.addEventListener("pointermove",$),(Le=i.domElement)==null||Le.ownerDocument.addEventListener("pointerup",ue)),Ve(W),W.pointerType==="touch"?Ge(W):ge(W))}function $(W){i.enabled!==!1&&(W.pointerType==="touch"?Tt(W):he(W))}function ue(W){var le,Le,H;dt(W),C.length===0&&((le=i.domElement)==null||le.releasePointerCapture(W.pointerId),(Le=i.domElement)==null||Le.ownerDocument.removeEventListener("pointermove",$),(H=i.domElement)==null||H.ownerDocument.removeEventListener("pointerup",ue)),i.dispatchEvent(o),u=a.NONE}function ge(W){let le;switch(W.button){case 0:le=i.mouseButtons.LEFT;break;case 1:le=i.mouseButtons.MIDDLE;break;case 2:le=i.mouseButtons.RIGHT;break;default:le=-1}switch(le){case na.DOLLY:if(i.enableZoom===!1)return;ie(W),u=a.DOLLY;break;case na.ROTATE:if(W.ctrlKey||W.metaKey||W.shiftKey){if(i.enablePan===!1)return;pe(W),u=a.PAN}else{if(i.enableRotate===!1)return;Ne(W),u=a.ROTATE}break;case na.PAN:if(W.ctrlKey||W.metaKey||W.shiftKey){if(i.enableRotate===!1)return;Ne(W),u=a.ROTATE}else{if(i.enablePan===!1)return;pe(W),u=a.PAN}break;default:u=a.NONE}u!==a.NONE&&i.dispatchEvent(s)}function he(W){if(i.enabled!==!1)switch(u){case a.ROTATE:if(i.enableRotate===!1)return;Ee(W);break;case a.DOLLY:if(i.enableZoom===!1)return;Ae(W);break;case a.PAN:if(i.enablePan===!1)return;lt(W);break}}function Qe(W){i.enabled===!1||i.enableZoom===!1||u!==a.NONE&&u!==a.ROTATE||(W.preventDefault(),i.dispatchEvent(s),st(W),i.dispatchEvent(o))}function Pe(W){i.enabled===!1||i.enablePan===!1||ut(W)}function Ge(W){switch(ft(W),C.length){case 1:switch(i.touches.ONE){case ia.ROTATE:if(i.enableRotate===!1)return;ot(),u=a.TOUCH_ROTATE;break;case ia.PAN:if(i.enablePan===!1)return;me(),u=a.TOUCH_PAN;break;default:u=a.NONE}break;case 2:switch(i.touches.TWO){case ia.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;be(),u=a.TOUCH_DOLLY_PAN;break;case ia.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Re(),u=a.TOUCH_DOLLY_ROTATE;break;default:u=a.NONE}break;default:u=a.NONE}u!==a.NONE&&i.dispatchEvent(s)}function Tt(W){switch(ft(W),u){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;xe(W),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;Be(W),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;ze(W),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;U(W),i.update();break;default:u=a.NONE}}function Se(W){i.enabled!==!1&&W.preventDefault()}function Ve(W){C.push(W)}function dt(W){delete b[W.pointerId];for(let le=0;le=2.0 are supported."));return}const u=new cz(s,{path:t||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});u.fileLoader.setRequestHeader(this.requestHeader);for(let f=0;f=0&&a[h]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+h+'".')}}u.setExtensions(o),u.setPlugins(a),u.parse(i,r)}parseAsync(e,t){const i=this;return new Promise(function(r,s){i.parse(e,t,r,s)})}}function P4(){let n={};return{get:function(e){return n[e]},add:function(e,t){n[e]=t},remove:function(e){delete n[e]},removeAll:function(){n={}}}}const Rt={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_DISPERSION:"KHR_materials_dispersion",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_MATERIALS_BUMP:"EXT_materials_bump",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 I4{constructor(e){this.parser=e,this.name=Rt.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const e=this.parser,t=this.parser.json.nodes||[];for(let i=0,r=t.length;i=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return t.loadTextureImage(e,s.source,o)}}class J4{constructor(e){this.parser=e,this.name=Rt.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let u=i.textureLoader;if(a.uri){const f=i.options.manager.getHandler(a.uri);f!==null&&(u=f)}return this.detectSupport().then(function(f){if(f)return i.loadTextureImage(e,o.source,u);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return i.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(t.height===1)}})),this.isSupported}}class j4{constructor(e){this.parser=e,this.name=Rt.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(e){const t=this.name,i=this.parser,r=i.json,s=r.textures[e];if(!s.extensions||!s.extensions[t])return null;const o=s.extensions[t],a=r.images[o.source];let u=i.textureLoader;if(a.uri){const f=i.options.manager.getHandler(a.uri);f!==null&&(u=f)}return this.detectSupport().then(function(f){if(f)return i.loadTextureImage(e,o.source,u);if(r.extensionsRequired&&r.extensionsRequired.indexOf(t)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return i.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(t.height===1)}})),this.isSupported}}class K4{constructor(e){this.name=Rt.EXT_MESHOPT_COMPRESSION,this.parser=e}loadBufferView(e){const t=this.parser.json,i=t.bufferViews[e];if(i.extensions&&i.extensions[this.name]){const r=i.extensions[this.name],s=this.parser.getDependency("buffer",r.buffer),o=this.parser.options.meshoptDecoder;if(!o||!o.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 s.then(function(a){const u=r.byteOffset||0,f=r.byteLength||0,h=r.count,d=r.byteStride,p=new Uint8Array(a,u,f);return o.decodeGltfBufferAsync?o.decodeGltfBufferAsync(h,d,p,r.mode,r.filter).then(function(v){return v.buffer}):o.ready.then(function(){const v=new ArrayBuffer(h*d);return o.decodeGltfBuffer(new Uint8Array(v),h,d,p,r.mode,r.filter),v})})}else return null}}class Y4{constructor(e){this.name=Rt.EXT_MESH_GPU_INSTANCING,this.parser=e}createNodeMesh(e){const t=this.parser.json,i=t.nodes[e];if(!i.extensions||!i.extensions[this.name]||i.mesh===void 0)return null;const r=t.meshes[i.mesh];for(const f of r.primitives)if(f.mode!==nr.TRIANGLES&&f.mode!==nr.TRIANGLE_STRIP&&f.mode!==nr.TRIANGLE_FAN&&f.mode!==void 0)return null;const o=i.extensions[this.name].attributes,a=[],u={};for(const f in o)a.push(this.parser.getDependency("accessor",o[f]).then(h=>(u[f]=h,u[f])));return a.length<1?null:(a.push(this.parser.createNodeMesh(e)),Promise.all(a).then(f=>{const h=f.pop(),d=h.isGroup?h.children:[h],p=f[0].count,v=[];for(const y of d){const M=new rt,x=new F,g=new On,A=new F(1,1,1),S=new Nx(y.geometry,y.material,p);for(let w=0;w=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"},no={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},nz={CUBICSPLINE:void 0,LINEAR:cc,STEP:lc},qv={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function iz(n){return n.DefaultMaterial===void 0&&(n.DefaultMaterial=new Pf({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:$r})),n.DefaultMaterial}function $o(n,e,t){for(const i in t.extensions)n[i]===void 0&&(e.userData.gltfExtensions=e.userData.gltfExtensions||{},e.userData.gltfExtensions[i]=t.extensions[i])}function ps(n,e){e.extras!==void 0&&(typeof e.extras=="object"?Object.assign(n.userData,e.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+e.extras))}function rz(n,e,t){let i=!1,r=!1,s=!1;for(let f=0,h=e.length;f0||n.search(/^data\:image\/jpeg/)===0?"image/jpeg":n.search(/\.webp($|\?)/i)>0||n.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const lz=new rt;class cz{constructor(e={},t={}){this.json=e,this.extensions={},this.plugins={},this.options=t,this.cache=new P4,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 i=!1,r=!1,s=-1;typeof navigator<"u"&&typeof navigator.userAgent<"u"&&(i=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,r=navigator.userAgent.indexOf("Firefox")>-1,s=r?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||i||r&&s<98?this.textureLoader=new qR(this.options.manager):this.textureLoader=new ob(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new Wi(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(e){this.extensions=e}setPlugins(e){this.plugins=e}parse(e,t){const i=this,r=this.json,s=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(o){return o._markDefs&&o._markDefs()}),Promise.all(this._invokeAll(function(o){return o.beforeRoot&&o.beforeRoot()})).then(function(){return Promise.all([i.getDependencies("scene"),i.getDependencies("animation"),i.getDependencies("camera")])}).then(function(o){const a={scene:o[0][r.scene||0],scenes:o[0],animations:o[1],cameras:o[2],asset:r.asset,parser:i,userData:{}};return $o(s,a,r),ps(a,r),Promise.all(i._invokeAll(function(u){return u.afterRoot&&u.afterRoot(a)})).then(function(){for(const u of a.scenes)u.updateMatrixWorld();e(a)})}).catch(t)}_markDefs(){const e=this.json.nodes||[],t=this.json.skins||[],i=this.json.meshes||[];for(let r=0,s=t.length;r{const u=this.associations.get(o);u!=null&&this.associations.set(a,u);for(const[f,h]of o.children.entries())s(h,a.children[f])};return s(i,r),r.name+="_instance_"+e.uses[t]++,r}_invokeOne(e){const t=Object.values(this.plugins);t.push(this);for(let i=0;i=2&&x.setY(z,R[B*u+1]),u>=3&&x.setZ(z,R[B*u+2]),u>=4&&x.setW(z,R[B*u+3]),u>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return x})}loadTexture(e){const t=this.json,i=this.options,s=t.textures[e].source,o=t.images[s];let a=this.textureLoader;if(o.uri){const u=i.manager.getHandler(o.uri);u!==null&&(a=u)}return this.loadTextureImage(e,s,a)}loadTextureImage(e,t,i){const r=this,s=this.json,o=s.textures[e],a=s.images[t],u=(a.uri||a.bufferView)+":"+o.sampler;if(this.textureCache[u])return this.textureCache[u];const f=this.loadImageSource(t,i).then(function(h){h.flipY=!1,h.name=o.name||a.name||"",h.name===""&&typeof a.uri=="string"&&a.uri.startsWith("data:image/")===!1&&(h.name=a.uri);const p=(s.samplers||{})[o.sampler]||{};return h.magFilter=ZE[p.magFilter]||mn,h.minFilter=ZE[p.minFilter]||ar,h.wrapS=qE[p.wrapS]||Eo,h.wrapT=qE[p.wrapT]||Eo,r.associations.set(h,{textures:e}),h}).catch(function(){return null});return this.textureCache[u]=f,f}loadImageSource(e,t){const i=this,r=this.json,s=this.options;if(this.sourceCache[e]!==void 0)return this.sourceCache[e].then(d=>d.clone());const o=r.images[e],a=self.URL||self.webkitURL;let u=o.uri||"",f=!1;if(o.bufferView!==void 0)u=i.getDependency("bufferView",o.bufferView).then(function(d){f=!0;const p=new Blob([d],{type:o.mimeType});return u=a.createObjectURL(p),u});else if(o.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+e+" is missing URI and bufferView");const h=Promise.resolve(u).then(function(d){return new Promise(function(p,v){let y=p;t.isImageBitmapLoader===!0&&(y=function(M){const x=new qt(M);x.needsUpdate=!0,p(x)}),t.load(xo.resolveURL(d,s.path),y,void 0,v)})}).then(function(d){return f===!0&&a.revokeObjectURL(u),ps(d,o),d.userData.mimeType=o.mimeType||az(o.uri),d}).catch(function(d){throw console.error("THREE.GLTFLoader: Couldn't load texture",u),d});return this.sourceCache[e]=h,h}assignTexture(e,t,i,r){const s=this;return this.getDependency("texture",i.index).then(function(o){if(!o)return null;if(i.texCoord!==void 0&&i.texCoord>0&&(o=o.clone(),o.channel=i.texCoord),s.extensions[Rt.KHR_TEXTURE_TRANSFORM]){const a=i.extensions!==void 0?i.extensions[Rt.KHR_TEXTURE_TRANSFORM]:void 0;if(a){const u=s.associations.get(o);o=s.extensions[Rt.KHR_TEXTURE_TRANSFORM].extendTexture(o,a),s.associations.set(o,u)}}return r!==void 0&&(typeof r=="number"&&(r=r===YE?ga:ws),"colorSpace"in o?o.colorSpace=r:o.encoding=r===ga?YE:B4),e[t]=o,o})}assignFinalMaterial(e){const t=e.geometry;let i=e.material;const r=t.attributes.tangent===void 0,s=t.attributes.color!==void 0,o=t.attributes.normal===void 0;if(e.isPoints){const a="PointsMaterial:"+i.uuid;let u=this.cache.get(a);u||(u=new tg,En.prototype.copy.call(u,i),u.color.copy(i.color),u.map=i.map,u.sizeAttenuation=!1,this.cache.add(a,u)),i=u}else if(e.isLine){const a="LineBasicMaterial:"+i.uuid;let u=this.cache.get(a);u||(u=new ri,En.prototype.copy.call(u,i),u.color.copy(i.color),u.map=i.map,this.cache.add(a,u)),i=u}if(r||s||o){let a="ClonedMaterial:"+i.uuid+":";r&&(a+="derivative-tangents:"),s&&(a+="vertex-colors:"),o&&(a+="flat-shading:");let u=this.cache.get(a);u||(u=i.clone(),s&&(u.vertexColors=!0),o&&(u.flatShading=!0),r&&(u.normalScale&&(u.normalScale.y*=-1),u.clearcoatNormalScale&&(u.clearcoatNormalScale.y*=-1)),this.cache.add(a,u),this.associations.set(u,this.associations.get(i))),i=u}e.material=i}getMaterialType(){return Pf}loadMaterial(e){const t=this,i=this.json,r=this.extensions,s=i.materials[e];let o;const a={},u=s.extensions||{},f=[];if(u[Rt.KHR_MATERIALS_UNLIT]){const d=r[Rt.KHR_MATERIALS_UNLIT];o=d.getMaterialType(),f.push(d.extendParams(a,s,t))}else{const d=s.pbrMetallicRoughness||{};if(a.color=new Ie(1,1,1),a.opacity=1,Array.isArray(d.baseColorFactor)){const p=d.baseColorFactor;a.color.setRGB(p[0],p[1],p[2],ws),a.opacity=p[3]}d.baseColorTexture!==void 0&&f.push(t.assignTexture(a,"map",d.baseColorTexture,ga)),a.metalness=d.metallicFactor!==void 0?d.metallicFactor:1,a.roughness=d.roughnessFactor!==void 0?d.roughnessFactor:1,d.metallicRoughnessTexture!==void 0&&(f.push(t.assignTexture(a,"metalnessMap",d.metallicRoughnessTexture)),f.push(t.assignTexture(a,"roughnessMap",d.metallicRoughnessTexture))),o=this._invokeOne(function(p){return p.getMaterialType&&p.getMaterialType(e)}),f.push(Promise.all(this._invokeAll(function(p){return p.extendMaterialParams&&p.extendMaterialParams(e,a)})))}s.doubleSided===!0&&(a.side=Er);const h=s.alphaMode||qv.OPAQUE;if(h===qv.BLEND?(a.transparent=!0,a.depthWrite=!1):(a.transparent=!1,h===qv.MASK&&(a.alphaTest=s.alphaCutoff!==void 0?s.alphaCutoff:.5)),s.normalTexture!==void 0&&o!==ki&&(f.push(t.assignTexture(a,"normalMap",s.normalTexture)),a.normalScale=new fe(1,1),s.normalTexture.scale!==void 0)){const d=s.normalTexture.scale;a.normalScale.set(d,d)}if(s.occlusionTexture!==void 0&&o!==ki&&(f.push(t.assignTexture(a,"aoMap",s.occlusionTexture)),s.occlusionTexture.strength!==void 0&&(a.aoMapIntensity=s.occlusionTexture.strength)),s.emissiveFactor!==void 0&&o!==ki){const d=s.emissiveFactor;a.emissive=new Ie().setRGB(d[0],d[1],d[2],ws)}return s.emissiveTexture!==void 0&&o!==ki&&f.push(t.assignTexture(a,"emissiveMap",s.emissiveTexture,ga)),Promise.all(f).then(function(){const d=new o(a);return s.name&&(d.name=s.name),ps(d,s),t.associations.set(d,{materials:e}),s.extensions&&$o(r,d,s),d})}createUniqueName(e){const t=It.sanitizeNodeName(e||"");return t in this.nodeNamesUsed?t+"_"+ ++this.nodeNamesUsed[t]:(this.nodeNamesUsed[t]=0,t)}loadGeometries(e){const t=this,i=this.extensions,r=this.primitiveCache;function s(a){return i[Rt.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(a,t).then(function(u){return $E(u,a,t)})}const o=[];for(let a=0,u=e.length;a0&&sz(g,s),g.name=t.createUniqueName(s.name||"mesh_"+e),ps(g,s),x.extensions&&$o(r,g,x),t.assignFinalMaterial(g),d.push(g)}for(let v=0,y=d.length;v1?h=new As:f.length===1?h=f[0]:h=new Bt,h!==f[0])for(let d=0,p=f.length;d{const d=new Map;for(const[p,v]of r.associations)(p instanceof En||p instanceof qt)&&d.set(p,v);return h.traverse(p=>{const v=r.associations.get(p);v!=null&&d.set(p,v)}),d};return r.associations=f(s),s})}_createAnimationTracks(e,t,i,r,s){const o=[],a=e.name?e.name:e.uuid,u=[];no[s.path]===no.weights?e.traverse(function(p){p.morphTargetInfluences&&u.push(p.name?p.name:p.uuid)}):u.push(a);let f;switch(no[s.path]){case no.weights:f=Da;break;case no.rotation:f=Na;break;case no.position:case no.scale:f=Fa;break;default:switch(i.itemSize){case 1:f=Da;break;case 2:case 3:default:f=Fa;break}break}const h=r.interpolation!==void 0?nz[r.interpolation]:cc,d=this._getArrayFromAccessor(i);for(let p=0,v=u.length;p{const a={attributeIDs:this.defaultAttributeIDs,attributeTypes:this.defaultAttributeTypes,useUniqueIDs:!1};this.decodeGeometry(o,a).then(t).catch(r)},i,r)}decodeDracoFile(e,t,i,r){const s={attributeIDs:i||this.defaultAttributeIDs,attributeTypes:r||this.defaultAttributeTypes,useUniqueIDs:!!i};this.decodeGeometry(e,s).then(t)}decodeGeometry(e,t){for(const u in t.attributeTypes){const f=t.attributeTypes[u];f.BYTES_PER_ELEMENT!==void 0&&(t.attributeTypes[u]=f.name)}const i=JSON.stringify(t);if(ey.has(e)){const u=ey.get(e);if(u.key===i)return u.promise;if(e.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let r;const s=this.workerNextTaskID++,o=e.byteLength,a=this._getWorker(s,o).then(u=>(r=u,new Promise((f,h)=>{r._callbacks[s]={resolve:f,reject:h},r.postMessage({type:"decode",id:s,taskConfig:t,buffer:e},[e])}))).then(u=>this._createGeometry(u.geometry));return a.catch(()=>!0).then(()=>{r&&s&&this._releaseTask(r,s)}),ey.set(e,{key:i,promise:a}),a}_createGeometry(e){const t=new _t;e.index&&t.setIndex(new Ut(e.index.array,1));for(let i=0;i{i.load(e,r,void 0,s)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const e=typeof WebAssembly!="object"||this.decoderConfig.type==="js",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(i=>{const r=i[0];e||(this.decoderConfig.wasmBinary=i[1]);const s=hz.toString(),o=["/* draco decoder */",r,"","/* worker */",s.substring(s.indexOf("{")+1,s.lastIndexOf("}"))].join(` -`);this.workerSourceURL=URL.createObjectURL(new Blob([o]))}),this.decoderPending}_getWorker(e,t){return this._initDecoder().then(()=>{if(this.workerPool.lengths._taskLoad?-1:1});const i=this.workerPool[this.workerPool.length-1];return i._taskCosts[e]=t,i._taskLoad+=t,i})}_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{const d=h.draco,p=new d.Decoder,v=new d.DecoderBuffer;v.Init(new Int8Array(u),u.byteLength);try{const y=t(d,p,v,f),M=y.attributes.map(x=>x.array.buffer);y.index&&M.push(y.index.array.buffer),self.postMessage({type:"decode",id:a.id,geometry:y},M)}catch(y){console.error(y),self.postMessage({type:"error",id:a.id,error:y.message})}finally{d.destroy(v),d.destroy(p)}});break}};function t(o,a,u,f){const h=f.attributeIDs,d=f.attributeTypes;let p,v;const y=a.GetEncodedGeometryType(u);if(y===o.TRIANGULAR_MESH)p=new o.Mesh,v=a.DecodeBufferToMesh(u,p);else if(y===o.POINT_CLOUD)p=new o.PointCloud,v=a.DecodeBufferToPointCloud(u,p);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!v.ok()||p.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+v.error_msg());const M={index:null,attributes:[]};for(const x in h){const g=self[d[x]];let A,S;if(f.useUniqueIDs)S=h[x],A=a.GetAttributeByUniqueId(p,S);else{if(S=a.GetAttributeId(p,o[h[x]]),S===-1)continue;A=a.GetAttribute(p,S)}M.attributes.push(r(o,a,p,x,g,A))}return y===o.TRIANGULAR_MESH&&(M.index=i(o,a,p)),o.destroy(p),M}function i(o,a,u){const h=u.num_faces()*3,d=h*4,p=o._malloc(d);a.GetTrianglesUInt32Array(u,d,p);const v=new Uint32Array(o.HEAPF32.buffer,p,h).slice();return o._free(p),{array:v,itemSize:1}}function r(o,a,u,f,h,d){const p=d.num_components(),y=u.num_points()*p,M=y*h.BYTES_PER_ELEMENT,x=s(o,h),g=o._malloc(M);a.GetAttributeDataArrayForAllPoints(u,d,x,M,g);const A=new h(o.HEAPF32.buffer,g,y).slice();return o._free(g),{name:f,array:A,itemSize:p}}function s(o,a){switch(a){case Float32Array:return o.DT_FLOAT32;case Int8Array:return o.DT_INT8;case Int16Array:return o.DT_INT16;case Int32Array:return o.DT_INT32;case Uint8Array:return o.DT_UINT8;case Uint16Array:return o.DT_UINT16;case Uint32Array:return o.DT_UINT32}}}let Xd;const ty=()=>{if(Xd)return Xd;const n="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",e="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",t=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]),i=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(typeof WebAssembly!="object")return{supported:!1};let r=n;WebAssembly.validate(t)&&(r=e);let s;const o=WebAssembly.instantiate(a(r),{}).then(d=>{s=d.instance,s.exports.__wasm_call_ctors()});function a(d){const p=new Uint8Array(d.length);for(let y=0;y96?M-71:M>64?M-65:M>47?M+4:M>46?63:62}let v=0;for(let y=0;y{t&&t(i),n&&(Jd||(Jd=new fz),Jd.setDecoderPath(typeof n=="string"?n:Ob),i.setDRACOLoader(Jd)),e&&i.setMeshoptDecoder(typeof ty=="function"?ty():ty)}}const Df=(n,e,t,i)=>Lf(oA,n,kb(e,t,i));Df.preload=(n,e,t,i)=>Lf.preload(oA,n,kb(e,t,i));Df.clear=n=>Lf.clear(oA,n);Df.setDecoderPath=n=>{Ob=n};const dz=Xe.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:u,...f},h)=>{const d=to(R=>R.invalidate),p=to(R=>R.camera),v=to(R=>R.gl),y=to(R=>R.events),M=to(R=>R.setEvents),x=to(R=>R.set),g=to(R=>R.get),A=to(R=>R.performance),S=e||p,w=i||y.connected||v.domElement,P=Xe.useMemo(()=>new b4(S),[S]);return bb(()=>{P.enabled&&P.update()},-1),Xe.useEffect(()=>(s&&P.connect(s===!0?w:s),P.connect(w),()=>void P.dispose()),[s,w,t,P,d]),Xe.useEffect(()=>{const R=z=>{d(),t&&A.regress(),o&&o(z)},B=z=>{a&&a(z)},D=z=>{u&&u(z)};return P.addEventListener("change",R),P.addEventListener("start",B),P.addEventListener("end",D),()=>{P.removeEventListener("start",B),P.removeEventListener("end",D),P.removeEventListener("change",R)}},[o,a,u,P,d,M]),Xe.useEffect(()=>{if(n){const R=g().controls;return x({controls:P}),()=>x({controls:R})}},[n,P]),Xe.createElement("primitive",p_({ref:h,object:P,enableDamping:r},f))});function pz(n){const{nodes:e,materials:t}=Df("/eyeball.gltf");return _e.jsx("group",{...n,dispose:null,children:_e.jsx("group",{rotation:[-Math.PI/-2.3,0,0],children:_e.jsx("mesh",{geometry:e.Object_7.geometry,material:t.blinn2,rotation:[Math.PI/2,0,0],scale:2})})})}Df.preload("/eyeball.gltf");function mz(){const n=Xe.useRef(),[e,t]=Xe.useState({x:0,y:0}),i=r=>{if(t({x:r.clientX/window.innerWidth*2-1,y:-(r.clientY/window.innerHeight)*2+1}),r.type==="touchmove"){const s=r.touches[0];t({x:s.clientX/window.innerWidth*2-1,y:-(s.clientY/window.innerHeight)*2+1})}else t({x:r.clientX/window.innerWidth*2-1,y:-(r.clientY/window.innerHeight)*2+1})};return Xe.useEffect(()=>(window.addEventListener("mousemove",i),window.addEventListener("touchmove",i),()=>{window.removeEventListener("mousemove",i),window.removeEventListener("touchmove",i)}),[]),bb(()=>{const r=new F(-e.x*.3,-e.y*.5,0),s=new F(0,0,1),o=new F().subVectors(r,s);n.current.lookAt(o)}),_e.jsxs("mesh",{ref:n,children:[_e.jsx(pz,{}),_e.jsx("meshStandardMaterial",{color:"blue"})]})}function gz(){return _e.jsx("div",{className:"canvasWrapper ",children:_e.jsxs(E4,{children:[_e.jsx("ambientLight",{intensity:2.5}),_e.jsx("pointLight",{position:[0,0,.1]}),_e.jsx(dz,{enabled:!1,enableZoom:!1}),_e.jsx(Xe.Suspense,{fallback:null,children:_e.jsx(mz,{})})]})})}function zb(){return _e.jsx(gz,{})}const vz=()=>_e.jsx("div",{className:" ",children:_e.jsx(zb,{})}),yz=()=>_e.jsx("div",{className:"scale-x-[-1] ",children:_e.jsx(zb,{})}),_z=""+new URL("MonsterMash-kqlCd7ew.mp3",import.meta.url).href,xz=""+new URL("SpookySound-CkzOD1HB.mp3",import.meta.url).href;function Az(n){return Ds({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m7.727 6.313-4.02-4.02-1.414 1.414 18 18 1.414-1.414-2.02-2.02A9.578 9.578 0 0 0 21.999 12c0-4.091-2.472-7.453-5.999-9v2c2.387 1.386 3.999 4.047 3.999 7a8.13 8.13 0 0 1-1.671 4.914l-1.286-1.286C17.644 14.536 18 13.19 18 12c0-1.771-.775-3.9-2-5v7.586l-2-2V2.132L7.727 6.313zM4 17h2.697L14 21.868v-3.747L3.102 7.223A1.995 1.995 0 0 0 2 9v6c0 1.103.897 2 2 2z"},child:[]}]})(n)}function Sz(n){return Ds({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM9 8.25a.75.75 0 00-.75.75v6c0 .414.336.75.75.75h.75a.75.75 0 00.75-.75V9a.75.75 0 00-.75-.75H9zm5.25 0a.75.75 0 00-.75.75v6c0 .414.336.75.75.75H15a.75.75 0 00.75-.75V9a.75.75 0 00-.75-.75h-.75z",clipRule:"evenodd"},child:[]}]})(n)}function Mz(n){return Ds({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm14.024-.983a1.125 1.125 0 010 1.966l-5.603 3.113A1.125 1.125 0 019 15.113V8.887c0-.857.921-1.4 1.671-.983l5.603 3.113z",clipRule:"evenodd"},child:[]}]})(n)}function Ez(n){return Ds({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M12.75 8a4.5 4.5 0 0 1-8.61 1.834l-1.391.565A6.001 6.001 0 0 0 14.25 8 6 6 0 0 0 3.5 4.334V2.5H2v4l.75.75h3.5v-1.5H4.352A4.5 4.5 0 0 1 12.75 8z"},child:[]}]})(n)}function wz(){const[n,e]=Xe.useState(!1),[t,i]=Xe.useState(1),r=Xe.useRef(null);function s(){n||(r.current=new Audio(_z),r.current.play(),r.current.addEventListener("ended",()=>{new Audio(xz).play()}),e(!0))}function o(){r.current&&(n?r.current.pause():r.current.play(),e(!n))}function a(){r.current&&(r.current.pause(),r.current.currentTime=0,e(!1))}function u(){if(r.current){const h=Math.min(t+.1,1);r.current.volume=h,i(h)}}function f(){if(r.current){const h=Math.max(t-.1,0);r.current.volume=h,i(h)}}return _e.jsxs("div",{className:" relative mt-[3rem] flex w-fit justify-center",children:[_e.jsx("button",{onClick:u,className:"volumeUp mr-[1rem] text-yellow-100 ",children:_e.jsx(yI,{size:30})}),_e.jsx("div",{className:"audio speaker flex w-fit ",children:n?_e.jsx(_e.Fragment,{children:_e.jsx("button",{onClick:a,children:_e.jsx(Ez,{size:30,color:"#fef9c3 "})})}):_e.jsx("button",{onClick:s,children:_e.jsx(Az,{size:30,color:"#fef9c3 "})})}),_e.jsx("div",{className:"pauseButton flex w-fit",children:_e.jsx("button",{onClick:o,children:n?_e.jsx(Sz,{size:30,color:"#fef9c3 "}):_e.jsx(Mz,{size:30,color:"#fef9c3 "})})}),_e.jsx("button",{onClick:f,className:"volumeDown ml-[1rem] text-yellow-100 ",children:_e.jsx(vI,{size:30})})]})}const Cz=""+new URL("DyingCow-DXGcwpyN.mp3",import.meta.url).href;function ew(){new Audio(Cz).play()}const Tz=()=>_e.jsx("div",{className:"fixed bottom-0 z-[5] h-[100px] w-screen",children:_e.jsx("div",{children:_e.jsxs("div",{className:"relative flex h-[50px] w-screen justify-between px-8",children:[_e.jsx("a",{href:"https://resume-hub.mybabb.com/",target:"_blank",rel:"noopener noreferrer",onClick:ew,children:_e.jsx("div",{className:"dataToolTip81 font-Nosifer-Regular ","data-tool-tip":"Portfolio Hub ",children:_e.jsx("div",{className:`forward relative bottom-12 left-0 z-40 inline-flex text-green-500\r - `,children:_e.jsx(vz,{})})})}),_e.jsx("div",{className:`addMusic relative top-[.2rem] m-auto flex \r - w-fit justify-center `,children:_e.jsx(wz,{})}),_e.jsx("a",{href:"https://mybabb.com",target:"_blank",rel:"noopener noreferrer",onClick:ew,children:_e.jsx("div",{className:"dataToolTip82 font-Nosifer-Regular ","data-tool-tip":"My Home Page",children:_e.jsx("div",{className:`rewind relative bottom-12 right-0 z-40 inline-flex scale-x-[-1] text-green-500 \r - `,children:_e.jsx(yz,{})})})})]})})});ny.createRoot(document.getElementById("root")).render(_e.jsxs(uo.StrictMode,{children:[_e.jsx(EI,{}),_e.jsx(cI,{}),_e.jsx(lI,{}),_e.jsx(AI,{}),_e.jsx(Tz,{})]})); diff --git a/assets/index-DQ0TmeYb.js b/assets/index-DQ0TmeYb.js new file mode 100644 index 0000000..a9fa7c4 --- /dev/null +++ b/assets/index-DQ0TmeYb.js @@ -0,0 +1,53 @@ +(function(){const t=document.createElement("link").relList;if(t&&t.supports&&t.supports("modulepreload"))return;for(const l of document.querySelectorAll('link[rel="modulepreload"]'))r(l);new MutationObserver(l=>{for(const i of l)if(i.type==="childList")for(const o of i.addedNodes)o.tagName==="LINK"&&o.rel==="modulepreload"&&r(o)}).observe(document,{childList:!0,subtree:!0});function n(l){const i={};return l.integrity&&(i.integrity=l.integrity),l.referrerPolicy&&(i.referrerPolicy=l.referrerPolicy),l.crossOrigin==="use-credentials"?i.credentials="include":l.crossOrigin==="anonymous"?i.credentials="omit":i.credentials="same-origin",i}function r(l){if(l.ep)return;l.ep=!0;const i=n(l);fetch(l.href,i)}})();function mc(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Ju={exports:{}},ll={},qu={exports:{}},L={};/** + * @license React + * react.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var Zn=Symbol.for("react.element"),hc=Symbol.for("react.portal"),vc=Symbol.for("react.fragment"),yc=Symbol.for("react.strict_mode"),gc=Symbol.for("react.profiler"),wc=Symbol.for("react.provider"),Sc=Symbol.for("react.context"),kc=Symbol.for("react.forward_ref"),xc=Symbol.for("react.suspense"),Ec=Symbol.for("react.memo"),Cc=Symbol.for("react.lazy"),Uo=Symbol.iterator;function _c(e){return e===null||typeof e!="object"?null:(e=Uo&&e[Uo]||e["@@iterator"],typeof e=="function"?e:null)}var bu={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},es=Object.assign,ts={};function un(e,t,n){this.props=e,this.context=t,this.refs=ts,this.updater=n||bu}un.prototype.isReactComponent={};un.prototype.setState=function(e,t){if(typeof e!="object"&&typeof e!="function"&&e!=null)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")};un.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};function ns(){}ns.prototype=un.prototype;function Bi(e,t,n){this.props=e,this.context=t,this.refs=ts,this.updater=n||bu}var Hi=Bi.prototype=new ns;Hi.constructor=Bi;es(Hi,un.prototype);Hi.isPureReactComponent=!0;var $o=Array.isArray,rs=Object.prototype.hasOwnProperty,Wi={current:null},ls={key:!0,ref:!0,__self:!0,__source:!0};function is(e,t,n){var r,l={},i=null,o=null;if(t!=null)for(r in t.ref!==void 0&&(o=t.ref),t.key!==void 0&&(i=""+t.key),t)rs.call(t,r)&&!ls.hasOwnProperty(r)&&(l[r]=t[r]);var u=arguments.length-2;if(u===1)l.children=n;else if(1>>1,G=C[W];if(0>>1;Wl(xl,j))gtl(nr,xl)?(C[W]=nr,C[gt]=j,W=gt):(C[W]=xl,C[yt]=j,W=yt);else if(gtl(nr,j))C[W]=nr,C[gt]=j,W=gt;else break e}}return z}function l(C,z){var j=C.sortIndex-z.sortIndex;return j!==0?j:C.id-z.id}if(typeof performance=="object"&&typeof performance.now=="function"){var i=performance;e.unstable_now=function(){return i.now()}}else{var o=Date,u=o.now();e.unstable_now=function(){return o.now()-u}}var s=[],c=[],m=1,h=null,p=3,w=!1,S=!1,k=!1,F=typeof setTimeout=="function"?setTimeout:null,f=typeof clearTimeout=="function"?clearTimeout:null,a=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function d(C){for(var z=n(c);z!==null;){if(z.callback===null)r(c);else if(z.startTime<=C)r(c),z.sortIndex=z.expirationTime,t(s,z);else break;z=n(c)}}function v(C){if(k=!1,d(C),!S)if(n(s)!==null)S=!0,Sl(E);else{var z=n(c);z!==null&&kl(v,z.startTime-C)}}function E(C,z){S=!1,k&&(k=!1,f(P),P=-1),w=!0;var j=p;try{for(d(z),h=n(s);h!==null&&(!(h.expirationTime>z)||C&&!Ne());){var W=h.callback;if(typeof W=="function"){h.callback=null,p=h.priorityLevel;var G=W(h.expirationTime<=z);z=e.unstable_now(),typeof G=="function"?h.callback=G:h===n(s)&&r(s),d(z)}else r(s);h=n(s)}if(h!==null)var tr=!0;else{var yt=n(c);yt!==null&&kl(v,yt.startTime-z),tr=!1}return tr}finally{h=null,p=j,w=!1}}var _=!1,N=null,P=-1,H=5,T=-1;function Ne(){return!(e.unstable_now()-TC||125W?(C.sortIndex=j,t(c,C),n(s)===null&&C===n(c)&&(k?(f(P),P=-1):k=!0,kl(v,j-W))):(C.sortIndex=G,t(s,C),S||w||(S=!0,Sl(E))),C},e.unstable_shouldYield=Ne,e.unstable_wrapCallback=function(C){var z=p;return function(){var j=p;p=z;try{return C.apply(this,arguments)}finally{p=j}}}})(as);ss.exports=as;var Ic=ss.exports;/** + * @license React + * react-dom.production.min.js + * + * Copyright (c) Facebook, Inc. and its affiliates. + * + * This source code is licensed under the MIT license found in the + * LICENSE file in the root directory of this source tree. + */var cs=Kt,ye=Ic;function y(e){for(var t="https://reactjs.org/docs/error-decoder.html?invariant="+e,n=1;n"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Zl=Object.prototype.hasOwnProperty,Fc=/^[: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]*$/,Ao={},Bo={};function Uc(e){return Zl.call(Bo,e)?!0:Zl.call(Ao,e)?!1:Fc.test(e)?Bo[e]=!0:(Ao[e]=!0,!1)}function $c(e,t,n,r){if(n!==null&&n.type===0)return!1;switch(typeof t){case"function":case"symbol":return!0;case"boolean":return r?!1:n!==null?!n.acceptsBooleans:(e=e.toLowerCase().slice(0,5),e!=="data-"&&e!=="aria-");default:return!1}}function Vc(e,t,n,r){if(t===null||typeof t>"u"||$c(e,t,n,r))return!0;if(r)return!1;if(n!==null)switch(n.type){case 3:return!t;case 4:return t===!1;case 5:return isNaN(t);case 6:return isNaN(t)||1>t}return!1}function se(e,t,n,r,l,i,o){this.acceptsBooleans=t===2||t===3||t===4,this.attributeName=r,this.attributeNamespace=l,this.mustUseProperty=n,this.propertyName=e,this.type=t,this.sanitizeURL=i,this.removeEmptyString=o}var ee={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(e){ee[e]=new se(e,0,!1,e,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(e){var t=e[0];ee[t]=new se(t,1,!1,e[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(e){ee[e]=new se(e,2,!1,e.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(e){ee[e]=new se(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){ee[e]=new se(e,3,!1,e.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(e){ee[e]=new se(e,3,!0,e,null,!1,!1)});["capture","download"].forEach(function(e){ee[e]=new se(e,4,!1,e,null,!1,!1)});["cols","rows","size","span"].forEach(function(e){ee[e]=new se(e,6,!1,e,null,!1,!1)});["rowSpan","start"].forEach(function(e){ee[e]=new se(e,5,!1,e.toLowerCase(),null,!1,!1)});var Ki=/[\-:]([a-z])/g;function Yi(e){return e[1].toUpperCase()}"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(Ki,Yi);ee[t]=new se(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(Ki,Yi);ee[t]=new se(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(Ki,Yi);ee[t]=new se(t,1,!1,e,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(e){ee[e]=new se(e,1,!1,e.toLowerCase(),null,!1,!1)});ee.xlinkHref=new se("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(e){ee[e]=new se(e,1,!1,e.toLowerCase(),null,!0,!0)});function Xi(e,t,n,r){var l=ee.hasOwnProperty(t)?ee[t]:null;(l!==null?l.type!==0:r||!(2u||l[o]!==i[u]){var s=` +`+l[o].replace(" at new "," at ");return e.displayName&&s.includes("")&&(s=s.replace("",e.displayName)),s}while(1<=o&&0<=u);break}}}finally{_l=!1,Error.prepareStackTrace=n}return(e=e?e.displayName||e.name:"")?Sn(e):""}function Ac(e){switch(e.tag){case 5:return Sn(e.type);case 16:return Sn("Lazy");case 13:return Sn("Suspense");case 19:return Sn("SuspenseList");case 0:case 2:case 15:return e=Nl(e.type,!1),e;case 11:return e=Nl(e.type.render,!1),e;case 1:return e=Nl(e.type,!0),e;default:return""}}function ei(e){if(e==null)return null;if(typeof e=="function")return e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case Dt:return"Fragment";case Mt:return"Portal";case Jl:return"Profiler";case Gi:return"StrictMode";case ql:return"Suspense";case bl:return"SuspenseList"}if(typeof e=="object")switch(e.$$typeof){case ps:return(e.displayName||"Context")+".Consumer";case ds:return(e._context.displayName||"Context")+".Provider";case Zi:var t=e.render;return e=e.displayName,e||(e=t.displayName||t.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case Ji:return t=e.displayName||null,t!==null?t:ei(e.type)||"Memo";case Je:t=e._payload,e=e._init;try{return ei(e(t))}catch{}}return null}function Bc(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=t.render,e=e.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 ei(t);case 8:return t===Gi?"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(typeof t=="function")return t.displayName||t.name||null;if(typeof t=="string")return t}return null}function dt(e){switch(typeof e){case"boolean":case"number":case"string":case"undefined":return e;case"object":return e;default:return""}}function hs(e){var t=e.type;return(e=e.nodeName)&&e.toLowerCase()==="input"&&(t==="checkbox"||t==="radio")}function Hc(e){var t=hs(e)?"checked":"value",n=Object.getOwnPropertyDescriptor(e.constructor.prototype,t),r=""+e[t];if(!e.hasOwnProperty(t)&&typeof n<"u"&&typeof n.get=="function"&&typeof n.set=="function"){var l=n.get,i=n.set;return Object.defineProperty(e,t,{configurable:!0,get:function(){return l.call(this)},set:function(o){r=""+o,i.call(this,o)}}),Object.defineProperty(e,t,{enumerable:n.enumerable}),{getValue:function(){return r},setValue:function(o){r=""+o},stopTracking:function(){e._valueTracker=null,delete e[t]}}}}function ir(e){e._valueTracker||(e._valueTracker=Hc(e))}function vs(e){if(!e)return!1;var t=e._valueTracker;if(!t)return!0;var n=t.getValue(),r="";return e&&(r=hs(e)?e.checked?"true":"false":e.value),e=r,e!==n?(t.setValue(e),!0):!1}function Rr(e){if(e=e||(typeof document<"u"?document:void 0),typeof e>"u")return null;try{return e.activeElement||e.body}catch{return e.body}}function ti(e,t){var n=t.checked;return A({},t,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:n??e._wrapperState.initialChecked})}function Wo(e,t){var n=t.defaultValue==null?"":t.defaultValue,r=t.checked!=null?t.checked:t.defaultChecked;n=dt(t.value!=null?t.value:n),e._wrapperState={initialChecked:r,initialValue:n,controlled:t.type==="checkbox"||t.type==="radio"?t.checked!=null:t.value!=null}}function ys(e,t){t=t.checked,t!=null&&Xi(e,"checked",t,!1)}function ni(e,t){ys(e,t);var n=dt(t.value),r=t.type;if(n!=null)r==="number"?(n===0&&e.value===""||e.value!=n)&&(e.value=""+n):e.value!==""+n&&(e.value=""+n);else if(r==="submit"||r==="reset"){e.removeAttribute("value");return}t.hasOwnProperty("value")?ri(e,t.type,n):t.hasOwnProperty("defaultValue")&&ri(e,t.type,dt(t.defaultValue)),t.checked==null&&t.defaultChecked!=null&&(e.defaultChecked=!!t.defaultChecked)}function Qo(e,t,n){if(t.hasOwnProperty("value")||t.hasOwnProperty("defaultValue")){var r=t.type;if(!(r!=="submit"&&r!=="reset"||t.value!==void 0&&t.value!==null))return;t=""+e._wrapperState.initialValue,n||t===e.value||(e.value=t),e.defaultValue=t}n=e.name,n!==""&&(e.name=""),e.defaultChecked=!!e._wrapperState.initialChecked,n!==""&&(e.name=n)}function ri(e,t,n){(t!=="number"||Rr(e.ownerDocument)!==e)&&(n==null?e.defaultValue=""+e._wrapperState.initialValue:e.defaultValue!==""+n&&(e.defaultValue=""+n))}var kn=Array.isArray;function Yt(e,t,n,r){if(e=e.options,t){t={};for(var l=0;l"+t.valueOf().toString()+"",t=or.firstChild;e.firstChild;)e.removeChild(e.firstChild);for(;t.firstChild;)e.appendChild(t.firstChild)}});function Mn(e,t){if(t){var n=e.firstChild;if(n&&n===e.lastChild&&n.nodeType===3){n.nodeValue=t;return}}e.textContent=t}var Cn={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},Wc=["Webkit","ms","Moz","O"];Object.keys(Cn).forEach(function(e){Wc.forEach(function(t){t=t+e.charAt(0).toUpperCase()+e.substring(1),Cn[t]=Cn[e]})});function ks(e,t,n){return t==null||typeof t=="boolean"||t===""?"":n||typeof t!="number"||t===0||Cn.hasOwnProperty(e)&&Cn[e]?(""+t).trim():t+"px"}function xs(e,t){e=e.style;for(var n in t)if(t.hasOwnProperty(n)){var r=n.indexOf("--")===0,l=ks(n,t[n],r);n==="float"&&(n="cssFloat"),r?e.setProperty(n,l):e[n]=l}}var Qc=A({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 oi(e,t){if(t){if(Qc[e]&&(t.children!=null||t.dangerouslySetInnerHTML!=null))throw Error(y(137,e));if(t.dangerouslySetInnerHTML!=null){if(t.children!=null)throw Error(y(60));if(typeof t.dangerouslySetInnerHTML!="object"||!("__html"in t.dangerouslySetInnerHTML))throw Error(y(61))}if(t.style!=null&&typeof t.style!="object")throw Error(y(62))}}function ui(e,t){if(e.indexOf("-")===-1)return typeof t.is=="string";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 si=null;function qi(e){return e=e.target||e.srcElement||window,e.correspondingUseElement&&(e=e.correspondingUseElement),e.nodeType===3?e.parentNode:e}var ai=null,Xt=null,Gt=null;function Xo(e){if(e=bn(e)){if(typeof ai!="function")throw Error(y(280));var t=e.stateNode;t&&(t=al(t),ai(e.stateNode,e.type,t))}}function Es(e){Xt?Gt?Gt.push(e):Gt=[e]:Xt=e}function Cs(){if(Xt){var e=Xt,t=Gt;if(Gt=Xt=null,Xo(e),t)for(e=0;e>>=0,e===0?32:31-(nf(e)/rf|0)|0}var ur=64,sr=4194304;function xn(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 e&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return e&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return e}}function Ir(e,t){var n=e.pendingLanes;if(n===0)return 0;var r=0,l=e.suspendedLanes,i=e.pingedLanes,o=n&268435455;if(o!==0){var u=o&~l;u!==0?r=xn(u):(i&=o,i!==0&&(r=xn(i)))}else o=n&~l,o!==0?r=xn(o):i!==0&&(r=xn(i));if(r===0)return 0;if(t!==0&&t!==r&&!(t&l)&&(l=r&-r,i=t&-t,l>=i||l===16&&(i&4194240)!==0))return t;if(r&4&&(r|=n&16),t=e.entangledLanes,t!==0)for(e=e.entanglements,t&=r;0n;n++)t.push(e);return t}function Jn(e,t,n){e.pendingLanes|=t,t!==536870912&&(e.suspendedLanes=0,e.pingedLanes=0),e=e.eventTimes,t=31-Te(t),e[t]=n}function sf(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=Nn),ru=" ",lu=!1;function Ws(e,t){switch(e){case"keyup":return If.indexOf(t.keyCode)!==-1;case"keydown":return t.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function Qs(e){return e=e.detail,typeof e=="object"&&"data"in e?e.data:null}var It=!1;function Uf(e,t){switch(e){case"compositionend":return Qs(t);case"keypress":return t.which!==32?null:(lu=!0,ru);case"textInput":return e=t.data,e===ru&&lu?null:e;default:return null}}function $f(e,t){if(It)return e==="compositionend"||!oo&&Ws(e,t)?(e=Bs(),Er=ro=tt=null,It=!1,e):null;switch(e){case"paste":return null;case"keypress":if(!(t.ctrlKey||t.altKey||t.metaKey)||t.ctrlKey&&t.altKey){if(t.char&&1=t)return{node:n,offset:t-e};e=r}e:{for(;n;){if(n.nextSibling){n=n.nextSibling;break e}n=n.parentNode}n=void 0}n=su(n)}}function Gs(e,t){return e&&t?e===t?!0:e&&e.nodeType===3?!1:t&&t.nodeType===3?Gs(e,t.parentNode):"contains"in e?e.contains(t):e.compareDocumentPosition?!!(e.compareDocumentPosition(t)&16):!1:!1}function Zs(){for(var e=window,t=Rr();t instanceof e.HTMLIFrameElement;){try{var n=typeof t.contentWindow.location.href=="string"}catch{n=!1}if(n)e=t.contentWindow;else break;t=Rr(e.document)}return t}function uo(e){var t=e&&e.nodeName&&e.nodeName.toLowerCase();return t&&(t==="input"&&(e.type==="text"||e.type==="search"||e.type==="tel"||e.type==="url"||e.type==="password")||t==="textarea"||e.contentEditable==="true")}function Xf(e){var t=Zs(),n=e.focusedElem,r=e.selectionRange;if(t!==n&&n&&n.ownerDocument&&Gs(n.ownerDocument.documentElement,n)){if(r!==null&&uo(n)){if(t=r.start,e=r.end,e===void 0&&(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,e.getSelection){e=e.getSelection();var l=n.textContent.length,i=Math.min(r.start,l);r=r.end===void 0?i:Math.min(r.end,l),!e.extend&&i>r&&(l=r,r=i,i=l),l=au(n,i);var o=au(n,r);l&&o&&(e.rangeCount!==1||e.anchorNode!==l.node||e.anchorOffset!==l.offset||e.focusNode!==o.node||e.focusOffset!==o.offset)&&(t=t.createRange(),t.setStart(l.node,l.offset),e.removeAllRanges(),i>r?(e.addRange(t),e.extend(o.node,o.offset)):(t.setEnd(o.node,o.offset),e.addRange(t)))}}for(t=[],e=n;e=e.parentNode;)e.nodeType===1&&t.push({element:e,left:e.scrollLeft,top:e.scrollTop});for(typeof n.focus=="function"&&n.focus(),n=0;n=document.documentMode,Ft=null,hi=null,zn=null,vi=!1;function cu(e,t,n){var r=n.window===n?n.document:n.nodeType===9?n:n.ownerDocument;vi||Ft==null||Ft!==Rr(r)||(r=Ft,"selectionStart"in r&&uo(r)?r={start:r.selectionStart,end:r.selectionEnd}:(r=(r.ownerDocument&&r.ownerDocument.defaultView||window).getSelection(),r={anchorNode:r.anchorNode,anchorOffset:r.anchorOffset,focusNode:r.focusNode,focusOffset:r.focusOffset}),zn&&Vn(zn,r)||(zn=r,r=$r(hi,"onSelect"),0Vt||(e.current=xi[Vt],xi[Vt]=null,Vt--)}function M(e,t){Vt++,xi[Vt]=e.current,e.current=t}var pt={},le=ht(pt),fe=ht(!1),Nt=pt;function en(e,t){var n=e.type.contextTypes;if(!n)return pt;var r=e.stateNode;if(r&&r.__reactInternalMemoizedUnmaskedChildContext===t)return r.__reactInternalMemoizedMaskedChildContext;var l={},i;for(i in n)l[i]=t[i];return r&&(e=e.stateNode,e.__reactInternalMemoizedUnmaskedChildContext=t,e.__reactInternalMemoizedMaskedChildContext=l),l}function de(e){return e=e.childContextTypes,e!=null}function Ar(){I(fe),I(le)}function yu(e,t,n){if(le.current!==pt)throw Error(y(168));M(le,t),M(fe,n)}function ia(e,t,n){var r=e.stateNode;if(t=t.childContextTypes,typeof r.getChildContext!="function")return n;r=r.getChildContext();for(var l in r)if(!(l in t))throw Error(y(108,Bc(e)||"Unknown",l));return A({},n,r)}function Br(e){return e=(e=e.stateNode)&&e.__reactInternalMemoizedMergedChildContext||pt,Nt=le.current,M(le,e),M(fe,fe.current),!0}function gu(e,t,n){var r=e.stateNode;if(!r)throw Error(y(169));n?(e=ia(e,t,Nt),r.__reactInternalMemoizedMergedChildContext=e,I(fe),I(le),M(le,e)):I(fe),M(fe,n)}var Ve=null,cl=!1,Vl=!1;function oa(e){Ve===null?Ve=[e]:Ve.push(e)}function od(e){cl=!0,oa(e)}function vt(){if(!Vl&&Ve!==null){Vl=!0;var e=0,t=O;try{var n=Ve;for(O=1;e>=o,l-=o,Ae=1<<32-Te(t)+l|n<P?(H=N,N=null):H=N.sibling;var T=p(f,N,d[P],v);if(T===null){N===null&&(N=H);break}e&&N&&T.alternate===null&&t(f,N),a=i(T,a,P),_===null?E=T:_.sibling=T,_=T,N=H}if(P===d.length)return n(f,N),U&&wt(f,P),E;if(N===null){for(;PP?(H=N,N=null):H=N.sibling;var Ne=p(f,N,T.value,v);if(Ne===null){N===null&&(N=H);break}e&&N&&Ne.alternate===null&&t(f,N),a=i(Ne,a,P),_===null?E=Ne:_.sibling=Ne,_=Ne,N=H}if(T.done)return n(f,N),U&&wt(f,P),E;if(N===null){for(;!T.done;P++,T=d.next())T=h(f,T.value,v),T!==null&&(a=i(T,a,P),_===null?E=T:_.sibling=T,_=T);return U&&wt(f,P),E}for(N=r(f,N);!T.done;P++,T=d.next())T=w(N,f,P,T.value,v),T!==null&&(e&&T.alternate!==null&&N.delete(T.key===null?P:T.key),a=i(T,a,P),_===null?E=T:_.sibling=T,_=T);return e&&N.forEach(function(cn){return t(f,cn)}),U&&wt(f,P),E}function F(f,a,d,v){if(typeof d=="object"&&d!==null&&d.type===Dt&&d.key===null&&(d=d.props.children),typeof d=="object"&&d!==null){switch(d.$$typeof){case lr:e:{for(var E=d.key,_=a;_!==null;){if(_.key===E){if(E=d.type,E===Dt){if(_.tag===7){n(f,_.sibling),a=l(_,d.props.children),a.return=f,f=a;break e}}else if(_.elementType===E||typeof E=="object"&&E!==null&&E.$$typeof===Je&&_u(E)===_.type){n(f,_.sibling),a=l(_,d.props),a.ref=yn(f,_,d),a.return=f,f=a;break e}n(f,_);break}else t(f,_);_=_.sibling}d.type===Dt?(a=_t(d.props.children,f.mode,v,d.key),a.return=f,f=a):(v=Tr(d.type,d.key,d.props,null,f.mode,v),v.ref=yn(f,a,d),v.return=f,f=v)}return o(f);case Mt:e:{for(_=d.key;a!==null;){if(a.key===_)if(a.tag===4&&a.stateNode.containerInfo===d.containerInfo&&a.stateNode.implementation===d.implementation){n(f,a.sibling),a=l(a,d.children||[]),a.return=f,f=a;break e}else{n(f,a);break}else t(f,a);a=a.sibling}a=Xl(d,f.mode,v),a.return=f,f=a}return o(f);case Je:return _=d._init,F(f,a,_(d._payload),v)}if(kn(d))return S(f,a,d,v);if(dn(d))return k(f,a,d,v);hr(f,d)}return typeof d=="string"&&d!==""||typeof d=="number"?(d=""+d,a!==null&&a.tag===6?(n(f,a.sibling),a=l(a,d),a.return=f,f=a):(n(f,a),a=Yl(d,f.mode,v),a.return=f,f=a),o(f)):n(f,a)}return F}var nn=ma(!0),ha=ma(!1),er={},Ue=ht(er),Wn=ht(er),Qn=ht(er);function Et(e){if(e===er)throw Error(y(174));return e}function yo(e,t){switch(M(Qn,t),M(Wn,e),M(Ue,er),e=t.nodeType,e){case 9:case 11:t=(t=t.documentElement)?t.namespaceURI:ii(null,"");break;default:e=e===8?t.parentNode:t,t=e.namespaceURI||null,e=e.tagName,t=ii(t,e)}I(Ue),M(Ue,t)}function rn(){I(Ue),I(Wn),I(Qn)}function va(e){Et(Qn.current);var t=Et(Ue.current),n=ii(t,e.type);t!==n&&(M(Wn,e),M(Ue,n))}function go(e){Wn.current===e&&(I(Ue),I(Wn))}var $=ht(0);function Xr(e){for(var t=e;t!==null;){if(t.tag===13){var n=t.memoizedState;if(n!==null&&(n=n.dehydrated,n===null||n.data==="$?"||n.data==="$!"))return t}else if(t.tag===19&&t.memoizedProps.revealOrder!==void 0){if(t.flags&128)return t}else if(t.child!==null){t.child.return=t,t=t.child;continue}if(t===e)break;for(;t.sibling===null;){if(t.return===null||t.return===e)return null;t=t.return}t.sibling.return=t.return,t=t.sibling}return null}var Al=[];function wo(){for(var e=0;en?n:4,e(!0);var r=Bl.transition;Bl.transition={};try{e(!1),t()}finally{O=n,Bl.transition=r}}function Ra(){return _e().memoizedState}function cd(e,t,n){var r=ct(e);if(n={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null},Oa(e))Ma(t,n);else if(n=ca(e,t,n,r),n!==null){var l=oe();Re(n,e,r,l),Da(n,t,r)}}function fd(e,t,n){var r=ct(e),l={lane:r,action:n,hasEagerState:!1,eagerState:null,next:null};if(Oa(e))Ma(t,l);else{var i=e.alternate;if(e.lanes===0&&(i===null||i.lanes===0)&&(i=t.lastRenderedReducer,i!==null))try{var o=t.lastRenderedState,u=i(o,n);if(l.hasEagerState=!0,l.eagerState=u,Oe(u,o)){var s=t.interleaved;s===null?(l.next=l,ho(t)):(l.next=s.next,s.next=l),t.interleaved=l;return}}catch{}finally{}n=ca(e,t,l,r),n!==null&&(l=oe(),Re(n,e,r,l),Da(n,t,r))}}function Oa(e){var t=e.alternate;return e===V||t!==null&&t===V}function Ma(e,t){jn=Gr=!0;var n=e.pending;n===null?t.next=t:(t.next=n.next,n.next=t),e.pending=t}function Da(e,t,n){if(n&4194240){var r=t.lanes;r&=e.pendingLanes,n|=r,t.lanes=n,eo(e,n)}}var Zr={readContext:Ce,useCallback:te,useContext:te,useEffect:te,useImperativeHandle:te,useInsertionEffect:te,useLayoutEffect:te,useMemo:te,useReducer:te,useRef:te,useState:te,useDebugValue:te,useDeferredValue:te,useTransition:te,useMutableSource:te,useSyncExternalStore:te,useId:te,unstable_isNewReconciler:!1},dd={readContext:Ce,useCallback:function(e,t){return De().memoizedState=[e,t===void 0?null:t],e},useContext:Ce,useEffect:Pu,useImperativeHandle:function(e,t,n){return n=n!=null?n.concat([e]):null,Pr(4194308,4,Pa.bind(null,t,e),n)},useLayoutEffect:function(e,t){return Pr(4194308,4,e,t)},useInsertionEffect:function(e,t){return Pr(4,2,e,t)},useMemo:function(e,t){var n=De();return t=t===void 0?null:t,e=e(),n.memoizedState=[e,t],e},useReducer:function(e,t,n){var r=De();return t=n!==void 0?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=cd.bind(null,V,e),[r.memoizedState,e]},useRef:function(e){var t=De();return e={current:e},t.memoizedState=e},useState:Nu,useDebugValue:Co,useDeferredValue:function(e){return De().memoizedState=e},useTransition:function(){var e=Nu(!1),t=e[0];return e=ad.bind(null,e[1]),De().memoizedState=e,[t,e]},useMutableSource:function(){},useSyncExternalStore:function(e,t,n){var r=V,l=De();if(U){if(n===void 0)throw Error(y(407));n=n()}else{if(n=t(),J===null)throw Error(y(349));zt&30||wa(r,t,n)}l.memoizedState=n;var i={value:n,getSnapshot:t};return l.queue=i,Pu(ka.bind(null,r,i,e),[e]),r.flags|=2048,Xn(9,Sa.bind(null,r,i,n,t),void 0,null),n},useId:function(){var e=De(),t=J.identifierPrefix;if(U){var n=Be,r=Ae;n=(r&~(1<<32-Te(r)-1)).toString(32)+n,t=":"+t+"R"+n,n=Kn++,0<\/script>",e=e.removeChild(e.firstChild)):typeof r.is=="string"?e=o.createElement(n,{is:r.is}):(e=o.createElement(n),n==="select"&&(o=e,r.multiple?o.multiple=!0:r.size&&(o.size=r.size))):e=o.createElementNS(e,n),e[Ie]=t,e[Hn]=r,Wa(e,t,!1,!1),t.stateNode=e;e:{switch(o=ui(n,r),n){case"dialog":D("cancel",e),D("close",e),l=r;break;case"iframe":case"object":case"embed":D("load",e),l=r;break;case"video":case"audio":for(l=0;lon&&(t.flags|=128,r=!0,gn(i,!1),t.lanes=4194304)}else{if(!r)if(e=Xr(o),e!==null){if(t.flags|=128,r=!0,n=e.updateQueue,n!==null&&(t.updateQueue=n,t.flags|=4),gn(i,!0),i.tail===null&&i.tailMode==="hidden"&&!o.alternate&&!U)return ne(t),null}else 2*Q()-i.renderingStartTime>on&&n!==1073741824&&(t.flags|=128,r=!0,gn(i,!1),t.lanes=4194304);i.isBackwards?(o.sibling=t.child,t.child=o):(n=i.last,n!==null?n.sibling=o:t.child=o,i.last=o)}return i.tail!==null?(t=i.tail,i.rendering=t,i.tail=t.sibling,i.renderingStartTime=Q(),t.sibling=null,n=$.current,M($,r?n&1|2:n&1),t):(ne(t),null);case 22:case 23:return Lo(),r=t.memoizedState!==null,e!==null&&e.memoizedState!==null!==r&&(t.flags|=8192),r&&t.mode&1?me&1073741824&&(ne(t),t.subtreeFlags&6&&(t.flags|=8192)):ne(t),null;case 24:return null;case 25:return null}throw Error(y(156,t.tag))}function Sd(e,t){switch(ao(t),t.tag){case 1:return de(t.type)&&Ar(),e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 3:return rn(),I(fe),I(le),wo(),e=t.flags,e&65536&&!(e&128)?(t.flags=e&-65537|128,t):null;case 5:return go(t),null;case 13:if(I($),e=t.memoizedState,e!==null&&e.dehydrated!==null){if(t.alternate===null)throw Error(y(340));tn()}return e=t.flags,e&65536?(t.flags=e&-65537|128,t):null;case 19:return I($),null;case 4:return rn(),null;case 10:return mo(t.type._context),null;case 22:case 23:return Lo(),null;case 24:return null;default:return null}}var yr=!1,re=!1,kd=typeof WeakSet=="function"?WeakSet:Set,x=null;function Wt(e,t){var n=e.ref;if(n!==null)if(typeof n=="function")try{n(null)}catch(r){B(e,t,r)}else n.current=null}function Mi(e,t,n){try{n()}catch(r){B(e,t,r)}}var Iu=!1;function xd(e,t){if(yi=Fr,e=Zs(),uo(e)){if("selectionStart"in e)var n={start:e.selectionStart,end:e.selectionEnd};else e:{n=(n=e.ownerDocument)&&n.defaultView||window;var r=n.getSelection&&n.getSelection();if(r&&r.rangeCount!==0){n=r.anchorNode;var l=r.anchorOffset,i=r.focusNode;r=r.focusOffset;try{n.nodeType,i.nodeType}catch{n=null;break e}var o=0,u=-1,s=-1,c=0,m=0,h=e,p=null;t:for(;;){for(var w;h!==n||l!==0&&h.nodeType!==3||(u=o+l),h!==i||r!==0&&h.nodeType!==3||(s=o+r),h.nodeType===3&&(o+=h.nodeValue.length),(w=h.firstChild)!==null;)p=h,h=w;for(;;){if(h===e)break t;if(p===n&&++c===l&&(u=o),p===i&&++m===r&&(s=o),(w=h.nextSibling)!==null)break;h=p,p=h.parentNode}h=w}n=u===-1||s===-1?null:{start:u,end:s}}else n=null}n=n||{start:0,end:0}}else n=null;for(gi={focusedElem:e,selectionRange:n},Fr=!1,x=t;x!==null;)if(t=x,e=t.child,(t.subtreeFlags&1028)!==0&&e!==null)e.return=t,x=e;else for(;x!==null;){t=x;try{var S=t.alternate;if(t.flags&1024)switch(t.tag){case 0:case 11:case 15:break;case 1:if(S!==null){var k=S.memoizedProps,F=S.memoizedState,f=t.stateNode,a=f.getSnapshotBeforeUpdate(t.elementType===t.type?k:ze(t.type,k),F);f.__reactInternalSnapshotBeforeUpdate=a}break;case 3:var d=t.stateNode.containerInfo;d.nodeType===1?d.textContent="":d.nodeType===9&&d.documentElement&&d.removeChild(d.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(y(163))}}catch(v){B(t,t.return,v)}if(e=t.sibling,e!==null){e.return=t.return,x=e;break}x=t.return}return S=Iu,Iu=!1,S}function Ln(e,t,n){var r=t.updateQueue;if(r=r!==null?r.lastEffect:null,r!==null){var l=r=r.next;do{if((l.tag&e)===e){var i=l.destroy;l.destroy=void 0,i!==void 0&&Mi(t,n,i)}l=l.next}while(l!==r)}}function pl(e,t){if(t=t.updateQueue,t=t!==null?t.lastEffect:null,t!==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 Di(e){var t=e.ref;if(t!==null){var n=e.stateNode;switch(e.tag){case 5:e=n;break;default:e=n}typeof t=="function"?t(e):t.current=e}}function Ya(e){var t=e.alternate;t!==null&&(e.alternate=null,Ya(t)),e.child=null,e.deletions=null,e.sibling=null,e.tag===5&&(t=e.stateNode,t!==null&&(delete t[Ie],delete t[Hn],delete t[ki],delete t[ld],delete t[id])),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 e.tag===5||e.tag===3||e.tag===4}function Fu(e){e:for(;;){for(;e.sibling===null;){if(e.return===null||Xa(e.return))return null;e=e.return}for(e.sibling.return=e.return,e=e.sibling;e.tag!==5&&e.tag!==6&&e.tag!==18;){if(e.flags&2||e.child===null||e.tag===4)continue e;e.child.return=e,e=e.child}if(!(e.flags&2))return e.stateNode}}function Ii(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.nodeType===8?n.parentNode.insertBefore(e,t):n.insertBefore(e,t):(n.nodeType===8?(t=n.parentNode,t.insertBefore(e,n)):(t=n,t.appendChild(e)),n=n._reactRootContainer,n!=null||t.onclick!==null||(t.onclick=Vr));else if(r!==4&&(e=e.child,e!==null))for(Ii(e,t,n),e=e.sibling;e!==null;)Ii(e,t,n),e=e.sibling}function Fi(e,t,n){var r=e.tag;if(r===5||r===6)e=e.stateNode,t?n.insertBefore(e,t):n.appendChild(e);else if(r!==4&&(e=e.child,e!==null))for(Fi(e,t,n),e=e.sibling;e!==null;)Fi(e,t,n),e=e.sibling}var q=null,je=!1;function Ze(e,t,n){for(n=n.child;n!==null;)Ga(e,t,n),n=n.sibling}function Ga(e,t,n){if(Fe&&typeof Fe.onCommitFiberUnmount=="function")try{Fe.onCommitFiberUnmount(il,n)}catch{}switch(n.tag){case 5:re||Wt(n,t);case 6:var r=q,l=je;q=null,Ze(e,t,n),q=r,je=l,q!==null&&(je?(e=q,n=n.stateNode,e.nodeType===8?e.parentNode.removeChild(n):e.removeChild(n)):q.removeChild(n.stateNode));break;case 18:q!==null&&(je?(e=q,n=n.stateNode,e.nodeType===8?$l(e.parentNode,n):e.nodeType===1&&$l(e,n),Un(e)):$l(q,n.stateNode));break;case 4:r=q,l=je,q=n.stateNode.containerInfo,je=!0,Ze(e,t,n),q=r,je=l;break;case 0:case 11:case 14:case 15:if(!re&&(r=n.updateQueue,r!==null&&(r=r.lastEffect,r!==null))){l=r=r.next;do{var i=l,o=i.destroy;i=i.tag,o!==void 0&&(i&2||i&4)&&Mi(n,t,o),l=l.next}while(l!==r)}Ze(e,t,n);break;case 1:if(!re&&(Wt(n,t),r=n.stateNode,typeof r.componentWillUnmount=="function"))try{r.props=n.memoizedProps,r.state=n.memoizedState,r.componentWillUnmount()}catch(u){B(n,t,u)}Ze(e,t,n);break;case 21:Ze(e,t,n);break;case 22:n.mode&1?(re=(r=re)||n.memoizedState!==null,Ze(e,t,n),re=r):Ze(e,t,n);break;default:Ze(e,t,n)}}function Uu(e){var t=e.updateQueue;if(t!==null){e.updateQueue=null;var n=e.stateNode;n===null&&(n=e.stateNode=new kd),t.forEach(function(r){var l=Td.bind(null,e,r);n.has(r)||(n.add(r),r.then(l,l))})}}function Pe(e,t){var n=t.deletions;if(n!==null)for(var r=0;rl&&(l=o),r&=~i}if(r=l,r=Q()-r,r=(120>r?120:480>r?480:1080>r?1080:1920>r?1920:3e3>r?3e3:4320>r?4320:1960*Cd(r/1960))-r,10e?16:e,nt===null)var r=!1;else{if(e=nt,nt=null,br=0,R&6)throw Error(y(331));var l=R;for(R|=4,x=e.current;x!==null;){var i=x,o=i.child;if(x.flags&16){var u=i.deletions;if(u!==null){for(var s=0;sQ()-zo?Ct(e,0):Po|=n),pe(e,t)}function rc(e,t){t===0&&(e.mode&1?(t=sr,sr<<=1,!(sr&130023424)&&(sr=4194304)):t=1);var n=oe();e=Ke(e,t),e!==null&&(Jn(e,t,n),pe(e,n))}function Ld(e){var t=e.memoizedState,n=0;t!==null&&(n=t.retryLane),rc(e,n)}function Td(e,t){var n=0;switch(e.tag){case 13:var r=e.stateNode,l=e.memoizedState;l!==null&&(n=l.retryLane);break;case 19:r=e.stateNode;break;default:throw Error(y(314))}r!==null&&r.delete(t),rc(e,n)}var lc;lc=function(e,t,n){if(e!==null)if(e.memoizedProps!==t.pendingProps||fe.current)ce=!0;else{if(!(e.lanes&n)&&!(t.flags&128))return ce=!1,gd(e,t,n);ce=!!(e.flags&131072)}else ce=!1,U&&t.flags&1048576&&ua(t,Wr,t.index);switch(t.lanes=0,t.tag){case 2:var r=t.type;zr(e,t),e=t.pendingProps;var l=en(t,le.current);Jt(t,n),l=ko(null,t,r,e,l,n);var i=xo();return t.flags|=1,typeof l=="object"&&l!==null&&typeof l.render=="function"&&l.$$typeof===void 0?(t.tag=1,t.memoizedState=null,t.updateQueue=null,de(r)?(i=!0,Br(t)):i=!1,t.memoizedState=l.state!==null&&l.state!==void 0?l.state:null,vo(t),l.updater=fl,t.stateNode=l,l._reactInternals=t,Pi(t,r,e,n),t=Li(null,t,r,!0,i,n)):(t.tag=0,U&&i&&so(t),ie(null,t,l,n),t=t.child),t;case 16:r=t.elementType;e:{switch(zr(e,t),e=t.pendingProps,l=r._init,r=l(r._payload),t.type=r,l=t.tag=Od(r),e=ze(r,e),l){case 0:t=ji(null,t,r,e,n);break e;case 1:t=Ou(null,t,r,e,n);break e;case 11:t=Tu(null,t,r,e,n);break e;case 14:t=Ru(null,t,r,ze(r.type,e),n);break e}throw Error(y(306,r,""))}return t;case 0:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),ji(e,t,r,l,n);case 1:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Ou(e,t,r,l,n);case 3:e:{if(Aa(t),e===null)throw Error(y(387));r=t.pendingProps,i=t.memoizedState,l=i.element,fa(e,t),Yr(t,r,null,n);var o=t.memoizedState;if(r=o.element,i.isDehydrated)if(i={element:r,isDehydrated:!1,cache:o.cache,pendingSuspenseBoundaries:o.pendingSuspenseBoundaries,transitions:o.transitions},t.updateQueue.baseState=i,t.memoizedState=i,t.flags&256){l=ln(Error(y(423)),t),t=Mu(e,t,r,n,l);break e}else if(r!==l){l=ln(Error(y(424)),t),t=Mu(e,t,r,n,l);break e}else for(he=ut(t.stateNode.containerInfo.firstChild),ve=t,U=!0,Le=null,n=ha(t,null,r,n),t.child=n;n;)n.flags=n.flags&-3|4096,n=n.sibling;else{if(tn(),r===l){t=Ye(e,t,n);break e}ie(e,t,r,n)}t=t.child}return t;case 5:return va(t),e===null&&Ci(t),r=t.type,l=t.pendingProps,i=e!==null?e.memoizedProps:null,o=l.children,wi(r,l)?o=null:i!==null&&wi(r,i)&&(t.flags|=32),Va(e,t),ie(e,t,o,n),t.child;case 6:return e===null&&Ci(t),null;case 13:return Ba(e,t,n);case 4:return yo(t,t.stateNode.containerInfo),r=t.pendingProps,e===null?t.child=nn(t,null,r,n):ie(e,t,r,n),t.child;case 11:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),Tu(e,t,r,l,n);case 7:return ie(e,t,t.pendingProps,n),t.child;case 8:return ie(e,t,t.pendingProps.children,n),t.child;case 12:return ie(e,t,t.pendingProps.children,n),t.child;case 10:e:{if(r=t.type._context,l=t.pendingProps,i=t.memoizedProps,o=l.value,M(Qr,r._currentValue),r._currentValue=o,i!==null)if(Oe(i.value,o)){if(i.children===l.children&&!fe.current){t=Ye(e,t,n);break e}}else for(i=t.child,i!==null&&(i.return=t);i!==null;){var u=i.dependencies;if(u!==null){o=i.child;for(var s=u.firstContext;s!==null;){if(s.context===r){if(i.tag===1){s=He(-1,n&-n),s.tag=2;var c=i.updateQueue;if(c!==null){c=c.shared;var m=c.pending;m===null?s.next=s:(s.next=m.next,m.next=s),c.pending=s}}i.lanes|=n,s=i.alternate,s!==null&&(s.lanes|=n),_i(i.return,n,t),u.lanes|=n;break}s=s.next}}else if(i.tag===10)o=i.type===t.type?null:i.child;else if(i.tag===18){if(o=i.return,o===null)throw Error(y(341));o.lanes|=n,u=o.alternate,u!==null&&(u.lanes|=n),_i(o,n,t),o=i.sibling}else o=i.child;if(o!==null)o.return=i;else for(o=i;o!==null;){if(o===t){o=null;break}if(i=o.sibling,i!==null){i.return=o.return,o=i;break}o=o.return}i=o}ie(e,t,l.children,n),t=t.child}return t;case 9:return l=t.type,r=t.pendingProps.children,Jt(t,n),l=Ce(l),r=r(l),t.flags|=1,ie(e,t,r,n),t.child;case 14:return r=t.type,l=ze(r,t.pendingProps),l=ze(r.type,l),Ru(e,t,r,l,n);case 15:return Ua(e,t,t.type,t.pendingProps,n);case 17:return r=t.type,l=t.pendingProps,l=t.elementType===r?l:ze(r,l),zr(e,t),t.tag=1,de(r)?(e=!0,Br(t)):e=!1,Jt(t,n),pa(t,r,l),Pi(t,r,l,n),Li(null,t,r,!0,e,n);case 19:return Ha(e,t,n);case 22:return $a(e,t,n)}throw Error(y(156,t.tag))};function ic(e,t){return Ts(e,t)}function Rd(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 xe(e,t,n,r){return new Rd(e,t,n,r)}function Ro(e){return e=e.prototype,!(!e||!e.isReactComponent)}function Od(e){if(typeof e=="function")return Ro(e)?1:0;if(e!=null){if(e=e.$$typeof,e===Zi)return 11;if(e===Ji)return 14}return 2}function ft(e,t){var n=e.alternate;return n===null?(n=xe(e.tag,t,e.key,e.mode),n.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=e.flags&14680064,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=t===null?null:{lanes:t.lanes,firstContext:t.firstContext},n.sibling=e.sibling,n.index=e.index,n.ref=e.ref,n}function Tr(e,t,n,r,l,i){var o=2;if(r=e,typeof e=="function")Ro(e)&&(o=1);else if(typeof e=="string")o=5;else e:switch(e){case Dt:return _t(n.children,l,i,t);case Gi:o=8,l|=8;break;case Jl:return e=xe(12,n,t,l|2),e.elementType=Jl,e.lanes=i,e;case ql:return e=xe(13,n,t,l),e.elementType=ql,e.lanes=i,e;case bl:return e=xe(19,n,t,l),e.elementType=bl,e.lanes=i,e;case ms:return hl(n,l,i,t);default:if(typeof e=="object"&&e!==null)switch(e.$$typeof){case ds:o=10;break e;case ps:o=9;break e;case Zi:o=11;break e;case Ji:o=14;break e;case Je:o=16,r=null;break e}throw Error(y(130,e==null?e:typeof e,""))}return t=xe(o,n,t,l),t.elementType=e,t.type=r,t.lanes=i,t}function _t(e,t,n,r){return e=xe(7,e,r,t),e.lanes=n,e}function hl(e,t,n,r){return e=xe(22,e,r,t),e.elementType=ms,e.lanes=n,e.stateNode={isHidden:!1},e}function Yl(e,t,n){return e=xe(6,e,null,t),e.lanes=n,e}function Xl(e,t,n){return t=xe(4,e.children!==null?e.children:[],e.key,t),t.lanes=n,t.stateNode={containerInfo:e.containerInfo,pendingChildren:null,implementation:e.implementation},t}function Md(e,t,n,r,l){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=zl(0),this.expirationTimes=zl(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=zl(0),this.identifierPrefix=r,this.onRecoverableError=l,this.mutableSourceEagerHydrationData=null}function Oo(e,t,n,r,l,i,o,u,s){return e=new Md(e,t,n,u,s),t===1?(t=1,i===!0&&(t|=8)):t=0,i=xe(3,null,null,t),e.current=i,i.stateNode=e,i.memoizedState={element:r,isDehydrated:n,cache:null,transitions:null,pendingSuspenseBoundaries:null},vo(i),e}function Dd(e,t,n){var r=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(ac)}catch(e){console.error(e)}}ac(),us.exports=ge;var Vd=us.exports,Ku=Vd;Gl.createRoot=Ku.createRoot,Gl.hydrateRoot=Ku.hydrateRoot;const Ad=""+new URL("whipSmack-C7QG-Ffb.mp3",import.meta.url).href,Bd=""+new URL("GoodyBooby300-Dd9Vgh2s.jpg",import.meta.url).href,Hd=""+new URL("FrankenDrink300-CTcOuElH.jpg",import.meta.url).href,Wd=""+new URL("FrankenColumbus300-2-Aefr95.jpg",import.meta.url).href,Qd=""+new URL("FrankenBride300-DlV4OIfT.jpg",import.meta.url).href,Kd=""+new URL("Choctaw300-DBQ0t9wn.jpg",import.meta.url).href;function Yd(){new Audio(Ad).play()}const Xd=()=>g.jsx("div",{children:g.jsxs("div",{className:"container ",children:[g.jsx("br",{}),g.jsxs("div",{className:"m-0 px-4 py-3 sm:px-8 ",children:[g.jsx("a",{className:"cubeLink",href:"https://Mybabb.com",target:"_blank",rel:"noopener noreferrer",onClick:Yd,children:g.jsx("div",{className:"outerCubeDiv",children:g.jsxs("div",{className:"cube",children:[g.jsx("div",{className:"top",children:g.jsx("img",{className:"Top",src:Kd,alt:"Top",height:"300",width:"300"})}),g.jsxs("div",{className:"boxSides",children:[g.jsx("span",{className:"Side1 border-b-2 border-[#2dd760]",style:{"--i":1},children:g.jsx("img",{src:Hd,alt:"Side1",height:"300",width:"300"})}),g.jsx("span",{className:"Side2 border-b-2 border-[#2dd760]",style:{"--i":2},children:g.jsx("img",{src:Bd,alt:"Side2",height:"300",width:"300"})}),g.jsx("span",{className:"Side4 border-b-2 border-[#2dd760]",style:{"--i":4},children:g.jsx("img",{src:Wd,alt:"Side4",height:"300",width:"300"})}),g.jsx("span",{className:"side3 border-b-2 border-[#2dd760]",style:{"--i":3},children:g.jsx("img",{src:Qd,alt:"Side3",height:"300",width:"300"})})]})]})})}),g.jsx("p",{className:"fixed bottom-0 right-5 whitespace-nowrap text-[#abdbee]",children:g.jsxs("span",{className:"text-[8px] text-[#abdbee] sm:text-[10px] lg:text-sm",children:["<<<©",g.jsx("span",{className:"text-orange-400",children:"MyBaBB"})," ",g.jsx("em",{children:"8-2023"}),">>>"]})})]})]})}),Gd=()=>{var e=new Date("october 24, 2024 00:00:00 PST").getTime(),t=setInterval(function(){var n=new Date().getTime(),r=e-n,l=Math.floor(r/(1e3*60*60*24)),i=Math.floor(r%(1e3*60*60*24)/(1e3*60*60)),o=Math.floor(r%(1e3*60*60)/(1e3*60)),u=o<10?"0"+o:o;document.getElementById("demo").innerHTML=` + ${l} +  days  + ${i} + : + ${u} +  hrs + `,r<0&&(clearInterval(t),document.getElementById("demo").innerHTML=" Everybody Get Along ")},1e3)};var cc={color:void 0,size:void 0,className:void 0,style:void 0,attr:void 0},Yu=rt.createContext&&rt.createContext(cc),Zd=["attr","size","title"];function Jd(e,t){if(e==null)return{};var n=qd(e,t),r,l;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(e);for(l=0;l=0)&&Object.prototype.propertyIsEnumerable.call(e,r)&&(n[r]=e[r])}return n}function qd(e,t){if(e==null)return{};var n={},r=Object.keys(e),l,i;for(i=0;i=0)&&(n[l]=e[l]);return n}function nl(){return nl=Object.assign?Object.assign.bind():function(e){for(var t=1;trt.createElement(t.tag,rl({key:n},t.attr),fc(t.child)))}function Ge(e){return t=>rt.createElement(np,nl({attr:rl({},e.attr)},t),fc(e.child))}function np(e){var t=n=>{var{attr:r,size:l,title:i}=e,o=Jd(e,Zd),u=l||n.size||"1em",s;return n.className&&(s=n.className),e.className&&(s=(s?s+" ":"")+e.className),rt.createElement("svg",nl({stroke:"currentColor",fill:"currentColor",strokeWidth:"0"},n.attr,r,o,{className:s,style:rl(rl({color:e.color||n.color},n.style),e.style),height:u,width:u,xmlns:"http://www.w3.org/2000/svg"}),i&&rt.createElement("title",null,i),e.children)};return Yu!==void 0?rt.createElement(Yu.Consumer,null,n=>t(n)):t(cc)}function rp(e){return Ge({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h384c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function lp(e){return Ge({tag:"svg",attr:{viewBox:"0 0 448 512"},child:[{tag:"path",attr:{d:"M416 208H272V64c0-17.67-14.33-32-32-32h-32c-17.67 0-32 14.33-32 32v144H32c-17.67 0-32 14.33-32 32v32c0 17.67 14.33 32 32 32h144v144c0 17.67 14.33 32 32 32h32c17.67 0 32-14.33 32-32V304h144c17.67 0 32-14.33 32-32v-32c0-17.67-14.33-32-32-32z"},child:[]}]})(e)}function ip(e){return Ge({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M466.27 225.31c4.674-22.647.864-44.538-8.99-62.99 2.958-23.868-4.021-48.565-17.34-66.99C438.986 39.423 404.117 0 327 0c-7 0-15 .01-22.22.01C201.195.01 168.997 40 128 40h-10.845c-5.64-4.975-13.042-8-21.155-8H32C14.327 32 0 46.327 0 64v240c0 17.673 14.327 32 32 32h64c11.842 0 22.175-6.438 27.708-16h7.052c19.146 16.953 46.013 60.653 68.76 83.4 13.667 13.667 10.153 108.6 71.76 108.6 57.58 0 95.27-31.936 95.27-104.73 0-18.41-3.93-33.73-8.85-46.54h36.48c48.602 0 85.82-41.565 85.82-85.58 0-19.15-4.96-34.99-13.73-49.84zM64 296c-13.255 0-24-10.745-24-24s10.745-24 24-24 24 10.745 24 24-10.745 24-24 24zm330.18 16.73H290.19c0 37.82 28.36 55.37 28.36 94.54 0 23.75 0 56.73-47.27 56.73-18.91-18.91-9.46-66.18-37.82-94.54C206.9 342.89 167.28 272 138.92 272H128V85.83c53.611 0 100.001-37.82 171.64-37.82h37.82c35.512 0 60.82 17.12 53.12 65.9 15.2 8.16 26.5 36.44 13.94 57.57 21.581 20.384 18.699 51.065 5.21 65.62 9.45 0 22.36 18.91 22.27 37.81-.09 18.91-16.71 37.82-37.82 37.82z"},child:[]}]})(e)}function op(e){return Ge({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{d:"M466.27 286.69C475.04 271.84 480 256 480 236.85c0-44.015-37.218-85.58-85.82-85.58H357.7c4.92-12.81 8.85-28.13 8.85-46.54C366.55 31.936 328.86 0 271.28 0c-61.607 0-58.093 94.933-71.76 108.6-22.747 22.747-49.615 66.447-68.76 83.4H32c-17.673 0-32 14.327-32 32v240c0 17.673 14.327 32 32 32h64c14.893 0 27.408-10.174 30.978-23.95 44.509 1.001 75.06 39.94 177.802 39.94 7.22 0 15.22.01 22.22.01 77.117 0 111.986-39.423 112.94-95.33 13.319-18.425 20.299-43.122 17.34-66.99 9.854-18.452 13.664-40.343 8.99-62.99zm-61.75 53.83c12.56 21.13 1.26 49.41-13.94 57.57 7.7 48.78-17.608 65.9-53.12 65.9h-37.82c-71.639 0-118.029-37.82-171.64-37.82V240h10.92c28.36 0 67.98-70.89 94.54-97.46 28.36-28.36 18.91-75.63 37.82-94.54 47.27 0 47.27 32.98 47.27 56.73 0 39.17-28.36 56.72-28.36 94.54h103.99c21.11 0 37.73 18.91 37.82 37.82.09 18.9-12.82 37.81-22.27 37.81 13.489 14.555 16.371 45.236-5.21 65.62zM88 432c0 13.255-10.745 24-24 24s-24-10.745-24-24 10.745-24 24-24 24 10.745 24 24z"},child:[]}]})(e)}const up=()=>g.jsx("div",{children:g.jsxs("div",{className:"post-ratings-container fixed bottom-2 ",children:[g.jsxs("div",{className:"post-rating",children:[g.jsx("span",{className:"post-rating-button material-symbols-outlined text-black",children:g.jsx(op,{})}),g.jsx("span",{className:"rating-count text-[#87ceeb] ",children:"1818"})]}),g.jsxs("div",{className:"post-rating",children:[g.jsx("span",{className:"post-rating-button material-symbols-outlined text-black",children:g.jsx(ip,{})}),g.jsx("span",{className:"rating-count text-[#87ceeb] ",children:"1"})]})]})});function sp(e){return Ge({tag:"svg",attr:{viewBox:"0 0 512 512"},child:[{tag:"path",attr:{fill:"none",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32",d:"M145.61 464h220.78c19.8 0 35.55-16.29 33.42-35.06C386.06 308 304 310 304 256s83.11-51 95.8-172.94c2-18.78-13.61-35.06-33.41-35.06H145.61c-19.8 0-35.37 16.28-33.41 35.06C124.89 205 208 201 208 256s-82.06 52-95.8 172.94c-2.14 18.77 13.61 35.06 33.41 35.06z"},child:[]},{tag:"path",attr:{d:"M343.3 432H169.13c-15.6 0-20-18-9.06-29.16C186.55 376 240 356.78 240 326V224c0-19.85-38-35-61.51-67.2-3.88-5.31-3.49-12.8 6.37-12.8h142.73c8.41 0 10.23 7.43 6.4 12.75C310.82 189 272 204.05 272 224v102c0 30.53 55.71 47 80.4 76.87 9.95 12.04 6.47 29.13-9.1 29.13z"},child:[]}]})(e)}const ap=""+new URL("wolf-whistle-BqoH1Rpj.wav",import.meta.url).href;function Gu(){new Audio(ap).play()}const cp=()=>g.jsx("div",{className:"fixed left-0 top-0 w-screen",children:g.jsxs("div",{className:"relative flex xxxs:justify-center sm:justify-between ",children:[g.jsx("div",{className:" w-fit sm:ml-4 ",children:g.jsx("a",{href:"https://Mybabb.com",target:"_blank",rel:"noopener noreferrer",onClick:Gu,className:` topParagraphWrapper \r + font-Kingthings_Petrock`,children:g.jsxs("p",{className:`topParagraph whitespace-nowrap \r + text-3xl sm:text-4xl md:text-5xl lg:text-6xl `,children:[" ",g.jsx("span",{className:"inline-block text-[#fcb54d] -mt-4 ",children:"Indigenous Day"})]})})}),g.jsx("div",{className:"demoWrapper ",children:g.jsx("a",{href:"https://Mybabb.com",target:"_blank",rel:"noopener noreferrer",onClick:Gu,children:g.jsxs("div",{className:" relative flex min-w-[225px] lg:min-w-[335px] ",children:[g.jsx("p",{id:"demo",className:`relative m-auto ml-8 flex w-full justify-start text-lg sm:text-lg md:ml-0 md:text-2xl lg:text-4xl\r + `}),g.jsx("span",{className:"clockIcon ",children:g.jsx(sp,{color:"lightgray"})})]})})})]})}),dc=""+new URL("PregnantLady-aQkl7n1m.svg",import.meta.url).href,fp=()=>g.jsx("div",{className:"scale-x-[-1]",children:g.jsx("img",{src:dc,alt:"Pregnant Lady Pointing Left",width:110,height:110})}),dp=()=>g.jsx("div",{className:"scale-x-[-1] ",children:g.jsx("img",{src:dc,alt:"Pregnant Lady Pointing Left",width:110,height:110})}),pp=""+new URL("MonsterMash-kqlCd7ew.mp3",import.meta.url).href,mp=""+new URL("SpookySound-CkzOD1HB.mp3",import.meta.url).href;function hp(e){return Ge({tag:"svg",attr:{viewBox:"0 0 24 24"},child:[{tag:"path",attr:{d:"m7.727 6.313-4.02-4.02-1.414 1.414 18 18 1.414-1.414-2.02-2.02A9.578 9.578 0 0 0 21.999 12c0-4.091-2.472-7.453-5.999-9v2c2.387 1.386 3.999 4.047 3.999 7a8.13 8.13 0 0 1-1.671 4.914l-1.286-1.286C17.644 14.536 18 13.19 18 12c0-1.771-.775-3.9-2-5v7.586l-2-2V2.132L7.727 6.313zM4 17h2.697L14 21.868v-3.747L3.102 7.223A1.995 1.995 0 0 0 2 9v6c0 1.103.897 2 2 2z"},child:[]}]})(e)}function vp(e){return Ge({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zM9 8.25a.75.75 0 00-.75.75v6c0 .414.336.75.75.75h.75a.75.75 0 00.75-.75V9a.75.75 0 00-.75-.75H9zm5.25 0a.75.75 0 00-.75.75v6c0 .414.336.75.75.75H15a.75.75 0 00.75-.75V9a.75.75 0 00-.75-.75h-.75z",clipRule:"evenodd"},child:[]}]})(e)}function yp(e){return Ge({tag:"svg",attr:{viewBox:"0 0 24 24",fill:"currentColor","aria-hidden":"true"},child:[{tag:"path",attr:{fillRule:"evenodd",d:"M2.25 12c0-5.385 4.365-9.75 9.75-9.75s9.75 4.365 9.75 9.75-4.365 9.75-9.75 9.75S2.25 17.385 2.25 12zm14.024-.983a1.125 1.125 0 010 1.966l-5.603 3.113A1.125 1.125 0 019 15.113V8.887c0-.857.921-1.4 1.671-.983l5.603 3.113z",clipRule:"evenodd"},child:[]}]})(e)}function gp(e){return Ge({tag:"svg",attr:{viewBox:"0 0 16 16",fill:"currentColor"},child:[{tag:"path",attr:{fillRule:"evenodd",clipRule:"evenodd",d:"M12.75 8a4.5 4.5 0 0 1-8.61 1.834l-1.391.565A6.001 6.001 0 0 0 14.25 8 6 6 0 0 0 3.5 4.334V2.5H2v4l.75.75h3.5v-1.5H4.352A4.5 4.5 0 0 1 12.75 8z"},child:[]}]})(e)}function wp(){const[e,t]=Kt.useState(!1),[n,r]=Kt.useState(1),l=Kt.useRef(null);function i(){e||(l.current=new Audio(pp),l.current.play(),l.current.addEventListener("ended",()=>{new Audio(mp).play()}),t(!0))}function o(){l.current&&(e?l.current.pause():l.current.play(),t(!e))}function u(){l.current&&(l.current.pause(),l.current.currentTime=0,t(!1))}function s(){if(l.current){const m=Math.min(n+.1,1);l.current.volume=m,r(m)}}function c(){if(l.current){const m=Math.max(n-.1,0);l.current.volume=m,r(m)}}return g.jsxs("div",{className:" relative mt-[3rem] flex w-fit justify-center",children:[g.jsx("button",{onClick:s,className:"volumeUp mr-[1rem] text-yellow-100 ",children:g.jsx(lp,{size:30})}),g.jsx("div",{className:"audio speaker flex w-fit ",children:e?g.jsx(g.Fragment,{children:g.jsx("button",{onClick:u,children:g.jsx(gp,{size:30,color:"#fef9c3 "})})}):g.jsx("button",{onClick:i,children:g.jsx(hp,{size:30,color:"#fef9c3 "})})}),g.jsx("div",{className:"pauseButton flex w-fit",children:g.jsx("button",{onClick:o,children:e?g.jsx(vp,{size:30,color:"#fef9c3 "}):g.jsx(yp,{size:30,color:"#fef9c3 "})})}),g.jsx("button",{onClick:c,className:"volumeDown ml-[1rem] text-yellow-100 ",children:g.jsx(rp,{size:30})})]})}const Sp=""+new URL("DyingCow-DXGcwpyN.mp3",import.meta.url).href;function Zu(){new Audio(Sp).play()}const kp=()=>g.jsx("div",{className:"fixed bottom-0 z-[5] h-[100px] w-screen",children:g.jsx("div",{children:g.jsxs("div",{className:"relative flex h-[50px] w-screen justify-between px-8",children:[g.jsx("a",{href:"https://resume-hub.mybabb.com/",target:"_blank",rel:"noopener noreferrer",onClick:Zu,children:g.jsx("div",{className:"dataToolTip81 font-Nosifer-Regular ","data-tool-tip":"Portfolio Hub ",children:g.jsx("div",{className:`forward relative bottom-12 left-0 z-40 inline-flex text-green-500\r + `,children:g.jsx(fp,{})})})}),g.jsx("div",{className:`addMusic relative top-[.2rem] m-auto flex \r + w-fit justify-center `,children:g.jsx(wp,{})}),g.jsx("a",{href:"https://mybabb.com",target:"_blank",rel:"noopener noreferrer",onClick:Zu,children:g.jsx("div",{className:"dataToolTip82 font-Nosifer-Regular ","data-tool-tip":"My Home Page",children:g.jsx("div",{className:`rewind relative bottom-12 right-0 z-40 inline-flex scale-x-[-1] text-green-500 \r + `,children:g.jsx(dp,{})})})})]})})});Gl.createRoot(document.getElementById("root")).render(g.jsxs(rt.StrictMode,{children:[g.jsx(cp,{}),g.jsx(Gd,{}),g.jsx(Xd,{}),g.jsx(up,{}),g.jsx(kp,{})]})); diff --git a/eyeball.bin b/eyeball.bin deleted file mode 100644 index 09374d4..0000000 Binary files a/eyeball.bin and /dev/null differ diff --git a/eyeball.gltf b/eyeball.gltf deleted file mode 100644 index c351987..0000000 --- a/eyeball.gltf +++ /dev/null @@ -1,388 +0,0 @@ -{ - "accessors": [ - { - "bufferView": 2, - "componentType": 5126, - "count": 687, - "max": [ - 0.9271240234375, - 0.9271240234375, - 1.0 - ], - "min": [ - -0.9271240234375, - -0.9271240234375, - -1.0 - ], - "type": "VEC3" - }, - { - "bufferView": 2, - "byteOffset": 8244, - "componentType": 5126, - "count": 687, - "max": [ - 1.0, - 1.0, - 1.0 - ], - "min": [ - -1.0, - -1.0, - -1.0 - ], - "type": "VEC3" - }, - { - "bufferView": 3, - "componentType": 5126, - "count": 687, - "max": [ - 0.6000658869743347, - 0.9999332427978516, - 0.9998639822006226, - 1.0 - ], - "min": [ - -0.5338601469993591, - -0.999729335308075, - -0.9998277425765991, - 1.0 - ], - "type": "VEC4" - }, - { - "bufferView": 1, - "componentType": 5126, - "count": 687, - "max": [ - 0.9788060188293457, - 1.0 - ], - "min": [ - 0.0, - 0.0 - ], - "type": "VEC2" - }, - { - "bufferView": 1, - "byteOffset": 5496, - "componentType": 5126, - "count": 687, - "max": [ - 0.9788060188293457, - 1.0 - ], - "min": [ - 0.0, - 0.0 - ], - "type": "VEC2" - }, - { - "bufferView": 1, - "byteOffset": 10992, - "componentType": 5126, - "count": 687, - "max": [ - 0.9788060188293457, - 1.0 - ], - "min": [ - 0.0, - 0.0 - ], - "type": "VEC2" - }, - { - "bufferView": 1, - "byteOffset": 16488, - "componentType": 5126, - "count": 687, - "max": [ - 0.9788060188293457, - 1.0 - ], - "min": [ - 0.0, - 0.0 - ], - "type": "VEC2" - }, - { - "bufferView": 1, - "byteOffset": 21984, - "componentType": 5126, - "count": 687, - "max": [ - 0.9788060188293457, - 1.0 - ], - "min": [ - 0.0, - 0.0 - ], - "type": "VEC2" - }, - { - "bufferView": 0, - "componentType": 5125, - "count": 3888, - "type": "SCALAR" - } - ], - "asset": { - "extras": { - "author": "memartel (https://sketchfab.com/memartel)", - "license": "CC-BY-4.0 (http://creativecommons.org/licenses/by/4.0/)", - "source": "https://sketchfab.com/3d-models/blue-eyeball-free-f3c0a0638e784fa0b018e1ad8856eb7a", - "title": "blue_eyeball_free" - }, - "generator": "Sketchfab-14.38.0", - "version": "2.0" - }, - "bufferViews": [ - { - "buffer": 0, - "byteLength": 15552, - "name": "floatBufferViews", - "target": 34963 - }, - { - "buffer": 0, - "byteLength": 27480, - "byteOffset": 15552, - "byteStride": 8, - "name": "floatBufferViews", - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 16488, - "byteOffset": 43032, - "byteStride": 12, - "name": "floatBufferViews", - "target": 34962 - }, - { - "buffer": 0, - "byteLength": 10992, - "byteOffset": 59520, - "byteStride": 16, - "name": "floatBufferViews", - "target": 34962 - } - ], - "buffers": [ - { - "byteLength": 70512, - "uri": "eyeball.bin" - } - ], - "images": [ - { - "uri": "textures/blinn2_baseColor.png" - }, - { - "uri": "textures/blinn2_metallicRoughness.png" - }, - { - "uri": "textures/blinn2_normal.png" - } - ], - "materials": [ - { - "alphaMode": "BLEND", - "doubleSided": true, - "name": "blinn2", - "normalTexture": { - "index": 2 - }, - "occlusionTexture": { - "index": 1 - }, - "pbrMetallicRoughness": { - "baseColorTexture": { - "index": 0 - }, - "metallicRoughnessTexture": { - "index": 1 - } - } - } - ], - "meshes": [ - { - "name": "Object_0", - "primitives": [ - { - "attributes": { - "NORMAL": 1, - "POSITION": 0, - "TANGENT": 2, - "TEXCOORD_0": 3, - "TEXCOORD_1": 4, - "TEXCOORD_2": 5, - "TEXCOORD_3": 6, - "TEXCOORD_4": 7 - }, - "indices": 8, - "material": 0, - "mode": 4 - } - ] - } - ], - "nodes": [ - { - "children": [ - 1 - ], - "matrix": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 2.220446049250313e-16, - -1.0, - 0.0, - 0.0, - 1.0, - 2.220446049250313e-16, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "name": "Sketchfab_model" - }, - { - "children": [ - 2 - ], - "name": "root" - }, - { - "children": [ - 3 - ], - "matrix": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 2.220446049250313e-16, - 1.0, - 0.0, - 0.0, - -1.0, - 2.220446049250313e-16, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "name": "GLTF_SceneRootNode" - }, - { - "children": [ - 4 - ], - "matrix": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - 2.220446049250313e-16, - -1.0, - 0.0, - 0.0, - 1.0, - 2.220446049250313e-16, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "name": "Sketchfab_model_0" - }, - { - "children": [ - 5 - ], - "matrix": [ - 1.0, - 0.0, - 0.0, - 0.0, - 0.0, - -4.371138828673793e-08, - 1.0, - 0.0, - 0.0, - -1.0, - -4.371138828673793e-08, - 0.0, - 0.0, - 0.0, - 0.0, - 1.0 - ], - "name": "Collada visual scene group_1" - }, - { - "children": [ - 6 - ], - "name": "low_2" - }, - { - "children": [ - 7 - ], - "name": "defaultMaterial_3" - }, - { - "mesh": 0, - "name": "Object_7" - } - ], - "samplers": [ - { - "magFilter": 9729, - "minFilter": 9987, - "wrapS": 10497, - "wrapT": 10497 - } - ], - "scene": 0, - "scenes": [ - { - "name": "Sketchfab_Scene", - "nodes": [ - 0 - ] - } - ], - "textures": [ - { - "sampler": 0, - "source": 0 - }, - { - "sampler": 0, - "source": 1 - }, - { - "sampler": 0, - "source": 2 - } - ] -} diff --git a/index.html b/index.html index 3cd8463..41d7d47 100644 --- a/index.html +++ b/index.html @@ -39,8 +39,8 @@ Franken-Timer 🌙 - - + +
diff --git a/textures/blinn2_baseColor.png b/textures/blinn2_baseColor.png deleted file mode 100644 index c17c4c9..0000000 Binary files a/textures/blinn2_baseColor.png and /dev/null differ diff --git a/textures/blinn2_metallicRoughness.png b/textures/blinn2_metallicRoughness.png deleted file mode 100644 index a7baa45..0000000 Binary files a/textures/blinn2_metallicRoughness.png and /dev/null differ diff --git a/textures/blinn2_normal.png b/textures/blinn2_normal.png deleted file mode 100644 index 9228929..0000000 Binary files a/textures/blinn2_normal.png and /dev/null differ