diff --git a/assets/anim-bg-41fcb528.gif b/assets/anim-bg-41fcb528.gif deleted file mode 100644 index c4c37ea..0000000 Binary files a/assets/anim-bg-41fcb528.gif and /dev/null differ diff --git a/assets/index-557f8801.css b/assets/index-557f8801.css new file mode 100644 index 0000000..49d9888 --- /dev/null +++ b/assets/index-557f8801.css @@ -0,0 +1 @@ +@import"https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap";.vertical-timeline *{-webkit-box-sizing:border-box;box-sizing:border-box}.vertical-timeline{width:95%;max-width:1170px;margin:0 auto;position:relative;padding:2em 0}.vertical-timeline:after{content:"";display:table;clear:both}.vertical-timeline:before{content:"";position:absolute;top:0;left:18px;height:100%;width:4px;background:var(--line-color)}.vertical-timeline.vertical-timeline--one-column-right:before{right:18px;left:unset}@media only screen and (min-width:1170px){.vertical-timeline.vertical-timeline--two-columns{width:90%}.vertical-timeline.vertical-timeline--two-columns:before{left:50%;margin-left:-2px}}.vertical-timeline-element{position:relative;margin:2em 0}.vertical-timeline-element>div{min-height:1px}.vertical-timeline-element:after{content:"";display:table;clear:both}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}@media only screen and (min-width:1170px){.vertical-timeline-element{margin:4em 0}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}}.vertical-timeline-element-icon{position:absolute;top:0;left:0;width:40px;height:40px;border-radius:50%;-webkit-box-shadow:0 0 0 4px #fff,inset 0 2px 0 rgba(0,0,0,.08),0 3px 0 4px rgba(0,0,0,.05);box-shadow:0 0 0 4px #fff,inset 0 2px #00000014,0 3px 0 4px #0000000d}.vertical-timeline--one-column-right .vertical-timeline-element-icon{right:0;left:unset}.vertical-timeline-element-icon svg{display:block;width:24px;height:24px;position:relative;left:50%;top:50%;margin-left:-12px;margin-top:-12px}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-icon{width:60px;height:60px;left:50%;margin-left:-30px}}.vertical-timeline-element-icon{-webkit-transform:translateZ(0);-webkit-backface-visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.bounce-in{visibility:visible;-webkit-animation:cd-bounce-1 .6s;animation:cd-bounce-1 .6s}@-webkit-keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2)}to{-webkit-transform:scale(1)}}@keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);transform:scale(1)}}.vertical-timeline-element-content{position:relative;margin-left:60px;background:#fff;border-radius:.25em;padding:1em;-webkit-box-shadow:0 3px 0 #ddd;box-shadow:0 3px #ddd}.vertical-timeline--one-column-right .vertical-timeline-element-content{margin-right:60px;margin-left:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content{background:0 0;-webkit-box-shadow:none;box-shadow:none}.vertical-timeline-element-content:after{content:"";display:table;clear:both}.vertical-timeline-element-content h2{color:#303e49}.vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline-element-content p{font-size:13px;font-size:.8125rem;font-weight:500}.vertical-timeline-element-content .vertical-timeline-element-date{display:inline-block}.vertical-timeline-element-content p{margin:1em 0 0;line-height:1.6}.vertical-timeline-element-title,.vertical-timeline-element-subtitle{margin:0}.vertical-timeline-element-content .vertical-timeline-element-date{float:left;padding:.8em 0;opacity:.7}.vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:100%;height:0;width:0;border:7px solid transparent;border-right:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:unset;left:100%;height:0;width:0;border:7px solid transparent;border-left:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content:before{left:100%;border-left:7px solid #fff;border-right:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content:before{display:none}.vertical-timeline-element--no-children .vertical-timeline-element-content-arrow{display:none}@media only screen and (min-width:768px){.vertical-timeline-element-content h2{font-size:20px;font-size:1.25rem}.vertical-timeline-element-content p{font-size:16px;font-size:1rem}.vertical-timeline-element-content .vertical-timeline-element-date{font-size:14px;font-size:.875rem}}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-content{margin-left:0;padding:1.5em;width:44%}.vertical-timeline--two-columns .vertical-timeline-element-content-arrow{top:24px;left:100%;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vertical-timeline--two-columns .vertical-timeline-element-content .vertical-timeline-element-date{position:absolute;width:100%;left:124%;top:6px;font-size:16px;font-size:1rem}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content{float:right}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:auto;right:100%;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--one-column-right .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--one-column-right .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:100%;right:auto;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content .vertical-timeline-element-date{left:auto;right:124%;text-align:right}}.vertical-timeline--animate .vertical-timeline-element-content.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2 .6s;animation:cd-bounce-2 .6s}@media only screen and (min-width:1170px){.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content.bounce-in,.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content.bounce-in{-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@media only screen and (max-width:1169px){.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@-webkit-keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px)}60%{opacity:1;-webkit-transform:translateX(20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px);transform:translate(-100px)}60%{opacity:1;-webkit-transform:translateX(20px);transform:translate(20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}@-webkit-keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px)}60%{opacity:1;-webkit-transform:translateX(-20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px);transform:translate(100px)}60%{opacity:1;-webkit-transform:translateX(-20px);transform:translate(-20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-top-10{top:-2.5rem}.-top-12{top:-3rem}.bottom-10{bottom:2.5rem}.bottom-32{bottom:8rem}.right-0{right:0}.right-10{right:2.5rem}.right-40{right:10rem}.top-0{top:0}.top-20{top:5rem}.top-60{top:15rem}.top-\[120px\]{top:120px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.-m-5{margin:-1.25rem}.m-3{margin:.75rem}.m-auto{margin:auto}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-20{margin-top:5rem;margin-bottom:5rem}.mb-1{margin-bottom:.25rem}.mb-2{margin-bottom:.5rem}.mb-5{margin-bottom:1.25rem}.ml-5{margin-left:1.25rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-1\/2{height:50%}.h-10{height:2.5rem}.h-16{height:4rem}.h-3{height:.75rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-96{height:24rem}.h-\[117px\]{height:117px}.h-\[230px\]{height:230px}.h-\[28px\]{height:28px}.h-\[400px\]{height:400px}.h-\[64px\]{height:64px}.h-\[75\%\]{height:75%}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[280px\]{min-height:280px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-16{width:4rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-72{width:18rem}.w-\[150px\]{width:150px}.w-\[28px\]{width:28px}.w-\[35px\]{width:35px}.w-\[70\%\]{width:70%}.w-\[75\%\]{width:75%}.w-\[90\%\]{width:90%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-\[140px\]{min-width:140px}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.max-w-screen-lg{max-width:1024px}.max-w-screen-xl{max-width:1280px}.flex-1{flex:1 1 0%}.flex-\[0\.75\]{flex:.75}.cursor-pointer{cursor:pointer}.resize{resize:both}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-evenly{justify-content:space-evenly}.gap-1{gap:.25rem}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-5{gap:1.25rem}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-20>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.space-y-8>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[20px\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border-2{border-width:2px}.border-4{border-width:4px}.border-none{border-style:none}.border-\[\#373737\]{--tw-border-opacity: 1;border-color:rgb(55 55 55 / var(--tw-border-opacity))}.border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.bg-\[\#373737\]{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-\[\#fff2f2\]{--tw-bg-opacity: 1;background-color:rgb(255 242 242 / var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(246 246 246 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-60{--tw-bg-opacity: .6}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#f6f6f6\]{--tw-gradient-from: #f6f6f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(246 246 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-primary{--tw-gradient-to: #f6f6f6 var(--tw-gradient-to-position)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.bg-cover{background-size:cover}.bg-center{background-position:center}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-12{padding:3rem}.p-2{padding:.5rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-12{padding-left:3rem;padding-right:3rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-12{padding-top:3rem;padding-bottom:3rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-10{padding-bottom:2.5rem}.pl-1{padding-left:.25rem}.text-center{text-align:center}.text-5xl{font-size:3rem;line-height:1}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[20px\]{font-size:20px}.text-\[24px\]{font-size:24px}.text-\[30px\]{font-size:30px}.text-\[40px\]{font-size:40px}.text-xl{font-size:1.25rem;line-height:1.75rem}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-\[30px\]{line-height:30px}.tracking-wider{letter-spacing:.05em}.text-\[\#373737\]{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-\[\#dfd9ff\]{--tw-text-opacity: 1;color:rgb(223 217 255 / var(--tw-text-opacity))}.text-\[\#fcd4d4\]{--tw-text-opacity: 1;color:rgb(252 212 212 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-black-100{--tw-text-opacity: 1;color:rgb(16 13 37 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-secondary{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-white-100{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.underline-offset-8{text-underline-offset:8px}.shadow-card{--tw-shadow: 0px 35px 120px -15px #211e35;--tw-shadow-colored: 0px 35px 120px -15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-lg{--tw-shadow: 0 10px 15px -3px rgb(0 0 0 / .1), 0 4px 6px -4px rgb(0 0 0 / .1);--tw-shadow-colored: 0 10px 15px -3px var(--tw-shadow-color), 0 4px 6px -4px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[\#fcd4d4\]{--tw-shadow-color: #fcd4d4;--tw-shadow: var(--tw-shadow-colored)}.shadow-primary{--tw-shadow-color: #f6f6f6;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}*{margin:0;padding:0;box-sizing:border-box;font-family:Poppins,sans-serif;scroll-behavior:smooth}body{background:linear-gradient(180deg,#e6eaf5 0%,#f6f6f6 80%)}.hash-span{margin-top:-100px;padding-bottom:100px;display:block}.black-gradient{background:#000000;background:linear-gradient(to right,#434343,#000000)}.white-gradient{background:#ffffff;background:linear-gradient(to right,#e6eaf5,#f6f6f6)}.violet-gradient{background:linear-gradient(-90deg,#373737 0%,rgba(60,51,80,0) 100%);background:-webkit-linear-gradient(-90deg,#373737 0%,black 100%)}.green-pink-gradient{background:#00cea8;background:linear-gradient(90.13deg,#00cea8 1.9%,#bf61ff 97.5%);background:-webkit-linear-gradient(-90.13deg,#00cea8 1.9%,#bf61ff 97.5%)}.orange-text-gradient{background:#f12711;background:linear-gradient(to top,#f12711,#f5af19);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.green-text-gradient{background:#11998e;background:linear-gradient(to top,#11998e,#38ef7d);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.blue-text-gradient{background:#56ccf2;background:linear-gradient(to top,#2f80ed,#56ccf2);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.pink-text-gradient{background:#ec008c;background:linear-gradient(to top,#ec008c,#fc6767);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.canvas-loader{font-size:10px;width:1em;height:1em;border-radius:50%;position:relative;text-indent:-9999em;animation:mulShdSpin 1.1s infinite ease;transform:translateZ(0)}@keyframes mulShdSpin{0%,to{box-shadow:0 -2.6em #fff,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #ffffff80,-1.8em -1.8em #ffffffb3}12.5%{box-shadow:0 -2.6em #ffffffb3,1.8em -1.8em #fff,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #ffffff80}25%{box-shadow:0 -2.6em #ffffff80,1.8em -1.8em #ffffffb3,2.5em 0 #fff,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}37.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #ffffff80,2.5em 0 #ffffffb3,1.75em 1.75em #fff,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}50%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #ffffff80,1.75em 1.75em #ffffffb3,0 2.5em #fff,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}62.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #ffffff80,0 2.5em #ffffffb3,-1.8em 1.8em #fff,-2.6em 0 #fff3,-1.8em -1.8em #fff3}75%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #ffffff80,-1.8em 1.8em #ffffffb3,-2.6em 0 #fff,-1.8em -1.8em #fff3}87.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #ffffff80,-2.6em 0 #ffffffb3,-1.8em -1.8em #fff}}.funky-text-outline{text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff,2px 2px 0 #fff,-2px -2px 0 #fff,2px -2px 0 #fff,-2px 2px 0 #fff}.funky-text-outline-2{text-shadow:-3px -3px 0 #C0C0C0,3px -3px 0 #C0C0C0,-3px 3px 0 #C0C0C0,3px 3px 0 #C0C0C0}.placeholder\:text-white-100::-moz-placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.placeholder\:text-white-100::placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(22 101 52 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.hover\:text-white-100:hover{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width: 450px){.xs\:w-\[250px\]{width:250px}.xs\:text-\[20px\]{font-size:20px}.xs\:text-\[40px\]{font-size:40px}.xs\:text-\[50px\]{font-size:50px}}@media (min-width: 640px){.sm\:right-5{right:1.25rem}.sm\:top-20{top:5rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:h-80{height:20rem}.sm\:w-\[360px\]{width:360px}.sm\:px-16{padding-left:4rem;padding-right:4rem}.sm\:py-12{padding-top:3rem;padding-bottom:3rem}.sm\:py-16{padding-top:4rem;padding-bottom:4rem}.sm\:text-\[18px\]{font-size:18px}.sm\:text-\[26px\]{font-size:26px}.sm\:text-\[50px\]{font-size:50px}.sm\:text-\[60px\]{font-size:60px}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:-right-10{right:-2.5rem}.md\:-right-20{right:-5rem}.md\:bottom-0{bottom:0}.md\:right-1\/2{right:50%}.md\:top-10{top:2.5rem}.md\:top-2{top:.5rem}.md\:-m-10{margin:-2.5rem}.md\:mb-0{margin-bottom:0}.md\:block{display:block}.md\:flex{display:flex}.md\:max-w-3xl{max-width:48rem}.md\:max-w-\[50\%\]{max-width:50%}.md\:translate-x-1\/2{--tw-translate-x: 50%;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))}.md\: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))}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-col{flex-direction:column}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:gap-4{gap:1rem}.md\:space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.md\:text-\[60px\]{font-size:60px}}@media (min-width: 1024px){.lg\:top-\[100px\]{top:100px}.lg\:flex{display:flex}.lg\:h-\[400px\]{height:400px}.lg\:w-\[400px\]{width:400px}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:text-\[30px\]{font-size:30px}.lg\:text-\[80px\]{font-size:80px}.lg\:leading-\[40px\]{line-height:40px}.lg\:leading-\[98px\]{line-height:98px}}@media (min-width: 1280px){.xl\:mt-6{margin-top:1.5rem}} diff --git a/assets/index-7a5907f5.css b/assets/index-7a5907f5.css deleted file mode 100644 index 178f56f..0000000 --- a/assets/index-7a5907f5.css +++ /dev/null @@ -1 +0,0 @@ -@import"https://fonts.googleapis.com/css2?family=Poppins:wght@100;200;300;400;500;600;700;800;900&display=swap";.vertical-timeline *{-webkit-box-sizing:border-box;box-sizing:border-box}.vertical-timeline{width:95%;max-width:1170px;margin:0 auto;position:relative;padding:2em 0}.vertical-timeline:after{content:"";display:table;clear:both}.vertical-timeline:before{content:"";position:absolute;top:0;left:18px;height:100%;width:4px;background:var(--line-color)}.vertical-timeline.vertical-timeline--one-column-right:before{right:18px;left:unset}@media only screen and (min-width:1170px){.vertical-timeline.vertical-timeline--two-columns{width:90%}.vertical-timeline.vertical-timeline--two-columns:before{left:50%;margin-left:-2px}}.vertical-timeline-element{position:relative;margin:2em 0}.vertical-timeline-element>div{min-height:1px}.vertical-timeline-element:after{content:"";display:table;clear:both}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}@media only screen and (min-width:1170px){.vertical-timeline-element{margin:4em 0}.vertical-timeline-element:first-child{margin-top:0}.vertical-timeline-element:last-child{margin-bottom:0}}.vertical-timeline-element-icon{position:absolute;top:0;left:0;width:40px;height:40px;border-radius:50%;-webkit-box-shadow:0 0 0 4px #fff,inset 0 2px 0 rgba(0,0,0,.08),0 3px 0 4px rgba(0,0,0,.05);box-shadow:0 0 0 4px #fff,inset 0 2px #00000014,0 3px 0 4px #0000000d}.vertical-timeline--one-column-right .vertical-timeline-element-icon{right:0;left:unset}.vertical-timeline-element-icon svg{display:block;width:24px;height:24px;position:relative;left:50%;top:50%;margin-left:-12px;margin-top:-12px}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-icon{width:60px;height:60px;left:50%;margin-left:-30px}}.vertical-timeline-element-icon{-webkit-transform:translateZ(0);-webkit-backface-visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-icon.bounce-in{visibility:visible;-webkit-animation:cd-bounce-1 .6s;animation:cd-bounce-1 .6s}@-webkit-keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2)}to{-webkit-transform:scale(1)}}@keyframes cd-bounce-1{0%{opacity:0;-webkit-transform:scale(.5);transform:scale(.5)}60%{opacity:1;-webkit-transform:scale(1.2);transform:scale(1.2)}to{-webkit-transform:scale(1);transform:scale(1)}}.vertical-timeline-element-content{position:relative;margin-left:60px;background:#fff;border-radius:.25em;padding:1em;-webkit-box-shadow:0 3px 0 #ddd;box-shadow:0 3px #ddd}.vertical-timeline--one-column-right .vertical-timeline-element-content{margin-right:60px;margin-left:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content{background:0 0;-webkit-box-shadow:none;box-shadow:none}.vertical-timeline-element-content:after{content:"";display:table;clear:both}.vertical-timeline-element-content h2{color:#303e49}.vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline-element-content p{font-size:13px;font-size:.8125rem;font-weight:500}.vertical-timeline-element-content .vertical-timeline-element-date{display:inline-block}.vertical-timeline-element-content p{margin:1em 0 0;line-height:1.6}.vertical-timeline-element-title,.vertical-timeline-element-subtitle{margin:0}.vertical-timeline-element-content .vertical-timeline-element-date{float:left;padding:.8em 0;opacity:.7}.vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:100%;height:0;width:0;border:7px solid transparent;border-right:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content-arrow{content:"";position:absolute;top:16px;right:unset;left:100%;height:0;width:0;border:7px solid transparent;border-left:7px solid #fff}.vertical-timeline--one-column-right .vertical-timeline-element-content:before{left:100%;border-left:7px solid #fff;border-right:unset}.vertical-timeline-element--no-children .vertical-timeline-element-content:before{display:none}.vertical-timeline-element--no-children .vertical-timeline-element-content-arrow{display:none}@media only screen and (min-width:768px){.vertical-timeline-element-content h2{font-size:20px;font-size:1.25rem}.vertical-timeline-element-content p{font-size:16px;font-size:1rem}.vertical-timeline-element-content .vertical-timeline-element-date{font-size:14px;font-size:.875rem}}@media only screen and (min-width:1170px){.vertical-timeline--two-columns .vertical-timeline-element-content{margin-left:0;padding:1.5em;width:44%}.vertical-timeline--two-columns .vertical-timeline-element-content-arrow{top:24px;left:100%;-webkit-transform:rotate(180deg);transform:rotate(180deg)}.vertical-timeline--two-columns .vertical-timeline-element-content .vertical-timeline-element-date{position:absolute;width:100%;left:124%;top:6px;font-size:16px;font-size:1rem}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content{float:right}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:auto;right:100%;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--one-column-right .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content-arrow,.vertical-timeline--one-column-right .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content-arrow{top:24px;left:100%;right:auto;-webkit-transform:rotate(0);transform:rotate(0)}.vertical-timeline--two-columns .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content .vertical-timeline-element-date,.vertical-timeline--two-columns .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content .vertical-timeline-element-date{left:auto;right:124%;text-align:right}}.vertical-timeline--animate .vertical-timeline-element-content.is-hidden{visibility:hidden}.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2 .6s;animation:cd-bounce-2 .6s}@media only screen and (min-width:1170px){.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element.vertical-timeline-element--right .vertical-timeline-element-content.bounce-in,.vertical-timeline--two-columns.vertical-timeline--animate .vertical-timeline-element:nth-child(2n):not(.vertical-timeline-element--left) .vertical-timeline-element-content.bounce-in{-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@media only screen and (max-width:1169px){.vertical-timeline--animate .vertical-timeline-element-content.bounce-in{visibility:visible;-webkit-animation:cd-bounce-2-inverse .6s;animation:cd-bounce-2-inverse .6s}}@-webkit-keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px)}60%{opacity:1;-webkit-transform:translateX(20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2{0%{opacity:0;-webkit-transform:translateX(-100px);transform:translate(-100px)}60%{opacity:1;-webkit-transform:translateX(20px);transform:translate(20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}@-webkit-keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px)}60%{opacity:1;-webkit-transform:translateX(-20px)}to{-webkit-transform:translateX(0)}}@keyframes cd-bounce-2-inverse{0%{opacity:0;-webkit-transform:translateX(100px);transform:translate(100px)}60%{opacity:1;-webkit-transform:translateX(-20px);transform:translate(-20px)}to{-webkit-transform:translateX(0);transform:translate(0)}}*,:before,:after{box-sizing:border-box;border-width:0;border-style:solid;border-color:#e5e7eb}:before,:after{--tw-content: ""}html,:host{line-height:1.5;-webkit-text-size-adjust:100%;-moz-tab-size:4;-o-tab-size:4;tab-size:4;font-family:ui-sans-serif,system-ui,sans-serif,"Apple Color Emoji","Segoe UI Emoji",Segoe UI Symbol,"Noto Color Emoji";font-feature-settings:normal;font-variation-settings:normal;-webkit-tap-highlight-color:transparent}body{margin:0;line-height:inherit}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:ui-monospace,SFMono-Regular,Menlo,Monaco,Consolas,Liberation Mono,Courier New,monospace;font-feature-settings:normal;font-variation-settings:normal;font-size:1em}small{font-size:80%}sub,sup{font-size:75%;line-height:0;position:relative;vertical-align:baseline}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}button,input,optgroup,select,textarea{font-family:inherit;font-feature-settings:inherit;font-variation-settings:inherit;font-size:100%;font-weight:inherit;line-height:inherit;letter-spacing:inherit;color:inherit;margin:0;padding:0}button,select{text-transform:none}button,input:where([type=button]),input:where([type=reset]),input:where([type=submit]){-webkit-appearance:button;background-color:transparent;background-image:none}:-moz-focusring{outline:auto}:-moz-ui-invalid{box-shadow:none}progress{vertical-align:baseline}::-webkit-inner-spin-button,::-webkit-outer-spin-button{height:auto}[type=search]{-webkit-appearance:textfield;outline-offset:-2px}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-file-upload-button{-webkit-appearance:button;font:inherit}summary{display:list-item}blockquote,dl,dd,h1,h2,h3,h4,h5,h6,hr,figure,p,pre{margin:0}fieldset{margin:0;padding:0}legend{padding:0}ol,ul,menu{list-style:none;margin:0;padding:0}dialog{padding:0}textarea{resize:vertical}input::-moz-placeholder,textarea::-moz-placeholder{opacity:1;color:#9ca3af}input::placeholder,textarea::placeholder{opacity:1;color:#9ca3af}button,[role=button]{cursor:pointer}:disabled{cursor:default}img,svg,video,canvas,audio,iframe,embed,object{display:block;vertical-align:middle}img,video{max-width:100%;height:auto}[hidden]{display:none}*,:before,:after{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }::backdrop{--tw-border-spacing-x: 0;--tw-border-spacing-y: 0;--tw-translate-x: 0;--tw-translate-y: 0;--tw-rotate: 0;--tw-skew-x: 0;--tw-skew-y: 0;--tw-scale-x: 1;--tw-scale-y: 1;--tw-pan-x: ;--tw-pan-y: ;--tw-pinch-zoom: ;--tw-scroll-snap-strictness: proximity;--tw-gradient-from-position: ;--tw-gradient-via-position: ;--tw-gradient-to-position: ;--tw-ordinal: ;--tw-slashed-zero: ;--tw-numeric-figure: ;--tw-numeric-spacing: ;--tw-numeric-fraction: ;--tw-ring-inset: ;--tw-ring-offset-width: 0px;--tw-ring-offset-color: #fff;--tw-ring-color: rgb(59 130 246 / .5);--tw-ring-offset-shadow: 0 0 #0000;--tw-ring-shadow: 0 0 #0000;--tw-shadow: 0 0 #0000;--tw-shadow-colored: 0 0 #0000;--tw-blur: ;--tw-brightness: ;--tw-contrast: ;--tw-grayscale: ;--tw-hue-rotate: ;--tw-invert: ;--tw-saturate: ;--tw-sepia: ;--tw-drop-shadow: ;--tw-backdrop-blur: ;--tw-backdrop-brightness: ;--tw-backdrop-contrast: ;--tw-backdrop-grayscale: ;--tw-backdrop-hue-rotate: ;--tw-backdrop-invert: ;--tw-backdrop-opacity: ;--tw-backdrop-saturate: ;--tw-backdrop-sepia: ;--tw-contain-size: ;--tw-contain-layout: ;--tw-contain-paint: ;--tw-contain-style: }.visible{visibility:visible}.fixed{position:fixed}.absolute{position:absolute}.relative{position:relative}.inset-0{top:0;right:0;bottom:0;left:0}.-top-10{top:-2.5rem}.-top-12{top:-3rem}.bottom-32{bottom:8rem}.right-0{right:0}.right-40{right:10rem}.top-0{top:0}.top-20{top:5rem}.top-60{top:15rem}.top-\[120px\]{top:120px}.z-0{z-index:0}.z-10{z-index:10}.z-20{z-index:20}.z-50{z-index:50}.-m-5{margin:-1.25rem}.m-3{margin:.75rem}.mx-4{margin-left:1rem;margin-right:1rem}.mx-auto{margin-left:auto;margin-right:auto}.my-10{margin-top:2.5rem;margin-bottom:2.5rem}.my-2{margin-top:.5rem;margin-bottom:.5rem}.my-20{margin-top:5rem;margin-bottom:5rem}.mb-2{margin-bottom:.5rem}.mb-4{margin-bottom:1rem}.mb-5{margin-bottom:1.25rem}.ml-5{margin-left:1.25rem}.mt-12{margin-top:3rem}.mt-2{margin-top:.5rem}.mt-20{margin-top:5rem}.mt-3{margin-top:.75rem}.mt-4{margin-top:1rem}.mt-5{margin-top:1.25rem}.flex{display:flex}.grid{display:grid}.hidden{display:none}.h-1\/2{height:50%}.h-10{height:2.5rem}.h-16{height:4rem}.h-3{height:.75rem}.h-40{height:10rem}.h-5{height:1.25rem}.h-\[117px\]{height:117px}.h-\[230px\]{height:230px}.h-\[28px\]{height:28px}.h-\[400px\]{height:400px}.h-\[64px\]{height:64px}.h-\[75\%\]{height:75%}.h-full{height:100%}.h-screen{height:100vh}.min-h-\[280px\]{min-height:280px}.w-1{width:.25rem}.w-1\/2{width:50%}.w-10{width:2.5rem}.w-16{width:4rem}.w-3{width:.75rem}.w-5{width:1.25rem}.w-\[150px\]{width:150px}.w-\[28px\]{width:28px}.w-\[35px\]{width:35px}.w-\[70\%\]{width:70%}.w-\[75\%\]{width:75%}.w-\[90\%\]{width:90%}.w-fit{width:-moz-fit-content;width:fit-content}.w-full{width:100%}.min-w-\[140px\]{min-width:140px}.max-w-7xl{max-width:80rem}.max-w-full{max-width:100%}.max-w-screen-lg{max-width:1024px}.max-w-screen-xl{max-width:1280px}.flex-1{flex:1 1 0%}.flex-\[0\.75\]{flex:.75}.cursor-pointer{cursor:pointer}.list-disc{list-style-type:disc}.list-none{list-style-type:none}.flex-row{flex-direction:row}.flex-col{flex-direction:column}.flex-col-reverse{flex-direction:column-reverse}.flex-wrap{flex-wrap:wrap}.items-start{align-items:flex-start}.items-center{align-items:center}.justify-end{justify-content:flex-end}.justify-center{justify-content:center}.justify-between{justify-content:space-between}.justify-evenly{justify-content:space-evenly}.gap-10{gap:2.5rem}.gap-2{gap:.5rem}.gap-5{gap:1.25rem}.gap-8{gap:2rem}.space-x-5>:not([hidden])~:not([hidden]){--tw-space-x-reverse: 0;margin-right:calc(1.25rem * var(--tw-space-x-reverse));margin-left:calc(1.25rem * calc(1 - var(--tw-space-x-reverse)))}.space-y-10>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(2.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(2.5rem * var(--tw-space-y-reverse))}.space-y-2>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.5rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.5rem * var(--tw-space-y-reverse))}.space-y-3>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(.75rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(.75rem * var(--tw-space-y-reverse))}.overflow-auto{overflow:auto}.overflow-hidden{overflow:hidden}.rounded-2xl{border-radius:1rem}.rounded-3xl{border-radius:1.5rem}.rounded-\[20px\]{border-radius:20px}.rounded-full{border-radius:9999px}.rounded-lg{border-radius:.5rem}.rounded-xl{border-radius:.75rem}.border-2{border-width:2px}.border-4{border-width:4px}.border-none{border-style:none}.border-\[\#373737\]{--tw-border-opacity: 1;border-color:rgb(55 55 55 / var(--tw-border-opacity))}.border-black{--tw-border-opacity: 1;border-color:rgb(0 0 0 / var(--tw-border-opacity))}.bg-\[\#373737\]{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-black{--tw-bg-opacity: 1;background-color:rgb(0 0 0 / var(--tw-bg-opacity))}.bg-blue-600{--tw-bg-opacity: 1;background-color:rgb(37 99 235 / var(--tw-bg-opacity))}.bg-green-600{--tw-bg-opacity: 1;background-color:rgb(22 163 74 / var(--tw-bg-opacity))}.bg-primary{--tw-bg-opacity: 1;background-color:rgb(246 246 246 / var(--tw-bg-opacity))}.bg-secondary{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.bg-white{--tw-bg-opacity: 1;background-color:rgb(255 255 255 / var(--tw-bg-opacity))}.bg-opacity-60{--tw-bg-opacity: .6}.bg-gradient-to-b{background-image:linear-gradient(to bottom,var(--tw-gradient-stops))}.bg-gradient-to-r{background-image:linear-gradient(to right,var(--tw-gradient-stops))}.from-\[\#f6f6f6\]{--tw-gradient-from: #f6f6f6 var(--tw-gradient-from-position);--tw-gradient-to: rgb(246 246 246 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.from-white{--tw-gradient-from: #fff var(--tw-gradient-from-position);--tw-gradient-to: rgb(255 255 255 / 0) var(--tw-gradient-to-position);--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to)}.to-primary{--tw-gradient-to: #f6f6f6 var(--tw-gradient-to-position)}.to-white{--tw-gradient-to: #fff var(--tw-gradient-to-position)}.object-contain{-o-object-fit:contain;object-fit:contain}.object-cover{-o-object-fit:cover;object-fit:cover}.p-2{padding:.5rem}.p-5{padding:1.25rem}.p-6{padding:1.5rem}.p-8{padding:2rem}.p-\[1px\]{padding:1px}.px-12{padding-left:3rem;padding-right:3rem}.px-3{padding-left:.75rem;padding-right:.75rem}.px-6{padding-left:1.5rem;padding-right:1.5rem}.px-8{padding-left:2rem;padding-right:2rem}.py-10{padding-top:2.5rem;padding-bottom:2.5rem}.py-2{padding-top:.5rem;padding-bottom:.5rem}.py-3{padding-top:.75rem;padding-bottom:.75rem}.py-4{padding-top:1rem;padding-bottom:1rem}.py-5{padding-top:1.25rem;padding-bottom:1.25rem}.py-6{padding-top:1.5rem;padding-bottom:1.5rem}.pb-10{padding-bottom:2.5rem}.pl-1{padding-left:.25rem}.text-center{text-align:center}.text-\[14px\]{font-size:14px}.text-\[15px\]{font-size:15px}.text-\[16px\]{font-size:16px}.text-\[17px\]{font-size:17px}.text-\[18px\]{font-size:18px}.text-\[20px\]{font-size:20px}.text-\[24px\]{font-size:24px}.text-\[30px\]{font-size:30px}.text-\[40px\]{font-size:40px}.font-black{font-weight:900}.font-bold{font-weight:700}.font-medium{font-weight:500}.font-semibold{font-weight:600}.uppercase{text-transform:uppercase}.leading-\[30px\]{line-height:30px}.tracking-wider{letter-spacing:.05em}.text-\[\#373737\]{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-\[\#dfd9ff\]{--tw-text-opacity: 1;color:rgb(223 217 255 / var(--tw-text-opacity))}.text-\[\#fcd4d4\]{--tw-text-opacity: 1;color:rgb(252 212 212 / var(--tw-text-opacity))}.text-black{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.text-black-100{--tw-text-opacity: 1;color:rgb(16 13 37 / var(--tw-text-opacity))}.text-gray-600{--tw-text-opacity: 1;color:rgb(75 85 99 / var(--tw-text-opacity))}.text-green-500{--tw-text-opacity: 1;color:rgb(34 197 94 / var(--tw-text-opacity))}.text-secondary{--tw-text-opacity: 1;color:rgb(55 55 55 / var(--tw-text-opacity))}.text-white{--tw-text-opacity: 1;color:rgb(255 255 255 / var(--tw-text-opacity))}.text-white-100{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.underline-offset-8{text-underline-offset:8px}.shadow-card{--tw-shadow: 0px 35px 120px -15px #211e35;--tw-shadow-colored: 0px 35px 120px -15px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-md{--tw-shadow: 0 4px 6px -1px rgb(0 0 0 / .1), 0 2px 4px -2px rgb(0 0 0 / .1);--tw-shadow-colored: 0 4px 6px -1px var(--tw-shadow-color), 0 2px 4px -2px var(--tw-shadow-color);box-shadow:var(--tw-ring-offset-shadow, 0 0 #0000),var(--tw-ring-shadow, 0 0 #0000),var(--tw-shadow)}.shadow-\[\#fcd4d4\]{--tw-shadow-color: #fcd4d4;--tw-shadow: var(--tw-shadow-colored)}.shadow-primary{--tw-shadow-color: #f6f6f6;--tw-shadow: var(--tw-shadow-colored)}.outline-none{outline:2px solid transparent;outline-offset:2px}.outline{outline-style:solid}.transition{transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,-webkit-backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter;transition-property:color,background-color,border-color,text-decoration-color,fill,stroke,opacity,box-shadow,transform,filter,backdrop-filter,-webkit-backdrop-filter;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.transition-opacity{transition-property:opacity;transition-timing-function:cubic-bezier(.4,0,.2,1);transition-duration:.15s}.duration-300{transition-duration:.3s}*{margin:0;padding:0;box-sizing:border-box;font-family:Poppins,sans-serif;scroll-behavior:smooth}body{background:linear-gradient(180deg,#e6eaf5 0%,#f6f6f6 80%)}.hash-span{margin-top:-100px;padding-bottom:100px;display:block}.black-gradient{background:#000000;background:linear-gradient(to right,#434343,#000000)}.white-gradient{background:#ffffff;background:linear-gradient(to right,#e6eaf5,#f6f6f6)}.violet-gradient{background:linear-gradient(-90deg,#373737 0%,rgba(60,51,80,0) 100%);background:-webkit-linear-gradient(-90deg,#373737 0%,black 100%)}.green-pink-gradient{background:#00cea8;background:linear-gradient(90.13deg,#00cea8 1.9%,#bf61ff 97.5%);background:-webkit-linear-gradient(-90.13deg,#00cea8 1.9%,#bf61ff 97.5%)}.orange-text-gradient{background:#f12711;background:linear-gradient(to top,#f12711,#f5af19);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.green-text-gradient{background:#11998e;background:linear-gradient(to top,#11998e,#38ef7d);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.blue-text-gradient{background:#56ccf2;background:linear-gradient(to top,#2f80ed,#56ccf2);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.pink-text-gradient{background:#ec008c;background:linear-gradient(to top,#ec008c,#fc6767);-webkit-background-clip:text;-webkit-text-fill-color:transparent}.canvas-loader{font-size:10px;width:1em;height:1em;border-radius:50%;position:relative;text-indent:-9999em;animation:mulShdSpin 1.1s infinite ease;transform:translateZ(0)}@keyframes mulShdSpin{0%,to{box-shadow:0 -2.6em #fff,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #ffffff80,-1.8em -1.8em #ffffffb3}12.5%{box-shadow:0 -2.6em #ffffffb3,1.8em -1.8em #fff,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #ffffff80}25%{box-shadow:0 -2.6em #ffffff80,1.8em -1.8em #ffffffb3,2.5em 0 #fff,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}37.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #ffffff80,2.5em 0 #ffffffb3,1.75em 1.75em #fff,0 2.5em #fff3,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}50%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #ffffff80,1.75em 1.75em #ffffffb3,0 2.5em #fff,-1.8em 1.8em #fff3,-2.6em 0 #fff3,-1.8em -1.8em #fff3}62.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #ffffff80,0 2.5em #ffffffb3,-1.8em 1.8em #fff,-2.6em 0 #fff3,-1.8em -1.8em #fff3}75%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #ffffff80,-1.8em 1.8em #ffffffb3,-2.6em 0 #fff,-1.8em -1.8em #fff3}87.5%{box-shadow:0 -2.6em #fff3,1.8em -1.8em #fff3,2.5em 0 #fff3,1.75em 1.75em #fff3,0 2.5em #fff3,-1.8em 1.8em #ffffff80,-2.6em 0 #ffffffb3,-1.8em -1.8em #fff}}.funky-text-outline{text-shadow:-1px -1px 0 #fff,1px -1px 0 #fff,-1px 1px 0 #fff,1px 1px 0 #fff,2px 2px 0 #fff,-2px -2px 0 #fff,2px -2px 0 #fff,-2px 2px 0 #fff}.funky-text-outline-2{text-shadow:-3px -3px 0 #C0C0C0,3px -3px 0 #C0C0C0,-3px 3px 0 #C0C0C0,3px 3px 0 #C0C0C0}.placeholder\:text-white-100::-moz-placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.placeholder\:text-white-100::placeholder{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:bg-blue-800:hover{--tw-bg-opacity: 1;background-color:rgb(30 64 175 / var(--tw-bg-opacity))}.hover\:bg-gray-800:hover{--tw-bg-opacity: 1;background-color:rgb(31 41 55 / var(--tw-bg-opacity))}.hover\:bg-green-800:hover{--tw-bg-opacity: 1;background-color:rgb(22 101 52 / var(--tw-bg-opacity))}.hover\:bg-secondary:hover{--tw-bg-opacity: 1;background-color:rgb(55 55 55 / var(--tw-bg-opacity))}.hover\:bg-slate-600:hover{--tw-bg-opacity: 1;background-color:rgb(71 85 105 / var(--tw-bg-opacity))}.hover\:text-black:hover{--tw-text-opacity: 1;color:rgb(0 0 0 / var(--tw-text-opacity))}.hover\:text-gray-200:hover{--tw-text-opacity: 1;color:rgb(229 231 235 / var(--tw-text-opacity))}.hover\:text-white-100:hover{--tw-text-opacity: 1;color:rgb(243 243 243 / var(--tw-text-opacity))}.hover\:underline:hover{text-decoration-line:underline}.group:hover .group-hover\:opacity-100{opacity:1}@media (min-width: 450px){.xs\:w-\[250px\]{width:250px}.xs\:text-\[20px\]{font-size:20px}.xs\:text-\[40px\]{font-size:40px}.xs\:text-\[50px\]{font-size:50px}}@media (min-width: 640px){.sm\:right-5{right:1.25rem}.sm\:top-20{top:5rem}.sm\:block{display:block}.sm\:flex{display:flex}.sm\:hidden{display:none}.sm\:h-80{height:20rem}.sm\:w-\[360px\]{width:360px}.sm\:px-16{padding-left:4rem;padding-right:4rem}.sm\:py-16{padding-top:4rem;padding-bottom:4rem}.sm\:text-\[18px\]{font-size:18px}.sm\:text-\[26px\]{font-size:26px}.sm\:text-\[50px\]{font-size:50px}.sm\:text-\[60px\]{font-size:60px}}@media (min-width: 768px){.md\:absolute{position:absolute}.md\:-right-10{right:-2.5rem}.md\:-right-20{right:-5rem}.md\:bottom-0{bottom:0}.md\:top-10{top:2.5rem}.md\:top-2{top:.5rem}.md\:-m-10{margin:-2.5rem}.md\:mb-0{margin-bottom:0}.md\:block{display:block}.md\:flex{display:flex}.md\:w-\[80\%\]{width:80%}.md\:max-w-3xl{max-width:48rem}.md\:grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.md\:flex-col{flex-direction:column}.md\:items-center{align-items:center}.md\:justify-center{justify-content:center}.md\:gap-4{gap:1rem}.md\:space-y-5>:not([hidden])~:not([hidden]){--tw-space-y-reverse: 0;margin-top:calc(1.25rem * calc(1 - var(--tw-space-y-reverse)));margin-bottom:calc(1.25rem * var(--tw-space-y-reverse))}.md\:text-\[60px\]{font-size:60px}}@media (min-width: 1024px){.lg\:top-\[100px\]{top:100px}.lg\:flex{display:flex}.lg\:h-\[400px\]{height:400px}.lg\:w-\[400px\]{width:400px}.lg\:w-\[70\%\]{width:70%}.lg\:grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.lg\:text-\[30px\]{font-size:30px}.lg\:text-\[80px\]{font-size:80px}.lg\:leading-\[40px\]{line-height:40px}.lg\:leading-\[98px\]{line-height:98px}}@media (min-width: 1280px){.xl\:mt-6{margin-top:1.5rem}.xl\:flex-row{flex-direction:row}} diff --git a/assets/index-9071deb7.js b/assets/index-94748eee.js similarity index 50% rename from assets/index-9071deb7.js rename to assets/index-94748eee.js index b67eb07..31c214b 100644 --- a/assets/index-9071deb7.js +++ b/assets/index-94748eee.js @@ -1,4 +1,4 @@ -function hD(n,e){for(var t=0;ti[r]})}}}return Object.freeze(Object.defineProperty(n,Symbol.toStringTag,{value:"Module"}))}(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 cS(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function dD(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var RC={exports:{}},ug={},LC={exports:{}},Pt={};/** +(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 H_(n){return n&&n.__esModule&&Object.prototype.hasOwnProperty.call(n,"default")?n.default:n}function MD(n){if(n.__esModule)return n;var e=n.default;if(typeof e=="function"){var t=function i(){return this instanceof i?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};t.prototype=e.prototype}else t={};return Object.defineProperty(t,"__esModule",{value:!0}),Object.keys(n).forEach(function(i){var r=Object.getOwnPropertyDescriptor(n,i);Object.defineProperty(t,i,r.get?r:{enumerable:!0,get:function(){return n[i]}})}),t}var $b={exports:{}},Zm={},eC={exports:{}},Pt={};/** * @license React * react.production.min.js * @@ -6,7 +6,7 @@ function hD(n,e){for(var t=0;t>>1,_e=k[Q];if(0>>1;Qr(ve,J))Te<_e&&0>r(we,ve)?(k[Q]=we,k[Te]=J,Q=Te):(k[Q]=ve,k[oe]=J,Q=oe);else if(Te<_e&&0>r(we,J))k[Q]=we,k[Te]=J,Q=Te;else break e}}return q}function r(k,q){var J=k.sortIndex-q.sortIndex;return J!==0?J:k.id-q.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 l=[],f=[],h=1,d=null,p=3,m=!1,y=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(k){for(var q=t(f);q!==null;){if(q.callback===null)i(f);else if(q.startTime<=k)i(f),q.sortIndex=q.expirationTime,e(l,q);else break;q=t(f)}}function E(k){if(_=!1,A(k),!y)if(t(l)!==null)y=!0,$(R);else{var q=t(f);q!==null&&le(E,q.startTime-k)}}function R(k,q){y=!1,_&&(_=!1,g(I),I=-1),m=!0;var J=p;try{for(A(q),d=t(l);d!==null&&(!(d.expirationTime>q)||k&&!D());){var Q=d.callback;if(typeof Q=="function"){d.callback=null,p=d.priorityLevel;var _e=Q(d.expirationTime<=q);q=n.unstable_now(),typeof _e=="function"?d.callback=_e:d===t(l)&&i(l),A(q)}else i(l);d=t(l)}if(d!==null)var De=!0;else{var oe=t(f);oe!==null&&le(E,oe.startTime-q),De=!1}return De}finally{d=null,p=J,m=!1}}var C=!1,L=null,I=-1,P=5,b=-1;function D(){return!(n.unstable_now()-bk||125Q?(k.sortIndex=J,e(f,k),t(l)===null&&k===t(f)&&(_?(g(I),I=-1):_=!0,le(E,J-Q))):(k.sortIndex=_e,e(l,k),y||m||(y=!0,$(R))),k},n.unstable_shouldYield=D,n.unstable_wrapCallback=function(k){var q=p;return function(){var J=p;p=q;try{return k.apply(this,arguments)}finally{p=J}}}})(GC);HC.exports=GC;var OD=HC.exports;/** + */(function(n){function e(k,q){var J=k.length;k.push(q);e:for(;0>>1,_e=k[$];if(0>>1;$r(ve,J))Te<_e&&0>r(Me,ve)?(k[$]=Me,k[Te]=J,$=Te):(k[$]=ve,k[oe]=J,$=oe);else if(Te<_e&&0>r(Me,J))k[$]=Me,k[Te]=J,$=Te;else break e}}return q}function r(k,q){var J=k.sortIndex-q.sortIndex;return J!==0?J:k.id-q.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 c=[],f=[],h=1,d=null,p=3,m=!1,y=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(k){for(var q=t(f);q!==null;){if(q.callback===null)i(f);else if(q.startTime<=k)i(f),q.sortIndex=q.expirationTime,e(c,q);else break;q=t(f)}}function E(k){if(_=!1,A(k),!y)if(t(c)!==null)y=!0,Q(R);else{var q=t(f);q!==null&&le(E,q.startTime-k)}}function R(k,q){y=!1,_&&(_=!1,g(I),I=-1),m=!0;var J=p;try{for(A(q),d=t(c);d!==null&&(!(d.expirationTime>q)||k&&!N());){var $=d.callback;if(typeof $=="function"){d.callback=null,p=d.priorityLevel;var _e=$(d.expirationTime<=q);q=n.unstable_now(),typeof _e=="function"?d.callback=_e:d===t(c)&&i(c),A(q)}else i(c);d=t(c)}if(d!==null)var Ne=!0;else{var oe=t(f);oe!==null&&le(E,oe.startTime-q),Ne=!1}return Ne}finally{d=null,p=J,m=!1}}var C=!1,L=null,I=-1,P=5,b=-1;function N(){return!(n.unstable_now()-bk||125$?(k.sortIndex=J,e(f,k),t(c)===null&&k===t(f)&&(_?(g(I),I=-1):_=!0,le(E,J-$))):(k.sortIndex=_e,e(c,k),y||m||(y=!0,Q(R))),k},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(k){var q=p;return function(){var J=p;p=q;try{return k.apply(this,arguments)}finally{p=J}}}})(hC);fC.exports=hC;var jD=fC.exports;/** * @license React * react-dom.production.min.js * @@ -30,64 +30,37 @@ function hD(n,e){for(var t=0;t"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),sx=Object.prototype.hasOwnProperty,FD=/^[: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]*$/,rM={},sM={};function BD(n){return sx.call(sM,n)?!0:sx.call(rM,n)?!1:FD.test(n)?sM[n]=!0:(rM[n]=!0,!1)}function zD(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 VD(n,e,t,i){if(e===null||typeof e>"u"||zD(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 Ti(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 Kn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){Kn[n]=new Ti(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];Kn[e]=new Ti(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){Kn[n]=new Ti(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){Kn[n]=new Ti(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){Kn[n]=new Ti(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){Kn[n]=new Ti(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){Kn[n]=new Ti(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){Kn[n]=new Ti(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){Kn[n]=new Ti(n,5,!1,n.toLowerCase(),null,!1,!1)});var pS=/[\-:]([a-z])/g;function mS(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(pS,mS);Kn[e]=new Ti(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(pS,mS);Kn[e]=new Ti(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(pS,mS);Kn[e]=new Ti(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){Kn[n]=new Ti(n,1,!1,n.toLowerCase(),null,!1,!1)});Kn.xlinkHref=new Ti("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){Kn[n]=new Ti(n,1,!1,n.toLowerCase(),null,!0,!0)});function gS(n,e,t,i){var r=Kn.hasOwnProperty(e)?Kn[e]:null;(r!==null?r.type!==0:i||!(2"u"||typeof window.document>"u"||typeof window.document.createElement>"u"),Vy=Object.prototype.hasOwnProperty,YD=/^[: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]*$/,UM={},OM={};function qD(n){return Vy.call(OM,n)?!0:Vy.call(UM,n)?!1:YD.test(n)?OM[n]=!0:(UM[n]=!0,!1)}function ZD(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 KD(n,e,t,i){if(e===null||typeof e>"u"||ZD(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 Ei(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 qn={};"children dangerouslySetInnerHTML defaultValue defaultChecked innerHTML suppressContentEditableWarning suppressHydrationWarning style".split(" ").forEach(function(n){qn[n]=new Ei(n,0,!1,n,null,!1,!1)});[["acceptCharset","accept-charset"],["className","class"],["htmlFor","for"],["httpEquiv","http-equiv"]].forEach(function(n){var e=n[0];qn[e]=new Ei(e,1,!1,n[1],null,!1,!1)});["contentEditable","draggable","spellCheck","value"].forEach(function(n){qn[n]=new Ei(n,2,!1,n.toLowerCase(),null,!1,!1)});["autoReverse","externalResourcesRequired","focusable","preserveAlpha"].forEach(function(n){qn[n]=new Ei(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){qn[n]=new Ei(n,3,!1,n.toLowerCase(),null,!1,!1)});["checked","multiple","muted","selected"].forEach(function(n){qn[n]=new Ei(n,3,!0,n,null,!1,!1)});["capture","download"].forEach(function(n){qn[n]=new Ei(n,4,!1,n,null,!1,!1)});["cols","rows","size","span"].forEach(function(n){qn[n]=new Ei(n,6,!1,n,null,!1,!1)});["rowSpan","start"].forEach(function(n){qn[n]=new Ei(n,5,!1,n.toLowerCase(),null,!1,!1)});var Y_=/[\-:]([a-z])/g;function q_(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(Y_,q_);qn[e]=new Ei(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(Y_,q_);qn[e]=new Ei(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(Y_,q_);qn[e]=new Ei(e,1,!1,n,"http://www.w3.org/XML/1998/namespace",!1,!1)});["tabIndex","crossOrigin"].forEach(function(n){qn[n]=new Ei(n,1,!1,n.toLowerCase(),null,!1,!1)});qn.xlinkHref=new Ei("xlinkHref",1,!1,"xlink:href","http://www.w3.org/1999/xlink",!0,!1);["src","href","action","formAction"].forEach(function(n){qn[n]=new Ei(n,1,!1,n.toLowerCase(),null,!0,!0)});function Z_(n,e,t,i){var r=qn.hasOwnProperty(e)?qn[e]:null;(r!==null?r.type!==0:i||!(2a||r[o]!==s[a]){var l=` -`+r[o].replace(" at new "," at ");return n.displayName&&l.includes("")&&(l=l.replace("",n.displayName)),l}while(1<=o&&0<=a);break}}}finally{Av=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?qu(n):""}function HD(n){switch(n.tag){case 5:return qu(n.type);case 16:return qu("Lazy");case 13:return qu("Suspense");case 19:return qu("SuspenseList");case 0:case 2:case 15:return n=wv(n.type,!1),n;case 11:return n=wv(n.type.render,!1),n;case 1:return n=wv(n.type,!0),n;default:return""}}function cx(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 rc:return"Fragment";case ic:return"Portal";case ox:return"Profiler";case vS:return"StrictMode";case ax:return"Suspense";case lx:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case XC:return(n.displayName||"Context")+".Consumer";case jC:return(n._context.displayName||"Context")+".Provider";case yS:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case xS:return e=n.displayName||null,e!==null?e:cx(n.type)||"Memo";case So:e=n._payload,n=n._init;try{return cx(n(e))}catch{}}return null}function GD(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 cx(e);case 8:return e===vS?"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 Vo(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function qC(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function WD(n){var e=qC(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 kd(n){n._valueTracker||(n._valueTracker=WD(n))}function KC(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=qC(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function Sm(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 ux(n,e){var t=e.checked;return dn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function aM(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=Vo(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 ZC(n,e){e=e.checked,e!=null&&gS(n,"checked",e,!1)}function fx(n,e){ZC(n,e);var t=Vo(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")?hx(n,e.type,t):e.hasOwnProperty("defaultValue")&&hx(n,e.type,Vo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function lM(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 hx(n,e,t){(e!=="number"||Sm(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var Ku=Array.isArray;function Tc(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Fd.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function Sf(n,e){if(e){var t=n.firstChild;if(t&&t===n.lastChild&&t.nodeType===3){t.nodeValue=e;return}}n.textContent=e}var tf={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},jD=["Webkit","ms","Moz","O"];Object.keys(tf).forEach(function(n){jD.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),tf[e]=tf[n]})});function eP(n,e,t){return e==null||typeof e=="boolean"||e===""?"":t||typeof e!="number"||e===0||tf.hasOwnProperty(n)&&tf[n]?(""+e).trim():e+"px"}function tP(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=eP(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var XD=dn({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 mx(n,e){if(e){if(XD[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(be(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(be(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(be(61))}if(e.style!=null&&typeof e.style!="object")throw Error(be(62))}}function gx(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 vx=null;function _S(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var yx=null,bc=null,Cc=null;function fM(n){if(n=gh(n)){if(typeof yx!="function")throw Error(be(280));var e=n.stateNode;e&&(e=mg(e),yx(n.stateNode,n.type,e))}}function nP(n){bc?Cc?Cc.push(n):Cc=[n]:bc=n}function iP(){if(bc){var n=bc,e=Cc;if(Cc=bc=null,fM(n),e)for(n=0;n>>=0,n===0?32:31-(iU(n)/rU|0)|0}var Bd=64,zd=4194304;function Zu(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 Em(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=Zu(a):(s&=o,s!==0&&(i=Zu(s)))}else o=t&~r,o!==0?i=Zu(o):s!==0&&(i=Zu(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 ph(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-Or(e),n[e]=t}function lU(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=rf),_M=String.fromCharCode(32),SM=!1;function wP(n,e){switch(n){case"keyup":return OU.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function MP(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var sc=!1;function FU(n,e){switch(n){case"compositionend":return MP(e);case"keypress":return e.which!==32?null:(SM=!0,_M);case"textInput":return n=e.data,n===_M&&SM?null:n;default:return null}}function BU(n,e){if(sc)return n==="compositionend"||!CS&&wP(n,e)?(n=SP(),nm=ES=bo=null,sc=!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=EM(t)}}function CP(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?CP(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function PP(){for(var n=window,e=Sm();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=Sm(n.document)}return e}function PS(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 qU(n){var e=PP(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&CP(t.ownerDocument.documentElement,t)){if(i!==null&&PS(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=TM(t,s);var o=TM(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,oc=null,Mx=null,of=null,Ex=!1;function bM(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;Ex||oc==null||oc!==Sm(i)||(i=oc,"selectionStart"in i&&PS(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}),of&&bf(of,i)||(of=i,i=Cm(Mx,"onSelect"),0cc||(n.current=Lx[cc],Lx[cc]=null,cc--)}function Kt(n,e){cc++,Lx[cc]=n.current,n.current=e}var Ho={},ui=qo(Ho),Ui=qo(!1),Ja=Ho;function Dc(n,e){var t=n.type.contextTypes;if(!t)return Ho;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 Oi(n){return n=n.childContextTypes,n!=null}function Rm(){Qt(Ui),Qt(ui)}function DM(n,e,t){if(ui.current!==Ho)throw Error(be(168));Kt(ui,e),Kt(Ui,t)}function FP(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(be(108,GD(n)||"Unknown",r));return dn({},t,i)}function Lm(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||Ho,Ja=ui.current,Kt(ui,n),Kt(Ui,Ui.current),!0}function UM(n,e,t){var i=n.stateNode;if(!i)throw Error(be(169));t?(n=FP(n,e,Ja),i.__reactInternalMemoizedMergedChildContext=n,Qt(Ui),Qt(ui),Kt(ui,n)):Qt(Ui),Kt(Ui,t)}var Cs=null,gg=!1,kv=!1;function BP(n){Cs===null?Cs=[n]:Cs.push(n)}function oO(n){gg=!0,BP(n)}function Ko(){if(!kv&&Cs!==null){kv=!0;var n=0,e=Vt;try{var t=Cs;for(Vt=1;n>=o,r-=o,Is=1<<32-Or(e)+r|t<I?(P=L,L=null):P=L.sibling;var b=p(g,L,A[I],E);if(b===null){L===null&&(L=P);break}n&&L&&b.alternate===null&&e(g,L),S=s(b,S,I),C===null?R=b:C.sibling=b,C=b,L=P}if(I===A.length)return t(g,L),on&&Ea(g,I),R;if(L===null){for(;II?(P=L,L=null):P=L.sibling;var D=p(g,L,b.value,E);if(D===null){L===null&&(L=P);break}n&&L&&D.alternate===null&&e(g,L),S=s(D,S,I),C===null?R=D:C.sibling=D,C=D,L=P}if(b.done)return t(g,L),on&&Ea(g,I),R;if(L===null){for(;!b.done;I++,b=A.next())b=d(g,b.value,E),b!==null&&(S=s(b,S,I),C===null?R=b:C.sibling=b,C=b);return on&&Ea(g,I),R}for(L=i(g,L);!b.done;I++,b=A.next())b=m(L,g,I,b.value,E),b!==null&&(n&&b.alternate!==null&&L.delete(b.key===null?I:b.key),S=s(b,S,I),C===null?R=b:C.sibling=b,C=b);return n&&L.forEach(function(j){return e(g,j)}),on&&Ea(g,I),R}function x(g,S,A,E){if(typeof A=="object"&&A!==null&&A.type===rc&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case Od:e:{for(var R=A.key,C=S;C!==null;){if(C.key===R){if(R=A.type,R===rc){if(C.tag===7){t(g,C.sibling),S=r(C,A.props.children),S.return=g,g=S;break e}}else if(C.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===So&&FM(R)===C.type){t(g,C.sibling),S=r(C,A.props),S.ref=Tu(g,C,A),S.return=g,g=S;break e}t(g,C);break}else e(g,C);C=C.sibling}A.type===rc?(S=ja(A.props.children,g.mode,E,A.key),S.return=g,g=S):(E=um(A.type,A.key,A.props,null,g.mode,E),E.ref=Tu(g,S,A),E.return=g,g=E)}return o(g);case ic:e:{for(C=A.key;S!==null;){if(S.key===C)if(S.tag===4&&S.stateNode.containerInfo===A.containerInfo&&S.stateNode.implementation===A.implementation){t(g,S.sibling),S=r(S,A.children||[]),S.return=g,g=S;break e}else{t(g,S);break}else e(g,S);S=S.sibling}S=jv(A,g.mode,E),S.return=g,g=S}return o(g);case So:return C=A._init,x(g,S,C(A._payload),E)}if(Ku(A))return y(g,S,A,E);if(Su(A))return _(g,S,A,E);Yd(g,A)}return typeof A=="string"&&A!==""||typeof A=="number"?(A=""+A,S!==null&&S.tag===6?(t(g,S.sibling),S=r(S,A),S.return=g,g=S):(t(g,S),S=Wv(A,g.mode,E),S.return=g,g=S),o(g)):t(g,S)}return x}var Oc=GP(!0),WP=GP(!1),Dm=qo(null),Um=null,hc=null,NS=null;function DS(){NS=hc=Um=null}function US(n){var e=Dm.current;Qt(Dm),n._currentValue=e}function Dx(n,e,t){for(;n!==null;){var i=n.alternate;if((n.childLanes&e)!==e?(n.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),n===t)break;n=n.return}}function Rc(n,e){Um=n,NS=hc=null,n=n.dependencies,n!==null&&n.firstContext!==null&&(n.lanes&e&&(Di=!0),n.firstContext=null)}function Sr(n){var e=n._currentValue;if(NS!==n)if(n={context:n,memoizedValue:e,next:null},hc===null){if(Um===null)throw Error(be(308));hc=n,Um.dependencies={lanes:0,firstContext:n}}else hc=hc.next=n;return e}var Oa=null;function OS(n){Oa===null?Oa=[n]:Oa.push(n)}function jP(n,e,t,i){var r=e.interleaved;return r===null?(t.next=t,OS(e)):(t.next=r.next,r.next=t),e.interleaved=t,Gs(n,i)}function Gs(n,e){n.lanes|=e;var t=n.alternate;for(t!==null&&(t.lanes|=e),t=n,n=n.return;n!==null;)n.childLanes|=e,t=n.alternate,t!==null&&(t.childLanes|=e),t=n,n=n.return;return t.tag===3?t.stateNode:null}var Ao=!1;function kS(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function XP(n,e){n=n.updateQueue,e.updateQueue===n&&(e.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Os(n,e){return{eventTime:n,lane:e,tag:0,payload:null,callback:null,next:null}}function Do(n,e,t){var i=n.updateQueue;if(i===null)return null;if(i=i.shared,Dt&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,Gs(n,t)}return r=i.interleaved,r===null?(e.next=e,OS(i)):(e.next=r.next,r.next=e),i.interleaved=e,Gs(n,t)}function rm(n,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194240)!==0)){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,AS(n,t)}}function BM(n,e){var t=n.updateQueue,i=n.alternate;if(i!==null&&(i=i.updateQueue,t===i)){var r=null,s=null;if(t=t.firstBaseUpdate,t!==null){do{var o={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};s===null?r=s=o:s=s.next=o,t=t.next}while(t!==null);s===null?r=s=e:s=s.next=e}else r=s=e;t={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},n.updateQueue=t;return}n=t.lastBaseUpdate,n===null?t.firstBaseUpdate=e:n.next=e,t.lastBaseUpdate=e}function Om(n,e,t,i){var r=n.updateQueue;Ao=!1;var s=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var l=a,f=l.next;l.next=null,o===null?s=f:o.next=f,o=l;var h=n.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=f:a.next=f,h.lastBaseUpdate=l))}if(s!==null){var d=r.baseState;o=0,h=f=l=null,a=s;do{var p=a.lane,m=a.eventTime;if((i&p)===p){h!==null&&(h=h.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=n,_=a;switch(p=e,m=t,_.tag){case 1:if(y=_.payload,typeof y=="function"){d=y.call(m,d,p);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=_.payload,p=typeof y=="function"?y.call(m,d,p):y,p==null)break e;d=dn({},d,p);break e;case 2:Ao=!0}}a.callback!==null&&a.lane!==0&&(n.flags|=64,p=r.effects,p===null?r.effects=[a]:p.push(a))}else m={eventTime:m,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(f=h=m,l=d):h=h.next=m,o|=p;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;p=a,a=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(1);if(h===null&&(l=d),r.baseState=l,r.firstBaseUpdate=f,r.lastBaseUpdate=h,e=r.shared.interleaved,e!==null){r=e;do o|=r.lane,r=r.next;while(r!==e)}else s===null&&(r.shared.lanes=0);el|=o,n.lanes=o,n.memoizedState=d}}function zM(n,e,t){if(n=e.effects,e.effects=null,n!==null)for(e=0;et?t:4,n(!0);var i=Bv.transition;Bv.transition={};try{n(!1),e()}finally{Vt=t,Bv.transition=i}}function cR(){return Ar().memoizedState}function uO(n,e,t){var i=Oo(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},uR(n))fR(e,t);else if(t=jP(n,e,t,i),t!==null){var r=Si();kr(t,n,i,r),hR(t,e,i)}}function fO(n,e,t){var i=Oo(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(uR(n))fR(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,Fr(a,o)){var l=e.interleaved;l===null?(r.next=r,OS(e)):(r.next=l.next,l.next=r),e.interleaved=r;return}}catch{}finally{}t=jP(n,e,r,i),t!==null&&(r=Si(),kr(t,n,i,r),hR(t,e,i))}}function uR(n){var e=n.alternate;return n===hn||e!==null&&e===hn}function fR(n,e){af=Fm=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function hR(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,AS(n,t)}}var Bm={readContext:Sr,useCallback:ti,useContext:ti,useEffect:ti,useImperativeHandle:ti,useInsertionEffect:ti,useLayoutEffect:ti,useMemo:ti,useReducer:ti,useRef:ti,useState:ti,useDebugValue:ti,useDeferredValue:ti,useTransition:ti,useMutableSource:ti,useSyncExternalStore:ti,useId:ti,unstable_isNewReconciler:!1},hO={readContext:Sr,useCallback:function(n,e){return Qr().memoizedState=[n,e===void 0?null:e],n},useContext:Sr,useEffect:HM,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,om(4194308,4,rR.bind(null,e,n),t)},useLayoutEffect:function(n,e){return om(4194308,4,n,e)},useInsertionEffect:function(n,e){return om(4,2,n,e)},useMemo:function(n,e){var t=Qr();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=Qr();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=uO.bind(null,hn,n),[i.memoizedState,n]},useRef:function(n){var e=Qr();return n={current:n},e.memoizedState=n},useState:VM,useDebugValue:jS,useDeferredValue:function(n){return Qr().memoizedState=n},useTransition:function(){var n=VM(!1),e=n[0];return n=cO.bind(null,n[1]),Qr().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=hn,r=Qr();if(on){if(t===void 0)throw Error(be(407));t=t()}else{if(t=e(),jn===null)throw Error(be(349));Qa&30||ZP(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,HM($P.bind(null,i,s,n),[n]),i.flags|=2048,Uf(9,JP.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=Qr(),e=jn.identifierPrefix;if(on){var t=Ns,i=Is;t=(i&~(1<<32-Or(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=Nf++,0a||r[o]!==s[a]){var c=` +`+r[o].replace(" at new "," at ");return n.displayName&&c.includes("")&&(c=c.replace("",n.displayName)),c}while(1<=o&&0<=a);break}}}finally{ov=!1,Error.prepareStackTrace=t}return(n=n?n.displayName||n.name:"")?zu(n):""}function JD(n){switch(n.tag){case 5:return zu(n.type);case 16:return zu("Lazy");case 13:return zu("Suspense");case 19:return zu("SuspenseList");case 0:case 2:case 15:return n=av(n.type,!1),n;case 11:return n=av(n.type.render,!1),n;case 1:return n=av(n.type,!0),n;default:return""}}function jy(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 Jl:return"Fragment";case Kl:return"Portal";case Hy:return"Profiler";case K_:return"StrictMode";case Gy:return"Suspense";case Wy:return"SuspenseList"}if(typeof n=="object")switch(n.$$typeof){case mC:return(n.displayName||"Context")+".Consumer";case pC:return(n._context.displayName||"Context")+".Provider";case J_:var e=n.render;return n=n.displayName,n||(n=e.displayName||e.name||"",n=n!==""?"ForwardRef("+n+")":"ForwardRef"),n;case Q_:return e=n.displayName||null,e!==null?e:jy(n.type)||"Memo";case yo:e=n._payload,n=n._init;try{return jy(n(e))}catch{}}return null}function QD(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 jy(e);case 8:return e===K_?"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 Oo(n){switch(typeof n){case"boolean":case"number":case"string":case"undefined":return n;case"object":return n;default:return""}}function vC(n){var e=n.type;return(n=n.nodeName)&&n.toLowerCase()==="input"&&(e==="checkbox"||e==="radio")}function $D(n){var e=vC(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 wd(n){n._valueTracker||(n._valueTracker=$D(n))}function yC(n){if(!n)return!1;var e=n._valueTracker;if(!e)return!0;var t=e.getValue(),i="";return n&&(i=vC(n)?n.checked?"true":"false":n.value),n=i,n!==t?(e.setValue(n),!0):!1}function lm(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 Xy(n,e){var t=e.checked;return dn({},e,{defaultChecked:void 0,defaultValue:void 0,value:void 0,checked:t??n._wrapperState.initialChecked})}function FM(n,e){var t=e.defaultValue==null?"":e.defaultValue,i=e.checked!=null?e.checked:e.defaultChecked;t=Oo(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 xC(n,e){e=e.checked,e!=null&&Z_(n,"checked",e,!1)}function Yy(n,e){xC(n,e);var t=Oo(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")?qy(n,e.type,t):e.hasOwnProperty("defaultValue")&&qy(n,e.type,Oo(e.defaultValue)),e.checked==null&&e.defaultChecked!=null&&(n.defaultChecked=!!e.defaultChecked)}function BM(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 qy(n,e,t){(e!=="number"||lm(n.ownerDocument)!==n)&&(t==null?n.defaultValue=""+n._wrapperState.initialValue:n.defaultValue!==""+t&&(n.defaultValue=""+t))}var Vu=Array.isArray;function xc(n,e,t,i){if(n=n.options,e){e={};for(var r=0;r"+e.valueOf().toString()+"",e=Ed.firstChild;n.firstChild;)n.removeChild(n.firstChild);for(;e.firstChild;)n.appendChild(e.firstChild)}});function df(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},eN=["Webkit","ms","Moz","O"];Object.keys(Yu).forEach(function(n){eN.forEach(function(e){e=e+n.charAt(0).toUpperCase()+n.substring(1),Yu[e]=Yu[n]})});function MC(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 wC(n,e){n=n.style;for(var t in e)if(e.hasOwnProperty(t)){var i=t.indexOf("--")===0,r=MC(t,e[t],i);t==="float"&&(t="cssFloat"),i?n.setProperty(t,r):n[t]=r}}var tN=dn({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 Jy(n,e){if(e){if(tN[n]&&(e.children!=null||e.dangerouslySetInnerHTML!=null))throw Error(be(137,n));if(e.dangerouslySetInnerHTML!=null){if(e.children!=null)throw Error(be(60));if(typeof e.dangerouslySetInnerHTML!="object"||!("__html"in e.dangerouslySetInnerHTML))throw Error(be(61))}if(e.style!=null&&typeof e.style!="object")throw Error(be(62))}}function Qy(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 $y=null;function $_(n){return n=n.target||n.srcElement||window,n.correspondingUseElement&&(n=n.correspondingUseElement),n.nodeType===3?n.parentNode:n}var ex=null,_c=null,Sc=null;function HM(n){if(n=sh(n)){if(typeof ex!="function")throw Error(be(280));var e=n.stateNode;e&&(e=tg(e),ex(n.stateNode,n.type,e))}}function EC(n){_c?Sc?Sc.push(n):Sc=[n]:_c=n}function TC(){if(_c){var n=_c,e=Sc;if(Sc=_c=null,HM(n),e)for(n=0;n>>=0,n===0?32:31-(hN(n)/dN|0)|0}var Td=64,bd=4194304;function Hu(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 hm(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=Hu(a):(s&=o,s!==0&&(i=Hu(s)))}else o=t&~r,o!==0?i=Hu(o):s!==0&&(i=Hu(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 ih(n,e,t){n.pendingLanes|=e,e!==536870912&&(n.suspendedLanes=0,n.pingedLanes=0),n=n.eventTimes,e=31-Ur(e),n[e]=t}function vN(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=Zu),JM=String.fromCharCode(32),QM=!1;function XC(n,e){switch(n){case"keyup":return jN.indexOf(e.keyCode)!==-1;case"keydown":return e.keyCode!==229;case"keypress":case"mousedown":case"focusout":return!0;default:return!1}}function YC(n){return n=n.detail,typeof n=="object"&&"data"in n?n.data:null}var Ql=!1;function YN(n,e){switch(n){case"compositionend":return YC(e);case"keypress":return e.which!==32?null:(QM=!0,JM);case"textInput":return n=e.data,n===JM&&QM?null:n;default:return null}}function qN(n,e){if(Ql)return n==="compositionend"||!aS&&XC(n,e)?(n=WC(),Gp=rS=wo=null,Ql=!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=nw(t)}}function JC(n,e){return n&&e?n===e?!0:n&&n.nodeType===3?!1:e&&e.nodeType===3?JC(n,e.parentNode):"contains"in n?n.contains(e):n.compareDocumentPosition?!!(n.compareDocumentPosition(e)&16):!1:!1}function QC(){for(var n=window,e=lm();e instanceof n.HTMLIFrameElement;){try{var t=typeof e.contentWindow.location.href=="string"}catch{t=!1}if(t)n=e.contentWindow;else break;e=lm(n.document)}return e}function lS(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 iU(n){var e=QC(),t=n.focusedElem,i=n.selectionRange;if(e!==t&&t&&t.ownerDocument&&JC(t.ownerDocument.documentElement,t)){if(i!==null&&lS(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=iw(t,s);var o=iw(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,$l=null,ox=null,Ju=null,ax=!1;function rw(n,e,t){var i=t.window===t?t.document:t.nodeType===9?t:t.ownerDocument;ax||$l==null||$l!==lm(i)||(i=$l,"selectionStart"in i&&lS(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}),Ju&&xf(Ju,i)||(Ju=i,i=mm(ox,"onSelect"),0nc||(n.current=dx[nc],dx[nc]=null,nc--)}function Zt(n,e){nc++,dx[nc]=n.current,n.current=e}var ko={},ci=Go(ko),Ni=Go(!1),ja=ko;function bc(n,e){var t=n.type.contextTypes;if(!t)return ko;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 Ui(n){return n=n.childContextTypes,n!=null}function vm(){Qt(Ni),Qt(ci)}function fw(n,e,t){if(ci.current!==ko)throw Error(be(168));Zt(ci,e),Zt(Ni,t)}function aP(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(be(108,QD(n)||"Unknown",r));return dn({},t,i)}function ym(n){return n=(n=n.stateNode)&&n.__reactInternalMemoizedMergedChildContext||ko,ja=ci.current,Zt(ci,n),Zt(Ni,Ni.current),!0}function hw(n,e,t){var i=n.stateNode;if(!i)throw Error(be(169));t?(n=aP(n,e,ja),i.__reactInternalMemoizedMergedChildContext=n,Qt(Ni),Qt(ci),Zt(ci,n)):Qt(Ni),Zt(Ni,t)}var Es=null,ng=!1,Sv=!1;function lP(n){Es===null?Es=[n]:Es.push(n)}function mU(n){ng=!0,lP(n)}function Wo(){if(!Sv&&Es!==null){Sv=!0;var n=0,e=Vt;try{var t=Es;for(Vt=1;n>=o,r-=o,Ps=1<<32-Ur(e)+r|t<I?(P=L,L=null):P=L.sibling;var b=p(g,L,A[I],E);if(b===null){L===null&&(L=P);break}n&&L&&b.alternate===null&&e(g,L),S=s(b,S,I),C===null?R=b:C.sibling=b,C=b,L=P}if(I===A.length)return t(g,L),rn&&xa(g,I),R;if(L===null){for(;II?(P=L,L=null):P=L.sibling;var N=p(g,L,b.value,E);if(N===null){L===null&&(L=P);break}n&&L&&N.alternate===null&&e(g,L),S=s(N,S,I),C===null?R=N:C.sibling=N,C=N,L=P}if(b.done)return t(g,L),rn&&xa(g,I),R;if(L===null){for(;!b.done;I++,b=A.next())b=d(g,b.value,E),b!==null&&(S=s(b,S,I),C===null?R=b:C.sibling=b,C=b);return rn&&xa(g,I),R}for(L=i(g,L);!b.done;I++,b=A.next())b=m(L,g,I,b.value,E),b!==null&&(n&&b.alternate!==null&&L.delete(b.key===null?I:b.key),S=s(b,S,I),C===null?R=b:C.sibling=b,C=b);return n&&L.forEach(function(j){return e(g,j)}),rn&&xa(g,I),R}function x(g,S,A,E){if(typeof A=="object"&&A!==null&&A.type===Jl&&A.key===null&&(A=A.props.children),typeof A=="object"&&A!==null){switch(A.$$typeof){case Md:e:{for(var R=A.key,C=S;C!==null;){if(C.key===R){if(R=A.type,R===Jl){if(C.tag===7){t(g,C.sibling),S=r(C,A.props.children),S.return=g,g=S;break e}}else if(C.elementType===R||typeof R=="object"&&R!==null&&R.$$typeof===yo&&mw(R)===C.type){t(g,C.sibling),S=r(C,A.props),S.ref=yu(g,C,A),S.return=g,g=S;break e}t(g,C);break}else e(g,C);C=C.sibling}A.type===Jl?(S=Ba(A.props.children,g.mode,E,A.key),S.return=g,g=S):(E=Jp(A.type,A.key,A.props,null,g.mode,E),E.ref=yu(g,S,A),E.return=g,g=E)}return o(g);case Kl:e:{for(C=A.key;S!==null;){if(S.key===C)if(S.tag===4&&S.stateNode.containerInfo===A.containerInfo&&S.stateNode.implementation===A.implementation){t(g,S.sibling),S=r(S,A.children||[]),S.return=g,g=S;break e}else{t(g,S);break}else e(g,S);S=S.sibling}S=Pv(A,g.mode,E),S.return=g,g=S}return o(g);case yo:return C=A._init,x(g,S,C(A._payload),E)}if(Vu(A))return y(g,S,A,E);if(du(A))return _(g,S,A,E);Nd(g,A)}return typeof A=="string"&&A!==""||typeof A=="number"?(A=""+A,S!==null&&S.tag===6?(t(g,S.sibling),S=r(S,A),S.return=g,g=S):(t(g,S),S=Cv(A,g.mode,E),S.return=g,g=S),o(g)):t(g,S)}return x}var Pc=hP(!0),dP=hP(!1),Sm=Go(null),Am=null,sc=null,hS=null;function dS(){hS=sc=Am=null}function pS(n){var e=Sm.current;Qt(Sm),n._currentValue=e}function gx(n,e,t){for(;n!==null;){var i=n.alternate;if((n.childLanes&e)!==e?(n.childLanes|=e,i!==null&&(i.childLanes|=e)):i!==null&&(i.childLanes&e)!==e&&(i.childLanes|=e),n===t)break;n=n.return}}function Mc(n,e){Am=n,hS=sc=null,n=n.dependencies,n!==null&&n.firstContext!==null&&(n.lanes&e&&(Di=!0),n.firstContext=null)}function _r(n){var e=n._currentValue;if(hS!==n)if(n={context:n,memoizedValue:e,next:null},sc===null){if(Am===null)throw Error(be(308));sc=n,Am.dependencies={lanes:0,firstContext:n}}else sc=sc.next=n;return e}var Ra=null;function mS(n){Ra===null?Ra=[n]:Ra.push(n)}function pP(n,e,t,i){var r=e.interleaved;return r===null?(t.next=t,mS(e)):(t.next=r.next,r.next=t),e.interleaved=t,Vs(n,i)}function Vs(n,e){n.lanes|=e;var t=n.alternate;for(t!==null&&(t.lanes|=e),t=n,n=n.return;n!==null;)n.childLanes|=e,t=n.alternate,t!==null&&(t.childLanes|=e),t=n,n=n.return;return t.tag===3?t.stateNode:null}var xo=!1;function gS(n){n.updateQueue={baseState:n.memoizedState,firstBaseUpdate:null,lastBaseUpdate:null,shared:{pending:null,interleaved:null,lanes:0},effects:null}}function mP(n,e){n=n.updateQueue,e.updateQueue===n&&(e.updateQueue={baseState:n.baseState,firstBaseUpdate:n.firstBaseUpdate,lastBaseUpdate:n.lastBaseUpdate,shared:n.shared,effects:n.effects})}function Ds(n,e){return{eventTime:n,lane:e,tag:0,payload:null,callback:null,next:null}}function Ro(n,e,t){var i=n.updateQueue;if(i===null)return null;if(i=i.shared,Nt&2){var r=i.pending;return r===null?e.next=e:(e.next=r.next,r.next=e),i.pending=e,Vs(n,t)}return r=i.interleaved,r===null?(e.next=e,mS(i)):(e.next=r.next,r.next=e),i.interleaved=e,Vs(n,t)}function jp(n,e,t){if(e=e.updateQueue,e!==null&&(e=e.shared,(t&4194240)!==0)){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,tS(n,t)}}function gw(n,e){var t=n.updateQueue,i=n.alternate;if(i!==null&&(i=i.updateQueue,t===i)){var r=null,s=null;if(t=t.firstBaseUpdate,t!==null){do{var o={eventTime:t.eventTime,lane:t.lane,tag:t.tag,payload:t.payload,callback:t.callback,next:null};s===null?r=s=o:s=s.next=o,t=t.next}while(t!==null);s===null?r=s=e:s=s.next=e}else r=s=e;t={baseState:i.baseState,firstBaseUpdate:r,lastBaseUpdate:s,shared:i.shared,effects:i.effects},n.updateQueue=t;return}n=t.lastBaseUpdate,n===null?t.firstBaseUpdate=e:n.next=e,t.lastBaseUpdate=e}function Mm(n,e,t,i){var r=n.updateQueue;xo=!1;var s=r.firstBaseUpdate,o=r.lastBaseUpdate,a=r.shared.pending;if(a!==null){r.shared.pending=null;var c=a,f=c.next;c.next=null,o===null?s=f:o.next=f,o=c;var h=n.alternate;h!==null&&(h=h.updateQueue,a=h.lastBaseUpdate,a!==o&&(a===null?h.firstBaseUpdate=f:a.next=f,h.lastBaseUpdate=c))}if(s!==null){var d=r.baseState;o=0,h=f=c=null,a=s;do{var p=a.lane,m=a.eventTime;if((i&p)===p){h!==null&&(h=h.next={eventTime:m,lane:0,tag:a.tag,payload:a.payload,callback:a.callback,next:null});e:{var y=n,_=a;switch(p=e,m=t,_.tag){case 1:if(y=_.payload,typeof y=="function"){d=y.call(m,d,p);break e}d=y;break e;case 3:y.flags=y.flags&-65537|128;case 0:if(y=_.payload,p=typeof y=="function"?y.call(m,d,p):y,p==null)break e;d=dn({},d,p);break e;case 2:xo=!0}}a.callback!==null&&a.lane!==0&&(n.flags|=64,p=r.effects,p===null?r.effects=[a]:p.push(a))}else m={eventTime:m,lane:p,tag:a.tag,payload:a.payload,callback:a.callback,next:null},h===null?(f=h=m,c=d):h=h.next=m,o|=p;if(a=a.next,a===null){if(a=r.shared.pending,a===null)break;p=a,a=p.next,p.next=null,r.lastBaseUpdate=p,r.shared.pending=null}}while(1);if(h===null&&(c=d),r.baseState=c,r.firstBaseUpdate=f,r.lastBaseUpdate=h,e=r.shared.interleaved,e!==null){r=e;do o|=r.lane,r=r.next;while(r!==e)}else s===null&&(r.shared.lanes=0);qa|=o,n.lanes=o,n.memoizedState=d}}function vw(n,e,t){if(n=e.effects,e.effects=null,n!==null)for(e=0;et?t:4,n(!0);var i=Mv.transition;Mv.transition={};try{n(!1),e()}finally{Vt=t,Mv.transition=i}}function IP(){return Sr().memoizedState}function xU(n,e,t){var i=Io(n);if(t={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null},DP(n))NP(e,t);else if(t=pP(n,e,t,i),t!==null){var r=_i();Or(t,n,i,r),UP(t,e,i)}}function _U(n,e,t){var i=Io(n),r={lane:i,action:t,hasEagerState:!1,eagerState:null,next:null};if(DP(n))NP(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,kr(a,o)){var c=e.interleaved;c===null?(r.next=r,mS(e)):(r.next=c.next,c.next=r),e.interleaved=r;return}}catch{}finally{}t=pP(n,e,r,i),t!==null&&(r=_i(),Or(t,n,i,r),UP(t,e,i))}}function DP(n){var e=n.alternate;return n===hn||e!==null&&e===hn}function NP(n,e){Qu=Em=!0;var t=n.pending;t===null?e.next=e:(e.next=t.next,t.next=e),n.pending=e}function UP(n,e,t){if(t&4194240){var i=e.lanes;i&=n.pendingLanes,t|=i,e.lanes=t,tS(n,t)}}var Tm={readContext:_r,useCallback:ei,useContext:ei,useEffect:ei,useImperativeHandle:ei,useInsertionEffect:ei,useLayoutEffect:ei,useMemo:ei,useReducer:ei,useRef:ei,useState:ei,useDebugValue:ei,useDeferredValue:ei,useTransition:ei,useMutableSource:ei,useSyncExternalStore:ei,useId:ei,unstable_isNewReconciler:!1},SU={readContext:_r,useCallback:function(n,e){return Qr().memoizedState=[n,e===void 0?null:e],n},useContext:_r,useEffect:xw,useImperativeHandle:function(n,e,t){return t=t!=null?t.concat([n]):null,Yp(4194308,4,bP.bind(null,e,n),t)},useLayoutEffect:function(n,e){return Yp(4194308,4,n,e)},useInsertionEffect:function(n,e){return Yp(4,2,n,e)},useMemo:function(n,e){var t=Qr();return e=e===void 0?null:e,n=n(),t.memoizedState=[n,e],n},useReducer:function(n,e,t){var i=Qr();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=xU.bind(null,hn,n),[i.memoizedState,n]},useRef:function(n){var e=Qr();return n={current:n},e.memoizedState=n},useState:yw,useDebugValue:wS,useDeferredValue:function(n){return Qr().memoizedState=n},useTransition:function(){var n=yw(!1),e=n[0];return n=yU.bind(null,n[1]),Qr().memoizedState=n,[e,n]},useMutableSource:function(){},useSyncExternalStore:function(n,e,t){var i=hn,r=Qr();if(rn){if(t===void 0)throw Error(be(407));t=t()}else{if(t=e(),Wn===null)throw Error(be(349));Ya&30||xP(i,e,t)}r.memoizedState=t;var s={value:t,getSnapshot:e};return r.queue=s,xw(SP.bind(null,i,s,n),[n]),i.flags|=2048,bf(9,_P.bind(null,i,s,t,e),void 0,null),t},useId:function(){var n=Qr(),e=Wn.identifierPrefix;if(rn){var t=Rs,i=Ps;t=(i&~(1<<32-Ur(i)-1)).toString(32)+t,e=":"+e+"R"+t,t=Ef++,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[ts]=e,n[Rf]=i,AR(n,e,!1,!1),e.stateNode=n;e:{switch(o=gx(t,i),t){case"dialog":$t("cancel",n),$t("close",n),r=i;break;case"iframe":case"object":case"embed":$t("load",n),r=i;break;case"video":case"audio":for(r=0;rBc&&(e.flags|=128,i=!0,bu(s,!1),e.lanes=4194304)}else{if(!i)if(n=km(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),bu(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!on)return ni(e),null}else 2*Sn()-s.renderingStartTime>Bc&&t!==1073741824&&(e.flags|=128,i=!0,bu(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=Sn(),e.sibling=null,t=cn.current,Kt(cn,i?t&1|2:t&1),e):(ni(e),null);case 22:case 23:return JS(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Yi&1073741824&&(ni(e),e.subtreeFlags&6&&(e.flags|=8192)):ni(e),null;case 24:return null;case 25:return null}throw Error(be(156,e.tag))}function _O(n,e){switch(LS(e),e.tag){case 1:return Oi(e.type)&&Rm(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return kc(),Qt(Ui),Qt(ui),zS(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return BS(e),null;case 13:if(Qt(cn),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(be(340));Uc()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Qt(cn),null;case 4:return kc(),null;case 10:return US(e.type._context),null;case 22:case 23:return JS(),null;case 24:return null;default:return null}}var Kd=!1,ai=!1,SO=typeof WeakSet=="function"?WeakSet:Set,Ye=null;function dc(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){gn(n,e,i)}else t.current=null}function Gx(n,e,t){try{t()}catch(i){gn(n,e,i)}}var QM=!1;function AO(n,e){if(Tx=Tm,n=PP(),PS(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,l=-1,f=0,h=0,d=n,p=null;t:for(;;){for(var m;d!==t||r!==0&&d.nodeType!==3||(a=o+r),d!==s||i!==0&&d.nodeType!==3||(l=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===n)break t;if(p===t&&++f===r&&(a=o),p===s&&++h===i&&(l=o),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}t=a===-1||l===-1?null:{start:a,end:l}}else t=null}t=t||{start:0,end:0}}else t=null;for(bx={focusedElem:n,selectionRange:t},Tm=!1,Ye=e;Ye!==null;)if(e=Ye,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Ye=n;else for(;Ye!==null;){e=Ye;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 _=y.memoizedProps,x=y.memoizedState,g=e.stateNode,S=g.getSnapshotBeforeUpdate(e.elementType===e.type?_:Pr(e.type,_),x);g.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var A=e.stateNode.containerInfo;A.nodeType===1?A.textContent="":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(be(163))}}catch(E){gn(e,e.return,E)}if(n=e.sibling,n!==null){n.return=e.return,Ye=n;break}Ye=e.return}return y=QM,QM=!1,y}function lf(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&&Gx(e,t,s)}r=r.next}while(r!==i)}}function xg(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 Wx(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 ER(n){var e=n.alternate;e!==null&&(n.alternate=null,ER(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[ts],delete e[Rf],delete e[Rx],delete e[rO],delete e[sO])),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 TR(n){return n.tag===5||n.tag===3||n.tag===4}function eE(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||TR(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 jx(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=Pm));else if(i!==4&&(n=n.child,n!==null))for(jx(n,e,t),n=n.sibling;n!==null;)jx(n,e,t),n=n.sibling}function Xx(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(Xx(n,e,t),n=n.sibling;n!==null;)Xx(n,e,t),n=n.sibling}var Yn=null,Lr=!1;function lo(n,e,t){for(t=t.child;t!==null;)bR(n,e,t),t=t.sibling}function bR(n,e,t){if(rs&&typeof rs.onCommitFiberUnmount=="function")try{rs.onCommitFiberUnmount(fg,t)}catch{}switch(t.tag){case 5:ai||dc(t,e);case 6:var i=Yn,r=Lr;Yn=null,lo(n,e,t),Yn=i,Lr=r,Yn!==null&&(Lr?(n=Yn,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Yn.removeChild(t.stateNode));break;case 18:Yn!==null&&(Lr?(n=Yn,t=t.stateNode,n.nodeType===8?Ov(n.parentNode,t):n.nodeType===1&&Ov(n,t),Ef(n)):Ov(Yn,t.stateNode));break;case 4:i=Yn,r=Lr,Yn=t.stateNode.containerInfo,Lr=!0,lo(n,e,t),Yn=i,Lr=r;break;case 0:case 11:case 14:case 15:if(!ai&&(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)&&Gx(t,e,o),r=r.next}while(r!==i)}lo(n,e,t);break;case 1:if(!ai&&(dc(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){gn(t,e,a)}lo(n,e,t);break;case 21:lo(n,e,t);break;case 22:t.mode&1?(ai=(i=ai)||t.memoizedState!==null,lo(n,e,t),ai=i):lo(n,e,t);break;default:lo(n,e,t)}}function tE(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new SO),e.forEach(function(i){var r=LO.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function Er(n,e){var t=e.deletions;if(t!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=Sn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*MO(i/1960))-i,10n?16:n,Co===null)var i=!1;else{if(n=Co,Co=null,Hm=0,Dt&6)throw Error(be(331));var r=Dt;for(Dt|=4,Ye=n.current;Ye!==null;){var s=Ye,o=s.child;if(Ye.flags&16){var a=s.deletions;if(a!==null){for(var l=0;lSn()-KS?Wa(n,0):qS|=t),ki(n,e)}function UR(n,e){e===0&&(n.mode&1?(e=zd,zd<<=1,!(zd&130023424)&&(zd=4194304)):e=1);var t=Si();n=Gs(n,e),n!==null&&(ph(n,e,t),ki(n,t))}function RO(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),UR(n,t)}function LO(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(be(314))}i!==null&&i.delete(e),UR(n,t)}var OR;OR=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Ui.current)Di=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return Di=!1,yO(n,e,t);Di=!!(n.flags&131072)}else Di=!1,on&&e.flags&1048576&&zP(e,Nm,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;am(n,e),n=e.pendingProps;var r=Dc(e,ui.current);Rc(e,t),r=HS(null,e,i,n,r,t);var s=GS();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,Oi(i)?(s=!0,Lm(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,kS(e),r.updater=yg,e.stateNode=r,r._reactInternals=e,Ox(e,i,n,t),e=Bx(null,e,i,!0,s,t)):(e.tag=0,on&&s&&RS(e),yi(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(am(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=NO(i),n=Pr(i,n),r){case 0:e=Fx(null,e,i,n,t);break e;case 1:e=ZM(null,e,i,n,t);break e;case 11:e=qM(null,e,i,n,t);break e;case 14:e=KM(null,e,i,Pr(i.type,n),t);break e}throw Error(be(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Pr(i,r),Fx(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Pr(i,r),ZM(n,e,i,r,t);case 3:e:{if(xR(e),n===null)throw Error(be(387));i=e.pendingProps,s=e.memoizedState,r=s.element,XP(n,e),Om(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=Fc(Error(be(423)),e),e=JM(n,e,i,t,r);break e}else if(i!==r){r=Fc(Error(be(424)),e),e=JM(n,e,i,t,r);break e}else for(Zi=No(e.stateNode.containerInfo.firstChild),$i=e,on=!0,Ir=null,t=WP(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Uc(),i===r){e=Ws(n,e,t);break e}yi(n,e,i,t)}e=e.child}return e;case 5:return YP(e),n===null&&Nx(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,Cx(i,r)?o=null:s!==null&&Cx(i,s)&&(e.flags|=32),yR(n,e),yi(n,e,o,t),e.child;case 6:return n===null&&Nx(e),null;case 13:return _R(n,e,t);case 4:return FS(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=Oc(e,null,i,t):yi(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Pr(i,r),qM(n,e,i,r,t);case 7:return yi(n,e,e.pendingProps,t),e.child;case 8:return yi(n,e,e.pendingProps.children,t),e.child;case 12:return yi(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,Kt(Dm,i._currentValue),i._currentValue=o,s!==null)if(Fr(s.value,o)){if(s.children===r.children&&!Ui.current){e=Ws(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 l=a.firstContext;l!==null;){if(l.context===i){if(s.tag===1){l=Os(-1,t&-t),l.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?l.next=l:(l.next=h.next,h.next=l),f.pending=l}}s.lanes|=t,l=s.alternate,l!==null&&(l.lanes|=t),Dx(s.return,t,e),a.lanes|=t;break}l=l.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(be(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),Dx(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}yi(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Rc(e,t),r=Sr(r),i=i(r),e.flags|=1,yi(n,e,i,t),e.child;case 14:return i=e.type,r=Pr(i,e.pendingProps),r=Pr(i.type,r),KM(n,e,i,r,t);case 15:return gR(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Pr(i,r),am(n,e),e.tag=1,Oi(i)?(n=!0,Lm(e)):n=!1,Rc(e,t),dR(e,i,r),Ox(e,i,r,t),Bx(null,e,i,!0,n,t);case 19:return SR(n,e,t);case 22:return vR(n,e,t)}throw Error(be(156,e.tag))};function kR(n,e){return uP(n,e)}function IO(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 yr(n,e,t,i){return new IO(n,e,t,i)}function QS(n){return n=n.prototype,!(!n||!n.isReactComponent)}function NO(n){if(typeof n=="function")return QS(n)?1:0;if(n!=null){if(n=n.$$typeof,n===yS)return 11;if(n===xS)return 14}return 2}function ko(n,e){var t=n.alternate;return t===null?(t=yr(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 um(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")QS(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case rc:return ja(t.children,r,s,e);case vS:o=8,r|=8;break;case ox:return n=yr(12,t,e,r|2),n.elementType=ox,n.lanes=s,n;case ax:return n=yr(13,t,e,r),n.elementType=ax,n.lanes=s,n;case lx:return n=yr(19,t,e,r),n.elementType=lx,n.lanes=s,n;case YC:return Sg(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case jC:o=10;break e;case XC:o=9;break e;case yS:o=11;break e;case xS:o=14;break e;case So:o=16,i=null;break e}throw Error(be(130,n==null?n:typeof n,""))}return e=yr(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function ja(n,e,t,i){return n=yr(7,n,i,e),n.lanes=t,n}function Sg(n,e,t,i){return n=yr(22,n,i,e),n.elementType=YC,n.lanes=t,n.stateNode={isHidden:!1},n}function Wv(n,e,t){return n=yr(6,n,null,e),n.lanes=t,n}function jv(n,e,t){return e=yr(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function DO(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=Ev(0),this.expirationTimes=Ev(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=Ev(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function e1(n,e,t,i,r,s,o,a,l){return n=new DO(n,e,t,a,l),e===1?(e=1,s===!0&&(e|=8)):e=0,s=yr(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},kS(s),n}function UO(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(VR)}catch(n){console.error(n)}}VR(),VC.exports=nr;var zO=VC.exports,HR,cE=zO;HR=rx.createRoot=cE.createRoot,rx.hydrateRoot=cE.hydrateRoot;/** - * @remix-run/router v1.16.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function kf(){return kf=Object.assign?Object.assign.bind():function(n){for(var e=1;e"u")throw new Error(e)}function GR(n,e){if(!n){typeof console<"u"&&console.warn(e);try{throw new Error(e)}catch{}}}function HO(){return Math.random().toString(36).substr(2,8)}function fE(n,e){return{usr:n.state,key:n.key,idx:e}}function Jx(n,e,t,i){return t===void 0&&(t=null),kf({pathname:typeof n=="string"?n:n.pathname,search:"",hash:""},typeof e=="string"?Kc(e):e,{state:t,key:e&&e.key||i||HO()})}function jm(n){let{pathname:e="/",search:t="",hash:i=""}=n;return t&&t!=="?"&&(e+=t.charAt(0)==="?"?t:"?"+t),i&&i!=="#"&&(e+=i.charAt(0)==="#"?i:"#"+i),e}function Kc(n){let e={};if(n){let t=n.indexOf("#");t>=0&&(e.hash=n.substr(t),n=n.substr(0,t));let i=n.indexOf("?");i>=0&&(e.search=n.substr(i),n=n.substr(0,i)),n&&(e.pathname=n)}return e}function GO(n,e,t,i){i===void 0&&(i={});let{window:r=document.defaultView,v5Compat:s=!1}=i,o=r.history,a=Po.Pop,l=null,f=h();f==null&&(f=0,o.replaceState(kf({},o.state,{idx:f}),""));function h(){return(o.state||{idx:null}).idx}function d(){a=Po.Pop;let x=h(),g=x==null?null:x-f;f=x,l&&l({action:a,location:_.location,delta:g})}function p(x,g){a=Po.Push;let S=Jx(_.location,x,g);t&&t(S,x),f=h()+1;let A=fE(S,f),E=_.createHref(S);try{o.pushState(A,"",E)}catch(R){if(R instanceof DOMException&&R.name==="DataCloneError")throw R;r.location.assign(E)}s&&l&&l({action:a,location:_.location,delta:1})}function m(x,g){a=Po.Replace;let S=Jx(_.location,x,g);t&&t(S,x),f=h();let A=fE(S,f),E=_.createHref(S);o.replaceState(A,"",E),s&&l&&l({action:a,location:_.location,delta:0})}function y(x){let g=r.location.origin!=="null"?r.location.origin:r.location.href,S=typeof x=="string"?x:jm(x);return S=S.replace(/ $/,"%20"),Rn(g,"No window.location.(origin|href) available to create URL for href: "+S),new URL(S,g)}let _={get action(){return a},get location(){return n(r,o)},listen(x){if(l)throw new Error("A history only accepts one active listener");return r.addEventListener(uE,d),l=x,()=>{r.removeEventListener(uE,d),l=null}},createHref(x){return e(r,x)},createURL:y,encodeLocation(x){let g=y(x);return{pathname:g.pathname,search:g.search,hash:g.hash}},push:p,replace:m,go(x){return o.go(x)}};return _}var hE;(function(n){n.data="data",n.deferred="deferred",n.redirect="redirect",n.error="error"})(hE||(hE={}));function WO(n,e,t){t===void 0&&(t="/");let i=typeof e=="string"?Kc(e):e,r=r1(i.pathname||"/",t);if(r==null)return null;let s=WR(n);jO(s);let o=null;for(let a=0;o==null&&a{let l={relativePath:a===void 0?s.path||"":a,caseSensitive:s.caseSensitive===!0,childrenIndex:o,route:s};l.relativePath.startsWith("/")&&(Rn(l.relativePath.startsWith(i),'Absolute route path "'+l.relativePath+'" nested under path '+('"'+i+'" is not valid. An absolute child route path ')+"must start with the combined path of all its parent routes."),l.relativePath=l.relativePath.slice(i.length));let f=Fo([i,l.relativePath]),h=t.concat(l);s.children&&s.children.length>0&&(Rn(s.index!==!0,"Index routes must not have child routes. Please remove "+('all child routes from route path "'+f+'".')),WR(s.children,e,h,f)),!(s.path==null&&!s.index)&&e.push({path:f,score:$O(f,s.index),routesMeta:h})};return n.forEach((s,o)=>{var a;if(s.path===""||!((a=s.path)!=null&&a.includes("?")))r(s,o);else for(let l of jR(s.path))r(s,o,l)}),e}function jR(n){let e=n.split("/");if(e.length===0)return[];let[t,...i]=e,r=t.endsWith("?"),s=t.replace(/\?$/,"");if(i.length===0)return r?[s,""]:[s];let o=jR(i.join("/")),a=[];return a.push(...o.map(l=>l===""?s:[s,l].join("/"))),r&&a.push(...o),a.map(l=>n.startsWith("/")&&l===""?"/":l)}function jO(n){n.sort((e,t)=>e.score!==t.score?t.score-e.score:QO(e.routesMeta.map(i=>i.childrenIndex),t.routesMeta.map(i=>i.childrenIndex)))}const XO=/^:[\w-]+$/,YO=3,qO=2,KO=1,ZO=10,JO=-2,dE=n=>n==="*";function $O(n,e){let t=n.split("/"),i=t.length;return t.some(dE)&&(i+=JO),e&&(i+=qO),t.filter(r=>!dE(r)).reduce((r,s)=>r+(XO.test(s)?YO:s===""?KO:ZO),i)}function QO(n,e){return n.length===e.length&&n.slice(0,-1).every((i,r)=>i===e[r])?n[n.length-1]-e[e.length-1]:0}function ek(n,e){let{routesMeta:t}=n,i={},r="/",s=[];for(let o=0;o{let{paramName:p,isOptional:m}=h;if(p==="*"){let _=a[d]||"";o=s.slice(0,s.length-_.length).replace(/(.)\/+$/,"$1")}const y=a[d];return m&&!y?f[p]=void 0:f[p]=(y||"").replace(/%2F/g,"/"),f},{}),pathname:s,pathnameBase:o,pattern:n}}function nk(n,e,t){e===void 0&&(e=!1),t===void 0&&(t=!0),GR(n==="*"||!n.endsWith("*")||n.endsWith("/*"),'Route path "'+n+'" will be treated as if it were '+('"'+n.replace(/\*$/,"/*")+'" because the `*` character must ')+"always follow a `/` in the pattern. To get rid of this warning, "+('please change the route path to "'+n.replace(/\*$/,"/*")+'".'));let i=[],r="^"+n.replace(/\/*\*?$/,"").replace(/^\/*/,"/").replace(/[\\.*+^${}|()[\]]/g,"\\$&").replace(/\/:([\w-]+)(\?)?/g,(o,a,l)=>(i.push({paramName:a,isOptional:l!=null}),l?"/?([^\\/]+)?":"/([^\\/]+)"));return n.endsWith("*")?(i.push({paramName:"*"}),r+=n==="*"||n==="/*"?"(.*)$":"(?:\\/(.+)|\\/*)$"):t?r+="\\/*$":n!==""&&n!=="/"&&(r+="(?:(?=\\/|$))"),[new RegExp(r,e?void 0:"i"),i]}function ik(n){try{return n.split("/").map(e=>decodeURIComponent(e).replace(/\//g,"%2F")).join("/")}catch(e){return GR(!1,'The URL path "'+n+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent '+("encoding ("+e+").")),n}}function r1(n,e){if(e==="/")return n;if(!n.toLowerCase().startsWith(e.toLowerCase()))return null;let t=e.endsWith("/")?e.length-1:e.length,i=n.charAt(t);return i&&i!=="/"?null:n.slice(t)||"/"}function rk(n,e){e===void 0&&(e="/");let{pathname:t,search:i="",hash:r=""}=typeof n=="string"?Kc(n):n;return{pathname:t?t.startsWith("/")?t:sk(t,e):e,search:lk(i),hash:ck(r)}}function sk(n,e){let t=e.replace(/\/+$/,"").split("/");return n.split("/").forEach(r=>{r===".."?t.length>1&&t.pop():r!=="."&&t.push(r)}),t.length>1?t.join("/"):"/"}function Xv(n,e,t,i){return"Cannot include a '"+n+"' character in a manually specified "+("`to."+e+"` field ["+JSON.stringify(i)+"]. Please separate it out to the ")+("`to."+t+"` field. Alternatively you may provide the full path as ")+'a string in and the router will parse it for you.'}function ok(n){return n.filter((e,t)=>t===0||e.route.path&&e.route.path.length>0)}function XR(n,e){let t=ok(n);return e?t.map((i,r)=>r===n.length-1?i.pathname:i.pathnameBase):t.map(i=>i.pathnameBase)}function YR(n,e,t,i){i===void 0&&(i=!1);let r;typeof n=="string"?r=Kc(n):(r=kf({},n),Rn(!r.pathname||!r.pathname.includes("?"),Xv("?","pathname","search",r)),Rn(!r.pathname||!r.pathname.includes("#"),Xv("#","pathname","hash",r)),Rn(!r.search||!r.search.includes("#"),Xv("#","search","hash",r)));let s=n===""||r.pathname==="",o=s?"/":r.pathname,a;if(o==null)a=t;else{let d=e.length-1;if(!i&&o.startsWith("..")){let p=o.split("/");for(;p[0]==="..";)p.shift(),d-=1;r.pathname=p.join("/")}a=d>=0?e[d]:"/"}let l=rk(r,a),f=o&&o!=="/"&&o.endsWith("/"),h=(s||o===".")&&t.endsWith("/");return!l.pathname.endsWith("/")&&(f||h)&&(l.pathname+="/"),l}const Fo=n=>n.join("/").replace(/\/\/+/g,"/"),ak=n=>n.replace(/\/+$/,"").replace(/^\/*/,"/"),lk=n=>!n||n==="?"?"":n.startsWith("?")?n:"?"+n,ck=n=>!n||n==="#"?"":n.startsWith("#")?n:"#"+n;function uk(n){return n!=null&&typeof n.status=="number"&&typeof n.statusText=="string"&&typeof n.internal=="boolean"&&"data"in n}const qR=["post","put","patch","delete"];new Set(qR);const fk=["get",...qR];new Set(fk);/** - * React Router v6.23.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Ff(){return Ff=Object.assign?Object.assign.bind():function(n){for(var e=1;e{a.current=!0}),F.useCallback(function(f,h){if(h===void 0&&(h={}),!a.current)return;if(typeof f=="number"){i.go(f);return}let d=YR(f,JSON.parse(o),s,h.relative==="path");n==null&&e!=="/"&&(d.pathname=d.pathname==="/"?e:Fo([e,d.pathname])),(h.replace?i.replace:i.push)(d,h.state,h)},[e,i,o,s,n])}function JR(n,e){let{relative:t}=e===void 0?{}:e,{future:i}=F.useContext(cl),{matches:r}=F.useContext(ul),{pathname:s}=bg(),o=JSON.stringify(XR(r,i.v7_relativeSplatPath));return F.useMemo(()=>YR(n,JSON.parse(o),s,t==="path"),[n,o,s,t])}function gk(n,e){return vk(n,e)}function vk(n,e,t,i){yh()||Rn(!1);let{navigator:r}=F.useContext(cl),{matches:s}=F.useContext(ul),o=s[s.length-1],a=o?o.params:{};o&&o.pathname;let l=o?o.pathnameBase:"/";o&&o.route;let f=bg(),h;if(e){var d;let x=typeof e=="string"?Kc(e):e;l==="/"||(d=x.pathname)!=null&&d.startsWith(l)||Rn(!1),h=x}else h=f;let p=h.pathname||"/",m=p;if(l!=="/"){let x=l.replace(/^\//,"").split("/");m="/"+p.replace(/^\//,"").split("/").slice(x.length).join("/")}let y=WO(n,{pathname:m}),_=Ak(y&&y.map(x=>Object.assign({},x,{params:Object.assign({},a,x.params),pathname:Fo([l,r.encodeLocation?r.encodeLocation(x.pathname).pathname:x.pathname]),pathnameBase:x.pathnameBase==="/"?l:Fo([l,r.encodeLocation?r.encodeLocation(x.pathnameBase).pathname:x.pathnameBase])})),s,t,i);return e&&_?F.createElement(Tg.Provider,{value:{location:Ff({pathname:"/",search:"",hash:"",state:null,key:"default"},h),navigationType:Po.Pop}},_):_}function yk(){let n=Tk(),e=uk(n)?n.status+" "+n.statusText:n instanceof Error?n.message:JSON.stringify(n),t=n instanceof Error?n.stack:null,r={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"},s=null;return F.createElement(F.Fragment,null,F.createElement("h2",null,"Unexpected Application Error!"),F.createElement("h3",{style:{fontStyle:"italic"}},e),t?F.createElement("pre",{style:r},t):null,s)}const xk=F.createElement(yk,null);class _k extends F.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||t.revalidation!=="idle"&&e.revalidation==="idle"?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:e.error!==void 0?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return this.state.error!==void 0?F.createElement(ul.Provider,{value:this.props.routeContext},F.createElement(KR.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Sk(n){let{routeContext:e,match:t,children:i}=n,r=F.useContext(s1);return r&&r.static&&r.staticContext&&(t.route.errorElement||t.route.ErrorBoundary)&&(r.staticContext._deepestRenderedBoundaryId=t.route.id),F.createElement(ul.Provider,{value:e},i)}function Ak(n,e,t,i){var r;if(e===void 0&&(e=[]),t===void 0&&(t=null),i===void 0&&(i=null),n==null){var s;if((s=t)!=null&&s.errors)n=t.matches;else return null}let o=n,a=(r=t)==null?void 0:r.errors;if(a!=null){let h=o.findIndex(d=>d.route.id&&(a==null?void 0:a[d.route.id])!==void 0);h>=0||Rn(!1),o=o.slice(0,Math.min(o.length,h+1))}let l=!1,f=-1;if(t&&i&&i.v7_partialHydration)for(let h=0;h=0?o=o.slice(0,f+1):o=[o[0]];break}}}return o.reduceRight((h,d,p)=>{let m,y=!1,_=null,x=null;t&&(m=a&&d.route.id?a[d.route.id]:void 0,_=d.route.errorElement||xk,l&&(f<0&&p===0?(Ck("route-fallback",!1),y=!0,x=null):f===p&&(y=!0,x=d.route.hydrateFallbackElement||null)));let g=e.concat(o.slice(0,p+1)),S=()=>{let A;return m?A=_:y?A=x:d.route.Component?A=F.createElement(d.route.Component,null):d.route.element?A=d.route.element:A=h,F.createElement(Sk,{match:d,routeContext:{outlet:h,matches:g,isDataRoute:t!=null},children:A})};return t&&(d.route.ErrorBoundary||d.route.errorElement||p===0)?F.createElement(_k,{location:t.location,revalidation:t.revalidation,component:_,error:m,children:S(),routeContext:{outlet:null,matches:g,isDataRoute:!0}}):S()},null)}var $R=function(n){return n.UseBlocker="useBlocker",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n}($R||{}),Xm=function(n){return n.UseBlocker="useBlocker",n.UseLoaderData="useLoaderData",n.UseActionData="useActionData",n.UseRouteError="useRouteError",n.UseNavigation="useNavigation",n.UseRouteLoaderData="useRouteLoaderData",n.UseMatches="useMatches",n.UseRevalidator="useRevalidator",n.UseNavigateStable="useNavigate",n.UseRouteId="useRouteId",n}(Xm||{});function wk(n){let e=F.useContext(s1);return e||Rn(!1),e}function Mk(n){let e=F.useContext(hk);return e||Rn(!1),e}function Ek(n){let e=F.useContext(ul);return e||Rn(!1),e}function QR(n){let e=Ek(),t=e.matches[e.matches.length-1];return t.route.id||Rn(!1),t.route.id}function Tk(){var n;let e=F.useContext(KR),t=Mk(Xm.UseRouteError),i=QR(Xm.UseRouteError);return e!==void 0?e:(n=t.errors)==null?void 0:n[i]}function bk(){let{router:n}=wk($R.UseNavigateStable),e=QR(Xm.UseNavigateStable),t=F.useRef(!1);return ZR(()=>{t.current=!0}),F.useCallback(function(r,s){s===void 0&&(s={}),t.current&&(typeof r=="number"?n.navigate(r):n.navigate(r,Ff({fromRouteId:e},s)))},[n,e])}const pE={};function Ck(n,e,t){!e&&!pE[n]&&(pE[n]=!0)}function Ts(n){Rn(!1)}function Pk(n){let{basename:e="/",children:t=null,location:i,navigationType:r=Po.Pop,navigator:s,static:o=!1,future:a}=n;yh()&&Rn(!1);let l=e.replace(/^\/*/,"/"),f=F.useMemo(()=>({basename:l,navigator:s,static:o,future:Ff({v7_relativeSplatPath:!1},a)}),[l,a,s,o]);typeof i=="string"&&(i=Kc(i));let{pathname:h="/",search:d="",hash:p="",state:m=null,key:y="default"}=i,_=F.useMemo(()=>{let x=r1(h,l);return x==null?null:{location:{pathname:x,search:d,hash:p,state:m,key:y},navigationType:r}},[l,h,d,p,m,y,r]);return _==null?null:F.createElement(cl.Provider,{value:f},F.createElement(Tg.Provider,{children:t,value:_}))}function Rk(n){let{children:e,location:t}=n;return gk($x(e),t)}new Promise(()=>{});function $x(n,e){e===void 0&&(e=[]);let t=[];return F.Children.forEach(n,(i,r)=>{if(!F.isValidElement(i))return;let s=[...e,r];if(i.type===F.Fragment){t.push.apply(t,$x(i.props.children,s));return}i.type!==Ts&&Rn(!1),!i.props.index||!i.props.children||Rn(!1);let o={id:i.props.id||s.join("-"),caseSensitive:i.props.caseSensitive,element:i.props.element,Component:i.props.Component,index:i.props.index,path:i.props.path,loader:i.props.loader,action:i.props.action,errorElement:i.props.errorElement,ErrorBoundary:i.props.ErrorBoundary,hasErrorBoundary:i.props.ErrorBoundary!=null||i.props.errorElement!=null,shouldRevalidate:i.props.shouldRevalidate,handle:i.props.handle,lazy:i.props.lazy};i.props.children&&(o.children=$x(i.props.children,s)),t.push(o)}),t}/** - * React Router DOM v6.23.1 - * - * Copyright (c) Remix Software Inc. - * - * This source code is licensed under the MIT license found in the - * LICENSE.md file in the root directory of this source tree. - * - * @license MIT - */function Qx(){return Qx=Object.assign?Object.assign.bind():function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}function Ik(n){return!!(n.metaKey||n.altKey||n.ctrlKey||n.shiftKey)}function Nk(n,e){return n.button===0&&(!e||e==="_self")&&!Ik(n)}const Dk=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],Uk="6";try{window.__reactRouterVersion=Uk}catch{}const Ok="startTransition",mE=PD[Ok];function kk(n){let{basename:e,children:t,future:i,window:r}=n,s=F.useRef();s.current==null&&(s.current=VO({window:r,v5Compat:!0}));let o=s.current,[a,l]=F.useState({action:o.action,location:o.location}),{v7_startTransition:f}=i||{},h=F.useCallback(d=>{f&&mE?mE(()=>l(d)):l(d)},[l,f]);return F.useLayoutEffect(()=>o.listen(h),[o,h]),F.createElement(Pk,{basename:e,children:t,location:a.location,navigationType:a.action,navigator:o,future:i})}const Fk=typeof window<"u"&&typeof window.document<"u"&&typeof window.document.createElement<"u",Bk=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,Yv=F.forwardRef(function(e,t){let{onClick:i,relative:r,reloadDocument:s,replace:o,state:a,target:l,to:f,preventScrollReset:h,unstable_viewTransition:d}=e,p=Lk(e,Dk),{basename:m}=F.useContext(cl),y,_=!1;if(typeof f=="string"&&Bk.test(f)&&(y=f,Fk))try{let A=new URL(window.location.href),E=f.startsWith("//")?new URL(A.protocol+f):new URL(f),R=r1(E.pathname,m);E.origin===A.origin&&R!=null?f=R+E.search+E.hash:_=!0}catch{}let x=dk(f,{relative:r}),g=zk(f,{replace:o,state:a,target:l,preventScrollReset:h,relative:r,unstable_viewTransition:d});function S(A){i&&i(A),A.defaultPrevented||g(A)}return F.createElement("a",Qx({},p,{href:y||x,onClick:_||s?i:S,ref:t,target:l}))});var gE;(function(n){n.UseScrollRestoration="useScrollRestoration",n.UseSubmit="useSubmit",n.UseSubmitFetcher="useSubmitFetcher",n.UseFetcher="useFetcher",n.useViewTransitionState="useViewTransitionState"})(gE||(gE={}));var vE;(function(n){n.UseFetcher="useFetcher",n.UseFetchers="useFetchers",n.UseScrollRestoration="useScrollRestoration"})(vE||(vE={}));function zk(n,e){let{target:t,replace:i,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:a}=e===void 0?{}:e,l=pk(),f=bg(),h=JR(n,{relative:o});return F.useCallback(d=>{if(Nk(d,t)){d.preventDefault();let p=i!==void 0?i:jm(f)===jm(h);l(n,{replace:p,state:r,preventScrollReset:s,relative:o,unstable_viewTransition:a})}},[f,l,h,i,r,t,n,s,o,a])}const xh="/portfolio-react-threejs/assets/anim-bg-41fcb528.gif",e2=F.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"}),Cg=F.createContext({}),Pg=F.createContext(null),Rg=typeof document<"u",o1=Rg?F.useLayoutEffect:F.useEffect,t2=F.createContext({strict:!1}),a1=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),Vk="framerAppearId",n2="data-"+a1(Vk);function Hk(n,e,t,i){const{visualElement:r}=F.useContext(Cg),s=F.useContext(t2),o=F.useContext(Pg),a=F.useContext(e2).reducedMotion,l=F.useRef();i=i||s.renderer,!l.current&&i&&(l.current=i(n,{visualState:e,parent:r,props:t,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const f=l.current;F.useInsertionEffect(()=>{f&&f.update(t,o)});const h=F.useRef(!!(t[n2]&&!window.HandoffComplete));return o1(()=>{f&&(f.render(),h.current&&f.animationState&&f.animationState.animateChanges())}),F.useEffect(()=>{f&&(f.updateFeatures(),!h.current&&f.animationState&&f.animationState.animateChanges(),h.current&&(h.current=!1,window.HandoffComplete=!0))}),f}function mc(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function Gk(n,e,t){return F.useCallback(i=>{i&&n.mount&&n.mount(i),e&&(i?e.mount(i):e.unmount()),t&&(typeof t=="function"?t(i):mc(t)&&(t.current=i))},[e])}function Bf(n){return typeof n=="string"||Array.isArray(n)}function Lg(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const l1=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],c1=["initial",...l1];function Ig(n){return Lg(n.animate)||c1.some(e=>Bf(n[e]))}function i2(n){return!!(Ig(n)||n.variants)}function Wk(n,e){if(Ig(n)){const{initial:t,animate:i}=n;return{initial:t===!1||Bf(t)?t:void 0,animate:Bf(i)?i:void 0}}return n.inherit!==!1?e:{}}function jk(n){const{initial:e,animate:t}=Wk(n,F.useContext(Cg));return F.useMemo(()=>({initial:e,animate:t}),[yE(e),yE(t)])}function yE(n){return Array.isArray(n)?n.join(" "):n}const xE={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},zf={};for(const n in xE)zf[n]={isEnabled:e=>xE[n].some(t=>!!e[t])};function Xk(n){for(const e in n)zf[e]={...zf[e],...n[e]}}const u1=F.createContext({}),r2=F.createContext({}),Yk=Symbol.for("motionComponentSymbol");function qk({preloadedFeatures:n,createVisualElement:e,useRender:t,useVisualState:i,Component:r}){n&&Xk(n);function s(a,l){let f;const h={...F.useContext(e2),...a,layoutId:Kk(a)},{isStatic:d}=h,p=jk(a),m=i(a,d);if(!d&&Rg){p.visualElement=Hk(r,m,h,e);const y=F.useContext(r2),_=F.useContext(t2).strict;p.visualElement&&(f=p.visualElement.loadFeatures(h,_,n,y))}return F.createElement(Cg.Provider,{value:p},f&&p.visualElement?F.createElement(f,{visualElement:p.visualElement,...h}):null,t(r,a,Gk(m,p.visualElement,l),m,d,p.visualElement))}const o=F.forwardRef(s);return o[Yk]=r,o}function Kk({layoutId:n}){const e=F.useContext(u1).id;return e&&n!==void 0?e+"-"+n:n}function Zk(n){function e(i,r={}){return qk(n(i,r))}if(typeof Proxy>"u")return e;const t=new Map;return new Proxy(e,{get:(i,r)=>(t.has(r)||t.set(r,e(r)),t.get(r))})}const Jk=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function f1(n){return typeof n!="string"||n.includes("-")?!1:!!(Jk.indexOf(n)>-1||/[A-Z]/.test(n))}const Ym={};function $k(n){Object.assign(Ym,n)}const _h=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],fl=new Set(_h);function s2(n,{layout:e,layoutId:t}){return fl.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!Ym[n]||n==="opacity")}const Fi=n=>!!(n&&n.getVelocity),Qk={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},eF=_h.length;function tF(n,{enableHardwareAcceleration:e=!0,allowTransformNone:t=!0},i,r){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(n),a2=o2("--"),e_=o2("var(--"),nF=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,iF=(n,e)=>e&&typeof n=="number"?e.transform(n):n,Go=(n,e,t)=>Math.min(Math.max(t,n),e),hl={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},ff={...hl,transform:n=>Go(0,1,n)},$d={...hl,default:1},hf=n=>Math.round(n*1e5)/1e5,Ng=/(-)?([\d]*\.?[\d])+/g,l2=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,rF=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function Sh(n){return typeof n=="string"}const Ah=n=>({test:e=>Sh(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),_o=Ah("deg"),os=Ah("%"),ht=Ah("px"),sF=Ah("vh"),oF=Ah("vw"),_E={...os,parse:n=>os.parse(n)/100,transform:n=>os.transform(n*100)},SE={...hl,transform:Math.round},c2={borderWidth:ht,borderTopWidth:ht,borderRightWidth:ht,borderBottomWidth:ht,borderLeftWidth:ht,borderRadius:ht,radius:ht,borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomRightRadius:ht,borderBottomLeftRadius:ht,width:ht,maxWidth:ht,height:ht,maxHeight:ht,size:ht,top:ht,right:ht,bottom:ht,left:ht,padding:ht,paddingTop:ht,paddingRight:ht,paddingBottom:ht,paddingLeft:ht,margin:ht,marginTop:ht,marginRight:ht,marginBottom:ht,marginLeft:ht,rotate:_o,rotateX:_o,rotateY:_o,rotateZ:_o,scale:$d,scaleX:$d,scaleY:$d,scaleZ:$d,skew:_o,skewX:_o,skewY:_o,distance:ht,translateX:ht,translateY:ht,translateZ:ht,x:ht,y:ht,z:ht,perspective:ht,transformPerspective:ht,opacity:ff,originX:_E,originY:_E,originZ:ht,zIndex:SE,fillOpacity:ff,strokeOpacity:ff,numOctaves:SE};function h1(n,e,t,i){const{style:r,vars:s,transform:o,transformOrigin:a}=n;let l=!1,f=!1,h=!0;for(const d in e){const p=e[d];if(a2(d)){s[d]=p;continue}const m=c2[d],y=iF(p,m);if(fl.has(d)){if(l=!0,o[d]=y,!h)continue;p!==(m.default||0)&&(h=!1)}else d.startsWith("origin")?(f=!0,a[d]=y):r[d]=y}if(e.transform||(l||i?r.transform=tF(n.transform,t,h,i):r.transform&&(r.transform="none")),f){const{originX:d="50%",originY:p="50%",originZ:m=0}=a;r.transformOrigin=`${d} ${p} ${m}`}}const d1=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function u2(n,e,t){for(const i in e)!Fi(e[i])&&!s2(i,t)&&(n[i]=e[i])}function aF({transformTemplate:n},e,t){return F.useMemo(()=>{const i=d1();return h1(i,e,{enableHardwareAcceleration:!t},n),Object.assign({},i.vars,i.style)},[e])}function lF(n,e,t){const i=n.style||{},r={};return u2(r,i,n),Object.assign(r,aF(n,e,t)),n.transformValues?n.transformValues(r):r}function cF(n,e,t){const i={},r=lF(n,e,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=r,i}const uF=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function qm(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||uF.has(n)}let f2=n=>!qm(n);function fF(n){n&&(f2=e=>e.startsWith("on")?!qm(e):n(e))}try{fF(require("@emotion/is-prop-valid").default)}catch{}function hF(n,e,t){const i={};for(const r in n)r==="values"&&typeof n.values=="object"||(f2(r)||t===!0&&qm(r)||!e&&!qm(r)||n.draggable&&r.startsWith("onDrag"))&&(i[r]=n[r]);return i}function AE(n,e,t){return typeof n=="string"?n:ht.transform(e+t*n)}function dF(n,e,t){const i=AE(e,n.x,n.width),r=AE(t,n.y,n.height);return`${i} ${r}`}const pF={offset:"stroke-dashoffset",array:"stroke-dasharray"},mF={offset:"strokeDashoffset",array:"strokeDasharray"};function gF(n,e,t=1,i=0,r=!0){n.pathLength=1;const s=r?pF:mF;n[s.offset]=ht.transform(-i);const o=ht.transform(e),a=ht.transform(t);n[s.array]=`${o} ${a}`}function p1(n,{attrX:e,attrY:t,attrScale:i,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:l=0,...f},h,d,p){if(h1(n,f,h,p),d){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:m,style:y,dimensions:_}=n;m.transform&&(_&&(y.transform=m.transform),delete m.transform),_&&(r!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=dF(_,r!==void 0?r:.5,s!==void 0?s:.5)),e!==void 0&&(m.x=e),t!==void 0&&(m.y=t),i!==void 0&&(m.scale=i),o!==void 0&&gF(m,o,a,l,!1)}const h2=()=>({...d1(),attrs:{}}),m1=n=>typeof n=="string"&&n.toLowerCase()==="svg";function vF(n,e,t,i){const r=F.useMemo(()=>{const s=h2();return p1(s,e,{enableHardwareAcceleration:!1},m1(i),n.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};u2(s,n.style,n),r.style={...s,...r.style}}return r}function yF(n=!1){return(t,i,r,{latestValues:s},o)=>{const l=(f1(t)?vF:cF)(i,s,o,t),h={...hF(i,typeof t=="string",n),...l,ref:r},{children:d}=i,p=F.useMemo(()=>Fi(d)?d.get():d,[d]);return F.createElement(t,{...h,children:p})}}function d2(n,{style:e,vars:t},i,r){Object.assign(n.style,e,r&&r.getProjectionStyles(i));for(const s in t)n.style.setProperty(s,t[s])}const p2=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function m2(n,e,t,i){d2(n,e,void 0,i);for(const r in e.attrs)n.setAttribute(p2.has(r)?r:a1(r),e.attrs[r])}function g1(n,e){const{style:t}=n,i={};for(const r in t)(Fi(t[r])||e.style&&Fi(e.style[r])||s2(r,n))&&(i[r]=t[r]);return i}function g2(n,e){const t=g1(n,e);for(const i in n)if(Fi(n[i])||Fi(e[i])){const r=_h.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;t[r]=n[i]}return t}function v1(n,e,t,i={},r={}){return typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),e}function v2(n){const e=F.useRef(null);return e.current===null&&(e.current=n()),e.current}const Km=n=>Array.isArray(n),xF=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),_F=n=>Km(n)?n[n.length-1]||0:n;function fm(n){const e=Fi(n)?n.get():n;return xF(e)?e.toValue():e}function SF({scrapeMotionValuesFromProps:n,createRenderState:e,onMount:t},i,r,s){const o={latestValues:AF(i,r,s,n),renderState:e()};return t&&(o.mount=a=>t(i,a,o)),o}const y2=n=>(e,t)=>{const i=F.useContext(Cg),r=F.useContext(Pg),s=()=>SF(n,e,i,r);return t?s():v2(s)};function AF(n,e,t,i){const r={},s=i(n,{});for(const p in s)r[p]=fm(s[p]);let{initial:o,animate:a}=n;const l=Ig(n),f=i2(n);e&&f&&!l&&n.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let h=t?t.initial===!1:!1;h=h||o===!1;const d=h?a:o;return d&&typeof d!="boolean"&&!Lg(d)&&(Array.isArray(d)?d:[d]).forEach(m=>{const y=v1(n,m);if(!y)return;const{transitionEnd:_,transition:x,...g}=y;for(const S in g){let A=g[S];if(Array.isArray(A)){const E=h?A.length-1:0;A=A[E]}A!==null&&(r[S]=A)}for(const S in _)r[S]=_[S]}),r}const yn=n=>n;class wE{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);t!==-1&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function wF(n){let e=new wE,t=new wE,i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(l,f=!1,h=!1)=>{const d=h&&r,p=d?e:t;return f&&o.add(l),p.add(l)&&d&&r&&(i=e.order.length),l},cancel:l=>{t.remove(l),o.delete(l)},process:l=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.clear(),i=e.order.length,i)for(let f=0;f(d[p]=wF(()=>t=!0),d),{}),o=d=>s[d].process(r),a=()=>{const d=performance.now();t=!1,r.delta=i?1e3/60:Math.max(Math.min(d-r.timestamp,MF),1),r.timestamp=d,r.isProcessing=!0,Qd.forEach(o),r.isProcessing=!1,t&&e&&(i=!1,n(a))},l=()=>{t=!0,i=!0,r.isProcessing||n(a)};return{schedule:Qd.reduce((d,p)=>{const m=s[p];return d[p]=(y,_=!1,x=!1)=>(t||l(),m.schedule(y,_,x)),d},{}),cancel:d=>Qd.forEach(p=>s[p].cancel(d)),state:r,steps:s}}const{schedule:Zt,cancel:js,state:oi,steps:qv}=EF(typeof requestAnimationFrame<"u"?requestAnimationFrame:yn,!0),TF={useVisualState:y2({scrapeMotionValuesFromProps:g2,createRenderState:h2,onMount:(n,e,{renderState:t,latestValues:i})=>{Zt.read(()=>{try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}),Zt.render(()=>{p1(t,i,{enableHardwareAcceleration:!1},m1(e.tagName),n.transformTemplate),m2(e,t)})}})},bF={useVisualState:y2({scrapeMotionValuesFromProps:g1,createRenderState:d1})};function CF(n,{forwardMotionProps:e=!1},t,i){return{...f1(n)?TF:bF,preloadedFeatures:t,useRender:yF(e),createVisualElement:i,Component:n}}function Ds(n,e,t,i={passive:!0}){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t)}const x2=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function Dg(n,e="page"){return{point:{x:n[e+"X"],y:n[e+"Y"]}}}const PF=n=>e=>x2(e)&&n(e,Dg(e));function ks(n,e,t,i){return Ds(n,e,PF(t),i)}const RF=(n,e)=>t=>e(n(t)),Bo=(...n)=>n.reduce(RF);function _2(n){let e=null;return()=>{const t=()=>{e=null};return e===null?(e=n,t):!1}}const ME=_2("dragHorizontal"),EE=_2("dragVertical");function S2(n){let e=!1;if(n==="y")e=EE();else if(n==="x")e=ME();else{const t=ME(),i=EE();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function A2(){const n=S2(!0);return n?(n(),!1):!0}class Zo{constructor(e){this.isMounted=!1,this.node=e}update(){}}function TE(n,e){const t="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),r=(s,o)=>{if(s.pointerType==="touch"||A2())return;const a=n.getProps();n.animationState&&a.whileHover&&n.animationState.setActive("whileHover",e),a[i]&&Zt.update(()=>a[i](s,o))};return ks(n.current,t,r,{passive:!n.getProps()[i]})}class LF extends Zo{mount(){this.unmount=Bo(TE(this.node,!0),TE(this.node,!1))}unmount(){}}class IF extends Zo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=Bo(Ds(this.node.current,"focus",()=>this.onFocus()),Ds(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const w2=(n,e)=>e?n===e?!0:w2(n,e.parentElement):!1;function Kv(n,e){if(!e)return;const t=new PointerEvent("pointer"+n);e(t,Dg(t))}class NF extends Zo{constructor(){super(...arguments),this.removeStartListeners=yn,this.removeEndListeners=yn,this.removeAccessibleListeners=yn,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const i=this.node.getProps(),s=ks(window,"pointerup",(a,l)=>{if(!this.checkPressEnd())return;const{onTap:f,onTapCancel:h,globalTapTarget:d}=this.node.getProps();Zt.update(()=>{!d&&!w2(this.node.current,a.target)?h&&h(a,l):f&&f(a,l)})},{passive:!(i.onTap||i.onPointerUp)}),o=ks(window,"pointercancel",(a,l)=>this.cancelPress(a,l),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=Bo(s,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Kv("up",(l,f)=>{const{onTap:h}=this.node.getProps();h&&Zt.update(()=>h(l,f))})};this.removeEndListeners(),this.removeEndListeners=Ds(this.node.current,"keyup",o),Kv("down",(a,l)=>{this.startPress(a,l)})},t=Ds(this.node.current,"keydown",e),i=()=>{this.isPressing&&Kv("cancel",(s,o)=>this.cancelPress(s,o))},r=Ds(this.node.current,"blur",i);this.removeAccessibleListeners=Bo(t,r)}}startPress(e,t){this.isPressing=!0;const{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&Zt.update(()=>i(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!A2()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&Zt.update(()=>i(e,t))}mount(){const e=this.node.getProps(),t=ks(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=Ds(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=Bo(t,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const t_=new WeakMap,Zv=new WeakMap,DF=n=>{const e=t_.get(n.target);e&&e(n)},UF=n=>{n.forEach(DF)};function OF({root:n,...e}){const t=n||document;Zv.has(t)||Zv.set(t,{});const i=Zv.get(t),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(UF,{root:n,...e})),i[r]}function kF(n,e,t){const i=OF(e);return t_.set(n,t),i.observe(n),()=>{t_.delete(n),i.unobserve(n)}}const FF={some:0,all:1};class BF extends Zo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:i,amount:r="some",once:s}=e,o={root:t?t.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:FF[r]},a=l=>{const{isIntersecting:f}=l;if(this.isInView===f||(this.isInView=f,s&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:d}=this.node.getProps(),p=f?h:d;p&&p(l)};return kF(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(zF(e,t))&&this.startObserver()}unmount(){}}function zF({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const VF={inView:{Feature:BF},tap:{Feature:NF},focus:{Feature:IF},hover:{Feature:LF}};function M2(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let i=0;ie[i]=t.get()),e}function GF(n){const e={};return n.values.forEach((t,i)=>e[i]=t.getVelocity()),e}function Ug(n,e,t){const i=n.getProps();return v1(i,e,t!==void 0?t:i.custom,HF(n),GF(n))}let WF=yn,y1=yn;const zo=n=>n*1e3,Fs=n=>n/1e3,jF={current:!1},E2=n=>Array.isArray(n)&&typeof n[0]=="number";function T2(n){return!!(!n||typeof n=="string"&&b2[n]||E2(n)||Array.isArray(n)&&n.every(T2))}const $u=([n,e,t,i])=>`cubic-bezier(${n}, ${e}, ${t}, ${i})`,b2={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:$u([0,.65,.55,1]),circOut:$u([.55,0,1,.45]),backIn:$u([.31,.01,.66,-.59]),backOut:$u([.33,1.53,.69,.99])};function C2(n){if(n)return E2(n)?$u(n):Array.isArray(n)?n.map(C2):b2[n]}function XF(n,e,t,{delay:i=0,duration:r,repeat:s=0,repeatType:o="loop",ease:a,times:l}={}){const f={[e]:t};l&&(f.offset=l);const h=C2(a);return Array.isArray(h)&&(f.easing=h),n.animate(f,{delay:i,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}function YF(n,{repeat:e,repeatType:t="loop"}){const i=e&&t!=="loop"&&e%2===1?0:n.length-1;return n[i]}const P2=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,qF=1e-7,KF=12;function ZF(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=P2(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>qF&&++aZF(s,0,1,n,t);return s=>s===0||s===1?s:P2(r(s),e,i)}const JF=wh(.42,0,1,1),$F=wh(0,0,.58,1),R2=wh(.42,0,.58,1),QF=n=>Array.isArray(n)&&typeof n[0]!="number",L2=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,I2=n=>e=>1-n(1-e),x1=n=>1-Math.sin(Math.acos(n)),N2=I2(x1),eB=L2(x1),D2=wh(.33,1.53,.69,.99),_1=I2(D2),tB=L2(_1),nB=n=>(n*=2)<1?.5*_1(n):.5*(2-Math.pow(2,-10*(n-1))),iB={linear:yn,easeIn:JF,easeInOut:R2,easeOut:$F,circIn:x1,circInOut:eB,circOut:N2,backIn:_1,backInOut:tB,backOut:D2,anticipate:nB},bE=n=>{if(Array.isArray(n)){y1(n.length===4);const[e,t,i,r]=n;return wh(e,t,i,r)}else if(typeof n=="string")return iB[n];return n},S1=(n,e)=>t=>!!(Sh(t)&&rF.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),U2=(n,e,t)=>i=>{if(!Sh(i))return i;const[r,s,o,a]=i.match(Ng);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},rB=n=>Go(0,255,n),Jv={...hl,transform:n=>Math.round(rB(n))},Fa={test:S1("rgb","red"),parse:U2("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+Jv.transform(n)+", "+Jv.transform(e)+", "+Jv.transform(t)+", "+hf(ff.transform(i))+")"};function sB(n){let e="",t="",i="",r="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),i=n.substring(5,7),r=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),i=n.substring(3,4),r=n.substring(4,5),e+=e,t+=t,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const n_={test:S1("#"),parse:sB,transform:Fa.transform},gc={test:S1("hsl","hue"),parse:U2("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+os.transform(hf(e))+", "+os.transform(hf(t))+", "+hf(ff.transform(i))+")"},vi={test:n=>Fa.test(n)||n_.test(n)||gc.test(n),parse:n=>Fa.test(n)?Fa.parse(n):gc.test(n)?gc.parse(n):n_.parse(n),transform:n=>Sh(n)?n:n.hasOwnProperty("red")?Fa.transform(n):gc.transform(n)},un=(n,e,t)=>-t*n+t*e+n;function $v(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)*(2/3-t)*6:n}function oB({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let r=0,s=0,o=0;if(!e)r=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,l=2*t-a;r=$v(l,a,n+1/3),s=$v(l,a,n),o=$v(l,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const Qv=(n,e,t)=>{const i=n*n;return Math.sqrt(Math.max(0,t*(e*e-i)+i))},aB=[n_,Fa,gc],lB=n=>aB.find(e=>e.test(n));function CE(n){const e=lB(n);let t=e.parse(n);return e===gc&&(t=oB(t)),t}const O2=(n,e)=>{const t=CE(n),i=CE(e),r={...t};return s=>(r.red=Qv(t.red,i.red,s),r.green=Qv(t.green,i.green,s),r.blue=Qv(t.blue,i.blue,s),r.alpha=un(t.alpha,i.alpha,s),Fa.transform(r))};function cB(n){var e,t;return isNaN(n)&&Sh(n)&&(((e=n.match(Ng))===null||e===void 0?void 0:e.length)||0)+(((t=n.match(l2))===null||t===void 0?void 0:t.length)||0)>0}const k2={regex:nF,countKey:"Vars",token:"${v}",parse:yn},F2={regex:l2,countKey:"Colors",token:"${c}",parse:vi.parse},B2={regex:Ng,countKey:"Numbers",token:"${n}",parse:hl.parse};function ey(n,{regex:e,countKey:t,token:i,parse:r}){const s=n.tokenised.match(e);s&&(n["num"+t]=s.length,n.tokenised=n.tokenised.replace(e,i),n.values.push(...s.map(r)))}function Zm(n){const e=n.toString(),t={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return t.value.includes("var(--")&&ey(t,k2),ey(t,F2),ey(t,B2),t}function z2(n){return Zm(n).values}function V2(n){const{values:e,numColors:t,numVars:i,tokenised:r}=Zm(n),s=e.length;return o=>{let a=r;for(let l=0;ltypeof n=="number"?0:n;function fB(n){const e=z2(n);return V2(n)(e.map(uB))}const Wo={test:cB,parse:z2,createTransformer:V2,getAnimatableNone:fB},H2=(n,e)=>t=>`${t>0?e:n}`;function G2(n,e){return typeof n=="number"?t=>un(n,e,t):vi.test(n)?O2(n,e):n.startsWith("var(")?H2(n,e):j2(n,e)}const W2=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>G2(s,e[o]));return s=>{for(let o=0;o{const t={...n,...e},i={};for(const r in t)n[r]!==void 0&&e[r]!==void 0&&(i[r]=G2(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}},j2=(n,e)=>{const t=Wo.createTransformer(e),i=Zm(n),r=Zm(e);return i.numVars===r.numVars&&i.numColors===r.numColors&&i.numNumbers>=r.numNumbers?Bo(W2(i.values,r.values),t):H2(n,e)},Vf=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},PE=(n,e)=>t=>un(n,e,t);function dB(n){return typeof n=="number"?PE:typeof n=="string"?vi.test(n)?O2:j2:Array.isArray(n)?W2:typeof n=="object"?hB:PE}function pB(n,e,t){const i=[],r=t||dB(n[0]),s=n.length-1;for(let o=0;oe[0];n[0]>n[s-1]&&(n=[...n].reverse(),e=[...e].reverse());const o=pB(e,i,r),a=o.length,l=f=>{let h=0;if(a>1)for(;hl(Go(n[0],n[s-1],f)):l}function mB(n,e){const t=n[n.length-1];for(let i=1;i<=e;i++){const r=Vf(0,e,i);n.push(un(t,1,r))}}function gB(n){const e=[0];return mB(e,n.length-1),e}function vB(n,e){return n.map(t=>t*e)}function yB(n,e){return n.map(()=>e||R2).splice(0,n.length-1)}function Jm({duration:n=300,keyframes:e,times:t,ease:i="easeInOut"}){const r=QF(i)?i.map(bE):bE(i),s={done:!1,value:e[0]},o=vB(t&&t.length===e.length?t:gB(e),n),a=X2(o,e,{ease:Array.isArray(r)?r:yB(e,r)});return{calculatedDuration:n,next:l=>(s.value=a(l),s.done=l>=n,s)}}function Y2(n,e){return e?n*(1e3/e):0}const xB=5;function q2(n,e,t){const i=Math.max(e-xB,0);return Y2(t-n(i),e-i)}const ty=.001,_B=.01,RE=10,SB=.05,AB=1;function wB({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s;WF(n<=zo(RE));let o=1-e;o=Go(SB,AB,o),n=Go(_B,RE,Fs(n)),o<1?(r=f=>{const h=f*o,d=h*n,p=h-t,m=i_(f,o),y=Math.exp(-d);return ty-p/m*y},s=f=>{const d=f*o*n,p=d*t+t,m=Math.pow(o,2)*Math.pow(f,2)*n,y=Math.exp(-d),_=i_(Math.pow(f,2),o);return(-r(f)+ty>0?-1:1)*((p-m)*y)/_}):(r=f=>{const h=Math.exp(-f*n),d=(f-t)*n+1;return-ty+h*d},s=f=>{const h=Math.exp(-f*n),d=(t-f)*(n*n);return h*d});const a=5/n,l=EB(r,s,a);if(n=zo(n),isNaN(l))return{stiffness:100,damping:10,duration:n};{const f=Math.pow(l,2)*i;return{stiffness:f,damping:o*2*Math.sqrt(i*f),duration:n}}}const MB=12;function EB(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function CB(n){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...n};if(!LE(n,bB)&&LE(n,TB)){const t=wB(n);e={...e,...t,mass:1},e.isResolvedFromDuration=!0}return e}function K2({keyframes:n,restDelta:e,restSpeed:t,...i}){const r=n[0],s=n[n.length-1],o={done:!1,value:r},{stiffness:a,damping:l,mass:f,duration:h,velocity:d,isResolvedFromDuration:p}=CB({...i,velocity:-Fs(i.velocity||0)}),m=d||0,y=l/(2*Math.sqrt(a*f)),_=s-r,x=Fs(Math.sqrt(a/f)),g=Math.abs(_)<5;t||(t=g?.01:2),e||(e=g?.005:.5);let S;if(y<1){const A=i_(x,y);S=E=>{const R=Math.exp(-y*x*E);return s-R*((m+y*x*_)/A*Math.sin(A*E)+_*Math.cos(A*E))}}else if(y===1)S=A=>s-Math.exp(-x*A)*(_+(m+x*_)*A);else{const A=x*Math.sqrt(y*y-1);S=E=>{const R=Math.exp(-y*x*E),C=Math.min(A*E,300);return s-R*((m+y*x*_)*Math.sinh(C)+A*_*Math.cosh(C))/A}}return{calculatedDuration:p&&h||null,next:A=>{const E=S(A);if(p)o.done=A>=h;else{let R=m;A!==0&&(y<1?R=q2(S,A,E):R=0);const C=Math.abs(R)<=t,L=Math.abs(s-E)<=e;o.done=C&&L}return o.value=o.done?s:E,o}}}function IE({keyframes:n,velocity:e=0,power:t=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:l,restDelta:f=.5,restSpeed:h}){const d=n[0],p={done:!1,value:d},m=I=>a!==void 0&&Il,y=I=>a===void 0?l:l===void 0||Math.abs(a-I)-_*Math.exp(-I/i),A=I=>g+S(I),E=I=>{const P=S(I),b=A(I);p.done=Math.abs(P)<=f,p.value=p.done?g:b};let R,C;const L=I=>{m(p.value)&&(R=I,C=K2({keyframes:[p.value,y(p.value)],velocity:q2(A,I,p.value),damping:r,stiffness:s,restDelta:f,restSpeed:h}))};return L(0),{calculatedDuration:null,next:I=>{let P=!1;return!C&&R===void 0&&(P=!0,E(I),L(I)),R!==void 0&&I>R?C.next(I-R):(!P&&E(I),p)}}}const PB=n=>{const e=({timestamp:t})=>n(t);return{start:()=>Zt.update(e,!0),stop:()=>js(e),now:()=>oi.isProcessing?oi.timestamp:performance.now()}},NE=2e4;function DE(n){let e=0;const t=50;let i=n.next(e);for(;!i.done&&e=NE?1/0:e}const RB={decay:IE,inertia:IE,tween:Jm,keyframes:Jm,spring:K2};function $m({autoplay:n=!0,delay:e=0,driver:t=PB,keyframes:i,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:l,onStop:f,onComplete:h,onUpdate:d,...p}){let m=1,y=!1,_,x;const g=()=>{x=new Promise(Q=>{_=Q})};g();let S;const A=RB[r]||Jm;let E;A!==Jm&&typeof i[0]!="number"&&(E=X2([0,100],i,{clamp:!1}),i=[0,100]);const R=A({...p,keyframes:i});let C;a==="mirror"&&(C=A({...p,keyframes:[...i].reverse(),velocity:-(p.velocity||0)}));let L="idle",I=null,P=null,b=null;R.calculatedDuration===null&&s&&(R.calculatedDuration=DE(R));const{calculatedDuration:D}=R;let j=1/0,X=1/0;D!==null&&(j=D+o,X=j*(s+1)-o);let te=0;const ne=Q=>{if(P===null)return;m>0&&(P=Math.min(P,Q)),m<0&&(P=Math.min(Q-X/m,P)),I!==null?te=I:te=Math.round(Q-P)*m;const _e=te-e*(m>=0?1:-1),De=m>=0?_e<0:_e>X;te=Math.max(_e,0),L==="finished"&&I===null&&(te=X);let oe=te,ve=R;if(s){const it=Math.min(te,X)/j;let Xe=Math.floor(it),V=it%1;!V&&it>=1&&(V=1),V===1&&Xe--,Xe=Math.min(Xe,s+1),!!(Xe%2)&&(a==="reverse"?(V=1-V,o&&(V-=o/j)):a==="mirror"&&(ve=C)),oe=Go(0,1,V)*j}const Te=De?{done:!1,value:i[0]}:ve.next(oe);E&&(Te.value=E(Te.value));let{done:we}=Te;!De&&D!==null&&(we=m>=0?te>=X:te<=0);const nt=I===null&&(L==="finished"||L==="running"&&we);return d&&d(Te.value),nt&&k(),Te},$=()=>{S&&S.stop(),S=void 0},le=()=>{L="idle",$(),_(),g(),P=b=null},k=()=>{L="finished",h&&h(),$(),_()},q=()=>{if(y)return;S||(S=t(ne));const Q=S.now();l&&l(),I!==null?P=Q-I:(!P||L==="finished")&&(P=Q),L==="finished"&&g(),b=P,I=null,L="running",S.start()};n&&q();const J={then(Q,_e){return x.then(Q,_e)},get time(){return Fs(te)},set time(Q){Q=zo(Q),te=Q,I!==null||!S||m===0?I=Q:P=S.now()-Q/m},get duration(){const Q=R.calculatedDuration===null?DE(R):R.calculatedDuration;return Fs(Q)},get speed(){return m},set speed(Q){Q===m||!S||(m=Q,J.time=Fs(te))},get state(){return L},play:q,pause:()=>{L="paused",I=te},stop:()=>{y=!0,L!=="idle"&&(L="idle",f&&f(),le())},cancel:()=>{b!==null&&ne(b),le()},complete:()=>{L="finished"},sample:Q=>(P=0,ne(Q))};return J}function LB(n){let e;return()=>(e===void 0&&(e=n()),e)}const IB=LB(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),NB=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),ep=10,DB=2e4,UB=(n,e)=>e.type==="spring"||n==="backgroundColor"||!T2(e.ease);function OB(n,e,{onUpdate:t,onComplete:i,...r}){if(!(IB()&&NB.has(e)&&!r.repeatDelay&&r.repeatType!=="mirror"&&r.damping!==0&&r.type!=="inertia"))return!1;let o=!1,a,l,f=!1;const h=()=>{l=new Promise(A=>{a=A})};h();let{keyframes:d,duration:p=300,ease:m,times:y}=r;if(UB(e,r)){const A=$m({...r,repeat:0,delay:0});let E={done:!1,value:d[0]};const R=[];let C=0;for(;!E.done&&C{f=!1,_.cancel()},g=()=>{f=!0,Zt.update(x),a(),h()};return _.onfinish=()=>{f||(n.set(YF(d,r)),i&&i(),g())},{then(A,E){return l.then(A,E)},attachTimeline(A){return _.timeline=A,_.onfinish=null,yn},get time(){return Fs(_.currentTime||0)},set time(A){_.currentTime=zo(A)},get speed(){return _.playbackRate},set speed(A){_.playbackRate=A},get duration(){return Fs(p)},play:()=>{o||(_.play(),js(x))},pause:()=>_.pause(),stop:()=>{if(o=!0,_.playState==="idle")return;const{currentTime:A}=_;if(A){const E=$m({...r,autoplay:!1});n.setWithVelocity(E.sample(A-ep).value,E.sample(A).value,ep)}g()},complete:()=>{f||_.finish()},cancel:g}}function kB({keyframes:n,delay:e,onUpdate:t,onComplete:i}){const r=()=>(t&&t(n[n.length-1]),i&&i(),{time:0,speed:1,duration:0,play:yn,pause:yn,stop:yn,then:s=>(s(),Promise.resolve()),cancel:yn,complete:yn});return e?$m({keyframes:[0,1],duration:0,delay:e,onComplete:r}):r()}const FB={type:"spring",stiffness:500,damping:25,restSpeed:10},BB=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),zB={type:"keyframes",duration:.8},VB={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},HB=(n,{keyframes:e})=>e.length>2?zB:fl.has(n)?n.startsWith("scale")?BB(e[1]):FB:VB,r_=(n,e)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Wo.test(e)||e==="0")&&!e.startsWith("url(")),GB=new Set(["brightness","contrast","saturate","opacity"]);function WB(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(Ng)||[];if(!i)return n;const r=t.replace(i,"");let s=GB.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const jB=/([a-z-]*)\(.*?\)/g,s_={...Wo,getAnimatableNone:n=>{const e=n.match(jB);return e?e.map(WB).join(" "):n}},XB={...c2,color:vi,backgroundColor:vi,outlineColor:vi,fill:vi,stroke:vi,borderColor:vi,borderTopColor:vi,borderRightColor:vi,borderBottomColor:vi,borderLeftColor:vi,filter:s_,WebkitFilter:s_},A1=n=>XB[n];function Z2(n,e){let t=A1(n);return t!==s_&&(t=Wo),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const J2=n=>/^0[^.\s]+$/.test(n);function YB(n){if(typeof n=="number")return n===0;if(n!==null)return n==="none"||n==="0"||J2(n)}function qB(n,e,t,i){const r=r_(e,t);let s;Array.isArray(t)?s=[...t]:s=[null,t];const o=i.from!==void 0?i.from:n.get();let a;const l=[];for(let f=0;fr=>{const s=w1(i,n)||{},o=s.delay||i.delay||0;let{elapsed:a=0}=i;a=a-zo(o);const l=qB(e,n,t,s),f=l[0],h=l[l.length-1],d=r_(n,f),p=r_(n,h);let m={keyframes:l,velocity:e.getVelocity(),ease:"easeOut",...s,delay:-a,onUpdate:y=>{e.set(y),s.onUpdate&&s.onUpdate(y)},onComplete:()=>{r(),s.onComplete&&s.onComplete()}};if(KB(s)||(m={...m,...HB(n,m)}),m.duration&&(m.duration=zo(m.duration)),m.repeatDelay&&(m.repeatDelay=zo(m.repeatDelay)),!d||!p||jF.current||s.type===!1||ZB.skipAnimations)return kB(m);if(!i.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const y=OB(e,n,m);if(y)return y}return $m(m)};function Qm(n){return!!(Fi(n)&&n.add)}const $2=n=>/^\-?\d*\.?\d+$/.test(n);function E1(n,e){n.indexOf(e)===-1&&n.push(e)}function T1(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}class b1{constructor(){this.subscriptions=[]}add(e){return E1(this.subscriptions,e),()=>T1(this.subscriptions,e)}notify(e,t,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,i);else for(let s=0;s!isNaN(parseFloat(n));class $B{constructor(e,t={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(i,r=!0)=>{this.prev=this.current,this.current=i;const{delta:s,timestamp:o}=oi;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Zt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Zt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:i})=>{i!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=JB(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new b1);const i=this.events[e].add(t);return e==="change"?()=>{i(),Zt.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,i){this.set(t),this.prev=e,this.timeDelta=i}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?Y2(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function zc(n,e){return new $B(n,e)}const Q2=n=>e=>e.test(n),QB={test:n=>n==="auto",parse:n=>n},eL=[hl,ht,os,_o,oF,sF,QB],Pu=n=>eL.find(Q2(n)),ez=[...eL,vi,Wo],tz=n=>ez.find(Q2(n));function nz(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,zc(t))}function iz(n,e){const t=Ug(n,e);let{transitionEnd:i={},transition:r={},...s}=t?n.makeTargetAnimatable(t,!1):{};s={...s,...i};for(const o in s){const a=_F(s[o]);nz(n,o,a)}}function rz(n,e,t){var i,r;const s=Object.keys(e).filter(a=>!n.hasValue(a)),o=s.length;if(o)for(let a=0;al.remove(d))),f.push(x)}return o&&Promise.all(f).then(()=>{o&&iz(n,o)}),f}function o_(n,e,t={}){const i=Ug(n,e,t.custom);let{transition:r=n.getDefaultTransition()||{}}=i||{};t.transitionOverride&&(r=t.transitionOverride);const s=i?()=>Promise.all(tL(n,i,t)):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(l=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:d}=r;return cz(n,e,f+l,h,d,t)}:()=>Promise.resolve(),{when:a}=r;if(a){const[l,f]=a==="beforeChildren"?[s,o]:[o,s];return l().then(()=>f())}else return Promise.all([s(),o(t.delay)])}function cz(n,e,t=0,i=0,r=1,s){const o=[],a=(n.variantChildren.size-1)*i,l=r===1?(f=0)=>f*i:(f=0)=>a-f*i;return Array.from(n.variantChildren).sort(uz).forEach((f,h)=>{f.notify("AnimationStart",e),o.push(o_(f,e,{...s,delay:t+l(h)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(o)}function uz(n,e){return n.sortNodePosition(e)}function fz(n,e,t={}){n.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>o_(n,s,t));i=Promise.all(r)}else if(typeof e=="string")i=o_(n,e,t);else{const r=typeof e=="function"?Ug(n,e,t.custom):e;i=Promise.all(tL(n,r,t))}return i.then(()=>n.notify("AnimationComplete",e))}const hz=[...l1].reverse(),dz=l1.length;function pz(n){return e=>Promise.all(e.map(({animation:t,options:i})=>fz(n,t,i)))}function mz(n){let e=pz(n);const t=vz();let i=!0;const r=(l,f)=>{const h=Ug(n,f);if(h){const{transition:d,transitionEnd:p,...m}=h;l={...l,...m,...p}}return l};function s(l){e=l(n)}function o(l,f){const h=n.getProps(),d=n.getVariantContext(!0)||{},p=[],m=new Set;let y={},_=1/0;for(let g=0;g_&&R,b=!1;const D=Array.isArray(E)?E:[E];let j=D.reduce(r,{});C===!1&&(j={});const{prevResolvedValues:X={}}=A,te={...X,...j},ne=$=>{P=!0,m.has($)&&(b=!0,m.delete($)),A.needsAnimating[$]=!0};for(const $ in te){const le=j[$],k=X[$];if(y.hasOwnProperty($))continue;let q=!1;Km(le)&&Km(k)?q=!M2(le,k):q=le!==k,q?le!==void 0?ne($):m.add($):le!==void 0&&m.has($)?ne($):A.protectedKeys[$]=!0}A.prevProp=E,A.prevResolvedValues=j,A.isActive&&(y={...y,...j}),i&&n.blockInitialAnimation&&(P=!1),P&&(!L||b)&&p.push(...D.map($=>({animation:$,options:{type:S,...l}})))}if(m.size){const g={};m.forEach(S=>{const A=n.getBaseTarget(S);A!==void 0&&(g[S]=A)}),p.push({animation:g})}let x=!!p.length;return i&&(h.initial===!1||h.initial===h.animate)&&!n.manuallyAnimateOnMount&&(x=!1),i=!1,x?e(p):Promise.resolve()}function a(l,f,h){var d;if(t[l].isActive===f)return Promise.resolve();(d=n.variantChildren)===null||d===void 0||d.forEach(m=>{var y;return(y=m.animationState)===null||y===void 0?void 0:y.setActive(l,f)}),t[l].isActive=f;const p=o(h,l);for(const m in t)t[m].protectedKeys={};return p}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>t}}function gz(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!M2(e,n):!1}function ha(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function vz(){return{animate:ha(!0),whileInView:ha(),whileHover:ha(),whileTap:ha(),whileDrag:ha(),whileFocus:ha(),exit:ha()}}class yz extends Zo{constructor(e){super(e),e.animationState||(e.animationState=mz(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),Lg(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}let xz=0;class _z extends Zo{constructor(){super(...arguments),this.id=xz++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:i}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e,{custom:i??this.node.getProps().custom});t&&!e&&s.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const Sz={animation:{Feature:yz},exit:{Feature:_z}},UE=(n,e)=>Math.abs(n-e);function Az(n,e){const t=UE(n.x,e.x),i=UE(n.y,e.y);return Math.sqrt(t**2+i**2)}class nL{constructor(e,t,{transformPagePoint:i,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=iy(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=Az(d.offset,{x:0,y:0})>=3;if(!p&&!m)return;const{point:y}=d,{timestamp:_}=oi;this.history.push({...y,timestamp:_});const{onStart:x,onMove:g}=this.handlers;p||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=ny(p,this.transformPagePoint),Zt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=iy(d.type==="pointercancel"?this.lastMoveEventInfo:ny(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,x),y&&y(d,x)},!x2(e))return;this.dragSnapToOrigin=s,this.handlers=t,this.transformPagePoint=i,this.contextWindow=r||window;const o=Dg(e),a=ny(o,this.transformPagePoint),{point:l}=a,{timestamp:f}=oi;this.history=[{...l,timestamp:f}];const{onSessionStart:h}=t;h&&h(e,iy(a,this.history)),this.removeListeners=Bo(ks(this.contextWindow,"pointermove",this.handlePointerMove),ks(this.contextWindow,"pointerup",this.handlePointerUp),ks(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),js(this.updatePoint)}}function ny(n,e){return e?{point:e(n.point)}:n}function OE(n,e){return{x:n.x-e.x,y:n.y-e.y}}function iy({point:n},e){return{point:n,delta:OE(n,iL(e)),offset:OE(n,wz(e)),velocity:Mz(e,.1)}}function wz(n){return n[0]}function iL(n){return n[n.length-1]}function Mz(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const r=iL(n);for(;t>=0&&(i=n[t],!(r.timestamp-i.timestamp>zo(e)));)t--;if(!i)return{x:0,y:0};const s=Fs(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function tr(n){return n.max-n.min}function a_(n,e=0,t=.01){return Math.abs(n-e)<=t}function kE(n,e,t,i=.5){n.origin=i,n.originPoint=un(e.min,e.max,n.origin),n.scale=tr(t)/tr(e),(a_(n.scale,1,1e-4)||isNaN(n.scale))&&(n.scale=1),n.translate=un(t.min,t.max,n.origin)-n.originPoint,(a_(n.translate)||isNaN(n.translate))&&(n.translate=0)}function df(n,e,t,i){kE(n.x,e.x,t.x,i?i.originX:void 0),kE(n.y,e.y,t.y,i?i.originY:void 0)}function FE(n,e,t){n.min=t.min+e.min,n.max=n.min+tr(e)}function Ez(n,e,t){FE(n.x,e.x,t.x),FE(n.y,e.y,t.y)}function BE(n,e,t){n.min=e.min-t.min,n.max=n.min+tr(e)}function pf(n,e,t){BE(n.x,e.x,t.x),BE(n.y,e.y,t.y)}function Tz(n,{min:e,max:t},i){return e!==void 0&&nt&&(n=i?un(t,n,i.max):Math.min(n,t)),n}function zE(n,e,t){return{min:e!==void 0?n.min+e:void 0,max:t!==void 0?n.max+t-(n.max-n.min):void 0}}function bz(n,{top:e,left:t,bottom:i,right:r}){return{x:zE(n.x,t,r),y:zE(n.y,e,i)}}function VE(n,e){let t=e.min-n.min,i=e.max-n.max;return e.max-e.mini?t=Vf(e.min,e.max-i,n.min):i>r&&(t=Vf(n.min,n.max-r,e.min)),Go(0,1,t)}function Rz(n,e){const t={};return e.min!==void 0&&(t.min=e.min-n.min),e.max!==void 0&&(t.max=e.max-n.min),t}const l_=.35;function Lz(n=l_){return n===!1?n=0:n===!0&&(n=l_),{x:HE(n,"left","right"),y:HE(n,"top","bottom")}}function HE(n,e,t){return{min:GE(n,e),max:GE(n,t)}}function GE(n,e){return typeof n=="number"?n:n[e]||0}const WE=()=>({translate:0,scale:1,origin:0,originPoint:0}),vc=()=>({x:WE(),y:WE()}),jE=()=>({min:0,max:0}),bn=()=>({x:jE(),y:jE()});function pr(n){return[n("x"),n("y")]}function rL({top:n,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:n,max:i}}}function Iz({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function Nz(n,e){if(!e)return n;const t=e({x:n.left,y:n.top}),i=e({x:n.right,y:n.bottom});return{top:t.y,left:t.x,bottom:i.y,right:i.x}}function ry(n){return n===void 0||n===1}function c_({scale:n,scaleX:e,scaleY:t}){return!ry(n)||!ry(e)||!ry(t)}function ba(n){return c_(n)||sL(n)||n.z||n.rotate||n.rotateX||n.rotateY}function sL(n){return XE(n.x)||XE(n.y)}function XE(n){return n&&n!=="0%"}function eg(n,e,t){const i=n-t,r=e*i;return t+r}function YE(n,e,t,i,r){return r!==void 0&&(n=eg(n,r,i)),eg(n,t,i)+e}function u_(n,e=0,t=1,i,r){n.min=YE(n.min,e,t,i,r),n.max=YE(n.max,e,t,i,r)}function oL(n,{x:e,y:t}){u_(n.x,e.translate,e.scale,e.originPoint),u_(n.y,t.translate,t.scale,t.originPoint)}function Dz(n,e,t,i=!1){const r=t.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;a1.0000000000001||n<.999999999999?n:1}function wo(n,e){n.min=n.min+e,n.max=n.max+e}function KE(n,e,[t,i,r]){const s=e[r]!==void 0?e[r]:.5,o=un(n.min,n.max,s);u_(n,e[t],e[i],o,e.scale)}const Uz=["x","scaleX","originX"],Oz=["y","scaleY","originY"];function yc(n,e){KE(n.x,e,Uz),KE(n.y,e,Oz)}function aL(n,e){return rL(Nz(n.getBoundingClientRect(),e))}function kz(n,e,t){const i=aL(n,t),{scroll:r}=e;return r&&(wo(i.x,r.offset.x),wo(i.y,r.offset.y)),i}const lL=({current:n})=>n?n.ownerDocument.defaultView:null,Fz=new WeakMap;class Bz{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=bn(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(Dg(h,"page").point)},s=(h,d)=>{const{drag:p,dragPropagation:m,onDragStart:y}=this.getProps();if(p&&!m&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=S2(p),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),pr(x=>{let g=this.getAxisMotionValue(x).get()||0;if(os.test(g)){const{projection:S}=this.visualElement;if(S&&S.layout){const A=S.layout.layoutBox[x];A&&(g=tr(A)*(parseFloat(g)/100))}}this.originPoint[x]=g}),y&&Zt.update(()=>y(h,d),!1,!0);const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},o=(h,d)=>{const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:y,onDrag:_}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:x}=d;if(m&&this.currentDirection===null){this.currentDirection=zz(x),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),_&&_(h,d)},a=(h,d)=>this.stop(h,d),l=()=>pr(h=>{var d;return this.getAnimationState(h)==="paused"&&((d=this.getAxisMotionValue(h).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new nL(e,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:l},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:lL(this.visualElement)})}stop(e,t){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&Zt.update(()=>s(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,i){const{drag:r}=this.getProps();if(!i||!tp(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=Tz(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:i}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,s=this.constraints;t&&mc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=bz(r.layoutBox,t):this.constraints=!1,this.elastic=Lz(i),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&pr(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=Rz(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!mc(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=kz(i,r.root,this.visualElement.getTransformPagePoint());let o=Cz(r.layout.layoutBox,s);if(t){const a=t(Iz(o));this.hasMutatedConstraints=!!a,a&&(o=rL(a))}return o}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),l=this.constraints||{},f=pr(h=>{if(!tp(h,t,this.currentDirection))return;let d=l&&l[h]||{};o&&(d={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,y={type:"inertia",velocity:i?e[h]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(h,y)});return Promise.all(f).then(a)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return i.start(M1(e,i,0,t))}stopAnimation(){pr(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){pr(e=>{var t;return(t=this.getAxisMotionValue(e).animation)===null||t===void 0?void 0:t.pause()})}getAnimationState(e){var t;return(t=this.getAxisMotionValue(e).animation)===null||t===void 0?void 0:t.state}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),i=this.visualElement.getProps(),r=i[t];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){pr(t=>{const{drag:i}=this.getProps();if(!tp(t,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(t);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[t];s.set(e[t]-un(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!mc(t)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};pr(o=>{const a=this.getAxisMotionValue(o);if(a){const l=a.get();r[o]=Pz({min:l,max:l},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),pr(o=>{if(!tp(o,e,null))return;const a=this.getAxisMotionValue(o),{min:l,max:f}=this.constraints[o];a.set(un(l,f,r[o]))})}addListeners(){if(!this.visualElement.current)return;Fz.set(this.visualElement,this);const e=this.visualElement.current,t=ks(e,"pointerdown",l=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(l)}),i=()=>{const{dragConstraints:l}=this.getProps();mc(l)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),i();const o=Ds(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:l,hasLayoutChanged:f})=>{this.isDragging&&f&&(pr(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=l[h].translate,d.set(d.get()+l[h].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=l_,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function tp(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function zz(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class Vz extends Zo{constructor(e){super(e),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new Bz(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}unmount(){this.removeGroupControls(),this.removeListeners()}}const ZE=n=>(e,t)=>{n&&Zt.update(()=>n(e,t))};class Hz extends Zo{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(e){this.session=new nL(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:lL(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:ZE(e),onStart:ZE(t),onMove:i,onEnd:(s,o)=>{delete this.session,r&&Zt.update(()=>r(s,o))}}}mount(){this.removePointerDownListener=ks(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function Gz(){const n=F.useContext(Pg);if(n===null)return[!0,null];const{isPresent:e,onExitComplete:t,register:i}=n,r=F.useId();return F.useEffect(()=>i(r),[]),!e&&t?[!1,()=>t&&t(r)]:[!0]}const hm={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function JE(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const Ru={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(ht.test(n))n=parseFloat(n);else return n;const t=JE(n,e.target.x),i=JE(n,e.target.y);return`${t}% ${i}%`}},Wz={correct:(n,{treeScale:e,projectionDelta:t})=>{const i=n,r=Wo.parse(n);if(r.length>5)return i;const s=Wo.createTransformer(n),o=typeof r[0]!="number"?1:0,a=t.x.scale*e.x,l=t.y.scale*e.y;r[0+o]/=a,r[1+o]/=l;const f=un(a,l,.5);return typeof r[2+o]=="number"&&(r[2+o]/=f),typeof r[3+o]=="number"&&(r[3+o]/=f),s(r)}};class jz extends dh.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;$k(Xz),s&&(t.group&&t.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),hm.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:i,drag:r,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,r||e.layoutDependency!==t||t===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Zt.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function cL(n){const[e,t]=Gz(),i=F.useContext(u1);return dh.createElement(jz,{...n,layoutGroup:i,switchLayoutGroup:F.useContext(r2),isPresent:e,safeToRemove:t})}const Xz={borderRadius:{...Ru,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Ru,borderTopRightRadius:Ru,borderBottomLeftRadius:Ru,borderBottomRightRadius:Ru,boxShadow:Wz},uL=["TopLeft","TopRight","BottomLeft","BottomRight"],Yz=uL.length,$E=n=>typeof n=="string"?parseFloat(n):n,QE=n=>typeof n=="number"||ht.test(n);function qz(n,e,t,i,r,s){r?(n.opacity=un(0,t.opacity!==void 0?t.opacity:1,Kz(i)),n.opacityExit=un(e.opacity!==void 0?e.opacity:1,0,Zz(i))):s&&(n.opacity=un(e.opacity!==void 0?e.opacity:1,t.opacity!==void 0?t.opacity:1,i));for(let o=0;oie?1:t(Vf(n,e,i))}function tT(n,e){n.min=e.min,n.max=e.max}function hr(n,e){tT(n.x,e.x),tT(n.y,e.y)}function nT(n,e,t,i,r){return n-=e,n=eg(n,1/t,i),r!==void 0&&(n=eg(n,1/r,i)),n}function Jz(n,e=0,t=1,i=.5,r,s=n,o=n){if(os.test(e)&&(e=parseFloat(e),e=un(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=un(s.min,s.max,i);n===s&&(a-=e),n.min=nT(n.min,e,t,a,r),n.max=nT(n.max,e,t,a,r)}function iT(n,e,[t,i,r],s,o){Jz(n,e[t],e[i],e[r],e.scale,s,o)}const $z=["x","scaleX","originX"],Qz=["y","scaleY","originY"];function rT(n,e,t,i){iT(n.x,e,$z,t?t.x:void 0,i?i.x:void 0),iT(n.y,e,Qz,t?t.y:void 0,i?i.y:void 0)}function sT(n){return n.translate===0&&n.scale===1}function hL(n){return sT(n.x)&&sT(n.y)}function e4(n,e){return n.x.min===e.x.min&&n.x.max===e.x.max&&n.y.min===e.y.min&&n.y.max===e.y.max}function dL(n,e){return Math.round(n.x.min)===Math.round(e.x.min)&&Math.round(n.x.max)===Math.round(e.x.max)&&Math.round(n.y.min)===Math.round(e.y.min)&&Math.round(n.y.max)===Math.round(e.y.max)}function oT(n){return tr(n.x)/tr(n.y)}class t4{constructor(){this.members=[]}add(e){E1(this.members,e),e.scheduleRender()}remove(e){if(T1(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(r=>e===r);if(t===0)return!1;let i;for(let r=t;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,t){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:i}=e;t.onExitComplete&&t.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function aT(n,e,t){let i="";const r=n.x.translate/e.x,s=n.y.translate/e.y;if((r||s)&&(i=`translate3d(${r}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),t){const{rotate:l,rotateX:f,rotateY:h}=t;l&&(i+=`rotate(${l}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `)}const o=n.x.scale*e.x,a=n.y.scale*e.y;return(o!==1||a!==1)&&(i+=`scale(${o}, ${a})`),i||"none"}const n4=(n,e)=>n.depth-e.depth;class i4{constructor(){this.children=[],this.isDirty=!1}add(e){E1(this.children,e),this.isDirty=!0}remove(e){T1(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(n4),this.isDirty=!1,this.children.forEach(e)}}function r4(n,e){const t=performance.now(),i=({timestamp:r})=>{const s=r-t;s>=e&&(js(i),n(s-e))};return Zt.read(i,!0),()=>js(i)}function s4(n){window.MotionDebug&&window.MotionDebug.record(n)}function o4(n){return n instanceof SVGElement&&n.tagName!=="svg"}function a4(n,e,t){const i=Fi(n)?n:zc(n);return i.start(M1("",i,e,t)),i.animation}const lT=["","X","Y","Z"],l4={visibility:"hidden"},cT=1e3;let c4=0;const Ca={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function pL({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o={},a=e==null?void 0:e()){this.id=c4++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Ca.totalNodes=Ca.resolvedTargetDeltas=Ca.recalculatedProjection=0,this.nodes.forEach(h4),this.nodes.forEach(v4),this.nodes.forEach(y4),this.nodes.forEach(d4),s4(Ca)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let l=0;lthis.root.updateBlockedByResize=!1;n(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=r4(p,250),hm.hasAnimatedSinceResize&&(hm.hasAnimatedSinceResize=!1,this.nodes.forEach(fT))})}l&&this.root.registerSharedNode(l,this),this.options.animate!==!1&&h&&(l||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||h.getDefaultTransition()||w4,{onLayoutAnimationStart:x,onLayoutAnimationComplete:g}=h.getProps(),S=!this.targetLayout||!dL(this.targetLayout,y)||m,A=!p&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||A||p&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,A);const E={...w1(_,"layout"),onPlay:x,onComplete:g};(h.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else p||fT(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,js(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(x4),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;hthis.update()))}clearAllSnapshots(){this.nodes.forEach(p4),this.sharedNodes.forEach(_4)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Zt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Zt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let l=0;l{const R=E/1e3;hT(d.x,o.x,R),hT(d.y,o.y,R),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(pf(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),S4(this.relativeTarget,this.relativeTargetOrigin,p,R),A&&e4(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=bn()),hr(A,this.relativeTarget)),_&&(this.animationValues=h,qz(h,f,this.latestValues,R,S,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(js(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Zt.update(()=>{hm.hasAnimatedSinceResize=!0,this.currentAnimation=a4(0,cT,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(cT),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:l,layout:f,latestValues:h}=o;if(!(!a||!l||!f)){if(this!==o&&this.layout&&f&&mL(this.options.animationType,this.layout.layoutBox,f.layoutBox)){l=this.target||bn();const d=tr(this.layout.layoutBox.x);l.x.min=o.target.x.min,l.x.max=l.x.min+d;const p=tr(this.layout.layoutBox.y);l.y.min=o.target.y.min,l.y.max=l.y.min+p}hr(a,l),yc(a,h),df(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new t4),this.sharedNodes.get(o).add(a);const f=a.options.initialPromotionConfig;a.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:l}={}){const f=this.getStack();f&&f.promote(this,l),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:l}=o;if((l.rotate||l.rotateX||l.rotateY||l.rotateZ)&&(a=!0),!a)return;const f={};for(let h=0;h{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(uT),this.root.sharedNodes.clear()}}}function u4(n){n.updateLayout()}function f4(n){var e;const t=((e=n.resumeFrom)===null||e===void 0?void 0:e.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=n.layout,{animationType:s}=n.options,o=t.source!==n.layout.source;s==="size"?pr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=tr(p);p.min=i[d].min,p.max=p.min+m}):mL(s,t.layoutBox,i)&&pr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=tr(i[d]);p.max=p.min+m,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[d].max=n.relativeTarget[d].min+m)});const a=vc();df(a,i,t.layoutBox);const l=vc();o?df(l,n.applyTransform(r,!0),t.measuredBox):df(l,i,t.layoutBox);const f=!hL(a);let h=!1;if(!n.resumeFrom){const d=n.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:m}=d;if(p&&m){const y=bn();pf(y,t.layoutBox,p.layoutBox);const _=bn();pf(_,i,m.layoutBox),dL(y,_)||(h=!0),d.options.layoutRoot&&(n.relativeTarget=_,n.relativeTargetOrigin=y,n.relativeParent=d)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:l,layoutDelta:a,hasLayoutChanged:f,hasRelativeTargetChanged:h})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function h4(n){Ca.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function d4(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function p4(n){n.clearSnapshot()}function uT(n){n.clearMeasurements()}function m4(n){n.isLayoutDirty=!1}function g4(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function fT(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function v4(n){n.resolveTargetDelta()}function y4(n){n.calcProjection()}function x4(n){n.resetRotation()}function _4(n){n.removeLeadSnapshot()}function hT(n,e,t){n.translate=un(e.translate,0,t),n.scale=un(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function dT(n,e,t,i){n.min=un(e.min,t.min,i),n.max=un(e.max,t.max,i)}function S4(n,e,t,i){dT(n.x,e.x,t.x,i),dT(n.y,e.y,t.y,i)}function A4(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const w4={duration:.45,ease:[.4,0,.1,1]},pT=n=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(n),mT=pT("applewebkit/")&&!pT("chrome/")?Math.round:yn;function gT(n){n.min=mT(n.min),n.max=mT(n.max)}function M4(n){gT(n.x),gT(n.y)}function mL(n,e,t){return n==="position"||n==="preserve-aspect"&&!a_(oT(e),oT(t),.2)}const E4=pL({attachResizeListener:(n,e)=>Ds(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),sy={current:void 0},gL=pL({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!sy.current){const n=new E4({});n.mount(window),n.setOptions({layoutScroll:!0}),sy.current=n}return sy.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),T4={pan:{Feature:Hz},drag:{Feature:Vz,ProjectionNode:gL,MeasureLayout:cL}},b4=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function C4(n){const e=b4.exec(n);if(!e)return[,];const[,t,i]=e;return[t,i]}function f_(n,e,t=1){const[i,r]=C4(n);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const o=s.trim();return $2(o)?parseFloat(o):o}else return e_(r)?f_(r,e,t+1):r}function P4(n,{...e},t){const i=n.current;if(!(i instanceof Element))return{target:e,transitionEnd:t};t&&(t={...t}),n.values.forEach(r=>{const s=r.get();if(!e_(s))return;const o=f_(s,i);o&&r.set(o)});for(const r in e){const s=e[r];if(!e_(s))continue;const o=f_(s,i);o&&(e[r]=o,t||(t={}),t[r]===void 0&&(t[r]=s))}return{target:e,transitionEnd:t}}const R4=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),vL=n=>R4.has(n),L4=n=>Object.keys(n).some(vL),vT=n=>n===hl||n===ht,yT=(n,e)=>parseFloat(n.split(", ")[e]),xT=(n,e)=>(t,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/);if(r)return yT(r[1],e);{const s=i.match(/^matrix\((.+)\)$/);return s?yT(s[1],n):0}},I4=new Set(["x","y","z"]),N4=_h.filter(n=>!I4.has(n));function D4(n){const e=[];return N4.forEach(t=>{const i=n.getValue(t);i!==void 0&&(e.push([t,i.get()]),i.set(t.startsWith("scale")?1:0))}),e.length&&n.render(),e}const Vc={width:({x:n},{paddingLeft:e="0",paddingRight:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),height:({y:n},{paddingTop:e="0",paddingBottom:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),top:(n,{top:e})=>parseFloat(e),left:(n,{left:e})=>parseFloat(e),bottom:({y:n},{top:e})=>parseFloat(e)+(n.max-n.min),right:({x:n},{left:e})=>parseFloat(e)+(n.max-n.min),x:xT(4,13),y:xT(5,14)};Vc.translateX=Vc.x;Vc.translateY=Vc.y;const U4=(n,e,t)=>{const i=e.measureViewportBox(),r=e.current,s=getComputedStyle(r),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",n.display||"block"),t.forEach(f=>{a[f]=Vc[f](i,s)}),e.render();const l=e.measureViewportBox();return t.forEach(f=>{const h=e.getValue(f);h&&h.jump(a[f]),n[f]=Vc[f](l,s)}),n},O4=(n,e,t={},i={})=>{e={...e},i={...i};const r=Object.keys(e).filter(vL);let s=[],o=!1;const a=[];if(r.forEach(l=>{const f=n.getValue(l);if(!n.hasValue(l))return;let h=t[l],d=Pu(h);const p=e[l];let m;if(Km(p)){const y=p.length,_=p[0]===null?1:0;h=p[_],d=Pu(h);for(let x=_;x=0?window.pageYOffset:null,f=U4(e,n,a);return s.length&&s.forEach(([h,d])=>{n.getValue(h).set(d)}),n.render(),Rg&&l!==null&&window.scrollTo({top:l}),{target:f,transitionEnd:i}}else return{target:e,transitionEnd:i}};function k4(n,e,t,i){return L4(e)?O4(n,e,t,i):{target:e,transitionEnd:i}}const F4=(n,e,t,i)=>{const r=P4(n,e,i);return e=r.target,i=r.transitionEnd,k4(n,e,t,i)},h_={current:null},yL={current:!1};function B4(){if(yL.current=!0,!!Rg)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>h_.current=n.matches;n.addListener(e),e()}else h_.current=!1}function z4(n,e,t){const{willChange:i}=e;for(const r in e){const s=e[r],o=t[r];if(Fi(s))n.addValue(r,s),Qm(i)&&i.add(r);else if(Fi(o))n.addValue(r,zc(s,{owner:n})),Qm(i)&&i.remove(r);else if(o!==s)if(n.hasValue(r)){const a=n.getValue(r);!a.hasAnimated&&a.set(s)}else{const a=n.getStaticValue(r);n.addValue(r,zc(a!==void 0?a:s,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const _T=new WeakMap,xL=Object.keys(zf),V4=xL.length,ST=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],H4=c1.length;class G4{constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Zt.render(this.render,!1,!0);const{latestValues:a,renderState:l}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=l,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=Ig(t),this.isVariantNode=i2(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(t,{});for(const d in h){const p=h[d];a[d]!==void 0&&Fi(p)&&(p.set(a[d],!1),Qm(f)&&f.add(d))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,_T.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,i)=>this.bindToMotionValue(i,t)),yL.current||B4(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:h_.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){_T.delete(this.current),this.projection&&this.projection.unmount(),js(this.notifyUpdate),js(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const i=fl.has(e),r=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Zt.update(this.notifyUpdate,!1,!0),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{r(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...t},i,r,s){let o,a;for(let l=0;lthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:s,layoutScroll:p,layoutRoot:m})}return a}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let i=0;it.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&t!==void 0&&(i=zc(t,{owner:this}),this.addValue(e,i)),i}readValue(e){var t;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(t=this.getBaseTargetFromProps(this.props,e))!==null&&t!==void 0?t:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:i}=this.props,r=typeof i=="string"||typeof i=="object"?(t=v1(this.props,i))===null||t===void 0?void 0:t[e]:void 0;if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!Fi(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new b1),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class _L extends G4{sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...i},{transformValues:r},s){let o=oz(i,e||{},this);if(r&&(t&&(t=r(t)),i&&(i=r(i)),o&&(o=r(o))),s){rz(this,i,o);const a=F4(this,i,o,t);t=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:t,...i}}}function W4(n){return window.getComputedStyle(n)}class j4 extends _L{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,t){if(fl.has(t)){const i=A1(t);return i&&i.default||0}else{const i=W4(e),r=(a2(t)?i.getPropertyValue(t):i[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return aL(e,t)}build(e,t,i,r){h1(e,t,i,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return g1(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;Fi(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(e,t,i,r){d2(e,t,i,r)}}class X4 extends _L{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(fl.has(t)){const i=A1(t);return i&&i.default||0}return t=p2.has(t)?t:a1(t),e.getAttribute(t)}measureInstanceViewportBox(){return bn()}scrapeMotionValuesFromProps(e,t){return g2(e,t)}build(e,t,i,r){p1(e,t,i,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,i,r){m2(e,t,i,r)}mount(e){this.isSVGTag=m1(e.tagName),super.mount(e)}}const Y4=(n,e)=>f1(n)?new X4(e,{enableHardwareAcceleration:!1}):new j4(e,{enableHardwareAcceleration:!0}),q4={layout:{ProjectionNode:gL,MeasureLayout:cL}},K4={...Sz,...VF,...T4,...q4},en=Zk((n,e)=>CF(n,e,K4,Y4));function SL(){const n=F.useRef(!1);return o1(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function Z4(){const n=SL(),[e,t]=F.useState(0),i=F.useCallback(()=>{n.current&&t(e+1)},[e]);return[F.useCallback(()=>Zt.postRender(i),[i]),e]}class J4 extends F.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const i=this.props.sizeRef.current;i.height=t.offsetHeight||0,i.width=t.offsetWidth||0,i.top=t.offsetTop,i.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function $4({children:n,isPresent:e}){const t=F.useId(),i=F.useRef(null),r=F.useRef({width:0,height:0,top:0,left:0});return F.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:l}=r.current;if(e||!i.current||!s||!o)return;i.current.dataset.motionPopId=t;const f=document.createElement("style");return document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` +`+s.stack}return{value:n,source:e,stack:r,digest:null}}function Tv(n,e,t){return{value:n,source:null,stack:t??null,digest:e??null}}function xx(n,e){try{console.error(e.value)}catch(t){setTimeout(function(){throw t})}}var wU=typeof WeakMap=="function"?WeakMap:Map;function kP(n,e,t){t=Ds(-1,t),t.tag=3,t.payload={element:null};var i=e.value;return t.callback=function(){Cm||(Cm=!0,Px=i),xx(n,e)},t}function FP(n,e,t){t=Ds(-1,t),t.tag=3;var i=n.type.getDerivedStateFromError;if(typeof i=="function"){var r=e.value;t.payload=function(){return i(r)},t.callback=function(){xx(n,e)}}var s=n.stateNode;return s!==null&&typeof s.componentDidCatch=="function"&&(t.callback=function(){xx(n,e),typeof i!="function"&&(Lo===null?Lo=new Set([this]):Lo.add(this));var o=e.stack;this.componentDidCatch(e.value,{componentStack:o!==null?o:""})}),t}function Aw(n,e,t){var i=n.pingCache;if(i===null){i=n.pingCache=new wU;var r=new Set;i.set(e,r)}else r=i.get(e),r===void 0&&(r=new Set,i.set(e,r));r.has(t)||(r.add(t),n=FU.bind(null,n,e,t),e.then(n,n))}function Mw(n){do{var e;if((e=n.tag===13)&&(e=n.memoizedState,e=e!==null?e.dehydrated!==null:!0),e)return n;n=n.return}while(n!==null);return null}function ww(n,e,t,i,r){return n.mode&1?(n.flags|=65536,n.lanes=r,n):(n===e?n.flags|=65536:(n.flags|=128,t.flags|=131072,t.flags&=-52805,t.tag===1&&(t.alternate===null?t.tag=17:(e=Ds(-1,1),e.tag=2,Ro(t,e,1))),t.lanes|=1),n)}var EU=Ys.ReactCurrentOwner,Di=!1;function vi(n,e,t,i){e.child=n===null?dP(e,null,t,i):Pc(e,n.child,t,i)}function Ew(n,e,t,i,r){t=t.render;var s=e.ref;return Mc(e,r),i=SS(n,e,t,i,s,r),t=AS(),n!==null&&!Di?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~r,Hs(n,e,r)):(rn&&t&&cS(e),e.flags|=1,vi(n,e,i,r),e.child)}function Tw(n,e,t,i,r){if(n===null){var s=t.type;return typeof s=="function"&&!IS(s)&&s.defaultProps===void 0&&t.compare===null&&t.defaultProps===void 0?(e.tag=15,e.type=s,BP(n,e,s,i,r)):(n=Jp(t.type,null,i,e,e.mode,r),n.ref=e.ref,n.return=e,e.child=n)}if(s=n.child,!(n.lanes&r)){var o=s.memoizedProps;if(t=t.compare,t=t!==null?t:xf,t(o,i)&&n.ref===e.ref)return Hs(n,e,r)}return e.flags|=1,n=Do(s,i),n.ref=e.ref,n.return=e,e.child=n}function BP(n,e,t,i,r){if(n!==null){var s=n.memoizedProps;if(xf(s,i)&&n.ref===e.ref)if(Di=!1,e.pendingProps=i=s,(n.lanes&r)!==0)n.flags&131072&&(Di=!0);else return e.lanes=n.lanes,Hs(n,e,r)}return _x(n,e,t,i,r)}function zP(n,e,t){var i=e.pendingProps,r=i.children,s=n!==null?n.memoizedState:null;if(i.mode==="hidden")if(!(e.mode&1))e.memoizedState={baseLanes:0,cachePool:null,transitions:null},Zt(ac,Xi),Xi|=t;else{if(!(t&1073741824))return n=s!==null?s.baseLanes|t:t,e.lanes=e.childLanes=1073741824,e.memoizedState={baseLanes:n,cachePool:null,transitions:null},e.updateQueue=null,Zt(ac,Xi),Xi|=n,null;e.memoizedState={baseLanes:0,cachePool:null,transitions:null},i=s!==null?s.baseLanes:t,Zt(ac,Xi),Xi|=i}else s!==null?(i=s.baseLanes|t,e.memoizedState=null):i=t,Zt(ac,Xi),Xi|=i;return vi(n,e,r,t),e.child}function VP(n,e){var t=e.ref;(n===null&&t!==null||n!==null&&n.ref!==t)&&(e.flags|=512,e.flags|=2097152)}function _x(n,e,t,i,r){var s=Ui(t)?ja:ci.current;return s=bc(e,s),Mc(e,r),t=SS(n,e,t,i,s,r),i=AS(),n!==null&&!Di?(e.updateQueue=n.updateQueue,e.flags&=-2053,n.lanes&=~r,Hs(n,e,r)):(rn&&i&&cS(e),e.flags|=1,vi(n,e,t,r),e.child)}function bw(n,e,t,i,r){if(Ui(t)){var s=!0;ym(e)}else s=!1;if(Mc(e,r),e.stateNode===null)qp(n,e),OP(e,t,i),yx(e,t,i,r),i=!0;else if(n===null){var o=e.stateNode,a=e.memoizedProps;o.props=a;var c=o.context,f=t.contextType;typeof f=="object"&&f!==null?f=_r(f):(f=Ui(t)?ja:ci.current,f=bc(e,f));var h=t.getDerivedStateFromProps,d=typeof h=="function"||typeof o.getSnapshotBeforeUpdate=="function";d||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==i||c!==f)&&Sw(e,o,i,f),xo=!1;var p=e.memoizedState;o.state=p,Mm(e,i,o,r),c=e.memoizedState,a!==i||p!==c||Ni.current||xo?(typeof h=="function"&&(vx(e,t,h,i),c=e.memoizedState),(a=xo||_w(e,t,a,i,p,c,f))?(d||typeof o.UNSAFE_componentWillMount!="function"&&typeof o.componentWillMount!="function"||(typeof o.componentWillMount=="function"&&o.componentWillMount(),typeof o.UNSAFE_componentWillMount=="function"&&o.UNSAFE_componentWillMount()),typeof o.componentDidMount=="function"&&(e.flags|=4194308)):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),e.memoizedProps=i,e.memoizedState=c),o.props=i,o.state=c,o.context=f,i=a):(typeof o.componentDidMount=="function"&&(e.flags|=4194308),i=!1)}else{o=e.stateNode,mP(n,e),a=e.memoizedProps,f=e.type===e.elementType?a:Cr(e.type,a),o.props=f,d=e.pendingProps,p=o.context,c=t.contextType,typeof c=="object"&&c!==null?c=_r(c):(c=Ui(t)?ja:ci.current,c=bc(e,c));var m=t.getDerivedStateFromProps;(h=typeof m=="function"||typeof o.getSnapshotBeforeUpdate=="function")||typeof o.UNSAFE_componentWillReceiveProps!="function"&&typeof o.componentWillReceiveProps!="function"||(a!==d||p!==c)&&Sw(e,o,i,c),xo=!1,p=e.memoizedState,o.state=p,Mm(e,i,o,r);var y=e.memoizedState;a!==d||p!==y||Ni.current||xo?(typeof m=="function"&&(vx(e,t,m,i),y=e.memoizedState),(f=xo||_w(e,t,f,i,p,y,c)||!1)?(h||typeof o.UNSAFE_componentWillUpdate!="function"&&typeof o.componentWillUpdate!="function"||(typeof o.componentWillUpdate=="function"&&o.componentWillUpdate(i,y,c),typeof o.UNSAFE_componentWillUpdate=="function"&&o.UNSAFE_componentWillUpdate(i,y,c)),typeof o.componentDidUpdate=="function"&&(e.flags|=4),typeof o.getSnapshotBeforeUpdate=="function"&&(e.flags|=1024)):(typeof o.componentDidUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=1024),e.memoizedProps=i,e.memoizedState=y),o.props=i,o.state=y,o.context=c,i=f):(typeof o.componentDidUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=4),typeof o.getSnapshotBeforeUpdate!="function"||a===n.memoizedProps&&p===n.memoizedState||(e.flags|=1024),i=!1)}return Sx(n,e,t,i,s,r)}function Sx(n,e,t,i,r,s){VP(n,e);var o=(e.flags&128)!==0;if(!i&&!o)return r&&hw(e,t,!1),Hs(n,e,s);i=e.stateNode,EU.current=e;var a=o&&typeof t.getDerivedStateFromError!="function"?null:i.render();return e.flags|=1,n!==null&&o?(e.child=Pc(e,n.child,null,s),e.child=Pc(e,null,a,s)):vi(n,e,a,s),e.memoizedState=i.state,r&&hw(e,t,!0),e.child}function HP(n){var e=n.stateNode;e.pendingContext?fw(n,e.pendingContext,e.pendingContext!==e.context):e.context&&fw(n,e.context,!1),vS(n,e.containerInfo)}function Cw(n,e,t,i,r){return Cc(),fS(r),e.flags|=256,vi(n,e,t,i),e.child}var Ax={dehydrated:null,treeContext:null,retryLane:0};function Mx(n){return{baseLanes:n,cachePool:null,transitions:null}}function GP(n,e,t){var i=e.pendingProps,r=cn.current,s=!1,o=(e.flags&128)!==0,a;if((a=o)||(a=n!==null&&n.memoizedState===null?!1:(r&2)!==0),a?(s=!0,e.flags&=-129):(n===null||n.memoizedState!==null)&&(r|=1),Zt(cn,r&1),n===null)return mx(e),n=e.memoizedState,n!==null&&(n=n.dehydrated,n!==null)?(e.mode&1?n.data==="$!"?e.lanes=8:e.lanes=1073741824:e.lanes=1,null):(o=i.children,n=i.fallback,s?(i=e.mode,s=e.child,o={mode:"hidden",children:o},!(i&1)&&s!==null?(s.childLanes=0,s.pendingProps=o):s=ag(o,i,0,null),n=Ba(n,i,t,null),s.return=e,n.return=e,s.sibling=n,e.child=s,e.child.memoizedState=Mx(t),e.memoizedState=Ax,n):ES(e,o));if(r=n.memoizedState,r!==null&&(a=r.dehydrated,a!==null))return TU(n,e,o,i,a,r,t);if(s){s=i.fallback,o=e.mode,r=n.child,a=r.sibling;var c={mode:"hidden",children:i.children};return!(o&1)&&e.child!==r?(i=e.child,i.childLanes=0,i.pendingProps=c,e.deletions=null):(i=Do(r,c),i.subtreeFlags=r.subtreeFlags&14680064),a!==null?s=Do(a,s):(s=Ba(s,o,t,null),s.flags|=2),s.return=e,i.return=e,i.sibling=s,e.child=i,i=s,s=e.child,o=n.child.memoizedState,o=o===null?Mx(t):{baseLanes:o.baseLanes|t,cachePool:null,transitions:o.transitions},s.memoizedState=o,s.childLanes=n.childLanes&~t,e.memoizedState=Ax,i}return s=n.child,n=s.sibling,i=Do(s,{mode:"visible",children:i.children}),!(e.mode&1)&&(i.lanes=t),i.return=e,i.sibling=null,n!==null&&(t=e.deletions,t===null?(e.deletions=[n],e.flags|=16):t.push(n)),e.child=i,e.memoizedState=null,i}function ES(n,e){return e=ag({mode:"visible",children:e},n.mode,0,null),e.return=n,n.child=e}function Ud(n,e,t,i){return i!==null&&fS(i),Pc(e,n.child,null,t),n=ES(e,e.pendingProps.children),n.flags|=2,e.memoizedState=null,n}function TU(n,e,t,i,r,s,o){if(t)return e.flags&256?(e.flags&=-257,i=Tv(Error(be(422))),Ud(n,e,o,i)):e.memoizedState!==null?(e.child=n.child,e.flags|=128,null):(s=i.fallback,r=e.mode,i=ag({mode:"visible",children:i.children},r,0,null),s=Ba(s,r,o,null),s.flags|=2,i.return=e,s.return=e,i.sibling=s,e.child=i,e.mode&1&&Pc(e,n.child,null,o),e.child.memoizedState=Mx(o),e.memoizedState=Ax,s);if(!(e.mode&1))return Ud(n,e,o,null);if(r.data==="$!"){if(i=r.nextSibling&&r.nextSibling.dataset,i)var a=i.dgst;return i=a,s=Error(be(419)),i=Tv(s,i,void 0),Ud(n,e,o,i)}if(a=(o&n.childLanes)!==0,Di||a){if(i=Wn,i!==null){switch(o&-o){case 4:r=2;break;case 16:r=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:r=32;break;case 536870912:r=268435456;break;default:r=0}r=r&(i.suspendedLanes|o)?0:r,r!==0&&r!==s.retryLane&&(s.retryLane=r,Vs(n,r),Or(i,n,r,-1))}return LS(),i=Tv(Error(be(421))),Ud(n,e,o,i)}return r.data==="$?"?(e.flags|=128,e.child=n.child,e=BU.bind(null,n),r._reactRetry=e,null):(n=s.treeContext,Zi=Po(r.nextSibling),Ji=e,rn=!0,Lr=null,n!==null&&(mr[gr++]=Ps,mr[gr++]=Rs,mr[gr++]=Xa,Ps=n.id,Rs=n.overflow,Xa=e),e=ES(e,i.children),e.flags|=4096,e)}function Pw(n,e,t){n.lanes|=e;var i=n.alternate;i!==null&&(i.lanes|=e),gx(n.return,e,t)}function bv(n,e,t,i,r){var s=n.memoizedState;s===null?n.memoizedState={isBackwards:e,rendering:null,renderingStartTime:0,last:i,tail:t,tailMode:r}:(s.isBackwards=e,s.rendering=null,s.renderingStartTime=0,s.last=i,s.tail=t,s.tailMode=r)}function WP(n,e,t){var i=e.pendingProps,r=i.revealOrder,s=i.tail;if(vi(n,e,i.children,t),i=cn.current,i&2)i=i&1|2,e.flags|=128;else{if(n!==null&&n.flags&128)e:for(n=e.child;n!==null;){if(n.tag===13)n.memoizedState!==null&&Pw(n,t,e);else if(n.tag===19)Pw(n,t,e);else if(n.child!==null){n.child.return=n,n=n.child;continue}if(n===e)break e;for(;n.sibling===null;){if(n.return===null||n.return===e)break e;n=n.return}n.sibling.return=n.return,n=n.sibling}i&=1}if(Zt(cn,i),!(e.mode&1))e.memoizedState=null;else switch(r){case"forwards":for(t=e.child,r=null;t!==null;)n=t.alternate,n!==null&&wm(n)===null&&(r=t),t=t.sibling;t=r,t===null?(r=e.child,e.child=null):(r=t.sibling,t.sibling=null),bv(e,!1,r,t,s);break;case"backwards":for(t=null,r=e.child,e.child=null;r!==null;){if(n=r.alternate,n!==null&&wm(n)===null){e.child=r;break}n=r.sibling,r.sibling=t,t=r,r=n}bv(e,!0,t,null,s);break;case"together":bv(e,!1,null,null,void 0);break;default:e.memoizedState=null}return e.child}function qp(n,e){!(e.mode&1)&&n!==null&&(n.alternate=null,e.alternate=null,e.flags|=2)}function Hs(n,e,t){if(n!==null&&(e.dependencies=n.dependencies),qa|=e.lanes,!(t&e.childLanes))return null;if(n!==null&&e.child!==n.child)throw Error(be(153));if(e.child!==null){for(n=e.child,t=Do(n,n.pendingProps),e.child=t,t.return=e;n.sibling!==null;)n=n.sibling,t=t.sibling=Do(n,n.pendingProps),t.return=e;t.sibling=null}return e.child}function bU(n,e,t){switch(e.tag){case 3:HP(e),Cc();break;case 5:gP(e);break;case 1:Ui(e.type)&&ym(e);break;case 4:vS(e,e.stateNode.containerInfo);break;case 10:var i=e.type._context,r=e.memoizedProps.value;Zt(Sm,i._currentValue),i._currentValue=r;break;case 13:if(i=e.memoizedState,i!==null)return i.dehydrated!==null?(Zt(cn,cn.current&1),e.flags|=128,null):t&e.child.childLanes?GP(n,e,t):(Zt(cn,cn.current&1),n=Hs(n,e,t),n!==null?n.sibling:null);Zt(cn,cn.current&1);break;case 19:if(i=(t&e.childLanes)!==0,n.flags&128){if(i)return WP(n,e,t);e.flags|=128}if(r=e.memoizedState,r!==null&&(r.rendering=null,r.tail=null,r.lastEffect=null),Zt(cn,cn.current),i)break;return null;case 22:case 23:return e.lanes=0,zP(n,e,t)}return Hs(n,e,t)}var jP,wx,XP,YP;jP=function(n,e){for(var t=e.child;t!==null;){if(t.tag===5||t.tag===6)n.appendChild(t.stateNode);else if(t.tag!==4&&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;t=t.return}t.sibling.return=t.return,t=t.sibling}};wx=function(){};XP=function(n,e,t,i){var r=n.memoizedProps;if(r!==i){n=e.stateNode,La(rs.current);var s=null;switch(t){case"input":r=Xy(n,r),i=Xy(n,i),s=[];break;case"select":r=dn({},r,{value:void 0}),i=dn({},i,{value:void 0}),s=[];break;case"textarea":r=Zy(n,r),i=Zy(n,i),s=[];break;default:typeof r.onClick!="function"&&typeof i.onClick=="function"&&(n.onclick=gm)}Jy(t,i);var o;t=null;for(f in r)if(!i.hasOwnProperty(f)&&r.hasOwnProperty(f)&&r[f]!=null)if(f==="style"){var a=r[f];for(o in a)a.hasOwnProperty(o)&&(t||(t={}),t[o]="")}else f!=="dangerouslySetInnerHTML"&&f!=="children"&&f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&f!=="autoFocus"&&(hf.hasOwnProperty(f)?s||(s=[]):(s=s||[]).push(f,null));for(f in i){var c=i[f];if(a=r!=null?r[f]:void 0,i.hasOwnProperty(f)&&c!==a&&(c!=null||a!=null))if(f==="style")if(a){for(o in a)!a.hasOwnProperty(o)||c&&c.hasOwnProperty(o)||(t||(t={}),t[o]="");for(o in c)c.hasOwnProperty(o)&&a[o]!==c[o]&&(t||(t={}),t[o]=c[o])}else t||(s||(s=[]),s.push(f,t)),t=c;else f==="dangerouslySetInnerHTML"?(c=c?c.__html:void 0,a=a?a.__html:void 0,c!=null&&a!==c&&(s=s||[]).push(f,c)):f==="children"?typeof c!="string"&&typeof c!="number"||(s=s||[]).push(f,""+c):f!=="suppressContentEditableWarning"&&f!=="suppressHydrationWarning"&&(hf.hasOwnProperty(f)?(c!=null&&f==="onScroll"&&Jt("scroll",n),s||a===c||(s=[])):(s=s||[]).push(f,c))}t&&(s=s||[]).push("style",t);var f=s;(e.updateQueue=f)&&(e.flags|=4)}};YP=function(n,e,t,i){t!==i&&(e.flags|=4)};function xu(n,e){if(!rn)switch(n.tailMode){case"hidden":e=n.tail;for(var t=null;e!==null;)e.alternate!==null&&(t=e),e=e.sibling;t===null?n.tail=null:t.sibling=null;break;case"collapsed":t=n.tail;for(var i=null;t!==null;)t.alternate!==null&&(i=t),t=t.sibling;i===null?e||n.tail===null?n.tail=null:n.tail.sibling=null:i.sibling=null}}function ti(n){var e=n.alternate!==null&&n.alternate.child===n.child,t=0,i=0;if(e)for(var r=n.child;r!==null;)t|=r.lanes|r.childLanes,i|=r.subtreeFlags&14680064,i|=r.flags&14680064,r.return=n,r=r.sibling;else for(r=n.child;r!==null;)t|=r.lanes|r.childLanes,i|=r.subtreeFlags,i|=r.flags,r.return=n,r=r.sibling;return n.subtreeFlags|=i,n.childLanes=t,e}function CU(n,e,t){var i=e.pendingProps;switch(uS(e),e.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return ti(e),null;case 1:return Ui(e.type)&&vm(),ti(e),null;case 3:return i=e.stateNode,Rc(),Qt(Ni),Qt(ci),xS(),i.pendingContext&&(i.context=i.pendingContext,i.pendingContext=null),(n===null||n.child===null)&&(Dd(e)?e.flags|=4:n===null||n.memoizedState.isDehydrated&&!(e.flags&256)||(e.flags|=1024,Lr!==null&&(Ix(Lr),Lr=null))),wx(n,e),ti(e),null;case 5:yS(e);var r=La(wf.current);if(t=e.type,n!==null&&e.stateNode!=null)XP(n,e,t,i,r),n.ref!==e.ref&&(e.flags|=512,e.flags|=2097152);else{if(!i){if(e.stateNode===null)throw Error(be(166));return ti(e),null}if(n=La(rs.current),Dd(e)){i=e.stateNode,t=e.type;var s=e.memoizedProps;switch(i[es]=e,i[Af]=s,n=(e.mode&1)!==0,t){case"dialog":Jt("cancel",i),Jt("close",i);break;case"iframe":case"object":case"embed":Jt("load",i);break;case"video":case"audio":for(r=0;r<\/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[es]=e,n[Af]=i,jP(n,e,!1,!1),e.stateNode=n;e:{switch(o=Qy(t,i),t){case"dialog":Jt("cancel",n),Jt("close",n),r=i;break;case"iframe":case"object":case"embed":Jt("load",n),r=i;break;case"video":case"audio":for(r=0;rIc&&(e.flags|=128,i=!0,xu(s,!1),e.lanes=4194304)}else{if(!i)if(n=wm(o),n!==null){if(e.flags|=128,i=!0,t=n.updateQueue,t!==null&&(e.updateQueue=t,e.flags|=4),xu(s,!0),s.tail===null&&s.tailMode==="hidden"&&!o.alternate&&!rn)return ti(e),null}else 2*Sn()-s.renderingStartTime>Ic&&t!==1073741824&&(e.flags|=128,i=!0,xu(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=Sn(),e.sibling=null,t=cn.current,Zt(cn,i?t&1|2:t&1),e):(ti(e),null);case 22:case 23:return RS(),i=e.memoizedState!==null,n!==null&&n.memoizedState!==null!==i&&(e.flags|=8192),i&&e.mode&1?Xi&1073741824&&(ti(e),e.subtreeFlags&6&&(e.flags|=8192)):ti(e),null;case 24:return null;case 25:return null}throw Error(be(156,e.tag))}function PU(n,e){switch(uS(e),e.tag){case 1:return Ui(e.type)&&vm(),n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 3:return Rc(),Qt(Ni),Qt(ci),xS(),n=e.flags,n&65536&&!(n&128)?(e.flags=n&-65537|128,e):null;case 5:return yS(e),null;case 13:if(Qt(cn),n=e.memoizedState,n!==null&&n.dehydrated!==null){if(e.alternate===null)throw Error(be(340));Cc()}return n=e.flags,n&65536?(e.flags=n&-65537|128,e):null;case 19:return Qt(cn),null;case 4:return Rc(),null;case 10:return pS(e.type._context),null;case 22:case 23:return RS(),null;case 24:return null;default:return null}}var Od=!1,oi=!1,RU=typeof WeakSet=="function"?WeakSet:Set,Ye=null;function oc(n,e){var t=n.ref;if(t!==null)if(typeof t=="function")try{t(null)}catch(i){gn(n,e,i)}else t.current=null}function Ex(n,e,t){try{t()}catch(i){gn(n,e,i)}}var Rw=!1;function LU(n,e){if(lx=dm,n=QC(),lS(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,c=-1,f=0,h=0,d=n,p=null;t:for(;;){for(var m;d!==t||r!==0&&d.nodeType!==3||(a=o+r),d!==s||i!==0&&d.nodeType!==3||(c=o+i),d.nodeType===3&&(o+=d.nodeValue.length),(m=d.firstChild)!==null;)p=d,d=m;for(;;){if(d===n)break t;if(p===t&&++f===r&&(a=o),p===s&&++h===i&&(c=o),(m=d.nextSibling)!==null)break;d=p,p=d.parentNode}d=m}t=a===-1||c===-1?null:{start:a,end:c}}else t=null}t=t||{start:0,end:0}}else t=null;for(cx={focusedElem:n,selectionRange:t},dm=!1,Ye=e;Ye!==null;)if(e=Ye,n=e.child,(e.subtreeFlags&1028)!==0&&n!==null)n.return=e,Ye=n;else for(;Ye!==null;){e=Ye;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 _=y.memoizedProps,x=y.memoizedState,g=e.stateNode,S=g.getSnapshotBeforeUpdate(e.elementType===e.type?_:Cr(e.type,_),x);g.__reactInternalSnapshotBeforeUpdate=S}break;case 3:var A=e.stateNode.containerInfo;A.nodeType===1?A.textContent="":A.nodeType===9&&A.documentElement&&A.removeChild(A.documentElement);break;case 5:case 6:case 4:case 17:break;default:throw Error(be(163))}}catch(E){gn(e,e.return,E)}if(n=e.sibling,n!==null){n.return=e.return,Ye=n;break}Ye=e.return}return y=Rw,Rw=!1,y}function $u(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&&Ex(e,t,s)}r=r.next}while(r!==i)}}function sg(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 Tx(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 qP(n){var e=n.alternate;e!==null&&(n.alternate=null,qP(e)),n.child=null,n.deletions=null,n.sibling=null,n.tag===5&&(e=n.stateNode,e!==null&&(delete e[es],delete e[Af],delete e[hx],delete e[dU],delete e[pU])),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 ZP(n){return n.tag===5||n.tag===3||n.tag===4}function Lw(n){e:for(;;){for(;n.sibling===null;){if(n.return===null||ZP(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 bx(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=gm));else if(i!==4&&(n=n.child,n!==null))for(bx(n,e,t),n=n.sibling;n!==null;)bx(n,e,t),n=n.sibling}function Cx(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(Cx(n,e,t),n=n.sibling;n!==null;)Cx(n,e,t),n=n.sibling}var Xn=null,Rr=!1;function so(n,e,t){for(t=t.child;t!==null;)KP(n,e,t),t=t.sibling}function KP(n,e,t){if(is&&typeof is.onCommitFiberUnmount=="function")try{is.onCommitFiberUnmount(Jm,t)}catch{}switch(t.tag){case 5:oi||oc(t,e);case 6:var i=Xn,r=Rr;Xn=null,so(n,e,t),Xn=i,Rr=r,Xn!==null&&(Rr?(n=Xn,t=t.stateNode,n.nodeType===8?n.parentNode.removeChild(t):n.removeChild(t)):Xn.removeChild(t.stateNode));break;case 18:Xn!==null&&(Rr?(n=Xn,t=t.stateNode,n.nodeType===8?_v(n.parentNode,t):n.nodeType===1&&_v(n,t),vf(n)):_v(Xn,t.stateNode));break;case 4:i=Xn,r=Rr,Xn=t.stateNode.containerInfo,Rr=!0,so(n,e,t),Xn=i,Rr=r;break;case 0:case 11:case 14:case 15:if(!oi&&(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)&&Ex(t,e,o),r=r.next}while(r!==i)}so(n,e,t);break;case 1:if(!oi&&(oc(t,e),i=t.stateNode,typeof i.componentWillUnmount=="function"))try{i.props=t.memoizedProps,i.state=t.memoizedState,i.componentWillUnmount()}catch(a){gn(t,e,a)}so(n,e,t);break;case 21:so(n,e,t);break;case 22:t.mode&1?(oi=(i=oi)||t.memoizedState!==null,so(n,e,t),oi=i):so(n,e,t);break;default:so(n,e,t)}}function Iw(n){var e=n.updateQueue;if(e!==null){n.updateQueue=null;var t=n.stateNode;t===null&&(t=n.stateNode=new RU),e.forEach(function(i){var r=zU.bind(null,n,i);t.has(i)||(t.add(i),i.then(r,r))})}}function wr(n,e){var t=e.deletions;if(t!==null)for(var i=0;ir&&(r=o),i&=~s}if(i=r,i=Sn()-i,i=(120>i?120:480>i?480:1080>i?1080:1920>i?1920:3e3>i?3e3:4320>i?4320:1960*DU(i/1960))-i,10n?16:n,Eo===null)var i=!1;else{if(n=Eo,Eo=null,Pm=0,Nt&6)throw Error(be(331));var r=Nt;for(Nt|=4,Ye=n.current;Ye!==null;){var s=Ye,o=s.child;if(Ye.flags&16){var a=s.deletions;if(a!==null){for(var c=0;cSn()-CS?Fa(n,0):bS|=t),Oi(n,e)}function rR(n,e){e===0&&(n.mode&1?(e=bd,bd<<=1,!(bd&130023424)&&(bd=4194304)):e=1);var t=_i();n=Vs(n,e),n!==null&&(ih(n,e,t),Oi(n,t))}function BU(n){var e=n.memoizedState,t=0;e!==null&&(t=e.retryLane),rR(n,t)}function zU(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(be(314))}i!==null&&i.delete(e),rR(n,t)}var sR;sR=function(n,e,t){if(n!==null)if(n.memoizedProps!==e.pendingProps||Ni.current)Di=!0;else{if(!(n.lanes&t)&&!(e.flags&128))return Di=!1,bU(n,e,t);Di=!!(n.flags&131072)}else Di=!1,rn&&e.flags&1048576&&cP(e,_m,e.index);switch(e.lanes=0,e.tag){case 2:var i=e.type;qp(n,e),n=e.pendingProps;var r=bc(e,ci.current);Mc(e,t),r=SS(null,e,i,n,r,t);var s=AS();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,Ui(i)?(s=!0,ym(e)):s=!1,e.memoizedState=r.state!==null&&r.state!==void 0?r.state:null,gS(e),r.updater=rg,e.stateNode=r,r._reactInternals=e,yx(e,i,n,t),e=Sx(null,e,i,!0,s,t)):(e.tag=0,rn&&s&&cS(e),vi(null,e,r,t),e=e.child),e;case 16:i=e.elementType;e:{switch(qp(n,e),n=e.pendingProps,r=i._init,i=r(i._payload),e.type=i,r=e.tag=HU(i),n=Cr(i,n),r){case 0:e=_x(null,e,i,n,t);break e;case 1:e=bw(null,e,i,n,t);break e;case 11:e=Ew(null,e,i,n,t);break e;case 14:e=Tw(null,e,i,Cr(i.type,n),t);break e}throw Error(be(306,i,""))}return e;case 0:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Cr(i,r),_x(n,e,i,r,t);case 1:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Cr(i,r),bw(n,e,i,r,t);case 3:e:{if(HP(e),n===null)throw Error(be(387));i=e.pendingProps,s=e.memoizedState,r=s.element,mP(n,e),Mm(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=Lc(Error(be(423)),e),e=Cw(n,e,i,t,r);break e}else if(i!==r){r=Lc(Error(be(424)),e),e=Cw(n,e,i,t,r);break e}else for(Zi=Po(e.stateNode.containerInfo.firstChild),Ji=e,rn=!0,Lr=null,t=dP(e,null,i,t),e.child=t;t;)t.flags=t.flags&-3|4096,t=t.sibling;else{if(Cc(),i===r){e=Hs(n,e,t);break e}vi(n,e,i,t)}e=e.child}return e;case 5:return gP(e),n===null&&mx(e),i=e.type,r=e.pendingProps,s=n!==null?n.memoizedProps:null,o=r.children,ux(i,r)?o=null:s!==null&&ux(i,s)&&(e.flags|=32),VP(n,e),vi(n,e,o,t),e.child;case 6:return n===null&&mx(e),null;case 13:return GP(n,e,t);case 4:return vS(e,e.stateNode.containerInfo),i=e.pendingProps,n===null?e.child=Pc(e,null,i,t):vi(n,e,i,t),e.child;case 11:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Cr(i,r),Ew(n,e,i,r,t);case 7:return vi(n,e,e.pendingProps,t),e.child;case 8:return vi(n,e,e.pendingProps.children,t),e.child;case 12:return vi(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,Zt(Sm,i._currentValue),i._currentValue=o,s!==null)if(kr(s.value,o)){if(s.children===r.children&&!Ni.current){e=Hs(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 c=a.firstContext;c!==null;){if(c.context===i){if(s.tag===1){c=Ds(-1,t&-t),c.tag=2;var f=s.updateQueue;if(f!==null){f=f.shared;var h=f.pending;h===null?c.next=c:(c.next=h.next,h.next=c),f.pending=c}}s.lanes|=t,c=s.alternate,c!==null&&(c.lanes|=t),gx(s.return,t,e),a.lanes|=t;break}c=c.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(be(341));o.lanes|=t,a=o.alternate,a!==null&&(a.lanes|=t),gx(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}vi(n,e,r.children,t),e=e.child}return e;case 9:return r=e.type,i=e.pendingProps.children,Mc(e,t),r=_r(r),i=i(r),e.flags|=1,vi(n,e,i,t),e.child;case 14:return i=e.type,r=Cr(i,e.pendingProps),r=Cr(i.type,r),Tw(n,e,i,r,t);case 15:return BP(n,e,e.type,e.pendingProps,t);case 17:return i=e.type,r=e.pendingProps,r=e.elementType===i?r:Cr(i,r),qp(n,e),e.tag=1,Ui(i)?(n=!0,ym(e)):n=!1,Mc(e,t),OP(e,i,r),yx(e,i,r,t),Sx(null,e,i,!0,n,t);case 19:return WP(n,e,t);case 22:return zP(n,e,t)}throw Error(be(156,e.tag))};function oR(n,e){return DC(n,e)}function VU(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 vr(n,e,t,i){return new VU(n,e,t,i)}function IS(n){return n=n.prototype,!(!n||!n.isReactComponent)}function HU(n){if(typeof n=="function")return IS(n)?1:0;if(n!=null){if(n=n.$$typeof,n===J_)return 11;if(n===Q_)return 14}return 2}function Do(n,e){var t=n.alternate;return t===null?(t=vr(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 Jp(n,e,t,i,r,s){var o=2;if(i=n,typeof n=="function")IS(n)&&(o=1);else if(typeof n=="string")o=5;else e:switch(n){case Jl:return Ba(t.children,r,s,e);case K_:o=8,r|=8;break;case Hy:return n=vr(12,t,e,r|2),n.elementType=Hy,n.lanes=s,n;case Gy:return n=vr(13,t,e,r),n.elementType=Gy,n.lanes=s,n;case Wy:return n=vr(19,t,e,r),n.elementType=Wy,n.lanes=s,n;case gC:return ag(t,r,s,e);default:if(typeof n=="object"&&n!==null)switch(n.$$typeof){case pC:o=10;break e;case mC:o=9;break e;case J_:o=11;break e;case Q_:o=14;break e;case yo:o=16,i=null;break e}throw Error(be(130,n==null?n:typeof n,""))}return e=vr(o,t,e,r),e.elementType=n,e.type=i,e.lanes=s,e}function Ba(n,e,t,i){return n=vr(7,n,i,e),n.lanes=t,n}function ag(n,e,t,i){return n=vr(22,n,i,e),n.elementType=gC,n.lanes=t,n.stateNode={isHidden:!1},n}function Cv(n,e,t){return n=vr(6,n,null,e),n.lanes=t,n}function Pv(n,e,t){return e=vr(4,n.children!==null?n.children:[],n.key,e),e.lanes=t,e.stateNode={containerInfo:n.containerInfo,pendingChildren:null,implementation:n.implementation},e}function GU(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=cv(0),this.expirationTimes=cv(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=cv(0),this.identifierPrefix=i,this.onRecoverableError=r,this.mutableSourceEagerHydrationData=null}function DS(n,e,t,i,r,s,o,a,c){return n=new GU(n,e,t,a,c),e===1?(e=1,s===!0&&(e|=8)):e=0,s=vr(3,null,null,e),n.current=s,s.stateNode=n,s.memoizedState={element:i,isDehydrated:t,cache:null,transitions:null,pendingSuspenseBoundaries:null},gS(s),n}function WU(n,e,t){var i=3"u"||typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE!="function"))try{__REACT_DEVTOOLS_GLOBAL_HOOK__.checkDCE(uR)}catch(n){console.error(n)}}uR(),uC.exports=tr;var ZU=uC.exports,fR,zw=ZU;fR=zy.createRoot=zw.createRoot,zy.hydrateRoot=zw.hydrateRoot;const on={paddingX:"sm:px-16 px-6",paddingY:"sm:py-16 py-6",padding:"sm:px-16 px-6 sm:py-16 py-10",heroHeadText:"font-black text-[#373737] lg:text-[80px] sm:text-[60px] xs:text-[50px] text-[40px] lg:leading-[98px] mt-2",heroSubText:"text-[#dfd9ff] font-medium lg:text-[30px] sm:text-[26px] xs:text-[20px] text-[16px] lg:leading-[40px]",sectionHeadText:"text-black font-black md:text-[60px] sm:text-[50px] xs:text-[40px] text-[30px]",sectionSubText:"sm:text-[18px] text-[14px] text-secondary uppercase tracking-wider"},hR=G.createContext({transformPagePoint:n=>n,isStatic:!1,reducedMotion:"never"}),hg=G.createContext({}),dg=G.createContext(null),pg=typeof document<"u",kS=pg?G.useLayoutEffect:G.useEffect,dR=G.createContext({strict:!1}),FS=n=>n.replace(/([a-z])([A-Z])/g,"$1-$2").toLowerCase(),KU="framerAppearId",pR="data-"+FS(KU);function JU(n,e,t,i){const{visualElement:r}=G.useContext(hg),s=G.useContext(dR),o=G.useContext(dg),a=G.useContext(hR).reducedMotion,c=G.useRef();i=i||s.renderer,!c.current&&i&&(c.current=i(n,{visualState:e,parent:r,props:t,presenceContext:o,blockInitialAnimation:o?o.initial===!1:!1,reducedMotionConfig:a}));const f=c.current;G.useInsertionEffect(()=>{f&&f.update(t,o)});const h=G.useRef(!!(t[pR]&&!window.HandoffComplete));return kS(()=>{f&&(f.render(),h.current&&f.animationState&&f.animationState.animateChanges())}),G.useEffect(()=>{f&&(f.updateFeatures(),!h.current&&f.animationState&&f.animationState.animateChanges(),h.current&&(h.current=!1,window.HandoffComplete=!0))}),f}function lc(n){return n&&typeof n=="object"&&Object.prototype.hasOwnProperty.call(n,"current")}function QU(n,e,t){return G.useCallback(i=>{i&&n.mount&&n.mount(i),e&&(i?e.mount(i):e.unmount()),t&&(typeof t=="function"?t(i):lc(t)&&(t.current=i))},[e])}function Pf(n){return typeof n=="string"||Array.isArray(n)}function mg(n){return n!==null&&typeof n=="object"&&typeof n.start=="function"}const BS=["animate","whileInView","whileFocus","whileHover","whileTap","whileDrag","exit"],zS=["initial",...BS];function gg(n){return mg(n.animate)||zS.some(e=>Pf(n[e]))}function mR(n){return!!(gg(n)||n.variants)}function $U(n,e){if(gg(n)){const{initial:t,animate:i}=n;return{initial:t===!1||Pf(t)?t:void 0,animate:Pf(i)?i:void 0}}return n.inherit!==!1?e:{}}function eO(n){const{initial:e,animate:t}=$U(n,G.useContext(hg));return G.useMemo(()=>({initial:e,animate:t}),[Vw(e),Vw(t)])}function Vw(n){return Array.isArray(n)?n.join(" "):n}const Hw={animation:["animate","variants","whileHover","whileTap","exit","whileInView","whileFocus","whileDrag"],exit:["exit"],drag:["drag","dragControls"],focus:["whileFocus"],hover:["whileHover","onHoverStart","onHoverEnd"],tap:["whileTap","onTap","onTapStart","onTapCancel"],pan:["onPan","onPanStart","onPanSessionStart","onPanEnd"],inView:["whileInView","onViewportEnter","onViewportLeave"],layout:["layout","layoutId"]},Rf={};for(const n in Hw)Rf[n]={isEnabled:e=>Hw[n].some(t=>!!e[t])};function tO(n){for(const e in n)Rf[e]={...Rf[e],...n[e]}}const VS=G.createContext({}),gR=G.createContext({}),nO=Symbol.for("motionComponentSymbol");function iO({preloadedFeatures:n,createVisualElement:e,useRender:t,useVisualState:i,Component:r}){n&&tO(n);function s(a,c){let f;const h={...G.useContext(hR),...a,layoutId:rO(a)},{isStatic:d}=h,p=eO(a),m=i(a,d);if(!d&&pg){p.visualElement=JU(r,m,h,e);const y=G.useContext(gR),_=G.useContext(dR).strict;p.visualElement&&(f=p.visualElement.loadFeatures(h,_,n,y))}return G.createElement(hg.Provider,{value:p},f&&p.visualElement?G.createElement(f,{visualElement:p.visualElement,...h}):null,t(r,a,QU(m,p.visualElement,c),m,d,p.visualElement))}const o=G.forwardRef(s);return o[nO]=r,o}function rO({layoutId:n}){const e=G.useContext(VS).id;return e&&n!==void 0?e+"-"+n:n}function sO(n){function e(i,r={}){return iO(n(i,r))}if(typeof Proxy>"u")return e;const t=new Map;return new Proxy(e,{get:(i,r)=>(t.has(r)||t.set(r,e(r)),t.get(r))})}const oO=["animate","circle","defs","desc","ellipse","g","image","line","filter","marker","mask","metadata","path","pattern","polygon","polyline","rect","stop","switch","symbol","svg","text","tspan","use","view"];function HS(n){return typeof n!="string"||n.includes("-")?!1:!!(oO.indexOf(n)>-1||/[A-Z]/.test(n))}const Im={};function aO(n){Object.assign(Im,n)}const ah=["transformPerspective","x","y","z","translateX","translateY","translateZ","scale","scaleX","scaleY","rotate","rotateX","rotateY","rotateZ","skew","skewX","skewY"],il=new Set(ah);function vR(n,{layout:e,layoutId:t}){return il.has(n)||n.startsWith("origin")||(e||t!==void 0)&&(!!Im[n]||n==="opacity")}const ki=n=>!!(n&&n.getVelocity),lO={x:"translateX",y:"translateY",z:"translateZ",transformPerspective:"perspective"},cO=ah.length;function uO(n,{enableHardwareAcceleration:e=!0,allowTransformNone:t=!0},i,r){let s="";for(let o=0;oe=>typeof e=="string"&&e.startsWith(n),xR=yR("--"),Dx=yR("var(--"),fO=/var\s*\(\s*--[\w-]+(\s*,\s*(?:(?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)+)?\s*\)/g,hO=(n,e)=>e&&typeof n=="number"?e.transform(n):n,Fo=(n,e,t)=>Math.min(Math.max(t,n),e),rl={test:n=>typeof n=="number",parse:parseFloat,transform:n=>n},nf={...rl,transform:n=>Fo(0,1,n)},Bd={...rl,default:1},rf=n=>Math.round(n*1e5)/1e5,vg=/(-)?([\d]*\.?[\d])+/g,_R=/(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))/gi,dO=/^(#[0-9a-f]{3,8}|(rgb|hsl)a?\((-?[\d\.]+%?[,\s]+){2}(-?[\d\.]+%?)\s*[\,\/]?\s*[\d\.]*%?\))$/i;function lh(n){return typeof n=="string"}const ch=n=>({test:e=>lh(e)&&e.endsWith(n)&&e.split(" ").length===1,parse:parseFloat,transform:e=>`${e}${n}`}),vo=ch("deg"),ss=ch("%"),ht=ch("px"),pO=ch("vh"),mO=ch("vw"),Gw={...ss,parse:n=>ss.parse(n)/100,transform:n=>ss.transform(n*100)},Ww={...rl,transform:Math.round},SR={borderWidth:ht,borderTopWidth:ht,borderRightWidth:ht,borderBottomWidth:ht,borderLeftWidth:ht,borderRadius:ht,radius:ht,borderTopLeftRadius:ht,borderTopRightRadius:ht,borderBottomRightRadius:ht,borderBottomLeftRadius:ht,width:ht,maxWidth:ht,height:ht,maxHeight:ht,size:ht,top:ht,right:ht,bottom:ht,left:ht,padding:ht,paddingTop:ht,paddingRight:ht,paddingBottom:ht,paddingLeft:ht,margin:ht,marginTop:ht,marginRight:ht,marginBottom:ht,marginLeft:ht,rotate:vo,rotateX:vo,rotateY:vo,rotateZ:vo,scale:Bd,scaleX:Bd,scaleY:Bd,scaleZ:Bd,skew:vo,skewX:vo,skewY:vo,distance:ht,translateX:ht,translateY:ht,translateZ:ht,x:ht,y:ht,z:ht,perspective:ht,transformPerspective:ht,opacity:nf,originX:Gw,originY:Gw,originZ:ht,zIndex:Ww,fillOpacity:nf,strokeOpacity:nf,numOctaves:Ww};function GS(n,e,t,i){const{style:r,vars:s,transform:o,transformOrigin:a}=n;let c=!1,f=!1,h=!0;for(const d in e){const p=e[d];if(xR(d)){s[d]=p;continue}const m=SR[d],y=hO(p,m);if(il.has(d)){if(c=!0,o[d]=y,!h)continue;p!==(m.default||0)&&(h=!1)}else d.startsWith("origin")?(f=!0,a[d]=y):r[d]=y}if(e.transform||(c||i?r.transform=uO(n.transform,t,h,i):r.transform&&(r.transform="none")),f){const{originX:d="50%",originY:p="50%",originZ:m=0}=a;r.transformOrigin=`${d} ${p} ${m}`}}const WS=()=>({style:{},transform:{},transformOrigin:{},vars:{}});function AR(n,e,t){for(const i in e)!ki(e[i])&&!vR(i,t)&&(n[i]=e[i])}function gO({transformTemplate:n},e,t){return G.useMemo(()=>{const i=WS();return GS(i,e,{enableHardwareAcceleration:!t},n),Object.assign({},i.vars,i.style)},[e])}function vO(n,e,t){const i=n.style||{},r={};return AR(r,i,n),Object.assign(r,gO(n,e,t)),n.transformValues?n.transformValues(r):r}function yO(n,e,t){const i={},r=vO(n,e,t);return n.drag&&n.dragListener!==!1&&(i.draggable=!1,r.userSelect=r.WebkitUserSelect=r.WebkitTouchCallout="none",r.touchAction=n.drag===!0?"none":`pan-${n.drag==="x"?"y":"x"}`),n.tabIndex===void 0&&(n.onTap||n.onTapStart||n.whileTap)&&(i.tabIndex=0),i.style=r,i}const xO=new Set(["animate","exit","variants","initial","style","values","variants","transition","transformTemplate","transformValues","custom","inherit","onBeforeLayoutMeasure","onAnimationStart","onAnimationComplete","onUpdate","onDragStart","onDrag","onDragEnd","onMeasureDragConstraints","onDirectionLock","onDragTransitionEnd","_dragX","_dragY","onHoverStart","onHoverEnd","onViewportEnter","onViewportLeave","globalTapTarget","ignoreStrict","viewport"]);function Dm(n){return n.startsWith("while")||n.startsWith("drag")&&n!=="draggable"||n.startsWith("layout")||n.startsWith("onTap")||n.startsWith("onPan")||n.startsWith("onLayout")||xO.has(n)}let MR=n=>!Dm(n);function _O(n){n&&(MR=e=>e.startsWith("on")?!Dm(e):n(e))}try{_O(require("@emotion/is-prop-valid").default)}catch{}function SO(n,e,t){const i={};for(const r in n)r==="values"&&typeof n.values=="object"||(MR(r)||t===!0&&Dm(r)||!e&&!Dm(r)||n.draggable&&r.startsWith("onDrag"))&&(i[r]=n[r]);return i}function jw(n,e,t){return typeof n=="string"?n:ht.transform(e+t*n)}function AO(n,e,t){const i=jw(e,n.x,n.width),r=jw(t,n.y,n.height);return`${i} ${r}`}const MO={offset:"stroke-dashoffset",array:"stroke-dasharray"},wO={offset:"strokeDashoffset",array:"strokeDasharray"};function EO(n,e,t=1,i=0,r=!0){n.pathLength=1;const s=r?MO:wO;n[s.offset]=ht.transform(-i);const o=ht.transform(e),a=ht.transform(t);n[s.array]=`${o} ${a}`}function jS(n,{attrX:e,attrY:t,attrScale:i,originX:r,originY:s,pathLength:o,pathSpacing:a=1,pathOffset:c=0,...f},h,d,p){if(GS(n,f,h,p),d){n.style.viewBox&&(n.attrs.viewBox=n.style.viewBox);return}n.attrs=n.style,n.style={};const{attrs:m,style:y,dimensions:_}=n;m.transform&&(_&&(y.transform=m.transform),delete m.transform),_&&(r!==void 0||s!==void 0||y.transform)&&(y.transformOrigin=AO(_,r!==void 0?r:.5,s!==void 0?s:.5)),e!==void 0&&(m.x=e),t!==void 0&&(m.y=t),i!==void 0&&(m.scale=i),o!==void 0&&EO(m,o,a,c,!1)}const wR=()=>({...WS(),attrs:{}}),XS=n=>typeof n=="string"&&n.toLowerCase()==="svg";function TO(n,e,t,i){const r=G.useMemo(()=>{const s=wR();return jS(s,e,{enableHardwareAcceleration:!1},XS(i),n.transformTemplate),{...s.attrs,style:{...s.style}}},[e]);if(n.style){const s={};AR(s,n.style,n),r.style={...s,...r.style}}return r}function bO(n=!1){return(t,i,r,{latestValues:s},o)=>{const c=(HS(t)?TO:yO)(i,s,o,t),h={...SO(i,typeof t=="string",n),...c,ref:r},{children:d}=i,p=G.useMemo(()=>ki(d)?d.get():d,[d]);return G.createElement(t,{...h,children:p})}}function ER(n,{style:e,vars:t},i,r){Object.assign(n.style,e,r&&r.getProjectionStyles(i));for(const s in t)n.style.setProperty(s,t[s])}const TR=new Set(["baseFrequency","diffuseConstant","kernelMatrix","kernelUnitLength","keySplines","keyTimes","limitingConeAngle","markerHeight","markerWidth","numOctaves","targetX","targetY","surfaceScale","specularConstant","specularExponent","stdDeviation","tableValues","viewBox","gradientTransform","pathLength","startOffset","textLength","lengthAdjust"]);function bR(n,e,t,i){ER(n,e,void 0,i);for(const r in e.attrs)n.setAttribute(TR.has(r)?r:FS(r),e.attrs[r])}function YS(n,e){const{style:t}=n,i={};for(const r in t)(ki(t[r])||e.style&&ki(e.style[r])||vR(r,n))&&(i[r]=t[r]);return i}function CR(n,e){const t=YS(n,e);for(const i in n)if(ki(n[i])||ki(e[i])){const r=ah.indexOf(i)!==-1?"attr"+i.charAt(0).toUpperCase()+i.substring(1):i;t[r]=n[i]}return t}function qS(n,e,t,i={},r={}){return typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),typeof e=="string"&&(e=n.variants&&n.variants[e]),typeof e=="function"&&(e=e(t!==void 0?t:n.custom,i,r)),e}function PR(n){const e=G.useRef(null);return e.current===null&&(e.current=n()),e.current}const Nm=n=>Array.isArray(n),CO=n=>!!(n&&typeof n=="object"&&n.mix&&n.toValue),PO=n=>Nm(n)?n[n.length-1]||0:n;function Qp(n){const e=ki(n)?n.get():n;return CO(e)?e.toValue():e}function RO({scrapeMotionValuesFromProps:n,createRenderState:e,onMount:t},i,r,s){const o={latestValues:LO(i,r,s,n),renderState:e()};return t&&(o.mount=a=>t(i,a,o)),o}const RR=n=>(e,t)=>{const i=G.useContext(hg),r=G.useContext(dg),s=()=>RO(n,e,i,r);return t?s():PR(s)};function LO(n,e,t,i){const r={},s=i(n,{});for(const p in s)r[p]=Qp(s[p]);let{initial:o,animate:a}=n;const c=gg(n),f=mR(n);e&&f&&!c&&n.inherit!==!1&&(o===void 0&&(o=e.initial),a===void 0&&(a=e.animate));let h=t?t.initial===!1:!1;h=h||o===!1;const d=h?a:o;return d&&typeof d!="boolean"&&!mg(d)&&(Array.isArray(d)?d:[d]).forEach(m=>{const y=qS(n,m);if(!y)return;const{transitionEnd:_,transition:x,...g}=y;for(const S in g){let A=g[S];if(Array.isArray(A)){const E=h?A.length-1:0;A=A[E]}A!==null&&(r[S]=A)}for(const S in _)r[S]=_[S]}),r}const yn=n=>n;class Xw{constructor(){this.order=[],this.scheduled=new Set}add(e){if(!this.scheduled.has(e))return this.scheduled.add(e),this.order.push(e),!0}remove(e){const t=this.order.indexOf(e);t!==-1&&(this.order.splice(t,1),this.scheduled.delete(e))}clear(){this.order.length=0,this.scheduled.clear()}}function IO(n){let e=new Xw,t=new Xw,i=0,r=!1,s=!1;const o=new WeakSet,a={schedule:(c,f=!1,h=!1)=>{const d=h&&r,p=d?e:t;return f&&o.add(c),p.add(c)&&d&&r&&(i=e.order.length),c},cancel:c=>{t.remove(c),o.delete(c)},process:c=>{if(r){s=!0;return}if(r=!0,[e,t]=[t,e],t.clear(),i=e.order.length,i)for(let f=0;f(d[p]=IO(()=>t=!0),d),{}),o=d=>s[d].process(r),a=()=>{const d=performance.now();t=!1,r.delta=i?1e3/60:Math.max(Math.min(d-r.timestamp,DO),1),r.timestamp=d,r.isProcessing=!0,zd.forEach(o),r.isProcessing=!1,t&&e&&(i=!1,n(a))},c=()=>{t=!0,i=!0,r.isProcessing||n(a)};return{schedule:zd.reduce((d,p)=>{const m=s[p];return d[p]=(y,_=!1,x=!1)=>(t||c(),m.schedule(y,_,x)),d},{}),cancel:d=>zd.forEach(p=>s[p].cancel(d)),state:r,steps:s}}const{schedule:Kt,cancel:Gs,state:si,steps:Rv}=NO(typeof requestAnimationFrame<"u"?requestAnimationFrame:yn,!0),UO={useVisualState:RR({scrapeMotionValuesFromProps:CR,createRenderState:wR,onMount:(n,e,{renderState:t,latestValues:i})=>{Kt.read(()=>{try{t.dimensions=typeof e.getBBox=="function"?e.getBBox():e.getBoundingClientRect()}catch{t.dimensions={x:0,y:0,width:0,height:0}}}),Kt.render(()=>{jS(t,i,{enableHardwareAcceleration:!1},XS(e.tagName),n.transformTemplate),bR(e,t)})}})},OO={useVisualState:RR({scrapeMotionValuesFromProps:YS,createRenderState:WS})};function kO(n,{forwardMotionProps:e=!1},t,i){return{...HS(n)?UO:OO,preloadedFeatures:t,useRender:bO(e),createVisualElement:i,Component:n}}function Ls(n,e,t,i={passive:!0}){return n.addEventListener(e,t,i),()=>n.removeEventListener(e,t)}const LR=n=>n.pointerType==="mouse"?typeof n.button!="number"||n.button<=0:n.isPrimary!==!1;function yg(n,e="page"){return{point:{x:n[e+"X"],y:n[e+"Y"]}}}const FO=n=>e=>LR(e)&&n(e,yg(e));function Ns(n,e,t,i){return Ls(n,e,FO(t),i)}const BO=(n,e)=>t=>e(n(t)),No=(...n)=>n.reduce(BO);function IR(n){let e=null;return()=>{const t=()=>{e=null};return e===null?(e=n,t):!1}}const Yw=IR("dragHorizontal"),qw=IR("dragVertical");function DR(n){let e=!1;if(n==="y")e=qw();else if(n==="x")e=Yw();else{const t=Yw(),i=qw();t&&i?e=()=>{t(),i()}:(t&&t(),i&&i())}return e}function NR(){const n=DR(!0);return n?(n(),!1):!0}class jo{constructor(e){this.isMounted=!1,this.node=e}update(){}}function Zw(n,e){const t="pointer"+(e?"enter":"leave"),i="onHover"+(e?"Start":"End"),r=(s,o)=>{if(s.pointerType==="touch"||NR())return;const a=n.getProps();n.animationState&&a.whileHover&&n.animationState.setActive("whileHover",e),a[i]&&Kt.update(()=>a[i](s,o))};return Ns(n.current,t,r,{passive:!n.getProps()[i]})}class zO extends jo{mount(){this.unmount=No(Zw(this.node,!0),Zw(this.node,!1))}unmount(){}}class VO extends jo{constructor(){super(...arguments),this.isActive=!1}onFocus(){let e=!1;try{e=this.node.current.matches(":focus-visible")}catch{e=!0}!e||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!0),this.isActive=!0)}onBlur(){!this.isActive||!this.node.animationState||(this.node.animationState.setActive("whileFocus",!1),this.isActive=!1)}mount(){this.unmount=No(Ls(this.node.current,"focus",()=>this.onFocus()),Ls(this.node.current,"blur",()=>this.onBlur()))}unmount(){}}const UR=(n,e)=>e?n===e?!0:UR(n,e.parentElement):!1;function Lv(n,e){if(!e)return;const t=new PointerEvent("pointer"+n);e(t,yg(t))}class HO extends jo{constructor(){super(...arguments),this.removeStartListeners=yn,this.removeEndListeners=yn,this.removeAccessibleListeners=yn,this.startPointerPress=(e,t)=>{if(this.isPressing)return;this.removeEndListeners();const i=this.node.getProps(),s=Ns(window,"pointerup",(a,c)=>{if(!this.checkPressEnd())return;const{onTap:f,onTapCancel:h,globalTapTarget:d}=this.node.getProps();Kt.update(()=>{!d&&!UR(this.node.current,a.target)?h&&h(a,c):f&&f(a,c)})},{passive:!(i.onTap||i.onPointerUp)}),o=Ns(window,"pointercancel",(a,c)=>this.cancelPress(a,c),{passive:!(i.onTapCancel||i.onPointerCancel)});this.removeEndListeners=No(s,o),this.startPress(e,t)},this.startAccessiblePress=()=>{const e=s=>{if(s.key!=="Enter"||this.isPressing)return;const o=a=>{a.key!=="Enter"||!this.checkPressEnd()||Lv("up",(c,f)=>{const{onTap:h}=this.node.getProps();h&&Kt.update(()=>h(c,f))})};this.removeEndListeners(),this.removeEndListeners=Ls(this.node.current,"keyup",o),Lv("down",(a,c)=>{this.startPress(a,c)})},t=Ls(this.node.current,"keydown",e),i=()=>{this.isPressing&&Lv("cancel",(s,o)=>this.cancelPress(s,o))},r=Ls(this.node.current,"blur",i);this.removeAccessibleListeners=No(t,r)}}startPress(e,t){this.isPressing=!0;const{onTapStart:i,whileTap:r}=this.node.getProps();r&&this.node.animationState&&this.node.animationState.setActive("whileTap",!0),i&&Kt.update(()=>i(e,t))}checkPressEnd(){return this.removeEndListeners(),this.isPressing=!1,this.node.getProps().whileTap&&this.node.animationState&&this.node.animationState.setActive("whileTap",!1),!NR()}cancelPress(e,t){if(!this.checkPressEnd())return;const{onTapCancel:i}=this.node.getProps();i&&Kt.update(()=>i(e,t))}mount(){const e=this.node.getProps(),t=Ns(e.globalTapTarget?window:this.node.current,"pointerdown",this.startPointerPress,{passive:!(e.onTapStart||e.onPointerStart)}),i=Ls(this.node.current,"focus",this.startAccessiblePress);this.removeStartListeners=No(t,i)}unmount(){this.removeStartListeners(),this.removeEndListeners(),this.removeAccessibleListeners()}}const Nx=new WeakMap,Iv=new WeakMap,GO=n=>{const e=Nx.get(n.target);e&&e(n)},WO=n=>{n.forEach(GO)};function jO({root:n,...e}){const t=n||document;Iv.has(t)||Iv.set(t,{});const i=Iv.get(t),r=JSON.stringify(e);return i[r]||(i[r]=new IntersectionObserver(WO,{root:n,...e})),i[r]}function XO(n,e,t){const i=jO(e);return Nx.set(n,t),i.observe(n),()=>{Nx.delete(n),i.unobserve(n)}}const YO={some:0,all:1};class qO extends jo{constructor(){super(...arguments),this.hasEnteredView=!1,this.isInView=!1}startObserver(){this.unmount();const{viewport:e={}}=this.node.getProps(),{root:t,margin:i,amount:r="some",once:s}=e,o={root:t?t.current:void 0,rootMargin:i,threshold:typeof r=="number"?r:YO[r]},a=c=>{const{isIntersecting:f}=c;if(this.isInView===f||(this.isInView=f,s&&!f&&this.hasEnteredView))return;f&&(this.hasEnteredView=!0),this.node.animationState&&this.node.animationState.setActive("whileInView",f);const{onViewportEnter:h,onViewportLeave:d}=this.node.getProps(),p=f?h:d;p&&p(c)};return XO(this.node.current,o,a)}mount(){this.startObserver()}update(){if(typeof IntersectionObserver>"u")return;const{props:e,prevProps:t}=this.node;["amount","margin","root"].some(ZO(e,t))&&this.startObserver()}unmount(){}}function ZO({viewport:n={}},{viewport:e={}}={}){return t=>n[t]!==e[t]}const KO={inView:{Feature:qO},tap:{Feature:HO},focus:{Feature:VO},hover:{Feature:zO}};function OR(n,e){if(!Array.isArray(e))return!1;const t=e.length;if(t!==n.length)return!1;for(let i=0;ie[i]=t.get()),e}function QO(n){const e={};return n.values.forEach((t,i)=>e[i]=t.getVelocity()),e}function xg(n,e,t){const i=n.getProps();return qS(i,e,t!==void 0?t:i.custom,JO(n),QO(n))}let $O=yn,ZS=yn;const Uo=n=>n*1e3,Us=n=>n/1e3,ek={current:!1},kR=n=>Array.isArray(n)&&typeof n[0]=="number";function FR(n){return!!(!n||typeof n=="string"&&BR[n]||kR(n)||Array.isArray(n)&&n.every(FR))}const Wu=([n,e,t,i])=>`cubic-bezier(${n}, ${e}, ${t}, ${i})`,BR={linear:"linear",ease:"ease",easeIn:"ease-in",easeOut:"ease-out",easeInOut:"ease-in-out",circIn:Wu([0,.65,.55,1]),circOut:Wu([.55,0,1,.45]),backIn:Wu([.31,.01,.66,-.59]),backOut:Wu([.33,1.53,.69,.99])};function zR(n){if(n)return kR(n)?Wu(n):Array.isArray(n)?n.map(zR):BR[n]}function tk(n,e,t,{delay:i=0,duration:r,repeat:s=0,repeatType:o="loop",ease:a,times:c}={}){const f={[e]:t};c&&(f.offset=c);const h=zR(a);return Array.isArray(h)&&(f.easing=h),n.animate(f,{delay:i,duration:r,easing:Array.isArray(h)?"linear":h,fill:"both",iterations:s+1,direction:o==="reverse"?"alternate":"normal"})}function nk(n,{repeat:e,repeatType:t="loop"}){const i=e&&t!=="loop"&&e%2===1?0:n.length-1;return n[i]}const VR=(n,e,t)=>(((1-3*t+3*e)*n+(3*t-6*e))*n+3*e)*n,ik=1e-7,rk=12;function sk(n,e,t,i,r){let s,o,a=0;do o=e+(t-e)/2,s=VR(o,i,r)-n,s>0?t=o:e=o;while(Math.abs(s)>ik&&++ask(s,0,1,n,t);return s=>s===0||s===1?s:VR(r(s),e,i)}const ok=uh(.42,0,1,1),ak=uh(0,0,.58,1),HR=uh(.42,0,.58,1),lk=n=>Array.isArray(n)&&typeof n[0]!="number",GR=n=>e=>e<=.5?n(2*e)/2:(2-n(2*(1-e)))/2,WR=n=>e=>1-n(1-e),KS=n=>1-Math.sin(Math.acos(n)),jR=WR(KS),ck=GR(KS),XR=uh(.33,1.53,.69,.99),JS=WR(XR),uk=GR(JS),fk=n=>(n*=2)<1?.5*JS(n):.5*(2-Math.pow(2,-10*(n-1))),hk={linear:yn,easeIn:ok,easeInOut:HR,easeOut:ak,circIn:KS,circInOut:ck,circOut:jR,backIn:JS,backInOut:uk,backOut:XR,anticipate:fk},Kw=n=>{if(Array.isArray(n)){ZS(n.length===4);const[e,t,i,r]=n;return uh(e,t,i,r)}else if(typeof n=="string")return hk[n];return n},QS=(n,e)=>t=>!!(lh(t)&&dO.test(t)&&t.startsWith(n)||e&&Object.prototype.hasOwnProperty.call(t,e)),YR=(n,e,t)=>i=>{if(!lh(i))return i;const[r,s,o,a]=i.match(vg);return{[n]:parseFloat(r),[e]:parseFloat(s),[t]:parseFloat(o),alpha:a!==void 0?parseFloat(a):1}},dk=n=>Fo(0,255,n),Dv={...rl,transform:n=>Math.round(dk(n))},Ia={test:QS("rgb","red"),parse:YR("red","green","blue"),transform:({red:n,green:e,blue:t,alpha:i=1})=>"rgba("+Dv.transform(n)+", "+Dv.transform(e)+", "+Dv.transform(t)+", "+rf(nf.transform(i))+")"};function pk(n){let e="",t="",i="",r="";return n.length>5?(e=n.substring(1,3),t=n.substring(3,5),i=n.substring(5,7),r=n.substring(7,9)):(e=n.substring(1,2),t=n.substring(2,3),i=n.substring(3,4),r=n.substring(4,5),e+=e,t+=t,i+=i,r+=r),{red:parseInt(e,16),green:parseInt(t,16),blue:parseInt(i,16),alpha:r?parseInt(r,16)/255:1}}const Ux={test:QS("#"),parse:pk,transform:Ia.transform},cc={test:QS("hsl","hue"),parse:YR("hue","saturation","lightness"),transform:({hue:n,saturation:e,lightness:t,alpha:i=1})=>"hsla("+Math.round(n)+", "+ss.transform(rf(e))+", "+ss.transform(rf(t))+", "+rf(nf.transform(i))+")"},gi={test:n=>Ia.test(n)||Ux.test(n)||cc.test(n),parse:n=>Ia.test(n)?Ia.parse(n):cc.test(n)?cc.parse(n):Ux.parse(n),transform:n=>lh(n)?n:n.hasOwnProperty("red")?Ia.transform(n):cc.transform(n)},un=(n,e,t)=>-t*n+t*e+n;function Nv(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)*(2/3-t)*6:n}function mk({hue:n,saturation:e,lightness:t,alpha:i}){n/=360,e/=100,t/=100;let r=0,s=0,o=0;if(!e)r=s=o=t;else{const a=t<.5?t*(1+e):t+e-t*e,c=2*t-a;r=Nv(c,a,n+1/3),s=Nv(c,a,n),o=Nv(c,a,n-1/3)}return{red:Math.round(r*255),green:Math.round(s*255),blue:Math.round(o*255),alpha:i}}const Uv=(n,e,t)=>{const i=n*n;return Math.sqrt(Math.max(0,t*(e*e-i)+i))},gk=[Ux,Ia,cc],vk=n=>gk.find(e=>e.test(n));function Jw(n){const e=vk(n);let t=e.parse(n);return e===cc&&(t=mk(t)),t}const qR=(n,e)=>{const t=Jw(n),i=Jw(e),r={...t};return s=>(r.red=Uv(t.red,i.red,s),r.green=Uv(t.green,i.green,s),r.blue=Uv(t.blue,i.blue,s),r.alpha=un(t.alpha,i.alpha,s),Ia.transform(r))};function yk(n){var e,t;return isNaN(n)&&lh(n)&&(((e=n.match(vg))===null||e===void 0?void 0:e.length)||0)+(((t=n.match(_R))===null||t===void 0?void 0:t.length)||0)>0}const ZR={regex:fO,countKey:"Vars",token:"${v}",parse:yn},KR={regex:_R,countKey:"Colors",token:"${c}",parse:gi.parse},JR={regex:vg,countKey:"Numbers",token:"${n}",parse:rl.parse};function Ov(n,{regex:e,countKey:t,token:i,parse:r}){const s=n.tokenised.match(e);s&&(n["num"+t]=s.length,n.tokenised=n.tokenised.replace(e,i),n.values.push(...s.map(r)))}function Um(n){const e=n.toString(),t={value:e,tokenised:e,values:[],numVars:0,numColors:0,numNumbers:0};return t.value.includes("var(--")&&Ov(t,ZR),Ov(t,KR),Ov(t,JR),t}function QR(n){return Um(n).values}function $R(n){const{values:e,numColors:t,numVars:i,tokenised:r}=Um(n),s=e.length;return o=>{let a=r;for(let c=0;ctypeof n=="number"?0:n;function _k(n){const e=QR(n);return $R(n)(e.map(xk))}const Bo={test:yk,parse:QR,createTransformer:$R,getAnimatableNone:_k},e2=(n,e)=>t=>`${t>0?e:n}`;function t2(n,e){return typeof n=="number"?t=>un(n,e,t):gi.test(n)?qR(n,e):n.startsWith("var(")?e2(n,e):i2(n,e)}const n2=(n,e)=>{const t=[...n],i=t.length,r=n.map((s,o)=>t2(s,e[o]));return s=>{for(let o=0;o{const t={...n,...e},i={};for(const r in t)n[r]!==void 0&&e[r]!==void 0&&(i[r]=t2(n[r],e[r]));return r=>{for(const s in i)t[s]=i[s](r);return t}},i2=(n,e)=>{const t=Bo.createTransformer(e),i=Um(n),r=Um(e);return i.numVars===r.numVars&&i.numColors===r.numColors&&i.numNumbers>=r.numNumbers?No(n2(i.values,r.values),t):e2(n,e)},Lf=(n,e,t)=>{const i=e-n;return i===0?1:(t-n)/i},Qw=(n,e)=>t=>un(n,e,t);function Ak(n){return typeof n=="number"?Qw:typeof n=="string"?gi.test(n)?qR:i2:Array.isArray(n)?n2:typeof n=="object"?Sk:Qw}function Mk(n,e,t){const i=[],r=t||Ak(n[0]),s=n.length-1;for(let o=0;oe[0];n[0]>n[s-1]&&(n=[...n].reverse(),e=[...e].reverse());const o=Mk(e,i,r),a=o.length,c=f=>{let h=0;if(a>1)for(;hc(Fo(n[0],n[s-1],f)):c}function wk(n,e){const t=n[n.length-1];for(let i=1;i<=e;i++){const r=Lf(0,e,i);n.push(un(t,1,r))}}function Ek(n){const e=[0];return wk(e,n.length-1),e}function Tk(n,e){return n.map(t=>t*e)}function bk(n,e){return n.map(()=>e||HR).splice(0,n.length-1)}function Om({duration:n=300,keyframes:e,times:t,ease:i="easeInOut"}){const r=lk(i)?i.map(Kw):Kw(i),s={done:!1,value:e[0]},o=Tk(t&&t.length===e.length?t:Ek(e),n),a=r2(o,e,{ease:Array.isArray(r)?r:bk(e,r)});return{calculatedDuration:n,next:c=>(s.value=a(c),s.done=c>=n,s)}}function s2(n,e){return e?n*(1e3/e):0}const Ck=5;function o2(n,e,t){const i=Math.max(e-Ck,0);return s2(t-n(i),e-i)}const kv=.001,Pk=.01,$w=10,Rk=.05,Lk=1;function Ik({duration:n=800,bounce:e=.25,velocity:t=0,mass:i=1}){let r,s;$O(n<=Uo($w));let o=1-e;o=Fo(Rk,Lk,o),n=Fo(Pk,$w,Us(n)),o<1?(r=f=>{const h=f*o,d=h*n,p=h-t,m=Ox(f,o),y=Math.exp(-d);return kv-p/m*y},s=f=>{const d=f*o*n,p=d*t+t,m=Math.pow(o,2)*Math.pow(f,2)*n,y=Math.exp(-d),_=Ox(Math.pow(f,2),o);return(-r(f)+kv>0?-1:1)*((p-m)*y)/_}):(r=f=>{const h=Math.exp(-f*n),d=(f-t)*n+1;return-kv+h*d},s=f=>{const h=Math.exp(-f*n),d=(t-f)*(n*n);return h*d});const a=5/n,c=Nk(r,s,a);if(n=Uo(n),isNaN(c))return{stiffness:100,damping:10,duration:n};{const f=Math.pow(c,2)*i;return{stiffness:f,damping:o*2*Math.sqrt(i*f),duration:n}}}const Dk=12;function Nk(n,e,t){let i=t;for(let r=1;rn[t]!==void 0)}function kk(n){let e={velocity:0,stiffness:100,damping:10,mass:1,isResolvedFromDuration:!1,...n};if(!eE(n,Ok)&&eE(n,Uk)){const t=Ik(n);e={...e,...t,mass:1},e.isResolvedFromDuration=!0}return e}function a2({keyframes:n,restDelta:e,restSpeed:t,...i}){const r=n[0],s=n[n.length-1],o={done:!1,value:r},{stiffness:a,damping:c,mass:f,duration:h,velocity:d,isResolvedFromDuration:p}=kk({...i,velocity:-Us(i.velocity||0)}),m=d||0,y=c/(2*Math.sqrt(a*f)),_=s-r,x=Us(Math.sqrt(a/f)),g=Math.abs(_)<5;t||(t=g?.01:2),e||(e=g?.005:.5);let S;if(y<1){const A=Ox(x,y);S=E=>{const R=Math.exp(-y*x*E);return s-R*((m+y*x*_)/A*Math.sin(A*E)+_*Math.cos(A*E))}}else if(y===1)S=A=>s-Math.exp(-x*A)*(_+(m+x*_)*A);else{const A=x*Math.sqrt(y*y-1);S=E=>{const R=Math.exp(-y*x*E),C=Math.min(A*E,300);return s-R*((m+y*x*_)*Math.sinh(C)+A*_*Math.cosh(C))/A}}return{calculatedDuration:p&&h||null,next:A=>{const E=S(A);if(p)o.done=A>=h;else{let R=m;A!==0&&(y<1?R=o2(S,A,E):R=0);const C=Math.abs(R)<=t,L=Math.abs(s-E)<=e;o.done=C&&L}return o.value=o.done?s:E,o}}}function tE({keyframes:n,velocity:e=0,power:t=.8,timeConstant:i=325,bounceDamping:r=10,bounceStiffness:s=500,modifyTarget:o,min:a,max:c,restDelta:f=.5,restSpeed:h}){const d=n[0],p={done:!1,value:d},m=I=>a!==void 0&&Ic,y=I=>a===void 0?c:c===void 0||Math.abs(a-I)-_*Math.exp(-I/i),A=I=>g+S(I),E=I=>{const P=S(I),b=A(I);p.done=Math.abs(P)<=f,p.value=p.done?g:b};let R,C;const L=I=>{m(p.value)&&(R=I,C=a2({keyframes:[p.value,y(p.value)],velocity:o2(A,I,p.value),damping:r,stiffness:s,restDelta:f,restSpeed:h}))};return L(0),{calculatedDuration:null,next:I=>{let P=!1;return!C&&R===void 0&&(P=!0,E(I),L(I)),R!==void 0&&I>R?C.next(I-R):(!P&&E(I),p)}}}const Fk=n=>{const e=({timestamp:t})=>n(t);return{start:()=>Kt.update(e,!0),stop:()=>Gs(e),now:()=>si.isProcessing?si.timestamp:performance.now()}},nE=2e4;function iE(n){let e=0;const t=50;let i=n.next(e);for(;!i.done&&e=nE?1/0:e}const Bk={decay:tE,inertia:tE,tween:Om,keyframes:Om,spring:a2};function km({autoplay:n=!0,delay:e=0,driver:t=Fk,keyframes:i,type:r="keyframes",repeat:s=0,repeatDelay:o=0,repeatType:a="loop",onPlay:c,onStop:f,onComplete:h,onUpdate:d,...p}){let m=1,y=!1,_,x;const g=()=>{x=new Promise($=>{_=$})};g();let S;const A=Bk[r]||Om;let E;A!==Om&&typeof i[0]!="number"&&(E=r2([0,100],i,{clamp:!1}),i=[0,100]);const R=A({...p,keyframes:i});let C;a==="mirror"&&(C=A({...p,keyframes:[...i].reverse(),velocity:-(p.velocity||0)}));let L="idle",I=null,P=null,b=null;R.calculatedDuration===null&&s&&(R.calculatedDuration=iE(R));const{calculatedDuration:N}=R;let j=1/0,X=1/0;N!==null&&(j=N+o,X=j*(s+1)-o);let te=0;const ne=$=>{if(P===null)return;m>0&&(P=Math.min(P,$)),m<0&&(P=Math.min($-X/m,P)),I!==null?te=I:te=Math.round($-P)*m;const _e=te-e*(m>=0?1:-1),Ne=m>=0?_e<0:_e>X;te=Math.max(_e,0),L==="finished"&&I===null&&(te=X);let oe=te,ve=R;if(s){const it=Math.min(te,X)/j;let Xe=Math.floor(it),z=it%1;!z&&it>=1&&(z=1),z===1&&Xe--,Xe=Math.min(Xe,s+1),!!(Xe%2)&&(a==="reverse"?(z=1-z,o&&(z-=o/j)):a==="mirror"&&(ve=C)),oe=Fo(0,1,z)*j}const Te=Ne?{done:!1,value:i[0]}:ve.next(oe);E&&(Te.value=E(Te.value));let{done:Me}=Te;!Ne&&N!==null&&(Me=m>=0?te>=X:te<=0);const nt=I===null&&(L==="finished"||L==="running"&&Me);return d&&d(Te.value),nt&&k(),Te},Q=()=>{S&&S.stop(),S=void 0},le=()=>{L="idle",Q(),_(),g(),P=b=null},k=()=>{L="finished",h&&h(),Q(),_()},q=()=>{if(y)return;S||(S=t(ne));const $=S.now();c&&c(),I!==null?P=$-I:(!P||L==="finished")&&(P=$),L==="finished"&&g(),b=P,I=null,L="running",S.start()};n&&q();const J={then($,_e){return x.then($,_e)},get time(){return Us(te)},set time($){$=Uo($),te=$,I!==null||!S||m===0?I=$:P=S.now()-$/m},get duration(){const $=R.calculatedDuration===null?iE(R):R.calculatedDuration;return Us($)},get speed(){return m},set speed($){$===m||!S||(m=$,J.time=Us(te))},get state(){return L},play:q,pause:()=>{L="paused",I=te},stop:()=>{y=!0,L!=="idle"&&(L="idle",f&&f(),le())},cancel:()=>{b!==null&&ne(b),le()},complete:()=>{L="finished"},sample:$=>(P=0,ne($))};return J}function zk(n){let e;return()=>(e===void 0&&(e=n()),e)}const Vk=zk(()=>Object.hasOwnProperty.call(Element.prototype,"animate")),Hk=new Set(["opacity","clipPath","filter","transform","backgroundColor"]),Vd=10,Gk=2e4,Wk=(n,e)=>e.type==="spring"||n==="backgroundColor"||!FR(e.ease);function jk(n,e,{onUpdate:t,onComplete:i,...r}){if(!(Vk()&&Hk.has(e)&&!r.repeatDelay&&r.repeatType!=="mirror"&&r.damping!==0&&r.type!=="inertia"))return!1;let o=!1,a,c,f=!1;const h=()=>{c=new Promise(A=>{a=A})};h();let{keyframes:d,duration:p=300,ease:m,times:y}=r;if(Wk(e,r)){const A=km({...r,repeat:0,delay:0});let E={done:!1,value:d[0]};const R=[];let C=0;for(;!E.done&&C{f=!1,_.cancel()},g=()=>{f=!0,Kt.update(x),a(),h()};return _.onfinish=()=>{f||(n.set(nk(d,r)),i&&i(),g())},{then(A,E){return c.then(A,E)},attachTimeline(A){return _.timeline=A,_.onfinish=null,yn},get time(){return Us(_.currentTime||0)},set time(A){_.currentTime=Uo(A)},get speed(){return _.playbackRate},set speed(A){_.playbackRate=A},get duration(){return Us(p)},play:()=>{o||(_.play(),Gs(x))},pause:()=>_.pause(),stop:()=>{if(o=!0,_.playState==="idle")return;const{currentTime:A}=_;if(A){const E=km({...r,autoplay:!1});n.setWithVelocity(E.sample(A-Vd).value,E.sample(A).value,Vd)}g()},complete:()=>{f||_.finish()},cancel:g}}function Xk({keyframes:n,delay:e,onUpdate:t,onComplete:i}){const r=()=>(t&&t(n[n.length-1]),i&&i(),{time:0,speed:1,duration:0,play:yn,pause:yn,stop:yn,then:s=>(s(),Promise.resolve()),cancel:yn,complete:yn});return e?km({keyframes:[0,1],duration:0,delay:e,onComplete:r}):r()}const Yk={type:"spring",stiffness:500,damping:25,restSpeed:10},qk=n=>({type:"spring",stiffness:550,damping:n===0?2*Math.sqrt(550):30,restSpeed:10}),Zk={type:"keyframes",duration:.8},Kk={type:"keyframes",ease:[.25,.1,.35,1],duration:.3},Jk=(n,{keyframes:e})=>e.length>2?Zk:il.has(n)?n.startsWith("scale")?qk(e[1]):Yk:Kk,kx=(n,e)=>n==="zIndex"?!1:!!(typeof e=="number"||Array.isArray(e)||typeof e=="string"&&(Bo.test(e)||e==="0")&&!e.startsWith("url(")),Qk=new Set(["brightness","contrast","saturate","opacity"]);function $k(n){const[e,t]=n.slice(0,-1).split("(");if(e==="drop-shadow")return n;const[i]=t.match(vg)||[];if(!i)return n;const r=t.replace(i,"");let s=Qk.has(e)?1:0;return i!==t&&(s*=100),e+"("+s+r+")"}const eF=/([a-z-]*)\(.*?\)/g,Fx={...Bo,getAnimatableNone:n=>{const e=n.match(eF);return e?e.map($k).join(" "):n}},tF={...SR,color:gi,backgroundColor:gi,outlineColor:gi,fill:gi,stroke:gi,borderColor:gi,borderTopColor:gi,borderRightColor:gi,borderBottomColor:gi,borderLeftColor:gi,filter:Fx,WebkitFilter:Fx},$S=n=>tF[n];function l2(n,e){let t=$S(n);return t!==Fx&&(t=Bo),t.getAnimatableNone?t.getAnimatableNone(e):void 0}const c2=n=>/^0[^.\s]+$/.test(n);function nF(n){if(typeof n=="number")return n===0;if(n!==null)return n==="none"||n==="0"||c2(n)}function iF(n,e,t,i){const r=kx(e,t);let s;Array.isArray(t)?s=[...t]:s=[null,t];const o=i.from!==void 0?i.from:n.get();let a;const c=[];for(let f=0;fr=>{const s=e1(i,n)||{},o=s.delay||i.delay||0;let{elapsed:a=0}=i;a=a-Uo(o);const c=iF(e,n,t,s),f=c[0],h=c[c.length-1],d=kx(n,f),p=kx(n,h);let m={keyframes:c,velocity:e.getVelocity(),ease:"easeOut",...s,delay:-a,onUpdate:y=>{e.set(y),s.onUpdate&&s.onUpdate(y)},onComplete:()=>{r(),s.onComplete&&s.onComplete()}};if(rF(s)||(m={...m,...Jk(n,m)}),m.duration&&(m.duration=Uo(m.duration)),m.repeatDelay&&(m.repeatDelay=Uo(m.repeatDelay)),!d||!p||ek.current||s.type===!1||sF.skipAnimations)return Xk(m);if(!i.isHandoff&&e.owner&&e.owner.current instanceof HTMLElement&&!e.owner.getProps().onUpdate){const y=jk(e,n,m);if(y)return y}return km(m)};function Fm(n){return!!(ki(n)&&n.add)}const u2=n=>/^\-?\d*\.?\d+$/.test(n);function n1(n,e){n.indexOf(e)===-1&&n.push(e)}function i1(n,e){const t=n.indexOf(e);t>-1&&n.splice(t,1)}class r1{constructor(){this.subscriptions=[]}add(e){return n1(this.subscriptions,e),()=>i1(this.subscriptions,e)}notify(e,t,i){const r=this.subscriptions.length;if(r)if(r===1)this.subscriptions[0](e,t,i);else for(let s=0;s!isNaN(parseFloat(n));class aF{constructor(e,t={}){this.version="10.18.0",this.timeDelta=0,this.lastUpdated=0,this.canTrackVelocity=!1,this.events={},this.updateAndNotify=(i,r=!0)=>{this.prev=this.current,this.current=i;const{delta:s,timestamp:o}=si;this.lastUpdated!==o&&(this.timeDelta=s,this.lastUpdated=o,Kt.postRender(this.scheduleVelocityCheck)),this.prev!==this.current&&this.events.change&&this.events.change.notify(this.current),this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()),r&&this.events.renderRequest&&this.events.renderRequest.notify(this.current)},this.scheduleVelocityCheck=()=>Kt.postRender(this.velocityCheck),this.velocityCheck=({timestamp:i})=>{i!==this.lastUpdated&&(this.prev=this.current,this.events.velocityChange&&this.events.velocityChange.notify(this.getVelocity()))},this.hasAnimated=!1,this.prev=this.current=e,this.canTrackVelocity=oF(this.current),this.owner=t.owner}onChange(e){return this.on("change",e)}on(e,t){this.events[e]||(this.events[e]=new r1);const i=this.events[e].add(t);return e==="change"?()=>{i(),Kt.read(()=>{this.events.change.getSize()||this.stop()})}:i}clearListeners(){for(const e in this.events)this.events[e].clear()}attach(e,t){this.passiveEffect=e,this.stopPassiveEffect=t}set(e,t=!0){!t||!this.passiveEffect?this.updateAndNotify(e,t):this.passiveEffect(e,this.updateAndNotify)}setWithVelocity(e,t,i){this.set(t),this.prev=e,this.timeDelta=i}jump(e){this.updateAndNotify(e),this.prev=e,this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}get(){return this.current}getPrevious(){return this.prev}getVelocity(){return this.canTrackVelocity?s2(parseFloat(this.current)-parseFloat(this.prev),this.timeDelta):0}start(e){return this.stop(),new Promise(t=>{this.hasAnimated=!0,this.animation=e(t),this.events.animationStart&&this.events.animationStart.notify()}).then(()=>{this.events.animationComplete&&this.events.animationComplete.notify(),this.clearAnimation()})}stop(){this.animation&&(this.animation.stop(),this.events.animationCancel&&this.events.animationCancel.notify()),this.clearAnimation()}isAnimating(){return!!this.animation}clearAnimation(){delete this.animation}destroy(){this.clearListeners(),this.stop(),this.stopPassiveEffect&&this.stopPassiveEffect()}}function Dc(n,e){return new aF(n,e)}const f2=n=>e=>e.test(n),lF={test:n=>n==="auto",parse:n=>n},h2=[rl,ht,ss,vo,mO,pO,lF],Su=n=>h2.find(f2(n)),cF=[...h2,gi,Bo],uF=n=>cF.find(f2(n));function fF(n,e,t){n.hasValue(e)?n.getValue(e).set(t):n.addValue(e,Dc(t))}function hF(n,e){const t=xg(n,e);let{transitionEnd:i={},transition:r={},...s}=t?n.makeTargetAnimatable(t,!1):{};s={...s,...i};for(const o in s){const a=PO(s[o]);fF(n,o,a)}}function dF(n,e,t){var i,r;const s=Object.keys(e).filter(a=>!n.hasValue(a)),o=s.length;if(o)for(let a=0;ac.remove(d))),f.push(x)}return o&&Promise.all(f).then(()=>{o&&hF(n,o)}),f}function Bx(n,e,t={}){const i=xg(n,e,t.custom);let{transition:r=n.getDefaultTransition()||{}}=i||{};t.transitionOverride&&(r=t.transitionOverride);const s=i?()=>Promise.all(d2(n,i,t)):()=>Promise.resolve(),o=n.variantChildren&&n.variantChildren.size?(c=0)=>{const{delayChildren:f=0,staggerChildren:h,staggerDirection:d}=r;return yF(n,e,f+c,h,d,t)}:()=>Promise.resolve(),{when:a}=r;if(a){const[c,f]=a==="beforeChildren"?[s,o]:[o,s];return c().then(()=>f())}else return Promise.all([s(),o(t.delay)])}function yF(n,e,t=0,i=0,r=1,s){const o=[],a=(n.variantChildren.size-1)*i,c=r===1?(f=0)=>f*i:(f=0)=>a-f*i;return Array.from(n.variantChildren).sort(xF).forEach((f,h)=>{f.notify("AnimationStart",e),o.push(Bx(f,e,{...s,delay:t+c(h)}).then(()=>f.notify("AnimationComplete",e)))}),Promise.all(o)}function xF(n,e){return n.sortNodePosition(e)}function _F(n,e,t={}){n.notify("AnimationStart",e);let i;if(Array.isArray(e)){const r=e.map(s=>Bx(n,s,t));i=Promise.all(r)}else if(typeof e=="string")i=Bx(n,e,t);else{const r=typeof e=="function"?xg(n,e,t.custom):e;i=Promise.all(d2(n,r,t))}return i.then(()=>n.notify("AnimationComplete",e))}const SF=[...BS].reverse(),AF=BS.length;function MF(n){return e=>Promise.all(e.map(({animation:t,options:i})=>_F(n,t,i)))}function wF(n){let e=MF(n);const t=TF();let i=!0;const r=(c,f)=>{const h=xg(n,f);if(h){const{transition:d,transitionEnd:p,...m}=h;c={...c,...m,...p}}return c};function s(c){e=c(n)}function o(c,f){const h=n.getProps(),d=n.getVariantContext(!0)||{},p=[],m=new Set;let y={},_=1/0;for(let g=0;g_&&R,b=!1;const N=Array.isArray(E)?E:[E];let j=N.reduce(r,{});C===!1&&(j={});const{prevResolvedValues:X={}}=A,te={...X,...j},ne=Q=>{P=!0,m.has(Q)&&(b=!0,m.delete(Q)),A.needsAnimating[Q]=!0};for(const Q in te){const le=j[Q],k=X[Q];if(y.hasOwnProperty(Q))continue;let q=!1;Nm(le)&&Nm(k)?q=!OR(le,k):q=le!==k,q?le!==void 0?ne(Q):m.add(Q):le!==void 0&&m.has(Q)?ne(Q):A.protectedKeys[Q]=!0}A.prevProp=E,A.prevResolvedValues=j,A.isActive&&(y={...y,...j}),i&&n.blockInitialAnimation&&(P=!1),P&&(!L||b)&&p.push(...N.map(Q=>({animation:Q,options:{type:S,...c}})))}if(m.size){const g={};m.forEach(S=>{const A=n.getBaseTarget(S);A!==void 0&&(g[S]=A)}),p.push({animation:g})}let x=!!p.length;return i&&(h.initial===!1||h.initial===h.animate)&&!n.manuallyAnimateOnMount&&(x=!1),i=!1,x?e(p):Promise.resolve()}function a(c,f,h){var d;if(t[c].isActive===f)return Promise.resolve();(d=n.variantChildren)===null||d===void 0||d.forEach(m=>{var y;return(y=m.animationState)===null||y===void 0?void 0:y.setActive(c,f)}),t[c].isActive=f;const p=o(h,c);for(const m in t)t[m].protectedKeys={};return p}return{animateChanges:o,setActive:a,setAnimateFunction:s,getState:()=>t}}function EF(n,e){return typeof e=="string"?e!==n:Array.isArray(e)?!OR(e,n):!1}function oa(n=!1){return{isActive:n,protectedKeys:{},needsAnimating:{},prevResolvedValues:{}}}function TF(){return{animate:oa(!0),whileInView:oa(),whileHover:oa(),whileTap:oa(),whileDrag:oa(),whileFocus:oa(),exit:oa()}}class bF extends jo{constructor(e){super(e),e.animationState||(e.animationState=wF(e))}updateAnimationControlsSubscription(){const{animate:e}=this.node.getProps();this.unmount(),mg(e)&&(this.unmount=e.subscribe(this.node))}mount(){this.updateAnimationControlsSubscription()}update(){const{animate:e}=this.node.getProps(),{animate:t}=this.node.prevProps||{};e!==t&&this.updateAnimationControlsSubscription()}unmount(){}}let CF=0;class PF extends jo{constructor(){super(...arguments),this.id=CF++}update(){if(!this.node.presenceContext)return;const{isPresent:e,onExitComplete:t,custom:i}=this.node.presenceContext,{isPresent:r}=this.node.prevPresenceContext||{};if(!this.node.animationState||e===r)return;const s=this.node.animationState.setActive("exit",!e,{custom:i??this.node.getProps().custom});t&&!e&&s.then(()=>t(this.id))}mount(){const{register:e}=this.node.presenceContext||{};e&&(this.unmount=e(this.id))}unmount(){}}const RF={animation:{Feature:bF},exit:{Feature:PF}},rE=(n,e)=>Math.abs(n-e);function LF(n,e){const t=rE(n.x,e.x),i=rE(n.y,e.y);return Math.sqrt(t**2+i**2)}class p2{constructor(e,t,{transformPagePoint:i,contextWindow:r,dragSnapToOrigin:s=!1}={}){if(this.startEvent=null,this.lastMoveEvent=null,this.lastMoveEventInfo=null,this.handlers={},this.contextWindow=window,this.updatePoint=()=>{if(!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const d=Bv(this.lastMoveEventInfo,this.history),p=this.startEvent!==null,m=LF(d.offset,{x:0,y:0})>=3;if(!p&&!m)return;const{point:y}=d,{timestamp:_}=si;this.history.push({...y,timestamp:_});const{onStart:x,onMove:g}=this.handlers;p||(x&&x(this.lastMoveEvent,d),this.startEvent=this.lastMoveEvent),g&&g(this.lastMoveEvent,d)},this.handlePointerMove=(d,p)=>{this.lastMoveEvent=d,this.lastMoveEventInfo=Fv(p,this.transformPagePoint),Kt.update(this.updatePoint,!0)},this.handlePointerUp=(d,p)=>{this.end();const{onEnd:m,onSessionEnd:y,resumeAnimation:_}=this.handlers;if(this.dragSnapToOrigin&&_&&_(),!(this.lastMoveEvent&&this.lastMoveEventInfo))return;const x=Bv(d.type==="pointercancel"?this.lastMoveEventInfo:Fv(p,this.transformPagePoint),this.history);this.startEvent&&m&&m(d,x),y&&y(d,x)},!LR(e))return;this.dragSnapToOrigin=s,this.handlers=t,this.transformPagePoint=i,this.contextWindow=r||window;const o=yg(e),a=Fv(o,this.transformPagePoint),{point:c}=a,{timestamp:f}=si;this.history=[{...c,timestamp:f}];const{onSessionStart:h}=t;h&&h(e,Bv(a,this.history)),this.removeListeners=No(Ns(this.contextWindow,"pointermove",this.handlePointerMove),Ns(this.contextWindow,"pointerup",this.handlePointerUp),Ns(this.contextWindow,"pointercancel",this.handlePointerUp))}updateHandlers(e){this.handlers=e}end(){this.removeListeners&&this.removeListeners(),Gs(this.updatePoint)}}function Fv(n,e){return e?{point:e(n.point)}:n}function sE(n,e){return{x:n.x-e.x,y:n.y-e.y}}function Bv({point:n},e){return{point:n,delta:sE(n,m2(e)),offset:sE(n,IF(e)),velocity:DF(e,.1)}}function IF(n){return n[0]}function m2(n){return n[n.length-1]}function DF(n,e){if(n.length<2)return{x:0,y:0};let t=n.length-1,i=null;const r=m2(n);for(;t>=0&&(i=n[t],!(r.timestamp-i.timestamp>Uo(e)));)t--;if(!i)return{x:0,y:0};const s=Us(r.timestamp-i.timestamp);if(s===0)return{x:0,y:0};const o={x:(r.x-i.x)/s,y:(r.y-i.y)/s};return o.x===1/0&&(o.x=0),o.y===1/0&&(o.y=0),o}function er(n){return n.max-n.min}function zx(n,e=0,t=.01){return Math.abs(n-e)<=t}function oE(n,e,t,i=.5){n.origin=i,n.originPoint=un(e.min,e.max,n.origin),n.scale=er(t)/er(e),(zx(n.scale,1,1e-4)||isNaN(n.scale))&&(n.scale=1),n.translate=un(t.min,t.max,n.origin)-n.originPoint,(zx(n.translate)||isNaN(n.translate))&&(n.translate=0)}function sf(n,e,t,i){oE(n.x,e.x,t.x,i?i.originX:void 0),oE(n.y,e.y,t.y,i?i.originY:void 0)}function aE(n,e,t){n.min=t.min+e.min,n.max=n.min+er(e)}function NF(n,e,t){aE(n.x,e.x,t.x),aE(n.y,e.y,t.y)}function lE(n,e,t){n.min=e.min-t.min,n.max=n.min+er(e)}function of(n,e,t){lE(n.x,e.x,t.x),lE(n.y,e.y,t.y)}function UF(n,{min:e,max:t},i){return e!==void 0&&nt&&(n=i?un(t,n,i.max):Math.min(n,t)),n}function cE(n,e,t){return{min:e!==void 0?n.min+e:void 0,max:t!==void 0?n.max+t-(n.max-n.min):void 0}}function OF(n,{top:e,left:t,bottom:i,right:r}){return{x:cE(n.x,t,r),y:cE(n.y,e,i)}}function uE(n,e){let t=e.min-n.min,i=e.max-n.max;return e.max-e.mini?t=Lf(e.min,e.max-i,n.min):i>r&&(t=Lf(n.min,n.max-r,e.min)),Fo(0,1,t)}function BF(n,e){const t={};return e.min!==void 0&&(t.min=e.min-n.min),e.max!==void 0&&(t.max=e.max-n.min),t}const Vx=.35;function zF(n=Vx){return n===!1?n=0:n===!0&&(n=Vx),{x:fE(n,"left","right"),y:fE(n,"top","bottom")}}function fE(n,e,t){return{min:hE(n,e),max:hE(n,t)}}function hE(n,e){return typeof n=="number"?n:n[e]||0}const dE=()=>({translate:0,scale:1,origin:0,originPoint:0}),uc=()=>({x:dE(),y:dE()}),pE=()=>({min:0,max:0}),bn=()=>({x:pE(),y:pE()});function dr(n){return[n("x"),n("y")]}function g2({top:n,left:e,right:t,bottom:i}){return{x:{min:e,max:t},y:{min:n,max:i}}}function VF({x:n,y:e}){return{top:e.min,right:n.max,bottom:e.max,left:n.min}}function HF(n,e){if(!e)return n;const t=e({x:n.left,y:n.top}),i=e({x:n.right,y:n.bottom});return{top:t.y,left:t.x,bottom:i.y,right:i.x}}function zv(n){return n===void 0||n===1}function Hx({scale:n,scaleX:e,scaleY:t}){return!zv(n)||!zv(e)||!zv(t)}function Sa(n){return Hx(n)||v2(n)||n.z||n.rotate||n.rotateX||n.rotateY}function v2(n){return mE(n.x)||mE(n.y)}function mE(n){return n&&n!=="0%"}function Bm(n,e,t){const i=n-t,r=e*i;return t+r}function gE(n,e,t,i,r){return r!==void 0&&(n=Bm(n,r,i)),Bm(n,t,i)+e}function Gx(n,e=0,t=1,i,r){n.min=gE(n.min,e,t,i,r),n.max=gE(n.max,e,t,i,r)}function y2(n,{x:e,y:t}){Gx(n.x,e.translate,e.scale,e.originPoint),Gx(n.y,t.translate,t.scale,t.originPoint)}function GF(n,e,t,i=!1){const r=t.length;if(!r)return;e.x=e.y=1;let s,o;for(let a=0;a1.0000000000001||n<.999999999999?n:1}function _o(n,e){n.min=n.min+e,n.max=n.max+e}function yE(n,e,[t,i,r]){const s=e[r]!==void 0?e[r]:.5,o=un(n.min,n.max,s);Gx(n,e[t],e[i],o,e.scale)}const WF=["x","scaleX","originX"],jF=["y","scaleY","originY"];function fc(n,e){yE(n.x,e,WF),yE(n.y,e,jF)}function x2(n,e){return g2(HF(n.getBoundingClientRect(),e))}function XF(n,e,t){const i=x2(n,t),{scroll:r}=e;return r&&(_o(i.x,r.offset.x),_o(i.y,r.offset.y)),i}const _2=({current:n})=>n?n.ownerDocument.defaultView:null,YF=new WeakMap;class qF{constructor(e){this.openGlobalLock=null,this.isDragging=!1,this.currentDirection=null,this.originPoint={x:0,y:0},this.constraints=!1,this.hasMutatedConstraints=!1,this.elastic=bn(),this.visualElement=e}start(e,{snapToCursor:t=!1}={}){const{presenceContext:i}=this.visualElement;if(i&&i.isPresent===!1)return;const r=h=>{const{dragSnapToOrigin:d}=this.getProps();d?this.pauseAnimation():this.stopAnimation(),t&&this.snapToCursor(yg(h,"page").point)},s=(h,d)=>{const{drag:p,dragPropagation:m,onDragStart:y}=this.getProps();if(p&&!m&&(this.openGlobalLock&&this.openGlobalLock(),this.openGlobalLock=DR(p),!this.openGlobalLock))return;this.isDragging=!0,this.currentDirection=null,this.resolveConstraints(),this.visualElement.projection&&(this.visualElement.projection.isAnimationBlocked=!0,this.visualElement.projection.target=void 0),dr(x=>{let g=this.getAxisMotionValue(x).get()||0;if(ss.test(g)){const{projection:S}=this.visualElement;if(S&&S.layout){const A=S.layout.layoutBox[x];A&&(g=er(A)*(parseFloat(g)/100))}}this.originPoint[x]=g}),y&&Kt.update(()=>y(h,d),!1,!0);const{animationState:_}=this.visualElement;_&&_.setActive("whileDrag",!0)},o=(h,d)=>{const{dragPropagation:p,dragDirectionLock:m,onDirectionLock:y,onDrag:_}=this.getProps();if(!p&&!this.openGlobalLock)return;const{offset:x}=d;if(m&&this.currentDirection===null){this.currentDirection=ZF(x),this.currentDirection!==null&&y&&y(this.currentDirection);return}this.updateAxis("x",d.point,x),this.updateAxis("y",d.point,x),this.visualElement.render(),_&&_(h,d)},a=(h,d)=>this.stop(h,d),c=()=>dr(h=>{var d;return this.getAnimationState(h)==="paused"&&((d=this.getAxisMotionValue(h).animation)===null||d===void 0?void 0:d.play())}),{dragSnapToOrigin:f}=this.getProps();this.panSession=new p2(e,{onSessionStart:r,onStart:s,onMove:o,onSessionEnd:a,resumeAnimation:c},{transformPagePoint:this.visualElement.getTransformPagePoint(),dragSnapToOrigin:f,contextWindow:_2(this.visualElement)})}stop(e,t){const i=this.isDragging;if(this.cancel(),!i)return;const{velocity:r}=t;this.startAnimation(r);const{onDragEnd:s}=this.getProps();s&&Kt.update(()=>s(e,t))}cancel(){this.isDragging=!1;const{projection:e,animationState:t}=this.visualElement;e&&(e.isAnimationBlocked=!1),this.panSession&&this.panSession.end(),this.panSession=void 0;const{dragPropagation:i}=this.getProps();!i&&this.openGlobalLock&&(this.openGlobalLock(),this.openGlobalLock=null),t&&t.setActive("whileDrag",!1)}updateAxis(e,t,i){const{drag:r}=this.getProps();if(!i||!Hd(e,r,this.currentDirection))return;const s=this.getAxisMotionValue(e);let o=this.originPoint[e]+i[e];this.constraints&&this.constraints[e]&&(o=UF(o,this.constraints[e],this.elastic[e])),s.set(o)}resolveConstraints(){var e;const{dragConstraints:t,dragElastic:i}=this.getProps(),r=this.visualElement.projection&&!this.visualElement.projection.layout?this.visualElement.projection.measure(!1):(e=this.visualElement.projection)===null||e===void 0?void 0:e.layout,s=this.constraints;t&&lc(t)?this.constraints||(this.constraints=this.resolveRefConstraints()):t&&r?this.constraints=OF(r.layoutBox,t):this.constraints=!1,this.elastic=zF(i),s!==this.constraints&&r&&this.constraints&&!this.hasMutatedConstraints&&dr(o=>{this.getAxisMotionValue(o)&&(this.constraints[o]=BF(r.layoutBox[o],this.constraints[o]))})}resolveRefConstraints(){const{dragConstraints:e,onMeasureDragConstraints:t}=this.getProps();if(!e||!lc(e))return!1;const i=e.current,{projection:r}=this.visualElement;if(!r||!r.layout)return!1;const s=XF(i,r.root,this.visualElement.getTransformPagePoint());let o=kF(r.layout.layoutBox,s);if(t){const a=t(VF(o));this.hasMutatedConstraints=!!a,a&&(o=g2(a))}return o}startAnimation(e){const{drag:t,dragMomentum:i,dragElastic:r,dragTransition:s,dragSnapToOrigin:o,onDragTransitionEnd:a}=this.getProps(),c=this.constraints||{},f=dr(h=>{if(!Hd(h,t,this.currentDirection))return;let d=c&&c[h]||{};o&&(d={min:0,max:0});const p=r?200:1e6,m=r?40:1e7,y={type:"inertia",velocity:i?e[h]:0,bounceStiffness:p,bounceDamping:m,timeConstant:750,restDelta:1,restSpeed:10,...s,...d};return this.startAxisValueAnimation(h,y)});return Promise.all(f).then(a)}startAxisValueAnimation(e,t){const i=this.getAxisMotionValue(e);return i.start(t1(e,i,0,t))}stopAnimation(){dr(e=>this.getAxisMotionValue(e).stop())}pauseAnimation(){dr(e=>{var t;return(t=this.getAxisMotionValue(e).animation)===null||t===void 0?void 0:t.pause()})}getAnimationState(e){var t;return(t=this.getAxisMotionValue(e).animation)===null||t===void 0?void 0:t.state}getAxisMotionValue(e){const t="_drag"+e.toUpperCase(),i=this.visualElement.getProps(),r=i[t];return r||this.visualElement.getValue(e,(i.initial?i.initial[e]:void 0)||0)}snapToCursor(e){dr(t=>{const{drag:i}=this.getProps();if(!Hd(t,i,this.currentDirection))return;const{projection:r}=this.visualElement,s=this.getAxisMotionValue(t);if(r&&r.layout){const{min:o,max:a}=r.layout.layoutBox[t];s.set(e[t]-un(o,a,.5))}})}scalePositionWithinConstraints(){if(!this.visualElement.current)return;const{drag:e,dragConstraints:t}=this.getProps(),{projection:i}=this.visualElement;if(!lc(t)||!i||!this.constraints)return;this.stopAnimation();const r={x:0,y:0};dr(o=>{const a=this.getAxisMotionValue(o);if(a){const c=a.get();r[o]=FF({min:c,max:c},this.constraints[o])}});const{transformTemplate:s}=this.visualElement.getProps();this.visualElement.current.style.transform=s?s({},""):"none",i.root&&i.root.updateScroll(),i.updateLayout(),this.resolveConstraints(),dr(o=>{if(!Hd(o,e,null))return;const a=this.getAxisMotionValue(o),{min:c,max:f}=this.constraints[o];a.set(un(c,f,r[o]))})}addListeners(){if(!this.visualElement.current)return;YF.set(this.visualElement,this);const e=this.visualElement.current,t=Ns(e,"pointerdown",c=>{const{drag:f,dragListener:h=!0}=this.getProps();f&&h&&this.start(c)}),i=()=>{const{dragConstraints:c}=this.getProps();lc(c)&&(this.constraints=this.resolveRefConstraints())},{projection:r}=this.visualElement,s=r.addEventListener("measure",i);r&&!r.layout&&(r.root&&r.root.updateScroll(),r.updateLayout()),i();const o=Ls(window,"resize",()=>this.scalePositionWithinConstraints()),a=r.addEventListener("didUpdate",({delta:c,hasLayoutChanged:f})=>{this.isDragging&&f&&(dr(h=>{const d=this.getAxisMotionValue(h);d&&(this.originPoint[h]+=c[h].translate,d.set(d.get()+c[h].translate))}),this.visualElement.render())});return()=>{o(),t(),s(),a&&a()}}getProps(){const e=this.visualElement.getProps(),{drag:t=!1,dragDirectionLock:i=!1,dragPropagation:r=!1,dragConstraints:s=!1,dragElastic:o=Vx,dragMomentum:a=!0}=e;return{...e,drag:t,dragDirectionLock:i,dragPropagation:r,dragConstraints:s,dragElastic:o,dragMomentum:a}}}function Hd(n,e,t){return(e===!0||e===n)&&(t===null||t===n)}function ZF(n,e=10){let t=null;return Math.abs(n.y)>e?t="y":Math.abs(n.x)>e&&(t="x"),t}class KF extends jo{constructor(e){super(e),this.removeGroupControls=yn,this.removeListeners=yn,this.controls=new qF(e)}mount(){const{dragControls:e}=this.node.getProps();e&&(this.removeGroupControls=e.subscribe(this.controls)),this.removeListeners=this.controls.addListeners()||yn}unmount(){this.removeGroupControls(),this.removeListeners()}}const xE=n=>(e,t)=>{n&&Kt.update(()=>n(e,t))};class JF extends jo{constructor(){super(...arguments),this.removePointerDownListener=yn}onPointerDown(e){this.session=new p2(e,this.createPanHandlers(),{transformPagePoint:this.node.getTransformPagePoint(),contextWindow:_2(this.node)})}createPanHandlers(){const{onPanSessionStart:e,onPanStart:t,onPan:i,onPanEnd:r}=this.node.getProps();return{onSessionStart:xE(e),onStart:xE(t),onMove:i,onEnd:(s,o)=>{delete this.session,r&&Kt.update(()=>r(s,o))}}}mount(){this.removePointerDownListener=Ns(this.node.current,"pointerdown",e=>this.onPointerDown(e))}update(){this.session&&this.session.updateHandlers(this.createPanHandlers())}unmount(){this.removePointerDownListener(),this.session&&this.session.end()}}function QF(){const n=G.useContext(dg);if(n===null)return[!0,null];const{isPresent:e,onExitComplete:t,register:i}=n,r=G.useId();return G.useEffect(()=>i(r),[]),!e&&t?[!1,()=>t&&t(r)]:[!0]}const $p={hasAnimatedSinceResize:!0,hasEverUpdated:!1};function _E(n,e){return e.max===e.min?0:n/(e.max-e.min)*100}const Au={correct:(n,e)=>{if(!e.target)return n;if(typeof n=="string")if(ht.test(n))n=parseFloat(n);else return n;const t=_E(n,e.target.x),i=_E(n,e.target.y);return`${t}% ${i}%`}},$F={correct:(n,{treeScale:e,projectionDelta:t})=>{const i=n,r=Bo.parse(n);if(r.length>5)return i;const s=Bo.createTransformer(n),o=typeof r[0]!="number"?1:0,a=t.x.scale*e.x,c=t.y.scale*e.y;r[0+o]/=a,r[1+o]/=c;const f=un(a,c,.5);return typeof r[2+o]=="number"&&(r[2+o]/=f),typeof r[3+o]=="number"&&(r[3+o]/=f),s(r)}};class eB extends Km.Component{componentDidMount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i,layoutId:r}=this.props,{projection:s}=e;aO(tB),s&&(t.group&&t.group.add(s),i&&i.register&&r&&i.register(s),s.root.didUpdate(),s.addEventListener("animationComplete",()=>{this.safeToRemove()}),s.setOptions({...s.options,onExitComplete:()=>this.safeToRemove()})),$p.hasEverUpdated=!0}getSnapshotBeforeUpdate(e){const{layoutDependency:t,visualElement:i,drag:r,isPresent:s}=this.props,o=i.projection;return o&&(o.isPresent=s,r||e.layoutDependency!==t||t===void 0?o.willUpdate():this.safeToRemove(),e.isPresent!==s&&(s?o.promote():o.relegate()||Kt.postRender(()=>{const a=o.getStack();(!a||!a.members.length)&&this.safeToRemove()}))),null}componentDidUpdate(){const{projection:e}=this.props.visualElement;e&&(e.root.didUpdate(),queueMicrotask(()=>{!e.currentAnimation&&e.isLead()&&this.safeToRemove()}))}componentWillUnmount(){const{visualElement:e,layoutGroup:t,switchLayoutGroup:i}=this.props,{projection:r}=e;r&&(r.scheduleCheckAfterUnmount(),t&&t.group&&t.group.remove(r),i&&i.deregister&&i.deregister(r))}safeToRemove(){const{safeToRemove:e}=this.props;e&&e()}render(){return null}}function S2(n){const[e,t]=QF(),i=G.useContext(VS);return Km.createElement(eB,{...n,layoutGroup:i,switchLayoutGroup:G.useContext(gR),isPresent:e,safeToRemove:t})}const tB={borderRadius:{...Au,applyTo:["borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius"]},borderTopLeftRadius:Au,borderTopRightRadius:Au,borderBottomLeftRadius:Au,borderBottomRightRadius:Au,boxShadow:$F},A2=["TopLeft","TopRight","BottomLeft","BottomRight"],nB=A2.length,SE=n=>typeof n=="string"?parseFloat(n):n,AE=n=>typeof n=="number"||ht.test(n);function iB(n,e,t,i,r,s){r?(n.opacity=un(0,t.opacity!==void 0?t.opacity:1,rB(i)),n.opacityExit=un(e.opacity!==void 0?e.opacity:1,0,sB(i))):s&&(n.opacity=un(e.opacity!==void 0?e.opacity:1,t.opacity!==void 0?t.opacity:1,i));for(let o=0;oie?1:t(Lf(n,e,i))}function wE(n,e){n.min=e.min,n.max=e.max}function fr(n,e){wE(n.x,e.x),wE(n.y,e.y)}function EE(n,e,t,i,r){return n-=e,n=Bm(n,1/t,i),r!==void 0&&(n=Bm(n,1/r,i)),n}function oB(n,e=0,t=1,i=.5,r,s=n,o=n){if(ss.test(e)&&(e=parseFloat(e),e=un(o.min,o.max,e/100)-o.min),typeof e!="number")return;let a=un(s.min,s.max,i);n===s&&(a-=e),n.min=EE(n.min,e,t,a,r),n.max=EE(n.max,e,t,a,r)}function TE(n,e,[t,i,r],s,o){oB(n,e[t],e[i],e[r],e.scale,s,o)}const aB=["x","scaleX","originX"],lB=["y","scaleY","originY"];function bE(n,e,t,i){TE(n.x,e,aB,t?t.x:void 0,i?i.x:void 0),TE(n.y,e,lB,t?t.y:void 0,i?i.y:void 0)}function CE(n){return n.translate===0&&n.scale===1}function w2(n){return CE(n.x)&&CE(n.y)}function cB(n,e){return n.x.min===e.x.min&&n.x.max===e.x.max&&n.y.min===e.y.min&&n.y.max===e.y.max}function E2(n,e){return Math.round(n.x.min)===Math.round(e.x.min)&&Math.round(n.x.max)===Math.round(e.x.max)&&Math.round(n.y.min)===Math.round(e.y.min)&&Math.round(n.y.max)===Math.round(e.y.max)}function PE(n){return er(n.x)/er(n.y)}class uB{constructor(){this.members=[]}add(e){n1(this.members,e),e.scheduleRender()}remove(e){if(i1(this.members,e),e===this.prevLead&&(this.prevLead=void 0),e===this.lead){const t=this.members[this.members.length-1];t&&this.promote(t)}}relegate(e){const t=this.members.findIndex(r=>e===r);if(t===0)return!1;let i;for(let r=t;r>=0;r--){const s=this.members[r];if(s.isPresent!==!1){i=s;break}}return i?(this.promote(i),!0):!1}promote(e,t){const i=this.lead;if(e!==i&&(this.prevLead=i,this.lead=e,e.show(),i)){i.instance&&i.scheduleRender(),e.scheduleRender(),e.resumeFrom=i,t&&(e.resumeFrom.preserveOpacity=!0),i.snapshot&&(e.snapshot=i.snapshot,e.snapshot.latestValues=i.animationValues||i.latestValues),e.root&&e.root.isUpdating&&(e.isLayoutDirty=!0);const{crossfade:r}=e.options;r===!1&&i.hide()}}exitAnimationComplete(){this.members.forEach(e=>{const{options:t,resumingFrom:i}=e;t.onExitComplete&&t.onExitComplete(),i&&i.options.onExitComplete&&i.options.onExitComplete()})}scheduleRender(){this.members.forEach(e=>{e.instance&&e.scheduleRender(!1)})}removeLeadSnapshot(){this.lead&&this.lead.snapshot&&(this.lead.snapshot=void 0)}}function RE(n,e,t){let i="";const r=n.x.translate/e.x,s=n.y.translate/e.y;if((r||s)&&(i=`translate3d(${r}px, ${s}px, 0) `),(e.x!==1||e.y!==1)&&(i+=`scale(${1/e.x}, ${1/e.y}) `),t){const{rotate:c,rotateX:f,rotateY:h}=t;c&&(i+=`rotate(${c}deg) `),f&&(i+=`rotateX(${f}deg) `),h&&(i+=`rotateY(${h}deg) `)}const o=n.x.scale*e.x,a=n.y.scale*e.y;return(o!==1||a!==1)&&(i+=`scale(${o}, ${a})`),i||"none"}const fB=(n,e)=>n.depth-e.depth;class hB{constructor(){this.children=[],this.isDirty=!1}add(e){n1(this.children,e),this.isDirty=!0}remove(e){i1(this.children,e),this.isDirty=!0}forEach(e){this.isDirty&&this.children.sort(fB),this.isDirty=!1,this.children.forEach(e)}}function dB(n,e){const t=performance.now(),i=({timestamp:r})=>{const s=r-t;s>=e&&(Gs(i),n(s-e))};return Kt.read(i,!0),()=>Gs(i)}function pB(n){window.MotionDebug&&window.MotionDebug.record(n)}function mB(n){return n instanceof SVGElement&&n.tagName!=="svg"}function gB(n,e,t){const i=ki(n)?n:Dc(n);return i.start(t1("",i,e,t)),i.animation}const LE=["","X","Y","Z"],vB={visibility:"hidden"},IE=1e3;let yB=0;const Aa={type:"projectionFrame",totalNodes:0,resolvedTargetDeltas:0,recalculatedProjection:0};function T2({attachResizeListener:n,defaultParent:e,measureScroll:t,checkIsScrollRoot:i,resetTransform:r}){return class{constructor(o={},a=e==null?void 0:e()){this.id=yB++,this.animationId=0,this.children=new Set,this.options={},this.isTreeAnimating=!1,this.isAnimationBlocked=!1,this.isLayoutDirty=!1,this.isProjectionDirty=!1,this.isSharedProjectionDirty=!1,this.isTransformDirty=!1,this.updateManuallyBlocked=!1,this.updateBlockedByResize=!1,this.isUpdating=!1,this.isSVG=!1,this.needsReset=!1,this.shouldResetTransform=!1,this.treeScale={x:1,y:1},this.eventHandlers=new Map,this.hasTreeAnimated=!1,this.updateScheduled=!1,this.projectionUpdateScheduled=!1,this.checkUpdateFailed=()=>{this.isUpdating&&(this.isUpdating=!1,this.clearAllSnapshots())},this.updateProjection=()=>{this.projectionUpdateScheduled=!1,Aa.totalNodes=Aa.resolvedTargetDeltas=Aa.recalculatedProjection=0,this.nodes.forEach(SB),this.nodes.forEach(TB),this.nodes.forEach(bB),this.nodes.forEach(AB),pB(Aa)},this.hasProjected=!1,this.isVisible=!0,this.animationProgress=0,this.sharedNodes=new Map,this.latestValues=o,this.root=a?a.root||a:this,this.path=a?[...a.path,a]:[],this.parent=a,this.depth=a?a.depth+1:0;for(let c=0;cthis.root.updateBlockedByResize=!1;n(o,()=>{this.root.updateBlockedByResize=!0,d&&d(),d=dB(p,250),$p.hasAnimatedSinceResize&&($p.hasAnimatedSinceResize=!1,this.nodes.forEach(NE))})}c&&this.root.registerSharedNode(c,this),this.options.animate!==!1&&h&&(c||f)&&this.addEventListener("didUpdate",({delta:d,hasLayoutChanged:p,hasRelativeTargetChanged:m,layout:y})=>{if(this.isTreeAnimationBlocked()){this.target=void 0,this.relativeTarget=void 0;return}const _=this.options.transition||h.getDefaultTransition()||IB,{onLayoutAnimationStart:x,onLayoutAnimationComplete:g}=h.getProps(),S=!this.targetLayout||!E2(this.targetLayout,y)||m,A=!p&&m;if(this.options.layoutRoot||this.resumeFrom&&this.resumeFrom.instance||A||p&&(S||!this.currentAnimation)){this.resumeFrom&&(this.resumingFrom=this.resumeFrom,this.resumingFrom.resumingFrom=void 0),this.setAnimationOrigin(d,A);const E={...e1(_,"layout"),onPlay:x,onComplete:g};(h.shouldReduceMotion||this.options.layoutRoot)&&(E.delay=0,E.type=!1),this.startAnimation(E)}else p||NE(this),this.isLead()&&this.options.onExitComplete&&this.options.onExitComplete();this.targetLayout=y})}unmount(){this.options.layoutId&&this.willUpdate(),this.root.nodes.remove(this);const o=this.getStack();o&&o.remove(this),this.parent&&this.parent.children.delete(this),this.instance=void 0,Gs(this.updateProjection)}blockUpdate(){this.updateManuallyBlocked=!0}unblockUpdate(){this.updateManuallyBlocked=!1}isUpdateBlocked(){return this.updateManuallyBlocked||this.updateBlockedByResize}isTreeAnimationBlocked(){return this.isAnimationBlocked||this.parent&&this.parent.isTreeAnimationBlocked()||!1}startUpdate(){this.isUpdateBlocked()||(this.isUpdating=!0,this.nodes&&this.nodes.forEach(CB),this.animationId++)}getTransformTemplate(){const{visualElement:o}=this.options;return o&&o.getProps().transformTemplate}willUpdate(o=!0){if(this.root.hasTreeAnimated=!0,this.root.isUpdateBlocked()){this.options.onExitComplete&&this.options.onExitComplete();return}if(!this.root.isUpdating&&this.root.startUpdate(),this.isLayoutDirty)return;this.isLayoutDirty=!0;for(let h=0;hthis.update()))}clearAllSnapshots(){this.nodes.forEach(MB),this.sharedNodes.forEach(PB)}scheduleUpdateProjection(){this.projectionUpdateScheduled||(this.projectionUpdateScheduled=!0,Kt.preRender(this.updateProjection,!1,!0))}scheduleCheckAfterUnmount(){Kt.postRender(()=>{this.isLayoutDirty?this.root.didUpdate():this.root.checkUpdateFailed()})}updateSnapshot(){this.snapshot||!this.instance||(this.snapshot=this.measure())}updateLayout(){if(!this.instance||(this.updateScroll(),!(this.options.alwaysMeasureLayout&&this.isLead())&&!this.isLayoutDirty))return;if(this.resumeFrom&&!this.resumeFrom.instance)for(let c=0;c{const R=E/1e3;UE(d.x,o.x,R),UE(d.y,o.y,R),this.setTargetDelta(d),this.relativeTarget&&this.relativeTargetOrigin&&this.layout&&this.relativeParent&&this.relativeParent.layout&&(of(p,this.layout.layoutBox,this.relativeParent.layout.layoutBox),RB(this.relativeTarget,this.relativeTargetOrigin,p,R),A&&cB(this.relativeTarget,A)&&(this.isProjectionDirty=!1),A||(A=bn()),fr(A,this.relativeTarget)),_&&(this.animationValues=h,iB(h,f,this.latestValues,R,S,g)),this.root.scheduleUpdateProjection(),this.scheduleRender(),this.animationProgress=R},this.mixTargetDelta(this.options.layoutRoot?1e3:0)}startAnimation(o){this.notifyListeners("animationStart"),this.currentAnimation&&this.currentAnimation.stop(),this.resumingFrom&&this.resumingFrom.currentAnimation&&this.resumingFrom.currentAnimation.stop(),this.pendingAnimation&&(Gs(this.pendingAnimation),this.pendingAnimation=void 0),this.pendingAnimation=Kt.update(()=>{$p.hasAnimatedSinceResize=!0,this.currentAnimation=gB(0,IE,{...o,onUpdate:a=>{this.mixTargetDelta(a),o.onUpdate&&o.onUpdate(a)},onComplete:()=>{o.onComplete&&o.onComplete(),this.completeAnimation()}}),this.resumingFrom&&(this.resumingFrom.currentAnimation=this.currentAnimation),this.pendingAnimation=void 0})}completeAnimation(){this.resumingFrom&&(this.resumingFrom.currentAnimation=void 0,this.resumingFrom.preserveOpacity=void 0);const o=this.getStack();o&&o.exitAnimationComplete(),this.resumingFrom=this.currentAnimation=this.animationValues=void 0,this.notifyListeners("animationComplete")}finishAnimation(){this.currentAnimation&&(this.mixTargetDelta&&this.mixTargetDelta(IE),this.currentAnimation.stop()),this.completeAnimation()}applyTransformsToTarget(){const o=this.getLead();let{targetWithTransforms:a,target:c,layout:f,latestValues:h}=o;if(!(!a||!c||!f)){if(this!==o&&this.layout&&f&&b2(this.options.animationType,this.layout.layoutBox,f.layoutBox)){c=this.target||bn();const d=er(this.layout.layoutBox.x);c.x.min=o.target.x.min,c.x.max=c.x.min+d;const p=er(this.layout.layoutBox.y);c.y.min=o.target.y.min,c.y.max=c.y.min+p}fr(a,c),fc(a,h),sf(this.projectionDeltaWithTransform,this.layoutCorrected,a,h)}}registerSharedNode(o,a){this.sharedNodes.has(o)||this.sharedNodes.set(o,new uB),this.sharedNodes.get(o).add(a);const f=a.options.initialPromotionConfig;a.promote({transition:f?f.transition:void 0,preserveFollowOpacity:f&&f.shouldPreserveFollowOpacity?f.shouldPreserveFollowOpacity(a):void 0})}isLead(){const o=this.getStack();return o?o.lead===this:!0}getLead(){var o;const{layoutId:a}=this.options;return a?((o=this.getStack())===null||o===void 0?void 0:o.lead)||this:this}getPrevLead(){var o;const{layoutId:a}=this.options;return a?(o=this.getStack())===null||o===void 0?void 0:o.prevLead:void 0}getStack(){const{layoutId:o}=this.options;if(o)return this.root.sharedNodes.get(o)}promote({needsReset:o,transition:a,preserveFollowOpacity:c}={}){const f=this.getStack();f&&f.promote(this,c),o&&(this.projectionDelta=void 0,this.needsReset=!0),a&&this.setOptions({transition:a})}relegate(){const o=this.getStack();return o?o.relegate(this):!1}resetRotation(){const{visualElement:o}=this.options;if(!o)return;let a=!1;const{latestValues:c}=o;if((c.rotate||c.rotateX||c.rotateY||c.rotateZ)&&(a=!0),!a)return;const f={};for(let h=0;h{var a;return(a=o.currentAnimation)===null||a===void 0?void 0:a.stop()}),this.root.nodes.forEach(DE),this.root.sharedNodes.clear()}}}function xB(n){n.updateLayout()}function _B(n){var e;const t=((e=n.resumeFrom)===null||e===void 0?void 0:e.snapshot)||n.snapshot;if(n.isLead()&&n.layout&&t&&n.hasListeners("didUpdate")){const{layoutBox:i,measuredBox:r}=n.layout,{animationType:s}=n.options,o=t.source!==n.layout.source;s==="size"?dr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=er(p);p.min=i[d].min,p.max=p.min+m}):b2(s,t.layoutBox,i)&&dr(d=>{const p=o?t.measuredBox[d]:t.layoutBox[d],m=er(i[d]);p.max=p.min+m,n.relativeTarget&&!n.currentAnimation&&(n.isProjectionDirty=!0,n.relativeTarget[d].max=n.relativeTarget[d].min+m)});const a=uc();sf(a,i,t.layoutBox);const c=uc();o?sf(c,n.applyTransform(r,!0),t.measuredBox):sf(c,i,t.layoutBox);const f=!w2(a);let h=!1;if(!n.resumeFrom){const d=n.getClosestProjectingParent();if(d&&!d.resumeFrom){const{snapshot:p,layout:m}=d;if(p&&m){const y=bn();of(y,t.layoutBox,p.layoutBox);const _=bn();of(_,i,m.layoutBox),E2(y,_)||(h=!0),d.options.layoutRoot&&(n.relativeTarget=_,n.relativeTargetOrigin=y,n.relativeParent=d)}}}n.notifyListeners("didUpdate",{layout:i,snapshot:t,delta:c,layoutDelta:a,hasLayoutChanged:f,hasRelativeTargetChanged:h})}else if(n.isLead()){const{onExitComplete:i}=n.options;i&&i()}n.options.transition=void 0}function SB(n){Aa.totalNodes++,n.parent&&(n.isProjecting()||(n.isProjectionDirty=n.parent.isProjectionDirty),n.isSharedProjectionDirty||(n.isSharedProjectionDirty=!!(n.isProjectionDirty||n.parent.isProjectionDirty||n.parent.isSharedProjectionDirty)),n.isTransformDirty||(n.isTransformDirty=n.parent.isTransformDirty))}function AB(n){n.isProjectionDirty=n.isSharedProjectionDirty=n.isTransformDirty=!1}function MB(n){n.clearSnapshot()}function DE(n){n.clearMeasurements()}function wB(n){n.isLayoutDirty=!1}function EB(n){const{visualElement:e}=n.options;e&&e.getProps().onBeforeLayoutMeasure&&e.notify("BeforeLayoutMeasure"),n.resetTransform()}function NE(n){n.finishAnimation(),n.targetDelta=n.relativeTarget=n.target=void 0,n.isProjectionDirty=!0}function TB(n){n.resolveTargetDelta()}function bB(n){n.calcProjection()}function CB(n){n.resetRotation()}function PB(n){n.removeLeadSnapshot()}function UE(n,e,t){n.translate=un(e.translate,0,t),n.scale=un(e.scale,1,t),n.origin=e.origin,n.originPoint=e.originPoint}function OE(n,e,t,i){n.min=un(e.min,t.min,i),n.max=un(e.max,t.max,i)}function RB(n,e,t,i){OE(n.x,e.x,t.x,i),OE(n.y,e.y,t.y,i)}function LB(n){return n.animationValues&&n.animationValues.opacityExit!==void 0}const IB={duration:.45,ease:[.4,0,.1,1]},kE=n=>typeof navigator<"u"&&navigator.userAgent.toLowerCase().includes(n),FE=kE("applewebkit/")&&!kE("chrome/")?Math.round:yn;function BE(n){n.min=FE(n.min),n.max=FE(n.max)}function DB(n){BE(n.x),BE(n.y)}function b2(n,e,t){return n==="position"||n==="preserve-aspect"&&!zx(PE(e),PE(t),.2)}const NB=T2({attachResizeListener:(n,e)=>Ls(n,"resize",e),measureScroll:()=>({x:document.documentElement.scrollLeft||document.body.scrollLeft,y:document.documentElement.scrollTop||document.body.scrollTop}),checkIsScrollRoot:()=>!0}),Vv={current:void 0},C2=T2({measureScroll:n=>({x:n.scrollLeft,y:n.scrollTop}),defaultParent:()=>{if(!Vv.current){const n=new NB({});n.mount(window),n.setOptions({layoutScroll:!0}),Vv.current=n}return Vv.current},resetTransform:(n,e)=>{n.style.transform=e!==void 0?e:"none"},checkIsScrollRoot:n=>window.getComputedStyle(n).position==="fixed"}),UB={pan:{Feature:JF},drag:{Feature:KF,ProjectionNode:C2,MeasureLayout:S2}},OB=/var\((--[a-zA-Z0-9-_]+),? ?([a-zA-Z0-9 ()%#.,-]+)?\)/;function kB(n){const e=OB.exec(n);if(!e)return[,];const[,t,i]=e;return[t,i]}function Wx(n,e,t=1){const[i,r]=kB(n);if(!i)return;const s=window.getComputedStyle(e).getPropertyValue(i);if(s){const o=s.trim();return u2(o)?parseFloat(o):o}else return Dx(r)?Wx(r,e,t+1):r}function FB(n,{...e},t){const i=n.current;if(!(i instanceof Element))return{target:e,transitionEnd:t};t&&(t={...t}),n.values.forEach(r=>{const s=r.get();if(!Dx(s))return;const o=Wx(s,i);o&&r.set(o)});for(const r in e){const s=e[r];if(!Dx(s))continue;const o=Wx(s,i);o&&(e[r]=o,t||(t={}),t[r]===void 0&&(t[r]=s))}return{target:e,transitionEnd:t}}const BB=new Set(["width","height","top","left","right","bottom","x","y","translateX","translateY"]),P2=n=>BB.has(n),zB=n=>Object.keys(n).some(P2),zE=n=>n===rl||n===ht,VE=(n,e)=>parseFloat(n.split(", ")[e]),HE=(n,e)=>(t,{transform:i})=>{if(i==="none"||!i)return 0;const r=i.match(/^matrix3d\((.+)\)$/);if(r)return VE(r[1],e);{const s=i.match(/^matrix\((.+)\)$/);return s?VE(s[1],n):0}},VB=new Set(["x","y","z"]),HB=ah.filter(n=>!VB.has(n));function GB(n){const e=[];return HB.forEach(t=>{const i=n.getValue(t);i!==void 0&&(e.push([t,i.get()]),i.set(t.startsWith("scale")?1:0))}),e.length&&n.render(),e}const Nc={width:({x:n},{paddingLeft:e="0",paddingRight:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),height:({y:n},{paddingTop:e="0",paddingBottom:t="0"})=>n.max-n.min-parseFloat(e)-parseFloat(t),top:(n,{top:e})=>parseFloat(e),left:(n,{left:e})=>parseFloat(e),bottom:({y:n},{top:e})=>parseFloat(e)+(n.max-n.min),right:({x:n},{left:e})=>parseFloat(e)+(n.max-n.min),x:HE(4,13),y:HE(5,14)};Nc.translateX=Nc.x;Nc.translateY=Nc.y;const WB=(n,e,t)=>{const i=e.measureViewportBox(),r=e.current,s=getComputedStyle(r),{display:o}=s,a={};o==="none"&&e.setStaticValue("display",n.display||"block"),t.forEach(f=>{a[f]=Nc[f](i,s)}),e.render();const c=e.measureViewportBox();return t.forEach(f=>{const h=e.getValue(f);h&&h.jump(a[f]),n[f]=Nc[f](c,s)}),n},jB=(n,e,t={},i={})=>{e={...e},i={...i};const r=Object.keys(e).filter(P2);let s=[],o=!1;const a=[];if(r.forEach(c=>{const f=n.getValue(c);if(!n.hasValue(c))return;let h=t[c],d=Su(h);const p=e[c];let m;if(Nm(p)){const y=p.length,_=p[0]===null?1:0;h=p[_],d=Su(h);for(let x=_;x=0?window.pageYOffset:null,f=WB(e,n,a);return s.length&&s.forEach(([h,d])=>{n.getValue(h).set(d)}),n.render(),pg&&c!==null&&window.scrollTo({top:c}),{target:f,transitionEnd:i}}else return{target:e,transitionEnd:i}};function XB(n,e,t,i){return zB(e)?jB(n,e,t,i):{target:e,transitionEnd:i}}const YB=(n,e,t,i)=>{const r=FB(n,e,i);return e=r.target,i=r.transitionEnd,XB(n,e,t,i)},jx={current:null},R2={current:!1};function qB(){if(R2.current=!0,!!pg)if(window.matchMedia){const n=window.matchMedia("(prefers-reduced-motion)"),e=()=>jx.current=n.matches;n.addListener(e),e()}else jx.current=!1}function ZB(n,e,t){const{willChange:i}=e;for(const r in e){const s=e[r],o=t[r];if(ki(s))n.addValue(r,s),Fm(i)&&i.add(r);else if(ki(o))n.addValue(r,Dc(s,{owner:n})),Fm(i)&&i.remove(r);else if(o!==s)if(n.hasValue(r)){const a=n.getValue(r);!a.hasAnimated&&a.set(s)}else{const a=n.getStaticValue(r);n.addValue(r,Dc(a!==void 0?a:s,{owner:n}))}}for(const r in t)e[r]===void 0&&n.removeValue(r);return e}const GE=new WeakMap,L2=Object.keys(Rf),KB=L2.length,WE=["AnimationStart","AnimationComplete","Update","BeforeLayoutMeasure","LayoutMeasure","LayoutAnimationStart","LayoutAnimationComplete"],JB=zS.length;class QB{constructor({parent:e,props:t,presenceContext:i,reducedMotionConfig:r,visualState:s},o={}){this.current=null,this.children=new Set,this.isVariantNode=!1,this.isControllingVariants=!1,this.shouldReduceMotion=null,this.values=new Map,this.features={},this.valueSubscriptions=new Map,this.prevMotionValues={},this.events={},this.propEventSubscriptions={},this.notifyUpdate=()=>this.notify("Update",this.latestValues),this.render=()=>{this.current&&(this.triggerBuild(),this.renderInstance(this.current,this.renderState,this.props.style,this.projection))},this.scheduleRender=()=>Kt.render(this.render,!1,!0);const{latestValues:a,renderState:c}=s;this.latestValues=a,this.baseTarget={...a},this.initialValues=t.initial?{...a}:{},this.renderState=c,this.parent=e,this.props=t,this.presenceContext=i,this.depth=e?e.depth+1:0,this.reducedMotionConfig=r,this.options=o,this.isControllingVariants=gg(t),this.isVariantNode=mR(t),this.isVariantNode&&(this.variantChildren=new Set),this.manuallyAnimateOnMount=!!(e&&e.current);const{willChange:f,...h}=this.scrapeMotionValuesFromProps(t,{});for(const d in h){const p=h[d];a[d]!==void 0&&ki(p)&&(p.set(a[d],!1),Fm(f)&&f.add(d))}}scrapeMotionValuesFromProps(e,t){return{}}mount(e){this.current=e,GE.set(e,this),this.projection&&!this.projection.instance&&this.projection.mount(e),this.parent&&this.isVariantNode&&!this.isControllingVariants&&(this.removeFromVariantTree=this.parent.addVariantChild(this)),this.values.forEach((t,i)=>this.bindToMotionValue(i,t)),R2.current||qB(),this.shouldReduceMotion=this.reducedMotionConfig==="never"?!1:this.reducedMotionConfig==="always"?!0:jx.current,this.parent&&this.parent.children.add(this),this.update(this.props,this.presenceContext)}unmount(){GE.delete(this.current),this.projection&&this.projection.unmount(),Gs(this.notifyUpdate),Gs(this.render),this.valueSubscriptions.forEach(e=>e()),this.removeFromVariantTree&&this.removeFromVariantTree(),this.parent&&this.parent.children.delete(this);for(const e in this.events)this.events[e].clear();for(const e in this.features)this.features[e].unmount();this.current=null}bindToMotionValue(e,t){const i=il.has(e),r=t.on("change",o=>{this.latestValues[e]=o,this.props.onUpdate&&Kt.update(this.notifyUpdate,!1,!0),i&&this.projection&&(this.projection.isTransformDirty=!0)}),s=t.on("renderRequest",this.scheduleRender);this.valueSubscriptions.set(e,()=>{r(),s()})}sortNodePosition(e){return!this.current||!this.sortInstanceNodePosition||this.type!==e.type?0:this.sortInstanceNodePosition(this.current,e.current)}loadFeatures({children:e,...t},i,r,s){let o,a;for(let c=0;cthis.scheduleRender(),animationType:typeof f=="string"?f:"both",initialPromotionConfig:s,layoutScroll:p,layoutRoot:m})}return a}updateFeatures(){for(const e in this.features){const t=this.features[e];t.isMounted?t.update():(t.mount(),t.isMounted=!0)}}triggerBuild(){this.build(this.renderState,this.latestValues,this.options,this.props)}measureViewportBox(){return this.current?this.measureInstanceViewportBox(this.current,this.props):bn()}getStaticValue(e){return this.latestValues[e]}setStaticValue(e,t){this.latestValues[e]=t}makeTargetAnimatable(e,t=!0){return this.makeTargetAnimatableFromInstance(e,this.props,t)}update(e,t){(e.transformTemplate||this.props.transformTemplate)&&this.scheduleRender(),this.prevProps=this.props,this.props=e,this.prevPresenceContext=this.presenceContext,this.presenceContext=t;for(let i=0;it.variantChildren.delete(e)}addValue(e,t){t!==this.values.get(e)&&(this.removeValue(e),this.bindToMotionValue(e,t)),this.values.set(e,t),this.latestValues[e]=t.get()}removeValue(e){this.values.delete(e);const t=this.valueSubscriptions.get(e);t&&(t(),this.valueSubscriptions.delete(e)),delete this.latestValues[e],this.removeValueFromRenderState(e,this.renderState)}hasValue(e){return this.values.has(e)}getValue(e,t){if(this.props.values&&this.props.values[e])return this.props.values[e];let i=this.values.get(e);return i===void 0&&t!==void 0&&(i=Dc(t,{owner:this}),this.addValue(e,i)),i}readValue(e){var t;return this.latestValues[e]!==void 0||!this.current?this.latestValues[e]:(t=this.getBaseTargetFromProps(this.props,e))!==null&&t!==void 0?t:this.readValueFromInstance(this.current,e,this.options)}setBaseTarget(e,t){this.baseTarget[e]=t}getBaseTarget(e){var t;const{initial:i}=this.props,r=typeof i=="string"||typeof i=="object"?(t=qS(this.props,i))===null||t===void 0?void 0:t[e]:void 0;if(i&&r!==void 0)return r;const s=this.getBaseTargetFromProps(this.props,e);return s!==void 0&&!ki(s)?s:this.initialValues[e]!==void 0&&r===void 0?void 0:this.baseTarget[e]}on(e,t){return this.events[e]||(this.events[e]=new r1),this.events[e].add(t)}notify(e,...t){this.events[e]&&this.events[e].notify(...t)}}class I2 extends QB{sortInstanceNodePosition(e,t){return e.compareDocumentPosition(t)&2?1:-1}getBaseTargetFromProps(e,t){return e.style?e.style[t]:void 0}removeValueFromRenderState(e,{vars:t,style:i}){delete t[e],delete i[e]}makeTargetAnimatableFromInstance({transition:e,transitionEnd:t,...i},{transformValues:r},s){let o=mF(i,e||{},this);if(r&&(t&&(t=r(t)),i&&(i=r(i)),o&&(o=r(o))),s){dF(this,i,o);const a=YB(this,i,o,t);t=a.transitionEnd,i=a.target}return{transition:e,transitionEnd:t,...i}}}function $B(n){return window.getComputedStyle(n)}class ez extends I2{constructor(){super(...arguments),this.type="html"}readValueFromInstance(e,t){if(il.has(t)){const i=$S(t);return i&&i.default||0}else{const i=$B(e),r=(xR(t)?i.getPropertyValue(t):i[t])||0;return typeof r=="string"?r.trim():r}}measureInstanceViewportBox(e,{transformPagePoint:t}){return x2(e,t)}build(e,t,i,r){GS(e,t,i,r.transformTemplate)}scrapeMotionValuesFromProps(e,t){return YS(e,t)}handleChildMotionValue(){this.childSubscription&&(this.childSubscription(),delete this.childSubscription);const{children:e}=this.props;ki(e)&&(this.childSubscription=e.on("change",t=>{this.current&&(this.current.textContent=`${t}`)}))}renderInstance(e,t,i,r){ER(e,t,i,r)}}class tz extends I2{constructor(){super(...arguments),this.type="svg",this.isSVGTag=!1}getBaseTargetFromProps(e,t){return e[t]}readValueFromInstance(e,t){if(il.has(t)){const i=$S(t);return i&&i.default||0}return t=TR.has(t)?t:FS(t),e.getAttribute(t)}measureInstanceViewportBox(){return bn()}scrapeMotionValuesFromProps(e,t){return CR(e,t)}build(e,t,i,r){jS(e,t,i,this.isSVGTag,r.transformTemplate)}renderInstance(e,t,i,r){bR(e,t,i,r)}mount(e){this.isSVGTag=XS(e.tagName),super.mount(e)}}const nz=(n,e)=>HS(n)?new tz(e,{enableHardwareAcceleration:!1}):new ez(e,{enableHardwareAcceleration:!0}),iz={layout:{ProjectionNode:C2,MeasureLayout:S2}},rz={...RF,...KO,...UB,...iz},an=sO((n,e)=>kO(n,e,rz,nz));function D2(){const n=G.useRef(!1);return kS(()=>(n.current=!0,()=>{n.current=!1}),[]),n}function sz(){const n=D2(),[e,t]=G.useState(0),i=G.useCallback(()=>{n.current&&t(e+1)},[e]);return[G.useCallback(()=>Kt.postRender(i),[i]),e]}class oz extends G.Component{getSnapshotBeforeUpdate(e){const t=this.props.childRef.current;if(t&&e.isPresent&&!this.props.isPresent){const i=this.props.sizeRef.current;i.height=t.offsetHeight||0,i.width=t.offsetWidth||0,i.top=t.offsetTop,i.left=t.offsetLeft}return null}componentDidUpdate(){}render(){return this.props.children}}function az({children:n,isPresent:e}){const t=G.useId(),i=G.useRef(null),r=G.useRef({width:0,height:0,top:0,left:0});return G.useInsertionEffect(()=>{const{width:s,height:o,top:a,left:c}=r.current;if(e||!i.current||!s||!o)return;i.current.dataset.motionPopId=t;const f=document.createElement("style");return document.head.appendChild(f),f.sheet&&f.sheet.insertRule(` [data-motion-pop-id="${t}"] { position: absolute !important; width: ${s}px !important; height: ${o}px !important; top: ${a}px !important; - left: ${l}px !important; + left: ${c}px !important; } - `),()=>{document.head.removeChild(f)}},[e]),F.createElement(J4,{isPresent:e,childRef:i,sizeRef:r},F.cloneElement(n,{ref:i}))}const oy=({children:n,initial:e,isPresent:t,onExitComplete:i,custom:r,presenceAffectsLayout:s,mode:o})=>{const a=v2(Q4),l=F.useId(),f=F.useMemo(()=>({id:l,initial:e,isPresent:t,custom:r,onExitComplete:h=>{a.set(h,!0);for(const d of a.values())if(!d)return;i&&i()},register:h=>(a.set(h,!1),()=>a.delete(h))}),s?void 0:[t]);return F.useMemo(()=>{a.forEach((h,d)=>a.set(d,!1))},[t]),F.useEffect(()=>{!t&&!a.size&&i&&i()},[t]),o==="popLayout"&&(n=F.createElement($4,{isPresent:t},n)),F.createElement(Pg.Provider,{value:f},n)};function Q4(){return new Map}function eV(n){return F.useEffect(()=>()=>n(),[])}const Pa=n=>n.key||"";function tV(n,e){n.forEach(t=>{const i=Pa(t);e.set(i,t)})}function nV(n){const e=[];return F.Children.forEach(n,t=>{F.isValidElement(t)&&e.push(t)}),e}const AT=({children:n,custom:e,initial:t=!0,onExitComplete:i,exitBeforeEnter:r,presenceAffectsLayout:s=!0,mode:o="sync"})=>{const a=F.useContext(u1).forceRender||Z4()[0],l=SL(),f=nV(n);let h=f;const d=F.useRef(new Map).current,p=F.useRef(h),m=F.useRef(new Map).current,y=F.useRef(!0);if(o1(()=>{y.current=!1,tV(f,m),p.current=h}),eV(()=>{y.current=!0,m.clear(),d.clear()}),y.current)return F.createElement(F.Fragment,null,h.map(S=>F.createElement(oy,{key:Pa(S),isPresent:!0,initial:t?void 0:!1,presenceAffectsLayout:s,mode:o},S)));h=[...h];const _=p.current.map(Pa),x=f.map(Pa),g=_.length;for(let S=0;S{if(x.indexOf(A)!==-1)return;const E=m.get(A);if(!E)return;const R=_.indexOf(A);let C=S;if(!C){const L=()=>{d.delete(A);const I=Array.from(m.keys()).filter(P=>!x.includes(P));if(I.forEach(P=>m.delete(P)),p.current=f.filter(P=>{const b=Pa(P);return b===A||I.includes(b)}),!d.size){if(l.current===!1)return;a(),i&&i()}};C=F.createElement(oy,{key:Pa(E),isPresent:!1,onExitComplete:L,custom:e,presenceAffectsLayout:s,mode:o},E),d.set(A,C)}h.splice(R,0,C)}),h=h.map(S=>{const A=S.key;return d.has(A)?S:F.createElement(oy,{key:Pa(S),isPresent:!0,presenceAffectsLayout:s,mode:o},S)}),F.createElement(F.Fragment,null,d.size?h:h.map(S=>F.cloneElement(S)))},Jt={paddingX:"sm:px-16 px-6",paddingY:"sm:py-16 py-6",padding:"sm:px-16 px-6 sm:py-16 py-10",heroHeadText:"font-black text-[#373737] lg:text-[80px] sm:text-[60px] xs:text-[50px] text-[40px] lg:leading-[98px] mt-2",heroSubText:"text-[#dfd9ff] font-medium lg:text-[30px] sm:text-[26px] xs:text-[20px] text-[16px] lg:leading-[40px]",sectionHeadText:"text-black font-black md:text-[60px] sm:text-[50px] xs:text-[40px] text-[30px]",sectionSubText:"sm:text-[18px] text-[14px] text-secondary uppercase tracking-wider"},iV="/portfolio-react-threejs/assets/web-0c6824d5.webp",rV="/portfolio-react-threejs/assets/mobile-84df6906.webp",sV="/portfolio-react-threejs/assets/creator-ab86683b.webp",oV="/portfolio-react-threejs/assets/csi-1f769921.webp",aV="/portfolio-react-threejs/assets/msc-abe50c5d.webp",lV="/portfolio-react-threejs/assets/nettv4u-35143e02.webp",cV="/portfolio-react-threejs/assets/shapeout-d15c331a.webp",uV="/portfolio-react-threejs/assets/facedetection-65dc0246.webp",fV="/portfolio-react-threejs/assets/Hi-783be2bb.webp",hV="/portfolio-react-threejs/assets/langgo-41707292.webp",dV="/portfolio-react-threejs/assets/lifeoverseas-fd137d40.webp",pV="/portfolio-react-threejs/assets/velox-429d856c.webp",mV="/portfolio-react-threejs/assets/yolo-9ff20b51.webp",gV="/portfolio-react-threejs/assets/anon_exchange-3f3d612c.webp",vV="/portfolio-react-threejs/assets/banana_class-8925bee5.webp",yV="/portfolio-react-threejs/assets/convogen-ba953cbd.webp",xV="/portfolio-react-threejs/assets/downloadtube-64b5de57.webp",_V="/portfolio-react-threejs/assets/1-710ab004.webp",SV="/portfolio-react-threejs/assets/2-bd31252c.webp",AV="/portfolio-react-threejs/assets/3-da0bbfbc.webp",wV="/portfolio-react-threejs/assets/4-8d092131.webp",MV="/portfolio-react-threejs/assets/5-b3191ff5.webp",EV="/portfolio-react-threejs/assets/6-b412236c.webp",TV="/portfolio-react-threejs/assets/7-21761f9b.webp",bV="/portfolio-react-threejs/assets/8-b4888019.webp",CV="/portfolio-react-threejs/assets/9-22d557f1.webp",PV="/portfolio-react-threejs/assets/1-bc4e4556.webp",RV="/portfolio-react-threejs/assets/2-466546d5.webp",LV="/portfolio-react-threejs/assets/1-c8ded170.webp",IV="/portfolio-react-threejs/assets/2-20979492.webp",wT=[{id:"",title:"Home",type:"route"},{id:"projects",title:"Projects",type:"route"},{id:"skills",title:"Skills",type:"route"},{id:"certificate",title:"Certificates",type:"route"},{id:"resume",title:"Resume",type:"route"},{id:"blogs",title:"Blogs",type:"route"},{id:"freetools",title:"Free Tools",type:"tools"}],NV=[{id:"downloadtube",title:"DownloadTube (Youtube Downloader)",type:"video",url:"https://downloadtube-iota.vercel.app/"}],DV=[{title:"Full Stack Web Development",icon:iV},{title:"Designing",icon:sV},{title:"ML and DL Learner",icon:rV}],UV=[{title:"Technical Content Writer",company_name:"Nettv4u",icon:lV,iconBg:"white",date:"October 2023 - December 2023 (2 Months)",points:["Writing Professional articles related to IT.","Ensuring use of no AI content in articles.","Creating articles on real facts and data."]},{title:"Technical member",company_name:"Microsoft Student Chapter",icon:aV,iconBg:"black",date:"October 2022 - March 2023 (6 Months)",points:["Maintaining the website and ensuring that it is up-to-date and functioning properly.","Collaborating with other members of the chapter to identify areas for improvement on the website.","Implementing changes and updates to the website using programming languages such as React.js, tailwind and JavaScript.","Debugging any issues or errors that arise on the website and working to resolve them."]},{title:"V open source member",company_name:"CSI Chapter",icon:oV,iconBg:"white",date:"Augest 2021 - June 2022 (11 Months)",points:["Conducting regular meetings to discuss open source projects and new initiatives.","Conducting workshops and training sessions to help members learn more about open source technologies.","Coordinating with other teams within the CSI chapter to ensure smooth execution of events."]}],OV=[{name:"Downloadtube",description:"DownloadTube offers a fast, free, and easy way to download your favorite YouTube videos and music directly to your device. Enjoy high-quality video and audio downloads with no subscription required. Explore a variety of formats and resolutions to suit all your playback needs. ",tags:[{name:"next.js",color:"blue-text-gradient"},{name:"js",color:"green-text-gradient"},{name:"Youtube API",color:"pink-text-gradient"}],image:xV,source_code_link:{Live:"https://downloadtube-iota.vercel.app/",Github:"https://downloadtube-iota.vercel.app/"},date:"February 2024"},{name:"ConvoGen AI",description:"'ConvoGen' is the virtual embodiment of me, a chatbot that offers lifelike insights and information about my experiences, interests, and personality. Engage in conversations that feel as real as speaking with me in person, as 'ConvoGen' shares a wealth of personal details and knowledge, creating a truly immersive and authentic chatbot experience.",tags:[{name:"T5 model",color:"blue-text-gradient"},{name:"Transformer",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:yV,source_code_link:{Colab:"https://colab.research.google.com/drive/1a6LATySYKaS8qqfk_4maSaV4guvTRA-8?usp=sharing"},date:"October 2023"},{name:"Anon Exchange - Anonymous chatting app",description:"An innovative anonymous chatting app that redefines digital interactions. This project empowers strangers to connect seamlessly, engaging in candid conversations without the constraints of identity. What sets us apart is our commitment to privacy, allowing users to create exclusive private chat rooms for confidential discussions.",tags:[{name:"vitejs",color:"blue-text-gradient"},{name:"supabase",color:"green-text-gradient"},{name:"tailwind CSS",color:"pink-text-gradient"}],image:gV,source_code_link:{Live:"https://anon-exchange-lyart.vercel.app/",Github:"https://github.com/bedead/Anon-Exchange-chatting"},date:"August 2023"},{name:"Banana disease classification",description:"Banana disease classification is a project that uses a YOLOv8 deep learning model to detect and identify various diseases affecting banana plants. The project is based on a custom dataset of images of banana leaves with different types of infections. The project aims to provide a fast and accurate diagnosis of banana diseases, which can help farmers and researchers to prevent crop losses and improve banana production.",tags:[{name:"YOLOv8",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:vV,source_code_link:{Colab:"https://colab.research.google.com/drive/1TLumA28dCY-9_lzouIJtt2CsCjONGdNy?usp=sharing"},date:"August 2023"},{name:"PATENT - CLASSIFICATION OF LUNG CANCER USING DEEP LEARNING TECHNIQUES.",description:"Application No - 202341039647 The model is based on a YOLOv8 (Deep learning Neural network architecture) and is trained on the publicly available dataset, which consists of lung CT scans of patients with and without lung cancer.",tags:[{name:"Gradio",color:"blue-text-gradient"},{name:"YOLO",color:"green-text-gradient"},{name:"Roboflow",color:"pink-text-gradient"}],image:mV,source_code_link:{Huggingface:"https://huggingface.co/spaces/bedead/Lung-cancer-classification",Github:"https://github.com/bedead/lung-cancer-classification-yoloV8---gradio.git"},date:"June 2023"},{name:"Face Detection",description:"'FACE-DETECTOR' is a GitHub repository showcasing an OpenCV project for detecting human faces using a cascade classifier. The project utilizes the OpenCV library, which is a popular computer vision library in Python, to detect human faces in images or video streams.",tags:[{name:"Cascade classifier",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"},{name:"OpenCV",color:"pink-text-gradient"}],image:uV,source_code_link:{Github:"https://github.com/bedead/FACE-DETECTOR.git"},date:"Feb 2023"},{name:"Life Overseas",description:"Life Overseas is a concept website that aims to provide students with valuable resources and information to successfully clear entrance exams for foreign colleges.",tags:[{name:"Flask",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"}],image:dV,source_code_link:{Live:"https://full-dashing-age.glitch.me/",Github:"https://github.com/bedead/Life-Overseas-webiste.git"},date:"Jan 2023"},{name:"Velox Todo",description:"Velox Todo is a Windows application built using JavaFX and JSON files. It is a task management tool designed to help users organize and prioritize their daily tasks efficiently.",tags:[{name:"Java",color:"blue-text-gradient"},{name:"JavaFX",color:"green-text-gradient"},{name:"JSON",color:"pink-text-gradient"}],image:pV,source_code_link:{Github:"https://github.com/bedead/Velox-Todo-Application.git"},date:"Sep 2022"},{name:"HI",description:"'HI' is a console-based conversational app written in Python. It utilizes various libraries such as pyinstaller, pyjokes, PyDictionary, platform, psutil, requests, getpass, pywhatkit, pyttsx3, speechrecognition, Wikipedia, Pyaudio, speedtest-cli, pyautogui, and py-cpuinfo to provide a wide range of functionalities.",tags:[{name:"Python",color:"blue-text-gradient"},{name:"JSON",color:"green-text-gradient"}],image:fV,source_code_link:{Github:"https://github.com/bedead/HI_2021.12.22.4.git"},date:"Mar 2022"},{name:"Lang go",description:"'Lang Go' is a language translation app that is built using the Kivy and KivyMD frameworks in Python. The app utilizes the TextBlob library for translation capabilities. With 'Lang Go', users can input text in one language and translate it to another language seamlessly.",tags:[{name:"Kivy",color:"blue-text-gradient"},{name:"Kivymd",color:"green-text-gradient"},{name:"textBlob",color:"pink-text-gradient"}],image:hV,source_code_link:{Github:"https://github.com/bedead/kivymd-language-translation-app.git"},date:"Mar 2022"},{name:"Shape out",description:"'Shape Out' is a 2D platformer game available on Amazon, created using the Godot game engine. The game features intuitive controls, colorful graphics, and engaging gameplay that requires players to jump, run, and solve puzzles to progress through the levels.",tags:[{name:"Godot engine",color:"blue-text-gradient"},{name:"GD-script",color:"green-text-gradient"}],image:cV,source_code_link:{Appstore:"https://www.amazon.com/Bedead-Shape-Out-2d-platformer/dp/B0999LHBYN"},date:"Aug 2021"}],kV=[{name:"Basics of Machien Learing",image:_V},{name:"C++ Course",image:SV},{name:"Making a Webiste",image:AV},{name:"Java (Basics)",image:wV},{name:"Matlab Onramp",image:MV},{name:"MongoDB Tutorial",image:EV},{name:"Python (Basics)",image:TV},{name:"Responsive Web Design Course",image:bV},{name:"TensorFlow Python",image:CV}],FV=[{name:"Technical Member | CSI ",image:PV},{name:"Technical Member | MSC",image:RV}],BV=[{name:" Google Cloud Digital Leader",image:LV},{name:" AI and ML with Data Science",image:IV}],zV="/portfolio-react-threejs/assets/logo-white-f51edd31.webp",VV="data:image/webp;base64,UklGRmQCAABXRUJQVlA4WAoAAAAwAAAAOwAAOwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIPwAAAAFHoJBtBOime96H8WhEROhZb4CaSFYrLDAowA0OUIAD/DffJB2TJqL/AoIiF6yAJSV4nAc6xy/oOftIb+woAABWUDggLgAAAJADAJ0BKjwAPAA+bTaYSSQjIqEiCACADYlpAAAQN1NQBXiFuQAA/vucwAAAAAA=",HV="data:image/webp;base64,UklGRvwCAABXRUJQVlA4WAoAAAAwAAAALwAALwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBI2wAAAAF3oKCNFDb4bDxgYMkjIgJHTaxUSfkkcBTJtqu8T84gJEpAwheABSQkIVEIq7R9a7KCV9fDr3duIK4j+s/IbSRFteDDwEL9wv2lo6Ml4bmW5Yx2LFuayjlSHbMnX5SSBupihiFD9llir3CgZ1kYDzTJ3kFCU0RWRlZBUkNShavDNYBaiBpKPpEPNHbOBNMwbBnHf5bVaQj8s1jnu6bgL451auP4i+PPNol1WsQ6TerwAhGDOrxvjqoF7FtC0cKefFFKGqiLWcS+ZarsDc4wLgwv+Rt0tC4S948OBwBWUDggKgAAADADAJ0BKjAAMAA+bTaYSKQjIqEjiACADYlpAAAbgb0+DgAA/vucwAAAAA==",as=n=>({hidden:{y:-50,opacity:0},show:{y:0,opacity:1,transition:{type:"spring",duration:1.25,delay:n}}}),Jo=(n,e,t,i)=>({hidden:{x:n==="left"?100:n==="right"?-100:0,y:n==="up"?100:n==="down"?-100:0,opacity:0},show:{x:0,y:0,opacity:1,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),GV=(n,e,t,i)=>({hidden:{x:n==="left"?"-100%":n==="right"?"100%":0,y:n==="up"||n==="down"?"100%":0},show:{x:0,y:0,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),WV=(n,e)=>({hidden:{},show:{transition:{staggerChildren:n,delayChildren:e||0}}}),$o=()=>{const[n,e]=F.useState(""),[t,i]=F.useState(!1),[r,s]=F.useState(!1);return H.jsx(en.nav,{className:`${Jt.paddingX} w-full flex items-center py-5 fixed top-0 z-20 bg-gradient-to-b from-white to-primary`,children:H.jsxs("div",{className:"w-full flex justify-between items-center max-w-7xl mx-auto",children:[H.jsxs(Yv,{to:"/",className:"flex items-center gap-2",onClick:()=>{e(""),window.scrollTo(0,0)},children:[H.jsx("img",{src:zV,className:"w-10 h-10 object-contain",alt:"logo"}),H.jsxs("div",{className:" md:block lg:flex ",children:[H.jsx("p",{className:"text-black text-[18px] flex",children:"Satyam Mishra  "}),H.jsx("span",{className:"text-[18px] sm:block hidden",children:"| Bedead"})]})]}),H.jsxs("ul",{className:"list-none hidden sm:flex flex-row md:gap-4 items-center",children:[wT.map(o=>H.jsx("li",{className:o.type=="tools"?"bg-black text-white hover:text-white-100 hover:bg-secondary py-2 px-3 rounded-xl text-[18px] font-medium cursor-pointer":`${n==o.title?"text-black":"text-secondary"} - hover:text-black hover:underline underline-offset-8 text-[18px] font-medium cursor-pointer`,onClick:()=>{e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:H.jsxs(Yv,{to:`/${o.id}`,children:[o.title," "]})},o.id))," "]}),H.jsx(AT,{children:r&&H.jsx(en.div,{className:`${r?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute - top-60 right-40 sm:top-20 sm:right-5 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,initial:{scale:.1,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.1,opacity:0},transition:{type:"spring",damping:10},children:H.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[NV.map(o=>H.jsx(en.li,{variants:Jo("right","spring",.1,.75),className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{s(!r),e(o.title),window.open(o.url,"_blank")},children:o.title},o.id))," "]})})}),H.jsxs("div",{className:"sm:hidden flex flex-1 justify-end items-center",children:[H.jsx("img",{src:t?HV:VV,alt:"menu",className:"w-[28px] h-[28px] object-contain cursor-pointer",onClick:()=>i(!t)}),H.jsx(AT,{children:t&&H.jsx(en.div,{className:`${t?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute - top-20 right-0 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,initial:{scale:.1,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.1,opacity:0},transition:{type:"spring",damping:10},children:H.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[wT.map(o=>H.jsx("li",{className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{o.type!="tools"&&i(!t),e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:H.jsxs(Yv,{to:`/${o.id}`,children:[o.title," "]})},o.id))," "]})})})]})]})})},Zs=(n,e)=>function(){return H.jsxs(en.section,{variants:WV(),initial:"hidden",whileInView:"show",viewport:{once:!0,amount:0},exit:"hidden",className:`${Jt.padding} max-w-7xl mx-auto relative z-0`,children:[H.jsx("span",{className:"hash-span",id:e,children:" "}),H.jsx(n,{})]})},jV=()=>{const n="Hi, I'm Satyam",e=as(0);return H.jsxs("section",{className:"relative w-full h-screen mx-auto overflow-hidden",children:[H.jsxs("div",{className:`${Jt.paddingX} flex absolute z-10 inset-0 top-[120px] items-start gap-5`,children:[H.jsxs("div",{className:"flex flex-col justify-center items-center mt-5",children:[H.jsx("div",{className:"w-5 h-5 rounded-full bg-[#373737]"}),H.jsx("div",{className:"w-1 sm:h-80 h-40 violet-gradient"})]}),H.jsxs("div",{children:[H.jsx(en.h1,{variants:e,className:`${Jt.heroHeadText} funky-text-outline-2`,children:n}),H.jsxs(en.div,{variants:Jo("","",.1,1),children:[H.jsx("p",{className:`${Jt.heroSubText} funky-text-outline mt-2 text-black-100`,children:"I'm a computer science student with a simple and curious mind."}),H.jsx("p",{className:`${Jt.sectionSubText} mt-2 text-gray-600`,children:"This is just a website showcasing some of my works and experiments. Have a look until you get bored 🥱"})]})]})]}),H.jsx("div",{className:"absolute z-10 xs:bottom-15 bottom-32 w-full flex justify-center items-center",children:H.jsx("a",{href:"#about",children:H.jsx("div",{className:"w-[35px] h-[64px] rounded-3xl border-4 border-[#373737] flex justify-center items-start p-2",children:H.jsx(en.div,{animate:{y:[0,24,0]},transition:{duration:1.5,repeat:1/0,repeatType:"loop"},className:"w-3 h-3 rounded-full bg-secondary mb-2"})})})})]})},XV=Zs(jV,"Hero");var YV=Object.defineProperty,qV=Object.defineProperties,KV=Object.getOwnPropertyDescriptors,MT=Object.getOwnPropertySymbols,ZV=Object.prototype.hasOwnProperty,JV=Object.prototype.propertyIsEnumerable,ET=(n,e,t)=>e in n?YV(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Lu=(n,e)=>{for(var t in e||(e={}))ZV.call(e,t)&&ET(n,t,e[t]);if(MT)for(var t of MT(e))JV.call(e,t)&&ET(n,t,e[t]);return n},Iu=(n,e)=>qV(n,KV(e)),Og=class extends F.Component{constructor(n){super(n),this.ref=dh.createRef(),this.state={style:{}};const e={reverse:!1,max:35,perspective:1e3,easing:"cubic-bezier(.03,.98,.52,.99)",scale:"1.1",speed:"1000",transition:!0,axis:null,reset:!0};this.width=null,this.height=null,this.left=null,this.top=null,this.transitionTimeout=null,this.updateCall=null,this.element=null,this.settings=Object.assign({},e,this.props.options),this.reverse=this.settings.reverse?-1:1,this.onMouseEnter=this.onMouseEnter.bind(this,this.props.onMouseEnter),this.onMouseMove=this.onMouseMove.bind(this,this.props.onMouseMove),this.onMouseLeave=this.onMouseLeave.bind(this,this.props.onMouseLeave)}componentDidMount(){this.element=this.ref.current,setTimeout(()=>{this.element.parentElement.querySelector(":hover")===this.element&&this.onMouseEnter()},0)}componentWillUnmount(){clearTimeout(this.transitionTimeout),cancelAnimationFrame(this.updateCall)}onMouseEnter(n=()=>{},e){return this.updateElementPosition(),this.setState(Object.assign({},this.state,{style:Iu(Lu({},this.state.style),{willChange:"transform"})})),this.setTransition(),n(e)}reset(){window.requestAnimationFrame(()=>{this.setState(Object.assign({},this.state,{style:Iu(Lu({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`})}))})}onMouseMove(n=()=>{},e){return e.persist(),this.updateCall!==null&&window.cancelAnimationFrame(this.updateCall),this.event=e,this.updateCall=requestAnimationFrame(this.update.bind(this,e)),n(e)}setTransition(){clearTimeout(this.transitionTimeout),this.setState(Object.assign({},this.state,{style:Iu(Lu({},this.state.style),{transition:`${this.settings.speed}ms ${this.settings.easing}`})})),this.transitionTimeout=setTimeout(()=>{this.setState(Object.assign({},this.state,{style:Iu(Lu({},this.state.style),{transition:""})}))},this.settings.speed)}onMouseLeave(n=()=>{},e){return this.setTransition(),this.settings.reset&&this.reset(),n(e)}getValues(n){const e=(n.nativeEvent.clientX-this.left)/this.width,t=(n.nativeEvent.clientY-this.top)/this.height,i=Math.min(Math.max(e,0),1),r=Math.min(Math.max(t,0),1),s=(this.reverse*(this.settings.max/2-i*this.settings.max)).toFixed(2),o=(this.reverse*(r*this.settings.max-this.settings.max/2)).toFixed(2),a=i*100,l=r*100;return{tiltX:s,tiltY:o,percentageX:a,percentageY:l}}updateElementPosition(){const n=this.element.getBoundingClientRect();this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.left=n.left,this.top=n.top}update(n){const e=this.getValues(n);this.setState(Object.assign({},this.state,{style:Iu(Lu({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(${this.settings.axis==="x"?0:e.tiltY}deg) rotateY(${this.settings.axis==="y"?0:e.tiltX}deg) scale3d(${this.settings.scale}, ${this.settings.scale}, ${this.settings.scale})`})})),this.updateCall=null}render(){const n=Object.assign({},this.props.style,this.state.style);return H.jsx("div",{style:n,ref:this.ref,className:this.props.className,onMouseEnter:this.onMouseEnter,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,children:this.props.children})}};const $V=({index:n,title:e,icon:t})=>H.jsx(Og,{className:"xs:w-[250px] w-full",children:H.jsx(en.div,{variants:Jo("right","spring",.5*n,.75),className:"w-full green-pink-gradient p-[1px] rounded-[20px] shadow-[#fcd4d4] shadow-card",children:H.jsxs("div",{options:{max:45,scale:1,speed:450},className:"bg-primary rounded-[20px] py-5 px-12 min-h-[280px] flex justify-evenly items-center flex-col",children:[H.jsx("img",{src:t,alt:e,className:"w-16 h-16 object-contain"}),H.jsx("h3",{className:"text-black text-[20px] font-bold text-center",children:e})]})})}),QV=()=>H.jsxs(H.Fragment,{children:[H.jsxs(en.div,{variants:as(0),children:[H.jsx("h2",{className:`${Jt.sectionHeadText} text-center`,children:"Overview."}),H.jsx("p",{className:`${Jt.sectionSubText} text-center`,children:"Introduction?"})]}),H.jsx(en.p,{variants:Jo("","",.1,1),className:"mt-4 text-secondary text-center text-[17px] max-w-full leading-[30px]",children:"I am a full stack web developer, graphic designer, and machine learning enthusiast. I have experience in creating dynamic and responsive websites using HTML, CSS, JavaScript, and other frameworks. I also have a passion for designing graphics that are eye-catching and appealing. I am always eager to learn new skills and technologies in the field of machine learning and deep learning. I have completed several projects and courses on various topics such as computer vision, and natural language processing."}),H.jsx("div",{className:"mt-20 flex flex-wrap justify-center gap-10",children:DV.map((n,e)=>H.jsx($V,{index:e,...n},n.title))})]}),e5=Zs(QV,"about");var kg={},AL={exports:{}},t5="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",n5=t5,i5=n5;function wL(){}function ML(){}ML.resetWarningCache=wL;var r5=function(){function n(i,r,s,o,a,l){if(l!==i5){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function e(){return n}var t={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:ML,resetWarningCache:wL};return t.PropTypes=t,t};AL.exports=r5();var EL=AL.exports,TL={exports:{}};/*! + `),()=>{document.head.removeChild(f)}},[e]),G.createElement(oz,{isPresent:e,childRef:i,sizeRef:r},G.cloneElement(n,{ref:i}))}const Hv=({children:n,initial:e,isPresent:t,onExitComplete:i,custom:r,presenceAffectsLayout:s,mode:o})=>{const a=PR(lz),c=G.useId(),f=G.useMemo(()=>({id:c,initial:e,isPresent:t,custom:r,onExitComplete:h=>{a.set(h,!0);for(const d of a.values())if(!d)return;i&&i()},register:h=>(a.set(h,!1),()=>a.delete(h))}),s?void 0:[t]);return G.useMemo(()=>{a.forEach((h,d)=>a.set(d,!1))},[t]),G.useEffect(()=>{!t&&!a.size&&i&&i()},[t]),o==="popLayout"&&(n=G.createElement(az,{isPresent:t},n)),G.createElement(dg.Provider,{value:f},n)};function lz(){return new Map}function cz(n){return G.useEffect(()=>()=>n(),[])}const Ma=n=>n.key||"";function uz(n,e){n.forEach(t=>{const i=Ma(t);e.set(i,t)})}function fz(n){const e=[];return G.Children.forEach(n,t=>{G.isValidElement(t)&&e.push(t)}),e}const jE=({children:n,custom:e,initial:t=!0,onExitComplete:i,exitBeforeEnter:r,presenceAffectsLayout:s=!0,mode:o="sync"})=>{const a=G.useContext(VS).forceRender||sz()[0],c=D2(),f=fz(n);let h=f;const d=G.useRef(new Map).current,p=G.useRef(h),m=G.useRef(new Map).current,y=G.useRef(!0);if(kS(()=>{y.current=!1,uz(f,m),p.current=h}),cz(()=>{y.current=!0,m.clear(),d.clear()}),y.current)return G.createElement(G.Fragment,null,h.map(S=>G.createElement(Hv,{key:Ma(S),isPresent:!0,initial:t?void 0:!1,presenceAffectsLayout:s,mode:o},S)));h=[...h];const _=p.current.map(Ma),x=f.map(Ma),g=_.length;for(let S=0;S{if(x.indexOf(A)!==-1)return;const E=m.get(A);if(!E)return;const R=_.indexOf(A);let C=S;if(!C){const L=()=>{d.delete(A);const I=Array.from(m.keys()).filter(P=>!x.includes(P));if(I.forEach(P=>m.delete(P)),p.current=f.filter(P=>{const b=Ma(P);return b===A||I.includes(b)}),!d.size){if(c.current===!1)return;a(),i&&i()}};C=G.createElement(Hv,{key:Ma(E),isPresent:!1,onExitComplete:L,custom:e,presenceAffectsLayout:s,mode:o},E),d.set(A,C)}h.splice(R,0,C)}),h=h.map(S=>{const A=S.key;return d.has(A)?S:G.createElement(Hv,{key:Ma(S),isPresent:!0,presenceAffectsLayout:s,mode:o},S)}),G.createElement(G.Fragment,null,d.size?h:h.map(S=>G.cloneElement(S)))},Os=n=>({hidden:{y:-50,opacity:0},show:{y:0,opacity:1,transition:{type:"spring",duration:1.25,delay:n}}}),Xo=(n,e,t,i)=>({hidden:{x:n==="left"?100:n==="right"?-100:0,y:n==="up"?100:n==="down"?-100:0,opacity:0},show:{x:0,y:0,opacity:1,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),hz=(n,e,t,i)=>({hidden:{x:n==="left"?"-100%":n==="right"?"100%":0,y:n==="up"||n==="down"?"100%":0},show:{x:0,y:0,transition:{type:e,delay:t,duration:i,ease:"easeOut"}}}),dz=(n,e)=>({hidden:{},show:{transition:{staggerChildren:n,delayChildren:e||0}}}),sl=(n,e)=>function(){return W.jsxs(an.section,{variants:dz(),initial:"hidden",whileInView:"show",viewport:{once:!0,amount:0},exit:"hidden",className:`${on.padding} max-w-7xl mx-auto relative z-0`,children:[W.jsx("span",{className:"hash-span",id:e,children:" "}),W.jsx(n,{})]})},pz=()=>{const n="Hi, I'm Satyam",e=Os(0);return W.jsxs("section",{className:"relative w-full h-screen mx-auto overflow-hidden",children:[W.jsxs("div",{className:`${on.paddingX} flex absolute z-10 inset-0 top-[120px] items-start gap-5`,children:[W.jsxs("div",{className:"flex flex-col justify-center items-center mt-5",children:[W.jsx("div",{className:"w-5 h-5 rounded-full bg-[#373737]"}),W.jsx("div",{className:"w-1 sm:h-80 h-40 violet-gradient"})]}),W.jsxs("div",{children:[W.jsx(an.h1,{variants:e,className:`${on.heroHeadText} funky-text-outline-2`,children:n}),W.jsxs(an.div,{variants:Xo("","",.1,1),children:[W.jsx("p",{className:`${on.heroSubText} funky-text-outline mt-2 text-black-100`,children:"I'm a computer science student with a simple and curious mind."}),W.jsx("p",{className:`${on.sectionSubText} mt-2 text-gray-600`,children:"This is just a website showcasing some of my works and experiments. Have a look until you get bored 🥱"})]})]})]}),W.jsx("div",{className:"absolute z-10 xs:bottom-15 bottom-32 w-full flex justify-center items-center",children:W.jsx("a",{href:"#about",children:W.jsx("div",{className:"w-[35px] h-[64px] rounded-3xl border-4 border-[#373737] flex justify-center items-start p-2",children:W.jsx(an.div,{animate:{y:[0,24,0]},transition:{duration:1.5,repeat:1/0,repeatType:"loop"},className:"w-3 h-3 rounded-full bg-secondary mb-2"})})})})]})},mz=sl(pz,"HeroSection");var gz=Object.defineProperty,vz=Object.defineProperties,yz=Object.getOwnPropertyDescriptors,XE=Object.getOwnPropertySymbols,xz=Object.prototype.hasOwnProperty,_z=Object.prototype.propertyIsEnumerable,YE=(n,e,t)=>e in n?gz(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Mu=(n,e)=>{for(var t in e||(e={}))xz.call(e,t)&&YE(n,t,e[t]);if(XE)for(var t of XE(e))_z.call(e,t)&&YE(n,t,e[t]);return n},wu=(n,e)=>vz(n,yz(e)),_g=class extends G.Component{constructor(n){super(n),this.ref=Km.createRef(),this.state={style:{}};const e={reverse:!1,max:35,perspective:1e3,easing:"cubic-bezier(.03,.98,.52,.99)",scale:"1.1",speed:"1000",transition:!0,axis:null,reset:!0};this.width=null,this.height=null,this.left=null,this.top=null,this.transitionTimeout=null,this.updateCall=null,this.element=null,this.settings=Object.assign({},e,this.props.options),this.reverse=this.settings.reverse?-1:1,this.onMouseEnter=this.onMouseEnter.bind(this,this.props.onMouseEnter),this.onMouseMove=this.onMouseMove.bind(this,this.props.onMouseMove),this.onMouseLeave=this.onMouseLeave.bind(this,this.props.onMouseLeave)}componentDidMount(){this.element=this.ref.current,setTimeout(()=>{this.element.parentElement.querySelector(":hover")===this.element&&this.onMouseEnter()},0)}componentWillUnmount(){clearTimeout(this.transitionTimeout),cancelAnimationFrame(this.updateCall)}onMouseEnter(n=()=>{},e){return this.updateElementPosition(),this.setState(Object.assign({},this.state,{style:wu(Mu({},this.state.style),{willChange:"transform"})})),this.setTransition(),n(e)}reset(){window.requestAnimationFrame(()=>{this.setState(Object.assign({},this.state,{style:wu(Mu({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(0deg) rotateY(0deg) scale3d(1, 1, 1)`})}))})}onMouseMove(n=()=>{},e){return e.persist(),this.updateCall!==null&&window.cancelAnimationFrame(this.updateCall),this.event=e,this.updateCall=requestAnimationFrame(this.update.bind(this,e)),n(e)}setTransition(){clearTimeout(this.transitionTimeout),this.setState(Object.assign({},this.state,{style:wu(Mu({},this.state.style),{transition:`${this.settings.speed}ms ${this.settings.easing}`})})),this.transitionTimeout=setTimeout(()=>{this.setState(Object.assign({},this.state,{style:wu(Mu({},this.state.style),{transition:""})}))},this.settings.speed)}onMouseLeave(n=()=>{},e){return this.setTransition(),this.settings.reset&&this.reset(),n(e)}getValues(n){const e=(n.nativeEvent.clientX-this.left)/this.width,t=(n.nativeEvent.clientY-this.top)/this.height,i=Math.min(Math.max(e,0),1),r=Math.min(Math.max(t,0),1),s=(this.reverse*(this.settings.max/2-i*this.settings.max)).toFixed(2),o=(this.reverse*(r*this.settings.max-this.settings.max/2)).toFixed(2),a=i*100,c=r*100;return{tiltX:s,tiltY:o,percentageX:a,percentageY:c}}updateElementPosition(){const n=this.element.getBoundingClientRect();this.width=this.element.offsetWidth,this.height=this.element.offsetHeight,this.left=n.left,this.top=n.top}update(n){const e=this.getValues(n);this.setState(Object.assign({},this.state,{style:wu(Mu({},this.state.style),{transform:`perspective(${this.settings.perspective}px) rotateX(${this.settings.axis==="x"?0:e.tiltY}deg) rotateY(${this.settings.axis==="y"?0:e.tiltX}deg) scale3d(${this.settings.scale}, ${this.settings.scale}, ${this.settings.scale})`})})),this.updateCall=null}render(){const n=Object.assign({},this.props.style,this.state.style);return W.jsx("div",{style:n,ref:this.ref,className:this.props.className,onMouseEnter:this.onMouseEnter,onMouseMove:this.onMouseMove,onMouseLeave:this.onMouseLeave,children:this.props.children})}};const Sz="/portfolio-react-threejs/assets/web-0c6824d5.webp",Az="/portfolio-react-threejs/assets/mobile-84df6906.webp",Mz="/portfolio-react-threejs/assets/creator-ab86683b.webp",wz="/portfolio-react-threejs/assets/csi-1f769921.webp",Ez="/portfolio-react-threejs/assets/msc-abe50c5d.webp",Tz="/portfolio-react-threejs/assets/nettv4u-35143e02.webp",bz="/portfolio-react-threejs/assets/shapeout-d15c331a.webp",Cz="/portfolio-react-threejs/assets/facedetection-65dc0246.webp",Pz="/portfolio-react-threejs/assets/Hi-783be2bb.webp",Rz="/portfolio-react-threejs/assets/langgo-41707292.webp",Lz="/portfolio-react-threejs/assets/lifeoverseas-fd137d40.webp",Iz="/portfolio-react-threejs/assets/velox-429d856c.webp",Dz="/portfolio-react-threejs/assets/yolo-9ff20b51.webp",Nz="/portfolio-react-threejs/assets/anon_exchange-3f3d612c.webp",Uz="/portfolio-react-threejs/assets/banana_class-8925bee5.webp",Oz="/portfolio-react-threejs/assets/convogen-ba953cbd.webp",kz="/portfolio-react-threejs/assets/downloadtube-64b5de57.webp",Fz="/portfolio-react-threejs/assets/1-710ab004.webp",Bz="/portfolio-react-threejs/assets/2-bd31252c.webp",zz="/portfolio-react-threejs/assets/3-da0bbfbc.webp",Vz="/portfolio-react-threejs/assets/4-8d092131.webp",Hz="/portfolio-react-threejs/assets/5-b3191ff5.webp",Gz="/portfolio-react-threejs/assets/6-b412236c.webp",Wz="/portfolio-react-threejs/assets/7-21761f9b.webp",jz="/portfolio-react-threejs/assets/8-b4888019.webp",Xz="/portfolio-react-threejs/assets/9-22d557f1.webp",Yz="/portfolio-react-threejs/assets/1-bc4e4556.webp",qz="/portfolio-react-threejs/assets/2-466546d5.webp",Zz="/portfolio-react-threejs/assets/1-c8ded170.webp",Kz="/portfolio-react-threejs/assets/2-20979492.webp",qE=[{id:"HeroSection",title:"Home",type:"route"},{id:"AboutSection",title:"About",type:"route"},{id:"ExperienceSection",title:"Experience",type:"route"},{id:"TechSkillsSection",title:"Skills",type:"route"},{id:"ResumeSection",title:"Resume",type:"route"},{id:"ProjectsSection",title:"Projects",type:"route"},{id:"CertificatesSection",title:"Certificates",type:"route"},{id:"ContactSection",title:"Contact",type:"route"},{id:"freetools",title:"Free Tools",type:"tools"}],Jz=[{id:"downloadtube",title:"DownloadTube (Youtube Downloader)",type:"video",url:"https://downloadtube-iota.vercel.app/"}],Qz=[{title:"Full Stack Web Development",icon:Sz},{title:"Designing",icon:Mz},{title:"ML and DL Learner",icon:Az}],$z=[{title:"Technical Content Writer",company_name:"Nettv4u",icon:Tz,iconBg:"white",date:"October 2023 - December 2023 (2 Months)",points:["Writing Professional articles related to IT.","Ensuring use of no AI content in articles.","Creating articles on real facts and data."]},{title:"Technical member",company_name:"Microsoft Student Chapter",icon:Ez,iconBg:"black",date:"October 2022 - March 2023 (6 Months)",points:["Maintaining the website and ensuring that it is up-to-date and functioning properly.","Collaborating with other members of the chapter to identify areas for improvement on the website.","Implementing changes and updates to the website using programming languages such as React.js, tailwind and JavaScript.","Debugging any issues or errors that arise on the website and working to resolve them."]},{title:"V open source member",company_name:"CSI Chapter",icon:wz,iconBg:"white",date:"Augest 2021 - June 2022 (11 Months)",points:["Conducting regular meetings to discuss open source projects and new initiatives.","Conducting workshops and training sessions to help members learn more about open source technologies.","Coordinating with other teams within the CSI chapter to ensure smooth execution of events."]}],e4=[{name:"Downloadtube",description:"DownloadTube offers a fast, free, and easy way to download your favorite YouTube videos and music directly to your device. Enjoy high-quality video and audio downloads with no subscription required. Explore a variety of formats and resolutions to suit all your playback needs. ",tags:[{name:"next.js",color:"blue-text-gradient"},{name:"js",color:"green-text-gradient"},{name:"Youtube API",color:"pink-text-gradient"}],image:kz,source_code_link:{Live:"https://downloadtube-iota.vercel.app/",Github:"https://downloadtube-iota.vercel.app/"},date:"February 2024"},{name:"ConvoGen AI",description:"'ConvoGen' is the virtual embodiment of me, a chatbot that offers lifelike insights and information about my experiences, interests, and personality. Engage in conversations that feel as real as speaking with me in person, as 'ConvoGen' shares a wealth of personal details and knowledge, creating a truly immersive and authentic chatbot experience.",tags:[{name:"T5 model",color:"blue-text-gradient"},{name:"Transformer",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:Oz,source_code_link:{Colab:"https://colab.research.google.com/drive/1a6LATySYKaS8qqfk_4maSaV4guvTRA-8?usp=sharing"},date:"October 2023"},{name:"Anon Exchange - Anonymous chatting app",description:"An innovative anonymous chatting app that redefines digital interactions. This project empowers strangers to connect seamlessly, engaging in candid conversations without the constraints of identity. What sets us apart is our commitment to privacy, allowing users to create exclusive private chat rooms for confidential discussions.",tags:[{name:"vitejs",color:"blue-text-gradient"},{name:"supabase",color:"green-text-gradient"},{name:"tailwind CSS",color:"pink-text-gradient"}],image:Nz,source_code_link:{Live:"https://anon-exchange-lyart.vercel.app/",Github:"https://github.com/bedead/Anon-Exchange-chatting"},date:"August 2023"},{name:"Banana disease classification",description:"Banana disease classification is a project that uses a YOLOv8 deep learning model to detect and identify various diseases affecting banana plants. The project is based on a custom dataset of images of banana leaves with different types of infections. The project aims to provide a fast and accurate diagnosis of banana diseases, which can help farmers and researchers to prevent crop losses and improve banana production.",tags:[{name:"YOLOv8",color:"green-text-gradient"},{name:"Colab",color:"pink-text-gradient"}],image:Uz,source_code_link:{Colab:"https://colab.research.google.com/drive/1TLumA28dCY-9_lzouIJtt2CsCjONGdNy?usp=sharing"},date:"August 2023"},{name:"PATENT - CLASSIFICATION OF LUNG CANCER USING DEEP LEARNING TECHNIQUES.",description:"Application No - 202341039647 The model is based on a YOLOv8 (Deep learning Neural network architecture) and is trained on the publicly available dataset, which consists of lung CT scans of patients with and without lung cancer.",tags:[{name:"Gradio",color:"blue-text-gradient"},{name:"YOLO",color:"green-text-gradient"},{name:"Roboflow",color:"pink-text-gradient"}],image:Dz,source_code_link:{Huggingface:"https://huggingface.co/spaces/bedead/Lung-cancer-classification",Github:"https://github.com/bedead/lung-cancer-classification-yoloV8---gradio.git"},date:"June 2023"},{name:"Face Detection",description:"'FACE-DETECTOR' is a GitHub repository showcasing an OpenCV project for detecting human faces using a cascade classifier. The project utilizes the OpenCV library, which is a popular computer vision library in Python, to detect human faces in images or video streams.",tags:[{name:"Cascade classifier",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"},{name:"OpenCV",color:"pink-text-gradient"}],image:Cz,source_code_link:{Github:"https://github.com/bedead/FACE-DETECTOR.git"},date:"Feb 2023"},{name:"Life Overseas",description:"Life Overseas is a concept website that aims to provide students with valuable resources and information to successfully clear entrance exams for foreign colleges.",tags:[{name:"Flask",color:"blue-text-gradient"},{name:"Python",color:"green-text-gradient"}],image:Lz,source_code_link:{Live:"https://full-dashing-age.glitch.me/",Github:"https://github.com/bedead/Life-Overseas-webiste.git"},date:"Jan 2023"},{name:"Velox Todo",description:"Velox Todo is a Windows application built using JavaFX and JSON files. It is a task management tool designed to help users organize and prioritize their daily tasks efficiently.",tags:[{name:"Java",color:"blue-text-gradient"},{name:"JavaFX",color:"green-text-gradient"},{name:"JSON",color:"pink-text-gradient"}],image:Iz,source_code_link:{Github:"https://github.com/bedead/Velox-Todo-Application.git"},date:"Sep 2022"},{name:"HI",description:"'HI' is a console-based conversational app written in Python. It utilizes various libraries such as pyinstaller, pyjokes, PyDictionary, platform, psutil, requests, getpass, pywhatkit, pyttsx3, speechrecognition, Wikipedia, Pyaudio, speedtest-cli, pyautogui, and py-cpuinfo to provide a wide range of functionalities.",tags:[{name:"Python",color:"blue-text-gradient"},{name:"JSON",color:"green-text-gradient"}],image:Pz,source_code_link:{Github:"https://github.com/bedead/HI_2021.12.22.4.git"},date:"Mar 2022"},{name:"Lang go",description:"'Lang Go' is a language translation app that is built using the Kivy and KivyMD frameworks in Python. The app utilizes the TextBlob library for translation capabilities. With 'Lang Go', users can input text in one language and translate it to another language seamlessly.",tags:[{name:"Kivy",color:"blue-text-gradient"},{name:"Kivymd",color:"green-text-gradient"},{name:"textBlob",color:"pink-text-gradient"}],image:Rz,source_code_link:{Github:"https://github.com/bedead/kivymd-language-translation-app.git"},date:"Mar 2022"},{name:"Shape out",description:"'Shape Out' is a 2D platformer game available on Amazon, created using the Godot game engine. The game features intuitive controls, colorful graphics, and engaging gameplay that requires players to jump, run, and solve puzzles to progress through the levels.",tags:[{name:"Godot engine",color:"blue-text-gradient"},{name:"GD-script",color:"green-text-gradient"}],image:bz,source_code_link:{Appstore:"https://www.amazon.com/Bedead-Shape-Out-2d-platformer/dp/B0999LHBYN"},date:"Aug 2021"}],t4=[{name:"Basics of Machien Learing",image:Fz},{name:"C++ Course",image:Bz},{name:"Making a Webiste",image:zz},{name:"Java (Basics)",image:Vz},{name:"Matlab Onramp",image:Hz},{name:"MongoDB Tutorial",image:Gz},{name:"Python (Basics)",image:Wz},{name:"Responsive Web Design Course",image:jz},{name:"TensorFlow Python",image:Xz}],n4=[{name:"Technical Member | CSI ",image:Yz},{name:"Technical Member | MSC",image:qz}],i4=[{name:" Google Cloud Digital Leader",image:Zz},{name:" AI and ML with Data Science",image:Kz}],r4=({index:n,title:e,icon:t})=>W.jsx(_g,{className:"xs:w-[250px] w-full",children:W.jsx(an.div,{variants:Xo("right","spring",.5*n,.75),className:"w-full green-pink-gradient p-[1px] rounded-[20px] shadow-[#fcd4d4] shadow-card",children:W.jsxs("div",{options:{max:45,scale:1,speed:450},className:"bg-primary rounded-[20px] py-5 px-12 min-h-[280px] flex justify-evenly items-center flex-col",children:[W.jsx("img",{src:t,alt:e,className:"w-16 h-16 object-contain"}),W.jsx("h3",{className:"text-black text-[20px] font-bold text-center",children:e})]})})}),s4=()=>W.jsxs("section",{children:[W.jsxs(an.div,{variants:Os(0),children:[W.jsx("h2",{className:`${on.sectionHeadText} text-center`,children:"Overview."}),W.jsx("p",{className:`${on.sectionSubText} text-center`,children:"Introduction?"})]}),W.jsx(an.p,{variants:Xo("","",.1,1),className:"mt-4 text-secondary text-center text-[17px] max-w-full leading-[30px]",children:"I am a full stack web developer, graphic designer, and machine learning enthusiast. I have experience in creating dynamic and responsive websites using HTML, CSS, JavaScript, and other frameworks. I also have a passion for designing graphics that are eye-catching and appealing. I am always eager to learn new skills and technologies in the field of machine learning and deep learning. I have completed several projects and courses on various topics such as computer vision, and natural language processing."}),W.jsx("div",{className:"mt-20 flex flex-wrap justify-center gap-10",children:Qz.map((n,e)=>W.jsx(r4,{index:e,...n},n.title))})]}),o4=sl(s4,"AboutSection");var Sg={},N2={exports:{}},a4="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED",l4=a4,c4=l4;function U2(){}function O2(){}O2.resetWarningCache=U2;var u4=function(){function n(i,r,s,o,a,c){if(c!==c4){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}n.isRequired=n;function e(){return n}var t={array:n,bigint:n,bool:n,func:n,number:n,object:n,string:n,symbol:n,any:n,arrayOf:e,element:n,elementType:n,instanceOf:e,node:n,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:O2,resetWarningCache:U2};return t.PropTypes=t,t};N2.exports=u4();var k2=N2.exports,F2={exports:{}};/*! Copyright (c) 2018 Jed Watson. Licensed under the MIT License (MIT), see http://jedwatson.github.io/classnames -*/(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var s="",o=0;o(typeof window=="object"&&document.documentElement.style.setProperty("--line-color",i),s5.default.createElement("div",{className:(0,o5.default)(e,"vertical-timeline",{"vertical-timeline--animate":n,"vertical-timeline--two-columns":t==="2-columns","vertical-timeline--one-column-left":t==="1-column"||t==="1-column-left","vertical-timeline--one-column-right":t==="1-column-right"})},r));CL.propTypes={children:co.default.oneOfType([co.default.arrayOf(co.default.node),co.default.node]).isRequired,className:co.default.string,animate:co.default.bool,layout:co.default.oneOf(["1-column-left","1-column","2-columns","1-column-right"]),lineColor:co.default.string};var a5=CL;kg.default=a5;var Fg={};function d_(){return d_=Object.assign||function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}var m_=new Map,np=new WeakMap,TT=0,PL=void 0;function u5(n){PL=n}function f5(n){return n?(np.has(n)||(TT+=1,np.set(n,TT.toString())),np.get(n)):"0"}function h5(n){return Object.keys(n).sort().filter(function(e){return n[e]!==void 0}).map(function(e){return e+"_"+(e==="root"?f5(n.root):n[e])}).toString()}function d5(n){var e=h5(n),t=m_.get(e);if(!t){var i=new Map,r,s=new IntersectionObserver(function(o){o.forEach(function(a){var l,f=a.isIntersecting&&r.some(function(h){return a.intersectionRatio>=h});n.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=f),(l=i.get(a.target))==null||l.forEach(function(h){h(f,a)})})},n);r=s.thresholds||(Array.isArray(n.threshold)?n.threshold:[n.threshold||0]),t={id:e,observer:s,elements:i},m_.set(e,t)}return t}function P1(n,e,t,i){if(t===void 0&&(t={}),i===void 0&&(i=PL),typeof window.IntersectionObserver>"u"&&i!==void 0){var r=n.getBoundingClientRect();return e(i,{isIntersecting:i,target:n,intersectionRatio:typeof t.threshold=="number"?t.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),function(){}}var s=d5(t),o=s.id,a=s.observer,l=s.elements,f=l.get(n)||[];return l.has(n)||l.set(n,f),f.push(e),a.observe(n),function(){f.splice(f.indexOf(e),1),f.length===0&&(l.delete(n),a.unobserve(n)),l.size===0&&(a.disconnect(),m_.delete(o))}}var p5=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function bT(n){return typeof n.children!="function"}var tg=function(n){l5(e,n);function e(i){var r;return r=n.call(this,i)||this,r.node=null,r._unobserveCb=null,r.handleNode=function(s){r.node&&(r.unobserve(),!s&&!r.props.triggerOnce&&!r.props.skip&&r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=s||null,r.observeNode()},r.handleChange=function(s,o){s&&r.props.triggerOnce&&r.unobserve(),bT(r.props)||r.setState({inView:s,entry:o}),r.props.onChange&&r.props.onChange(s,o)},r.state={inView:!!i.initialInView,entry:void 0},r}var t=e.prototype;return t.componentDidUpdate=function(r){(r.rootMargin!==this.props.rootMargin||r.root!==this.props.root||r.threshold!==this.props.threshold||r.skip!==this.props.skip||r.trackVisibility!==this.props.trackVisibility||r.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(!(!this.node||this.props.skip)){var r=this.props,s=r.threshold,o=r.root,a=r.rootMargin,l=r.trackVisibility,f=r.delay,h=r.fallbackInView;this._unobserveCb=P1(this.node,this.handleChange,{threshold:s,root:o,rootMargin:a,trackVisibility:l,delay:f},h)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!bT(this.props)){var r=this.state,s=r.inView,o=r.entry;return this.props.children({inView:s,entry:o,ref:this.handleNode})}var a=this.props,l=a.children,f=a.as,h=c5(a,p5);return F.createElement(f||"div",d_({ref:this.handleNode},h),l)},e}(F.Component);tg.displayName="InView";tg.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function m5(n){var e=n===void 0?{}:n,t=e.threshold,i=e.delay,r=e.trackVisibility,s=e.rootMargin,o=e.root,a=e.triggerOnce,l=e.skip,f=e.initialInView,h=e.fallbackInView,d=F.useRef(),p=F.useState({inView:!!f}),m=p[0],y=p[1],_=F.useCallback(function(g){d.current!==void 0&&(d.current(),d.current=void 0),!l&&g&&(d.current=P1(g,function(S,A){y({inView:S,entry:A}),A.isIntersecting&&a&&d.current&&(d.current(),d.current=void 0)},{root:o,rootMargin:s,threshold:t,trackVisibility:r,delay:i},h))},[Array.isArray(t)?t.toString():t,o,s,a,l,r,h,i]);F.useEffect(function(){!d.current&&m.entry&&!a&&!l&&y({inView:!!f})});var x=[_,m.inView,m.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}const g5=Object.freeze(Object.defineProperty({__proto__:null,InView:tg,default:tg,defaultFallbackInView:u5,observe:P1,useInView:m5},Symbol.toStringTag,{value:"Module"})),v5=dD(g5);Fg.__esModule=!0;Fg.default=void 0;var uo=R1(F),sn=R1(EL),ip=R1(bL),y5=v5;function R1(n){return n&&n.__esModule?n:{default:n}}const RL=({children:n="",className:e="",contentArrowStyle:t=null,contentStyle:i=null,date:r="",dateClassName:s="",icon:o=null,iconClassName:a="",iconOnClick:l=null,onTimelineElementClick:f=null,iconStyle:h=null,id:d="",position:p="",style:m=null,textClassName:y="",intersectionObserverProps:_={rootMargin:"0px 0px -40px 0px",triggerOnce:!0},visible:x=!1})=>uo.default.createElement(y5.InView,_,({inView:g,ref:S})=>uo.default.createElement("div",{ref:S,id:d,className:(0,ip.default)(e,"vertical-timeline-element",{"vertical-timeline-element--left":p==="left","vertical-timeline-element--right":p==="right","vertical-timeline-element--no-children":n===""}),style:m},uo.default.createElement(uo.default.Fragment,null,uo.default.createElement("span",{style:h,onClick:l,className:(0,ip.default)(a,"vertical-timeline-element-icon",{"bounce-in":g||x,"is-hidden":!(g||x)})},o),uo.default.createElement("div",{style:i,onClick:f,className:(0,ip.default)(y,"vertical-timeline-element-content",{"bounce-in":g||x,"is-hidden":!(g||x)})},uo.default.createElement("div",{style:t,className:"vertical-timeline-element-content-arrow"}),n,uo.default.createElement("span",{className:(0,ip.default)(s,"vertical-timeline-element-date")},r)))));RL.propTypes={children:sn.default.oneOfType([sn.default.arrayOf(sn.default.node),sn.default.node]),className:sn.default.string,contentArrowStyle:sn.default.shape({}),contentStyle:sn.default.shape({}),date:sn.default.node,dateClassName:sn.default.string,icon:sn.default.element,iconClassName:sn.default.string,iconStyle:sn.default.shape({}),iconOnClick:sn.default.func,onTimelineElementClick:sn.default.func,id:sn.default.string,position:sn.default.string,style:sn.default.shape({}),textClassName:sn.default.string,visible:sn.default.bool,intersectionObserverProps:sn.default.shape({root:sn.default.object,rootMargin:sn.default.string,threshold:sn.default.number,triggerOnce:sn.default.bool})};var x5=RL;Fg.default=x5;var LL={VerticalTimeline:kg.default,VerticalTimelineElement:Fg.default};const _5=({experience:n})=>H.jsxs(LL.VerticalTimelineElement,{contentStyle:{background:"black",color:"black"},contentArrowStyle:{borderRight:"7px solid black"},date:n.date,iconStyle:{background:n.iconBg},icon:H.jsx("div",{className:"flex justify-center items-center w-full h-full",children:H.jsx("img",{src:n.icon,alt:n.company_name,className:"w-[75%] h-[75%] object-contain"})}),children:[H.jsxs("div",{children:[H.jsx("h3",{className:"text-[#fcd4d4] text-[24px] font-bold",children:n.title}),H.jsx("p",{className:"text-white text-[16px] font-semibold",style:{margin:0},children:n.company_name})]}),H.jsx("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:n.points.map((e,t)=>H.jsx("li",{className:"text-white-100 text-[14px] pl-1 tracking-wider",children:e},`experience-point-${t}`))})]}),S5=()=>H.jsxs("section",{children:[H.jsxs(en.div,{variants:as(),children:[H.jsx("h2",{className:`${Jt.sectionHeadText} text-center`,children:"Work Experience."}),H.jsx("p",{className:`${Jt.sectionSubText} text-center`,children:"Where I have worked so far?"})]}),H.jsx("div",{className:"mt-20 flex flex-col",children:H.jsx(LL.VerticalTimeline,{lineColor:"#373737",children:UV.map((n,e)=>H.jsx(_5,{experience:n},`experience-${e}`))})})]}),A5=Zs(S5,"work"),Hf={_origin:"https://api.emailjs.com"},w5=(n,e="https://api.emailjs.com")=>{Hf._userID=n,Hf._origin=e},IL=(n,e,t)=>{if(!n)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!t)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class CT{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const NL=(n,e,t={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new CT(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new CT(o))}),s.open("POST",Hf._origin+n,!0),Object.keys(t).forEach(o=>{s.setRequestHeader(o,t[o])}),s.send(e)}),M5=(n,e,t,i)=>{const r=i||Hf._userID;return IL(r,n,e),NL("/api/v1.0/email/send",JSON.stringify({lib_version:"3.12.1",user_id:r,service_id:n,template_id:e,template_params:t}),{"Content-type":"application/json"})},E5=n=>{let e;if(typeof n=="string"?e=document.querySelector(n):e=n,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},T5=(n,e,t,i)=>{const r=i||Hf._userID,s=E5(t);IL(r,n,e);const o=new FormData(s);return o.append("lib_version","3.12.1"),o.append("service_id",n),o.append("template_id",e),o.append("user_id",r),NL("/api/v1.0/email/send-form",o)},PT={init:w5,send:M5,sendForm:T5},b5=()=>{const n=F.useRef(),[e,t]=F.useState({name:"",email:"",message:""}),[i,r]=F.useState(!1),[s,o]=F.useState(!1),a=f=>{const{target:h}=f,{name:d,value:p}=h;t({...e,[d]:p})},l=f=>{f.preventDefault(),r(!0),PT.init("Tlnn1O7PC8WlYPRT7"),PT.send("service_w2nrv74","template_hmf109b",{from_name:e.name,to_name:"Satyam Mishra",from_email:e.email,to_email:"satyammishra9050@gmail.com",message:e.message}).then(()=>{r(!1),o(!0),t({name:"",email:"",message:""})},h=>{r(!1),console.error(h),alert("Ahh, something went wrong. Please try again.")})};return H.jsx("div",{className:"xl:mt-6 flex xl:flex-row flex-col-reverse gap-10 overflow-hidden md:w-[80%] lg:w-[70%] ",children:H.jsxs(en.div,{variants:GV("left","tween",.2,1),className:"flex-[0.75] bg-white p-8 shadow-[#fcd4d4] shadow-card rounded-2xl",children:[H.jsx("p",{className:Jt.sectionSubText,children:"I am open to work"}),H.jsx("h3",{className:Jt.sectionHeadText,children:"Get In Touch."}),s?H.jsxs("div",{children:[H.jsx("p",{className:"text-green-500 mt-2",children:"Thank you. I have recieved your msg."}),H.jsx("p",{className:"text-green-500",children:"I will get back to you right on."})]}):H.jsxs("form",{ref:n,onSubmit:l,className:"mt-12 flex flex-col gap-8",children:[H.jsxs("label",{className:"flex flex-col",children:[H.jsx("span",{className:"text-black font-medium mb-4",children:"Your Name"}),H.jsx("input",{type:"text",name:"name",value:e.name,onChange:a,placeholder:"What's your good name?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),H.jsxs("label",{className:"flex flex-col",children:[H.jsx("span",{className:"text-black font-medium mb-4",children:"Your Email"}),H.jsx("input",{type:"email",name:"email",value:e.email,onChange:a,placeholder:"What's your email?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),H.jsxs("label",{className:"flex flex-col",children:[H.jsx("span",{className:"text-black font-medium mb-4",children:"Your Message"}),H.jsx("textarea",{name:"message",value:e.message,onChange:a,placeholder:"What's your message?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),H.jsx("button",{type:"submit","aria-busy":i,className:"bg-black hover:bg-slate-600 py-3 px-8 rounded-xl outline-none w-fit text-white font-bold shadow-md shadow-primary",children:i?"Sending...":"Send"})]})]})})},C5=Zs(b5,"contact"),P5=()=>H.jsxs("footer",{className:"bg-black text-white p-5 text-center",children:[H.jsx("p",{children:"© 2024 Satyam Mishra"}),H.jsx("p",{children:"Contact us: satyam.work.only@gmail.com"})]}),R5=()=>H.jsx("div",{className:"h-screen flex justify-center items-center",children:H.jsx("img",{src:xh,className:"w-[150px] h-[117px] "})});function L5(){return H.jsx(F.Suspense,{fallback:R5(),children:H.jsxs("div",{className:" z-0 bg-white",children:[H.jsx($o,{}),H.jsxs("div",{className:"bg-gradient-to-b from-white to-primary",children:[H.jsx(XV,{}),H.jsx(e5,{}),H.jsx(A5,{}),H.jsx(C5,{}),H.jsx(P5,{})]})]})})}const I5=({index:n,name:e,image:t})=>H.jsx(en.div,{children:H.jsx(en.div,{variants:Jo("right","spring",.5*n,.75),children:H.jsxs(Og,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[H.jsx("div",{className:"relative w-full h-[230px]",children:H.jsx("img",{src:t,placeholder:e,loading:"lazy",alt:"certificate image",className:"w-full h-full object-cover rounded-2xl"})}),H.jsx("h3",{className:"mt-5 text-black font-bold text-[24px] text-center",children:e})]})})}),ay=n=>n.map(({index:e,...t})=>H.jsx(I5,{index:e,...t},`project-${e}`)),N5=()=>H.jsxs("div",{className:"-m-5 md:-m-10",children:[H.jsxs(en.div,{variants:as(0),children:[H.jsx("h2",{className:`${Jt.sectionHeadText} text-center`,children:"Certificates."}),H.jsx("p",{className:`${Jt.sectionSubText} text-center`,children:"Professional Certificates"})]}),H.jsx("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:ay(BV)}),H.jsx(en.p,{variants:as(0),className:`${Jt.sectionSubText} text-center`,children:"Work Certificates"}),H.jsx("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:ay(FV)}),H.jsx(en.p,{variants:as(0),className:`${Jt.sectionSubText} text-center`,children:"Course Certificates"}),H.jsx("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:ay(kV)})]}),D5=Zs(N5,"CertificateLists");function U5(){return H.jsxs("div",{className:"bg-white",children:[H.jsx($o,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(D5,{})})]})}const O5="/portfolio-react-threejs/assets/cover_img-d3ab652c.png",RT="/portfolio-react-threejs/assets/resume-24caeb09.pdf",k5=()=>{const[n,e]=F.useState(!1),t=()=>e(!0),i=()=>e(!1),r=()=>{const s=document.createElement("a");s.href=RT,s.download="Satyam_Mishra_Resume",s.click()};return H.jsxs("div",{className:"-m-5 md:-m-10 max-w-screen-xl mx-auto my-10 space-y-10 max",children:[H.jsxs(en.div,{variants:as(0),children:[H.jsx("h2",{className:`${Jt.sectionHeadText} text-center`,children:"Resume."}),H.jsx("p",{className:`${Jt.sectionSubText} text-center`,children:"Check out my resume"})]}),H.jsx(en.div,{variants:Jo("right","spring",.5*0,.75),className:"md:flex justify-center items-center",children:H.jsxs(Og,{options:{max:45,scale:1,speed:450},className:"group bg-white shadow-[#fcd4d4] shadow-card rounded-2xl mx-auto w-[90%] md:min-w-1/3 md:max-w-3xl h-full",children:[H.jsx("div",{className:"group-hover:opacity-100 relative w-full h-full mb-5",children:H.jsx("img",{src:O5,loading:"lazy",alt:"Resume cover image",className:"w-full h-full object-cover rounded-2xl"})}),H.jsxs("div",{className:" flex items-center space-x-5 md:space-y-5 justify-center md:absolute md:top-10 md:-right-10 md:bottom-0 md:flex md:flex-col md:items-center md:justify-center transition-opacity duration-300",children:[H.jsx("button",{className:"bg-blue-600 text-white hover:text-white-100 hover:bg-blue-800 py-2 px-3 rounded-xl text-[15px] font-medium cursor-pointer mb-2 md:mb-0",onClick:r,children:"Download"}),H.jsx("button",{className:"bg-green-600 text-white hover:text-white-100 hover:bg-green-800 py-2 px-3 rounded-xl text-[15px] font-medium cursor-pointer mb-2 md:mb-0",onClick:t,children:"View"})]})]})}),n&&H.jsx("div",{className:"fixed inset-0 z-50 overflow-auto -top-10 bg-black bg-opacity-60 flex items-center justify-center",children:H.jsxs("div",{className:"bg-white p-2 rounded-2xl max-w-screen-lg w-[70%] relative",children:[H.jsx("button",{className:"absolute -top-12 right-0 md:top-2 md:-right-20 bg-black hover:bg-gray-800 py-2 px-3 rounded-xl text-white hover:text-gray-200",onClick:i,children:"Close"}),H.jsx("iframe",{title:"PDF Viewer",src:RT,className:"w-full h-[400px]"})]})})]})},F5=Zs(k5,"ResumeComp");function B5(){return H.jsxs("div",{className:"bg-white",children:[H.jsx($o,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(F5,{})})]})}function z5(){return H.jsx("section",{className:"h-screen",children:H.jsxs(en.div,{variants:as(0),className:`${Jt.sectionHeadText} text-center`,children:[H.jsx("h1",{children:"Coming soon"}),H.jsx("p",{className:`${Jt.heroSubText} mt-2 text-black-100 text-center`,children:"More things are on the way ✌️."})]})})}const DL=Zs(z5,"ComingSoon"),V5=()=>H.jsx("div",{className:"h-screen flex justify-center items-center",children:H.jsx("img",{src:xh,className:"w-[150px] h-[117px] "})});function H5(){return H.jsx(F.Suspense,{fallback:V5(),children:H.jsxs("div",{className:"bg-white",children:[H.jsx($o,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(DL,{})})]})})}const G5="data:image/webp;base64,UklGRggMAABXRUJQVlA4WAoAAAAwAAAA7wAA7wAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIggkAAAGwBgC0MTfWGWamsV3bbVDbdvu29tp23dRuk7VRu12btW0H89Kkk0wwcx6Ce8+959tf721ETAD87f//pevfqP+jaW9v+fHERZfrHuI9l+viiR+3vJX2aP9G/n81nMlTln+biVLvfLN8SrLzr0HMgLSfPUi05ETG+OrGztE9bT+Sv5AxwGHQQibsdKOi7h3jgw2X/5jtHlTas220v5FqlJaDGrybkWSQnNMPoDb3T3MYn8jnb6BWM9PijE3V9ALUbsHaROMSlVaIWi7KiDMmYUsKUNsFi0ONh3V6Jmo953Grweh5ArV/rLuRCMtAFtdHGoYRmcika7oxiNuDjO6ONQCDs5DVrEHcOVcgux/4s1b/JDJ8vC5jA/6JLOcN48oy34dM++ZaWPLfhozvCWQoZh+yfjienUaXkflLDZlJykb2Xa1Z6XAXDWB+V0a65KMhdPdio6cHDaKnBxNt89EwujuxkJqHBvJuCgONXGgosxtqL+YyGsxL0Zpz/o6Gc7+/1izb0IBuMetsPhrS2Rob5DMmvmHaqpuLBjWvgab8T6JhPVZFT2+ggV2rpcEoPbuWf2i9HtNW/1akH8+vq6Z2rxvqXztbmG+AhuKy5A2CcgMGvOnSSU5Gf38od6gwzIzRzx6U/g1U2G/UL7r4abgdKvy9MNypnXEof2DFAKDD7zr4tR1Udog4HK2ZqCx5LmulwDTinGrnhpug0rZccXci9PIJyt8IIh1LvCp5F/qByC3i8H2t9ESCrwgB6HpVnUudQOwLErCLRqwnKIwWBBE/qvJtGAgeIOOIRR+PIMVWosDv/cpk7duw+JH+bVrWjAu1WEMTaia1HfDY0s0HXZV52w6im8nAB7QRlk0iShiYVpSXtWtGv0gQHjtw9heu8paA+GgpmSG6WIIkg8SBaQUiurdPrwnyTXUf2lOIiEtAYogUXKCJuAIagRLAvC69nxPI+g9+K90kI0iOO0YPa5Cmvwy9BsrB5Vqo5jEWAZIKE3SQjkTjuUiQhKs1EFlApTkXSbLcEerNQKo9uegjC19VzplJZgwXE6Tddqg2Dcm+ysUMaThFtQN0PuTiM3l/KpaEdPdxcUgetlArnVCeiQezm8BqpfzvEsI6PDRAgrlVVBqLlMfwMJECjlJpB6kVPKwjsVmhEA+pP3g4SKIwUJ2JSLo0lINwLwkco85OWjiYg+FIc6syDjex+RwsJ5JvV6UX0r4czUH1TBrYVZXltAqSgMX2RTQWqnKa1jBg8iEaxxSJQ9IZwOYGEhijxkhS5wP5iLhFYogayyh5WwOjA0ksVmMfpXRgdTuF35RwFhNyRfJS20OgyKFCChJ+HJhdQACTVJhK6LaDm7B8AhNVWEHoWWB3GYElKnxHJzeYn4QieV+pcIfOCmD4c3k3FfBHukkcDZDnq0KvMZ0TwLH1tjRsQK8/nddYgnXy+tJ7lE5bnobLe4heGpk8G0/hXmnz6L1FZjcwfUjaG/S2kpnP1fvSNtH7icwErl6S9j29U2RacTVE2nF618jEcZUk7Qq9TDIBXNWVdoteLhWvmatYaS56BVTuAdeB0tz0SqmUsBUlrZSelwr6cVVDPx4yYVw1kVZIL49MDa7aScujl0OmC1djpGXTu05mGlevS7tC7ziZNK4+lHaE3s9ktnO1T9qP9HaQyTHzFFgibQe998hgU556o/S36M2l8whP8+XNpPcQnb08HZX3AL2BdEpiOGqK8gfQa0EHn+BoIYFG9AJ8dA4yZLsmz+ekBzfoYE9+JqH8a6DgN4R+ZMdylsDXKqwhhJ24GYMEF6owjdJhGy9VLlIYqUISJXyGl2VIsaYK9iJK7pqcJJdSyDGpAAcp4c92PoJOIsUvQcmVpHANG6YNSHKuGsNp4WQuXkWaw9SI9tEq6sfDZC+N0nA14CQt9PTlYIIXaf4Kii4lhp6++hvvRaKvqtKTGpY8rznT816kmqyKXz41xDftOgvYhGQzzarAVnr4Sy19NT+OdD8AZccogPceM+vJNqMYCd+nTlChAog/1NdRymGk7A5SB7Ypgd711XRTLcOLpD8AhUepgeieF66T+DXFSLy7Sg6XIoieD5roouUHxUj9mkUlWKMMou+roQ71Asb8igrOAaVTFELEux/0tankHLa+AFX01VEL/lQKEXM+mVJNjboPbcpDRX8Gxcep9t/n1o1vbKVkbznlnSuo8CjV/G5r4L8L/lj3QM/adll+9fs8+uaBIlT7vEU1mKGJsksvv2oRZ3n9mg91+CAoH54v6tLQyLovnqHmug+kjs7VwR2nerBEVFcAAPOQk6QO1QTJNQ5r4BXQYJxH0MD/ArA9U0jnS3+QHvilcvlhOoAVgq7VKwOgySkqOx1A0LFXtcWgxah8MXh3aFkQ8iWN35xA0rlfLVeYHmCWIPQ+WBbYN1G4GAVEq2Yq9SRoMuiOIPSNKAusW+QVpwLZziUKnbPrAqaJQndSWVBln7TngPALCg0FbZoPiMKrQWVB7FVJf5op2Y4q8wNotJ1PFC4rB5rlSSlNAtLtfIp4k3UCbworaVYODPPJeBOIv6XIatBq6E1RuK08mCPBk0gttlCJCwF6geHCfA3LM70jbiWQT1fB1wV0u14UvlMemJeJ8taiV7tUgTWg3fAbou4FlAcw8IKY7aDg5/QuBugHevoE4YSKgLn7gq9PuYoQ81xXLxz7dfs7aQ/3behQoSc5XxfQ8VJRX1dIn9Y71OaDlm0/C/Im6gjWEvvGoidIzBKDz2upE60rkaDrXqViTmjJXkjJkwL6fkYMpuoIfqU0FXT+rph0LS0j9CZo3e9HIe5IHY2ms9umNwg9LgJn66g9md/8QffxV0S4a2moPpWzUaD/RlkC8EuzfiKIXE0EDlu4BOBy/ZhpZDcAHlNyBeBck26ARFYScNnKJQA3BvNzoyHw2ey2ALw52sTMhZrAab2rAhBPPhDKyYk44DX+sAjEkh9mjmySGMzCvgjgNugLIUJ1tT0Q+LVlMOabYwaWpxdxdW84cN3+Fk8XmwLfMV9z9FUEcG56vJibwufNwHzbc7wcaAT8O9O8fJSm2cEQdjvPxdk2YBQdMzwcuGc4wEA2+Ep7vk8TwGB2P6a3Qx3BeNoeuamvGw9YwJD6Tb+lpyuPO8GwBjx1TT/nJtvA0NonHNfLsbFWMLymLuuLK2RVxYaI7vfagUGOfelUBaJVqYqHHw4BI5266nZZjVSJTwXDbU6acRoR/6GKUa85ff2Cv1Z/+///8wRWUDggkAAAAFAPAJ0BKvAA8AA+bTaZSaQjIqEgKACADYlpbuF2sRtACewD32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D31gAAP7/1gAAAAAAAAAAAA==",W5="/portfolio-react-threejs/assets/appstore-0b8f390b.png",j5="/portfolio-react-threejs/assets/colab-9e4861eb.png",X5="/portfolio-react-threejs/assets/huggingface-720eadc9.png",LT="/portfolio-react-threejs/assets/website-078d1216.gif",Y5=({index:n,name:e,description:t,tags:i,image:r,source_code_link:s,date:o})=>H.jsx(Og,{className:"sm:w-[360px] w-full",children:H.jsx(en.div,{variants:Jo("right","spring",.5*n,.75),className:"shadow-[#fcd4d4] green-pink-gradient shadow-card p-[1px] rounded-2xl ",children:H.jsxs("div",{className:"bg-primary rounded-2xl py-5 px-8",options:{max:45,scale:1,speed:450},children:[H.jsxs("div",{className:"relative w-full h-[230px]",children:[H.jsx("img",{src:r,alt:"project_image",className:"w-full h-full object-cover rounded-2xl"}),H.jsx("div",{className:"absolute inset-0 z-10 space-y-3 flex-col justify-end m-3 card-img_hover",children:Object.entries(s).map(([a,l])=>H.jsx("div",{onClick:()=>window.open(l,"_blank"),className:"border-black border-2 white-gradient w-10 h-10 rounded-full flex justify-center items-center cursor-pointer",title:a==="Github"?"View in GitHub":a==="Appstore"?"View in App Store":a==="Colab"?"View in Google Colab":a==="Huggingface"?"View in Hugging Face":a==="Live"?"View Live Website":"View Now",children:H.jsx("img",{src:a==="Github"?G5:a==="Appstore"?W5:a==="Colab"?j5:a==="Huggingface"?X5:LT,alt:`${a} link`,className:"w-1/2 h-1/2 object-contain"})},a))})]}),H.jsxs("div",{className:"mt-5",children:[H.jsx("h3",{className:"text-black font-bold text-[24px]",children:e}),H.jsx("p",{className:"mt-2 text-secondary text-[14px]",children:t})]}),H.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[i.map(a=>H.jsxs("p",{className:`text-[14px] ${a.color}`,children:["#",a.name," "]},`${e}-${a.name}`))," "]}),H.jsx("p",{children:o})]})})}),q5=()=>H.jsxs("div",{className:"-m-5 md:-m-10 ",children:[H.jsxs(en.div,{variants:as(0),children:[H.jsx("h2",{className:`${Jt.sectionHeadText} text-center`,children:"Projects."}),H.jsx("p",{className:`${Jt.sectionSubText} text-center`,children:"My works?"})]}),H.jsx(en.div,{variants:Jo("","",.1,1),className:"w-full flex",children:H.jsx("p",{className:"mt-3 text-secondary text-center text-[17px] max-w-full leading-[30px]",children:"The projects that are listed below provide examples of my work in the real world, showcasing my abilities and experience. Each project has a brief description, links to code repositories, and live demonstrations. It exhibits my ability to work with various technologies, manage projects efficiently, and solve complex problems."})}),H.jsxs("div",{className:" mt-20 grid md:grid-cols-2 lg:grid-cols-3 gap-5",children:[OV.map((n,e)=>H.jsx(Y5,{index:e,...n},`project-${e}`))," "]})]}),K5=Zs(q5,"project");function Z5(){return H.jsxs("div",{className:"bg-white",children:[H.jsx($o,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(K5,{})})]})}/** +*/(function(n){(function(){var e={}.hasOwnProperty;function t(){for(var s="",o=0;o(typeof window=="object"&&document.documentElement.style.setProperty("--line-color",i),f4.default.createElement("div",{className:(0,h4.default)(e,"vertical-timeline",{"vertical-timeline--animate":n,"vertical-timeline--two-columns":t==="2-columns","vertical-timeline--one-column-left":t==="1-column"||t==="1-column-left","vertical-timeline--one-column-right":t==="1-column-right"})},r));z2.propTypes={children:oo.default.oneOfType([oo.default.arrayOf(oo.default.node),oo.default.node]).isRequired,className:oo.default.string,animate:oo.default.bool,layout:oo.default.oneOf(["1-column-left","1-column","2-columns","1-column-right"]),lineColor:oo.default.string};var d4=z2;Sg.default=d4;var Ag={};function Xx(){return Xx=Object.assign||function(n){for(var e=1;e=0)&&(t[r]=n[r]);return t}var qx=new Map,Gd=new WeakMap,ZE=0,V2=void 0;function g4(n){V2=n}function v4(n){return n?(Gd.has(n)||(ZE+=1,Gd.set(n,ZE.toString())),Gd.get(n)):"0"}function y4(n){return Object.keys(n).sort().filter(function(e){return n[e]!==void 0}).map(function(e){return e+"_"+(e==="root"?v4(n.root):n[e])}).toString()}function x4(n){var e=y4(n),t=qx.get(e);if(!t){var i=new Map,r,s=new IntersectionObserver(function(o){o.forEach(function(a){var c,f=a.isIntersecting&&r.some(function(h){return a.intersectionRatio>=h});n.trackVisibility&&typeof a.isVisible>"u"&&(a.isVisible=f),(c=i.get(a.target))==null||c.forEach(function(h){h(f,a)})})},n);r=s.thresholds||(Array.isArray(n.threshold)?n.threshold:[n.threshold||0]),t={id:e,observer:s,elements:i},qx.set(e,t)}return t}function o1(n,e,t,i){if(t===void 0&&(t={}),i===void 0&&(i=V2),typeof window.IntersectionObserver>"u"&&i!==void 0){var r=n.getBoundingClientRect();return e(i,{isIntersecting:i,target:n,intersectionRatio:typeof t.threshold=="number"?t.threshold:0,time:0,boundingClientRect:r,intersectionRect:r,rootBounds:r}),function(){}}var s=x4(t),o=s.id,a=s.observer,c=s.elements,f=c.get(n)||[];return c.has(n)||c.set(n,f),f.push(e),a.observe(n),function(){f.splice(f.indexOf(e),1),f.length===0&&(c.delete(n),a.unobserve(n)),c.size===0&&(a.disconnect(),qx.delete(o))}}var _4=["children","as","triggerOnce","threshold","root","rootMargin","onChange","skip","trackVisibility","delay","initialInView","fallbackInView"];function KE(n){return typeof n.children!="function"}var zm=function(n){p4(e,n);function e(i){var r;return r=n.call(this,i)||this,r.node=null,r._unobserveCb=null,r.handleNode=function(s){r.node&&(r.unobserve(),!s&&!r.props.triggerOnce&&!r.props.skip&&r.setState({inView:!!r.props.initialInView,entry:void 0})),r.node=s||null,r.observeNode()},r.handleChange=function(s,o){s&&r.props.triggerOnce&&r.unobserve(),KE(r.props)||r.setState({inView:s,entry:o}),r.props.onChange&&r.props.onChange(s,o)},r.state={inView:!!i.initialInView,entry:void 0},r}var t=e.prototype;return t.componentDidUpdate=function(r){(r.rootMargin!==this.props.rootMargin||r.root!==this.props.root||r.threshold!==this.props.threshold||r.skip!==this.props.skip||r.trackVisibility!==this.props.trackVisibility||r.delay!==this.props.delay)&&(this.unobserve(),this.observeNode())},t.componentWillUnmount=function(){this.unobserve(),this.node=null},t.observeNode=function(){if(!(!this.node||this.props.skip)){var r=this.props,s=r.threshold,o=r.root,a=r.rootMargin,c=r.trackVisibility,f=r.delay,h=r.fallbackInView;this._unobserveCb=o1(this.node,this.handleChange,{threshold:s,root:o,rootMargin:a,trackVisibility:c,delay:f},h)}},t.unobserve=function(){this._unobserveCb&&(this._unobserveCb(),this._unobserveCb=null)},t.render=function(){if(!KE(this.props)){var r=this.state,s=r.inView,o=r.entry;return this.props.children({inView:s,entry:o,ref:this.handleNode})}var a=this.props,c=a.children,f=a.as,h=m4(a,_4);return G.createElement(f||"div",Xx({ref:this.handleNode},h),c)},e}(G.Component);zm.displayName="InView";zm.defaultProps={threshold:0,triggerOnce:!1,initialInView:!1};function S4(n){var e=n===void 0?{}:n,t=e.threshold,i=e.delay,r=e.trackVisibility,s=e.rootMargin,o=e.root,a=e.triggerOnce,c=e.skip,f=e.initialInView,h=e.fallbackInView,d=G.useRef(),p=G.useState({inView:!!f}),m=p[0],y=p[1],_=G.useCallback(function(g){d.current!==void 0&&(d.current(),d.current=void 0),!c&&g&&(d.current=o1(g,function(S,A){y({inView:S,entry:A}),A.isIntersecting&&a&&d.current&&(d.current(),d.current=void 0)},{root:o,rootMargin:s,threshold:t,trackVisibility:r,delay:i},h))},[Array.isArray(t)?t.toString():t,o,s,a,c,r,h,i]);G.useEffect(function(){!d.current&&m.entry&&!a&&!c&&y({inView:!!f})});var x=[_,m.inView,m.entry];return x.ref=x[0],x.inView=x[1],x.entry=x[2],x}const A4=Object.freeze(Object.defineProperty({__proto__:null,InView:zm,default:zm,defaultFallbackInView:g4,observe:o1,useInView:S4},Symbol.toStringTag,{value:"Module"})),M4=MD(A4);Ag.__esModule=!0;Ag.default=void 0;var ao=a1(G),nn=a1(k2),Wd=a1(B2),w4=M4;function a1(n){return n&&n.__esModule?n:{default:n}}const H2=({children:n="",className:e="",contentArrowStyle:t=null,contentStyle:i=null,date:r="",dateClassName:s="",icon:o=null,iconClassName:a="",iconOnClick:c=null,onTimelineElementClick:f=null,iconStyle:h=null,id:d="",position:p="",style:m=null,textClassName:y="",intersectionObserverProps:_={rootMargin:"0px 0px -40px 0px",triggerOnce:!0},visible:x=!1})=>ao.default.createElement(w4.InView,_,({inView:g,ref:S})=>ao.default.createElement("div",{ref:S,id:d,className:(0,Wd.default)(e,"vertical-timeline-element",{"vertical-timeline-element--left":p==="left","vertical-timeline-element--right":p==="right","vertical-timeline-element--no-children":n===""}),style:m},ao.default.createElement(ao.default.Fragment,null,ao.default.createElement("span",{style:h,onClick:c,className:(0,Wd.default)(a,"vertical-timeline-element-icon",{"bounce-in":g||x,"is-hidden":!(g||x)})},o),ao.default.createElement("div",{style:i,onClick:f,className:(0,Wd.default)(y,"vertical-timeline-element-content",{"bounce-in":g||x,"is-hidden":!(g||x)})},ao.default.createElement("div",{style:t,className:"vertical-timeline-element-content-arrow"}),n,ao.default.createElement("span",{className:(0,Wd.default)(s,"vertical-timeline-element-date")},r)))));H2.propTypes={children:nn.default.oneOfType([nn.default.arrayOf(nn.default.node),nn.default.node]),className:nn.default.string,contentArrowStyle:nn.default.shape({}),contentStyle:nn.default.shape({}),date:nn.default.node,dateClassName:nn.default.string,icon:nn.default.element,iconClassName:nn.default.string,iconStyle:nn.default.shape({}),iconOnClick:nn.default.func,onTimelineElementClick:nn.default.func,id:nn.default.string,position:nn.default.string,style:nn.default.shape({}),textClassName:nn.default.string,visible:nn.default.bool,intersectionObserverProps:nn.default.shape({root:nn.default.object,rootMargin:nn.default.string,threshold:nn.default.number,triggerOnce:nn.default.bool})};var E4=H2;Ag.default=E4;var G2={VerticalTimeline:Sg.default,VerticalTimelineElement:Ag.default};const T4=({experience:n})=>W.jsxs(G2.VerticalTimelineElement,{contentStyle:{background:"black",color:"black"},contentArrowStyle:{borderRight:"7px solid black"},date:n.date,iconStyle:{background:n.iconBg},icon:W.jsx("div",{className:"flex justify-center items-center w-full h-full",children:W.jsx("img",{src:n.icon,alt:n.company_name,className:"w-[75%] h-[75%] object-contain"})}),children:[W.jsxs("div",{children:[W.jsx("h3",{className:"text-[#fcd4d4] text-[24px] font-bold",children:n.title}),W.jsx("p",{className:"text-white text-[16px] font-semibold",style:{margin:0},children:n.company_name})]}),W.jsx("ul",{className:"mt-5 list-disc ml-5 space-y-2",children:n.points.map((e,t)=>W.jsx("li",{className:"text-white-100 text-[14px] pl-1 tracking-wider",children:e},`experience-point-${t}`))})]}),b4=()=>W.jsxs("section",{children:[W.jsxs(an.div,{variants:Os(),children:[W.jsx("h2",{className:`${on.sectionHeadText} text-center`,children:"Work Experience."}),W.jsx("p",{className:`${on.sectionSubText} text-center`,children:"Where I have worked so far?"})]}),W.jsx("div",{className:"mt-20 flex flex-col",children:W.jsx(G2.VerticalTimeline,{lineColor:"#373737",children:$z.map((n,e)=>W.jsx(T4,{experience:n},`experience-${e}`))})})]}),C4=sl(b4,"ExperienceSection");function P4(){return W.jsxs("div",{children:[W.jsx(mz,{}),W.jsx(o4,{}),W.jsx(C4,{})]})}const If={_origin:"https://api.emailjs.com"},R4=(n,e="https://api.emailjs.com")=>{If._userID=n,If._origin=e},W2=(n,e,t)=>{if(!n)throw"The public key is required. Visit https://dashboard.emailjs.com/admin/account";if(!e)throw"The service ID is required. Visit https://dashboard.emailjs.com/admin";if(!t)throw"The template ID is required. Visit https://dashboard.emailjs.com/admin/templates";return!0};class JE{constructor(e){this.status=e?e.status:0,this.text=e?e.responseText:"Network Error"}}const j2=(n,e,t={})=>new Promise((i,r)=>{const s=new XMLHttpRequest;s.addEventListener("load",({target:o})=>{const a=new JE(o);a.status===200||a.text==="OK"?i(a):r(a)}),s.addEventListener("error",({target:o})=>{r(new JE(o))}),s.open("POST",If._origin+n,!0),Object.keys(t).forEach(o=>{s.setRequestHeader(o,t[o])}),s.send(e)}),L4=(n,e,t,i)=>{const r=i||If._userID;return W2(r,n,e),j2("/api/v1.0/email/send",JSON.stringify({lib_version:"3.12.1",user_id:r,service_id:n,template_id:e,template_params:t}),{"Content-type":"application/json"})},I4=n=>{let e;if(typeof n=="string"?e=document.querySelector(n):e=n,!e||e.nodeName!=="FORM")throw"The 3rd parameter is expected to be the HTML form element or the style selector of form";return e},D4=(n,e,t,i)=>{const r=i||If._userID,s=I4(t);W2(r,n,e);const o=new FormData(s);return o.append("lib_version","3.12.1"),o.append("service_id",n),o.append("template_id",e),o.append("user_id",r),j2("/api/v1.0/email/send-form",o)},QE={init:R4,send:L4,sendForm:D4},N4=()=>{const n=G.useRef(),[e,t]=G.useState({name:"",email:"",message:""}),[i,r]=G.useState(!1),[s,o]=G.useState(!1),a=f=>{const{target:h}=f,{name:d,value:p}=h;t({...e,[d]:p})},c=f=>{f.preventDefault(),r(!0),QE.init("Tlnn1O7PC8WlYPRT7"),QE.send("service_w2nrv74","template_hmf109b",{from_name:e.name,to_name:"Satyam Mishra",from_email:e.email,to_email:"satyammishra9050@gmail.com",message:e.message}).then(()=>{r(!1),o(!0),t({name:"",email:"",message:""})},h=>{r(!1),console.error(h),alert("Ahh, something went wrong. Please try again.")})};return W.jsxs("section",{id:"ContactSection",className:"sm:px-16 sm:py-12 xl:mt-6 bg-white px-8 py-12 m-auto space-y-8",children:[W.jsxs("div",{className:"flex-row md:flex",children:[W.jsxs(an.div,{variants:hz("left","tween",.2,1),className:"bg-[#fff2f2] shadow-lg p-12 flex-[0.75] md:max-w-[50%] rounded-2xl",children:[W.jsx("p",{className:on.sectionSubText,children:"I am open to work"}),W.jsx("h3",{className:on.sectionHeadText,children:"Get In Touch."}),s?W.jsxs("div",{children:[W.jsx("p",{className:"text-green-500 mt-2",children:"Thank you. I have recieved your msg."}),W.jsx("p",{className:"text-green-500",children:"I will get back to you right on."})]}):W.jsxs("form",{ref:n,onSubmit:c,className:"mt-12 flex flex-col gap-1",children:[W.jsxs("label",{className:"flex flex-col",children:[W.jsx("span",{className:"text-black font-medium mb-1",children:"Your Name"}),W.jsx("input",{type:"text",name:"name",value:e.name,onChange:a,placeholder:"What's your good name?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),W.jsxs("label",{className:"flex flex-col",children:[W.jsx("span",{className:"text-black font-medium mb-1",children:"Your Email"}),W.jsx("input",{type:"email",name:"email",value:e.email,onChange:a,placeholder:"What's your email?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),W.jsxs("label",{className:"flex flex-col",children:[W.jsx("span",{className:"text-black font-medium mb-1",children:"Your Message"}),W.jsx("textarea",{name:"message",value:e.message,onChange:a,placeholder:"What's your message?",className:"bg-secondary py-4 px-6 placeholder:text-white-100 text-white rounded-lg outline-none border-none font-medium"})]}),W.jsx("button",{type:"submit","aria-busy":i,className:"bg-black hover:bg-slate-600 py-3 px-8 rounded-xl outline-none w-fit text-white font-bold shadow-md shadow-primary",children:i?"Sending...":"Send"})]})]}),W.jsxs("div",{className:"text-center m-auto justify-between space-y-20",children:[W.jsxs("div",{id:"ToolsMade",children:[W.jsx("h2",{className:`${on.sectionSubText} font-bold text-center mb-2`,children:"Open source tools made by me 👇"}),W.jsx("a",{href:"",className:" text-center",children:"DownloadTube"})]}),W.jsxs("div",{id:"Socials",children:[W.jsx("h2",{className:`${on.sectionSubText} font-bold text-center mb-2`,children:"My Socials 👇"}),W.jsxs("div",{className:"",children:[W.jsx("a",{href:"https://www.linkedin.com/in/theaiguysatyam/",className:" text-center",children:"Linkedin"}),W.jsx("br",{}),W.jsx("a",{href:"https://github.com/bedead",className:" text-center",children:"Github"}),W.jsx("br",{})]})]})]})]}),W.jsx("h2",{children:"Made with code and hands © 2024 Satyam Mishra"})]})},U4="/portfolio-react-threejs/assets/logo-white-f51edd31.webp",O4="data:image/webp;base64,UklGRmQCAABXRUJQVlA4WAoAAAAwAAAAOwAAOwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIPwAAAAFHoJBtBOime96H8WhEROhZb4CaSFYrLDAowA0OUIAD/DffJB2TJqL/AoIiF6yAJSV4nAc6xy/oOftIb+woAABWUDggLgAAAJADAJ0BKjwAPAA+bTaYSSQjIqEiCACADYlpAAAQN1NQBXiFuQAA/vucwAAAAAA=",k4="data:image/webp;base64,UklGRvwCAABXRUJQVlA4WAoAAAAwAAAALwAALwAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBI2wAAAAF3oKCNFDb4bDxgYMkjIgJHTaxUSfkkcBTJtqu8T84gJEpAwheABSQkIVEIq7R9a7KCV9fDr3duIK4j+s/IbSRFteDDwEL9wv2lo6Ml4bmW5Yx2LFuayjlSHbMnX5SSBupihiFD9llir3CgZ1kYDzTJ3kFCU0RWRlZBUkNShavDNYBaiBpKPpEPNHbOBNMwbBnHf5bVaQj8s1jnu6bgL451auP4i+PPNol1WsQ6TerwAhGDOrxvjqoF7FtC0cKefFFKGqiLWcS+ZarsDc4wLgwv+Rt0tC4S948OBwBWUDggKgAAADADAJ0BKjAAMAA+bTaYSKQjIqEjiACADYlpAAAbgb0+DgAA/vucwAAAAA==",F4=()=>{const[n,e]=G.useState(""),[t,i]=G.useState(!1),[r,s]=G.useState(!1);return W.jsx(an.nav,{className:`${on.paddingX} w-full flex items-center py-5 fixed top-0 z-20 bg-gradient-to-b from-white to-primary`,children:W.jsxs("div",{className:"w-full flex justify-between items-center max-w-7xl mx-auto",children:[W.jsxs("a",{href:"",className:"flex items-center gap-2",onClick:()=>{e(""),window.scrollTo(0,0)},children:[W.jsx("img",{src:U4,className:"w-10 h-10 object-contain",alt:"logo"}),W.jsxs("div",{className:" md:block lg:flex ",children:[W.jsx("p",{className:"text-black text-[18px] flex",children:"Satyam Mishra  "}),W.jsx("span",{className:"text-[18px] sm:block hidden",children:"| Bedead"})]})]}),W.jsxs("ul",{className:"list-none hidden sm:flex flex-row md:gap-4 items-center",children:[qE.map(o=>W.jsx("li",{className:o.type=="tools"?"bg-black text-white hover:text-white-100 hover:bg-secondary py-2 px-3 rounded-xl text-[18px] font-medium cursor-pointer":`${n==o.title?"text-black":"text-secondary"} + hover:text-black hover:underline underline-offset-8 text-[18px] font-medium cursor-pointer`,onClick:()=>{e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:W.jsxs("a",{href:` #${o.id}`,children:[o.title," "]})},o.id))," "]}),W.jsx(jE,{children:r&&W.jsx(an.div,{className:`${r?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute + top-60 right-40 sm:top-20 sm:right-5 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,initial:{scale:.1,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.1,opacity:0},transition:{type:"spring",damping:10},children:W.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[Jz.map(o=>W.jsx(an.li,{variants:Xo("right","spring",.1,.75),className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{s(!r),e(o.title),window.open(o.url,"_blank")},children:o.title},o.id))," "]})})}),W.jsxs("div",{className:"sm:hidden flex flex-1 justify-end items-center",children:[W.jsx("img",{src:t?k4:O4,alt:"menu",className:"w-[28px] h-[28px] object-contain cursor-pointer",onClick:()=>i(!t)}),W.jsx(jE,{children:t&&W.jsx(an.div,{className:`${t?"flex":"hidden"} p-6 bg-gradient-to-r from-[#f6f6f6] to-white absolute + top-20 right-0 mx-4 my-2 min-w-[140px] z-10 rounded-xl outline`,initial:{scale:.1,opacity:0},animate:{scale:1,opacity:1},exit:{scale:.1,opacity:0},transition:{type:"spring",damping:10},children:W.jsxs("ul",{className:"list-none flex justify-end items-start flex-col gap-2",children:[qE.map(o=>W.jsx("li",{className:`${n==o.title?"text-black":"text-secondary"} font-poppins hover:underline underline-offset-8 font-medium cursor-pointer text-[16px] hover:text-black`,onClick:()=>{o.type!="tools"&&i(!t),e(o.title),o.type=="tools"&&s(!r)},children:o.type=="tools"?o.title:W.jsxs("a",{to:`#${o.id}`,children:[o.title," "]})},o.id))," "]})})})]})]})})};/** * @license * Copyright 2010-2024 Three.js Authors * SPDX-License-Identifier: MIT - */const Bg="165",Ra={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},La={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},UL=0,g_=1,OL=2,J5=3,kL=0,zg=1,mf=2,Rr=3,Xs=0,Ai=1,Dr=2,Bs=0,Xa=1,v_=2,y_=3,x_=4,FL=5,To=100,BL=101,zL=102,VL=103,HL=104,GL=200,WL=201,jL=202,XL=203,ng=204,ig=205,YL=206,qL=207,KL=208,ZL=209,JL=210,$L=211,QL=212,eI=213,tI=214,nI=0,iI=1,rI=2,Gf=3,sI=4,oI=5,aI=6,lI=7,Mh=0,cI=1,uI=2,ls=0,fI=1,hI=2,dI=3,L1=4,pI=5,mI=6,gI=7,__="attached",vI="detached",Vg=300,Ys=301,jo=302,Wf=303,jf=304,Zc=306,Xf=1e3,xr=1001,Yf=1002,Wn=1003,I1=1004,$5=1004,xc=1005,Q5=1005,Pn=1006,gf=1007,eH=1007,ns=1008,tH=1008,us=1009,yI=1010,xI=1011,qf=1012,N1=1013,nl=1014,Ji=1015,Eh=1016,D1=1017,U1=1018,il=1020,_I=35902,SI=1021,AI=1022,_i=1023,wI=1024,MI=1025,Ya=1026,rl=1027,O1=1028,k1=1029,EI=1030,F1=1031,B1=1033,dm=33776,pm=33777,mm=33778,gm=33779,S_=35840,A_=35841,w_=35842,M_=35843,E_=36196,T_=37492,b_=37496,C_=37808,P_=37809,R_=37810,L_=37811,I_=37812,N_=37813,D_=37814,U_=37815,O_=37816,k_=37817,F_=37818,B_=37819,z_=37820,V_=37821,vm=36492,H_=36494,G_=36495,TI=36283,W_=36284,j_=36285,X_=36286,bI=2200,CI=2201,PI=2202,Kf=2300,rg=2301,ym=2302,Ba=2400,za=2401,Zf=2402,Hg=2500,z1=2501,nH=0,iH=1,rH=2,RI=3200,LI=3201,Qo=0,II=1,Rs="",mr="srgb",Js="srgb-linear",Gg="display-p3",Th="display-p3-linear",Jf="linear",Yt="srgb",$f="rec709",Qf="p3",sH=0,Ia=7680,oH=7681,aH=7682,lH=7683,cH=34055,uH=34056,fH=5386,hH=512,dH=513,pH=514,mH=515,gH=516,vH=517,yH=518,Y_=519,NI=512,DI=513,UI=514,V1=515,OI=516,kI=517,FI=518,BI=519,eh=35044,xH=35048,_H=35040,SH=35045,AH=35049,wH=35041,MH=35046,EH=35050,TH=35042,bH="100",q_="300 es",is=2e3,th=2001;class fs{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]+ii[n>>16&255]+ii[n>>24&255]+"-"+ii[e&255]+ii[e>>8&255]+"-"+ii[e>>16&15|64]+ii[e>>24&255]+"-"+ii[t&63|128]+ii[t>>8&255]+"-"+ii[t>>16&255]+ii[t>>24&255]+ii[i&255]+ii[i>>8&255]+ii[i>>16&255]+ii[i>>24&255]).toLowerCase()}function vn(n,e,t){return Math.max(e,Math.min(t,n))}function H1(n,e){return(n%e+e)%e}function CH(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function PH(n,e,t){return n!==e?(t-n)/(e-n):0}function vf(n,e,t){return(1-t)*n+t*e}function RH(n,e,t,i){return vf(n,e,1-Math.exp(-t*i))}function LH(n,e=1){return e-Math.abs(H1(n,e*2)-e)}function IH(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function NH(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function DH(n,e){return n+Math.floor(Math.random()*(e-n+1))}function UH(n,e){return n+Math.random()*(e-n)}function OH(n){return n*(.5-Math.random())}function kH(n){n!==void 0&&(IT=n);let e=IT+=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 FH(n){return n*qa}function BH(n){return n*Hc}function zH(n){return(n&n-1)===0&&n!==0}function VH(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function HH(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function GH(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),l=o(t/2),f=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),m=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,l*d,l*p,a*f);break;case"YZY":n.set(l*p,a*h,l*d,a*f);break;case"ZXZ":n.set(l*d,l*p,a*h,a*f);break;case"XZX":n.set(a*h,l*y,l*m,a*f);break;case"YXY":n.set(l*m,a*h,l*y,a*f);break;case"ZYZ":n.set(l*y,l*m,a*h,a*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function xi(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 _t(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 zI={DEG2RAD:qa,RAD2DEG:Hc,generateUUID:Qi,clamp:vn,euclideanModulo:H1,mapLinear:CH,inverseLerp:PH,lerp:vf,damp:RH,pingpong:LH,smoothstep:IH,smootherstep:NH,randInt:DH,randFloat:UH,randFloatSpread:OH,seededRandom:kH,degToRad:FH,radToDeg:BH,isPowerOfTwo:zH,ceilPowerOfTwo:VH,floorPowerOfTwo:HH,setQuaternionFromProperEuler:GH,normalize:_t,denormalize:xi};class pe{constructor(e=0,t=0){pe.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(vn(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,l,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,l,f)}set(e,t,i,r,s,o,a,l,f){const h=this.elements;return h[0]=e,h[1]=r,h[2]=a,h[3]=t,h[4]=s,h[5]=l,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],l=i[6],f=i[1],h=i[4],d=i[7],p=i[2],m=i[5],y=i[8],_=r[0],x=r[3],g=r[6],S=r[1],A=r[4],E=r[7],R=r[2],C=r[5],L=r[8];return s[0]=o*_+a*S+l*R,s[3]=o*x+a*A+l*C,s[6]=o*g+a*E+l*L,s[1]=f*_+h*S+d*R,s[4]=f*x+h*A+d*C,s[7]=f*g+h*E+d*L,s[2]=p*_+m*S+y*R,s[5]=p*x+m*A+y*C,s[8]=p*g+m*E+y*L,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],l=e[6],f=e[7],h=e[8];return t*o*h-t*a*f-i*s*h+i*a*l+r*s*f-r*o*l}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],l=e[6],f=e[7],h=e[8],d=h*o-a*f,p=a*l-h*s,m=f*s-o*l,y=t*d+i*p+r*m;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/y;return e[0]=d*_,e[1]=(r*f-h*i)*_,e[2]=(a*i-r*o)*_,e[3]=p*_,e[4]=(h*t-r*l)*_,e[5]=(r*s-a*t)*_,e[6]=m*_,e[7]=(i*l-f*t)*_,e[8]=(o*t-i*s)*_,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 l=Math.cos(s),f=Math.sin(s);return this.set(i*l,i*f,-i*(l*o+f*a)+o+e,-r*f,r*l,-r*(-f*o+l*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(ly.makeScale(e,t)),this}rotate(e){return this.premultiply(ly.makeRotation(-e)),this}translate(e,t){return this.premultiply(ly.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 ly=new xt;function VI(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const WH={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function _c(n,e){return new WH[n](e)}function nh(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function HI(){const n=nh("canvas");return n.style.display="block",n}const NT={};function G1(n){n in NT||(NT[n]=!0,console.warn(n))}function jH(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)})}const DT=new xt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),UT=new xt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),rp={[Js]:{transfer:Jf,primaries:$f,toReference:n=>n,fromReference:n=>n},[mr]:{transfer:Yt,primaries:$f,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[Th]:{transfer:Jf,primaries:Qf,toReference:n=>n.applyMatrix3(UT),fromReference:n=>n.applyMatrix3(DT)},[Gg]:{transfer:Yt,primaries:Qf,toReference:n=>n.convertSRGBToLinear().applyMatrix3(UT),fromReference:n=>n.applyMatrix3(DT).convertLinearToSRGB()}},XH=new Set([Js,Th]),Bt={enabled:!0,_workingColorSpace:Js,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!XH.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=rp[e].toReference,r=rp[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 rp[n].primaries},getTransfer:function(n){return n===Rs?Jf:rp[n].transfer}};function Ic(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function cy(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let Il;class GI{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{Il===void 0&&(Il=nh("canvas")),Il.width=e.width,Il.height=e.height;const i=Il.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=Il}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=nh("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!==Vg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Xf:e.x=e.x-Math.floor(e.x);break;case xr:e.x=e.x<0?0:1;break;case Yf: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 Xf:e.y=e.y-Math.floor(e.y);break;case xr:e.y=e.y<0?0:1;break;case Yf: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++}}tn.DEFAULT_IMAGE=null;tn.DEFAULT_MAPPING=Vg;tn.DEFAULT_ANISOTROPY=1;class zt{constructor(e=0,t=0,i=0,r=1){zt.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 l=e.elements,f=l[0],h=l[4],d=l[8],p=l[1],m=l[5],y=l[9],_=l[2],x=l[6],g=l[10];if(Math.abs(h-p)<.01&&Math.abs(d-_)<.01&&Math.abs(y-x)<.01){if(Math.abs(h+p)<.1&&Math.abs(d+_)<.1&&Math.abs(y+x)<.1&&Math.abs(f+m+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const A=(f+1)/2,E=(m+1)/2,R=(g+1)/2,C=(h+p)/4,L=(d+_)/4,I=(y+x)/4;return A>E&&A>R?A<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(A),r=C/i,s=L/i):E>R?E<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(E),i=C/r,s=I/r):R<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(R),i=L/s,r=I/s),this.set(i,r,s,t),this}let S=Math.sqrt((x-y)*(x-y)+(d-_)*(d-_)+(p-h)*(p-h));return Math.abs(S)<.001&&(S=1),this.x=(x-y)/S,this.y=(d-_)/S,this.z=(p-h)/S,this.w=Math.acos((f+m+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const 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 WI extends fs{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new zt(0,0,e,t),this.scissorTest=!1,this.viewport=new zt(0,0,e,t);const r={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Pn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const s=new tn(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,A=1-g*g;if(A>Number.EPSILON){const R=Math.sqrt(A),C=Math.atan2(R,g*S);x=Math.sin(x*C)/R,a=Math.sin(a*C)/R}const E=a*S;if(l=l*x+p*E,f=f*x+m*E,h=h*x+y*E,d=d*x+_*E,x===1-a){const R=1/Math.sqrt(l*l+f*f+h*h+d*d);l*=R,f*=R,h*=R,d*=R}}e[t]=l,e[t+1]=f,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],l=i[r+1],f=i[r+2],h=i[r+3],d=s[o],p=s[o+1],m=s[o+2],y=s[o+3];return e[t]=a*y+h*d+l*m-f*p,e[t+1]=l*y+h*p+f*d-a*m,e[t+2]=f*y+h*m+a*p-l*d,e[t+3]=h*y-a*d-l*p-f*m,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,l=Math.sin,f=a(i/2),h=a(r/2),d=a(s/2),p=l(i/2),m=l(r/2),y=l(s/2);switch(o){case"XYZ":this._x=p*h*d+f*m*y,this._y=f*m*d-p*h*y,this._z=f*h*y+p*m*d,this._w=f*h*d-p*m*y;break;case"YXZ":this._x=p*h*d+f*m*y,this._y=f*m*d-p*h*y,this._z=f*h*y-p*m*d,this._w=f*h*d+p*m*y;break;case"ZXY":this._x=p*h*d-f*m*y,this._y=f*m*d+p*h*y,this._z=f*h*y+p*m*d,this._w=f*h*d-p*m*y;break;case"ZYX":this._x=p*h*d-f*m*y,this._y=f*m*d+p*h*y,this._z=f*h*y-p*m*d,this._w=f*h*d+p*m*y;break;case"YZX":this._x=p*h*d+f*m*y,this._y=f*m*d+p*h*y,this._z=f*h*y-p*m*d,this._w=f*h*d-p*m*y;break;case"XZY":this._x=p*h*d-f*m*y,this._y=f*m*d-p*h*y,this._z=f*h*y+p*m*d,this._w=f*h*d+p*m*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],l=t[9],f=t[2],h=t[6],d=t[10],p=i+a+d;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(h-l)*m,this._y=(s-f)*m,this._z=(o-r)*m}else if(i>a&&i>d){const m=2*Math.sqrt(1+i-a-d);this._w=(h-l)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+f)/m}else if(a>d){const m=2*Math.sqrt(1+a-i-d);this._w=(s-f)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(l+h)/m}else{const m=2*Math.sqrt(1+d-i-a);this._w=(o-r)/m,this._x=(s+f)/m,this._y=(l+h)/m,this._z=.25*m}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(vn(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,l=t._y,f=t._z,h=t._w;return this._x=i*h+o*a+r*f-s*l,this._y=r*h+o*l+s*a-i*f,this._z=s*h+o*f+i*l-r*a,this._w=o*h-i*a-r*l-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 l=1-a*a;if(l<=Number.EPSILON){const m=1-t;return this._w=m*o+t*this._w,this._x=m*i+t*this._x,this._y=m*r+t*this._y,this._z=m*s+t*this._z,this.normalize(),this}const f=Math.sqrt(l),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 O{constructor(e=0,t=0,i=0){O.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(OT.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(OT.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,l=e.w,f=2*(o*r-a*i),h=2*(a*t-s*r),d=2*(s*i-o*t);return this.x=t+l*f+o*d-a*h,this.y=i+l*h+a*f-s*d,this.z=r+l*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,l=t.z;return this.x=r*l-s*a,this.y=s*o-i*l,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 fy.copy(this).projectOnVector(e),this.sub(fy)}reflect(e){return this.sub(fy.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(vn(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 fy=new O,OT=new li;class wi{constructor(e=new O(1/0,1/0,1/0),t=new O(-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;tthis.max.x||e.ythis.max.y||e.zthis.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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Tr),Tr.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(Nu),op.subVectors(this.max,Nu),Nl.subVectors(e.a,Nu),Dl.subVectors(e.b,Nu),Ul.subVectors(e.c,Nu),fo.subVectors(Dl,Nl),ho.subVectors(Ul,Dl),da.subVectors(Nl,Ul);let t=[0,-fo.z,fo.y,0,-ho.z,ho.y,0,-da.z,da.y,fo.z,0,-fo.x,ho.z,0,-ho.x,da.z,0,-da.x,-fo.y,fo.x,0,-ho.y,ho.x,0,-da.y,da.x,0];return!hy(t,Nl,Dl,Ul,op)||(t=[1,0,0,0,1,0,0,0,1],!hy(t,Nl,Dl,Ul,op))?!1:(ap.crossVectors(fo,ho),t=[ap.x,ap.y,ap.z],hy(t,Nl,Dl,Ul,op))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Tr).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Tr).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:(_s[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),_s[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),_s[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),_s[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),_s[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),_s[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),_s[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),_s[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(_s),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 _s=[new O,new O,new O,new O,new O,new O,new O,new O],Tr=new O,sp=new wi,Nl=new O,Dl=new O,Ul=new O,fo=new O,ho=new O,da=new O,Nu=new O,op=new O,ap=new O,pa=new O;function hy(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){pa.fromArray(n,s);const a=r.x*Math.abs(pa.x)+r.y*Math.abs(pa.y)+r.z*Math.abs(pa.z),l=e.dot(pa),f=t.dot(pa),h=i.dot(pa);if(Math.max(-Math.max(l,f,h),Math.min(l,f,h))>a)return!1}return!0}const JH=new wi,Du=new O,dy=new O;class ci{constructor(e=new O,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):JH.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;Du.subVectors(e,this.center);const t=Du.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(Du,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):(dy.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Du.copy(e.center).add(dy)),this.expandByPoint(Du.copy(e.center).sub(dy))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Ss=new O,py=new O,lp=new O,po=new O,my=new O,cp=new O,gy=new O;class dl{constructor(e=new O,t=new O(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,Ss)),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=Ss.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Ss.copy(this.origin).addScaledVector(this.direction,t),Ss.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){py.copy(e).add(t).multiplyScalar(.5),lp.copy(t).sub(e).normalize(),po.copy(this.origin).sub(py);const s=e.distanceTo(t)*.5,o=-this.direction.dot(lp),a=po.dot(this.direction),l=-po.dot(lp),f=po.lengthSq(),h=Math.abs(1-o*o);let d,p,m,y;if(h>0)if(d=o*l-a,p=o*a-l,y=s*h,d>=0)if(p>=-y)if(p<=y){const _=1/h;d*=_,p*=_,m=d*(d+o*p+2*a)+p*(o*d+p+2*l)+f}else p=s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+f;else p=-s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+f;else p<=-y?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-l),s),m=-d*d+p*(p+2*l)+f):p<=y?(d=0,p=Math.min(Math.max(-s,-l),s),m=p*(p+2*l)+f):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-l),s),m=-d*d+p*(p+2*l)+f);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*l)+f;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(py).addScaledVector(lp,p),m}intersectSphere(e,t){Ss.subVectors(e.center,this.origin);const i=Ss.dot(this.direction),r=Ss.dot(Ss)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,l=i+o;return l<0?null:a<0?this.at(l,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,l;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,l=(e.max.z-p.z)*d):(a=(e.max.z-p.z)*d,l=(e.min.z-p.z)*d),i>l||a>r)||((a>i||i!==i)&&(i=a),(l=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,Ss)!==null}intersectTriangle(e,t,i,r,s){my.subVectors(t,e),cp.subVectors(i,e),gy.crossVectors(my,cp);let o=this.direction.dot(gy),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;po.subVectors(this.origin,e);const l=a*this.direction.dot(cp.crossVectors(po,cp));if(l<0)return null;const f=a*this.direction.dot(my.cross(po));if(f<0||l+f>o)return null;const h=-a*po.dot(gy);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 at{constructor(e,t,i,r,s,o,a,l,f,h,d,p,m,y,_,x){at.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,l,f,h,d,p,m,y,_,x)}set(e,t,i,r,s,o,a,l,f,h,d,p,m,y,_,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]=l,g[2]=f,g[6]=h,g[10]=d,g[14]=p,g[3]=m,g[7]=y,g[11]=_,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 at().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/Ol.setFromMatrixColumn(e,0).length(),s=1/Ol.setFromMatrixColumn(e,1).length(),o=1/Ol.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),l=Math.cos(r),f=Math.sin(r),h=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*h,m=o*d,y=a*h,_=a*d;t[0]=l*h,t[4]=-l*d,t[8]=f,t[1]=m+y*f,t[5]=p-_*f,t[9]=-a*l,t[2]=_-p*f,t[6]=y+m*f,t[10]=o*l}else if(e.order==="YXZ"){const p=l*h,m=l*d,y=f*h,_=f*d;t[0]=p+_*a,t[4]=y*a-m,t[8]=o*f,t[1]=o*d,t[5]=o*h,t[9]=-a,t[2]=m*a-y,t[6]=_+p*a,t[10]=o*l}else if(e.order==="ZXY"){const p=l*h,m=l*d,y=f*h,_=f*d;t[0]=p-_*a,t[4]=-o*d,t[8]=y+m*a,t[1]=m+y*a,t[5]=o*h,t[9]=_-p*a,t[2]=-o*f,t[6]=a,t[10]=o*l}else if(e.order==="ZYX"){const p=o*h,m=o*d,y=a*h,_=a*d;t[0]=l*h,t[4]=y*f-m,t[8]=p*f+_,t[1]=l*d,t[5]=_*f+p,t[9]=m*f-y,t[2]=-f,t[6]=a*l,t[10]=o*l}else if(e.order==="YZX"){const p=o*l,m=o*f,y=a*l,_=a*f;t[0]=l*h,t[4]=_-p*d,t[8]=y*d+m,t[1]=d,t[5]=o*h,t[9]=-a*h,t[2]=-f*h,t[6]=m*d+y,t[10]=p-_*d}else if(e.order==="XZY"){const p=o*l,m=o*f,y=a*l,_=a*f;t[0]=l*h,t[4]=-d,t[8]=f*h,t[1]=p*d+_,t[5]=o*h,t[9]=m*d-y,t[2]=y*d-m,t[6]=a*h,t[10]=_*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($H,e,QH)}lookAt(e,t,i){const r=this.elements;return ji.subVectors(e,t),ji.lengthSq()===0&&(ji.z=1),ji.normalize(),mo.crossVectors(i,ji),mo.lengthSq()===0&&(Math.abs(i.z)===1?ji.x+=1e-4:ji.z+=1e-4,ji.normalize(),mo.crossVectors(i,ji)),mo.normalize(),up.crossVectors(ji,mo),r[0]=mo.x,r[4]=up.x,r[8]=ji.x,r[1]=mo.y,r[5]=up.y,r[9]=ji.y,r[2]=mo.z,r[6]=up.z,r[10]=ji.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],l=i[8],f=i[12],h=i[1],d=i[5],p=i[9],m=i[13],y=i[2],_=i[6],x=i[10],g=i[14],S=i[3],A=i[7],E=i[11],R=i[15],C=r[0],L=r[4],I=r[8],P=r[12],b=r[1],D=r[5],j=r[9],X=r[13],te=r[2],ne=r[6],$=r[10],le=r[14],k=r[3],q=r[7],J=r[11],Q=r[15];return s[0]=o*C+a*b+l*te+f*k,s[4]=o*L+a*D+l*ne+f*q,s[8]=o*I+a*j+l*$+f*J,s[12]=o*P+a*X+l*le+f*Q,s[1]=h*C+d*b+p*te+m*k,s[5]=h*L+d*D+p*ne+m*q,s[9]=h*I+d*j+p*$+m*J,s[13]=h*P+d*X+p*le+m*Q,s[2]=y*C+_*b+x*te+g*k,s[6]=y*L+_*D+x*ne+g*q,s[10]=y*I+_*j+x*$+g*J,s[14]=y*P+_*X+x*le+g*Q,s[3]=S*C+A*b+E*te+R*k,s[7]=S*L+A*D+E*ne+R*q,s[11]=S*I+A*j+E*$+R*J,s[15]=S*P+A*X+E*le+R*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],l=e[9],f=e[13],h=e[2],d=e[6],p=e[10],m=e[14],y=e[3],_=e[7],x=e[11],g=e[15];return y*(+s*l*d-r*f*d-s*a*p+i*f*p+r*a*m-i*l*m)+_*(+t*l*m-t*f*p+s*o*p-r*o*m+r*f*h-s*l*h)+x*(+t*f*d-t*a*m-s*o*d+i*o*m+s*a*h-i*f*h)+g*(-r*a*h-t*l*d+t*a*p+r*o*d-i*o*p+i*l*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],l=e[6],f=e[7],h=e[8],d=e[9],p=e[10],m=e[11],y=e[12],_=e[13],x=e[14],g=e[15],S=d*x*f-_*p*f+_*l*m-a*x*m-d*l*g+a*p*g,A=y*p*f-h*x*f-y*l*m+o*x*m+h*l*g-o*p*g,E=h*_*f-y*d*f+y*a*m-o*_*m-h*a*g+o*d*g,R=y*d*l-h*_*l-y*a*p+o*_*p+h*a*x-o*d*x,C=t*S+i*A+r*E+s*R;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/C;return e[0]=S*L,e[1]=(_*p*s-d*x*s-_*r*m+i*x*m+d*r*g-i*p*g)*L,e[2]=(a*x*s-_*l*s+_*r*f-i*x*f-a*r*g+i*l*g)*L,e[3]=(d*l*s-a*p*s-d*r*f+i*p*f+a*r*m-i*l*m)*L,e[4]=A*L,e[5]=(h*x*s-y*p*s+y*r*m-t*x*m-h*r*g+t*p*g)*L,e[6]=(y*l*s-o*x*s-y*r*f+t*x*f+o*r*g-t*l*g)*L,e[7]=(o*p*s-h*l*s+h*r*f-t*p*f-o*r*m+t*l*m)*L,e[8]=E*L,e[9]=(y*d*s-h*_*s-y*i*m+t*_*m+h*i*g-t*d*g)*L,e[10]=(o*_*s-y*a*s+y*i*f-t*_*f-o*i*g+t*a*g)*L,e[11]=(h*a*s-o*d*s-h*i*f+t*d*f+o*i*m-t*a*m)*L,e[12]=R*L,e[13]=(h*_*r-y*d*r+y*i*p-t*_*p-h*i*x+t*d*x)*L,e[14]=(y*a*r-o*_*r-y*i*l+t*_*l+o*i*x-t*a*x)*L,e[15]=(o*d*r-h*a*r+h*i*l-t*d*l-o*i*p+t*a*p)*L,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,l=e.z,f=s*o,h=s*a;return this.set(f*o+i,f*a-r*l,f*l+r*a,0,f*a+r*l,h*a+i,h*l-r*o,0,f*l-r*a,h*l+r*o,s*l*l+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,l=t._w,f=s+s,h=o+o,d=a+a,p=s*f,m=s*h,y=s*d,_=o*h,x=o*d,g=a*d,S=l*f,A=l*h,E=l*d,R=i.x,C=i.y,L=i.z;return r[0]=(1-(_+g))*R,r[1]=(m+E)*R,r[2]=(y-A)*R,r[3]=0,r[4]=(m-E)*C,r[5]=(1-(p+g))*C,r[6]=(x+S)*C,r[7]=0,r[8]=(y+A)*L,r[9]=(x-S)*L,r[10]=(1-(p+_))*L,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=Ol.set(r[0],r[1],r[2]).length();const o=Ol.set(r[4],r[5],r[6]).length(),a=Ol.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],br.copy(this);const f=1/s,h=1/o,d=1/a;return br.elements[0]*=f,br.elements[1]*=f,br.elements[2]*=f,br.elements[4]*=h,br.elements[5]*=h,br.elements[6]*=h,br.elements[8]*=d,br.elements[9]*=d,br.elements[10]*=d,t.setFromRotationMatrix(br),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=is){const l=this.elements,f=2*s/(t-e),h=2*s/(i-r),d=(t+e)/(t-e),p=(i+r)/(i-r);let m,y;if(a===is)m=-(o+s)/(o-s),y=-2*o*s/(o-s);else if(a===th)m=-o/(o-s),y=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return l[0]=f,l[4]=0,l[8]=d,l[12]=0,l[1]=0,l[5]=h,l[9]=p,l[13]=0,l[2]=0,l[6]=0,l[10]=m,l[14]=y,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(e,t,i,r,s,o,a=is){const l=this.elements,f=1/(t-e),h=1/(i-r),d=1/(o-s),p=(t+e)*f,m=(i+r)*h;let y,_;if(a===is)y=(o+s)*d,_=-2*d;else if(a===th)y=s*d,_=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return l[0]=2*f,l[4]=0,l[8]=0,l[12]=-p,l[1]=0,l[5]=2*h,l[9]=0,l[13]=-m,l[2]=0,l[6]=0,l[10]=_,l[14]=-y,l[3]=0,l[7]=0,l[11]=0,l[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 Ol=new O,br=new at,$H=new O(0,0,0),QH=new O(1,1,1),mo=new O,up=new O,ji=new O,kT=new at,FT=new li;class Mi{constructor(e=0,t=0,i=0,r=Mi.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],l=r[1],f=r[5],h=r[9],d=r[2],p=r[6],m=r[10];switch(t){case"XYZ":this._y=Math.asin(vn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,f),this._z=0);break;case"YXZ":this._x=Math.asin(-vn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(l,f)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(vn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,m),this._z=Math.atan2(-o,f)):(this._y=0,this._z=Math.atan2(l,s));break;case"ZYX":this._y=Math.asin(-vn(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,m),this._z=Math.atan2(l,s)):(this._x=0,this._z=Math.atan2(-o,f));break;case"YZX":this._z=Math.asin(vn(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,f),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-vn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,f),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,m),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 kT.makeRotationFromQuaternion(e),this.setFromRotationMatrix(kT,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return FT.setFromEuler(this),this.setFromQuaternion(FT,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}}Mi.DEFAULT_ORDER="XYZ";class Ka{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.maxGeometryCount=this._maxGeometryCount,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,l){return a[l.uuid]===void 0&&(a[l.uuid]=l.toJSON(e)),l.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 l=a.shapes;if(Array.isArray(l))for(let f=0,h=l.length;f0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(i.geometries=a),l.length>0&&(i.materials=l),f.length>0&&(i.textures=f),h.length>0&&(i.images=h),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),m.length>0&&(i.animations=m),y.length>0&&(i.nodes=y)}return i.object=r,i;function o(a){const l=[];for(const f in a){const h=a[f];delete h.metadata,l.push(h)}return l}}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){Cr.subVectors(r,t),ws.subVectors(i,t),yy.subVectors(e,t);const o=Cr.dot(Cr),a=Cr.dot(ws),l=Cr.dot(yy),f=ws.dot(ws),h=ws.dot(yy),d=o*f-a*a;if(d===0)return s.set(0,0,0),null;const p=1/d,m=(f*l-a*h)*p,y=(o*h-a*l)*p;return s.set(1-m-y,y,m)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,Ms)===null?!1:Ms.x>=0&&Ms.y>=0&&Ms.x+Ms.y<=1}static getInterpolation(e,t,i,r,s,o,a,l){return this.getBarycoord(e,t,i,r,Ms)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(s,Ms.x),l.addScaledVector(o,Ms.y),l.addScaledVector(a,Ms.z),l)}static isFrontFacing(e,t,i,r){return Cr.subVectors(i,t),ws.subVectors(e,t),Cr.cross(ws).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 Cr.subVectors(this.c,this.b),ws.subVectors(this.a,this.b),Cr.cross(ws).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return Ki.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return Ki.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,s){return Ki.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return Ki.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return Ki.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;Bl.subVectors(r,i),zl.subVectors(s,i),xy.subVectors(e,i);const l=Bl.dot(xy),f=zl.dot(xy);if(l<=0&&f<=0)return t.copy(i);_y.subVectors(e,r);const h=Bl.dot(_y),d=zl.dot(_y);if(h>=0&&d<=h)return t.copy(r);const p=l*d-h*f;if(p<=0&&l>=0&&h<=0)return o=l/(l-h),t.copy(i).addScaledVector(Bl,o);Sy.subVectors(e,s);const m=Bl.dot(Sy),y=zl.dot(Sy);if(y>=0&&m<=y)return t.copy(s);const _=m*f-l*y;if(_<=0&&f>=0&&y<=0)return a=f/(f-y),t.copy(i).addScaledVector(zl,a);const x=h*y-m*d;if(x<=0&&d-h>=0&&m-y>=0)return WT.subVectors(s,r),a=(d-h)/(d-h+(m-y)),t.copy(r).addScaledVector(WT,a);const g=1/(x+_+p);return o=_*g,a=p*g,t.copy(i).addScaledVector(Bl,o).addScaledVector(zl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const jI={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},go={h:0,s:0,l:0},hp={h:0,s:0,l:0};function Ay(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 je{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=mr){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Bt.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Bt.workingColorSpace){return this.r=e,this.g=t,this.b=i,Bt.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Bt.workingColorSpace){if(e=H1(e,1),t=vn(t,0,1),i=vn(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=Ay(o,s,e+1/3),this.g=Ay(o,s,e),this.b=Ay(o,s,e-1/3)}return Bt.toWorkingColorSpace(this,r),this}setStyle(e,t=mr){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=mr){const i=jI[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=Ic(e.r),this.g=Ic(e.g),this.b=Ic(e.b),this}copyLinearToSRGB(e){return this.r=cy(e.r),this.g=cy(e.g),this.b=cy(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=mr){return Bt.fromWorkingColorSpace(ri.copy(this),e),Math.round(vn(ri.r*255,0,255))*65536+Math.round(vn(ri.g*255,0,255))*256+Math.round(vn(ri.b*255,0,255))}getHexString(e=mr){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Bt.workingColorSpace){Bt.fromWorkingColorSpace(ri.copy(this),t);const i=ri.r,r=ri.g,s=ri.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let l,f;const h=(a+o)/2;if(a===o)l=0,f=0;else{const d=o-a;switch(f=h<=.5?d/(o+a):d/(2-o-a),o){case i:l=(r-s)/d+(r0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}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!==Xa&&(i.blending=this.blending),this.side!==Xs&&(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!==ng&&(i.blendSrc=this.blendSrc),this.blendDst!==ig&&(i.blendDst=this.blendDst),this.blendEquation!==To&&(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!==Gf&&(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!==Y_&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ia&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Ia&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Ia&&(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 l=s[a];delete l.metadata,o.push(l)}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++}}class ea extends Zn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new je(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 Mi,this.combine=Mh,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 Ls=sG();function sG(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),r=new Uint32Array(512);for(let l=0;l<256;++l){const f=l-127;f<-27?(i[l]=0,i[l|256]=32768,r[l]=24,r[l|256]=24):f<-14?(i[l]=1024>>-f-14,i[l|256]=1024>>-f-14|32768,r[l]=-f-1,r[l|256]=-f-1):f<=15?(i[l]=f+15<<10,i[l|256]=f+15<<10|32768,r[l]=13,r[l|256]=13):f<128?(i[l]=31744,i[l|256]=64512,r[l]=24,r[l|256]=24):(i[l]=31744,i[l|256]=64512,r[l]=13,r[l|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let l=1;l<1024;++l){let f=l<<13,h=0;for(;!(f&8388608);)f<<=1,h-=8388608;f&=-8388609,h+=947912704,s[l]=f|h}for(let l=1024;l<2048;++l)s[l]=939524096+(l-1024<<13);for(let l=1;l<31;++l)o[l]=l<<23;o[31]=1199570944,o[32]=2147483648;for(let l=33;l<63;++l)o[l]=2147483648+(l-32<<23);o[63]=3347054592;for(let l=1;l<64;++l)l!==32&&(a[l]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function Ii(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=vn(n,-65504,65504),Ls.floatView[0]=n;const e=Ls.uint32View[0],t=e>>23&511;return Ls.baseTable[t]+((e&8388607)>>Ls.shiftTable[t])}function Qu(n){const e=n>>10;return Ls.uint32View[0]=Ls.mantissaTable[Ls.offsetTable[e]+(n&1023)]+Ls.exponentTable[e],Ls.floatView[0]}const oG={toHalfFloat:Ii,fromHalfFloat:Qu},Tn=new O,dp=new pe;class Ht{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=eh,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ji,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return G1("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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 l=this.parameters;for(const f in l)l[f]!==void 0&&(e[f]=l[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 l in i){const f=i[l];e.data.attributes[l]=f.toJSON(e.data)}const r={};let s=!1;for(const l in this.morphAttributes){const f=this.morphAttributes[l],h=[];for(let d=0,p=f.length;d0&&(r[l]=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,m=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))&&(jT.copy(s).invert(),ma.copy(e.ray).applyMatrix4(jT),!(i.boundingBox!==null&&ma.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,ma)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,l=s.attributes.position,f=s.attributes.uv,h=s.attributes.uv1,d=s.attributes.normal,p=s.groups,m=s.drawRange;if(a!==null)if(Array.isArray(o))for(let y=0,_=p.length;y<_;y++){const x=p[y],g=o[x.materialIndex],S=Math.max(x.start,m.start),A=Math.min(a.count,Math.min(x.start+x.count,m.start+m.count));for(let E=S,R=A;Et.far?null:{distance:f,point:_p.clone(),object:n}}function Sp(n,e,t,i,r,s,o,a,l,f){n.getVertexPosition(a,Hl),n.getVertexPosition(l,Gl),n.getVertexPosition(f,Wl);const h=pG(n,e,t,i,Hl,Gl,Wl,xp);if(h){r&&(gp.fromBufferAttribute(r,a),vp.fromBufferAttribute(r,l),yp.fromBufferAttribute(r,f),h.uv=Ki.getInterpolation(xp,Hl,Gl,Wl,gp,vp,yp,new pe)),s&&(gp.fromBufferAttribute(s,a),vp.fromBufferAttribute(s,l),yp.fromBufferAttribute(s,f),h.uv1=Ki.getInterpolation(xp,Hl,Gl,Wl,gp,vp,yp,new pe)),o&&(YT.fromBufferAttribute(o,a),qT.fromBufferAttribute(o,l),KT.fromBufferAttribute(o,f),h.normal=Ki.getInterpolation(xp,Hl,Gl,Wl,YT,qT,KT,new O),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const d={a,b:l,c:f,normal:new O,materialIndex:0};Ki.getNormal(Hl,Gl,Wl,d.normal),h.face=d}return h}class pl extends St{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 l=[],f=[],h=[],d=[];let p=0,m=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(l),this.setAttribute("position",new Ze(f,3)),this.setAttribute("normal",new Ze(h,3)),this.setAttribute("uv",new Ze(d,2));function y(_,x,g,S,A,E,R,C,L,I,P){const b=E/L,D=R/I,j=E/2,X=R/2,te=C/2,ne=L+1,$=I+1;let le=0,k=0;const q=new O;for(let J=0;J<$;J++){const Q=J*D-X;for(let _e=0;_e0?1:-1,h.push(q.x,q.y,q.z),d.push(_e/L),d.push(1-J/I),le+=1}}for(let J=0;J>8&255]+ni[n>>16&255]+ni[n>>24&255]+"-"+ni[e&255]+ni[e>>8&255]+"-"+ni[e>>16&15|64]+ni[e>>24&255]+"-"+ni[t&63|128]+ni[t>>8&255]+"-"+ni[t>>16&255]+ni[t>>24&255]+ni[i&255]+ni[i>>8&255]+ni[i>>16&255]+ni[i>>24&255]).toLowerCase()}function vn(n,e,t){return Math.max(e,Math.min(t,n))}function x1(n,e){return(n%e+e)%e}function gV(n,e,t,i,r){return i+(n-e)*(r-i)/(t-e)}function vV(n,e,t){return n!==e?(t-n)/(e-n):0}function cf(n,e,t){return(1-t)*n+t*e}function yV(n,e,t,i){return cf(n,e,1-Math.exp(-t*i))}function xV(n,e=1){return e-Math.abs(x1(n,e*2)-e)}function _V(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*(3-2*n))}function SV(n,e,t){return n<=e?0:n>=t?1:(n=(n-e)/(t-e),n*n*n*(n*(n*6-15)+10))}function AV(n,e){return n+Math.floor(Math.random()*(e-n+1))}function MV(n,e){return n+Math.random()*(e-n)}function wV(n){return n*(.5-Math.random())}function EV(n){n!==void 0&&($E=n);let e=$E+=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 TV(n){return n*Ha}function bV(n){return n*Uc}function CV(n){return(n&n-1)===0&&n!==0}function PV(n){return Math.pow(2,Math.ceil(Math.log(n)/Math.LN2))}function RV(n){return Math.pow(2,Math.floor(Math.log(n)/Math.LN2))}function LV(n,e,t,i,r){const s=Math.cos,o=Math.sin,a=s(t/2),c=o(t/2),f=s((e+i)/2),h=o((e+i)/2),d=s((e-i)/2),p=o((e-i)/2),m=s((i-e)/2),y=o((i-e)/2);switch(r){case"XYX":n.set(a*h,c*d,c*p,a*f);break;case"YZY":n.set(c*p,a*h,c*d,a*f);break;case"ZXZ":n.set(c*d,c*p,a*h,a*f);break;case"XZX":n.set(a*h,c*y,c*m,a*f);break;case"YXY":n.set(c*m,a*h,c*y,a*f);break;case"ZYZ":n.set(c*y,c*m,a*h,a*f);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function yi(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 _t(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 JL={DEG2RAD:Ha,RAD2DEG:Uc,generateUUID:Qi,clamp:vn,euclideanModulo:x1,mapLinear:gV,inverseLerp:vV,lerp:cf,damp:yV,pingpong:xV,smoothstep:_V,smootherstep:SV,randInt:AV,randFloat:MV,randFloatSpread:wV,seededRandom:EV,degToRad:TV,radToDeg:bV,isPowerOfTwo:CV,ceilPowerOfTwo:PV,floorPowerOfTwo:RV,setQuaternionFromProperEuler:LV,normalize:_t,denormalize:yi};class pe{constructor(e=0,t=0){pe.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(vn(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,c,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,c,f)}set(e,t,i,r,s,o,a,c,f){const h=this.elements;return h[0]=e,h[1]=r,h[2]=a,h[3]=t,h[4]=s,h[5]=c,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],c=i[6],f=i[1],h=i[4],d=i[7],p=i[2],m=i[5],y=i[8],_=r[0],x=r[3],g=r[6],S=r[1],A=r[4],E=r[7],R=r[2],C=r[5],L=r[8];return s[0]=o*_+a*S+c*R,s[3]=o*x+a*A+c*C,s[6]=o*g+a*E+c*L,s[1]=f*_+h*S+d*R,s[4]=f*x+h*A+d*C,s[7]=f*g+h*E+d*L,s[2]=p*_+m*S+y*R,s[5]=p*x+m*A+y*C,s[8]=p*g+m*E+y*L,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],c=e[6],f=e[7],h=e[8];return t*o*h-t*a*f-i*s*h+i*a*c+r*s*f-r*o*c}invert(){const e=this.elements,t=e[0],i=e[1],r=e[2],s=e[3],o=e[4],a=e[5],c=e[6],f=e[7],h=e[8],d=h*o-a*f,p=a*c-h*s,m=f*s-o*c,y=t*d+i*p+r*m;if(y===0)return this.set(0,0,0,0,0,0,0,0,0);const _=1/y;return e[0]=d*_,e[1]=(r*f-h*i)*_,e[2]=(a*i-r*o)*_,e[3]=p*_,e[4]=(h*t-r*c)*_,e[5]=(r*s-a*t)*_,e[6]=m*_,e[7]=(i*c-f*t)*_,e[8]=(o*t-i*s)*_,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 c=Math.cos(s),f=Math.sin(s);return this.set(i*c,i*f,-i*(c*o+f*a)+o+e,-r*f,r*c,-r*(-f*o+c*a)+a+t,0,0,1),this}scale(e,t){return this.premultiply(Gv.makeScale(e,t)),this}rotate(e){return this.premultiply(Gv.makeRotation(-e)),this}translate(e,t){return this.premultiply(Gv.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 Gv=new xt;function QL(n){for(let e=n.length-1;e>=0;--e)if(n[e]>=65535)return!0;return!1}const IV={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function dc(n,e){return new IV[n](e)}function Xf(n){return document.createElementNS("http://www.w3.org/1999/xhtml",n)}function $L(){const n=Xf("canvas");return n.style.display="block",n}const eT={};function _1(n){n in eT||(eT[n]=!0,console.warn(n))}function DV(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)})}const tT=new xt().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),nT=new xt().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),jd={[qs]:{transfer:Vf,primaries:Hf,toReference:n=>n,fromReference:n=>n},[pr]:{transfer:Yt,primaries:Hf,toReference:n=>n.convertSRGBToLinear(),fromReference:n=>n.convertLinearToSRGB()},[dh]:{transfer:Vf,primaries:Gf,toReference:n=>n.applyMatrix3(nT),fromReference:n=>n.applyMatrix3(tT)},[bg]:{transfer:Yt,primaries:Gf,toReference:n=>n.convertSRGBToLinear().applyMatrix3(nT),fromReference:n=>n.applyMatrix3(tT).convertLinearToSRGB()}},NV=new Set([qs,dh]),Bt={enabled:!0,_workingColorSpace:qs,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(n){if(!NV.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=jd[e].toReference,r=jd[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 jd[n].primaries},getTransfer:function(n){return n===bs?Vf:jd[n].transfer}};function Ec(n){return n<.04045?n*.0773993808:Math.pow(n*.9478672986+.0521327014,2.4)}function Wv(n){return n<.0031308?n*12.92:1.055*Math.pow(n,.41666)-.055}let El;class eI{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{El===void 0&&(El=Xf("canvas")),El.width=e.width,El.height=e.height;const i=El.getContext("2d");e instanceof ImageData?i.putImageData(e,0,0):i.drawImage(e,0,0,e.width,e.height),t=El}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=Xf("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!==Eg)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case Of:e.x=e.x-Math.floor(e.x);break;case yr:e.x=e.x<0?0:1;break;case kf: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 Of:e.y=e.y-Math.floor(e.y);break;case yr:e.y=e.y<0?0:1;break;case kf: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++}}$t.DEFAULT_IMAGE=null;$t.DEFAULT_MAPPING=Eg;$t.DEFAULT_ANISOTROPY=1;class zt{constructor(e=0,t=0,i=0,r=1){zt.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 c=e.elements,f=c[0],h=c[4],d=c[8],p=c[1],m=c[5],y=c[9],_=c[2],x=c[6],g=c[10];if(Math.abs(h-p)<.01&&Math.abs(d-_)<.01&&Math.abs(y-x)<.01){if(Math.abs(h+p)<.1&&Math.abs(d+_)<.1&&Math.abs(y+x)<.1&&Math.abs(f+m+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;const A=(f+1)/2,E=(m+1)/2,R=(g+1)/2,C=(h+p)/4,L=(d+_)/4,I=(y+x)/4;return A>E&&A>R?A<.01?(i=0,r=.707106781,s=.707106781):(i=Math.sqrt(A),r=C/i,s=L/i):E>R?E<.01?(i=.707106781,r=0,s=.707106781):(r=Math.sqrt(E),i=C/r,s=I/r):R<.01?(i=.707106781,r=.707106781,s=0):(s=Math.sqrt(R),i=L/s,r=I/s),this.set(i,r,s,t),this}let S=Math.sqrt((x-y)*(x-y)+(d-_)*(d-_)+(p-h)*(p-h));return Math.abs(S)<.001&&(S=1),this.x=(x-y)/S,this.y=(d-_)/S,this.z=(p-h)/S,this.w=Math.acos((f+m+g-1)/2),this}min(e){return this.x=Math.min(this.x,e.x),this.y=Math.min(this.y,e.y),this.z=Math.min(this.z,e.z),this.w=Math.min(this.w,e.w),this}max(e){return this.x=Math.max(this.x,e.x),this.y=Math.max(this.y,e.y),this.z=Math.max(this.z,e.z),this.w=Math.max(this.w,e.w),this}clamp(e,t){return this.x=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){const 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 tI extends cs{constructor(e=1,t=1,i={}){super(),this.isRenderTarget=!0,this.width=e,this.height=t,this.depth=1,this.scissor=new zt(0,0,e,t),this.scissorTest=!1,this.viewport=new zt(0,0,e,t);const r={width:e,height:t,depth:1};i=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Pn,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},i);const s=new $t(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,A=1-g*g;if(A>Number.EPSILON){const R=Math.sqrt(A),C=Math.atan2(R,g*S);x=Math.sin(x*C)/R,a=Math.sin(a*C)/R}const E=a*S;if(c=c*x+p*E,f=f*x+m*E,h=h*x+y*E,d=d*x+_*E,x===1-a){const R=1/Math.sqrt(c*c+f*f+h*h+d*d);c*=R,f*=R,h*=R,d*=R}}e[t]=c,e[t+1]=f,e[t+2]=h,e[t+3]=d}static multiplyQuaternionsFlat(e,t,i,r,s,o){const a=i[r],c=i[r+1],f=i[r+2],h=i[r+3],d=s[o],p=s[o+1],m=s[o+2],y=s[o+3];return e[t]=a*y+h*d+c*m-f*p,e[t+1]=c*y+h*p+f*d-a*m,e[t+2]=f*y+h*m+a*p-c*d,e[t+3]=h*y-a*d-c*p-f*m,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,c=Math.sin,f=a(i/2),h=a(r/2),d=a(s/2),p=c(i/2),m=c(r/2),y=c(s/2);switch(o){case"XYZ":this._x=p*h*d+f*m*y,this._y=f*m*d-p*h*y,this._z=f*h*y+p*m*d,this._w=f*h*d-p*m*y;break;case"YXZ":this._x=p*h*d+f*m*y,this._y=f*m*d-p*h*y,this._z=f*h*y-p*m*d,this._w=f*h*d+p*m*y;break;case"ZXY":this._x=p*h*d-f*m*y,this._y=f*m*d+p*h*y,this._z=f*h*y+p*m*d,this._w=f*h*d-p*m*y;break;case"ZYX":this._x=p*h*d-f*m*y,this._y=f*m*d+p*h*y,this._z=f*h*y-p*m*d,this._w=f*h*d+p*m*y;break;case"YZX":this._x=p*h*d+f*m*y,this._y=f*m*d+p*h*y,this._z=f*h*y-p*m*d,this._w=f*h*d-p*m*y;break;case"XZY":this._x=p*h*d-f*m*y,this._y=f*m*d-p*h*y,this._z=f*h*y+p*m*d,this._w=f*h*d+p*m*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],c=t[9],f=t[2],h=t[6],d=t[10],p=i+a+d;if(p>0){const m=.5/Math.sqrt(p+1);this._w=.25/m,this._x=(h-c)*m,this._y=(s-f)*m,this._z=(o-r)*m}else if(i>a&&i>d){const m=2*Math.sqrt(1+i-a-d);this._w=(h-c)/m,this._x=.25*m,this._y=(r+o)/m,this._z=(s+f)/m}else if(a>d){const m=2*Math.sqrt(1+a-i-d);this._w=(s-f)/m,this._x=(r+o)/m,this._y=.25*m,this._z=(c+h)/m}else{const m=2*Math.sqrt(1+d-i-a);this._w=(o-r)/m,this._x=(s+f)/m,this._y=(c+h)/m,this._z=.25*m}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(vn(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,c=t._y,f=t._z,h=t._w;return this._x=i*h+o*a+r*f-s*c,this._y=r*h+o*c+s*a-i*f,this._z=s*h+o*f+i*c-r*a,this._w=o*h-i*a-r*c-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 c=1-a*a;if(c<=Number.EPSILON){const m=1-t;return this._w=m*o+t*this._w,this._x=m*i+t*this._x,this._y=m*r+t*this._y,this._z=m*s+t*this._z,this.normalize(),this}const f=Math.sqrt(c),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 O{constructor(e=0,t=0,i=0){O.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(iT.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(iT.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,c=e.w,f=2*(o*r-a*i),h=2*(a*t-s*r),d=2*(s*i-o*t);return this.x=t+c*f+o*d-a*h,this.y=i+c*h+a*f-s*d,this.z=r+c*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,c=t.z;return this.x=r*c-s*a,this.y=s*o-i*c,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 Xv.copy(this).projectOnVector(e),this.sub(Xv)}reflect(e){return this.sub(Xv.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(vn(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 Xv=new O,iT=new ai;class Ai{constructor(e=new O(1/0,1/0,1/0),t=new O(-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;tthis.max.x||e.ythis.max.y||e.zthis.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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,Er),Er.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(Eu),Yd.subVectors(this.max,Eu),Tl.subVectors(e.a,Eu),bl.subVectors(e.b,Eu),Cl.subVectors(e.c,Eu),lo.subVectors(bl,Tl),co.subVectors(Cl,bl),aa.subVectors(Tl,Cl);let t=[0,-lo.z,lo.y,0,-co.z,co.y,0,-aa.z,aa.y,lo.z,0,-lo.x,co.z,0,-co.x,aa.z,0,-aa.x,-lo.y,lo.x,0,-co.y,co.x,0,-aa.y,aa.x,0];return!Yv(t,Tl,bl,Cl,Yd)||(t=[1,0,0,0,1,0,0,0,1],!Yv(t,Tl,bl,Cl,Yd))?!1:(qd.crossVectors(lo,co),t=[qd.x,qd.y,qd.z],Yv(t,Tl,bl,Cl,Yd))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Er).distanceTo(e)}getBoundingSphere(e){return this.isEmpty()?e.makeEmpty():(this.getCenter(e.center),e.radius=this.getSize(Er).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:(ys[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ys[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ys[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ys[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ys[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ys[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ys[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ys[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ys),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 ys=[new O,new O,new O,new O,new O,new O,new O,new O],Er=new O,Xd=new Ai,Tl=new O,bl=new O,Cl=new O,lo=new O,co=new O,aa=new O,Eu=new O,Yd=new O,qd=new O,la=new O;function Yv(n,e,t,i,r){for(let s=0,o=n.length-3;s<=o;s+=3){la.fromArray(n,s);const a=r.x*Math.abs(la.x)+r.y*Math.abs(la.y)+r.z*Math.abs(la.z),c=e.dot(la),f=t.dot(la),h=i.dot(la);if(Math.max(-Math.max(c,f,h),Math.min(c,f,h))>a)return!1}return!0}const BV=new Ai,Tu=new O,qv=new O;class li{constructor(e=new O,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):BV.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;Tu.subVectors(e,this.center);const t=Tu.lengthSq();if(t>this.radius*this.radius){const i=Math.sqrt(t),r=(i-this.radius)*.5;this.center.addScaledVector(Tu,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):(qv.subVectors(e.center,this.center).setLength(e.radius),this.expandByPoint(Tu.copy(e.center).add(qv)),this.expandByPoint(Tu.copy(e.center).sub(qv))),this)}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}}const xs=new O,Zv=new O,Zd=new O,uo=new O,Kv=new O,Kd=new O,Jv=new O;class ol{constructor(e=new O,t=new O(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,xs)),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=xs.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(xs.copy(this.origin).addScaledVector(this.direction,t),xs.distanceToSquared(e))}distanceSqToSegment(e,t,i,r){Zv.copy(e).add(t).multiplyScalar(.5),Zd.copy(t).sub(e).normalize(),uo.copy(this.origin).sub(Zv);const s=e.distanceTo(t)*.5,o=-this.direction.dot(Zd),a=uo.dot(this.direction),c=-uo.dot(Zd),f=uo.lengthSq(),h=Math.abs(1-o*o);let d,p,m,y;if(h>0)if(d=o*c-a,p=o*a-c,y=s*h,d>=0)if(p>=-y)if(p<=y){const _=1/h;d*=_,p*=_,m=d*(d+o*p+2*a)+p*(o*d+p+2*c)+f}else p=s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*c)+f;else p=-s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*c)+f;else p<=-y?(d=Math.max(0,-(-o*s+a)),p=d>0?-s:Math.min(Math.max(-s,-c),s),m=-d*d+p*(p+2*c)+f):p<=y?(d=0,p=Math.min(Math.max(-s,-c),s),m=p*(p+2*c)+f):(d=Math.max(0,-(o*s+a)),p=d>0?s:Math.min(Math.max(-s,-c),s),m=-d*d+p*(p+2*c)+f);else p=o>0?-s:s,d=Math.max(0,-(o*p+a)),m=-d*d+p*(p+2*c)+f;return i&&i.copy(this.origin).addScaledVector(this.direction,d),r&&r.copy(Zv).addScaledVector(Zd,p),m}intersectSphere(e,t){xs.subVectors(e.center,this.origin);const i=xs.dot(this.direction),r=xs.dot(xs)-i*i,s=e.radius*e.radius;if(r>s)return null;const o=Math.sqrt(s-r),a=i-o,c=i+o;return c<0?null:a<0?this.at(c,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,c;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,c=(e.max.z-p.z)*d):(a=(e.max.z-p.z)*d,c=(e.min.z-p.z)*d),i>c||a>r)||((a>i||i!==i)&&(i=a),(c=0?i:r,t)}intersectsBox(e){return this.intersectBox(e,xs)!==null}intersectTriangle(e,t,i,r,s){Kv.subVectors(t,e),Kd.subVectors(i,e),Jv.crossVectors(Kv,Kd);let o=this.direction.dot(Jv),a;if(o>0){if(r)return null;a=1}else if(o<0)a=-1,o=-o;else return null;uo.subVectors(this.origin,e);const c=a*this.direction.dot(Kd.crossVectors(uo,Kd));if(c<0)return null;const f=a*this.direction.dot(Kv.cross(uo));if(f<0||c+f>o)return null;const h=-a*uo.dot(Jv);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 at{constructor(e,t,i,r,s,o,a,c,f,h,d,p,m,y,_,x){at.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,c,f,h,d,p,m,y,_,x)}set(e,t,i,r,s,o,a,c,f,h,d,p,m,y,_,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]=c,g[2]=f,g[6]=h,g[10]=d,g[14]=p,g[3]=m,g[7]=y,g[11]=_,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 at().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/Pl.setFromMatrixColumn(e,0).length(),s=1/Pl.setFromMatrixColumn(e,1).length(),o=1/Pl.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),c=Math.cos(r),f=Math.sin(r),h=Math.cos(s),d=Math.sin(s);if(e.order==="XYZ"){const p=o*h,m=o*d,y=a*h,_=a*d;t[0]=c*h,t[4]=-c*d,t[8]=f,t[1]=m+y*f,t[5]=p-_*f,t[9]=-a*c,t[2]=_-p*f,t[6]=y+m*f,t[10]=o*c}else if(e.order==="YXZ"){const p=c*h,m=c*d,y=f*h,_=f*d;t[0]=p+_*a,t[4]=y*a-m,t[8]=o*f,t[1]=o*d,t[5]=o*h,t[9]=-a,t[2]=m*a-y,t[6]=_+p*a,t[10]=o*c}else if(e.order==="ZXY"){const p=c*h,m=c*d,y=f*h,_=f*d;t[0]=p-_*a,t[4]=-o*d,t[8]=y+m*a,t[1]=m+y*a,t[5]=o*h,t[9]=_-p*a,t[2]=-o*f,t[6]=a,t[10]=o*c}else if(e.order==="ZYX"){const p=o*h,m=o*d,y=a*h,_=a*d;t[0]=c*h,t[4]=y*f-m,t[8]=p*f+_,t[1]=c*d,t[5]=_*f+p,t[9]=m*f-y,t[2]=-f,t[6]=a*c,t[10]=o*c}else if(e.order==="YZX"){const p=o*c,m=o*f,y=a*c,_=a*f;t[0]=c*h,t[4]=_-p*d,t[8]=y*d+m,t[1]=d,t[5]=o*h,t[9]=-a*h,t[2]=-f*h,t[6]=m*d+y,t[10]=p-_*d}else if(e.order==="XZY"){const p=o*c,m=o*f,y=a*c,_=a*f;t[0]=c*h,t[4]=-d,t[8]=f*h,t[1]=p*d+_,t[5]=o*h,t[9]=m*d-y,t[2]=y*d-m,t[6]=a*h,t[10]=_*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(zV,e,VV)}lookAt(e,t,i){const r=this.elements;return Wi.subVectors(e,t),Wi.lengthSq()===0&&(Wi.z=1),Wi.normalize(),fo.crossVectors(i,Wi),fo.lengthSq()===0&&(Math.abs(i.z)===1?Wi.x+=1e-4:Wi.z+=1e-4,Wi.normalize(),fo.crossVectors(i,Wi)),fo.normalize(),Jd.crossVectors(Wi,fo),r[0]=fo.x,r[4]=Jd.x,r[8]=Wi.x,r[1]=fo.y,r[5]=Jd.y,r[9]=Wi.y,r[2]=fo.z,r[6]=Jd.z,r[10]=Wi.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],c=i[8],f=i[12],h=i[1],d=i[5],p=i[9],m=i[13],y=i[2],_=i[6],x=i[10],g=i[14],S=i[3],A=i[7],E=i[11],R=i[15],C=r[0],L=r[4],I=r[8],P=r[12],b=r[1],N=r[5],j=r[9],X=r[13],te=r[2],ne=r[6],Q=r[10],le=r[14],k=r[3],q=r[7],J=r[11],$=r[15];return s[0]=o*C+a*b+c*te+f*k,s[4]=o*L+a*N+c*ne+f*q,s[8]=o*I+a*j+c*Q+f*J,s[12]=o*P+a*X+c*le+f*$,s[1]=h*C+d*b+p*te+m*k,s[5]=h*L+d*N+p*ne+m*q,s[9]=h*I+d*j+p*Q+m*J,s[13]=h*P+d*X+p*le+m*$,s[2]=y*C+_*b+x*te+g*k,s[6]=y*L+_*N+x*ne+g*q,s[10]=y*I+_*j+x*Q+g*J,s[14]=y*P+_*X+x*le+g*$,s[3]=S*C+A*b+E*te+R*k,s[7]=S*L+A*N+E*ne+R*q,s[11]=S*I+A*j+E*Q+R*J,s[15]=S*P+A*X+E*le+R*$,this}multiplyScalar(e){const t=this.elements;return t[0]*=e,t[4]*=e,t[8]*=e,t[12]*=e,t[1]*=e,t[5]*=e,t[9]*=e,t[13]*=e,t[2]*=e,t[6]*=e,t[10]*=e,t[14]*=e,t[3]*=e,t[7]*=e,t[11]*=e,t[15]*=e,this}determinant(){const e=this.elements,t=e[0],i=e[4],r=e[8],s=e[12],o=e[1],a=e[5],c=e[9],f=e[13],h=e[2],d=e[6],p=e[10],m=e[14],y=e[3],_=e[7],x=e[11],g=e[15];return y*(+s*c*d-r*f*d-s*a*p+i*f*p+r*a*m-i*c*m)+_*(+t*c*m-t*f*p+s*o*p-r*o*m+r*f*h-s*c*h)+x*(+t*f*d-t*a*m-s*o*d+i*o*m+s*a*h-i*f*h)+g*(-r*a*h-t*c*d+t*a*p+r*o*d-i*o*p+i*c*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],c=e[6],f=e[7],h=e[8],d=e[9],p=e[10],m=e[11],y=e[12],_=e[13],x=e[14],g=e[15],S=d*x*f-_*p*f+_*c*m-a*x*m-d*c*g+a*p*g,A=y*p*f-h*x*f-y*c*m+o*x*m+h*c*g-o*p*g,E=h*_*f-y*d*f+y*a*m-o*_*m-h*a*g+o*d*g,R=y*d*c-h*_*c-y*a*p+o*_*p+h*a*x-o*d*x,C=t*S+i*A+r*E+s*R;if(C===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const L=1/C;return e[0]=S*L,e[1]=(_*p*s-d*x*s-_*r*m+i*x*m+d*r*g-i*p*g)*L,e[2]=(a*x*s-_*c*s+_*r*f-i*x*f-a*r*g+i*c*g)*L,e[3]=(d*c*s-a*p*s-d*r*f+i*p*f+a*r*m-i*c*m)*L,e[4]=A*L,e[5]=(h*x*s-y*p*s+y*r*m-t*x*m-h*r*g+t*p*g)*L,e[6]=(y*c*s-o*x*s-y*r*f+t*x*f+o*r*g-t*c*g)*L,e[7]=(o*p*s-h*c*s+h*r*f-t*p*f-o*r*m+t*c*m)*L,e[8]=E*L,e[9]=(y*d*s-h*_*s-y*i*m+t*_*m+h*i*g-t*d*g)*L,e[10]=(o*_*s-y*a*s+y*i*f-t*_*f-o*i*g+t*a*g)*L,e[11]=(h*a*s-o*d*s-h*i*f+t*d*f+o*i*m-t*a*m)*L,e[12]=R*L,e[13]=(h*_*r-y*d*r+y*i*p-t*_*p-h*i*x+t*d*x)*L,e[14]=(y*a*r-o*_*r-y*i*c+t*_*c+o*i*x-t*a*x)*L,e[15]=(o*d*r-h*a*r+h*i*c-t*d*c-o*i*p+t*a*p)*L,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,c=e.z,f=s*o,h=s*a;return this.set(f*o+i,f*a-r*c,f*c+r*a,0,f*a+r*c,h*a+i,h*c-r*o,0,f*c-r*a,h*c+r*o,s*c*c+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,c=t._w,f=s+s,h=o+o,d=a+a,p=s*f,m=s*h,y=s*d,_=o*h,x=o*d,g=a*d,S=c*f,A=c*h,E=c*d,R=i.x,C=i.y,L=i.z;return r[0]=(1-(_+g))*R,r[1]=(m+E)*R,r[2]=(y-A)*R,r[3]=0,r[4]=(m-E)*C,r[5]=(1-(p+g))*C,r[6]=(x+S)*C,r[7]=0,r[8]=(y+A)*L,r[9]=(x-S)*L,r[10]=(1-(p+_))*L,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=Pl.set(r[0],r[1],r[2]).length();const o=Pl.set(r[4],r[5],r[6]).length(),a=Pl.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],Tr.copy(this);const f=1/s,h=1/o,d=1/a;return Tr.elements[0]*=f,Tr.elements[1]*=f,Tr.elements[2]*=f,Tr.elements[4]*=h,Tr.elements[5]*=h,Tr.elements[6]*=h,Tr.elements[8]*=d,Tr.elements[9]*=d,Tr.elements[10]*=d,t.setFromRotationMatrix(Tr),i.x=s,i.y=o,i.z=a,this}makePerspective(e,t,i,r,s,o,a=ns){const c=this.elements,f=2*s/(t-e),h=2*s/(i-r),d=(t+e)/(t-e),p=(i+r)/(i-r);let m,y;if(a===ns)m=-(o+s)/(o-s),y=-2*o*s/(o-s);else if(a===jf)m=-o/(o-s),y=-o*s/(o-s);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+a);return c[0]=f,c[4]=0,c[8]=d,c[12]=0,c[1]=0,c[5]=h,c[9]=p,c[13]=0,c[2]=0,c[6]=0,c[10]=m,c[14]=y,c[3]=0,c[7]=0,c[11]=-1,c[15]=0,this}makeOrthographic(e,t,i,r,s,o,a=ns){const c=this.elements,f=1/(t-e),h=1/(i-r),d=1/(o-s),p=(t+e)*f,m=(i+r)*h;let y,_;if(a===ns)y=(o+s)*d,_=-2*d;else if(a===jf)y=s*d,_=-1*d;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+a);return c[0]=2*f,c[4]=0,c[8]=0,c[12]=-p,c[1]=0,c[5]=2*h,c[9]=0,c[13]=-m,c[2]=0,c[6]=0,c[10]=_,c[14]=-y,c[3]=0,c[7]=0,c[11]=0,c[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 Pl=new O,Tr=new at,zV=new O(0,0,0),VV=new O(1,1,1),fo=new O,Jd=new O,Wi=new O,rT=new at,sT=new ai;class Mi{constructor(e=0,t=0,i=0,r=Mi.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],c=r[1],f=r[5],h=r[9],d=r[2],p=r[6],m=r[10];switch(t){case"XYZ":this._y=Math.asin(vn(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-h,m),this._z=Math.atan2(-o,s)):(this._x=Math.atan2(p,f),this._z=0);break;case"YXZ":this._x=Math.asin(-vn(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(a,m),this._z=Math.atan2(c,f)):(this._y=Math.atan2(-d,s),this._z=0);break;case"ZXY":this._x=Math.asin(vn(p,-1,1)),Math.abs(p)<.9999999?(this._y=Math.atan2(-d,m),this._z=Math.atan2(-o,f)):(this._y=0,this._z=Math.atan2(c,s));break;case"ZYX":this._y=Math.asin(-vn(d,-1,1)),Math.abs(d)<.9999999?(this._x=Math.atan2(p,m),this._z=Math.atan2(c,s)):(this._x=0,this._z=Math.atan2(-o,f));break;case"YZX":this._z=Math.asin(vn(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,f),this._y=Math.atan2(-d,s)):(this._x=0,this._y=Math.atan2(a,m));break;case"XZY":this._z=Math.asin(-vn(o,-1,1)),Math.abs(o)<.9999999?(this._x=Math.atan2(p,f),this._y=Math.atan2(a,s)):(this._x=Math.atan2(-h,m),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 rT.makeRotationFromQuaternion(e),this.setFromRotationMatrix(rT,t,i)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return sT.setFromEuler(this),this.setFromQuaternion(sT,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}}Mi.DEFAULT_ORDER="XYZ";class Ga{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.maxGeometryCount=this._maxGeometryCount,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,c){return a[c.uuid]===void 0&&(a[c.uuid]=c.toJSON(e)),c.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 c=a.shapes;if(Array.isArray(c))for(let f=0,h=c.length;f0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(i.geometries=a),c.length>0&&(i.materials=c),f.length>0&&(i.textures=f),h.length>0&&(i.images=h),d.length>0&&(i.shapes=d),p.length>0&&(i.skeletons=p),m.length>0&&(i.animations=m),y.length>0&&(i.nodes=y)}return i.object=r,i;function o(a){const c=[];for(const f in a){const h=a[f];delete h.metadata,c.push(h)}return c}}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){br.subVectors(r,t),Ss.subVectors(i,t),$v.subVectors(e,t);const o=br.dot(br),a=br.dot(Ss),c=br.dot($v),f=Ss.dot(Ss),h=Ss.dot($v),d=o*f-a*a;if(d===0)return s.set(0,0,0),null;const p=1/d,m=(f*c-a*h)*p,y=(o*h-a*c)*p;return s.set(1-m-y,y,m)}static containsPoint(e,t,i,r){return this.getBarycoord(e,t,i,r,As)===null?!1:As.x>=0&&As.y>=0&&As.x+As.y<=1}static getInterpolation(e,t,i,r,s,o,a,c){return this.getBarycoord(e,t,i,r,As)===null?(c.x=0,c.y=0,"z"in c&&(c.z=0),"w"in c&&(c.w=0),null):(c.setScalar(0),c.addScaledVector(s,As.x),c.addScaledVector(o,As.y),c.addScaledVector(a,As.z),c)}static isFrontFacing(e,t,i,r){return br.subVectors(i,t),Ss.subVectors(e,t),br.cross(Ss).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 br.subVectors(this.c,this.b),Ss.subVectors(this.a,this.b),br.cross(Ss).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return qi.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return qi.getBarycoord(e,this.a,this.b,this.c,t)}getInterpolation(e,t,i,r,s){return qi.getInterpolation(e,this.a,this.b,this.c,t,i,r,s)}containsPoint(e){return qi.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return qi.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;Il.subVectors(r,i),Dl.subVectors(s,i),ey.subVectors(e,i);const c=Il.dot(ey),f=Dl.dot(ey);if(c<=0&&f<=0)return t.copy(i);ty.subVectors(e,r);const h=Il.dot(ty),d=Dl.dot(ty);if(h>=0&&d<=h)return t.copy(r);const p=c*d-h*f;if(p<=0&&c>=0&&h<=0)return o=c/(c-h),t.copy(i).addScaledVector(Il,o);ny.subVectors(e,s);const m=Il.dot(ny),y=Dl.dot(ny);if(y>=0&&m<=y)return t.copy(s);const _=m*f-c*y;if(_<=0&&f>=0&&y<=0)return a=f/(f-y),t.copy(i).addScaledVector(Dl,a);const x=h*y-m*d;if(x<=0&&d-h>=0&&m-y>=0)return fT.subVectors(s,r),a=(d-h)/(d-h+(m-y)),t.copy(r).addScaledVector(fT,a);const g=1/(x+_+p);return o=_*g,a=p*g,t.copy(i).addScaledVector(Il,o).addScaledVector(Dl,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}}const nI={aliceblue:15792383,antiquewhite:16444375,aqua:65535,aquamarine:8388564,azure:15794175,beige:16119260,bisque:16770244,black:0,blanchedalmond:16772045,blue:255,blueviolet:9055202,brown:10824234,burlywood:14596231,cadetblue:6266528,chartreuse:8388352,chocolate:13789470,coral:16744272,cornflowerblue:6591981,cornsilk:16775388,crimson:14423100,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:12092939,darkgray:11119017,darkgreen:25600,darkgrey:11119017,darkkhaki:12433259,darkmagenta:9109643,darkolivegreen:5597999,darkorange:16747520,darkorchid:10040012,darkred:9109504,darksalmon:15308410,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:16716947,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:11674146,floralwhite:16775920,forestgreen:2263842,fuchsia:16711935,gainsboro:14474460,ghostwhite:16316671,gold:16766720,goldenrod:14329120,gray:8421504,green:32768,greenyellow:11403055,grey:8421504,honeydew:15794160,hotpink:16738740,indianred:13458524,indigo:4915330,ivory:16777200,khaki:15787660,lavender:15132410,lavenderblush:16773365,lawngreen:8190976,lemonchiffon:16775885,lightblue:11393254,lightcoral:15761536,lightcyan:14745599,lightgoldenrodyellow:16448210,lightgray:13882323,lightgreen:9498256,lightgrey:13882323,lightpink:16758465,lightsalmon:16752762,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:11584734,lightyellow:16777184,lime:65280,limegreen:3329330,linen:16445670,magenta:16711935,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:12211667,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:13047173,midnightblue:1644912,mintcream:16121850,mistyrose:16770273,moccasin:16770229,navajowhite:16768685,navy:128,oldlace:16643558,olive:8421376,olivedrab:7048739,orange:16753920,orangered:16729344,orchid:14315734,palegoldenrod:15657130,palegreen:10025880,paleturquoise:11529966,palevioletred:14381203,papayawhip:16773077,peachpuff:16767673,peru:13468991,pink:16761035,plum:14524637,powderblue:11591910,purple:8388736,rebeccapurple:6697881,red:16711680,rosybrown:12357519,royalblue:4286945,saddlebrown:9127187,salmon:16416882,sandybrown:16032864,seagreen:3050327,seashell:16774638,sienna:10506797,silver:12632256,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:16775930,springgreen:65407,steelblue:4620980,tan:13808780,teal:32896,thistle:14204888,tomato:16737095,turquoise:4251856,violet:15631086,wheat:16113331,white:16777215,whitesmoke:16119285,yellow:16776960,yellowgreen:10145074},ho={h:0,s:0,l:0},$d={h:0,s:0,l:0};function iy(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 je{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=pr){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,Bt.toWorkingColorSpace(this,t),this}setRGB(e,t,i,r=Bt.workingColorSpace){return this.r=e,this.g=t,this.b=i,Bt.toWorkingColorSpace(this,r),this}setHSL(e,t,i,r=Bt.workingColorSpace){if(e=x1(e,1),t=vn(t,0,1),i=vn(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=iy(o,s,e+1/3),this.g=iy(o,s,e),this.b=iy(o,s,e-1/3)}return Bt.toWorkingColorSpace(this,r),this}setStyle(e,t=pr){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=pr){const i=nI[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=Ec(e.r),this.g=Ec(e.g),this.b=Ec(e.b),this}copyLinearToSRGB(e){return this.r=Wv(e.r),this.g=Wv(e.g),this.b=Wv(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(e=pr){return Bt.fromWorkingColorSpace(ii.copy(this),e),Math.round(vn(ii.r*255,0,255))*65536+Math.round(vn(ii.g*255,0,255))*256+Math.round(vn(ii.b*255,0,255))}getHexString(e=pr){return("000000"+this.getHex(e).toString(16)).slice(-6)}getHSL(e,t=Bt.workingColorSpace){Bt.fromWorkingColorSpace(ii.copy(this),t);const i=ii.r,r=ii.g,s=ii.b,o=Math.max(i,r,s),a=Math.min(i,r,s);let c,f;const h=(a+o)/2;if(a===o)c=0,f=0;else{const d=o-a;switch(f=h<=.5?d/(o+a):d/(2-o-a),o){case i:c=(r-s)/d+(r0!=e>0&&this.version++,this._alphaTest=e}onBuild(){}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!==za&&(i.blending=this.blending),this.side!==Ws&&(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!==Vm&&(i.blendSrc=this.blendSrc),this.blendDst!==Hm&&(i.blendDst=this.blendDst),this.blendEquation!==Mo&&(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!==Df&&(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!==T_&&(i.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(i.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(i.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Ta&&(i.stencilFail=this.stencilFail),this.stencilZFail!==Ta&&(i.stencilZFail=this.stencilZFail),this.stencilZPass!==Ta&&(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 c=s[a];delete c.metadata,o.push(c)}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++}}class qo extends Zn{constructor(e){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new je(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 Mi,this.combine=fh,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 Cs=YV();function YV(){const n=new ArrayBuffer(4),e=new Float32Array(n),t=new Uint32Array(n),i=new Uint32Array(512),r=new Uint32Array(512);for(let c=0;c<256;++c){const f=c-127;f<-27?(i[c]=0,i[c|256]=32768,r[c]=24,r[c|256]=24):f<-14?(i[c]=1024>>-f-14,i[c|256]=1024>>-f-14|32768,r[c]=-f-1,r[c|256]=-f-1):f<=15?(i[c]=f+15<<10,i[c|256]=f+15<<10|32768,r[c]=13,r[c|256]=13):f<128?(i[c]=31744,i[c|256]=64512,r[c]=24,r[c|256]=24):(i[c]=31744,i[c|256]=64512,r[c]=13,r[c|256]=13)}const s=new Uint32Array(2048),o=new Uint32Array(64),a=new Uint32Array(64);for(let c=1;c<1024;++c){let f=c<<13,h=0;for(;!(f&8388608);)f<<=1,h-=8388608;f&=-8388609,h+=947912704,s[c]=f|h}for(let c=1024;c<2048;++c)s[c]=939524096+(c-1024<<13);for(let c=1;c<31;++c)o[c]=c<<23;o[31]=1199570944,o[32]=2147483648;for(let c=33;c<63;++c)o[c]=2147483648+(c-32<<23);o[63]=3347054592;for(let c=1;c<64;++c)c!==32&&(a[c]=1024);return{floatView:e,uint32View:t,baseTable:i,shiftTable:r,mantissaTable:s,exponentTable:o,offsetTable:a}}function Li(n){Math.abs(n)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),n=vn(n,-65504,65504),Cs.floatView[0]=n;const e=Cs.uint32View[0],t=e>>23&511;return Cs.baseTable[t]+((e&8388607)>>Cs.shiftTable[t])}function ju(n){const e=n>>10;return Cs.uint32View[0]=Cs.mantissaTable[Cs.offsetTable[e]+(n&1023)]+Cs.exponentTable[e],Cs.floatView[0]}const qV={toHalfFloat:Li,fromHalfFloat:ju},Tn=new O,ep=new pe;class Ht{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=Wf,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Ki,this.version=0}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return _1("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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 c=this.parameters;for(const f in c)c[f]!==void 0&&(e[f]=c[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 c in i){const f=i[c];e.data.attributes[c]=f.toJSON(e.data)}const r={};let s=!1;for(const c in this.morphAttributes){const f=this.morphAttributes[c],h=[];for(let d=0,p=f.length;d0&&(r[c]=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,m=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))&&(hT.copy(s).invert(),ca.copy(e.ray).applyMatrix4(hT),!(i.boundingBox!==null&&ca.intersectsBox(i.boundingBox)===!1)&&this._computeIntersections(e,t,ca)))}_computeIntersections(e,t,i){let r;const s=this.geometry,o=this.material,a=s.index,c=s.attributes.position,f=s.attributes.uv,h=s.attributes.uv1,d=s.attributes.normal,p=s.groups,m=s.drawRange;if(a!==null)if(Array.isArray(o))for(let y=0,_=p.length;y<_;y++){const x=p[y],g=o[x.materialIndex],S=Math.max(x.start,m.start),A=Math.min(a.count,Math.min(x.start+x.count,m.start+m.count));for(let E=S,R=A;Et.far?null:{distance:f,point:ap.clone(),object:n}}function lp(n,e,t,i,r,s,o,a,c,f){n.getVertexPosition(a,Ul),n.getVertexPosition(c,Ol),n.getVertexPosition(f,kl);const h=n5(n,e,t,i,Ul,Ol,kl,op);if(h){r&&(ip.fromBufferAttribute(r,a),rp.fromBufferAttribute(r,c),sp.fromBufferAttribute(r,f),h.uv=qi.getInterpolation(op,Ul,Ol,kl,ip,rp,sp,new pe)),s&&(ip.fromBufferAttribute(s,a),rp.fromBufferAttribute(s,c),sp.fromBufferAttribute(s,f),h.uv1=qi.getInterpolation(op,Ul,Ol,kl,ip,rp,sp,new pe)),o&&(pT.fromBufferAttribute(o,a),mT.fromBufferAttribute(o,c),gT.fromBufferAttribute(o,f),h.normal=qi.getInterpolation(op,Ul,Ol,kl,pT,mT,gT,new O),h.normal.dot(i.direction)>0&&h.normal.multiplyScalar(-1));const d={a,b:c,c:f,normal:new O,materialIndex:0};qi.getNormal(Ul,Ol,kl,d.normal),h.face=d}return h}class al extends St{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 c=[],f=[],h=[],d=[];let p=0,m=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(c),this.setAttribute("position",new Ke(f,3)),this.setAttribute("normal",new Ke(h,3)),this.setAttribute("uv",new Ke(d,2));function y(_,x,g,S,A,E,R,C,L,I,P){const b=E/L,N=R/I,j=E/2,X=R/2,te=C/2,ne=L+1,Q=I+1;let le=0,k=0;const q=new O;for(let J=0;J0?1:-1,h.push(q.x,q.y,q.z),d.push(_e/L),d.push(1-J/I),le+=1}}for(let J=0;J0&&(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 bh extends Ut{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new at,this.projectionMatrix=new at,this.projectionMatrixInverse=new at,this.coordinateSystem=is}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 vo=new O,ZT=new pe,JT=new pe;class an extends bh{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=Hc*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){const e=Math.tan(qa*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Hc*2*Math.atan(Math.tan(qa*.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){vo.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(vo.x,vo.y).multiplyScalar(-e/vo.z),vo.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(vo.x,vo.y).multiplyScalar(-e/vo.z)}getViewSize(e,t){return this.getViewBounds(e,ZT,JT),t.subVectors(JT,ZT)}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(qa*.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 l=o.fullWidth,f=o.fullHeight;s+=o.offsetX*r/l,t-=o.offsetY*i/f,r*=o.width/l,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 jl=-90,Xl=1;class Y1 extends Ut{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new an(jl,Xl,e,t);r.layers=this.layers,this.add(r);const s=new an(jl,Xl,e,t);s.layers=this.layers,this.add(s);const o=new an(jl,Xl,e,t);o.layers=this.layers,this.add(o);const a=new an(jl,Xl,e,t);a.layers=this.layers,this.add(a);const l=new an(jl,Xl,e,t);l.layers=this.layers,this.add(l);const f=new an(jl,Xl,e,t);f.layers=this.layers,this.add(f)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,l]=t;for(const f of t)this.remove(f);if(e===is)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),l.up.set(0,1,0),l.lookAt(0,0,-1);else if(e===th)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),l.up.set(0,-1,0),l.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,l,f,h]=this.children,d=e.getRenderTarget(),p=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),y=e.xr.enabled;e.xr.enabled=!1;const _=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,l),e.setRenderTarget(i,4,r),e.render(t,f),i.texture.generateMipmaps=_,e.setRenderTarget(i,5,r),e.render(t,h),e.setRenderTarget(d,p,m),e.xr.enabled=y,i.texture.needsPMREMUpdate=!0}}class Ch extends tn{constructor(e,t,i,r,s,o,a,l,f,h){e=e!==void 0?e:[],t=t!==void 0?t:Ys,super(e,t,i,r,s,o,a,l,f,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class q1 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 Ch(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:Pn}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:` +}`;class Br extends Zn{constructor(e){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=r5,this.fragmentShader=s5,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={clipCullDistance:!1,multiDraw:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,e!==void 0&&this.setValues(e)}copy(e){return super.copy(e),this.fragmentShader=e.fragmentShader,this.vertexShader=e.vertexShader,this.uniforms=Oc(e.uniforms),this.uniformsGroups=i5(e.uniformsGroups),this.defines=Object.assign({},e.defines),this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.fog=e.fog,this.lights=e.lights,this.clipping=e.clipping,this.extensions=Object.assign({},e.extensions),this.glslVersion=e.glslVersion,this}toJSON(e){const t=super.toJSON(e);t.glslVersion=this.glslVersion,t.uniforms={};for(const r in this.uniforms){const o=this.uniforms[r].value;o&&o.isTexture?t.uniforms[r]={type:"t",value:o.toJSON(e).uuid}:o&&o.isColor?t.uniforms[r]={type:"c",value:o.getHex()}:o&&o.isVector2?t.uniforms[r]={type:"v2",value:o.toArray()}:o&&o.isVector3?t.uniforms[r]={type:"v3",value:o.toArray()}:o&&o.isVector4?t.uniforms[r]={type:"v4",value:o.toArray()}:o&&o.isMatrix3?t.uniforms[r]={type:"m3",value:o.toArray()}:o&&o.isMatrix4?t.uniforms[r]={type:"m4",value:o.toArray()}:t.uniforms[r]={value:o}}Object.keys(this.defines).length>0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader,t.lights=this.lights,t.clipping=this.clipping;const 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 ph extends Ut{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new at,this.projectionMatrix=new at,this.projectionMatrixInverse=new at,this.coordinateSystem=ns}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 po=new O,vT=new pe,yT=new pe;class sn extends ph{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(Ha*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return Uc*2*Math.atan(Math.tan(Ha*.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){po.set(-1,-1,.5).applyMatrix4(this.projectionMatrixInverse),t.set(po.x,po.y).multiplyScalar(-e/po.z),po.set(1,1,.5).applyMatrix4(this.projectionMatrixInverse),i.set(po.x,po.y).multiplyScalar(-e/po.z)}getViewSize(e,t){return this.getViewBounds(e,vT,yT),t.subVectors(yT,vT)}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(Ha*.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 c=o.fullWidth,f=o.fullHeight;s+=o.offsetX*r/c,t-=o.offsetY*i/f,r*=o.width/c,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 Fl=-90,Bl=1;class w1 extends Ut{constructor(e,t,i){super(),this.type="CubeCamera",this.renderTarget=i,this.coordinateSystem=null,this.activeMipmapLevel=0;const r=new sn(Fl,Bl,e,t);r.layers=this.layers,this.add(r);const s=new sn(Fl,Bl,e,t);s.layers=this.layers,this.add(s);const o=new sn(Fl,Bl,e,t);o.layers=this.layers,this.add(o);const a=new sn(Fl,Bl,e,t);a.layers=this.layers,this.add(a);const c=new sn(Fl,Bl,e,t);c.layers=this.layers,this.add(c);const f=new sn(Fl,Bl,e,t);f.layers=this.layers,this.add(f)}updateCoordinateSystem(){const e=this.coordinateSystem,t=this.children.concat(),[i,r,s,o,a,c]=t;for(const f of t)this.remove(f);if(e===ns)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),c.up.set(0,1,0),c.lookAt(0,0,-1);else if(e===jf)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),c.up.set(0,-1,0),c.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,c,f,h]=this.children,d=e.getRenderTarget(),p=e.getActiveCubeFace(),m=e.getActiveMipmapLevel(),y=e.xr.enabled;e.xr.enabled=!1;const _=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,c),e.setRenderTarget(i,4,r),e.render(t,f),i.texture.generateMipmaps=_,e.setRenderTarget(i,5,r),e.render(t,h),e.setRenderTarget(d,p,m),e.xr.enabled=y,i.texture.needsPMREMUpdate=!0}}class mh extends $t{constructor(e,t,i,r,s,o,a,c,f,h){e=e!==void 0?e:[],t=t!==void 0?t:js,super(e,t,i,r,s,o,a,c,f,h),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(e){this.image=e}}class E1 extends Fr{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 mh(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:Pn}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; @@ -122,9 +95,9 @@ Error generating stack: `+s.message+` gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},r=new pl(5,5,5),s=new zr({name:"CubemapFromEquirect",uniforms:Gc(i.uniforms),vertexShader:i.vertexShader,fragmentShader:i.fragmentShader,side:Ai,blending:Bs});s.uniforms.tEquirect.value=t;const o=new An(r,s),a=t.minFilter;return t.minFilter===ns&&(t.minFilter=Pn),new Y1(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 Ey=new O,yG=new O,xG=new xt;class Ps{constructor(e=new O(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=Ey.subVectors(i,t).cross(yG.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(Ey),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||xG.getNormalMatrix(e),r=this.coplanarPoint(Ey).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 ga=new ci,Ap=new O;class Ph{constructor(e=new Ps,t=new Ps,i=new Ps,r=new Ps,s=new Ps,o=new Ps){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=is){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],l=r[3],f=r[4],h=r[5],d=r[6],p=r[7],m=r[8],y=r[9],_=r[10],x=r[11],g=r[12],S=r[13],A=r[14],E=r[15];if(i[0].setComponents(l-s,p-f,x-m,E-g).normalize(),i[1].setComponents(l+s,p+f,x+m,E+g).normalize(),i[2].setComponents(l+o,p+h,x+y,E+S).normalize(),i[3].setComponents(l-o,p-h,x-y,E-S).normalize(),i[4].setComponents(l-a,p-d,x-_,E-A).normalize(),t===is)i[5].setComponents(l+a,p+d,x+_,E+A).normalize();else if(t===th)i[5].setComponents(a,d,_,A).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(),ga.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),ga.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(ga)}intersectsSprite(e){return ga.center.set(0,0,0),ga.radius=.7071067811865476,ga.applyMatrix4(e.matrixWorld),this.intersectsSphere(ga)}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,Ap.y=r.normal.y>0?e.max.y:e.min.y,Ap.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Ap)<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 qI(){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 _G(n){const e=new WeakMap;function t(a,l){const f=a.array,h=a.usage,d=f.byteLength,p=n.createBuffer();n.bindBuffer(l,p),n.bufferData(l,f,h),a.onUploadCallback();let m;if(f instanceof Float32Array)m=n.FLOAT;else if(f instanceof Uint16Array)a.isFloat16BufferAttribute?m=n.HALF_FLOAT:m=n.UNSIGNED_SHORT;else if(f instanceof Int16Array)m=n.SHORT;else if(f instanceof Uint32Array)m=n.UNSIGNED_INT;else if(f instanceof Int32Array)m=n.INT;else if(f instanceof Int8Array)m=n.BYTE;else if(f instanceof Uint8Array)m=n.UNSIGNED_BYTE;else if(f instanceof Uint8ClampedArray)m=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:p,type:m,bytesPerElement:f.BYTES_PER_ELEMENT,version:a.version,size:d}}function i(a,l,f){const h=l.array,d=l._updateRange,p=l.updateRanges;if(n.bindBuffer(f,a),d.count===-1&&p.length===0&&n.bufferSubData(f,0,h),p.length!==0){for(let m=0,y=p.length;m1?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||a5.getNormalMatrix(e),r=this.coplanarPoint(oy).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 ua=new li,cp=new O;class gh{constructor(e=new Ts,t=new Ts,i=new Ts,r=new Ts,s=new Ts,o=new Ts){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=ns){const i=this.planes,r=e.elements,s=r[0],o=r[1],a=r[2],c=r[3],f=r[4],h=r[5],d=r[6],p=r[7],m=r[8],y=r[9],_=r[10],x=r[11],g=r[12],S=r[13],A=r[14],E=r[15];if(i[0].setComponents(c-s,p-f,x-m,E-g).normalize(),i[1].setComponents(c+s,p+f,x+m,E+g).normalize(),i[2].setComponents(c+o,p+h,x+y,E+S).normalize(),i[3].setComponents(c-o,p-h,x-y,E-S).normalize(),i[4].setComponents(c-a,p-d,x-_,E-A).normalize(),t===ns)i[5].setComponents(c+a,p+d,x+_,E+A).normalize();else if(t===jf)i[5].setComponents(a,d,_,A).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(),ua.copy(e.boundingSphere).applyMatrix4(e.matrixWorld);else{const t=e.geometry;t.boundingSphere===null&&t.computeBoundingSphere(),ua.copy(t.boundingSphere).applyMatrix4(e.matrixWorld)}return this.intersectsSphere(ua)}intersectsSprite(e){return ua.center.set(0,0,0),ua.radius=.7071067811865476,ua.applyMatrix4(e.matrixWorld),this.intersectsSphere(ua)}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,cp.y=r.normal.y>0?e.max.y:e.min.y,cp.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(cp)<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 sI(){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 l5(n){const e=new WeakMap;function t(a,c){const f=a.array,h=a.usage,d=f.byteLength,p=n.createBuffer();n.bindBuffer(c,p),n.bufferData(c,f,h),a.onUploadCallback();let m;if(f instanceof Float32Array)m=n.FLOAT;else if(f instanceof Uint16Array)a.isFloat16BufferAttribute?m=n.HALF_FLOAT:m=n.UNSIGNED_SHORT;else if(f instanceof Int16Array)m=n.SHORT;else if(f instanceof Uint32Array)m=n.UNSIGNED_INT;else if(f instanceof Int32Array)m=n.INT;else if(f instanceof Int8Array)m=n.BYTE;else if(f instanceof Uint8Array)m=n.UNSIGNED_BYTE;else if(f instanceof Uint8ClampedArray)m=n.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+f);return{buffer:p,type:m,bytesPerElement:f.BYTES_PER_ELEMENT,version:a.version,size:d}}function i(a,c,f){const h=c.array,d=c._updateRange,p=c.updateRanges;if(n.bindBuffer(f,a),d.count===-1&&p.length===0&&n.bufferSubData(f,0,h),p.length!==0){for(let m=0,y=p.length;m 0 +#endif`,w5=`#if NUM_CLIPPING_PLANES > 0 vec4 plane; #ifdef ALPHA_TO_COVERAGE float distanceToPlane, distanceGradient; @@ -364,26 +337,26 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve if ( clipped ) discard; #endif #endif -#endif`,kG=`#if NUM_CLIPPING_PLANES > 0 +#endif`,E5=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,FG=`#if NUM_CLIPPING_PLANES > 0 +#endif`,T5=`#if NUM_CLIPPING_PLANES > 0 varying vec3 vClipPosition; -#endif`,BG=`#if NUM_CLIPPING_PLANES > 0 +#endif`,b5=`#if NUM_CLIPPING_PLANES > 0 vClipPosition = - mvPosition.xyz; -#endif`,zG=`#if defined( USE_COLOR_ALPHA ) +#endif`,C5=`#if defined( USE_COLOR_ALPHA ) diffuseColor *= vColor; #elif defined( USE_COLOR ) diffuseColor.rgb *= vColor; -#endif`,VG=`#if defined( USE_COLOR_ALPHA ) +#endif`,P5=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) varying vec3 vColor; -#endif`,HG=`#if defined( USE_COLOR_ALPHA ) +#endif`,R5=`#if defined( USE_COLOR_ALPHA ) varying vec4 vColor; #elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) || defined( USE_BATCHING_COLOR ) varying vec3 vColor; -#endif`,GG=`#if defined( USE_COLOR_ALPHA ) +#endif`,L5=`#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 ); @@ -397,7 +370,7 @@ vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in ve #ifdef USE_BATCHING_COLOR vec3 batchingColor = getBatchingColor( batchId ); vColor.xyz *= batchingColor.xyz; -#endif`,WG=`#define PI 3.141592653589793 +#endif`,I5=`#define PI 3.141592653589793 #define PI2 6.283185307179586 #define PI_HALF 1.5707963267948966 #define RECIPROCAL_PI 0.3183098861837907 @@ -475,7 +448,7 @@ vec3 F_Schlick( const in vec3 f0, const in float f90, const in float dotVH ) { 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`,jG=`#ifdef ENVMAP_TYPE_CUBE_UV +} // validated`,D5=`#ifdef ENVMAP_TYPE_CUBE_UV #define cubeUV_minMipLevel 4.0 #define cubeUV_minTileSize 16.0 float getFace( vec3 direction ) { @@ -568,7 +541,7 @@ float F_Schlick( const in float f0, const in float f90, const in float dotVH ) { return vec4( mix( color0, color1, mipF ), 1.0 ); } } -#endif`,XG=`vec3 transformedNormal = objectNormal; +#endif`,N5=`vec3 transformedNormal = objectNormal; #ifdef USE_TANGENT vec3 transformedTangent = objectTangent; #endif @@ -597,18 +570,18 @@ transformedNormal = normalMatrix * transformedNormal; #ifdef FLIP_SIDED transformedTangent = - transformedTangent; #endif -#endif`,YG=`#ifdef USE_DISPLACEMENTMAP +#endif`,U5=`#ifdef USE_DISPLACEMENTMAP uniform sampler2D displacementMap; uniform float displacementScale; uniform float displacementBias; -#endif`,qG=`#ifdef USE_DISPLACEMENTMAP +#endif`,O5=`#ifdef USE_DISPLACEMENTMAP transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vDisplacementMapUv ).x * displacementScale + displacementBias ); -#endif`,KG=`#ifdef USE_EMISSIVEMAP +#endif`,k5=`#ifdef USE_EMISSIVEMAP vec4 emissiveColor = texture2D( emissiveMap, vEmissiveMapUv ); totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,ZG=`#ifdef USE_EMISSIVEMAP +#endif`,F5=`#ifdef USE_EMISSIVEMAP uniform sampler2D emissiveMap; -#endif`,JG="gl_FragColor = linearToOutputTexel( gl_FragColor );",$G=` +#endif`,B5="gl_FragColor = linearToOutputTexel( gl_FragColor );",z5=` const mat3 LINEAR_SRGB_TO_LINEAR_DISPLAY_P3 = mat3( vec3( 0.8224621, 0.177538, 0.0 ), vec3( 0.0331941, 0.9668058, 0.0 ), @@ -636,7 +609,7 @@ vec4 LinearToLinear( in vec4 value ) { } vec4 LinearTosRGB( in vec4 value ) { return sRGBTransferOETF( value ); -}`,QG=`#ifdef USE_ENVMAP +}`,V5=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vec3 cameraToFrag; if ( isOrthographic ) { @@ -665,7 +638,7 @@ vec4 LinearTosRGB( in vec4 value ) { #elif defined( ENVMAP_BLENDING_ADD ) outgoingLight += envColor.xyz * specularStrength * reflectivity; #endif -#endif`,eW=`#ifdef USE_ENVMAP +#endif`,H5=`#ifdef USE_ENVMAP uniform float envMapIntensity; uniform float flipEnvMap; uniform mat3 envMapRotation; @@ -675,7 +648,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform sampler2D envMap; #endif -#endif`,tW=`#ifdef USE_ENVMAP +#endif`,G5=`#ifdef USE_ENVMAP uniform float reflectivity; #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS @@ -686,7 +659,7 @@ vec4 LinearTosRGB( in vec4 value ) { #else varying vec3 vReflect; #endif -#endif`,nW=`#ifdef USE_ENVMAP +#endif`,W5=`#ifdef USE_ENVMAP #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) || defined( LAMBERT ) #define ENV_WORLDPOS #endif @@ -697,7 +670,7 @@ vec4 LinearTosRGB( in vec4 value ) { varying vec3 vReflect; uniform float refractionRatio; #endif -#endif`,iW=`#ifdef USE_ENVMAP +#endif`,j5=`#ifdef USE_ENVMAP #ifdef ENV_WORLDPOS vWorldPosition = worldPosition.xyz; #else @@ -714,18 +687,18 @@ vec4 LinearTosRGB( in vec4 value ) { vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); #endif #endif -#endif`,rW=`#ifdef USE_FOG +#endif`,X5=`#ifdef USE_FOG vFogDepth = - mvPosition.z; -#endif`,sW=`#ifdef USE_FOG +#endif`,Y5=`#ifdef USE_FOG varying float vFogDepth; -#endif`,oW=`#ifdef USE_FOG +#endif`,q5=`#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`,aW=`#ifdef USE_FOG +#endif`,Z5=`#ifdef USE_FOG uniform vec3 fogColor; varying float vFogDepth; #ifdef FOG_EXP2 @@ -734,7 +707,7 @@ vec4 LinearTosRGB( in vec4 value ) { uniform float fogNear; uniform float fogFar; #endif -#endif`,lW=`#ifdef USE_GRADIENTMAP +#endif`,K5=`#ifdef USE_GRADIENTMAP uniform sampler2D gradientMap; #endif vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { @@ -746,12 +719,12 @@ vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { 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 -}`,cW=`#ifdef USE_LIGHTMAP +}`,J5=`#ifdef USE_LIGHTMAP uniform sampler2D lightMap; uniform float lightMapIntensity; -#endif`,uW=`LambertMaterial material; +#endif`,Q5=`LambertMaterial material; material.diffuseColor = diffuseColor.rgb; -material.specularStrength = specularStrength;`,fW=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,$5=`varying vec3 vViewPosition; struct LambertMaterial { vec3 diffuseColor; float specularStrength; @@ -765,7 +738,7 @@ void RE_IndirectDiffuse_Lambert( const in vec3 irradiance, const in vec3 geometr reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Lambert -#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,hW=`uniform bool receiveShadow; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Lambert`,eH=`uniform bool receiveShadow; uniform vec3 ambientLightColor; #if defined( USE_LIGHT_PROBES ) uniform vec3 lightProbe[ 9 ]; @@ -881,7 +854,7 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); return irradiance; } -#endif`,dW=`#ifdef USE_ENVMAP +#endif`,tH=`#ifdef USE_ENVMAP vec3 getIBLIrradiance( const in vec3 normal ) { #ifdef ENVMAP_TYPE_CUBE_UV vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); @@ -914,8 +887,8 @@ float getSpotAttenuation( const in float coneCosine, const in float penumbraCosi #endif } #endif -#endif`,pW=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,mW=`varying vec3 vViewPosition; +#endif`,nH=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,iH=`varying vec3 vViewPosition; struct ToonMaterial { vec3 diffuseColor; }; @@ -927,11 +900,11 @@ void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in vec3 geometryPo reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,gW=`BlinnPhongMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon`,rH=`BlinnPhongMaterial material; material.diffuseColor = diffuseColor.rgb; material.specularColor = specular; material.specularShininess = shininess; -material.specularStrength = specularStrength;`,vW=`varying vec3 vViewPosition; +material.specularStrength = specularStrength;`,sH=`varying vec3 vViewPosition; struct BlinnPhongMaterial { vec3 diffuseColor; vec3 specularColor; @@ -948,7 +921,7 @@ void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in vec3 geom reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); } #define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,yW=`PhysicalMaterial material; +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong`,oH=`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 ); @@ -1034,7 +1007,7 @@ material.roughness = min( material.roughness, 1.0 ); 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`,xW=`struct PhysicalMaterial { +#endif`,aH=`struct PhysicalMaterial { vec3 diffuseColor; float roughness; vec3 specularColor; @@ -1335,7 +1308,7 @@ void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradia #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 ); -}`,_W=` +}`,lH=` vec3 geometryPosition = - vViewPosition; vec3 geometryNormal = normal; vec3 geometryViewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); @@ -1450,7 +1423,7 @@ IncidentLight directLight; #if defined( RE_IndirectSpecular ) vec3 radiance = vec3( 0.0 ); vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,SW=`#if defined( RE_IndirectDiffuse ) +#endif`,cH=`#if defined( RE_IndirectDiffuse ) #ifdef USE_LIGHTMAP vec4 lightMapTexel = texture2D( lightMap, vLightMapUv ); vec3 lightMapIrradiance = lightMapTexel.rgb * lightMapIntensity; @@ -1469,33 +1442,33 @@ IncidentLight directLight; #ifdef USE_CLEARCOAT clearcoatRadiance += getIBLRadiance( geometryViewDir, geometryClearcoatNormal, material.clearcoatRoughness ); #endif -#endif`,AW=`#if defined( RE_IndirectDiffuse ) +#endif`,uH=`#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`,wW=`#if defined( USE_LOGDEPTHBUF ) +#endif`,fH=`#if defined( USE_LOGDEPTHBUF ) gl_FragDepth = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,MW=`#if defined( USE_LOGDEPTHBUF ) +#endif`,hH=`#if defined( USE_LOGDEPTHBUF ) uniform float logDepthBufFC; varying float vFragDepth; varying float vIsPerspective; -#endif`,EW=`#ifdef USE_LOGDEPTHBUF +#endif`,dH=`#ifdef USE_LOGDEPTHBUF varying float vFragDepth; varying float vIsPerspective; -#endif`,TW=`#ifdef USE_LOGDEPTHBUF +#endif`,pH=`#ifdef USE_LOGDEPTHBUF vFragDepth = 1.0 + gl_Position.w; vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); -#endif`,bW=`#ifdef USE_MAP +#endif`,mH=`#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`,CW=`#ifdef USE_MAP +#endif`,gH=`#ifdef USE_MAP uniform sampler2D map; -#endif`,PW=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) +#endif`,vH=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) #if defined( USE_POINTS_UV ) vec2 uv = vUv; #else @@ -1507,7 +1480,7 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,RW=`#if defined( USE_POINTS_UV ) +#endif`,yH=`#if defined( USE_POINTS_UV ) varying vec2 vUv; #else #if defined( USE_MAP ) || defined( USE_ALPHAMAP ) @@ -1519,19 +1492,19 @@ IncidentLight directLight; #endif #ifdef USE_ALPHAMAP uniform sampler2D alphaMap; -#endif`,LW=`float metalnessFactor = metalness; +#endif`,xH=`float metalnessFactor = metalness; #ifdef USE_METALNESSMAP vec4 texelMetalness = texture2D( metalnessMap, vMetalnessMapUv ); metalnessFactor *= texelMetalness.b; -#endif`,IW=`#ifdef USE_METALNESSMAP +#endif`,_H=`#ifdef USE_METALNESSMAP uniform sampler2D metalnessMap; -#endif`,NW=`#ifdef USE_INSTANCING_MORPH +#endif`,SH=`#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`,DW=`#if defined( USE_MORPHCOLORS ) +#endif`,AH=`#if defined( USE_MORPHCOLORS ) vColor *= morphTargetBaseInfluence; for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { #if defined( USE_COLOR_ALPHA ) @@ -1540,12 +1513,12 @@ IncidentLight directLight; if ( morphTargetInfluences[ i ] != 0.0 ) vColor += getMorph( gl_VertexID, i, 2 ).rgb * morphTargetInfluences[ i ]; #endif } -#endif`,UW=`#ifdef USE_MORPHNORMALS +#endif`,MH=`#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`,OW=`#ifdef USE_MORPHTARGETS +#endif`,wH=`#ifdef USE_MORPHTARGETS #ifndef USE_INSTANCING_MORPH uniform float morphTargetBaseInfluence; uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; @@ -1559,12 +1532,12 @@ IncidentLight directLight; ivec3 morphUV = ivec3( x, y, morphTargetIndex ); return texelFetch( morphTargetsTexture, morphUV, 0 ); } -#endif`,kW=`#ifdef USE_MORPHTARGETS +#endif`,EH=`#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`,FW=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#endif`,TH=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; #ifdef FLAT_SHADED vec3 fdx = dFdx( vViewPosition ); vec3 fdy = dFdy( vViewPosition ); @@ -1605,7 +1578,7 @@ IncidentLight directLight; tbn2[1] *= faceDirection; #endif #endif -vec3 nonPerturbedNormal = normal;`,BW=`#ifdef USE_NORMALMAP_OBJECTSPACE +vec3 nonPerturbedNormal = normal;`,bH=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = texture2D( normalMap, vNormalMapUv ).xyz * 2.0 - 1.0; #ifdef FLIP_SIDED normal = - normal; @@ -1620,25 +1593,25 @@ vec3 nonPerturbedNormal = normal;`,BW=`#ifdef USE_NORMALMAP_OBJECTSPACE normal = normalize( tbn * mapN ); #elif defined( USE_BUMPMAP ) normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,zW=`#ifndef FLAT_SHADED +#endif`,CH=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,VW=`#ifndef FLAT_SHADED +#endif`,PH=`#ifndef FLAT_SHADED varying vec3 vNormal; #ifdef USE_TANGENT varying vec3 vTangent; varying vec3 vBitangent; #endif -#endif`,HW=`#ifndef FLAT_SHADED +#endif`,RH=`#ifndef FLAT_SHADED vNormal = normalize( transformedNormal ); #ifdef USE_TANGENT vTangent = normalize( transformedTangent ); vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); #endif -#endif`,GW=`#ifdef USE_NORMALMAP +#endif`,LH=`#ifdef USE_NORMALMAP uniform sampler2D normalMap; uniform vec2 normalScale; #endif @@ -1660,13 +1633,13 @@ vec3 nonPerturbedNormal = normal;`,BW=`#ifdef USE_NORMALMAP_OBJECTSPACE float scale = ( det == 0.0 ) ? 0.0 : inversesqrt( det ); return mat3( T * scale, B * scale, N ); } -#endif`,WW=`#ifdef USE_CLEARCOAT +#endif`,IH=`#ifdef USE_CLEARCOAT vec3 clearcoatNormal = nonPerturbedNormal; -#endif`,jW=`#ifdef USE_CLEARCOAT_NORMALMAP +#endif`,DH=`#ifdef USE_CLEARCOAT_NORMALMAP vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vClearcoatNormalMapUv ).xyz * 2.0 - 1.0; clearcoatMapN.xy *= clearcoatNormalScale; clearcoatNormal = normalize( tbn2 * clearcoatMapN ); -#endif`,XW=`#ifdef USE_CLEARCOATMAP +#endif`,NH=`#ifdef USE_CLEARCOATMAP uniform sampler2D clearcoatMap; #endif #ifdef USE_CLEARCOAT_NORMALMAP @@ -1675,18 +1648,18 @@ vec3 nonPerturbedNormal = normal;`,BW=`#ifdef USE_NORMALMAP_OBJECTSPACE #endif #ifdef USE_CLEARCOAT_ROUGHNESSMAP uniform sampler2D clearcoatRoughnessMap; -#endif`,YW=`#ifdef USE_IRIDESCENCEMAP +#endif`,UH=`#ifdef USE_IRIDESCENCEMAP uniform sampler2D iridescenceMap; #endif #ifdef USE_IRIDESCENCE_THICKNESSMAP uniform sampler2D iridescenceThicknessMap; -#endif`,qW=`#ifdef OPAQUE +#endif`,OH=`#ifdef OPAQUE diffuseColor.a = 1.0; #endif #ifdef USE_TRANSMISSION diffuseColor.a *= material.transmissionAlpha; #endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,KW=`vec3 packNormalToRGB( const in vec3 normal ) { +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,kH=`vec3 packNormalToRGB( const in vec3 normal ) { return normalize( normal ) * 0.5 + 0.5; } vec3 unpackRGBToNormal( const in vec3 rgb ) { @@ -1727,9 +1700,9 @@ float viewZToPerspectiveDepth( const in float viewZ, const in float near, const } float perspectiveDepthToViewZ( const in float depth, const in float near, const in float far ) { return ( near * far ) / ( ( far - near ) * depth - far ); -}`,ZW=`#ifdef PREMULTIPLIED_ALPHA +}`,FH=`#ifdef PREMULTIPLIED_ALPHA gl_FragColor.rgb *= gl_FragColor.a; -#endif`,JW=`vec4 mvPosition = vec4( transformed, 1.0 ); +#endif`,BH=`vec4 mvPosition = vec4( transformed, 1.0 ); #ifdef USE_BATCHING mvPosition = batchingMatrix * mvPosition; #endif @@ -1737,22 +1710,22 @@ float perspectiveDepthToViewZ( const in float depth, const in float near, const mvPosition = instanceMatrix * mvPosition; #endif mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,$W=`#ifdef DITHERING +gl_Position = projectionMatrix * mvPosition;`,zH=`#ifdef DITHERING gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,QW=`#ifdef DITHERING +#endif`,VH=`#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`,e6=`float roughnessFactor = roughness; +#endif`,HH=`float roughnessFactor = roughness; #ifdef USE_ROUGHNESSMAP vec4 texelRoughness = texture2D( roughnessMap, vRoughnessMapUv ); roughnessFactor *= texelRoughness.g; -#endif`,t6=`#ifdef USE_ROUGHNESSMAP +#endif`,GH=`#ifdef USE_ROUGHNESSMAP uniform sampler2D roughnessMap; -#endif`,n6=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,WH=`#if NUM_SPOT_LIGHT_COORDS > 0 varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif #if NUM_SPOT_LIGHT_MAPS > 0 @@ -1935,7 +1908,7 @@ gl_Position = projectionMatrix * mvPosition;`,$W=`#ifdef DITHERING } return shadow; } -#endif`,i6=`#if NUM_SPOT_LIGHT_COORDS > 0 +#endif`,jH=`#if NUM_SPOT_LIGHT_COORDS > 0 uniform mat4 spotLightMatrix[ NUM_SPOT_LIGHT_COORDS ]; varying vec4 vSpotLightCoord[ NUM_SPOT_LIGHT_COORDS ]; #endif @@ -1973,7 +1946,7 @@ gl_Position = projectionMatrix * mvPosition;`,$W=`#ifdef DITHERING }; uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; #endif -#endif`,r6=`#if ( defined( USE_SHADOWMAP ) && ( NUM_DIR_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 ) ) || ( NUM_SPOT_LIGHT_COORDS > 0 ) +#endif`,XH=`#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 @@ -2005,7 +1978,7 @@ gl_Position = projectionMatrix * mvPosition;`,$W=`#ifdef DITHERING vSpotLightCoord[ i ] = spotLightMatrix[ i ] * shadowWorldPosition; } #pragma unroll_loop_end -#endif`,s6=`float getShadowMask() { +#endif`,YH=`float getShadowMask() { float shadow = 1.0; #ifdef USE_SHADOWMAP #if NUM_DIR_LIGHT_SHADOWS > 0 @@ -2037,12 +2010,12 @@ gl_Position = projectionMatrix * mvPosition;`,$W=`#ifdef DITHERING #endif #endif return shadow; -}`,o6=`#ifdef USE_SKINNING +}`,qH=`#ifdef USE_SKINNING mat4 boneMatX = getBoneMatrix( skinIndex.x ); mat4 boneMatY = getBoneMatrix( skinIndex.y ); mat4 boneMatZ = getBoneMatrix( skinIndex.z ); mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,a6=`#ifdef USE_SKINNING +#endif`,ZH=`#ifdef USE_SKINNING uniform mat4 bindMatrix; uniform mat4 bindMatrixInverse; uniform highp sampler2D boneTexture; @@ -2057,7 +2030,7 @@ gl_Position = projectionMatrix * mvPosition;`,$W=`#ifdef DITHERING vec4 v4 = texelFetch( boneTexture, ivec2( x + 3, y ), 0 ); return mat4( v1, v2, v3, v4 ); } -#endif`,l6=`#ifdef USE_SKINNING +#endif`,KH=`#ifdef USE_SKINNING vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); vec4 skinned = vec4( 0.0 ); skinned += boneMatX * skinVertex * skinWeight.x; @@ -2065,7 +2038,7 @@ gl_Position = projectionMatrix * mvPosition;`,$W=`#ifdef DITHERING skinned += boneMatZ * skinVertex * skinWeight.z; skinned += boneMatW * skinVertex * skinWeight.w; transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,c6=`#ifdef USE_SKINNING +#endif`,JH=`#ifdef USE_SKINNING mat4 skinMatrix = mat4( 0.0 ); skinMatrix += skinWeight.x * boneMatX; skinMatrix += skinWeight.y * boneMatY; @@ -2076,17 +2049,17 @@ gl_Position = projectionMatrix * mvPosition;`,$W=`#ifdef DITHERING #ifdef USE_TANGENT objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; #endif -#endif`,u6=`float specularStrength; +#endif`,QH=`float specularStrength; #ifdef USE_SPECULARMAP vec4 texelSpecular = texture2D( specularMap, vSpecularMapUv ); specularStrength = texelSpecular.r; #else specularStrength = 1.0; -#endif`,f6=`#ifdef USE_SPECULARMAP +#endif`,$H=`#ifdef USE_SPECULARMAP uniform sampler2D specularMap; -#endif`,h6=`#if defined( TONE_MAPPING ) +#endif`,eG=`#if defined( TONE_MAPPING ) gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,d6=`#ifndef saturate +#endif`,tG=`#ifndef saturate #define saturate( a ) clamp( a, 0.0, 1.0 ) #endif uniform float toneMappingExposure; @@ -2183,7 +2156,7 @@ vec3 NeutralToneMapping( vec3 color ) { float g = 1. - 1. / ( Desaturation * ( peak - newPeak ) + 1. ); return mix( color, vec3( newPeak ), g ); } -vec3 CustomToneMapping( vec3 color ) { return color; }`,p6=`#ifdef USE_TRANSMISSION +vec3 CustomToneMapping( vec3 color ) { return color; }`,nG=`#ifdef USE_TRANSMISSION material.transmission = transmission; material.transmissionAlpha = 1.0; material.thickness = thickness; @@ -2204,7 +2177,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,p6=`#ifdef USE_TRANSMISS material.attenuationColor, material.attenuationDistance ); material.transmissionAlpha = mix( material.transmissionAlpha, transmitted.a, material.transmission ); totalDiffuse = mix( totalDiffuse, transmitted.rgb, material.transmission ); -#endif`,m6=`#ifdef USE_TRANSMISSION +#endif`,iG=`#ifdef USE_TRANSMISSION uniform float transmission; uniform float thickness; uniform float attenuationDistance; @@ -2335,7 +2308,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,p6=`#ifdef USE_TRANSMISS float transmittanceFactor = ( transmittance.r + transmittance.g + transmittance.b ) / 3.0; return vec4( ( 1.0 - F ) * attenuatedColor, 1.0 - ( 1.0 - transmittedLight.a ) * transmittanceFactor ); } -#endif`,g6=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,rG=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2405,7 +2378,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,p6=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,v6=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,sG=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) varying vec2 vUv; #endif #ifdef USE_MAP @@ -2499,7 +2472,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,p6=`#ifdef USE_TRANSMISS #ifdef USE_THICKNESSMAP uniform mat3 thicknessMapTransform; varying vec2 vThicknessMapUv; -#endif`,y6=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) +#endif`,oG=`#if defined( USE_UV ) || defined( USE_ANISOTROPY ) vUv = vec3( uv, 1 ).xy; #endif #ifdef USE_MAP @@ -2570,7 +2543,7 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,p6=`#ifdef USE_TRANSMISS #endif #ifdef USE_THICKNESSMAP vThicknessMapUv = ( thicknessMapTransform * vec3( THICKNESSMAP_UV, 1 ) ).xy; -#endif`,x6=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) || NUM_SPOT_LIGHT_COORDS > 0 +#endif`,aG=`#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; @@ -2579,12 +2552,12 @@ vec3 CustomToneMapping( vec3 color ) { return color; }`,p6=`#ifdef USE_TRANSMISS worldPosition = instanceMatrix * worldPosition; #endif worldPosition = modelMatrix * worldPosition; -#endif`;const _6=`varying vec2 vUv; +#endif`;const lG=`varying vec2 vUv; uniform mat3 uvTransform; void main() { vUv = ( uvTransform * vec3( uv, 1 ) ).xy; gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,S6=`uniform sampler2D t2D; +}`,cG=`uniform sampler2D t2D; uniform float backgroundIntensity; varying vec2 vUv; void main() { @@ -2596,14 +2569,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,A6=`varying vec3 vWorldDirection; +}`,uG=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,w6=`#ifdef ENVMAP_TYPE_CUBE +}`,fG=`#ifdef ENVMAP_TYPE_CUBE uniform samplerCube envMap; #elif defined( ENVMAP_TYPE_CUBE_UV ) uniform sampler2D envMap; @@ -2626,14 +2599,14 @@ void main() { gl_FragColor = texColor; #include #include -}`,M6=`varying vec3 vWorldDirection; +}`,hG=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include gl_Position.z = gl_Position.w; -}`,E6=`uniform samplerCube tCube; +}`,dG=`uniform samplerCube tCube; uniform float tFlip; uniform float opacity; varying vec3 vWorldDirection; @@ -2643,7 +2616,7 @@ void main() { gl_FragColor.a *= opacity; #include #include -}`,T6=`#include +}`,pG=`#include #include #include #include @@ -2670,7 +2643,7 @@ void main() { #include #include vHighPrecisionZW = gl_Position.zw; -}`,b6=`#if DEPTH_PACKING == 3200 +}`,mG=`#if DEPTH_PACKING == 3200 uniform float opacity; #endif #include @@ -2700,7 +2673,7 @@ void main() { #elif DEPTH_PACKING == 3201 gl_FragColor = packDepthToRGBA( fragCoordZ ); #endif -}`,C6=`#define DISTANCE +}`,gG=`#define DISTANCE varying vec3 vWorldPosition; #include #include @@ -2727,7 +2700,7 @@ void main() { #include #include vWorldPosition = worldPosition.xyz; -}`,P6=`#define DISTANCE +}`,vG=`#define DISTANCE uniform vec3 referencePosition; uniform float nearDistance; uniform float farDistance; @@ -2751,13 +2724,13 @@ void main () { dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); dist = saturate( dist ); gl_FragColor = packDepthToRGBA( dist ); -}`,R6=`varying vec3 vWorldDirection; +}`,yG=`varying vec3 vWorldDirection; #include void main() { vWorldDirection = transformDirection( position, modelMatrix ); #include #include -}`,L6=`uniform sampler2D tEquirect; +}`,xG=`uniform sampler2D tEquirect; varying vec3 vWorldDirection; #include void main() { @@ -2766,7 +2739,7 @@ void main() { gl_FragColor = texture2D( tEquirect, sampleUV ); #include #include -}`,I6=`uniform float scale; +}`,_G=`uniform float scale; attribute float lineDistance; varying float vLineDistance; #include @@ -2788,7 +2761,7 @@ void main() { #include #include #include -}`,N6=`uniform vec3 diffuse; +}`,SG=`uniform vec3 diffuse; uniform float opacity; uniform float dashSize; uniform float totalSize; @@ -2816,7 +2789,7 @@ void main() { #include #include #include -}`,D6=`#include +}`,AG=`#include #include #include #include @@ -2848,7 +2821,7 @@ void main() { #include #include #include -}`,U6=`uniform vec3 diffuse; +}`,MG=`uniform vec3 diffuse; uniform float opacity; #ifndef FLAT_SHADED varying vec3 vNormal; @@ -2896,7 +2869,7 @@ void main() { #include #include #include -}`,O6=`#define LAMBERT +}`,wG=`#define LAMBERT varying vec3 vViewPosition; #include #include @@ -2935,7 +2908,7 @@ void main() { #include #include #include -}`,k6=`#define LAMBERT +}`,EG=`#define LAMBERT uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -2992,7 +2965,7 @@ void main() { #include #include #include -}`,F6=`#define MATCAP +}`,TG=`#define MATCAP varying vec3 vViewPosition; #include #include @@ -3026,7 +2999,7 @@ void main() { #include #include vViewPosition = - mvPosition.xyz; -}`,B6=`#define MATCAP +}`,bG=`#define MATCAP uniform vec3 diffuse; uniform float opacity; uniform sampler2D matcap; @@ -3072,7 +3045,7 @@ void main() { #include #include #include -}`,z6=`#define NORMAL +}`,CG=`#define NORMAL #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; #endif @@ -3105,7 +3078,7 @@ void main() { #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) vViewPosition = - mvPosition.xyz; #endif -}`,V6=`#define NORMAL +}`,PG=`#define NORMAL uniform float opacity; #if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( USE_NORMALMAP_TANGENTSPACE ) varying vec3 vViewPosition; @@ -3127,7 +3100,7 @@ void main() { #ifdef OPAQUE gl_FragColor.a = 1.0; #endif -}`,H6=`#define PHONG +}`,RG=`#define PHONG varying vec3 vViewPosition; #include #include @@ -3166,7 +3139,7 @@ void main() { #include #include #include -}`,G6=`#define PHONG +}`,LG=`#define PHONG uniform vec3 diffuse; uniform vec3 emissive; uniform vec3 specular; @@ -3225,7 +3198,7 @@ void main() { #include #include #include -}`,W6=`#define STANDARD +}`,IG=`#define STANDARD varying vec3 vViewPosition; #ifdef USE_TRANSMISSION varying vec3 vWorldPosition; @@ -3268,7 +3241,7 @@ void main() { #ifdef USE_TRANSMISSION vWorldPosition = worldPosition.xyz; #endif -}`,j6=`#define STANDARD +}`,DG=`#define STANDARD #ifdef PHYSICAL #define IOR #define USE_SPECULAR @@ -3393,7 +3366,7 @@ void main() { #include #include #include -}`,X6=`#define TOON +}`,NG=`#define TOON varying vec3 vViewPosition; #include #include @@ -3430,7 +3403,7 @@ void main() { #include #include #include -}`,Y6=`#define TOON +}`,UG=`#define TOON uniform vec3 diffuse; uniform vec3 emissive; uniform float opacity; @@ -3483,7 +3456,7 @@ void main() { #include #include #include -}`,q6=`uniform float size; +}`,OG=`uniform float size; uniform float scale; #include #include @@ -3514,7 +3487,7 @@ void main() { #include #include #include -}`,K6=`uniform vec3 diffuse; +}`,kG=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3539,7 +3512,7 @@ void main() { #include #include #include -}`,Z6=`#include +}`,FG=`#include #include #include #include @@ -3562,7 +3535,7 @@ void main() { #include #include #include -}`,J6=`uniform vec3 color; +}`,BG=`uniform vec3 color; uniform float opacity; #include #include @@ -3578,7 +3551,7 @@ void main() { #include #include #include -}`,$6=`uniform float rotation; +}`,zG=`uniform float rotation; uniform vec2 center; #include #include @@ -3604,7 +3577,7 @@ void main() { #include #include #include -}`,Q6=`uniform vec3 diffuse; +}`,VG=`uniform vec3 diffuse; uniform float opacity; #include #include @@ -3629,7 +3602,7 @@ void main() { #include #include #include -}`,At={alphahash_fragment:SG,alphahash_pars_fragment:AG,alphamap_fragment:wG,alphamap_pars_fragment:MG,alphatest_fragment:EG,alphatest_pars_fragment:TG,aomap_fragment:bG,aomap_pars_fragment:CG,batching_pars_vertex:PG,batching_vertex:RG,begin_vertex:LG,beginnormal_vertex:IG,bsdfs:NG,iridescence_fragment:DG,bumpmap_pars_fragment:UG,clipping_planes_fragment:OG,clipping_planes_pars_fragment:kG,clipping_planes_pars_vertex:FG,clipping_planes_vertex:BG,color_fragment:zG,color_pars_fragment:VG,color_pars_vertex:HG,color_vertex:GG,common:WG,cube_uv_reflection_fragment:jG,defaultnormal_vertex:XG,displacementmap_pars_vertex:YG,displacementmap_vertex:qG,emissivemap_fragment:KG,emissivemap_pars_fragment:ZG,colorspace_fragment:JG,colorspace_pars_fragment:$G,envmap_fragment:QG,envmap_common_pars_fragment:eW,envmap_pars_fragment:tW,envmap_pars_vertex:nW,envmap_physical_pars_fragment:dW,envmap_vertex:iW,fog_vertex:rW,fog_pars_vertex:sW,fog_fragment:oW,fog_pars_fragment:aW,gradientmap_pars_fragment:lW,lightmap_pars_fragment:cW,lights_lambert_fragment:uW,lights_lambert_pars_fragment:fW,lights_pars_begin:hW,lights_toon_fragment:pW,lights_toon_pars_fragment:mW,lights_phong_fragment:gW,lights_phong_pars_fragment:vW,lights_physical_fragment:yW,lights_physical_pars_fragment:xW,lights_fragment_begin:_W,lights_fragment_maps:SW,lights_fragment_end:AW,logdepthbuf_fragment:wW,logdepthbuf_pars_fragment:MW,logdepthbuf_pars_vertex:EW,logdepthbuf_vertex:TW,map_fragment:bW,map_pars_fragment:CW,map_particle_fragment:PW,map_particle_pars_fragment:RW,metalnessmap_fragment:LW,metalnessmap_pars_fragment:IW,morphinstance_vertex:NW,morphcolor_vertex:DW,morphnormal_vertex:UW,morphtarget_pars_vertex:OW,morphtarget_vertex:kW,normal_fragment_begin:FW,normal_fragment_maps:BW,normal_pars_fragment:zW,normal_pars_vertex:VW,normal_vertex:HW,normalmap_pars_fragment:GW,clearcoat_normal_fragment_begin:WW,clearcoat_normal_fragment_maps:jW,clearcoat_pars_fragment:XW,iridescence_pars_fragment:YW,opaque_fragment:qW,packing:KW,premultiplied_alpha_fragment:ZW,project_vertex:JW,dithering_fragment:$W,dithering_pars_fragment:QW,roughnessmap_fragment:e6,roughnessmap_pars_fragment:t6,shadowmap_pars_fragment:n6,shadowmap_pars_vertex:i6,shadowmap_vertex:r6,shadowmask_pars_fragment:s6,skinbase_vertex:o6,skinning_pars_vertex:a6,skinning_vertex:l6,skinnormal_vertex:c6,specularmap_fragment:u6,specularmap_pars_fragment:f6,tonemapping_fragment:h6,tonemapping_pars_fragment:d6,transmission_fragment:p6,transmission_pars_fragment:m6,uv_pars_fragment:g6,uv_pars_vertex:v6,uv_vertex:y6,worldpos_vertex:x6,background_vert:_6,background_frag:S6,backgroundCube_vert:A6,backgroundCube_frag:w6,cube_vert:M6,cube_frag:E6,depth_vert:T6,depth_frag:b6,distanceRGBA_vert:C6,distanceRGBA_frag:P6,equirect_vert:R6,equirect_frag:L6,linedashed_vert:I6,linedashed_frag:N6,meshbasic_vert:D6,meshbasic_frag:U6,meshlambert_vert:O6,meshlambert_frag:k6,meshmatcap_vert:F6,meshmatcap_frag:B6,meshnormal_vert:z6,meshnormal_frag:V6,meshphong_vert:H6,meshphong_frag:G6,meshphysical_vert:W6,meshphysical_frag:j6,meshtoon_vert:X6,meshtoon_frag:Y6,points_vert:q6,points_frag:K6,shadow_vert:Z6,shadow_frag:J6,sprite_vert:$6,sprite_frag:Q6},ze={common:{diffuse:{value:new je(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 pe(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 je(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new je(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 je(16777215)},opacity:{value:1},center:{value:new pe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new xt},alphaMap:{value:null},alphaMapTransform:{value:new xt},alphaTest:{value:0}}},Nr={basic:{uniforms:gi([ze.common,ze.specularmap,ze.envmap,ze.aomap,ze.lightmap,ze.fog]),vertexShader:At.meshbasic_vert,fragmentShader:At.meshbasic_frag},lambert:{uniforms:gi([ze.common,ze.specularmap,ze.envmap,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.fog,ze.lights,{emissive:{value:new je(0)}}]),vertexShader:At.meshlambert_vert,fragmentShader:At.meshlambert_frag},phong:{uniforms:gi([ze.common,ze.specularmap,ze.envmap,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.fog,ze.lights,{emissive:{value:new je(0)},specular:{value:new je(1118481)},shininess:{value:30}}]),vertexShader:At.meshphong_vert,fragmentShader:At.meshphong_frag},standard:{uniforms:gi([ze.common,ze.envmap,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.roughnessmap,ze.metalnessmap,ze.fog,ze.lights,{emissive:{value:new je(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:At.meshphysical_vert,fragmentShader:At.meshphysical_frag},toon:{uniforms:gi([ze.common,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.gradientmap,ze.fog,ze.lights,{emissive:{value:new je(0)}}]),vertexShader:At.meshtoon_vert,fragmentShader:At.meshtoon_frag},matcap:{uniforms:gi([ze.common,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.fog,{matcap:{value:null}}]),vertexShader:At.meshmatcap_vert,fragmentShader:At.meshmatcap_frag},points:{uniforms:gi([ze.points,ze.fog]),vertexShader:At.points_vert,fragmentShader:At.points_frag},dashed:{uniforms:gi([ze.common,ze.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:At.linedashed_vert,fragmentShader:At.linedashed_frag},depth:{uniforms:gi([ze.common,ze.displacementmap]),vertexShader:At.depth_vert,fragmentShader:At.depth_frag},normal:{uniforms:gi([ze.common,ze.bumpmap,ze.normalmap,ze.displacementmap,{opacity:{value:1}}]),vertexShader:At.meshnormal_vert,fragmentShader:At.meshnormal_frag},sprite:{uniforms:gi([ze.sprite,ze.fog]),vertexShader:At.sprite_vert,fragmentShader:At.sprite_frag},background:{uniforms:{uvTransform:{value:new xt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:At.background_vert,fragmentShader:At.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new xt}},vertexShader:At.backgroundCube_vert,fragmentShader:At.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:At.cube_vert,fragmentShader:At.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:At.equirect_vert,fragmentShader:At.equirect_frag},distanceRGBA:{uniforms:gi([ze.common,ze.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:At.distanceRGBA_vert,fragmentShader:At.distanceRGBA_frag},shadow:{uniforms:gi([ze.lights,ze.fog,{color:{value:new je(0)},opacity:{value:1}}]),vertexShader:At.shadow_vert,fragmentShader:At.shadow_frag}};Nr.physical={uniforms:gi([Nr.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new xt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new xt},clearcoatNormalScale:{value:new pe(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 je(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 pe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new xt},attenuationDistance:{value:0},attenuationColor:{value:new je(0)},specularColor:{value:new je(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new xt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new xt},anisotropyVector:{value:new pe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new xt}}]),vertexShader:At.meshphysical_vert,fragmentShader:At.meshphysical_frag};const wp={r:0,b:0,g:0},va=new Mi,e8=new at;function t8(n,e,t,i,r,s,o){const a=new je(0);let l=s===!0?0:1,f,h,d=null,p=0,m=null;function y(S){let A=S.isScene===!0?S.background:null;return A&&A.isTexture&&(A=(S.backgroundBlurriness>0?t:e).get(A)),A}function _(S){let A=!1;const E=y(S);E===null?g(a,l):E&&E.isColor&&(g(E,1),A=!0);const R=n.xr.getEnvironmentBlendMode();R==="additive"?i.buffers.color.setClear(0,0,0,1,o):R==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||A)&&(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(S,A){const E=y(A);E&&(E.isCubeTexture||E.mapping===Zc)?(h===void 0&&(h=new An(new pl(1,1,1),new zr({name:"BackgroundCubeMaterial",uniforms:Gc(Nr.backgroundCube.uniforms),vertexShader:Nr.backgroundCube.vertexShader,fragmentShader:Nr.backgroundCube.fragmentShader,side:Ai,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(R,C,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(h)),va.copy(A.backgroundRotation),va.x*=-1,va.y*=-1,va.z*=-1,E.isCubeTexture&&E.isRenderTargetTexture===!1&&(va.y*=-1,va.z*=-1),h.material.uniforms.envMap.value=E,h.material.uniforms.flipEnvMap.value=E.isCubeTexture&&E.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,h.material.uniforms.backgroundRotation.value.setFromMatrix4(e8.makeRotationFromEuler(va)),h.material.toneMapped=Bt.getTransfer(E.colorSpace)!==Yt,(d!==E||p!==E.version||m!==n.toneMapping)&&(h.material.needsUpdate=!0,d=E,p=E.version,m=n.toneMapping),h.layers.enableAll(),S.unshift(h,h.geometry,h.material,0,0,null)):E&&E.isTexture&&(f===void 0&&(f=new An(new Jc(2,2),new zr({name:"BackgroundMaterial",uniforms:Gc(Nr.background.uniforms),vertexShader:Nr.background.vertexShader,fragmentShader:Nr.background.fragmentShader,side:Xs,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=E,f.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,f.material.toneMapped=Bt.getTransfer(E.colorSpace)!==Yt,E.matrixAutoUpdate===!0&&E.updateMatrix(),f.material.uniforms.uvTransform.value.copy(E.matrix),(d!==E||p!==E.version||m!==n.toneMapping)&&(f.material.needsUpdate=!0,d=E,p=E.version,m=n.toneMapping),f.layers.enableAll(),S.unshift(f,f.geometry,f.material,0,0,null))}function g(S,A){S.getRGB(wp,XI(n)),i.buffers.color.setClear(wp.r,wp.g,wp.b,A,o)}return{getClearColor:function(){return a},setClearColor:function(S,A=1){a.set(S),l=A,g(a,l)},getClearAlpha:function(){return l},setClearAlpha:function(S){l=S,g(a,l)},render:_,addToRenderList:x}}function n8(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},r=p(null);let s=r,o=!1;function a(b,D,j,X,te){let ne=!1;const $=d(X,j,D);s!==$&&(s=$,f(s.object)),ne=m(b,X,j,te),ne&&y(b,X,j,te),te!==null&&e.update(te,n.ELEMENT_ARRAY_BUFFER),(ne||o)&&(o=!1,E(b,D,j,X),te!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(te).buffer))}function l(){return n.createVertexArray()}function f(b){return n.bindVertexArray(b)}function h(b){return n.deleteVertexArray(b)}function d(b,D,j){const X=j.wireframe===!0;let te=i[b.id];te===void 0&&(te={},i[b.id]=te);let ne=te[D.id];ne===void 0&&(ne={},te[D.id]=ne);let $=ne[X];return $===void 0&&($=p(l()),ne[X]=$),$}function p(b){const D=[],j=[],X=[];for(let te=0;te=0){const J=te[k];let Q=ne[k];if(Q===void 0&&(k==="instanceMatrix"&&b.instanceMatrix&&(Q=b.instanceMatrix),k==="instanceColor"&&b.instanceColor&&(Q=b.instanceColor)),J===void 0||J.attribute!==Q||Q&&J.data!==Q.data)return!0;$++}return s.attributesNum!==$||s.index!==X}function y(b,D,j,X){const te={},ne=D.attributes;let $=0;const le=j.getAttributes();for(const k in le)if(le[k].location>=0){let J=ne[k];J===void 0&&(k==="instanceMatrix"&&b.instanceMatrix&&(J=b.instanceMatrix),k==="instanceColor"&&b.instanceColor&&(J=b.instanceColor));const Q={};Q.attribute=J,J&&J.data&&(Q.data=J.data),te[k]=Q,$++}s.attributes=te,s.attributesNum=$,s.index=X}function _(){const b=s.newAttributes;for(let D=0,j=b.length;D=0){let q=te[le];if(q===void 0&&(le==="instanceMatrix"&&b.instanceMatrix&&(q=b.instanceMatrix),le==="instanceColor"&&b.instanceColor&&(q=b.instanceColor)),q!==void 0){const J=q.normalized,Q=q.itemSize,_e=e.get(q);if(_e===void 0)continue;const De=_e.buffer,oe=_e.type,ve=_e.bytesPerElement,Te=oe===n.INT||oe===n.UNSIGNED_INT||q.gpuType===N1;if(q.isInterleavedBufferAttribute){const we=q.data,nt=we.stride,it=q.offset;if(we.isInstancedInterleavedBuffer){for(let Xe=0;Xe0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";C="mediump"}return C==="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=l(f);h!==f&&(console.warn("THREE.WebGLRenderer:",f,"not supported, using",h,"instead."),f=h);const d=t.logarithmicDepthBuffer===!0,p=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),m=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),y=n.getParameter(n.MAX_TEXTURE_SIZE),_=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),x=n.getParameter(n.MAX_VERTEX_ATTRIBS),g=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),S=n.getParameter(n.MAX_VARYING_VECTORS),A=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),E=m>0,R=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:l,textureFormatReadable:o,textureTypeReadable:a,precision:f,logarithmicDepthBuffer:d,maxTextures:p,maxVertexTextures:m,maxTextureSize:y,maxCubemapSize:_,maxAttributes:x,maxVertexUniforms:g,maxVaryings:S,maxFragmentUniforms:A,vertexTextures:E,maxSamples:R}}function s8(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Ps,a=new xt,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const m=d.length!==0||p||i!==0||r;return r=p,i=d.length,m},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,m){const y=d.clippingPlanes,_=d.clipIntersection,x=d.clipShadows,g=n.get(d);if(!r||y===null||y.length===0||s&&!x)s?h(null):f();else{const S=s?0:i,A=S*4;let E=g.clippingState||null;l.value=E,E=h(y,p,A,m);for(let R=0;R!==A;++R)E[R]=t[R];g.clippingState=E,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=S}};function f(){l.value!==t&&(l.value=t,l.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,m,y){const _=d!==null?d.length:0;let x=null;if(_!==0){if(x=l.value,y!==!0||x===null){const g=m+_*4,S=p.matrixWorldInverse;a.getNormalMatrix(S),(x===null||x.length0){const f=new q1(l.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 l=e.get(a);l!==void 0&&(e.delete(a),l.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class Ur extends bh{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,l=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,l=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,l,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 Sc=4,$T=[.125,.215,.35,.446,.526,.582],Da=20,Ty=new Ur,QT=new je;let by=null,Cy=0,Py=0,Ry=!1;const Na=(1+Math.sqrt(5))/2,Yl=1/Na,eb=[new O(-Na,Yl,0),new O(Na,Yl,0),new O(-Yl,0,Na),new O(Yl,0,Na),new O(0,Na,-Yl),new O(0,Na,Yl),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class K_{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){by=this._renderer.getRenderTarget(),Cy=this._renderer.getActiveCubeFace(),Py=this._renderer.getActiveMipmapLevel(),Ry=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=ib(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=nb(),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?A:0,A,A),h.setRenderTarget(r),_&&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===Ys||e.mapping===jo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=ib()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=nb());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new An(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const l=this._cubeSize;Mp(t,0,0,3*l,2*l),i.setRenderTarget(t),i.render(o,Ty)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;sDa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${Da}`);const g=[];let S=0;for(let L=0;LA-Sc?r-A+Sc:0),C=4*(this._cubeSize-E);Mp(t,R,C,3*E,2*E),l.setRenderTarget(t),l.render(d,Ty)}}function a8(n){const e=[],t=[],i=[];let r=n;const s=n-Sc+1+$T.length;for(let o=0;on-Sc?l=$T[o-n+Sc-1]:o===0&&(l=0),i.push(l);const f=1/(a-2),h=-f,d=1+f,p=[h,h,d,h,d,d,h,h,d,d,h,d],m=6,y=6,_=3,x=2,g=1,S=new Float32Array(_*y*m),A=new Float32Array(x*y*m),E=new Float32Array(g*y*m);for(let C=0;C2?0:-1,P=[L,I,0,L+2/3,I,0,L+2/3,I+1,0,L,I,0,L+2/3,I+1,0,L,I+1,0];S.set(P,_*y*C),A.set(p,x*y*C);const b=[C,C,C,C,C,C];E.set(b,g*y*C)}const R=new St;R.setAttribute("position",new Ht(S,_)),R.setAttribute("uv",new Ht(A,x)),R.setAttribute("faceIndex",new Ht(E,g)),e.push(R),r>Sc&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function tb(n,e,t){const i=new Br(n,e,t);return i.texture.mapping=Zc,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function Mp(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function l8(n,e,t){const i=new Float32Array(Da),r=new O(0,1,0);return new zr({name:"SphericalGaussianBlur",defines:{n:Da,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:K1(),fragmentShader:` +}`,At={alphahash_fragment:c5,alphahash_pars_fragment:u5,alphamap_fragment:f5,alphamap_pars_fragment:h5,alphatest_fragment:d5,alphatest_pars_fragment:p5,aomap_fragment:m5,aomap_pars_fragment:g5,batching_pars_vertex:v5,batching_vertex:y5,begin_vertex:x5,beginnormal_vertex:_5,bsdfs:S5,iridescence_fragment:A5,bumpmap_pars_fragment:M5,clipping_planes_fragment:w5,clipping_planes_pars_fragment:E5,clipping_planes_pars_vertex:T5,clipping_planes_vertex:b5,color_fragment:C5,color_pars_fragment:P5,color_pars_vertex:R5,color_vertex:L5,common:I5,cube_uv_reflection_fragment:D5,defaultnormal_vertex:N5,displacementmap_pars_vertex:U5,displacementmap_vertex:O5,emissivemap_fragment:k5,emissivemap_pars_fragment:F5,colorspace_fragment:B5,colorspace_pars_fragment:z5,envmap_fragment:V5,envmap_common_pars_fragment:H5,envmap_pars_fragment:G5,envmap_pars_vertex:W5,envmap_physical_pars_fragment:tH,envmap_vertex:j5,fog_vertex:X5,fog_pars_vertex:Y5,fog_fragment:q5,fog_pars_fragment:Z5,gradientmap_pars_fragment:K5,lightmap_pars_fragment:J5,lights_lambert_fragment:Q5,lights_lambert_pars_fragment:$5,lights_pars_begin:eH,lights_toon_fragment:nH,lights_toon_pars_fragment:iH,lights_phong_fragment:rH,lights_phong_pars_fragment:sH,lights_physical_fragment:oH,lights_physical_pars_fragment:aH,lights_fragment_begin:lH,lights_fragment_maps:cH,lights_fragment_end:uH,logdepthbuf_fragment:fH,logdepthbuf_pars_fragment:hH,logdepthbuf_pars_vertex:dH,logdepthbuf_vertex:pH,map_fragment:mH,map_pars_fragment:gH,map_particle_fragment:vH,map_particle_pars_fragment:yH,metalnessmap_fragment:xH,metalnessmap_pars_fragment:_H,morphinstance_vertex:SH,morphcolor_vertex:AH,morphnormal_vertex:MH,morphtarget_pars_vertex:wH,morphtarget_vertex:EH,normal_fragment_begin:TH,normal_fragment_maps:bH,normal_pars_fragment:CH,normal_pars_vertex:PH,normal_vertex:RH,normalmap_pars_fragment:LH,clearcoat_normal_fragment_begin:IH,clearcoat_normal_fragment_maps:DH,clearcoat_pars_fragment:NH,iridescence_pars_fragment:UH,opaque_fragment:OH,packing:kH,premultiplied_alpha_fragment:FH,project_vertex:BH,dithering_fragment:zH,dithering_pars_fragment:VH,roughnessmap_fragment:HH,roughnessmap_pars_fragment:GH,shadowmap_pars_fragment:WH,shadowmap_pars_vertex:jH,shadowmap_vertex:XH,shadowmask_pars_fragment:YH,skinbase_vertex:qH,skinning_pars_vertex:ZH,skinning_vertex:KH,skinnormal_vertex:JH,specularmap_fragment:QH,specularmap_pars_fragment:$H,tonemapping_fragment:eG,tonemapping_pars_fragment:tG,transmission_fragment:nG,transmission_pars_fragment:iG,uv_pars_fragment:rG,uv_pars_vertex:sG,uv_vertex:oG,worldpos_vertex:aG,background_vert:lG,background_frag:cG,backgroundCube_vert:uG,backgroundCube_frag:fG,cube_vert:hG,cube_frag:dG,depth_vert:pG,depth_frag:mG,distanceRGBA_vert:gG,distanceRGBA_frag:vG,equirect_vert:yG,equirect_frag:xG,linedashed_vert:_G,linedashed_frag:SG,meshbasic_vert:AG,meshbasic_frag:MG,meshlambert_vert:wG,meshlambert_frag:EG,meshmatcap_vert:TG,meshmatcap_frag:bG,meshnormal_vert:CG,meshnormal_frag:PG,meshphong_vert:RG,meshphong_frag:LG,meshphysical_vert:IG,meshphysical_frag:DG,meshtoon_vert:NG,meshtoon_frag:UG,points_vert:OG,points_frag:kG,shadow_vert:FG,shadow_frag:BG,sprite_vert:zG,sprite_frag:VG},ze={common:{diffuse:{value:new je(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 pe(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 je(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotLightMap:{value:[]},spotShadowMap:{value:[]},spotLightMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new je(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 je(16777215)},opacity:{value:1},center:{value:new pe(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new xt},alphaMap:{value:null},alphaMapTransform:{value:new xt},alphaTest:{value:0}}},Ir={basic:{uniforms:mi([ze.common,ze.specularmap,ze.envmap,ze.aomap,ze.lightmap,ze.fog]),vertexShader:At.meshbasic_vert,fragmentShader:At.meshbasic_frag},lambert:{uniforms:mi([ze.common,ze.specularmap,ze.envmap,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.fog,ze.lights,{emissive:{value:new je(0)}}]),vertexShader:At.meshlambert_vert,fragmentShader:At.meshlambert_frag},phong:{uniforms:mi([ze.common,ze.specularmap,ze.envmap,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.fog,ze.lights,{emissive:{value:new je(0)},specular:{value:new je(1118481)},shininess:{value:30}}]),vertexShader:At.meshphong_vert,fragmentShader:At.meshphong_frag},standard:{uniforms:mi([ze.common,ze.envmap,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.roughnessmap,ze.metalnessmap,ze.fog,ze.lights,{emissive:{value:new je(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:At.meshphysical_vert,fragmentShader:At.meshphysical_frag},toon:{uniforms:mi([ze.common,ze.aomap,ze.lightmap,ze.emissivemap,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.gradientmap,ze.fog,ze.lights,{emissive:{value:new je(0)}}]),vertexShader:At.meshtoon_vert,fragmentShader:At.meshtoon_frag},matcap:{uniforms:mi([ze.common,ze.bumpmap,ze.normalmap,ze.displacementmap,ze.fog,{matcap:{value:null}}]),vertexShader:At.meshmatcap_vert,fragmentShader:At.meshmatcap_frag},points:{uniforms:mi([ze.points,ze.fog]),vertexShader:At.points_vert,fragmentShader:At.points_frag},dashed:{uniforms:mi([ze.common,ze.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:At.linedashed_vert,fragmentShader:At.linedashed_frag},depth:{uniforms:mi([ze.common,ze.displacementmap]),vertexShader:At.depth_vert,fragmentShader:At.depth_frag},normal:{uniforms:mi([ze.common,ze.bumpmap,ze.normalmap,ze.displacementmap,{opacity:{value:1}}]),vertexShader:At.meshnormal_vert,fragmentShader:At.meshnormal_frag},sprite:{uniforms:mi([ze.sprite,ze.fog]),vertexShader:At.sprite_vert,fragmentShader:At.sprite_frag},background:{uniforms:{uvTransform:{value:new xt},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:At.background_vert,fragmentShader:At.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1},backgroundRotation:{value:new xt}},vertexShader:At.backgroundCube_vert,fragmentShader:At.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:At.cube_vert,fragmentShader:At.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:At.equirect_vert,fragmentShader:At.equirect_frag},distanceRGBA:{uniforms:mi([ze.common,ze.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:At.distanceRGBA_vert,fragmentShader:At.distanceRGBA_frag},shadow:{uniforms:mi([ze.lights,ze.fog,{color:{value:new je(0)},opacity:{value:1}}]),vertexShader:At.shadow_vert,fragmentShader:At.shadow_frag}};Ir.physical={uniforms:mi([Ir.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new xt},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new xt},clearcoatNormalScale:{value:new pe(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 je(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 pe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new xt},attenuationDistance:{value:0},attenuationColor:{value:new je(0)},specularColor:{value:new je(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new xt},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new xt},anisotropyVector:{value:new pe},anisotropyMap:{value:null},anisotropyMapTransform:{value:new xt}}]),vertexShader:At.meshphysical_vert,fragmentShader:At.meshphysical_frag};const up={r:0,b:0,g:0},fa=new Mi,HG=new at;function GG(n,e,t,i,r,s,o){const a=new je(0);let c=s===!0?0:1,f,h,d=null,p=0,m=null;function y(S){let A=S.isScene===!0?S.background:null;return A&&A.isTexture&&(A=(S.backgroundBlurriness>0?t:e).get(A)),A}function _(S){let A=!1;const E=y(S);E===null?g(a,c):E&&E.isColor&&(g(E,1),A=!0);const R=n.xr.getEnvironmentBlendMode();R==="additive"?i.buffers.color.setClear(0,0,0,1,o):R==="alpha-blend"&&i.buffers.color.setClear(0,0,0,0,o),(n.autoClear||A)&&(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(S,A){const E=y(A);E&&(E.isCubeTexture||E.mapping===Hc)?(h===void 0&&(h=new An(new al(1,1,1),new Br({name:"BackgroundCubeMaterial",uniforms:Oc(Ir.backgroundCube.uniforms),vertexShader:Ir.backgroundCube.vertexShader,fragmentShader:Ir.backgroundCube.fragmentShader,side:Si,depthTest:!1,depthWrite:!1,fog:!1})),h.geometry.deleteAttribute("normal"),h.geometry.deleteAttribute("uv"),h.onBeforeRender=function(R,C,L){this.matrixWorld.copyPosition(L.matrixWorld)},Object.defineProperty(h.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),r.update(h)),fa.copy(A.backgroundRotation),fa.x*=-1,fa.y*=-1,fa.z*=-1,E.isCubeTexture&&E.isRenderTargetTexture===!1&&(fa.y*=-1,fa.z*=-1),h.material.uniforms.envMap.value=E,h.material.uniforms.flipEnvMap.value=E.isCubeTexture&&E.isRenderTargetTexture===!1?-1:1,h.material.uniforms.backgroundBlurriness.value=A.backgroundBlurriness,h.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,h.material.uniforms.backgroundRotation.value.setFromMatrix4(HG.makeRotationFromEuler(fa)),h.material.toneMapped=Bt.getTransfer(E.colorSpace)!==Yt,(d!==E||p!==E.version||m!==n.toneMapping)&&(h.material.needsUpdate=!0,d=E,p=E.version,m=n.toneMapping),h.layers.enableAll(),S.unshift(h,h.geometry,h.material,0,0,null)):E&&E.isTexture&&(f===void 0&&(f=new An(new Gc(2,2),new Br({name:"BackgroundMaterial",uniforms:Oc(Ir.background.uniforms),vertexShader:Ir.background.vertexShader,fragmentShader:Ir.background.fragmentShader,side:Ws,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=E,f.material.uniforms.backgroundIntensity.value=A.backgroundIntensity,f.material.toneMapped=Bt.getTransfer(E.colorSpace)!==Yt,E.matrixAutoUpdate===!0&&E.updateMatrix(),f.material.uniforms.uvTransform.value.copy(E.matrix),(d!==E||p!==E.version||m!==n.toneMapping)&&(f.material.needsUpdate=!0,d=E,p=E.version,m=n.toneMapping),f.layers.enableAll(),S.unshift(f,f.geometry,f.material,0,0,null))}function g(S,A){S.getRGB(up,iI(n)),i.buffers.color.setClear(up.r,up.g,up.b,A,o)}return{getClearColor:function(){return a},setClearColor:function(S,A=1){a.set(S),c=A,g(a,c)},getClearAlpha:function(){return c},setClearAlpha:function(S){c=S,g(a,c)},render:_,addToRenderList:x}}function WG(n,e){const t=n.getParameter(n.MAX_VERTEX_ATTRIBS),i={},r=p(null);let s=r,o=!1;function a(b,N,j,X,te){let ne=!1;const Q=d(X,j,N);s!==Q&&(s=Q,f(s.object)),ne=m(b,X,j,te),ne&&y(b,X,j,te),te!==null&&e.update(te,n.ELEMENT_ARRAY_BUFFER),(ne||o)&&(o=!1,E(b,N,j,X),te!==null&&n.bindBuffer(n.ELEMENT_ARRAY_BUFFER,e.get(te).buffer))}function c(){return n.createVertexArray()}function f(b){return n.bindVertexArray(b)}function h(b){return n.deleteVertexArray(b)}function d(b,N,j){const X=j.wireframe===!0;let te=i[b.id];te===void 0&&(te={},i[b.id]=te);let ne=te[N.id];ne===void 0&&(ne={},te[N.id]=ne);let Q=ne[X];return Q===void 0&&(Q=p(c()),ne[X]=Q),Q}function p(b){const N=[],j=[],X=[];for(let te=0;te=0){const J=te[k];let $=ne[k];if($===void 0&&(k==="instanceMatrix"&&b.instanceMatrix&&($=b.instanceMatrix),k==="instanceColor"&&b.instanceColor&&($=b.instanceColor)),J===void 0||J.attribute!==$||$&&J.data!==$.data)return!0;Q++}return s.attributesNum!==Q||s.index!==X}function y(b,N,j,X){const te={},ne=N.attributes;let Q=0;const le=j.getAttributes();for(const k in le)if(le[k].location>=0){let J=ne[k];J===void 0&&(k==="instanceMatrix"&&b.instanceMatrix&&(J=b.instanceMatrix),k==="instanceColor"&&b.instanceColor&&(J=b.instanceColor));const $={};$.attribute=J,J&&J.data&&($.data=J.data),te[k]=$,Q++}s.attributes=te,s.attributesNum=Q,s.index=X}function _(){const b=s.newAttributes;for(let N=0,j=b.length;N=0){let q=te[le];if(q===void 0&&(le==="instanceMatrix"&&b.instanceMatrix&&(q=b.instanceMatrix),le==="instanceColor"&&b.instanceColor&&(q=b.instanceColor)),q!==void 0){const J=q.normalized,$=q.itemSize,_e=e.get(q);if(_e===void 0)continue;const Ne=_e.buffer,oe=_e.type,ve=_e.bytesPerElement,Te=oe===n.INT||oe===n.UNSIGNED_INT||q.gpuType===u1;if(q.isInterleavedBufferAttribute){const Me=q.data,nt=Me.stride,it=q.offset;if(Me.isInstancedInterleavedBuffer){for(let Xe=0;Xe0&&n.getShaderPrecisionFormat(n.FRAGMENT_SHADER,n.HIGH_FLOAT).precision>0)return"highp";C="mediump"}return C==="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=c(f);h!==f&&(console.warn("THREE.WebGLRenderer:",f,"not supported, using",h,"instead."),f=h);const d=t.logarithmicDepthBuffer===!0,p=n.getParameter(n.MAX_TEXTURE_IMAGE_UNITS),m=n.getParameter(n.MAX_VERTEX_TEXTURE_IMAGE_UNITS),y=n.getParameter(n.MAX_TEXTURE_SIZE),_=n.getParameter(n.MAX_CUBE_MAP_TEXTURE_SIZE),x=n.getParameter(n.MAX_VERTEX_ATTRIBS),g=n.getParameter(n.MAX_VERTEX_UNIFORM_VECTORS),S=n.getParameter(n.MAX_VARYING_VECTORS),A=n.getParameter(n.MAX_FRAGMENT_UNIFORM_VECTORS),E=m>0,R=n.getParameter(n.MAX_SAMPLES);return{isWebGL2:!0,getMaxAnisotropy:s,getMaxPrecision:c,textureFormatReadable:o,textureTypeReadable:a,precision:f,logarithmicDepthBuffer:d,maxTextures:p,maxVertexTextures:m,maxTextureSize:y,maxCubemapSize:_,maxAttributes:x,maxVertexUniforms:g,maxVaryings:S,maxFragmentUniforms:A,vertexTextures:E,maxSamples:R}}function YG(n){const e=this;let t=null,i=0,r=!1,s=!1;const o=new Ts,a=new xt,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(d,p){const m=d.length!==0||p||i!==0||r;return r=p,i=d.length,m},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,m){const y=d.clippingPlanes,_=d.clipIntersection,x=d.clipShadows,g=n.get(d);if(!r||y===null||y.length===0||s&&!x)s?h(null):f();else{const S=s?0:i,A=S*4;let E=g.clippingState||null;c.value=E,E=h(y,p,A,m);for(let R=0;R!==A;++R)E[R]=t[R];g.clippingState=E,this.numIntersection=_?this.numPlanes:0,this.numPlanes+=S}};function f(){c.value!==t&&(c.value=t,c.needsUpdate=i>0),e.numPlanes=i,e.numIntersection=0}function h(d,p,m,y){const _=d!==null?d.length:0;let x=null;if(_!==0){if(x=c.value,y!==!0||x===null){const g=m+_*4,S=p.matrixWorldInverse;a.getNormalMatrix(S),(x===null||x.length0){const f=new E1(c.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 c=e.get(a);c!==void 0&&(e.delete(a),c.dispose())}function s(){e=new WeakMap}return{get:i,dispose:s}}class Nr extends ph{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,c=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,c=a-h*this.view.height}this.projectionMatrix.makeOrthographic(s,o,a,c,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 pc=4,xT=[.125,.215,.35,.446,.526,.582],Ca=20,ay=new Nr,_T=new je;let ly=null,cy=0,uy=0,fy=!1;const ba=(1+Math.sqrt(5))/2,zl=1/ba,ST=[new O(-ba,zl,0),new O(ba,zl,0),new O(-zl,0,ba),new O(zl,0,ba),new O(0,ba,-zl),new O(0,ba,zl),new O(-1,1,-1),new O(1,1,-1),new O(-1,1,1),new O(1,1,1)];class C_{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){ly=this._renderer.getRenderTarget(),cy=this._renderer.getActiveCubeFace(),uy=this._renderer.getActiveMipmapLevel(),fy=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=wT(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=MT(),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?A:0,A,A),h.setRenderTarget(r),_&&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===js||e.mapping===zo;r?(this._cubemapMaterial===null&&(this._cubemapMaterial=wT()),this._cubemapMaterial.uniforms.flipEnvMap.value=e.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=MT());const s=r?this._cubemapMaterial:this._equirectMaterial,o=new An(this._lodPlanes[0],s),a=s.uniforms;a.envMap.value=e;const c=this._cubeSize;fp(t,0,0,3*c,2*c),i.setRenderTarget(t),i.render(o,ay)}_applyPMREM(e){const t=this._renderer,i=t.autoClear;t.autoClear=!1;const r=this._lodPlanes.length;for(let s=1;sCa&&console.warn(`sigmaRadians, ${s}, is too large and will clip, as it requested ${x} samples when the maximum is set to ${Ca}`);const g=[];let S=0;for(let L=0;LA-pc?r-A+pc:0),C=4*(this._cubeSize-E);fp(t,R,C,3*E,2*E),c.setRenderTarget(t),c.render(d,ay)}}function ZG(n){const e=[],t=[],i=[];let r=n;const s=n-pc+1+xT.length;for(let o=0;on-pc?c=xT[o-n+pc-1]:o===0&&(c=0),i.push(c);const f=1/(a-2),h=-f,d=1+f,p=[h,h,d,h,d,d,h,h,d,d,h,d],m=6,y=6,_=3,x=2,g=1,S=new Float32Array(_*y*m),A=new Float32Array(x*y*m),E=new Float32Array(g*y*m);for(let C=0;C2?0:-1,P=[L,I,0,L+2/3,I,0,L+2/3,I+1,0,L,I,0,L+2/3,I+1,0,L,I+1,0];S.set(P,_*y*C),A.set(p,x*y*C);const b=[C,C,C,C,C,C];E.set(b,g*y*C)}const R=new St;R.setAttribute("position",new Ht(S,_)),R.setAttribute("uv",new Ht(A,x)),R.setAttribute("faceIndex",new Ht(E,g)),e.push(R),r>pc&&r--}return{lodPlanes:e,sizeLods:t,sigmas:i}}function AT(n,e,t){const i=new Fr(n,e,t);return i.texture.mapping=Hc,i.texture.name="PMREM.cubeUv",i.scissorTest=!0,i}function fp(n,e,t,i,r){n.viewport.set(e,t,i,r),n.scissor.set(e,t,i,r)}function KG(n,e,t){const i=new Float32Array(Ca),r=new O(0,1,0);return new Br({name:"SphericalGaussianBlur",defines:{n:Ca,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:T1(),fragmentShader:` precision mediump float; precision mediump int; @@ -3689,7 +3662,7 @@ void main() { } } - `,blending:Bs,depthTest:!1,depthWrite:!1})}function nb(){return new zr({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:K1(),fragmentShader:` + `,blending:ks,depthTest:!1,depthWrite:!1})}function MT(){return new Br({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:T1(),fragmentShader:` precision mediump float; precision mediump int; @@ -3708,7 +3681,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:Bs,depthTest:!1,depthWrite:!1})}function ib(){return new zr({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:K1(),fragmentShader:` + `,blending:ks,depthTest:!1,depthWrite:!1})}function wT(){return new Br({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:T1(),fragmentShader:` precision mediump float; precision mediump int; @@ -3724,7 +3697,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:Bs,depthTest:!1,depthWrite:!1})}function K1(){return` + `,blending:ks,depthTest:!1,depthWrite:!1})}function T1(){return` precision mediump float; precision mediump int; @@ -3779,15 +3752,15 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function c8(n){let e=new WeakMap,t=null;function i(a){if(a&&a.isTexture){const l=a.mapping,f=l===Wf||l===jf,h=l===Ys||l===jo;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 K_(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 m=a.image;return f&&m&&m.height>0||h&&m&&r(m)?(t===null&&(t=new K_(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 l=0;const f=6;for(let h=0;he.maxTextureSize&&(C=Math.ceil(R/e.maxTextureSize),R=e.maxTextureSize);const L=new Float32Array(R*C*4*d),I=new Wg(L,R,C,d);I.type=Ji,I.needsUpdate=!0;const P=E*4;for(let D=0;D0)return n;const r=e*t;let s=rb[r];if(s===void 0&&(s=new Float32Array(r),rb[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 On(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t0||h&&m&&r(m)?(t===null&&(t=new C_(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 c=0;const f=6;for(let h=0;he.maxTextureSize&&(C=Math.ceil(R/e.maxTextureSize),R=e.maxTextureSize);const L=new Float32Array(R*C*4*d),I=new Cg(L,R,C,d);I.type=Ki,I.needsUpdate=!0;const P=E*4;for(let N=0;N0)return n;const r=e*t;let s=ET[r];if(s===void 0&&(s=new Float32Array(r),ET[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 Un(n,e){if(n.length!==e.length)return!1;for(let t=0,i=n.length;t":" "} ${a}: ${t[o]}`)}return i.join(` -`)}function cj(n){const e=Bt.getPrimaries(Bt.workingColorSpace),t=Bt.getPrimaries(n);let i;switch(e===t?i="":e===Qf&&t===$f?i="LinearDisplayP3ToLinearSRGB":e===$f&&t===Qf&&(i="LinearSRGBToLinearDisplayP3"),n){case Js:case Th:return[i,"LinearTransferOETF"];case mr:case Gg:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}function fb(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()+` +`)}function JW(n){const e=Bt.getPrimaries(Bt.workingColorSpace),t=Bt.getPrimaries(n);let i;switch(e===t?i="":e===Gf&&t===Hf?i="LinearDisplayP3ToLinearSRGB":e===Hf&&t===Gf&&(i="LinearSRGBToLinearDisplayP3"),n){case qs:case dh:return[i,"LinearTransferOETF"];case pr:case bg:return[i,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",n),[i,"LinearTransferOETF"]}}function IT(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+` -`+lj(n.getShaderSource(e),o)}else return r}function uj(n,e){const t=cj(e);return`vec4 ${n}( vec4 value ) { return ${t[0]}( ${t[1]}( value ) ); }`}function fj(n,e){let t;switch(e){case fI:t="Linear";break;case hI:t="Reinhard";break;case dI:t="OptimizedCineon";break;case L1:t="ACESFilmic";break;case mI:t="AgX";break;case gI:t="Neutral";break;case pI:t="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",e),t="Linear"}return"vec3 "+n+"( vec3 color ) { return "+t+"ToneMapping( color ); }"}function hj(n){return[n.extensionClipCullDistance?"#extension GL_ANGLE_clip_cull_distance : require":"",n.extensionMultiDraw?"#extension GL_ANGLE_multi_draw : require":""].filter(ef).join(` -`)}function dj(n){const e=[];for(const t in n){const i=n[t];i!==!1&&e.push("#define "+t+" "+i)}return e.join(` -`)}function pj(n,e){const t={},i=n.getProgramParameter(e,n.ACTIVE_ATTRIBUTES);for(let r=0;r/gm;function Z_(n){return n.replace(mj,vj)}const gj=new Map;function vj(n,e){let t=At[e];if(t===void 0){const i=gj.get(e);if(i!==void 0)t=At[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 Z_(t)}const yj=/#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 pb(n){return n.replace(yj,xj)}function xj(n,e,t,i){let r="";for(let s=parseInt(e);s/gm;function P_(n){return n.replace(i6,s6)}const r6=new Map;function s6(n,e){let t=At[e];if(t===void 0){const i=r6.get(e);if(i!==void 0)t=At[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 P_(t)}const o6=/#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 UT(n){return n.replace(o6,a6)}function a6(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(ef).join(` +`),g=["#define SHADER_TYPE "+t.shaderType,"#define SHADER_NAME "+t.shaderName,y].filter(Xu).join(` `),g.length>0&&(g+=` -`)):(x=[mb(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 "+l:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","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(ef).join(` -`),g=[mb(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 "+l:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==ls?"#define TONE_MAPPING":"",t.toneMapping!==ls?At.tonemapping_pars_fragment:"",t.toneMapping!==ls?fj("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",At.colorspace_pars_fragment,uj("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` -`].filter(ef).join(` -`)),o=Z_(o),o=hb(o,t),o=db(o,t),a=Z_(a),a=hb(a,t),a=db(a,t),o=pb(o),a=pb(a),t.isRawShaderMaterial!==!0&&(S=`#version 300 es +`)):(x=[OT(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 "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","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(Xu).join(` +`),g=[OT(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 "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.numLightProbes>0?"#define USE_LIGHT_PROBES":"",t.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==os?"#define TONE_MAPPING":"",t.toneMapping!==os?At.tonemapping_pars_fragment:"",t.toneMapping!==os?$W("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.opaque?"#define OPAQUE":"",At.colorspace_pars_fragment,QW("linearToOutputTexel",t.outputColorSpace),t.useDepthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` +`].filter(Xu).join(` +`)),o=P_(o),o=DT(o,t),o=NT(o,t),a=P_(a),a=DT(a,t),a=NT(a,t),o=UT(o),a=UT(a),t.isRawShaderMaterial!==!0&&(S=`#version 300 es `,x=[m,"#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` -`+x,g=["#define varying in",t.glslVersion===q_?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===q_?"":"#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(` +`+x,g=["#define varying in",t.glslVersion===b_?"":"layout(location = 0) out highp vec4 pc_fragColor;",t.glslVersion===b_?"":"#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 A=S+x+o,E=S+g+a,R=ub(r,r.VERTEX_SHADER,A),C=ub(r,r.FRAGMENT_SHADER,E);r.attachShader(_,R),r.attachShader(_,C),t.index0AttributeName!==void 0?r.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(_,0,"position"),r.linkProgram(_);function L(D){if(n.debug.checkShaderErrors){const j=r.getProgramInfoLog(_).trim(),X=r.getShaderInfoLog(R).trim(),te=r.getShaderInfoLog(C).trim();let ne=!0,$=!0;if(r.getProgramParameter(_,r.LINK_STATUS)===!1)if(ne=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,_,R,C);else{const le=fb(r,R,"vertex"),k=fb(r,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(_,r.VALIDATE_STATUS)+` +`+g);const A=S+x+o,E=S+g+a,R=LT(r,r.VERTEX_SHADER,A),C=LT(r,r.FRAGMENT_SHADER,E);r.attachShader(_,R),r.attachShader(_,C),t.index0AttributeName!==void 0?r.bindAttribLocation(_,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(_,0,"position"),r.linkProgram(_);function L(N){if(n.debug.checkShaderErrors){const j=r.getProgramInfoLog(_).trim(),X=r.getShaderInfoLog(R).trim(),te=r.getShaderInfoLog(C).trim();let ne=!0,Q=!0;if(r.getProgramParameter(_,r.LINK_STATUS)===!1)if(ne=!1,typeof n.debug.onShaderError=="function")n.debug.onShaderError(r,_,R,C);else{const le=IT(r,R,"vertex"),k=IT(r,C,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(_,r.VALIDATE_STATUS)+` -Material Name: `+D.name+` -Material Type: `+D.type+` +Material Name: `+N.name+` +Material Type: `+N.type+` Program Info Log: `+j+` `+le+` -`+k)}else j!==""?console.warn("THREE.WebGLProgram: Program Info Log:",j):(X===""||te==="")&&($=!1);$&&(D.diagnostics={runnable:ne,programLog:j,vertexShader:{log:X,prefix:x},fragmentShader:{log:te,prefix:g}})}r.deleteShader(R),r.deleteShader(C),I=new xm(r,_),P=pj(r,_)}let I;this.getUniforms=function(){return I===void 0&&L(this),I};let P;this.getAttributes=function(){return P===void 0&&L(this),P};let b=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return b===!1&&(b=r.getProgramParameter(_,oj)),b},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=aj++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=R,this.fragmentShader=C,this}let Tj=0;class bj{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 Cj(e),t.set(e,i)),i}}class Cj{constructor(e){this.id=Tj++,this.code=e,this.usedTimes=0}}function Pj(n,e,t,i,r,s,o){const a=new Ka,l=new bj,f=new Set,h=[],d=r.logarithmicDepthBuffer,p=r.vertexTextures;let m=r.precision;const y={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 _(P){return f.add(P),P===0?"uv":`uv${P}`}function x(P,b,D,j,X){const te=j.fog,ne=X.geometry,$=P.isMeshStandardMaterial?j.environment:null,le=(P.isMeshStandardMaterial?t:e).get(P.envMap||$),k=le&&le.mapping===Zc?le.image.height:null,q=y[P.type];P.precision!==null&&(m=r.getMaxPrecision(P.precision),m!==P.precision&&console.warn("THREE.WebGLProgram.getParameters:",P.precision,"not supported, using",m,"instead."));const J=ne.morphAttributes.position||ne.morphAttributes.normal||ne.morphAttributes.color,Q=J!==void 0?J.length:0;let _e=0;ne.morphAttributes.position!==void 0&&(_e=1),ne.morphAttributes.normal!==void 0&&(_e=2),ne.morphAttributes.color!==void 0&&(_e=3);let De,oe,ve,Te;if(q){const bt=Nr[q];De=bt.vertexShader,oe=bt.fragmentShader}else De=P.vertexShader,oe=P.fragmentShader,l.update(P),ve=l.getVertexShaderID(P),Te=l.getFragmentShaderID(P);const we=n.getRenderTarget(),nt=X.isInstancedMesh===!0,it=X.isBatchedMesh===!0,Xe=!!P.map,V=!!P.matcap,de=!!le,fe=!!P.aoMap,Me=!!P.lightMap,Se=!!P.bumpMap,Ee=!!P.normalMap,Ue=!!P.displacementMap,ke=!!P.emissiveMap,lt=!!P.metalnessMap,z=!!P.roughnessMap,N=P.anisotropy>0,se=P.clearcoat>0,xe=P.dispersion>0,ye=P.iridescence>0,Ae=P.sheen>0,$e=P.transmission>0,Pe=N&&!!P.anisotropyMap,Fe=se&&!!P.clearcoatMap,pt=se&&!!P.clearcoatNormalMap,Ce=se&&!!P.clearcoatRoughnessMap,Je=ye&&!!P.iridescenceMap,wt=ye&&!!P.iridescenceThicknessMap,ut=Ae&&!!P.sheenColorMap,Be=Ae&&!!P.sheenRoughnessMap,W=!!P.specularMap,me=!!P.specularColorMap,Ge=!!P.specularIntensityMap,G=$e&&!!P.transmissionMap,Re=$e&&!!P.thicknessMap,he=!!P.gradientMap,ge=!!P.alphaMap,Ie=P.alphaTest>0,ft=!!P.alphaHash,mt=!!P.extensions;let Rt=ls;P.toneMapped&&(we===null||we.isXRRenderTarget===!0)&&(Rt=n.toneMapping);const Wt={shaderID:q,shaderType:P.type,shaderName:P.name,vertexShader:De,fragmentShader:oe,defines:P.defines,customVertexShaderID:ve,customFragmentShaderID:Te,isRawShaderMaterial:P.isRawShaderMaterial===!0,glslVersion:P.glslVersion,precision:m,batching:it,batchingColor:it&&X._colorsTexture!==null,instancing:nt,instancingColor:nt&&X.instanceColor!==null,instancingMorph:nt&&X.morphTexture!==null,supportsVertexTextures:p,outputColorSpace:we===null?n.outputColorSpace:we.isXRRenderTarget===!0?we.texture.colorSpace:Js,alphaToCoverage:!!P.alphaToCoverage,map:Xe,matcap:V,envMap:de,envMapMode:de&&le.mapping,envMapCubeUVHeight:k,aoMap:fe,lightMap:Me,bumpMap:Se,normalMap:Ee,displacementMap:p&&Ue,emissiveMap:ke,normalMapObjectSpace:Ee&&P.normalMapType===II,normalMapTangentSpace:Ee&&P.normalMapType===Qo,metalnessMap:lt,roughnessMap:z,anisotropy:N,anisotropyMap:Pe,clearcoat:se,clearcoatMap:Fe,clearcoatNormalMap:pt,clearcoatRoughnessMap:Ce,dispersion:xe,iridescence:ye,iridescenceMap:Je,iridescenceThicknessMap:wt,sheen:Ae,sheenColorMap:ut,sheenRoughnessMap:Be,specularMap:W,specularColorMap:me,specularIntensityMap:Ge,transmission:$e,transmissionMap:G,thicknessMap:Re,gradientMap:he,opaque:P.transparent===!1&&P.blending===Xa&&P.alphaToCoverage===!1,alphaMap:ge,alphaTest:Ie,alphaHash:ft,combine:P.combine,mapUv:Xe&&_(P.map.channel),aoMapUv:fe&&_(P.aoMap.channel),lightMapUv:Me&&_(P.lightMap.channel),bumpMapUv:Se&&_(P.bumpMap.channel),normalMapUv:Ee&&_(P.normalMap.channel),displacementMapUv:Ue&&_(P.displacementMap.channel),emissiveMapUv:ke&&_(P.emissiveMap.channel),metalnessMapUv:lt&&_(P.metalnessMap.channel),roughnessMapUv:z&&_(P.roughnessMap.channel),anisotropyMapUv:Pe&&_(P.anisotropyMap.channel),clearcoatMapUv:Fe&&_(P.clearcoatMap.channel),clearcoatNormalMapUv:pt&&_(P.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ce&&_(P.clearcoatRoughnessMap.channel),iridescenceMapUv:Je&&_(P.iridescenceMap.channel),iridescenceThicknessMapUv:wt&&_(P.iridescenceThicknessMap.channel),sheenColorMapUv:ut&&_(P.sheenColorMap.channel),sheenRoughnessMapUv:Be&&_(P.sheenRoughnessMap.channel),specularMapUv:W&&_(P.specularMap.channel),specularColorMapUv:me&&_(P.specularColorMap.channel),specularIntensityMapUv:Ge&&_(P.specularIntensityMap.channel),transmissionMapUv:G&&_(P.transmissionMap.channel),thicknessMapUv:Re&&_(P.thicknessMap.channel),alphaMapUv:ge&&_(P.alphaMap.channel),vertexTangents:!!ne.attributes.tangent&&(Ee||N),vertexColors:P.vertexColors,vertexAlphas:P.vertexColors===!0&&!!ne.attributes.color&&ne.attributes.color.itemSize===4,pointsUvs:X.isPoints===!0&&!!ne.attributes.uv&&(Xe||ge),fog:!!te,useFog:P.fog===!0,fogExp2:!!te&&te.isFogExp2,flatShading:P.flatShading===!0,sizeAttenuation:P.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:X.isSkinnedMesh===!0,morphTargets:ne.morphAttributes.position!==void 0,morphNormals:ne.morphAttributes.normal!==void 0,morphColors:ne.morphAttributes.color!==void 0,morphTargetsCount:Q,morphTextureStride:_e,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:P.dithering,shadowMapEnabled:n.shadowMap.enabled&&D.length>0,shadowMapType:n.shadowMap.type,toneMapping:Rt,decodeVideoTexture:Xe&&P.map.isVideoTexture===!0&&Bt.getTransfer(P.map.colorSpace)===Yt,premultipliedAlpha:P.premultipliedAlpha,doubleSided:P.side===Dr,flipSided:P.side===Ai,useDepthPacking:P.depthPacking>=0,depthPacking:P.depthPacking||0,index0AttributeName:P.index0AttributeName,extensionClipCullDistance:mt&&P.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:mt&&P.extensions.multiDraw===!0&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:P.customProgramCacheKey()};return Wt.vertexUv1s=f.has(1),Wt.vertexUv2s=f.has(2),Wt.vertexUv3s=f.has(3),f.clear(),Wt}function g(P){const b=[];if(P.shaderID?b.push(P.shaderID):(b.push(P.customVertexShaderID),b.push(P.customFragmentShaderID)),P.defines!==void 0)for(const D in P.defines)b.push(D),b.push(P.defines[D]);return P.isRawShaderMaterial===!1&&(S(b,P),A(b,P),b.push(n.outputColorSpace)),b.push(P.customProgramCacheKey),b.join()}function S(P,b){P.push(b.precision),P.push(b.outputColorSpace),P.push(b.envMapMode),P.push(b.envMapCubeUVHeight),P.push(b.mapUv),P.push(b.alphaMapUv),P.push(b.lightMapUv),P.push(b.aoMapUv),P.push(b.bumpMapUv),P.push(b.normalMapUv),P.push(b.displacementMapUv),P.push(b.emissiveMapUv),P.push(b.metalnessMapUv),P.push(b.roughnessMapUv),P.push(b.anisotropyMapUv),P.push(b.clearcoatMapUv),P.push(b.clearcoatNormalMapUv),P.push(b.clearcoatRoughnessMapUv),P.push(b.iridescenceMapUv),P.push(b.iridescenceThicknessMapUv),P.push(b.sheenColorMapUv),P.push(b.sheenRoughnessMapUv),P.push(b.specularMapUv),P.push(b.specularColorMapUv),P.push(b.specularIntensityMapUv),P.push(b.transmissionMapUv),P.push(b.thicknessMapUv),P.push(b.combine),P.push(b.fogExp2),P.push(b.sizeAttenuation),P.push(b.morphTargetsCount),P.push(b.morphAttributeCount),P.push(b.numDirLights),P.push(b.numPointLights),P.push(b.numSpotLights),P.push(b.numSpotLightMaps),P.push(b.numHemiLights),P.push(b.numRectAreaLights),P.push(b.numDirLightShadows),P.push(b.numPointLightShadows),P.push(b.numSpotLightShadows),P.push(b.numSpotLightShadowsWithMaps),P.push(b.numLightProbes),P.push(b.shadowMapType),P.push(b.toneMapping),P.push(b.numClippingPlanes),P.push(b.numClipIntersection),P.push(b.depthPacking)}function A(P,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),P.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.skinning&&a.enable(4),b.morphTargets&&a.enable(5),b.morphNormals&&a.enable(6),b.morphColors&&a.enable(7),b.premultipliedAlpha&&a.enable(8),b.shadowMapEnabled&&a.enable(9),b.doubleSided&&a.enable(10),b.flipSided&&a.enable(11),b.useDepthPacking&&a.enable(12),b.dithering&&a.enable(13),b.transmission&&a.enable(14),b.sheen&&a.enable(15),b.opaque&&a.enable(16),b.pointsUvs&&a.enable(17),b.decodeVideoTexture&&a.enable(18),b.alphaToCoverage&&a.enable(19),P.push(a.mask)}function E(P){const b=y[P.type];let D;if(b){const j=Nr[b];D=YI.clone(j.uniforms)}else D=P.uniforms;return D}function R(P,b){let D;for(let j=0,X=h.length;j0?i.push(g):m.transparent===!0?r.push(g):t.push(g)}function l(d,p,m,y,_,x){const g=o(d,p,m,y,_,x);m.transmission>0?i.unshift(g):m.transparent===!0?r.unshift(g):t.unshift(g)}function f(d,p){t.length>1&&t.sort(d||Lj),i.length>1&&i.sort(p||gb),r.length>1&&r.sort(p||gb)}function h(){for(let d=e,p=n.length;d=s.length?(o=new vb,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function Nj(){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 O,color:new je};break;case"SpotLight":t={position:new O,direction:new O,color:new je,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new O,color:new je,distance:0,decay:0};break;case"HemisphereLight":t={direction:new O,skyColor:new je,groundColor:new je};break;case"RectAreaLight":t={color:new je,position:new O,halfWidth:new O,halfHeight:new O};break}return n[e.id]=t,t}}}function Dj(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new pe};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new pe};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new pe,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let Uj=0;function Oj(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function kj(n){const e=new Nj,t=Dj(),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 O);const r=new O,s=new at,o=new at;function a(f){let h=0,d=0,p=0;for(let P=0;P<9;P++)i.probe[P].set(0,0,0);let m=0,y=0,_=0,x=0,g=0,S=0,A=0,E=0,R=0,C=0,L=0;f.sort(Oj);for(let P=0,b=f.length;P0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=ze.LTC_FLOAT_1,i.rectAreaLTC2=ze.LTC_FLOAT_2):(i.rectAreaLTC1=ze.LTC_HALF_1,i.rectAreaLTC2=ze.LTC_HALF_2)),i.ambient[0]=h,i.ambient[1]=d,i.ambient[2]=p;const I=i.hash;(I.directionalLength!==m||I.pointLength!==y||I.spotLength!==_||I.rectAreaLength!==x||I.hemiLength!==g||I.numDirectionalShadows!==S||I.numPointShadows!==A||I.numSpotShadows!==E||I.numSpotMaps!==R||I.numLightProbes!==L)&&(i.directional.length=m,i.spot.length=_,i.rectArea.length=x,i.point.length=y,i.hemi.length=g,i.directionalShadow.length=S,i.directionalShadowMap.length=S,i.pointShadow.length=A,i.pointShadowMap.length=A,i.spotShadow.length=E,i.spotShadowMap.length=E,i.directionalShadowMatrix.length=S,i.pointShadowMatrix.length=A,i.spotLightMatrix.length=E+R-C,i.spotLightMap.length=R,i.numSpotLightShadowsWithMaps=C,i.numLightProbes=L,I.directionalLength=m,I.pointLength=y,I.spotLength=_,I.rectAreaLength=x,I.hemiLength=g,I.numDirectionalShadows=S,I.numPointShadows=A,I.numSpotShadows=E,I.numSpotMaps=R,I.numLightProbes=L,i.version=Uj++)}function l(f,h){let d=0,p=0,m=0,y=0,_=0;const x=h.matrixWorldInverse;for(let g=0,S=f.length;g=o.length?(a=new yb(n),o.push(a)):a=o[s],a}function i(){e=new WeakMap}return{get:t,dispose:i}}class J1 extends Zn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=RI,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 $1 extends Zn{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 Bj=`void main() { +`+k)}else j!==""?console.warn("THREE.WebGLProgram: Program Info Log:",j):(X===""||te==="")&&(Q=!1);Q&&(N.diagnostics={runnable:ne,programLog:j,vertexShader:{log:X,prefix:x},fragmentShader:{log:te,prefix:g}})}r.deleteShader(R),r.deleteShader(C),I=new om(r,_),P=n6(r,_)}let I;this.getUniforms=function(){return I===void 0&&L(this),I};let P;this.getAttributes=function(){return P===void 0&&L(this),P};let b=t.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return b===!1&&(b=r.getProgramParameter(_,qW)),b},this.destroy=function(){i.releaseStatesOfProgram(this),r.deleteProgram(_),this.program=void 0},this.type=t.shaderType,this.name=t.shaderName,this.id=ZW++,this.cacheKey=e,this.usedTimes=1,this.program=_,this.vertexShader=R,this.fragmentShader=C,this}let p6=0;class m6{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 g6(e),t.set(e,i)),i}}class g6{constructor(e){this.id=p6++,this.code=e,this.usedTimes=0}}function v6(n,e,t,i,r,s,o){const a=new Ga,c=new m6,f=new Set,h=[],d=r.logarithmicDepthBuffer,p=r.vertexTextures;let m=r.precision;const y={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 _(P){return f.add(P),P===0?"uv":`uv${P}`}function x(P,b,N,j,X){const te=j.fog,ne=X.geometry,Q=P.isMeshStandardMaterial?j.environment:null,le=(P.isMeshStandardMaterial?t:e).get(P.envMap||Q),k=le&&le.mapping===Hc?le.image.height:null,q=y[P.type];P.precision!==null&&(m=r.getMaxPrecision(P.precision),m!==P.precision&&console.warn("THREE.WebGLProgram.getParameters:",P.precision,"not supported, using",m,"instead."));const J=ne.morphAttributes.position||ne.morphAttributes.normal||ne.morphAttributes.color,$=J!==void 0?J.length:0;let _e=0;ne.morphAttributes.position!==void 0&&(_e=1),ne.morphAttributes.normal!==void 0&&(_e=2),ne.morphAttributes.color!==void 0&&(_e=3);let Ne,oe,ve,Te;if(q){const bt=Ir[q];Ne=bt.vertexShader,oe=bt.fragmentShader}else Ne=P.vertexShader,oe=P.fragmentShader,c.update(P),ve=c.getVertexShaderID(P),Te=c.getFragmentShaderID(P);const Me=n.getRenderTarget(),nt=X.isInstancedMesh===!0,it=X.isBatchedMesh===!0,Xe=!!P.map,z=!!P.matcap,de=!!le,fe=!!P.aoMap,we=!!P.lightMap,Se=!!P.bumpMap,Ee=!!P.normalMap,Ue=!!P.displacementMap,ke=!!P.emissiveMap,lt=!!P.metalnessMap,B=!!P.roughnessMap,D=P.anisotropy>0,se=P.clearcoat>0,xe=P.dispersion>0,ye=P.iridescence>0,Ae=P.sheen>0,Qe=P.transmission>0,Pe=D&&!!P.anisotropyMap,Fe=se&&!!P.clearcoatMap,pt=se&&!!P.clearcoatNormalMap,Ce=se&&!!P.clearcoatRoughnessMap,Je=ye&&!!P.iridescenceMap,Mt=ye&&!!P.iridescenceThicknessMap,ut=Ae&&!!P.sheenColorMap,Be=Ae&&!!P.sheenRoughnessMap,H=!!P.specularMap,me=!!P.specularColorMap,Ge=!!P.specularIntensityMap,V=Qe&&!!P.transmissionMap,Re=Qe&&!!P.thicknessMap,he=!!P.gradientMap,ge=!!P.alphaMap,Ie=P.alphaTest>0,ft=!!P.alphaHash,mt=!!P.extensions;let Rt=os;P.toneMapped&&(Me===null||Me.isXRRenderTarget===!0)&&(Rt=n.toneMapping);const Wt={shaderID:q,shaderType:P.type,shaderName:P.name,vertexShader:Ne,fragmentShader:oe,defines:P.defines,customVertexShaderID:ve,customFragmentShaderID:Te,isRawShaderMaterial:P.isRawShaderMaterial===!0,glslVersion:P.glslVersion,precision:m,batching:it,batchingColor:it&&X._colorsTexture!==null,instancing:nt,instancingColor:nt&&X.instanceColor!==null,instancingMorph:nt&&X.morphTexture!==null,supportsVertexTextures:p,outputColorSpace:Me===null?n.outputColorSpace:Me.isXRRenderTarget===!0?Me.texture.colorSpace:qs,alphaToCoverage:!!P.alphaToCoverage,map:Xe,matcap:z,envMap:de,envMapMode:de&&le.mapping,envMapCubeUVHeight:k,aoMap:fe,lightMap:we,bumpMap:Se,normalMap:Ee,displacementMap:p&&Ue,emissiveMap:ke,normalMapObjectSpace:Ee&&P.normalMapType===GL,normalMapTangentSpace:Ee&&P.normalMapType===Yo,metalnessMap:lt,roughnessMap:B,anisotropy:D,anisotropyMap:Pe,clearcoat:se,clearcoatMap:Fe,clearcoatNormalMap:pt,clearcoatRoughnessMap:Ce,dispersion:xe,iridescence:ye,iridescenceMap:Je,iridescenceThicknessMap:Mt,sheen:Ae,sheenColorMap:ut,sheenRoughnessMap:Be,specularMap:H,specularColorMap:me,specularIntensityMap:Ge,transmission:Qe,transmissionMap:V,thicknessMap:Re,gradientMap:he,opaque:P.transparent===!1&&P.blending===za&&P.alphaToCoverage===!1,alphaMap:ge,alphaTest:Ie,alphaHash:ft,combine:P.combine,mapUv:Xe&&_(P.map.channel),aoMapUv:fe&&_(P.aoMap.channel),lightMapUv:we&&_(P.lightMap.channel),bumpMapUv:Se&&_(P.bumpMap.channel),normalMapUv:Ee&&_(P.normalMap.channel),displacementMapUv:Ue&&_(P.displacementMap.channel),emissiveMapUv:ke&&_(P.emissiveMap.channel),metalnessMapUv:lt&&_(P.metalnessMap.channel),roughnessMapUv:B&&_(P.roughnessMap.channel),anisotropyMapUv:Pe&&_(P.anisotropyMap.channel),clearcoatMapUv:Fe&&_(P.clearcoatMap.channel),clearcoatNormalMapUv:pt&&_(P.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ce&&_(P.clearcoatRoughnessMap.channel),iridescenceMapUv:Je&&_(P.iridescenceMap.channel),iridescenceThicknessMapUv:Mt&&_(P.iridescenceThicknessMap.channel),sheenColorMapUv:ut&&_(P.sheenColorMap.channel),sheenRoughnessMapUv:Be&&_(P.sheenRoughnessMap.channel),specularMapUv:H&&_(P.specularMap.channel),specularColorMapUv:me&&_(P.specularColorMap.channel),specularIntensityMapUv:Ge&&_(P.specularIntensityMap.channel),transmissionMapUv:V&&_(P.transmissionMap.channel),thicknessMapUv:Re&&_(P.thicknessMap.channel),alphaMapUv:ge&&_(P.alphaMap.channel),vertexTangents:!!ne.attributes.tangent&&(Ee||D),vertexColors:P.vertexColors,vertexAlphas:P.vertexColors===!0&&!!ne.attributes.color&&ne.attributes.color.itemSize===4,pointsUvs:X.isPoints===!0&&!!ne.attributes.uv&&(Xe||ge),fog:!!te,useFog:P.fog===!0,fogExp2:!!te&&te.isFogExp2,flatShading:P.flatShading===!0,sizeAttenuation:P.sizeAttenuation===!0,logarithmicDepthBuffer:d,skinning:X.isSkinnedMesh===!0,morphTargets:ne.morphAttributes.position!==void 0,morphNormals:ne.morphAttributes.normal!==void 0,morphColors:ne.morphAttributes.color!==void 0,morphTargetsCount:$,morphTextureStride:_e,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:P.dithering,shadowMapEnabled:n.shadowMap.enabled&&N.length>0,shadowMapType:n.shadowMap.type,toneMapping:Rt,decodeVideoTexture:Xe&&P.map.isVideoTexture===!0&&Bt.getTransfer(P.map.colorSpace)===Yt,premultipliedAlpha:P.premultipliedAlpha,doubleSided:P.side===Dr,flipSided:P.side===Si,useDepthPacking:P.depthPacking>=0,depthPacking:P.depthPacking||0,index0AttributeName:P.index0AttributeName,extensionClipCullDistance:mt&&P.extensions.clipCullDistance===!0&&i.has("WEBGL_clip_cull_distance"),extensionMultiDraw:mt&&P.extensions.multiDraw===!0&&i.has("WEBGL_multi_draw"),rendererExtensionParallelShaderCompile:i.has("KHR_parallel_shader_compile"),customProgramCacheKey:P.customProgramCacheKey()};return Wt.vertexUv1s=f.has(1),Wt.vertexUv2s=f.has(2),Wt.vertexUv3s=f.has(3),f.clear(),Wt}function g(P){const b=[];if(P.shaderID?b.push(P.shaderID):(b.push(P.customVertexShaderID),b.push(P.customFragmentShaderID)),P.defines!==void 0)for(const N in P.defines)b.push(N),b.push(P.defines[N]);return P.isRawShaderMaterial===!1&&(S(b,P),A(b,P),b.push(n.outputColorSpace)),b.push(P.customProgramCacheKey),b.join()}function S(P,b){P.push(b.precision),P.push(b.outputColorSpace),P.push(b.envMapMode),P.push(b.envMapCubeUVHeight),P.push(b.mapUv),P.push(b.alphaMapUv),P.push(b.lightMapUv),P.push(b.aoMapUv),P.push(b.bumpMapUv),P.push(b.normalMapUv),P.push(b.displacementMapUv),P.push(b.emissiveMapUv),P.push(b.metalnessMapUv),P.push(b.roughnessMapUv),P.push(b.anisotropyMapUv),P.push(b.clearcoatMapUv),P.push(b.clearcoatNormalMapUv),P.push(b.clearcoatRoughnessMapUv),P.push(b.iridescenceMapUv),P.push(b.iridescenceThicknessMapUv),P.push(b.sheenColorMapUv),P.push(b.sheenRoughnessMapUv),P.push(b.specularMapUv),P.push(b.specularColorMapUv),P.push(b.specularIntensityMapUv),P.push(b.transmissionMapUv),P.push(b.thicknessMapUv),P.push(b.combine),P.push(b.fogExp2),P.push(b.sizeAttenuation),P.push(b.morphTargetsCount),P.push(b.morphAttributeCount),P.push(b.numDirLights),P.push(b.numPointLights),P.push(b.numSpotLights),P.push(b.numSpotLightMaps),P.push(b.numHemiLights),P.push(b.numRectAreaLights),P.push(b.numDirLightShadows),P.push(b.numPointLightShadows),P.push(b.numSpotLightShadows),P.push(b.numSpotLightShadowsWithMaps),P.push(b.numLightProbes),P.push(b.shadowMapType),P.push(b.toneMapping),P.push(b.numClippingPlanes),P.push(b.numClipIntersection),P.push(b.depthPacking)}function A(P,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),P.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.skinning&&a.enable(4),b.morphTargets&&a.enable(5),b.morphNormals&&a.enable(6),b.morphColors&&a.enable(7),b.premultipliedAlpha&&a.enable(8),b.shadowMapEnabled&&a.enable(9),b.doubleSided&&a.enable(10),b.flipSided&&a.enable(11),b.useDepthPacking&&a.enable(12),b.dithering&&a.enable(13),b.transmission&&a.enable(14),b.sheen&&a.enable(15),b.opaque&&a.enable(16),b.pointsUvs&&a.enable(17),b.decodeVideoTexture&&a.enable(18),b.alphaToCoverage&&a.enable(19),P.push(a.mask)}function E(P){const b=y[P.type];let N;if(b){const j=Ir[b];N=rI.clone(j.uniforms)}else N=P.uniforms;return N}function R(P,b){let N;for(let j=0,X=h.length;j0?i.push(g):m.transparent===!0?r.push(g):t.push(g)}function c(d,p,m,y,_,x){const g=o(d,p,m,y,_,x);m.transmission>0?i.unshift(g):m.transparent===!0?r.unshift(g):t.unshift(g)}function f(d,p){t.length>1&&t.sort(d||x6),i.length>1&&i.sort(p||kT),r.length>1&&r.sort(p||kT)}function h(){for(let d=e,p=n.length;d=s.length?(o=new FT,s.push(o)):o=s[r],o}function t(){n=new WeakMap}return{get:e,dispose:t}}function S6(){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 O,color:new je};break;case"SpotLight":t={position:new O,direction:new O,color:new je,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new O,color:new je,distance:0,decay:0};break;case"HemisphereLight":t={direction:new O,skyColor:new je,groundColor:new je};break;case"RectAreaLight":t={color:new je,position:new O,halfWidth:new O,halfHeight:new O};break}return n[e.id]=t,t}}}function A6(){const n={};return{get:function(e){if(n[e.id]!==void 0)return n[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new pe};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new pe};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new pe,shadowCameraNear:1,shadowCameraFar:1e3};break}return n[e.id]=t,t}}}let M6=0;function w6(n,e){return(e.castShadow?2:0)-(n.castShadow?2:0)+(e.map?1:0)-(n.map?1:0)}function E6(n){const e=new S6,t=A6(),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 O);const r=new O,s=new at,o=new at;function a(f){let h=0,d=0,p=0;for(let P=0;P<9;P++)i.probe[P].set(0,0,0);let m=0,y=0,_=0,x=0,g=0,S=0,A=0,E=0,R=0,C=0,L=0;f.sort(w6);for(let P=0,b=f.length;P0&&(n.has("OES_texture_float_linear")===!0?(i.rectAreaLTC1=ze.LTC_FLOAT_1,i.rectAreaLTC2=ze.LTC_FLOAT_2):(i.rectAreaLTC1=ze.LTC_HALF_1,i.rectAreaLTC2=ze.LTC_HALF_2)),i.ambient[0]=h,i.ambient[1]=d,i.ambient[2]=p;const I=i.hash;(I.directionalLength!==m||I.pointLength!==y||I.spotLength!==_||I.rectAreaLength!==x||I.hemiLength!==g||I.numDirectionalShadows!==S||I.numPointShadows!==A||I.numSpotShadows!==E||I.numSpotMaps!==R||I.numLightProbes!==L)&&(i.directional.length=m,i.spot.length=_,i.rectArea.length=x,i.point.length=y,i.hemi.length=g,i.directionalShadow.length=S,i.directionalShadowMap.length=S,i.pointShadow.length=A,i.pointShadowMap.length=A,i.spotShadow.length=E,i.spotShadowMap.length=E,i.directionalShadowMatrix.length=S,i.pointShadowMatrix.length=A,i.spotLightMatrix.length=E+R-C,i.spotLightMap.length=R,i.numSpotLightShadowsWithMaps=C,i.numLightProbes=L,I.directionalLength=m,I.pointLength=y,I.spotLength=_,I.rectAreaLength=x,I.hemiLength=g,I.numDirectionalShadows=S,I.numPointShadows=A,I.numSpotShadows=E,I.numSpotMaps=R,I.numLightProbes=L,i.version=M6++)}function c(f,h){let d=0,p=0,m=0,y=0,_=0;const x=h.matrixWorldInverse;for(let g=0,S=f.length;g=o.length?(a=new BT(n),o.push(a)):a=o[s],a}function i(){e=new WeakMap}return{get:t,dispose:i}}class C1 extends Zn{constructor(e){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=VL,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 P1 extends Zn{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 b6=`void main() { gl_Position = vec4( position, 1.0 ); -}`,zj=`uniform sampler2D shadow_pass; +}`,C6=`uniform sampler2D shadow_pass; uniform vec2 resolution; uniform float radius; #include @@ -3856,12 +3829,12 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function Vj(n,e,t){let i=new Ph;const r=new pe,s=new pe,o=new zt,a=new J1({depthPacking:LI}),l=new $1,f={},h=t.maxTextureSize,d={[Xs]:Ai,[Ai]:Xs,[Dr]:Dr},p=new zr({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new pe},radius:{value:4}},vertexShader:Bj,fragmentShader:zj}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const y=new St;y.setAttribute("position",new Ht(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new An(y,p),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=zg;let g=this.type;this.render=function(C,L,I){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||C.length===0)return;const P=n.getRenderTarget(),b=n.getActiveCubeFace(),D=n.getActiveMipmapLevel(),j=n.state;j.setBlending(Bs),j.buffers.color.setClear(1,1,1,1),j.buffers.depth.setTest(!0),j.setScissorTest(!1);const X=g!==Rr&&this.type===Rr,te=g===Rr&&this.type!==Rr;for(let ne=0,$=C.length;ne<$;ne++){const le=C[ne],k=le.shadow;if(k===void 0){console.warn("THREE.WebGLShadowMap:",le,"has no shadow.");continue}if(k.autoUpdate===!1&&k.needsUpdate===!1)continue;r.copy(k.mapSize);const q=k.getFrameExtents();if(r.multiply(q),s.copy(k.mapSize),(r.x>h||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/q.x),r.x=s.x*q.x,k.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/q.y),r.y=s.y*q.y,k.mapSize.y=s.y)),k.map===null||X===!0||te===!0){const Q=this.type!==Rr?{minFilter:Wn,magFilter:Wn}:{};k.map!==null&&k.map.dispose(),k.map=new Br(r.x,r.y,Q),k.map.texture.name=le.name+".shadowMap",k.camera.updateProjectionMatrix()}n.setRenderTarget(k.map),n.clear();const J=k.getViewportCount();for(let Q=0;Q0||L.map&&L.alphaTest>0){const j=b.uuid,X=L.uuid;let te=f[j];te===void 0&&(te={},f[j]=te);let ne=te[X];ne===void 0&&(ne=b.clone(),te[X]=ne,L.addEventListener("dispose",R)),b=ne}if(b.visible=L.visible,b.wireframe=L.wireframe,P===Rr?b.side=L.shadowSide!==null?L.shadowSide:L.side:b.side=L.shadowSide!==null?L.shadowSide:d[L.side],b.alphaMap=L.alphaMap,b.alphaTest=L.alphaTest,b.map=L.map,b.clipShadows=L.clipShadows,b.clippingPlanes=L.clippingPlanes,b.clipIntersection=L.clipIntersection,b.displacementMap=L.displacementMap,b.displacementScale=L.displacementScale,b.displacementBias=L.displacementBias,b.wireframeLinewidth=L.wireframeLinewidth,b.linewidth=L.linewidth,I.isPointLight===!0&&b.isMeshDistanceMaterial===!0){const j=n.properties.get(b);j.light=I}return b}function E(C,L,I,P,b){if(C.visible===!1)return;if(C.layers.test(L.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&b===Rr)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,C.matrixWorld);const X=e.update(C),te=C.material;if(Array.isArray(te)){const ne=X.groups;for(let $=0,le=ne.length;$=1):le.indexOf("OpenGL ES")!==-1&&($=parseFloat(/^OpenGL ES (\d)/.exec(le)[1]),ne=$>=2);let k=null,q={};const J=n.getParameter(n.SCISSOR_BOX),Q=n.getParameter(n.VIEWPORT),_e=new zt().fromArray(J),De=new zt().fromArray(Q);function oe(G,Re,he,ge){const Ie=new Uint8Array(4),ft=n.createTexture();n.bindTexture(G,ft),n.texParameteri(G,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(G,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let mt=0;mt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),f=new pe,h=new WeakMap;let d;const p=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y(z,N){return m?new OffscreenCanvas(z,N):nh("canvas")}function _(z,N,se){let xe=1;const ye=lt(z);if((ye.width>se||ye.height>se)&&(xe=se/Math.max(ye.width,ye.height)),xe<1)if(typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&z instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&z instanceof ImageBitmap||typeof VideoFrame<"u"&&z instanceof VideoFrame){const Ae=Math.floor(xe*ye.width),$e=Math.floor(xe*ye.height);d===void 0&&(d=y(Ae,$e));const Pe=N?y(Ae,$e):d;return Pe.width=Ae,Pe.height=$e,Pe.getContext("2d").drawImage(z,0,0,Ae,$e),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ye.width+"x"+ye.height+") to ("+Ae+"x"+$e+")."),Pe}else return"data"in z&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ye.width+"x"+ye.height+")."),z;return z}function x(z){return z.generateMipmaps&&z.minFilter!==Wn&&z.minFilter!==Pn}function g(z){n.generateMipmap(z)}function S(z,N,se,xe,ye=!1){if(z!==null){if(n[z]!==void 0)return n[z];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+z+"'")}let Ae=N;if(N===n.RED&&(se===n.FLOAT&&(Ae=n.R32F),se===n.HALF_FLOAT&&(Ae=n.R16F),se===n.UNSIGNED_BYTE&&(Ae=n.R8)),N===n.RED_INTEGER&&(se===n.UNSIGNED_BYTE&&(Ae=n.R8UI),se===n.UNSIGNED_SHORT&&(Ae=n.R16UI),se===n.UNSIGNED_INT&&(Ae=n.R32UI),se===n.BYTE&&(Ae=n.R8I),se===n.SHORT&&(Ae=n.R16I),se===n.INT&&(Ae=n.R32I)),N===n.RG&&(se===n.FLOAT&&(Ae=n.RG32F),se===n.HALF_FLOAT&&(Ae=n.RG16F),se===n.UNSIGNED_BYTE&&(Ae=n.RG8)),N===n.RG_INTEGER&&(se===n.UNSIGNED_BYTE&&(Ae=n.RG8UI),se===n.UNSIGNED_SHORT&&(Ae=n.RG16UI),se===n.UNSIGNED_INT&&(Ae=n.RG32UI),se===n.BYTE&&(Ae=n.RG8I),se===n.SHORT&&(Ae=n.RG16I),se===n.INT&&(Ae=n.RG32I)),N===n.RGB&&se===n.UNSIGNED_INT_5_9_9_9_REV&&(Ae=n.RGB9_E5),N===n.RGBA){const $e=ye?Jf:Bt.getTransfer(xe);se===n.FLOAT&&(Ae=n.RGBA32F),se===n.HALF_FLOAT&&(Ae=n.RGBA16F),se===n.UNSIGNED_BYTE&&(Ae=$e===Yt?n.SRGB8_ALPHA8:n.RGBA8),se===n.UNSIGNED_SHORT_4_4_4_4&&(Ae=n.RGBA4),se===n.UNSIGNED_SHORT_5_5_5_1&&(Ae=n.RGB5_A1)}return(Ae===n.R16F||Ae===n.R32F||Ae===n.RG16F||Ae===n.RG32F||Ae===n.RGBA16F||Ae===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Ae}function A(z,N){let se;return z?N===null||N===nl||N===il?se=n.DEPTH24_STENCIL8:N===Ji?se=n.DEPTH32F_STENCIL8:N===qf&&(se=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):N===null||N===nl||N===il?se=n.DEPTH_COMPONENT24:N===Ji?se=n.DEPTH_COMPONENT32F:N===qf&&(se=n.DEPTH_COMPONENT16),se}function E(z,N){return x(z)===!0||z.isFramebufferTexture&&z.minFilter!==Wn&&z.minFilter!==Pn?Math.log2(Math.max(N.width,N.height))+1:z.mipmaps!==void 0&&z.mipmaps.length>0?z.mipmaps.length:z.isCompressedTexture&&Array.isArray(z.image)?N.mipmaps.length:1}function R(z){const N=z.target;N.removeEventListener("dispose",R),L(N),N.isVideoTexture&&h.delete(N)}function C(z){const N=z.target;N.removeEventListener("dispose",C),P(N)}function L(z){const N=i.get(z);if(N.__webglInit===void 0)return;const se=z.source,xe=p.get(se);if(xe){const ye=xe[N.__cacheKey];ye.usedTimes--,ye.usedTimes===0&&I(z),Object.keys(xe).length===0&&p.delete(se)}i.remove(z)}function I(z){const N=i.get(z);n.deleteTexture(N.__webglTexture);const se=z.source,xe=p.get(se);delete xe[N.__cacheKey],o.memory.textures--}function P(z){const N=i.get(z);if(z.depthTexture&&z.depthTexture.dispose(),z.isWebGLCubeRenderTarget)for(let xe=0;xe<6;xe++){if(Array.isArray(N.__webglFramebuffer[xe]))for(let ye=0;ye=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+z+" texture units while this GPU supports only "+r.maxTextures),b+=1,z}function X(z){const N=[];return N.push(z.wrapS),N.push(z.wrapT),N.push(z.wrapR||0),N.push(z.magFilter),N.push(z.minFilter),N.push(z.anisotropy),N.push(z.internalFormat),N.push(z.format),N.push(z.type),N.push(z.generateMipmaps),N.push(z.premultiplyAlpha),N.push(z.flipY),N.push(z.unpackAlignment),N.push(z.colorSpace),N.join()}function te(z,N){const se=i.get(z);if(z.isVideoTexture&&Ue(z),z.isRenderTargetTexture===!1&&z.version>0&&se.__version!==z.version){const xe=z.image;if(xe===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(xe.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{De(se,z,N);return}}t.bindTexture(n.TEXTURE_2D,se.__webglTexture,n.TEXTURE0+N)}function ne(z,N){const se=i.get(z);if(z.version>0&&se.__version!==z.version){De(se,z,N);return}t.bindTexture(n.TEXTURE_2D_ARRAY,se.__webglTexture,n.TEXTURE0+N)}function $(z,N){const se=i.get(z);if(z.version>0&&se.__version!==z.version){De(se,z,N);return}t.bindTexture(n.TEXTURE_3D,se.__webglTexture,n.TEXTURE0+N)}function le(z,N){const se=i.get(z);if(z.version>0&&se.__version!==z.version){oe(se,z,N);return}t.bindTexture(n.TEXTURE_CUBE_MAP,se.__webglTexture,n.TEXTURE0+N)}const k={[Xf]:n.REPEAT,[xr]:n.CLAMP_TO_EDGE,[Yf]:n.MIRRORED_REPEAT},q={[Wn]:n.NEAREST,[I1]:n.NEAREST_MIPMAP_NEAREST,[xc]:n.NEAREST_MIPMAP_LINEAR,[Pn]:n.LINEAR,[gf]:n.LINEAR_MIPMAP_NEAREST,[ns]:n.LINEAR_MIPMAP_LINEAR},J={[NI]:n.NEVER,[BI]:n.ALWAYS,[DI]:n.LESS,[V1]:n.LEQUAL,[UI]:n.EQUAL,[FI]:n.GEQUAL,[OI]:n.GREATER,[kI]:n.NOTEQUAL};function Q(z,N){if(N.type===Ji&&e.has("OES_texture_float_linear")===!1&&(N.magFilter===Pn||N.magFilter===gf||N.magFilter===xc||N.magFilter===ns||N.minFilter===Pn||N.minFilter===gf||N.minFilter===xc||N.minFilter===ns)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(z,n.TEXTURE_WRAP_S,k[N.wrapS]),n.texParameteri(z,n.TEXTURE_WRAP_T,k[N.wrapT]),(z===n.TEXTURE_3D||z===n.TEXTURE_2D_ARRAY)&&n.texParameteri(z,n.TEXTURE_WRAP_R,k[N.wrapR]),n.texParameteri(z,n.TEXTURE_MAG_FILTER,q[N.magFilter]),n.texParameteri(z,n.TEXTURE_MIN_FILTER,q[N.minFilter]),N.compareFunction&&(n.texParameteri(z,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(z,n.TEXTURE_COMPARE_FUNC,J[N.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(N.magFilter===Wn||N.minFilter!==xc&&N.minFilter!==ns||N.type===Ji&&e.has("OES_texture_float_linear")===!1)return;if(N.anisotropy>1||i.get(N).__currentAnisotropy){const se=e.get("EXT_texture_filter_anisotropic");n.texParameterf(z,se.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(N.anisotropy,r.getMaxAnisotropy())),i.get(N).__currentAnisotropy=N.anisotropy}}}function _e(z,N){let se=!1;z.__webglInit===void 0&&(z.__webglInit=!0,N.addEventListener("dispose",R));const xe=N.source;let ye=p.get(xe);ye===void 0&&(ye={},p.set(xe,ye));const Ae=X(N);if(Ae!==z.__cacheKey){ye[Ae]===void 0&&(ye[Ae]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,se=!0),ye[Ae].usedTimes++;const $e=ye[z.__cacheKey];$e!==void 0&&(ye[z.__cacheKey].usedTimes--,$e.usedTimes===0&&I(N)),z.__cacheKey=Ae,z.__webglTexture=ye[Ae].texture}return se}function De(z,N,se){let xe=n.TEXTURE_2D;(N.isDataArrayTexture||N.isCompressedArrayTexture)&&(xe=n.TEXTURE_2D_ARRAY),N.isData3DTexture&&(xe=n.TEXTURE_3D);const ye=_e(z,N),Ae=N.source;t.bindTexture(xe,z.__webglTexture,n.TEXTURE0+se);const $e=i.get(Ae);if(Ae.version!==$e.__version||ye===!0){t.activeTexture(n.TEXTURE0+se);const Pe=Bt.getPrimaries(Bt.workingColorSpace),Fe=N.colorSpace===Rs?null:Bt.getPrimaries(N.colorSpace),pt=N.colorSpace===Rs||Pe===Fe?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,N.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,N.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,N.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);let Ce=_(N.image,!1,r.maxTextureSize);Ce=ke(N,Ce);const Je=s.convert(N.format,N.colorSpace),wt=s.convert(N.type);let ut=S(N.internalFormat,Je,wt,N.colorSpace,N.isVideoTexture);Q(xe,N);let Be;const W=N.mipmaps,me=N.isVideoTexture!==!0,Ge=$e.__version===void 0||ye===!0,G=Ae.dataReady,Re=E(N,Ce);if(N.isDepthTexture)ut=A(N.format===rl,N.type),Ge&&(me?t.texStorage2D(n.TEXTURE_2D,1,ut,Ce.width,Ce.height):t.texImage2D(n.TEXTURE_2D,0,ut,Ce.width,Ce.height,0,Je,wt,null));else if(N.isDataTexture)if(W.length>0){me&&Ge&&t.texStorage2D(n.TEXTURE_2D,Re,ut,W[0].width,W[0].height);for(let he=0,ge=W.length;he0){for(const Ie of N.layerUpdates){const ft=Be.width*Be.height;t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,he,0,0,Ie,Be.width,Be.height,1,Je,Be.data.slice(ft*Ie,ft*(Ie+1)),0,0)}N.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,he,0,0,0,Be.width,Be.height,Ce.depth,Je,Be.data,0,0)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,he,ut,Be.width,Be.height,Ce.depth,0,Be.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else me?G&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,he,0,0,0,Be.width,Be.height,Ce.depth,Je,wt,Be.data):t.texImage3D(n.TEXTURE_2D_ARRAY,he,ut,Be.width,Be.height,Ce.depth,0,Je,wt,Be.data)}else{me&&Ge&&t.texStorage2D(n.TEXTURE_2D,Re,ut,W[0].width,W[0].height);for(let he=0,ge=W.length;he0){let he;switch(wt){case n.UNSIGNED_BYTE:switch(Je){case n.ALPHA:he=1;break;case n.LUMINANCE:he=1;break;case n.LUMINANCE_ALPHA:he=2;break;case n.RGB:he=3;break;case n.RGBA:he=4;break;default:throw new Error(`Unknown texel size for format ${Je}.`)}break;case n.UNSIGNED_SHORT_4_4_4_4:case n.UNSIGNED_SHORT_5_5_5_1:case n.UNSIGNED_SHORT_5_6_5:he=1;break;default:throw new Error(`Unknown texel size for type ${wt}.`)}const ge=Ce.width*Ce.height*he;for(const Ie of N.layerUpdates)t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,Ie,Ce.width,Ce.height,1,Je,wt,Ce.data.slice(ge*Ie,ge*(Ie+1)));N.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,Ce.width,Ce.height,Ce.depth,Je,wt,Ce.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,ut,Ce.width,Ce.height,Ce.depth,0,Je,wt,Ce.data);else if(N.isData3DTexture)me?(Ge&&t.texStorage3D(n.TEXTURE_3D,Re,ut,Ce.width,Ce.height,Ce.depth),G&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,Ce.width,Ce.height,Ce.depth,Je,wt,Ce.data)):t.texImage3D(n.TEXTURE_3D,0,ut,Ce.width,Ce.height,Ce.depth,0,Je,wt,Ce.data);else if(N.isFramebufferTexture){if(Ge)if(me)t.texStorage2D(n.TEXTURE_2D,Re,ut,Ce.width,Ce.height);else{let he=Ce.width,ge=Ce.height;for(let Ie=0;Ie>=1,ge>>=1}}else if(W.length>0){if(me&&Ge){const he=lt(W[0]);t.texStorage2D(n.TEXTURE_2D,Re,ut,he.width,he.height)}for(let he=0,ge=W.length;he0&&Re++;const ge=lt(Je[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,Re,W,ge.width,ge.height)}for(let ge=0;ge<6;ge++)if(Ce){me?G&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ge,0,0,0,Je[ge].width,Je[ge].height,ut,Be,Je[ge].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ge,0,W,Je[ge].width,Je[ge].height,0,ut,Be,Je[ge].data);for(let Ie=0;Ie>Ae),Je=Math.max(1,N.height>>Ae);ye===n.TEXTURE_3D||ye===n.TEXTURE_2D_ARRAY?t.texImage3D(ye,Ae,Fe,Ce,Je,N.depth,0,$e,Pe,null):t.texImage2D(ye,Ae,Fe,Ce,Je,0,$e,Pe,null)}t.bindFramebuffer(n.FRAMEBUFFER,z),Ee(N)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,xe,ye,i.get(se).__webglTexture,0,Se(N)):(ye===n.TEXTURE_2D||ye>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&ye<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,xe,ye,i.get(se).__webglTexture,Ae),t.bindFramebuffer(n.FRAMEBUFFER,null)}function Te(z,N,se){if(n.bindRenderbuffer(n.RENDERBUFFER,z),N.depthBuffer){const xe=N.depthTexture,ye=xe&&xe.isDepthTexture?xe.type:null,Ae=A(N.stencilBuffer,ye),$e=N.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Pe=Se(N);Ee(N)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Pe,Ae,N.width,N.height):se?n.renderbufferStorageMultisample(n.RENDERBUFFER,Pe,Ae,N.width,N.height):n.renderbufferStorage(n.RENDERBUFFER,Ae,N.width,N.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,$e,n.RENDERBUFFER,z)}else{const xe=N.textures;for(let ye=0;ye1;if($e||(xe.__webglTexture===void 0&&(xe.__webglTexture=n.createTexture()),xe.__version=N.version,o.memory.textures++),Ae){se.__webglFramebuffer=[];for(let Pe=0;Pe<6;Pe++)if(N.mipmaps&&N.mipmaps.length>0){se.__webglFramebuffer[Pe]=[];for(let Fe=0;Fe0){se.__webglFramebuffer=[];for(let Pe=0;Pe0&&Ee(z)===!1){se.__webglMultisampledFramebuffer=n.createFramebuffer(),se.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,se.__webglMultisampledFramebuffer);for(let Pe=0;Pe0)for(let Fe=0;Fe0)for(let Fe=0;Fe0){if(Ee(z)===!1){const N=z.textures,se=z.width,xe=z.height;let ye=n.COLOR_BUFFER_BIT;const Ae=z.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,$e=i.get(z),Pe=N.length>1;if(Pe)for(let Fe=0;Fe0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&N.__useRenderToTexture!==!1}function Ue(z){const N=o.render.frame;h.get(z)!==N&&(h.set(z,N),z.update())}function ke(z,N){const se=z.colorSpace,xe=z.format,ye=z.type;return z.isCompressedTexture===!0||z.isVideoTexture===!0||se!==Js&&se!==Rs&&(Bt.getTransfer(se)===Yt?(xe!==_i||ye!==us)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",se)),N}function lt(z){return typeof HTMLImageElement<"u"&&z instanceof HTMLImageElement?(f.width=z.naturalWidth||z.width,f.height=z.naturalHeight||z.height):typeof VideoFrame<"u"&&z instanceof VideoFrame?(f.width=z.displayWidth,f.height=z.displayHeight):(f.width=z.width,f.height=z.height),f}this.allocateTextureUnit=j,this.resetTextureUnits=D,this.setTexture2D=te,this.setTexture2DArray=ne,this.setTexture3D=$,this.setTextureCube=le,this.rebindTextures=it,this.setupRenderTarget=Xe,this.updateRenderTargetMipmap=V,this.updateMultisampleRenderTarget=Me,this.setupDepthRenderbuffer=nt,this.setupFrameBufferTexture=ve,this.useMultisampledRTT=Ee}function e3(n,e){function t(i,r=Rs){let s;const o=Bt.getTransfer(r);if(i===us)return n.UNSIGNED_BYTE;if(i===D1)return n.UNSIGNED_SHORT_4_4_4_4;if(i===U1)return n.UNSIGNED_SHORT_5_5_5_1;if(i===_I)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===yI)return n.BYTE;if(i===xI)return n.SHORT;if(i===qf)return n.UNSIGNED_SHORT;if(i===N1)return n.INT;if(i===nl)return n.UNSIGNED_INT;if(i===Ji)return n.FLOAT;if(i===Eh)return n.HALF_FLOAT;if(i===SI)return n.ALPHA;if(i===AI)return n.RGB;if(i===_i)return n.RGBA;if(i===wI)return n.LUMINANCE;if(i===MI)return n.LUMINANCE_ALPHA;if(i===Ya)return n.DEPTH_COMPONENT;if(i===rl)return n.DEPTH_STENCIL;if(i===O1)return n.RED;if(i===k1)return n.RED_INTEGER;if(i===EI)return n.RG;if(i===F1)return n.RG_INTEGER;if(i===B1)return n.RGBA_INTEGER;if(i===dm||i===pm||i===mm||i===gm)if(o===Yt)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===dm)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===pm)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===mm)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===gm)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===dm)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===pm)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===mm)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===gm)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===S_||i===A_||i===w_||i===M_)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===S_)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===A_)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===w_)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===M_)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===E_||i===T_||i===b_)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===E_||i===T_)return o===Yt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===b_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===C_||i===P_||i===R_||i===L_||i===I_||i===N_||i===D_||i===U_||i===O_||i===k_||i===F_||i===B_||i===z_||i===V_)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===C_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===P_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===R_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===L_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===I_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===N_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===D_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===U_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===O_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===k_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===F_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===B_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===z_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===V_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===vm||i===H_||i===G_)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===vm)return o===Yt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===H_)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===G_)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===TI||i===W_||i===j_||i===X_)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===vm)return s.COMPRESSED_RED_RGTC1_EXT;if(i===W_)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===j_)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===X_)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===il?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}class t3 extends an{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class Ac extends Ut{constructor(){super(),this.isGroup=!0,this.type="Group"}}const Wj={type:"move"};class Iy{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new Ac,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 Ac,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new O,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new O),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new Ac,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new O,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new O),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,l=this._grip,f=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(f&&e.hand){o=!0;for(const _ of e.hand.values()){const x=t.getJointPose(_,i),g=this._getHandJoint(f,_);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),m=.02,y=.005;f.inputState.pinching&&p>m+y?(f.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!f.inputState.pinching&&p<=m-y&&(f.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else l!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(l.matrix.fromArray(s.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),l.matrixWorldNeedsUpdate=!0,s.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(s.linearVelocity)):l.hasLinearVelocity=!1,s.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(s.angularVelocity)):l.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(Wj)))}return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=s!==null),f!==null&&(f.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new Ac;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const jj=` +}`;function P6(n,e,t){let i=new gh;const r=new pe,s=new pe,o=new zt,a=new C1({depthPacking:HL}),c=new P1,f={},h=t.maxTextureSize,d={[Ws]:Si,[Si]:Ws,[Dr]:Dr},p=new Br({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new pe},radius:{value:4}},vertexShader:b6,fragmentShader:C6}),m=p.clone();m.defines.HORIZONTAL_PASS=1;const y=new St;y.setAttribute("position",new Ht(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const _=new An(y,p),x=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=wg;let g=this.type;this.render=function(C,L,I){if(x.enabled===!1||x.autoUpdate===!1&&x.needsUpdate===!1||C.length===0)return;const P=n.getRenderTarget(),b=n.getActiveCubeFace(),N=n.getActiveMipmapLevel(),j=n.state;j.setBlending(ks),j.buffers.color.setClear(1,1,1,1),j.buffers.depth.setTest(!0),j.setScissorTest(!1);const X=g!==Pr&&this.type===Pr,te=g===Pr&&this.type!==Pr;for(let ne=0,Q=C.length;neh||r.y>h)&&(r.x>h&&(s.x=Math.floor(h/q.x),r.x=s.x*q.x,k.mapSize.x=s.x),r.y>h&&(s.y=Math.floor(h/q.y),r.y=s.y*q.y,k.mapSize.y=s.y)),k.map===null||X===!0||te===!0){const $=this.type!==Pr?{minFilter:Gn,magFilter:Gn}:{};k.map!==null&&k.map.dispose(),k.map=new Fr(r.x,r.y,$),k.map.texture.name=le.name+".shadowMap",k.camera.updateProjectionMatrix()}n.setRenderTarget(k.map),n.clear();const J=k.getViewportCount();for(let $=0;$0||L.map&&L.alphaTest>0){const j=b.uuid,X=L.uuid;let te=f[j];te===void 0&&(te={},f[j]=te);let ne=te[X];ne===void 0&&(ne=b.clone(),te[X]=ne,L.addEventListener("dispose",R)),b=ne}if(b.visible=L.visible,b.wireframe=L.wireframe,P===Pr?b.side=L.shadowSide!==null?L.shadowSide:L.side:b.side=L.shadowSide!==null?L.shadowSide:d[L.side],b.alphaMap=L.alphaMap,b.alphaTest=L.alphaTest,b.map=L.map,b.clipShadows=L.clipShadows,b.clippingPlanes=L.clippingPlanes,b.clipIntersection=L.clipIntersection,b.displacementMap=L.displacementMap,b.displacementScale=L.displacementScale,b.displacementBias=L.displacementBias,b.wireframeLinewidth=L.wireframeLinewidth,b.linewidth=L.linewidth,I.isPointLight===!0&&b.isMeshDistanceMaterial===!0){const j=n.properties.get(b);j.light=I}return b}function E(C,L,I,P,b){if(C.visible===!1)return;if(C.layers.test(L.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&b===Pr)&&(!C.frustumCulled||i.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(I.matrixWorldInverse,C.matrixWorld);const X=e.update(C),te=C.material;if(Array.isArray(te)){const ne=X.groups;for(let Q=0,le=ne.length;Q=1):le.indexOf("OpenGL ES")!==-1&&(Q=parseFloat(/^OpenGL ES (\d)/.exec(le)[1]),ne=Q>=2);let k=null,q={};const J=n.getParameter(n.SCISSOR_BOX),$=n.getParameter(n.VIEWPORT),_e=new zt().fromArray(J),Ne=new zt().fromArray($);function oe(V,Re,he,ge){const Ie=new Uint8Array(4),ft=n.createTexture();n.bindTexture(V,ft),n.texParameteri(V,n.TEXTURE_MIN_FILTER,n.NEAREST),n.texParameteri(V,n.TEXTURE_MAG_FILTER,n.NEAREST);for(let mt=0;mt"u"?!1:/OculusBrowser/g.test(navigator.userAgent),f=new pe,h=new WeakMap;let d;const p=new WeakMap;let m=!1;try{m=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function y(B,D){return m?new OffscreenCanvas(B,D):Xf("canvas")}function _(B,D,se){let xe=1;const ye=lt(B);if((ye.width>se||ye.height>se)&&(xe=se/Math.max(ye.width,ye.height)),xe<1)if(typeof HTMLImageElement<"u"&&B instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&B instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&B instanceof ImageBitmap||typeof VideoFrame<"u"&&B instanceof VideoFrame){const Ae=Math.floor(xe*ye.width),Qe=Math.floor(xe*ye.height);d===void 0&&(d=y(Ae,Qe));const Pe=D?y(Ae,Qe):d;return Pe.width=Ae,Pe.height=Qe,Pe.getContext("2d").drawImage(B,0,0,Ae,Qe),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+ye.width+"x"+ye.height+") to ("+Ae+"x"+Qe+")."),Pe}else return"data"in B&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+ye.width+"x"+ye.height+")."),B;return B}function x(B){return B.generateMipmaps&&B.minFilter!==Gn&&B.minFilter!==Pn}function g(B){n.generateMipmap(B)}function S(B,D,se,xe,ye=!1){if(B!==null){if(n[B]!==void 0)return n[B];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+B+"'")}let Ae=D;if(D===n.RED&&(se===n.FLOAT&&(Ae=n.R32F),se===n.HALF_FLOAT&&(Ae=n.R16F),se===n.UNSIGNED_BYTE&&(Ae=n.R8)),D===n.RED_INTEGER&&(se===n.UNSIGNED_BYTE&&(Ae=n.R8UI),se===n.UNSIGNED_SHORT&&(Ae=n.R16UI),se===n.UNSIGNED_INT&&(Ae=n.R32UI),se===n.BYTE&&(Ae=n.R8I),se===n.SHORT&&(Ae=n.R16I),se===n.INT&&(Ae=n.R32I)),D===n.RG&&(se===n.FLOAT&&(Ae=n.RG32F),se===n.HALF_FLOAT&&(Ae=n.RG16F),se===n.UNSIGNED_BYTE&&(Ae=n.RG8)),D===n.RG_INTEGER&&(se===n.UNSIGNED_BYTE&&(Ae=n.RG8UI),se===n.UNSIGNED_SHORT&&(Ae=n.RG16UI),se===n.UNSIGNED_INT&&(Ae=n.RG32UI),se===n.BYTE&&(Ae=n.RG8I),se===n.SHORT&&(Ae=n.RG16I),se===n.INT&&(Ae=n.RG32I)),D===n.RGB&&se===n.UNSIGNED_INT_5_9_9_9_REV&&(Ae=n.RGB9_E5),D===n.RGBA){const Qe=ye?Vf:Bt.getTransfer(xe);se===n.FLOAT&&(Ae=n.RGBA32F),se===n.HALF_FLOAT&&(Ae=n.RGBA16F),se===n.UNSIGNED_BYTE&&(Ae=Qe===Yt?n.SRGB8_ALPHA8:n.RGBA8),se===n.UNSIGNED_SHORT_4_4_4_4&&(Ae=n.RGBA4),se===n.UNSIGNED_SHORT_5_5_5_1&&(Ae=n.RGB5_A1)}return(Ae===n.R16F||Ae===n.R32F||Ae===n.RG16F||Ae===n.RG32F||Ae===n.RGBA16F||Ae===n.RGBA32F)&&e.get("EXT_color_buffer_float"),Ae}function A(B,D){let se;return B?D===null||D===Ka||D===Ja?se=n.DEPTH24_STENCIL8:D===Ki?se=n.DEPTH32F_STENCIL8:D===Ff&&(se=n.DEPTH24_STENCIL8,console.warn("DepthTexture: 16 bit depth attachment is not supported with stencil. Using 24-bit attachment.")):D===null||D===Ka||D===Ja?se=n.DEPTH_COMPONENT24:D===Ki?se=n.DEPTH_COMPONENT32F:D===Ff&&(se=n.DEPTH_COMPONENT16),se}function E(B,D){return x(B)===!0||B.isFramebufferTexture&&B.minFilter!==Gn&&B.minFilter!==Pn?Math.log2(Math.max(D.width,D.height))+1:B.mipmaps!==void 0&&B.mipmaps.length>0?B.mipmaps.length:B.isCompressedTexture&&Array.isArray(B.image)?D.mipmaps.length:1}function R(B){const D=B.target;D.removeEventListener("dispose",R),L(D),D.isVideoTexture&&h.delete(D)}function C(B){const D=B.target;D.removeEventListener("dispose",C),P(D)}function L(B){const D=i.get(B);if(D.__webglInit===void 0)return;const se=B.source,xe=p.get(se);if(xe){const ye=xe[D.__cacheKey];ye.usedTimes--,ye.usedTimes===0&&I(B),Object.keys(xe).length===0&&p.delete(se)}i.remove(B)}function I(B){const D=i.get(B);n.deleteTexture(D.__webglTexture);const se=B.source,xe=p.get(se);delete xe[D.__cacheKey],o.memory.textures--}function P(B){const D=i.get(B);if(B.depthTexture&&B.depthTexture.dispose(),B.isWebGLCubeRenderTarget)for(let xe=0;xe<6;xe++){if(Array.isArray(D.__webglFramebuffer[xe]))for(let ye=0;ye=r.maxTextures&&console.warn("THREE.WebGLTextures: Trying to use "+B+" texture units while this GPU supports only "+r.maxTextures),b+=1,B}function X(B){const D=[];return D.push(B.wrapS),D.push(B.wrapT),D.push(B.wrapR||0),D.push(B.magFilter),D.push(B.minFilter),D.push(B.anisotropy),D.push(B.internalFormat),D.push(B.format),D.push(B.type),D.push(B.generateMipmaps),D.push(B.premultiplyAlpha),D.push(B.flipY),D.push(B.unpackAlignment),D.push(B.colorSpace),D.join()}function te(B,D){const se=i.get(B);if(B.isVideoTexture&&Ue(B),B.isRenderTargetTexture===!1&&B.version>0&&se.__version!==B.version){const xe=B.image;if(xe===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(xe.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Ne(se,B,D);return}}t.bindTexture(n.TEXTURE_2D,se.__webglTexture,n.TEXTURE0+D)}function ne(B,D){const se=i.get(B);if(B.version>0&&se.__version!==B.version){Ne(se,B,D);return}t.bindTexture(n.TEXTURE_2D_ARRAY,se.__webglTexture,n.TEXTURE0+D)}function Q(B,D){const se=i.get(B);if(B.version>0&&se.__version!==B.version){Ne(se,B,D);return}t.bindTexture(n.TEXTURE_3D,se.__webglTexture,n.TEXTURE0+D)}function le(B,D){const se=i.get(B);if(B.version>0&&se.__version!==B.version){oe(se,B,D);return}t.bindTexture(n.TEXTURE_CUBE_MAP,se.__webglTexture,n.TEXTURE0+D)}const k={[Of]:n.REPEAT,[yr]:n.CLAMP_TO_EDGE,[kf]:n.MIRRORED_REPEAT},q={[Gn]:n.NEAREST,[c1]:n.NEAREST_MIPMAP_NEAREST,[hc]:n.NEAREST_MIPMAP_LINEAR,[Pn]:n.LINEAR,[lf]:n.LINEAR_MIPMAP_NEAREST,[ts]:n.LINEAR_MIPMAP_LINEAR},J={[WL]:n.NEVER,[KL]:n.ALWAYS,[jL]:n.LESS,[y1]:n.LEQUAL,[XL]:n.EQUAL,[ZL]:n.GEQUAL,[YL]:n.GREATER,[qL]:n.NOTEQUAL};function $(B,D){if(D.type===Ki&&e.has("OES_texture_float_linear")===!1&&(D.magFilter===Pn||D.magFilter===lf||D.magFilter===hc||D.magFilter===ts||D.minFilter===Pn||D.minFilter===lf||D.minFilter===hc||D.minFilter===ts)&&console.warn("THREE.WebGLRenderer: Unable to use linear filtering with floating point textures. OES_texture_float_linear not supported on this device."),n.texParameteri(B,n.TEXTURE_WRAP_S,k[D.wrapS]),n.texParameteri(B,n.TEXTURE_WRAP_T,k[D.wrapT]),(B===n.TEXTURE_3D||B===n.TEXTURE_2D_ARRAY)&&n.texParameteri(B,n.TEXTURE_WRAP_R,k[D.wrapR]),n.texParameteri(B,n.TEXTURE_MAG_FILTER,q[D.magFilter]),n.texParameteri(B,n.TEXTURE_MIN_FILTER,q[D.minFilter]),D.compareFunction&&(n.texParameteri(B,n.TEXTURE_COMPARE_MODE,n.COMPARE_REF_TO_TEXTURE),n.texParameteri(B,n.TEXTURE_COMPARE_FUNC,J[D.compareFunction])),e.has("EXT_texture_filter_anisotropic")===!0){if(D.magFilter===Gn||D.minFilter!==hc&&D.minFilter!==ts||D.type===Ki&&e.has("OES_texture_float_linear")===!1)return;if(D.anisotropy>1||i.get(D).__currentAnisotropy){const se=e.get("EXT_texture_filter_anisotropic");n.texParameterf(B,se.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(D.anisotropy,r.getMaxAnisotropy())),i.get(D).__currentAnisotropy=D.anisotropy}}}function _e(B,D){let se=!1;B.__webglInit===void 0&&(B.__webglInit=!0,D.addEventListener("dispose",R));const xe=D.source;let ye=p.get(xe);ye===void 0&&(ye={},p.set(xe,ye));const Ae=X(D);if(Ae!==B.__cacheKey){ye[Ae]===void 0&&(ye[Ae]={texture:n.createTexture(),usedTimes:0},o.memory.textures++,se=!0),ye[Ae].usedTimes++;const Qe=ye[B.__cacheKey];Qe!==void 0&&(ye[B.__cacheKey].usedTimes--,Qe.usedTimes===0&&I(D)),B.__cacheKey=Ae,B.__webglTexture=ye[Ae].texture}return se}function Ne(B,D,se){let xe=n.TEXTURE_2D;(D.isDataArrayTexture||D.isCompressedArrayTexture)&&(xe=n.TEXTURE_2D_ARRAY),D.isData3DTexture&&(xe=n.TEXTURE_3D);const ye=_e(B,D),Ae=D.source;t.bindTexture(xe,B.__webglTexture,n.TEXTURE0+se);const Qe=i.get(Ae);if(Ae.version!==Qe.__version||ye===!0){t.activeTexture(n.TEXTURE0+se);const Pe=Bt.getPrimaries(Bt.workingColorSpace),Fe=D.colorSpace===bs?null:Bt.getPrimaries(D.colorSpace),pt=D.colorSpace===bs||Pe===Fe?n.NONE:n.BROWSER_DEFAULT_WEBGL;n.pixelStorei(n.UNPACK_FLIP_Y_WEBGL,D.flipY),n.pixelStorei(n.UNPACK_PREMULTIPLY_ALPHA_WEBGL,D.premultiplyAlpha),n.pixelStorei(n.UNPACK_ALIGNMENT,D.unpackAlignment),n.pixelStorei(n.UNPACK_COLORSPACE_CONVERSION_WEBGL,pt);let Ce=_(D.image,!1,r.maxTextureSize);Ce=ke(D,Ce);const Je=s.convert(D.format,D.colorSpace),Mt=s.convert(D.type);let ut=S(D.internalFormat,Je,Mt,D.colorSpace,D.isVideoTexture);$(xe,D);let Be;const H=D.mipmaps,me=D.isVideoTexture!==!0,Ge=Qe.__version===void 0||ye===!0,V=Ae.dataReady,Re=E(D,Ce);if(D.isDepthTexture)ut=A(D.format===Qa,D.type),Ge&&(me?t.texStorage2D(n.TEXTURE_2D,1,ut,Ce.width,Ce.height):t.texImage2D(n.TEXTURE_2D,0,ut,Ce.width,Ce.height,0,Je,Mt,null));else if(D.isDataTexture)if(H.length>0){me&&Ge&&t.texStorage2D(n.TEXTURE_2D,Re,ut,H[0].width,H[0].height);for(let he=0,ge=H.length;he0){for(const Ie of D.layerUpdates){const ft=Be.width*Be.height;t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,he,0,0,Ie,Be.width,Be.height,1,Je,Be.data.slice(ft*Ie,ft*(Ie+1)),0,0)}D.clearLayerUpdates()}else t.compressedTexSubImage3D(n.TEXTURE_2D_ARRAY,he,0,0,0,Be.width,Be.height,Ce.depth,Je,Be.data,0,0)}else t.compressedTexImage3D(n.TEXTURE_2D_ARRAY,he,ut,Be.width,Be.height,Ce.depth,0,Be.data,0,0);else console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()");else me?V&&t.texSubImage3D(n.TEXTURE_2D_ARRAY,he,0,0,0,Be.width,Be.height,Ce.depth,Je,Mt,Be.data):t.texImage3D(n.TEXTURE_2D_ARRAY,he,ut,Be.width,Be.height,Ce.depth,0,Je,Mt,Be.data)}else{me&&Ge&&t.texStorage2D(n.TEXTURE_2D,Re,ut,H[0].width,H[0].height);for(let he=0,ge=H.length;he0){let he;switch(Mt){case n.UNSIGNED_BYTE:switch(Je){case n.ALPHA:he=1;break;case n.LUMINANCE:he=1;break;case n.LUMINANCE_ALPHA:he=2;break;case n.RGB:he=3;break;case n.RGBA:he=4;break;default:throw new Error(`Unknown texel size for format ${Je}.`)}break;case n.UNSIGNED_SHORT_4_4_4_4:case n.UNSIGNED_SHORT_5_5_5_1:case n.UNSIGNED_SHORT_5_6_5:he=1;break;default:throw new Error(`Unknown texel size for type ${Mt}.`)}const ge=Ce.width*Ce.height*he;for(const Ie of D.layerUpdates)t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,Ie,Ce.width,Ce.height,1,Je,Mt,Ce.data.slice(ge*Ie,ge*(Ie+1)));D.clearLayerUpdates()}else t.texSubImage3D(n.TEXTURE_2D_ARRAY,0,0,0,0,Ce.width,Ce.height,Ce.depth,Je,Mt,Ce.data)}else t.texImage3D(n.TEXTURE_2D_ARRAY,0,ut,Ce.width,Ce.height,Ce.depth,0,Je,Mt,Ce.data);else if(D.isData3DTexture)me?(Ge&&t.texStorage3D(n.TEXTURE_3D,Re,ut,Ce.width,Ce.height,Ce.depth),V&&t.texSubImage3D(n.TEXTURE_3D,0,0,0,0,Ce.width,Ce.height,Ce.depth,Je,Mt,Ce.data)):t.texImage3D(n.TEXTURE_3D,0,ut,Ce.width,Ce.height,Ce.depth,0,Je,Mt,Ce.data);else if(D.isFramebufferTexture){if(Ge)if(me)t.texStorage2D(n.TEXTURE_2D,Re,ut,Ce.width,Ce.height);else{let he=Ce.width,ge=Ce.height;for(let Ie=0;Ie>=1,ge>>=1}}else if(H.length>0){if(me&&Ge){const he=lt(H[0]);t.texStorage2D(n.TEXTURE_2D,Re,ut,he.width,he.height)}for(let he=0,ge=H.length;he0&&Re++;const ge=lt(Je[0]);t.texStorage2D(n.TEXTURE_CUBE_MAP,Re,H,ge.width,ge.height)}for(let ge=0;ge<6;ge++)if(Ce){me?V&&t.texSubImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ge,0,0,0,Je[ge].width,Je[ge].height,ut,Be,Je[ge].data):t.texImage2D(n.TEXTURE_CUBE_MAP_POSITIVE_X+ge,0,H,Je[ge].width,Je[ge].height,0,ut,Be,Je[ge].data);for(let Ie=0;Ie>Ae),Je=Math.max(1,D.height>>Ae);ye===n.TEXTURE_3D||ye===n.TEXTURE_2D_ARRAY?t.texImage3D(ye,Ae,Fe,Ce,Je,D.depth,0,Qe,Pe,null):t.texImage2D(ye,Ae,Fe,Ce,Je,0,Qe,Pe,null)}t.bindFramebuffer(n.FRAMEBUFFER,B),Ee(D)?a.framebufferTexture2DMultisampleEXT(n.FRAMEBUFFER,xe,ye,i.get(se).__webglTexture,0,Se(D)):(ye===n.TEXTURE_2D||ye>=n.TEXTURE_CUBE_MAP_POSITIVE_X&&ye<=n.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&n.framebufferTexture2D(n.FRAMEBUFFER,xe,ye,i.get(se).__webglTexture,Ae),t.bindFramebuffer(n.FRAMEBUFFER,null)}function Te(B,D,se){if(n.bindRenderbuffer(n.RENDERBUFFER,B),D.depthBuffer){const xe=D.depthTexture,ye=xe&&xe.isDepthTexture?xe.type:null,Ae=A(D.stencilBuffer,ye),Qe=D.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Pe=Se(D);Ee(D)?a.renderbufferStorageMultisampleEXT(n.RENDERBUFFER,Pe,Ae,D.width,D.height):se?n.renderbufferStorageMultisample(n.RENDERBUFFER,Pe,Ae,D.width,D.height):n.renderbufferStorage(n.RENDERBUFFER,Ae,D.width,D.height),n.framebufferRenderbuffer(n.FRAMEBUFFER,Qe,n.RENDERBUFFER,B)}else{const xe=D.textures;for(let ye=0;ye1;if(Qe||(xe.__webglTexture===void 0&&(xe.__webglTexture=n.createTexture()),xe.__version=D.version,o.memory.textures++),Ae){se.__webglFramebuffer=[];for(let Pe=0;Pe<6;Pe++)if(D.mipmaps&&D.mipmaps.length>0){se.__webglFramebuffer[Pe]=[];for(let Fe=0;Fe0){se.__webglFramebuffer=[];for(let Pe=0;Pe0&&Ee(B)===!1){se.__webglMultisampledFramebuffer=n.createFramebuffer(),se.__webglColorRenderbuffer=[],t.bindFramebuffer(n.FRAMEBUFFER,se.__webglMultisampledFramebuffer);for(let Pe=0;Pe0)for(let Fe=0;Fe0)for(let Fe=0;Fe0){if(Ee(B)===!1){const D=B.textures,se=B.width,xe=B.height;let ye=n.COLOR_BUFFER_BIT;const Ae=B.stencilBuffer?n.DEPTH_STENCIL_ATTACHMENT:n.DEPTH_ATTACHMENT,Qe=i.get(B),Pe=D.length>1;if(Pe)for(let Fe=0;Fe0&&e.has("WEBGL_multisampled_render_to_texture")===!0&&D.__useRenderToTexture!==!1}function Ue(B){const D=o.render.frame;h.get(B)!==D&&(h.set(B,D),B.update())}function ke(B,D){const se=B.colorSpace,xe=B.format,ye=B.type;return B.isCompressedTexture===!0||B.isVideoTexture===!0||se!==qs&&se!==bs&&(Bt.getTransfer(se)===Yt?(xe!==xi||ye!==ls)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",se)),D}function lt(B){return typeof HTMLImageElement<"u"&&B instanceof HTMLImageElement?(f.width=B.naturalWidth||B.width,f.height=B.naturalHeight||B.height):typeof VideoFrame<"u"&&B instanceof VideoFrame?(f.width=B.displayWidth,f.height=B.displayHeight):(f.width=B.width,f.height=B.height),f}this.allocateTextureUnit=j,this.resetTextureUnits=N,this.setTexture2D=te,this.setTexture2DArray=ne,this.setTexture3D=Q,this.setTextureCube=le,this.rebindTextures=it,this.setupRenderTarget=Xe,this.updateRenderTargetMipmap=z,this.updateMultisampleRenderTarget=we,this.setupDepthRenderbuffer=nt,this.setupFrameBufferTexture=ve,this.useMultisampledRTT=Ee}function fI(n,e){function t(i,r=bs){let s;const o=Bt.getTransfer(r);if(i===ls)return n.UNSIGNED_BYTE;if(i===f1)return n.UNSIGNED_SHORT_4_4_4_4;if(i===h1)return n.UNSIGNED_SHORT_5_5_5_1;if(i===LL)return n.UNSIGNED_INT_5_9_9_9_REV;if(i===PL)return n.BYTE;if(i===RL)return n.SHORT;if(i===Ff)return n.UNSIGNED_SHORT;if(i===u1)return n.INT;if(i===Ka)return n.UNSIGNED_INT;if(i===Ki)return n.FLOAT;if(i===hh)return n.HALF_FLOAT;if(i===IL)return n.ALPHA;if(i===DL)return n.RGB;if(i===xi)return n.RGBA;if(i===NL)return n.LUMINANCE;if(i===UL)return n.LUMINANCE_ALPHA;if(i===Va)return n.DEPTH_COMPONENT;if(i===Qa)return n.DEPTH_STENCIL;if(i===d1)return n.RED;if(i===p1)return n.RED_INTEGER;if(i===OL)return n.RG;if(i===m1)return n.RG_INTEGER;if(i===g1)return n.RGBA_INTEGER;if(i===em||i===tm||i===nm||i===im)if(o===Yt)if(s=e.get("WEBGL_compressed_texture_s3tc_srgb"),s!==null){if(i===em)return s.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(i===tm)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(i===nm)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(i===im)return s.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(s=e.get("WEBGL_compressed_texture_s3tc"),s!==null){if(i===em)return s.COMPRESSED_RGB_S3TC_DXT1_EXT;if(i===tm)return s.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(i===nm)return s.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(i===im)return s.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(i===e_||i===t_||i===n_||i===i_)if(s=e.get("WEBGL_compressed_texture_pvrtc"),s!==null){if(i===e_)return s.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(i===t_)return s.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(i===n_)return s.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(i===i_)return s.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(i===r_||i===s_||i===o_)if(s=e.get("WEBGL_compressed_texture_etc"),s!==null){if(i===r_||i===s_)return o===Yt?s.COMPRESSED_SRGB8_ETC2:s.COMPRESSED_RGB8_ETC2;if(i===o_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:s.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(i===a_||i===l_||i===c_||i===u_||i===f_||i===h_||i===d_||i===p_||i===m_||i===g_||i===v_||i===y_||i===x_||i===__)if(s=e.get("WEBGL_compressed_texture_astc"),s!==null){if(i===a_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:s.COMPRESSED_RGBA_ASTC_4x4_KHR;if(i===l_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:s.COMPRESSED_RGBA_ASTC_5x4_KHR;if(i===c_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:s.COMPRESSED_RGBA_ASTC_5x5_KHR;if(i===u_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:s.COMPRESSED_RGBA_ASTC_6x5_KHR;if(i===f_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:s.COMPRESSED_RGBA_ASTC_6x6_KHR;if(i===h_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:s.COMPRESSED_RGBA_ASTC_8x5_KHR;if(i===d_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:s.COMPRESSED_RGBA_ASTC_8x6_KHR;if(i===p_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:s.COMPRESSED_RGBA_ASTC_8x8_KHR;if(i===m_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:s.COMPRESSED_RGBA_ASTC_10x5_KHR;if(i===g_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:s.COMPRESSED_RGBA_ASTC_10x6_KHR;if(i===v_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:s.COMPRESSED_RGBA_ASTC_10x8_KHR;if(i===y_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:s.COMPRESSED_RGBA_ASTC_10x10_KHR;if(i===x_)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:s.COMPRESSED_RGBA_ASTC_12x10_KHR;if(i===__)return o===Yt?s.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:s.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(i===rm||i===S_||i===A_)if(s=e.get("EXT_texture_compression_bptc"),s!==null){if(i===rm)return o===Yt?s.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:s.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(i===S_)return s.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(i===A_)return s.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(i===kL||i===M_||i===w_||i===E_)if(s=e.get("EXT_texture_compression_rgtc"),s!==null){if(i===rm)return s.COMPRESSED_RED_RGTC1_EXT;if(i===M_)return s.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(i===w_)return s.COMPRESSED_RED_GREEN_RGTC2_EXT;if(i===E_)return s.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return i===Ja?n.UNSIGNED_INT_24_8:n[i]!==void 0?n[i]:null}return{convert:t}}class hI extends sn{constructor(e=[]){super(),this.isArrayCamera=!0,this.cameras=e}}class mc extends Ut{constructor(){super(),this.isGroup=!0,this.type="Group"}}const I6={type:"move"};class dy{constructor(){this._targetRay=null,this._grip=null,this._hand=null}getHandSpace(){return this._hand===null&&(this._hand=new mc,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 mc,this._targetRay.matrixAutoUpdate=!1,this._targetRay.visible=!1,this._targetRay.hasLinearVelocity=!1,this._targetRay.linearVelocity=new O,this._targetRay.hasAngularVelocity=!1,this._targetRay.angularVelocity=new O),this._targetRay}getGripSpace(){return this._grip===null&&(this._grip=new mc,this._grip.matrixAutoUpdate=!1,this._grip.visible=!1,this._grip.hasLinearVelocity=!1,this._grip.linearVelocity=new O,this._grip.hasAngularVelocity=!1,this._grip.angularVelocity=new O),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,c=this._grip,f=this._hand;if(e&&t.session.visibilityState!=="visible-blurred"){if(f&&e.hand){o=!0;for(const _ of e.hand.values()){const x=t.getJointPose(_,i),g=this._getHandJoint(f,_);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),m=.02,y=.005;f.inputState.pinching&&p>m+y?(f.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!f.inputState.pinching&&p<=m-y&&(f.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(s=t.getPose(e.gripSpace,i),s!==null&&(c.matrix.fromArray(s.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),c.matrixWorldNeedsUpdate=!0,s.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(s.linearVelocity)):c.hasLinearVelocity=!1,s.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(s.angularVelocity)):c.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(I6)))}return a!==null&&(a.visible=r!==null),c!==null&&(c.visible=s!==null),f!==null&&(f.visible=o!==null),this}_getHandJoint(e,t){if(e.joints[t.jointName]===void 0){const i=new mc;i.matrixAutoUpdate=!1,i.visible=!1,e.joints[t.jointName]=i,e.add(i)}return e.joints[t.jointName]}}const D6=` void main() { gl_Position = vec4( position, 1.0 ); -}`,Xj=` +}`,N6=` uniform sampler2DArray depthColor; uniform float depthWidth; uniform float depthHeight; @@ -3880,7 +3853,7 @@ void main() { } -}`;class Yj{constructor(){this.texture=null,this.mesh=null,this.depthNear=0,this.depthFar=0}init(e,t,i){if(this.texture===null){const r=new tn,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 zr({vertexShader:jj,fragmentShader:Xj,uniforms:{depthColor:{value:this.texture},depthWidth:{value:t.z},depthHeight:{value:t.w}}});this.mesh=new An(new Jc(20,20),i)}return this.mesh}reset(){this.texture=null,this.mesh=null}}class qj extends fs{constructor(e,t){super();const i=this;let r=null,s=1,o=null,a="local-floor",l=1,f=null,h=null,d=null,p=null,m=null,y=null;const _=new Yj,x=t.getContextAttributes();let g=null,S=null;const A=[],E=[],R=new pe;let C=null;const L=new an;L.layers.enable(1),L.viewport=new zt;const I=new an;I.layers.enable(2),I.viewport=new zt;const P=[L,I],b=new t3;b.layers.enable(1),b.layers.enable(2);let D=null,j=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(oe){let ve=A[oe];return ve===void 0&&(ve=new Iy,A[oe]=ve),ve.getTargetRaySpace()},this.getControllerGrip=function(oe){let ve=A[oe];return ve===void 0&&(ve=new Iy,A[oe]=ve),ve.getGripSpace()},this.getHand=function(oe){let ve=A[oe];return ve===void 0&&(ve=new Iy,A[oe]=ve),ve.getHandSpace()};function X(oe){const ve=E.indexOf(oe.inputSource);if(ve===-1)return;const Te=A[ve];Te!==void 0&&(Te.update(oe.inputSource,oe.frame,f||o),Te.dispatchEvent({type:oe.type,data:oe.inputSource}))}function te(){r.removeEventListener("select",X),r.removeEventListener("selectstart",X),r.removeEventListener("selectend",X),r.removeEventListener("squeeze",X),r.removeEventListener("squeezestart",X),r.removeEventListener("squeezeend",X),r.removeEventListener("end",te),r.removeEventListener("inputsourceschange",ne);for(let oe=0;oe=0&&(E[we]=null,A[we].disconnect(Te))}for(let ve=0;ve=E.length){E.push(Te),we=it;break}else if(E[it]===null){E[it]=Te,we=it;break}if(we===-1)break}const nt=A[we];nt&&nt.connect(Te)}}const $=new O,le=new O;function k(oe,ve,Te){$.setFromMatrixPosition(ve.matrixWorld),le.setFromMatrixPosition(Te.matrixWorld);const we=$.distanceTo(le),nt=ve.projectionMatrix.elements,it=Te.projectionMatrix.elements,Xe=nt[14]/(nt[10]-1),V=nt[14]/(nt[10]+1),de=(nt[9]+1)/nt[5],fe=(nt[9]-1)/nt[5],Me=(nt[8]-1)/nt[0],Se=(it[8]+1)/it[0],Ee=Xe*Me,Ue=Xe*Se,ke=we/(-Me+Se),lt=ke*-Me;ve.matrixWorld.decompose(oe.position,oe.quaternion,oe.scale),oe.translateX(lt),oe.translateZ(ke),oe.matrixWorld.compose(oe.position,oe.quaternion,oe.scale),oe.matrixWorldInverse.copy(oe.matrixWorld).invert();const z=Xe+ke,N=V+ke,se=Ee-lt,xe=Ue+(we-lt),ye=de*V/N*z,Ae=fe*V/N*z;oe.projectionMatrix.makePerspective(se,xe,ye,Ae,z,N),oe.projectionMatrixInverse.copy(oe.projectionMatrix).invert()}function q(oe,ve){ve===null?oe.matrixWorld.copy(oe.matrix):oe.matrixWorld.multiplyMatrices(ve.matrixWorld,oe.matrix),oe.matrixWorldInverse.copy(oe.matrixWorld).invert()}this.updateCamera=function(oe){if(r===null)return;_.texture!==null&&(oe.near=_.depthNear,oe.far=_.depthFar),b.near=I.near=L.near=oe.near,b.far=I.far=L.far=oe.far,(D!==b.near||j!==b.far)&&(r.updateRenderState({depthNear:b.near,depthFar:b.far}),D=b.near,j=b.far,L.near=D,L.far=j,I.near=D,I.far=j,L.updateProjectionMatrix(),I.updateProjectionMatrix(),oe.updateProjectionMatrix());const ve=oe.parent,Te=b.cameras;q(b,ve);for(let we=0;we0&&(x.alphaTest.value=g.alphaTest);const S=e.get(g),A=S.envMap,E=S.envMapRotation;A&&(x.envMap.value=A,ya.copy(E),ya.x*=-1,ya.y*=-1,ya.z*=-1,A.isCubeTexture&&A.isRenderTargetTexture===!1&&(ya.y*=-1,ya.z*=-1),x.envMapRotation.value.setFromMatrix4(Kj.makeRotationFromEuler(ya)),x.flipEnvMap.value=A.isCubeTexture&&A.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 l(x,g,S,A){x.diffuse.value.copy(g.color),x.opacity.value=g.opacity,x.size.value=g.size*S,x.scale.value=A*.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 m(x,g,S){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===Ai&&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=S.texture,x.transmissionSamplerSize.value.set(S.width,S.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 _(x,g){const S=e.get(g).light;x.referencePosition.value.setFromMatrixPosition(S.matrixWorld),x.nearDistance.value=S.shadow.camera.near,x.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function Jj(n,e,t,i){let r={},s={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function l(S,A){const E=A.program;i.uniformBlockBinding(S,E)}function f(S,A){let E=r[S.id];E===void 0&&(y(S),E=h(S),r[S.id]=E,S.addEventListener("dispose",x));const R=A.program;i.updateUBOMapping(S,R);const C=e.render.frame;s[S.id]!==C&&(p(S),s[S.id]=C)}function h(S){const A=d();S.__bindingPointIndex=A;const E=n.createBuffer(),R=S.__size,C=S.usage;return n.bindBuffer(n.UNIFORM_BUFFER,E),n.bufferData(n.UNIFORM_BUFFER,R,C),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,A,E),E}function d(){for(let S=0;S0&&(E+=R-C),S.__size=E,S.__cache={},this}function _(S){const A={boundary:0,storage:0};return typeof S=="number"||typeof S=="boolean"?(A.boundary=4,A.storage=4):S.isVector2?(A.boundary=8,A.storage=8):S.isVector3||S.isColor?(A.boundary=16,A.storage=12):S.isVector4?(A.boundary=16,A.storage=16):S.isMatrix3?(A.boundary=48,A.storage=48):S.isMatrix4?(A.boundary=64,A.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),A}function x(S){const A=S.target;A.removeEventListener("dispose",x);const E=o.indexOf(A.__bindingPointIndex);o.splice(E,1),n.deleteBuffer(r[A.id]),delete r[A.id],delete s[A.id]}function g(){for(const S in r)n.deleteBuffer(r[S]);o=[],r={},s={}}return{bind:l,update:f,dispose:g}}class n3{constructor(e={}){const{canvas:t=HI(),context:i=null,depth:r=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:l=!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 m=new Uint32Array(4),y=new Int32Array(4);let _=null,x=null;const g=[],S=[];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=mr,this.toneMapping=ls,this.toneMappingExposure=1;const A=this;let E=!1,R=0,C=0,L=null,I=-1,P=null;const b=new zt,D=new zt;let j=null;const X=new je(0);let te=0,ne=t.width,$=t.height,le=1,k=null,q=null;const J=new zt(0,0,ne,$),Q=new zt(0,0,ne,$);let _e=!1;const De=new Ph;let oe=!1,ve=!1;const Te=new at,we=new O,nt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let it=!1;function Xe(){return L===null?le:1}let V=i;function de(U,K){return t.getContext(U,K)}try{const U={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:l,preserveDrawingBuffer:f,powerPreference:h,failIfMajorPerformanceCaveat:d};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Bg}`),t.addEventListener("webglcontextlost",Re,!1),t.addEventListener("webglcontextrestored",he,!1),t.addEventListener("webglcontextcreationerror",ge,!1),V===null){const K="webgl2";if(V=de(K,U),V===null)throw de(K)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(U){throw console.error("THREE.WebGLRenderer: "+U.message),U}let fe,Me,Se,Ee,Ue,ke,lt,z,N,se,xe,ye,Ae,$e,Pe,Fe,pt,Ce,Je,wt,ut,Be,W,me;function Ge(){fe=new u8(V),fe.init(),Be=new e3(V,fe),Me=new r8(V,fe,e,Be),Se=new Hj(V),Ee=new d8(V),Ue=new Rj,ke=new Gj(V,fe,Se,Ue,Me,Be,Ee),lt=new o8(A),z=new c8(A),N=new _G(V),W=new n8(V,N),se=new f8(V,N,Ee,W),xe=new m8(V,se,N,Ee),Je=new p8(V,Me,ke),Fe=new s8(Ue),ye=new Pj(A,lt,z,fe,Me,W,Fe),Ae=new Zj(A,Ue),$e=new Ij,Pe=new Fj(fe),Ce=new t8(A,lt,z,Se,xe,p,l),pt=new Vj(A,xe,Me),me=new Jj(V,Ee,Me,Se),wt=new i8(V,fe,Ee),ut=new h8(V,fe,Ee),Ee.programs=ye.programs,A.capabilities=Me,A.extensions=fe,A.properties=Ue,A.renderLists=$e,A.shadowMap=pt,A.state=Se,A.info=Ee}Ge();const G=new qj(A,V);this.xr=G,this.getContext=function(){return V},this.getContextAttributes=function(){return V.getContextAttributes()},this.forceContextLoss=function(){const U=fe.get("WEBGL_lose_context");U&&U.loseContext()},this.forceContextRestore=function(){const U=fe.get("WEBGL_lose_context");U&&U.restoreContext()},this.getPixelRatio=function(){return le},this.setPixelRatio=function(U){U!==void 0&&(le=U,this.setSize(ne,$,!1))},this.getSize=function(U){return U.set(ne,$)},this.setSize=function(U,K,re=!0){if(G.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}ne=U,$=K,t.width=Math.floor(U*le),t.height=Math.floor(K*le),re===!0&&(t.style.width=U+"px",t.style.height=K+"px"),this.setViewport(0,0,U,K)},this.getDrawingBufferSize=function(U){return U.set(ne*le,$*le).floor()},this.setDrawingBufferSize=function(U,K,re){ne=U,$=K,le=re,t.width=Math.floor(U*re),t.height=Math.floor(K*re),this.setViewport(0,0,U,K)},this.getCurrentViewport=function(U){return U.copy(b)},this.getViewport=function(U){return U.copy(J)},this.setViewport=function(U,K,re,ae){U.isVector4?J.set(U.x,U.y,U.z,U.w):J.set(U,K,re,ae),Se.viewport(b.copy(J).multiplyScalar(le).round())},this.getScissor=function(U){return U.copy(Q)},this.setScissor=function(U,K,re,ae){U.isVector4?Q.set(U.x,U.y,U.z,U.w):Q.set(U,K,re,ae),Se.scissor(D.copy(Q).multiplyScalar(le).round())},this.getScissorTest=function(){return _e},this.setScissorTest=function(U){Se.setScissorTest(_e=U)},this.setOpaqueSort=function(U){k=U},this.setTransparentSort=function(U){q=U},this.getClearColor=function(U){return U.copy(Ce.getClearColor())},this.setClearColor=function(){Ce.setClearColor.apply(Ce,arguments)},this.getClearAlpha=function(){return Ce.getClearAlpha()},this.setClearAlpha=function(){Ce.setClearAlpha.apply(Ce,arguments)},this.clear=function(U=!0,K=!0,re=!0){let ae=0;if(U){let ee=!1;if(L!==null){const Ne=L.texture.format;ee=Ne===B1||Ne===F1||Ne===k1}if(ee){const Ne=L.texture.type,We=Ne===us||Ne===nl||Ne===qf||Ne===il||Ne===D1||Ne===U1,Ke=Ce.getClearColor(),Qe=Ce.getClearAlpha(),ct=Ke.r,st=Ke.g,rt=Ke.b;We?(m[0]=ct,m[1]=st,m[2]=rt,m[3]=Qe,V.clearBufferuiv(V.COLOR,0,m)):(y[0]=ct,y[1]=st,y[2]=rt,y[3]=Qe,V.clearBufferiv(V.COLOR,0,y))}else ae|=V.COLOR_BUFFER_BIT}K&&(ae|=V.DEPTH_BUFFER_BIT),re&&(ae|=V.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),V.clear(ae)},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",Re,!1),t.removeEventListener("webglcontextrestored",he,!1),t.removeEventListener("webglcontextcreationerror",ge,!1),$e.dispose(),Pe.dispose(),Ue.dispose(),lt.dispose(),z.dispose(),xe.dispose(),W.dispose(),me.dispose(),ye.dispose(),G.dispose(),G.removeEventListener("sessionstart",Ln),G.removeEventListener("sessionend",Fn),ds.stop()};function Re(U){U.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),E=!0}function he(){console.log("THREE.WebGLRenderer: Context Restored."),E=!1;const U=Ee.autoReset,K=pt.enabled,re=pt.autoUpdate,ae=pt.needsUpdate,ee=pt.type;Ge(),Ee.autoReset=U,pt.enabled=K,pt.autoUpdate=re,pt.needsUpdate=ae,pt.type=ee}function ge(U){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",U.statusMessage)}function Ie(U){const K=U.target;K.removeEventListener("dispose",Ie),ft(K)}function ft(U){mt(U),Ue.remove(U)}function mt(U){const K=Ue.get(U).programs;K!==void 0&&(K.forEach(function(re){ye.releaseProgram(re)}),U.isShaderMaterial&&ye.releaseShaderCache(U))}this.renderBufferDirect=function(U,K,re,ae,ee,Ne){K===null&&(K=nt);const We=ee.isMesh&&ee.matrixWorld.determinant()<0,Ke=d0(U,K,re,ae,ee);Se.setMaterial(ae,We);let Qe=re.index,ct=1;if(ae.wireframe===!0){if(Qe=se.getWireframeAttribute(re),Qe===void 0)return;ct=2}const st=re.drawRange,rt=re.attributes.position;let Lt=st.start*ct,nn=(st.start+st.count)*ct;Ne!==null&&(Lt=Math.max(Lt,Ne.start*ct),nn=Math.min(nn,(Ne.start+Ne.count)*ct)),Qe!==null?(Lt=Math.max(Lt,0),nn=Math.min(nn,Qe.count)):rt!=null&&(Lt=Math.max(Lt,0),nn=Math.min(nn,rt.count));const jt=nn-Lt;if(jt<0||jt===1/0)return;W.setup(ee,ae,Ke,re,Qe);let wn,Tt=wt;if(Qe!==null&&(wn=N.get(Qe),Tt=ut,Tt.setIndex(wn)),ee.isMesh)ae.wireframe===!0?(Se.setLineWidth(ae.wireframeLinewidth*Xe()),Tt.setMode(V.LINES)):Tt.setMode(V.TRIANGLES);else if(ee.isLine){let Oe=ae.linewidth;Oe===void 0&&(Oe=1),Se.setLineWidth(Oe*Xe()),ee.isLineSegments?Tt.setMode(V.LINES):ee.isLineLoop?Tt.setMode(V.LINE_LOOP):Tt.setMode(V.LINE_STRIP)}else ee.isPoints?Tt.setMode(V.POINTS):ee.isSprite&&Tt.setMode(V.TRIANGLES);if(ee.isBatchedMesh)ee._multiDrawInstances!==null?Tt.renderMultiDrawInstances(ee._multiDrawStarts,ee._multiDrawCounts,ee._multiDrawCount,ee._multiDrawInstances):Tt.renderMultiDraw(ee._multiDrawStarts,ee._multiDrawCounts,ee._multiDrawCount);else if(ee.isInstancedMesh)Tt.renderInstances(Lt,jt,ee.count);else if(re.isInstancedBufferGeometry){const Oe=re._maxInstanceCount!==void 0?re._maxInstanceCount:1/0,yt=Math.min(re.instanceCount,Oe);Tt.renderInstances(Lt,jt,yt)}else Tt.render(Lt,jt)};function Rt(U,K,re){U.transparent===!0&&U.side===Dr&&U.forceSinglePass===!1?(U.side=Ai,U.needsUpdate=!0,Gr(U,K,re),U.side=Xs,U.needsUpdate=!0,Gr(U,K,re),U.side=Dr):Gr(U,K,re)}this.compile=function(U,K,re=null){re===null&&(re=U),x=Pe.get(re),x.init(K),S.push(x),re.traverseVisible(function(ee){ee.isLight&&ee.layers.test(K.layers)&&(x.pushLight(ee),ee.castShadow&&x.pushShadow(ee))}),U!==re&&U.traverseVisible(function(ee){ee.isLight&&ee.layers.test(K.layers)&&(x.pushLight(ee),ee.castShadow&&x.pushShadow(ee))}),x.setupLights();const ae=new Set;return U.traverse(function(ee){const Ne=ee.material;if(Ne)if(Array.isArray(Ne))for(let We=0;We{function Ne(){if(ae.forEach(function(We){Ue.get(We).currentProgram.isReady()&&ae.delete(We)}),ae.size===0){ee(U);return}setTimeout(Ne,10)}fe.get("KHR_parallel_shader_compile")!==null?Ne():setTimeout(Ne,10)})};let Wt=null;function bt(U){Wt&&Wt(U)}function Ln(){ds.stop()}function Fn(){ds.start()}const ds=new qI;ds.setAnimationLoop(bt),typeof self<"u"&&ds.setContext(self),this.setAnimationLoop=function(U){Wt=U,G.setAnimationLoop(U),U===null?ds.stop():ds.start()},G.addEventListener("sessionstart",Ln),G.addEventListener("sessionend",Fn),this.render=function(U,K){if(K!==void 0&&K.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(E===!0)return;if(U.matrixWorldAutoUpdate===!0&&U.updateMatrixWorld(),K.parent===null&&K.matrixWorldAutoUpdate===!0&&K.updateMatrixWorld(),G.enabled===!0&&G.isPresenting===!0&&(G.cameraAutoUpdate===!0&&G.updateCamera(K),K=G.getCamera()),U.isScene===!0&&U.onBeforeRender(A,U,K,L),x=Pe.get(U,S.length),x.init(K),S.push(x),Te.multiplyMatrices(K.projectionMatrix,K.matrixWorldInverse),De.setFromProjectionMatrix(Te),ve=this.localClippingEnabled,oe=Fe.init(this.clippingPlanes,ve),_=$e.get(U,g.length),_.init(),g.push(_),G.enabled===!0&&G.isPresenting===!0){const Ne=A.xr.getDepthSensingMesh();Ne!==null&&eu(Ne,K,-1/0,A.sortObjects)}eu(U,K,0,A.sortObjects),_.finish(),A.sortObjects===!0&&_.sort(k,q),it=G.enabled===!1||G.isPresenting===!1||G.hasDepthSensing()===!1,it&&Ce.addToRenderList(_,U),this.info.render.frame++,oe===!0&&Fe.beginShadows();const re=x.state.shadowsArray;pt.render(re,U,K),oe===!0&&Fe.endShadows(),this.info.autoReset===!0&&this.info.reset();const ae=_.opaque,ee=_.transmissive;if(x.setupLights(),K.isArrayCamera){const Ne=K.cameras;if(ee.length>0)for(let We=0,Ke=Ne.length;We0&&tu(ae,ee,U,K),it&&Ce.render(U),Fh(_,U,K);L!==null&&(ke.updateMultisampleRenderTarget(L),ke.updateRenderTargetMipmap(L)),U.isScene===!0&&U.onAfterRender(A,U,K),W.resetDefaultState(),I=-1,P=null,S.pop(),S.length>0?(x=S[S.length-1],oe===!0&&Fe.setGlobalState(A.clippingPlanes,x.state.camera)):x=null,g.pop(),g.length>0?_=g[g.length-1]:_=null};function eu(U,K,re,ae){if(U.visible===!1)return;if(U.layers.test(K.layers)){if(U.isGroup)re=U.renderOrder;else if(U.isLOD)U.autoUpdate===!0&&U.update(K);else if(U.isLight)x.pushLight(U),U.castShadow&&x.pushShadow(U);else if(U.isSprite){if(!U.frustumCulled||De.intersectsSprite(U)){ae&&we.setFromMatrixPosition(U.matrixWorld).applyMatrix4(Te);const We=xe.update(U),Ke=U.material;Ke.visible&&_.push(U,We,Ke,re,we.z,null)}}else if((U.isMesh||U.isLine||U.isPoints)&&(!U.frustumCulled||De.intersectsObject(U))){const We=xe.update(U),Ke=U.material;if(ae&&(U.boundingSphere!==void 0?(U.boundingSphere===null&&U.computeBoundingSphere(),we.copy(U.boundingSphere.center)):(We.boundingSphere===null&&We.computeBoundingSphere(),we.copy(We.boundingSphere.center)),we.applyMatrix4(U.matrixWorld).applyMatrix4(Te)),Array.isArray(Ke)){const Qe=We.groups;for(let ct=0,st=Qe.length;ct0&&$s(ee,K,re),Ne.length>0&&$s(Ne,K,re),We.length>0&&$s(We,K,re),Se.buffers.depth.setTest(!0),Se.buffers.depth.setMask(!0),Se.buffers.color.setMask(!0),Se.setPolygonOffset(!1)}function tu(U,K,re,ae){if((re.isScene===!0?re.overrideMaterial:null)!==null)return;x.state.transmissionRenderTarget[ae.id]===void 0&&(x.state.transmissionRenderTarget[ae.id]=new Br(1,1,{generateMipmaps:!0,type:fe.has("EXT_color_buffer_half_float")||fe.has("EXT_color_buffer_float")?Eh:us,minFilter:ns,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Bt.workingColorSpace}));const Ne=x.state.transmissionRenderTarget[ae.id],We=ae.viewport||b;Ne.setSize(We.z,We.w);const Ke=A.getRenderTarget();A.setRenderTarget(Ne),A.getClearColor(X),te=A.getClearAlpha(),te<1&&A.setClearColor(16777215,.5),it?Ce.render(re):A.clear();const Qe=A.toneMapping;A.toneMapping=ls;const ct=ae.viewport;if(ae.viewport!==void 0&&(ae.viewport=void 0),x.setupLightsView(ae),oe===!0&&Fe.setGlobalState(A.clippingPlanes,ae),$s(U,re,ae),ke.updateMultisampleRenderTarget(Ne),ke.updateRenderTargetMipmap(Ne),fe.has("WEBGL_multisampled_render_to_texture")===!1){let st=!1;for(let rt=0,Lt=K.length;rt0),rt=!!re.morphAttributes.position,Lt=!!re.morphAttributes.normal,nn=!!re.morphAttributes.color;let jt=ls;ae.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(jt=A.toneMapping);const wn=re.morphAttributes.position||re.morphAttributes.normal||re.morphAttributes.color,Tt=wn!==void 0?wn.length:0,Oe=Ue.get(ae),yt=x.state.lights;if(oe===!0&&(ve===!0||U!==P)){const hi=U===P&&ae.id===I;Fe.setState(ae,U,hi)}let Ct=!1;ae.version===Oe.__version?(Oe.needsLights&&Oe.lightsStateVersion!==yt.state.version||Oe.outputColorSpace!==Ke||ee.isBatchedMesh&&Oe.batching===!1||!ee.isBatchedMesh&&Oe.batching===!0||ee.isBatchedMesh&&Oe.batchingColor===!0&&ee.colorTexture===null||ee.isBatchedMesh&&Oe.batchingColor===!1&&ee.colorTexture!==null||ee.isInstancedMesh&&Oe.instancing===!1||!ee.isInstancedMesh&&Oe.instancing===!0||ee.isSkinnedMesh&&Oe.skinning===!1||!ee.isSkinnedMesh&&Oe.skinning===!0||ee.isInstancedMesh&&Oe.instancingColor===!0&&ee.instanceColor===null||ee.isInstancedMesh&&Oe.instancingColor===!1&&ee.instanceColor!==null||ee.isInstancedMesh&&Oe.instancingMorph===!0&&ee.morphTexture===null||ee.isInstancedMesh&&Oe.instancingMorph===!1&&ee.morphTexture!==null||Oe.envMap!==Qe||ae.fog===!0&&Oe.fog!==Ne||Oe.numClippingPlanes!==void 0&&(Oe.numClippingPlanes!==Fe.numPlanes||Oe.numIntersection!==Fe.numIntersection)||Oe.vertexAlphas!==ct||Oe.vertexTangents!==st||Oe.morphTargets!==rt||Oe.morphNormals!==Lt||Oe.morphColors!==nn||Oe.toneMapping!==jt||Oe.morphTargetsCount!==Tt)&&(Ct=!0):(Ct=!0,Oe.__version=ae.version);let Xt=Oe.currentProgram;Ct===!0&&(Xt=Gr(ae,K,ee));let In=!1,fi=!1,Wr=!1;const It=Xt.getUniforms(),zi=Oe.uniforms;if(Se.useProgram(Xt.program)&&(In=!0,fi=!0,Wr=!0),ae.id!==I&&(I=ae.id,fi=!0),In||P!==U){It.setValue(V,"projectionMatrix",U.projectionMatrix),It.setValue(V,"viewMatrix",U.matrixWorldInverse);const hi=It.map.cameraPosition;hi!==void 0&&hi.setValue(V,we.setFromMatrixPosition(U.matrixWorld)),Me.logarithmicDepthBuffer&&It.setValue(V,"logDepthBufFC",2/(Math.log(U.far+1)/Math.LN2)),(ae.isMeshPhongMaterial||ae.isMeshToonMaterial||ae.isMeshLambertMaterial||ae.isMeshBasicMaterial||ae.isMeshStandardMaterial||ae.isShaderMaterial)&&It.setValue(V,"isOrthographic",U.isOrthographicCamera===!0),P!==U&&(P=U,fi=!0,Wr=!0)}if(ee.isSkinnedMesh){It.setOptional(V,ee,"bindMatrix"),It.setOptional(V,ee,"bindMatrixInverse");const hi=ee.skeleton;hi&&(hi.boneTexture===null&&hi.computeBoneTexture(),It.setValue(V,"boneTexture",hi.boneTexture,ke))}ee.isBatchedMesh&&(It.setOptional(V,ee,"batchingTexture"),It.setValue(V,"batchingTexture",ee._matricesTexture,ke),It.setOptional(V,ee,"batchingColorTexture"),ee._colorsTexture!==null&&It.setValue(V,"batchingColorTexture",ee._colorsTexture,ke));const yl=re.morphAttributes;if((yl.position!==void 0||yl.normal!==void 0||yl.color!==void 0)&&Je.update(ee,re,Xt),(fi||Oe.receiveShadow!==ee.receiveShadow)&&(Oe.receiveShadow=ee.receiveShadow,It.setValue(V,"receiveShadow",ee.receiveShadow)),ae.isMeshGouraudMaterial&&ae.envMap!==null&&(zi.envMap.value=Qe,zi.flipEnvMap.value=Qe.isCubeTexture&&Qe.isRenderTargetTexture===!1?-1:1),ae.isMeshStandardMaterial&&ae.envMap===null&&K.environment!==null&&(zi.envMapIntensity.value=K.environmentIntensity),fi&&(It.setValue(V,"toneMappingExposure",A.toneMappingExposure),Oe.needsLights&&p0(zi,Wr),Ne&&ae.fog===!0&&Ae.refreshFogUniforms(zi,Ne),Ae.refreshMaterialUniforms(zi,ae,le,$,x.state.transmissionRenderTarget[U.id]),xm.upload(V,zh(Oe),zi,ke)),ae.isShaderMaterial&&ae.uniformsNeedUpdate===!0&&(xm.upload(V,zh(Oe),zi,ke),ae.uniformsNeedUpdate=!1),ae.isSpriteMaterial&&It.setValue(V,"center",ee.center),It.setValue(V,"modelViewMatrix",ee.modelViewMatrix),It.setValue(V,"normalMatrix",ee.normalMatrix),It.setValue(V,"modelMatrix",ee.matrixWorld),ae.isShaderMaterial||ae.isRawShaderMaterial){const hi=ae.uniformsGroups;for(let Qs=0,Hh=hi.length;Qs0&&ke.useMultisampledRTT(U)===!1?ee=Ue.get(U).__webglMultisampledFramebuffer:Array.isArray(st)?ee=st[re]:ee=st,b.copy(U.viewport),D.copy(U.scissor),j=U.scissorTest}else b.copy(J).multiplyScalar(le).floor(),D.copy(Q).multiplyScalar(le).floor(),j=_e;if(Se.bindFramebuffer(V.FRAMEBUFFER,ee)&&ae&&Se.drawBuffers(U,ee),Se.viewport(b),Se.scissor(D),Se.setScissorTest(j),Ne){const Qe=Ue.get(U.texture);V.framebufferTexture2D(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,V.TEXTURE_CUBE_MAP_POSITIVE_X+K,Qe.__webglTexture,re)}else if(We){const Qe=Ue.get(U.texture),ct=K||0;V.framebufferTextureLayer(V.FRAMEBUFFER,V.COLOR_ATTACHMENT0,Qe.__webglTexture,re||0,ct)}I=-1},this.readRenderTargetPixels=function(U,K,re,ae,ee,Ne,We){if(!(U&&U.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ke=Ue.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&We!==void 0&&(Ke=Ke[We]),Ke){Se.bindFramebuffer(V.FRAMEBUFFER,Ke);try{const Qe=U.texture,ct=Qe.format,st=Qe.type;if(!Me.textureFormatReadable(ct)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!Me.textureTypeReadable(st)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}K>=0&&K<=U.width-ae&&re>=0&&re<=U.height-ee&&V.readPixels(K,re,ae,ee,Be.convert(ct),Be.convert(st),Ne)}finally{const Qe=L!==null?Ue.get(L).__webglFramebuffer:null;Se.bindFramebuffer(V.FRAMEBUFFER,Qe)}}},this.readRenderTargetPixelsAsync=async function(U,K,re,ae,ee,Ne,We){if(!(U&&U.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ke=Ue.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&We!==void 0&&(Ke=Ke[We]),Ke){Se.bindFramebuffer(V.FRAMEBUFFER,Ke);try{const Qe=U.texture,ct=Qe.format,st=Qe.type;if(!Me.textureFormatReadable(ct))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!Me.textureTypeReadable(st))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(K>=0&&K<=U.width-ae&&re>=0&&re<=U.height-ee){const rt=V.createBuffer();V.bindBuffer(V.PIXEL_PACK_BUFFER,rt),V.bufferData(V.PIXEL_PACK_BUFFER,Ne.byteLength,V.STREAM_READ),V.readPixels(K,re,ae,ee,Be.convert(ct),Be.convert(st),0),V.flush();const Lt=V.fenceSync(V.SYNC_GPU_COMMANDS_COMPLETE,0);await jH(V,Lt,4);try{V.bindBuffer(V.PIXEL_PACK_BUFFER,rt),V.getBufferSubData(V.PIXEL_PACK_BUFFER,0,Ne)}finally{V.deleteBuffer(rt),V.deleteSync(Lt)}return Ne}}finally{const Qe=L!==null?Ue.get(L).__webglFramebuffer:null;Se.bindFramebuffer(V.FRAMEBUFFER,Qe)}}},this.copyFramebufferToTexture=function(U,K=null,re=0){U.isTexture!==!0&&(console.warn("WebGLRenderer: copyFramebufferToTexture function signature has changed."),K=arguments[0]||null,U=arguments[1]);const ae=Math.pow(2,-re),ee=Math.floor(U.image.width*ae),Ne=Math.floor(U.image.height*ae),We=K!==null?K.x:0,Ke=K!==null?K.y:0;ke.setTexture2D(U,0),V.copyTexSubImage2D(V.TEXTURE_2D,re,0,0,We,Ke,ee,Ne),Se.unbindTexture()},this.copyTextureToTexture=function(U,K,re=null,ae=null,ee=0){U.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture function signature has changed."),ae=arguments[0]||null,U=arguments[1],K=arguments[2],ee=arguments[3]||0,re=null);let Ne,We,Ke,Qe,ct,st;re!==null?(Ne=re.max.x-re.min.x,We=re.max.y-re.min.y,Ke=re.min.x,Qe=re.min.y):(Ne=U.image.width,We=U.image.height,Ke=0,Qe=0),ae!==null?(ct=ae.x,st=ae.y):(ct=0,st=0);const rt=Be.convert(K.format),Lt=Be.convert(K.type);ke.setTexture2D(K,0),V.pixelStorei(V.UNPACK_FLIP_Y_WEBGL,K.flipY),V.pixelStorei(V.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),V.pixelStorei(V.UNPACK_ALIGNMENT,K.unpackAlignment);const nn=V.getParameter(V.UNPACK_ROW_LENGTH),jt=V.getParameter(V.UNPACK_IMAGE_HEIGHT),wn=V.getParameter(V.UNPACK_SKIP_PIXELS),Tt=V.getParameter(V.UNPACK_SKIP_ROWS),Oe=V.getParameter(V.UNPACK_SKIP_IMAGES),yt=U.isCompressedTexture?U.mipmaps[ee]:U.image;V.pixelStorei(V.UNPACK_ROW_LENGTH,yt.width),V.pixelStorei(V.UNPACK_IMAGE_HEIGHT,yt.height),V.pixelStorei(V.UNPACK_SKIP_PIXELS,Ke),V.pixelStorei(V.UNPACK_SKIP_ROWS,Qe),U.isDataTexture?V.texSubImage2D(V.TEXTURE_2D,ee,ct,st,Ne,We,rt,Lt,yt.data):U.isCompressedTexture?V.compressedTexSubImage2D(V.TEXTURE_2D,ee,ct,st,yt.width,yt.height,rt,yt.data):V.texSubImage2D(V.TEXTURE_2D,ee,ct,st,rt,Lt,yt),V.pixelStorei(V.UNPACK_ROW_LENGTH,nn),V.pixelStorei(V.UNPACK_IMAGE_HEIGHT,jt),V.pixelStorei(V.UNPACK_SKIP_PIXELS,wn),V.pixelStorei(V.UNPACK_SKIP_ROWS,Tt),V.pixelStorei(V.UNPACK_SKIP_IMAGES,Oe),ee===0&&K.generateMipmaps&&V.generateMipmap(V.TEXTURE_2D),Se.unbindTexture()},this.copyTextureToTexture3D=function(U,K,re=null,ae=null,ee=0){U.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture3D function signature has changed."),re=arguments[0]||null,ae=arguments[1]||null,U=arguments[2],K=arguments[3],ee=arguments[4]||0);let Ne,We,Ke,Qe,ct,st,rt,Lt,nn;const jt=U.isCompressedTexture?U.mipmaps[ee]:U.image;re!==null?(Ne=re.max.x-re.min.x,We=re.max.y-re.min.y,Ke=re.max.z-re.min.z,Qe=re.min.x,ct=re.min.y,st=re.min.z):(Ne=jt.width,We=jt.height,Ke=jt.depth,Qe=0,ct=0,st=0),ae!==null?(rt=ae.x,Lt=ae.y,nn=ae.z):(rt=0,Lt=0,nn=0);const wn=Be.convert(K.format),Tt=Be.convert(K.type);let Oe;if(K.isData3DTexture)ke.setTexture3D(K,0),Oe=V.TEXTURE_3D;else if(K.isDataArrayTexture||K.isCompressedArrayTexture)ke.setTexture2DArray(K,0),Oe=V.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}V.pixelStorei(V.UNPACK_FLIP_Y_WEBGL,K.flipY),V.pixelStorei(V.UNPACK_PREMULTIPLY_ALPHA_WEBGL,K.premultiplyAlpha),V.pixelStorei(V.UNPACK_ALIGNMENT,K.unpackAlignment);const yt=V.getParameter(V.UNPACK_ROW_LENGTH),Ct=V.getParameter(V.UNPACK_IMAGE_HEIGHT),Xt=V.getParameter(V.UNPACK_SKIP_PIXELS),In=V.getParameter(V.UNPACK_SKIP_ROWS),fi=V.getParameter(V.UNPACK_SKIP_IMAGES);V.pixelStorei(V.UNPACK_ROW_LENGTH,jt.width),V.pixelStorei(V.UNPACK_IMAGE_HEIGHT,jt.height),V.pixelStorei(V.UNPACK_SKIP_PIXELS,Qe),V.pixelStorei(V.UNPACK_SKIP_ROWS,ct),V.pixelStorei(V.UNPACK_SKIP_IMAGES,st),U.isDataTexture||U.isData3DTexture?V.texSubImage3D(Oe,ee,rt,Lt,nn,Ne,We,Ke,wn,Tt,jt.data):K.isCompressedArrayTexture?V.compressedTexSubImage3D(Oe,ee,rt,Lt,nn,Ne,We,Ke,wn,jt.data):V.texSubImage3D(Oe,ee,rt,Lt,nn,Ne,We,Ke,wn,Tt,jt),V.pixelStorei(V.UNPACK_ROW_LENGTH,yt),V.pixelStorei(V.UNPACK_IMAGE_HEIGHT,Ct),V.pixelStorei(V.UNPACK_SKIP_PIXELS,Xt),V.pixelStorei(V.UNPACK_SKIP_ROWS,In),V.pixelStorei(V.UNPACK_SKIP_IMAGES,fi),ee===0&&K.generateMipmaps&&V.generateMipmap(Oe),Se.unbindTexture()},this.initRenderTarget=function(U){Ue.get(U).__webglFramebuffer===void 0&&ke.setupRenderTarget(U)},this.initTexture=function(U){U.isCubeTexture?ke.setTextureCube(U,0):U.isData3DTexture?ke.setTexture3D(U,0):U.isDataArrayTexture||U.isCompressedArrayTexture?ke.setTexture2DArray(U,0):ke.setTexture2D(U,0),Se.unbindTexture()},this.resetState=function(){R=0,C=0,L=null,Se.reset(),W.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return is}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===Gg?"display-p3":"srgb",t.unpackColorSpace=Bt.workingColorSpace===Th?"display-p3":"srgb"}}class Xg{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new je(e),this.density=t}clone(){return new Xg(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Yg{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new je(e),this.near=t,this.far=i}clone(){return new Yg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class sg extends Ut{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 Mi,this.environmentIntensity=1,this.environmentRotation=new Mi,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 qg{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=eh,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Qi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return G1("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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:l,point:ku.clone(),uv:Ki.getInterpolation(ku,Ep,Bu,Tp,xb,Ny,_b,new pe),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 bp(n,e,t,i,r,s){Jl.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Fu.x=s*Jl.x-r*Jl.y,Fu.y=r*Jl.x+s*Jl.y):Fu.copy(Jl),n.copy(e),n.x+=Fu.x,n.y+=Fu.y,n.applyMatrix4(i3)}const Cp=new O,Sb=new O;class s3 extends Ut{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){Cp.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(Cp);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){Cp.setFromMatrixPosition(e.matrixWorld),Sb.setFromMatrixPosition(this.matrixWorld);const i=Cp.distanceTo(Sb)/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=i.length&&i.push({start:-1,count:-1,z:-1});const s=i[this.index];r.push(s),this.index++,s.start=e.start,s.count=e.count,s.z=t}reset(){this.list.length=0,this.index=0}}const Ql="batchId",yo=new at,Oy=new at,r9=new at,s9=new je(1,1,1),Rb=new at,ky=new Ph,Lp=new wi,xa=new ci,Hu=new O,Lb=new O,o9=new O,Fy=new i9,si=new An,Ip=[];function a9(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;s65536?new Uint32Array(s):new Uint16Array(s);t.setIndex(new Ht(a,1))}const o=r>65536?new Uint32Array(i):new Uint16Array(i);t.setAttribute(Ql,new Ht(o,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute(Ql))throw new Error(`BatchedMesh: Geometry cannot use attribute "${Ql}"`);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(i===Ql)continue;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 wi);const e=this._geometryCount,t=this.boundingBox,i=this._active;t.makeEmpty();for(let r=0;r=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const r={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let s=null;const o=this._reservedRanges,a=this._drawRanges,l=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._visibility,p=this._active,m=this._matricesTexture,y=this._matricesTexture.image.data,_=this._colorsTexture;d.push(!0),p.push(!0);const x=this._geometryCount;this._geometryCount++,r9.toArray(y,x*16),m.needsUpdate=!0,_!==null&&(s9.toArray(_.image.data,x*4),_.needsUpdate=!0),o.push(r),a.push({start:h?r.indexStart:r.vertexStart,count:-1}),l.push({boxInitialized:!1,box:new wi,sphereInitialized:!1,sphere:new ci});const g=this.geometry.getAttribute(Ql);for(let S=0;S=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 l=a.vertexStart,f=a.vertexCount;for(const m in i.attributes){if(m===Ql)continue;const y=t.getAttribute(m),_=i.getAttribute(m);a9(y,_,l);const x=y.itemSize;for(let g=y.count,S=f;g=t.length||t[e]===!1?this:(t[e]=!1,this._visibilityChanged=!0,this)}getInstanceCountAt(e){return this._multiDrawInstances===null?null:this._multiDrawInstances[e]}setInstanceCountAt(e,t){return this._multiDrawInstances===null&&(this._multiDrawInstances=new Int32Array(this._maxGeometryCount).fill(1)),this._multiDrawInstances[e]=t,e}getBoundingBoxAt(e,t){if(this._active[e]===!1)return null;const r=this._bounds[e],s=r.box,o=this.geometry;if(r.boxInitialized===!1){s.makeEmpty();const a=o.index,l=o.attributes.position,f=this._drawRanges[e];for(let h=f.start,d=f.start+f.count;h=o||i[e]===!1?this:(t.toArray(s,e*16),r.needsUpdate=!0,this)}getMatrixAt(e,t){const i=this._active,r=this._matricesTexture.image.data,s=this._geometryCount;return e>=s||i[e]===!1?null:t.fromArray(r,e*16)}setColorAt(e,t){this._colorsTexture===null&&this._initColorsTexture();const i=this._active,r=this._colorsTexture,s=this._colorsTexture.image.data,o=this._geometryCount;return e>=o||i[e]===!1?this:(t.toArray(s,e*4),r.needsUpdate=!0,this)}getColorAt(e,t){const i=this._active,r=this._colorsTexture.image.data,s=this._geometryCount;return e>=s||i[e]===!1?null:t.fromArray(r,e*4)}setVisibleAt(e,t){const i=this._visibility,r=this._active,s=this._geometryCount;return e>=s||r[e]===!1||i[e]===t?this:(i[e]=t,this._visibilityChanged=!0,this)}getVisibleAt(e){const t=this._visibility,i=this._active,r=this._geometryCount;return e>=r||i[e]===!1?!1:t[e]}raycast(e,t){const i=this._visibility,r=this._active,s=this._drawRanges,o=this._geometryCount,a=this.matrixWorld,l=this.geometry;si.material=this.material,si.geometry.index=l.index,si.geometry.attributes=l.attributes,si.geometry.boundingBox===null&&(si.geometry.boundingBox=new wi),si.geometry.boundingSphere===null&&(si.geometry.boundingSphere=new ci);for(let f=0;f({...t})),this._reservedRanges=e._reservedRanges.map(t=>({...t})),this._visibility=e._visibility.slice(),this._active=e._active.slice(),this._bounds=e._bounds.map(t=>({boxInitialized:t.boxInitialized,box:t.box.clone(),sphereInitialized:t.sphereInitialized,sphere:t.sphere.clone()})),this._maxGeometryCount=e._maxGeometryCount,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.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=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,l=this._active,f=this._visibility,h=this._multiDrawStarts,d=this._multiDrawCounts,p=this._drawRanges,m=this.perObjectFrustumCulled;m&&(Rb.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),ky.setFromProjectionMatrix(Rb,e.coordinateSystem));let y=0;if(this.sortObjects){Oy.copy(this.matrixWorld).invert(),Hu.setFromMatrixPosition(i.matrixWorld).applyMatrix4(Oy),Lb.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(Oy);for(let g=0,S=f.length;g0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;si)return;By.applyMatrix4(n.matrixWorld);const l=e.ray.origin.distanceTo(By);if(!(le.far))return{distance:l,point:Nb.clone().applyMatrix4(n.matrixWorld),index:r,face:null,faceIndex:null,object:n}}const Db=new O,Ub=new O;class hs extends Xo{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:l,index:e,face:null,object:o})}}class l9 extends tn{constructor(e,t,i,r,s,o,a,l,f){super(e,t,i,r,s,o,a,l,f),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:Pn,this.magFilter=s!==void 0?s:Pn,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 c9 extends tn{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=Wn,this.minFilter=Wn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Zg extends tn{constructor(e,t,i,r,s,o,a,l,f,h,d,p){super(null,o,a,l,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 u9 extends Zg{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=xr,this.layerUpdates=new Set}addLayerUpdates(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class f9 extends Zg{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,Ys),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class h9 extends tn{constructor(e,t,i,r,s,o,a,l,f){super(e,t,i,r,s,o,a,l,f),this.isCanvasTexture=!0,this.needsUpdate=!0}}class Vr{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,l=s-1,f;for(;a<=l;)if(r=Math.floor(a+(l-a)/2),f=i[r]-o,f<0)a=r+1;else if(f>0)l=r-1;else{l=r;break}if(r=l,i[r]===o)return r/(s-1);const h=i[r],p=i[r+1]-h,m=(o-h)/p;return(r+m)/(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),l=t||(o.isVector2?new pe:new O);return l.copy(a).sub(o).normalize(),l}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new O,r=[],s=[],o=[],a=new O,l=new at;for(let m=0;m<=e;m++){const y=m/e;r[m]=this.getTangentAt(y,new O)}s[0]=new O,o[0]=new O;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 m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(vn(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(l.makeRotationAxis(a,y))}o[m].crossVectors(r[m],s[m])}if(t===!0){let m=Math.acos(vn(s[0].dot(s[e]),-1,1));m/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let y=1;y<=e;y++)s[y].applyMatrix4(l.makeRotationAxis(r[y],m*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 Jg extends Vr{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,l=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=l}getPoint(e,t=new pe){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:l===0&&a===s-1&&(a=s-2,l=1);let f,h;this.closed||a>0?f=r[(a-1)%s]:(kp.subVectors(r[0],r[1]).add(r[0]),f=kp);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(Fb(a,l.x,f.x,h.x,d.x),Fb(a,l.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],l=a.getLength(),f=l===0?0:1-o/l;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 Rh extends St{constructor(e=[new pe(0,-.5),new pe(.5,0),new pe(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=vn(r,0,Math.PI*2);const s=[],o=[],a=[],l=[],f=[],h=1/t,d=new O,p=new pe,m=new O,y=new O,_=new O;let x=0,g=0;for(let S=0;S<=e.length-1;S++)switch(S){case 0:x=e[S+1].x-e[S].x,g=e[S+1].y-e[S].y,m.x=g*1,m.y=-x,m.z=g*0,_.copy(m),m.normalize(),l.push(m.x,m.y,m.z);break;case e.length-1:l.push(_.x,_.y,_.z);break;default:x=e[S+1].x-e[S].x,g=e[S+1].y-e[S].y,m.x=g*1,m.y=-x,m.z=g*0,y.copy(m),m.x+=_.x,m.y+=_.y,m.z+=_.z,m.normalize(),l.push(m.x,m.y,m.z),_.copy(y)}for(let S=0;S<=t;S++){const A=i+S*h*r,E=Math.sin(A),R=Math.cos(A);for(let C=0;C<=e.length-1;C++){d.x=e[C].x*E,d.y=e[C].y,d.z=e[C].x*R,o.push(d.x,d.y,d.z),p.x=S/t,p.y=C/(e.length-1),a.push(p.x,p.y);const L=l[3*C+0]*E,I=l[3*C+1],P=l[3*C+0]*R;f.push(L,I,P)}}for(let S=0;S0&&A(!0),t>0&&A(!1)),this.setIndex(h),this.setAttribute("position",new Ze(d,3)),this.setAttribute("normal",new Ze(p,3)),this.setAttribute("uv",new Ze(m,2));function S(){const E=new O,R=new O;let C=0;const L=(t-e)/i;for(let I=0;I<=s;I++){const P=[],b=I/s,D=b*(t-e)+e;for(let j=0;j<=r;j++){const X=j/r,te=X*l+a,ne=Math.sin(te),$=Math.cos(te);R.x=D*ne,R.y=-b*i+x,R.z=D*$,d.push(R.x,R.y,R.z),E.set(ne,L,$).normalize(),p.push(E.x,E.y,E.z),m.push(X,1-b),P.push(y++)}_.push(P)}for(let I=0;I.9&&L<.1&&(A<.2&&(o[S+0]+=1),E<.2&&(o[S+2]+=1),R<.2&&(o[S+4]+=1))}}function p(S){s.push(S.x,S.y,S.z)}function m(S,A){const E=S*3;A.x=e[E+0],A.y=e[E+1],A.z=e[E+2]}function y(){const S=new O,A=new O,E=new O,R=new O,C=new pe,L=new pe,I=new pe;for(let P=0,b=0;P80*t){a=f=n[0],l=h=n[1];for(let y=t;yf&&(f=d),p>h&&(h=p);m=Math.max(f-a,h-l),m=m!==0?32767/m:0}return rh(s,o,t,a,l,m,0),o}};function v3(n,e,t,i,r){let s,o;if(r===O9(n,e,t,i)>0)for(s=e;s=e;s-=i)o=Bb(s,n[s],n[s+1],o);return o&&n0(o,o.next)&&(oh(o),o=o.next),o}function ol(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(n0(t,t.next)||fn(t.prev,t,t.next)===0)){if(oh(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function rh(n,e,t,i,r,s,o){if(!n)return;!o&&s&&R9(n,i,r,s);let a=n,l,f;for(;n.prev!==n.next;){if(l=n.prev,f=n.next,s?A9(n,i,r,s):S9(n)){e.push(l.i/t|0),e.push(n.i/t|0),e.push(f.i/t|0),oh(n),n=f.next,a=f.next;continue}if(n=f,n===a){o?o===1?(n=w9(ol(n),e,t),rh(n,e,t,i,r,s,2)):o===2&&M9(n,e,t,i,r,s):rh(ol(n),e,t,i,r,s,1);break}}}function S9(n){const e=n.prev,t=n,i=n.next;if(fn(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,l=t.y,f=i.y,h=rs?r>o?r:o:s>o?s:o,m=a>l?a>f?a:f:l>f?l:f;let y=i.next;for(;y!==e;){if(y.x>=h&&y.x<=p&&y.y>=d&&y.y<=m&&wc(r,a,s,l,o,f,y.x,y.y)&&fn(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function A9(n,e,t,i){const r=n.prev,s=n,o=n.next;if(fn(r,s,o)>=0)return!1;const a=r.x,l=s.x,f=o.x,h=r.y,d=s.y,p=o.y,m=al?a>f?a:f:l>f?l:f,x=h>d?h>p?h:p:d>p?d:p,g=$_(m,y,e,t,i),S=$_(_,x,e,t,i);let A=n.prevZ,E=n.nextZ;for(;A&&A.z>=g&&E&&E.z<=S;){if(A.x>=m&&A.x<=_&&A.y>=y&&A.y<=x&&A!==r&&A!==o&&wc(a,h,l,d,f,p,A.x,A.y)&&fn(A.prev,A,A.next)>=0||(A=A.prevZ,E.x>=m&&E.x<=_&&E.y>=y&&E.y<=x&&E!==r&&E!==o&&wc(a,h,l,d,f,p,E.x,E.y)&&fn(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;A&&A.z>=g;){if(A.x>=m&&A.x<=_&&A.y>=y&&A.y<=x&&A!==r&&A!==o&&wc(a,h,l,d,f,p,A.x,A.y)&&fn(A.prev,A,A.next)>=0)return!1;A=A.prevZ}for(;E&&E.z<=S;){if(E.x>=m&&E.x<=_&&E.y>=y&&E.y<=x&&E!==r&&E!==o&&wc(a,h,l,d,f,p,E.x,E.y)&&fn(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function w9(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!n0(r,s)&&y3(r,i,i.next,s)&&sh(r,s)&&sh(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),oh(i),oh(i.next),i=n=s),i=i.next}while(i!==n);return ol(i)}function M9(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&N9(o,a)){let l=x3(o,a);o=ol(o,o.next),l=ol(l,l.next),rh(o,e,t,i,r,s,0),rh(l,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function E9(n,e,t,i){const r=[];let s,o,a,l,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>=l&&s!==t.x&&wc(or.x||t.x===r.x&&P9(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function P9(n,e){return fn(n.prev,n,e.prev)<0&&fn(e.next,n,n.next)<0}function R9(n,e,t,i){let r=n;do r.z===0&&(r.z=$_(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,L9(r)}function L9(n){let e,t,i,r,s,o,a,l,f=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||l>0&&i;)a!==0&&(l===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,l--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,f*=2}while(o>1);return n}function $_(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 I9(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 N9(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!D9(n,e)&&(sh(n,e)&&sh(e,n)&&U9(n,e)&&(fn(n.prev,n,e.prev)||fn(n,e.prev,e))||n0(n,e)&&fn(n.prev,n,n.next)>0&&fn(e.prev,e,e.next)>0)}function fn(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function n0(n,e){return n.x===e.x&&n.y===e.y}function y3(n,e,t,i){const r=Hp(fn(n,e,t)),s=Hp(fn(n,e,i)),o=Hp(fn(t,i,n)),a=Hp(fn(t,i,e));return!!(r!==s&&o!==a||r===0&&Vp(n,t,e)||s===0&&Vp(n,i,e)||o===0&&Vp(t,n,i)||a===0&&Vp(t,e,i))}function Vp(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 Hp(n){return n>0?1:n<0?-1:0}function D9(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&&y3(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function sh(n,e){return fn(n.prev,n,n.next)<0?fn(n,e,n.next)>=0&&fn(n,n.prev,e)>=0:fn(n,e,n.prev)<0||fn(n,n.next,e)<0}function U9(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 x3(n,e){const t=new Q_(n.i,n.x,n.y),i=new Q_(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 Bb(n,e,t,i){const r=new Q_(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 oh(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 Q_(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 O9(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function Vb(n,e){for(let t=0;tNumber.EPSILON){const ye=Math.sqrt(se),Ae=Math.sqrt(z*z+N*N),$e=fe.x-lt/ye,Pe=fe.y+ke/ye,Fe=Me.x-N/Ae,pt=Me.y+z/Ae,Ce=((Fe-$e)*N-(pt-Pe)*z)/(ke*N-lt*z);Se=$e+ke*Ce-de.x,Ee=Pe+lt*Ce-de.y;const Je=Se*Se+Ee*Ee;if(Je<=2)return new pe(Se,Ee);Ue=Math.sqrt(Je/2)}else{let ye=!1;ke>Number.EPSILON?z>Number.EPSILON&&(ye=!0):ke<-Number.EPSILON?z<-Number.EPSILON&&(ye=!0):Math.sign(lt)===Math.sign(N)&&(ye=!0),ye?(Se=-lt,Ee=ke,Ue=Math.sqrt(se)):(Se=ke,Ee=lt,Ue=Math.sqrt(se/2))}return new pe(Se/Ue,Ee/Ue)}const q=[];for(let de=0,fe=te.length,Me=fe-1,Se=de+1;de=0;de--){const fe=de/x,Me=m*Math.cos(fe*Math.PI/2),Se=y*Math.sin(fe*Math.PI/2)+_;for(let Ee=0,Ue=te.length;Ee=0;){const Se=Me;let Ee=Me-1;Ee<0&&(Ee=de.length-1);for(let Ue=0,ke=h+x*2;Ue0)&&m.push(A,E,C),(g!==i-1||l0!=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 M3 extends Zn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new je(16777215),this.specular=new je(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Mi,this.combine=Mh,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 E3 extends Zn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new je(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qo,this.normalScale=new pe(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 T3 extends Zn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qo,this.normalScale=new pe(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 b3 extends Zn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Mi,this.combine=Mh,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 C3 extends Zn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new je(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Qo,this.normalScale=new pe(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 P3 extends bi{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 Ha(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 R3(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function L3(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 eS(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 l=0;l!==e;++l)r[o++]=n[a+l]}return r}function cA(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 z9(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let l=0;l=i)){d.push(f.times[m]);for(let _=0;_s.tracks[l].times[0]&&(a=s.tracks[l].times[0]);for(let l=0;l=a.times[y]){const g=y*d+h,S=g+d-h;_=a.values.slice(g,S)}else{const g=a.createInterpolant(),S=h,A=d-h;g.evaluate(s),_=g.resultBuffer.slice(S,A)}l==="quaternion"&&new li().fromArray(_).normalize().conjugate().toArray(_);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 l=i[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),e=!1;break}if(o!==null&&o>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,o),e=!1;break}o=l}if(r!==void 0&&R3(r))for(let a=0,l=r.length;a!==l;++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()===ym,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,l=o*i,f=0;f!==i;++f)t[l+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}}Hr.prototype.TimeBufferType=Float32Array;Hr.prototype.ValueBufferType=Float32Array;Hr.prototype.DefaultInterpolation=rg;class ml extends Hr{constructor(e,t,i){super(e,t,i)}}ml.prototype.ValueTypeName="bool";ml.prototype.ValueBufferType=Array;ml.prototype.DefaultInterpolation=Kf;ml.prototype.InterpolantFactoryMethodLinear=void 0;ml.prototype.InterpolantFactoryMethodSmooth=void 0;class fA extends Hr{}fA.prototype.ValueTypeName="color";class ah extends Hr{}ah.prototype.ValueTypeName="number";class D3 extends Nh{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,l=(i-t)/(r-t);let f=e*a;for(let h=f+a;f!==h;f+=4)li.slerpFlat(s,0,o,f-a,o,f,l);return s}}class Dh extends Hr{InterpolantFactoryMethodLinear(e){return new D3(this.times,this.values,this.getValueSize(),e)}}Dh.prototype.ValueTypeName="quaternion";Dh.prototype.InterpolantFactoryMethodSmooth=void 0;class gl extends Hr{constructor(e,t,i){super(e,t,i)}}gl.prototype.ValueTypeName="string";gl.prototype.ValueBufferType=Array;gl.prototype.DefaultInterpolation=Kf;gl.prototype.InterpolantFactoryMethodLinear=void 0;gl.prototype.InterpolantFactoryMethodSmooth=void 0;class lh extends Hr{}lh.prototype.ValueTypeName="vector";class ch{constructor(e="",t=-1,i=[],r=Hg){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Qi(),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(W9(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(Hr.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,m,y,_){if(m.length!==0){const x=[],g=[];cA(m,x,g,y),x.length!==0&&_.push(new d(p,x,g))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let l=e.length||-1;const f=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(Es[e]!==void 0){Es[e].push({onLoad:t,onProgress:i,onError:r});return}Es[e]=[],Es[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,l=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=Es[e],d=f.body.getReader(),p=f.headers.get("X-File-Size")||f.headers.get("Content-Length"),m=p?parseInt(p):0,y=m!==0;let _=0;const x=new ReadableStream({start(g){S();function S(){d.read().then(({done:A,value:E})=>{if(A)g.close();else{_+=E.byteLength;const R=new ProgressEvent("progress",{lengthComputable:y,loaded:_,total:m});for(let C=0,L=h.length;C{g.error(A)})}}});return new Response(x)}else throw new j9(`fetch for "${f.url}" responded with ${f.status}: ${f.statusText}`,f)}).then(f=>{switch(l){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,m=new TextDecoder(p);return f.arrayBuffer().then(y=>m.decode(y))}}}).then(f=>{Us.add(e,f);const h=Es[e];delete Es[e];for(let d=0,p=h.length;d{const h=Es[e];if(h===void 0)throw this.manager.itemError(e),f;delete Es[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 X9 extends Bi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new qs(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(l){r?r(l):console.error(l),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 je().setHex(o.value);break;case"v2":r.uniforms[s].value=new pe().fromArray(o.value);break;case"v3":r.uniforms[s].value=new O().fromArray(o.value);break;case"v4":r.uniforms[s].value=new zt().fromArray(o.value);break;case"m3":r.uniforms[s].value=new xt().fromArray(o.value);break;case"m4":r.uniforms[s].value=new at().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 pe().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 pe().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}static createMaterialFromType(e){const t={ShadowMaterial:S3,SpriteMaterial:Q1,RawShaderMaterial:A3,ShaderMaterial:zr,PointsMaterial:tA,MeshPhysicalMaterial:w3,MeshStandardMaterial:lA,MeshPhongMaterial:M3,MeshToonMaterial:E3,MeshNormalMaterial:T3,MeshLambertMaterial:b3,MeshDepthMaterial:J1,MeshDistanceMaterial:$1,MeshBasicMaterial:ea,MeshMatcapMaterial:C3,LineDashedMaterial:P3,LineBasicMaterial:bi,Material:Zn};return new t[e]}}class tS{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 l=new hA(t);s=new uh(l),s.setCrossOrigin(this.crossOrigin);for(let f=0,h=e.length;f0){r=new uh(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{const x=new wi;x.min.fromArray(_.boxMin),x.max.fromArray(_.boxMax);const g=new ci;return g.radius=_.sphereRadius,g.center.fromArray(_.sphereCenter),{boxInitialized:_.boxInitialized,box:x,sphereInitialized:_.sphereInitialized,sphere:g}}),o._maxGeometryCount=e.maxGeometryCount,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 s3;break;case"Line":o=new Xo(a(e.geometry),l(e.material));break;case"LineLoop":o=new c3(a(e.geometry),l(e.material));break;case"LineSegments":o=new hs(a(e.geometry),l(e.material));break;case"PointCloud":case"Points":o=new u3(a(e.geometry),l(e.material));break;case"Sprite":o=new r3(l(e.material));break;case"Group":o=new Ac;break;case"Bone":o=new eA;break;default:o=new Ut}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.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 m=0;m"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=Us.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 l=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 Us.add(e,f),t&&t(f),s.manager.itemEnd(e),f}).catch(function(f){r&&r(f),Us.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Us.add(e,l),s.manager.itemStart(e)}}let Gp;class pA{static getContext(){return Gp===void 0&&(Gp=new(window.AudioContext||window.webkitAudioContext)),Gp}static setContext(e){Gp=e}}class n7 extends Bi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new qs(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(l){try{const f=l.slice(0);pA.getContext().decodeAudioData(f,function(d){t(d)}).catch(a)}catch(f){a(f)}},i,r);function a(l){r?r(l):console.error(l),s.manager.itemError(e)}}}const Kb=new at,Zb=new at,_a=new at;class i7{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new an,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new an,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,_a.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(qa*t.fov*.5)/t.zoom;let a,l;Zb.elements[12]=-r,Kb.elements[12]=r,a=-o*t.aspect+s,l=o*t.aspect+s,_a.elements[0]=2*t.near/(l-a),_a.elements[8]=(l+a)/(l-a),this.cameraL.projectionMatrix.copy(_a),a=-o*t.aspect-s,l=o*t.aspect-s,_a.elements[0]=2*t.near/(l-a),_a.elements[8]=(l+a)/(l-a),this.cameraR.projectionMatrix.copy(_a)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(Zb),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(Kb)}}class mA{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=Jb(),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=Jb();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function Jb(){return(typeof performance>"u"?Date:performance).now()}const Sa=new O,$b=new li,r7=new O,Aa=new O;class s7 extends Ut{constructor(){super(),this.type="AudioListener",this.context=pA.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new mA}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(Sa,$b,r7),Aa.set(0,0,-1).applyQuaternion($b),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Sa.x,r),t.positionY.linearRampToValueAtTime(Sa.y,r),t.positionZ.linearRampToValueAtTime(Sa.z,r),t.forwardX.linearRampToValueAtTime(Aa.x,r),t.forwardY.linearRampToValueAtTime(Aa.y,r),t.forwardZ.linearRampToValueAtTime(Aa.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(Sa.x,Sa.y,Sa.z),t.setOrientation(Aa.x,Aa.y,Aa.z,i.x,i.y,i.z)}}class j3 extends Ut{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(){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.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 l=t,f=t+t;l!==f;++l)if(i[l]!==i[l+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){li.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;li.multiplyQuaternionsFlat(e,o,e,t,e,i),li.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 l=t+a;e[l]=e[l]*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 gA="\\[\\]\\.:\\/",c7=new RegExp("["+gA+"]","g"),vA="[^"+gA+"]",u7="[^"+gA.replace("\\.","")+"]",f7=/((?:WC+[\/:])*)/.source.replace("WC",vA),h7=/(WCOD+)?/.source.replace("WCOD",u7),d7=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",vA),p7=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",vA),m7=new RegExp("^"+f7+h7+d7+p7+"$"),g7=["material","materials","bones","map"];class v7{constructor(e,t,i){const r=i||Nt.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 Nt{constructor(e,t,i){this.path=t,this.parsedPath=i||Nt.parseTrackName(t),this.node=Nt.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 Nt.Composite(e,t,i):new Nt(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(c7,"")}static parseTrackName(e){const t=m7.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);g7.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]=l;for(let m=0,y=r;m!==y;++m){const _=i[m],x=_[d],g=_[h];_[h]=x,_[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,l=arguments.length;a!==l;++a){const f=arguments[a],h=f.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[m.uuid]=d),e[d]=m,e.pop();for(let y=0,_=r;y!==_;++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,l=this._objects,f=l.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,m=l.length;p!==m;++p){const y=l[p];d[p]=new Nt(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,l=o[a],f=e[a];t[f]=i,o[i]=l,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class Y3{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),l={endingStart:Ba,endingEnd:Ba};for(let f=0;f!==o;++f){const h=s[f].createInterpolant(null);a[f]=h,h.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=CI,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 l=a.parameterPositions,f=a.sampleValues;return l[0]=s,l[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 l=(e-s)*i;l<0||i===0?t=0:(this._startTime=null,t=i*l)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const l=this._interpolants,f=this._propertyBindings;switch(this.blendMode){case z1:for(let h=0,d=l.length;h!==d;++h)l[h].evaluate(o),f[h].accumulateAdditive(a);break;case Hg:default:for(let h=0,d=l.length;h!==d;++h)l[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===PI;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===bI){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 l=this.repetitions-s;if(l<=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(l===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=za,r.endingEnd=za):(e?r.endingStart=this.zeroSlopeAtStart?za:Ba:r.endingStart=Zf,t?r.endingEnd=this.zeroSlopeAtEnd?za:Ba:r.endingEnd=Zf)}_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,l=o.sampleValues;return a[0]=s,l[0]=t,a[1]=s+e,l[1]=i,this}}const x7=new Float32Array(1);class _7 extends fs{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,l=i.uuid,f=this._bindingsByRootAndName;let h=f[l];h===void 0&&(h={},f[l]=h);for(let d=0;d!==s;++d){const p=r[d],m=p.name;let y=h[m];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,l,m));continue}const _=t&&t._propertyBindings[d].binding.parsedPath;y=new X3(Nt.create(i,m,_),p.ValueTypeName,p.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,l,m),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,l=this._nActiveBindings;for(let f=0;f!==l;++f)a[f].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.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.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,nC).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 iC=new O,Wp=new O;class b7{constructor(e=new O,t=new O){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){iC.subVectors(e,this.start),Wp.subVectors(this.end,this.start);const i=Wp.dot(Wp);let s=Wp.dot(iC)/i;return t&&(s=vn(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 rC=new O;class C7 extends Ut{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new St,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,l=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{cC.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(cC,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 V7 extends hs{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 St;r.setAttribute("position",new Ze(t,3)),r.setAttribute("color",new Ze(i,3));const s=new bi({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new je,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 H7{constructor(){this.type="ShapePath",this.color=new je,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new ih,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 S=[];for(let A=0,E=g.length;ANumber.EPSILON){if(b<0&&(L=S[C],P=-P,I=S[R],b=-b),g.yI.y)continue;if(g.y===L.y){if(g.x===L.x)return!0}else{const D=b*(g.x-L.x)-P*(g.y-L.y);if(D===0)return!0;if(D<0)continue;E=!E}}else{if(g.y!==L.y)continue;if(I.x<=g.x&&g.x<=L.x||L.x<=g.x&&g.x<=I.x)return!0}}return E}const r=cs.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,l;const f=[];if(s.length===1)return a=s[0],l=new Za,l.curves=a.curves,f.push(l),f;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let m=[],y=0,_;p[y]=void 0,m[y]=[];for(let g=0,S=s.length;g1){let g=!1,S=0;for(let A=0,E=p.length;A0&&g===!1&&(m=d)}let x;for(let g=0,S=p.length;g=0&&(E[Me]=null,A[Me].disconnect(Te))}for(let ve=0;ve=E.length){E.push(Te),Me=it;break}else if(E[it]===null){E[it]=Te,Me=it;break}if(Me===-1)break}const nt=A[Me];nt&&nt.connect(Te)}}const Q=new O,le=new O;function k(oe,ve,Te){Q.setFromMatrixPosition(ve.matrixWorld),le.setFromMatrixPosition(Te.matrixWorld);const Me=Q.distanceTo(le),nt=ve.projectionMatrix.elements,it=Te.projectionMatrix.elements,Xe=nt[14]/(nt[10]-1),z=nt[14]/(nt[10]+1),de=(nt[9]+1)/nt[5],fe=(nt[9]-1)/nt[5],we=(nt[8]-1)/nt[0],Se=(it[8]+1)/it[0],Ee=Xe*we,Ue=Xe*Se,ke=Me/(-we+Se),lt=ke*-we;ve.matrixWorld.decompose(oe.position,oe.quaternion,oe.scale),oe.translateX(lt),oe.translateZ(ke),oe.matrixWorld.compose(oe.position,oe.quaternion,oe.scale),oe.matrixWorldInverse.copy(oe.matrixWorld).invert();const B=Xe+ke,D=z+ke,se=Ee-lt,xe=Ue+(Me-lt),ye=de*z/D*B,Ae=fe*z/D*B;oe.projectionMatrix.makePerspective(se,xe,ye,Ae,B,D),oe.projectionMatrixInverse.copy(oe.projectionMatrix).invert()}function q(oe,ve){ve===null?oe.matrixWorld.copy(oe.matrix):oe.matrixWorld.multiplyMatrices(ve.matrixWorld,oe.matrix),oe.matrixWorldInverse.copy(oe.matrixWorld).invert()}this.updateCamera=function(oe){if(r===null)return;_.texture!==null&&(oe.near=_.depthNear,oe.far=_.depthFar),b.near=I.near=L.near=oe.near,b.far=I.far=L.far=oe.far,(N!==b.near||j!==b.far)&&(r.updateRenderState({depthNear:b.near,depthFar:b.far}),N=b.near,j=b.far,L.near=N,L.far=j,I.near=N,I.far=j,L.updateProjectionMatrix(),I.updateProjectionMatrix(),oe.updateProjectionMatrix());const ve=oe.parent,Te=b.cameras;q(b,ve);for(let Me=0;Me0&&(x.alphaTest.value=g.alphaTest);const S=e.get(g),A=S.envMap,E=S.envMapRotation;A&&(x.envMap.value=A,ha.copy(E),ha.x*=-1,ha.y*=-1,ha.z*=-1,A.isCubeTexture&&A.isRenderTargetTexture===!1&&(ha.y*=-1,ha.z*=-1),x.envMapRotation.value.setFromMatrix4(k6.makeRotationFromEuler(ha)),x.flipEnvMap.value=A.isCubeTexture&&A.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 c(x,g,S,A){x.diffuse.value.copy(g.color),x.opacity.value=g.opacity,x.size.value=g.size*S,x.scale.value=A*.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 m(x,g,S){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===Si&&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=S.texture,x.transmissionSamplerSize.value.set(S.width,S.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 _(x,g){const S=e.get(g).light;x.referencePosition.value.setFromMatrixPosition(S.matrixWorld),x.nearDistance.value=S.shadow.camera.near,x.farDistance.value=S.shadow.camera.far}return{refreshFogUniforms:i,refreshMaterialUniforms:r}}function B6(n,e,t,i){let r={},s={},o=[];const a=n.getParameter(n.MAX_UNIFORM_BUFFER_BINDINGS);function c(S,A){const E=A.program;i.uniformBlockBinding(S,E)}function f(S,A){let E=r[S.id];E===void 0&&(y(S),E=h(S),r[S.id]=E,S.addEventListener("dispose",x));const R=A.program;i.updateUBOMapping(S,R);const C=e.render.frame;s[S.id]!==C&&(p(S),s[S.id]=C)}function h(S){const A=d();S.__bindingPointIndex=A;const E=n.createBuffer(),R=S.__size,C=S.usage;return n.bindBuffer(n.UNIFORM_BUFFER,E),n.bufferData(n.UNIFORM_BUFFER,R,C),n.bindBuffer(n.UNIFORM_BUFFER,null),n.bindBufferBase(n.UNIFORM_BUFFER,A,E),E}function d(){for(let S=0;S0&&(E+=R-C),S.__size=E,S.__cache={},this}function _(S){const A={boundary:0,storage:0};return typeof S=="number"||typeof S=="boolean"?(A.boundary=4,A.storage=4):S.isVector2?(A.boundary=8,A.storage=8):S.isVector3||S.isColor?(A.boundary=16,A.storage=12):S.isVector4?(A.boundary=16,A.storage=16):S.isMatrix3?(A.boundary=48,A.storage=48):S.isMatrix4?(A.boundary=64,A.storage=64):S.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",S),A}function x(S){const A=S.target;A.removeEventListener("dispose",x);const E=o.indexOf(A.__bindingPointIndex);o.splice(E,1),n.deleteBuffer(r[A.id]),delete r[A.id],delete s[A.id]}function g(){for(const S in r)n.deleteBuffer(r[S]);o=[],r={},s={}}return{bind:c,update:f,dispose:g}}class dI{constructor(e={}){const{canvas:t=$L(),context:i=null,depth:r=!0,stencil:s=!1,alpha:o=!1,antialias:a=!1,premultipliedAlpha:c=!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 m=new Uint32Array(4),y=new Int32Array(4);let _=null,x=null;const g=[],S=[];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=pr,this.toneMapping=os,this.toneMappingExposure=1;const A=this;let E=!1,R=0,C=0,L=null,I=-1,P=null;const b=new zt,N=new zt;let j=null;const X=new je(0);let te=0,ne=t.width,Q=t.height,le=1,k=null,q=null;const J=new zt(0,0,ne,Q),$=new zt(0,0,ne,Q);let _e=!1;const Ne=new gh;let oe=!1,ve=!1;const Te=new at,Me=new O,nt={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};let it=!1;function Xe(){return L===null?le:1}let z=i;function de(U,Z){return t.getContext(U,Z)}try{const U={alpha:!0,depth:r,stencil:s,antialias:a,premultipliedAlpha:c,preserveDrawingBuffer:f,powerPreference:h,failIfMajorPerformanceCaveat:d};if("setAttribute"in t&&t.setAttribute("data-engine",`three.js r${Mg}`),t.addEventListener("webglcontextlost",Re,!1),t.addEventListener("webglcontextrestored",he,!1),t.addEventListener("webglcontextcreationerror",ge,!1),z===null){const Z="webgl2";if(z=de(Z,U),z===null)throw de(Z)?new Error("Error creating WebGL context with your selected attributes."):new Error("Error creating WebGL context.")}}catch(U){throw console.error("THREE.WebGLRenderer: "+U.message),U}let fe,we,Se,Ee,Ue,ke,lt,B,D,se,xe,ye,Ae,Qe,Pe,Fe,pt,Ce,Je,Mt,ut,Be,H,me;function Ge(){fe=new QG(z),fe.init(),Be=new fI(z,fe),we=new XG(z,fe,e,Be),Se=new R6(z),Ee=new tW(z),Ue=new y6,ke=new L6(z,fe,Se,Ue,we,Be,Ee),lt=new qG(A),B=new JG(A),D=new l5(z),H=new WG(z,D),se=new $G(z,D,Ee,H),xe=new iW(z,se,D,Ee),Je=new nW(z,we,ke),Fe=new YG(Ue),ye=new v6(A,lt,B,fe,we,H,Fe),Ae=new F6(A,Ue),Qe=new _6,Pe=new T6(fe),Ce=new GG(A,lt,B,Se,xe,p,c),pt=new P6(A,xe,we),me=new B6(z,Ee,we,Se),Mt=new jG(z,fe,Ee),ut=new eW(z,fe,Ee),Ee.programs=ye.programs,A.capabilities=we,A.extensions=fe,A.properties=Ue,A.renderLists=Qe,A.shadowMap=pt,A.state=Se,A.info=Ee}Ge();const V=new O6(A,z);this.xr=V,this.getContext=function(){return z},this.getContextAttributes=function(){return z.getContextAttributes()},this.forceContextLoss=function(){const U=fe.get("WEBGL_lose_context");U&&U.loseContext()},this.forceContextRestore=function(){const U=fe.get("WEBGL_lose_context");U&&U.restoreContext()},this.getPixelRatio=function(){return le},this.setPixelRatio=function(U){U!==void 0&&(le=U,this.setSize(ne,Q,!1))},this.getSize=function(U){return U.set(ne,Q)},this.setSize=function(U,Z,re=!0){if(V.isPresenting){console.warn("THREE.WebGLRenderer: Can't change size while VR device is presenting.");return}ne=U,Q=Z,t.width=Math.floor(U*le),t.height=Math.floor(Z*le),re===!0&&(t.style.width=U+"px",t.style.height=Z+"px"),this.setViewport(0,0,U,Z)},this.getDrawingBufferSize=function(U){return U.set(ne*le,Q*le).floor()},this.setDrawingBufferSize=function(U,Z,re){ne=U,Q=Z,le=re,t.width=Math.floor(U*re),t.height=Math.floor(Z*re),this.setViewport(0,0,U,Z)},this.getCurrentViewport=function(U){return U.copy(b)},this.getViewport=function(U){return U.copy(J)},this.setViewport=function(U,Z,re,ae){U.isVector4?J.set(U.x,U.y,U.z,U.w):J.set(U,Z,re,ae),Se.viewport(b.copy(J).multiplyScalar(le).round())},this.getScissor=function(U){return U.copy($)},this.setScissor=function(U,Z,re,ae){U.isVector4?$.set(U.x,U.y,U.z,U.w):$.set(U,Z,re,ae),Se.scissor(N.copy($).multiplyScalar(le).round())},this.getScissorTest=function(){return _e},this.setScissorTest=function(U){Se.setScissorTest(_e=U)},this.setOpaqueSort=function(U){k=U},this.setTransparentSort=function(U){q=U},this.getClearColor=function(U){return U.copy(Ce.getClearColor())},this.setClearColor=function(){Ce.setClearColor.apply(Ce,arguments)},this.getClearAlpha=function(){return Ce.getClearAlpha()},this.setClearAlpha=function(){Ce.setClearAlpha.apply(Ce,arguments)},this.clear=function(U=!0,Z=!0,re=!0){let ae=0;if(U){let ee=!1;if(L!==null){const De=L.texture.format;ee=De===g1||De===m1||De===p1}if(ee){const De=L.texture.type,We=De===ls||De===Ka||De===Ff||De===Ja||De===f1||De===h1,Ze=Ce.getClearColor(),$e=Ce.getClearAlpha(),ct=Ze.r,st=Ze.g,rt=Ze.b;We?(m[0]=ct,m[1]=st,m[2]=rt,m[3]=$e,z.clearBufferuiv(z.COLOR,0,m)):(y[0]=ct,y[1]=st,y[2]=rt,y[3]=$e,z.clearBufferiv(z.COLOR,0,y))}else ae|=z.COLOR_BUFFER_BIT}Z&&(ae|=z.DEPTH_BUFFER_BIT),re&&(ae|=z.STENCIL_BUFFER_BIT,this.state.buffers.stencil.setMask(4294967295)),z.clear(ae)},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",Re,!1),t.removeEventListener("webglcontextrestored",he,!1),t.removeEventListener("webglcontextcreationerror",ge,!1),Qe.dispose(),Pe.dispose(),Ue.dispose(),lt.dispose(),B.dispose(),xe.dispose(),H.dispose(),me.dispose(),ye.dispose(),V.dispose(),V.removeEventListener("sessionstart",Rn),V.removeEventListener("sessionend",kn),fs.stop()};function Re(U){U.preventDefault(),console.log("THREE.WebGLRenderer: Context Lost."),E=!0}function he(){console.log("THREE.WebGLRenderer: Context Restored."),E=!1;const U=Ee.autoReset,Z=pt.enabled,re=pt.autoUpdate,ae=pt.needsUpdate,ee=pt.type;Ge(),Ee.autoReset=U,pt.enabled=Z,pt.autoUpdate=re,pt.needsUpdate=ae,pt.type=ee}function ge(U){console.error("THREE.WebGLRenderer: A WebGL context could not be created. Reason: ",U.statusMessage)}function Ie(U){const Z=U.target;Z.removeEventListener("dispose",Ie),ft(Z)}function ft(U){mt(U),Ue.remove(U)}function mt(U){const Z=Ue.get(U).programs;Z!==void 0&&(Z.forEach(function(re){ye.releaseProgram(re)}),U.isShaderMaterial&&ye.releaseShaderCache(U))}this.renderBufferDirect=function(U,Z,re,ae,ee,De){Z===null&&(Z=nt);const We=ee.isMesh&&ee.matrixWorld.determinant()<0,Ze=Jg(U,Z,re,ae,ee);Se.setMaterial(ae,We);let $e=re.index,ct=1;if(ae.wireframe===!0){if($e=se.getWireframeAttribute(re),$e===void 0)return;ct=2}const st=re.drawRange,rt=re.attributes.position;let Lt=st.start*ct,en=(st.start+st.count)*ct;De!==null&&(Lt=Math.max(Lt,De.start*ct),en=Math.min(en,(De.start+De.count)*ct)),$e!==null?(Lt=Math.max(Lt,0),en=Math.min(en,$e.count)):rt!=null&&(Lt=Math.max(Lt,0),en=Math.min(en,rt.count));const jt=en-Lt;if(jt<0||jt===1/0)return;H.setup(ee,ae,Ze,re,$e);let Mn,Tt=Mt;if($e!==null&&(Mn=D.get($e),Tt=ut,Tt.setIndex(Mn)),ee.isMesh)ae.wireframe===!0?(Se.setLineWidth(ae.wireframeLinewidth*Xe()),Tt.setMode(z.LINES)):Tt.setMode(z.TRIANGLES);else if(ee.isLine){let Oe=ae.linewidth;Oe===void 0&&(Oe=1),Se.setLineWidth(Oe*Xe()),ee.isLineSegments?Tt.setMode(z.LINES):ee.isLineLoop?Tt.setMode(z.LINE_LOOP):Tt.setMode(z.LINE_STRIP)}else ee.isPoints?Tt.setMode(z.POINTS):ee.isSprite&&Tt.setMode(z.TRIANGLES);if(ee.isBatchedMesh)ee._multiDrawInstances!==null?Tt.renderMultiDrawInstances(ee._multiDrawStarts,ee._multiDrawCounts,ee._multiDrawCount,ee._multiDrawInstances):Tt.renderMultiDraw(ee._multiDrawStarts,ee._multiDrawCounts,ee._multiDrawCount);else if(ee.isInstancedMesh)Tt.renderInstances(Lt,jt,ee.count);else if(re.isInstancedBufferGeometry){const Oe=re._maxInstanceCount!==void 0?re._maxInstanceCount:1/0,yt=Math.min(re.instanceCount,Oe);Tt.renderInstances(Lt,jt,yt)}else Tt.render(Lt,jt)};function Rt(U,Z,re){U.transparent===!0&&U.side===Dr&&U.forceSinglePass===!1?(U.side=Si,U.needsUpdate=!0,Hr(U,Z,re),U.side=Ws,U.needsUpdate=!0,Hr(U,Z,re),U.side=Dr):Hr(U,Z,re)}this.compile=function(U,Z,re=null){re===null&&(re=U),x=Pe.get(re),x.init(Z),S.push(x),re.traverseVisible(function(ee){ee.isLight&&ee.layers.test(Z.layers)&&(x.pushLight(ee),ee.castShadow&&x.pushShadow(ee))}),U!==re&&U.traverseVisible(function(ee){ee.isLight&&ee.layers.test(Z.layers)&&(x.pushLight(ee),ee.castShadow&&x.pushShadow(ee))}),x.setupLights();const ae=new Set;return U.traverse(function(ee){const De=ee.material;if(De)if(Array.isArray(De))for(let We=0;We{function De(){if(ae.forEach(function(We){Ue.get(We).currentProgram.isReady()&&ae.delete(We)}),ae.size===0){ee(U);return}setTimeout(De,10)}fe.get("KHR_parallel_shader_compile")!==null?De():setTimeout(De,10)})};let Wt=null;function bt(U){Wt&&Wt(U)}function Rn(){fs.stop()}function kn(){fs.start()}const fs=new sI;fs.setAnimationLoop(bt),typeof self<"u"&&fs.setContext(self),this.setAnimationLoop=function(U){Wt=U,V.setAnimationLoop(U),U===null?fs.stop():fs.start()},V.addEventListener("sessionstart",Rn),V.addEventListener("sessionend",kn),this.render=function(U,Z){if(Z!==void 0&&Z.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(E===!0)return;if(U.matrixWorldAutoUpdate===!0&&U.updateMatrixWorld(),Z.parent===null&&Z.matrixWorldAutoUpdate===!0&&Z.updateMatrixWorld(),V.enabled===!0&&V.isPresenting===!0&&(V.cameraAutoUpdate===!0&&V.updateCamera(Z),Z=V.getCamera()),U.isScene===!0&&U.onBeforeRender(A,U,Z,L),x=Pe.get(U,S.length),x.init(Z),S.push(x),Te.multiplyMatrices(Z.projectionMatrix,Z.matrixWorldInverse),Ne.setFromProjectionMatrix(Te),ve=this.localClippingEnabled,oe=Fe.init(this.clippingPlanes,ve),_=Qe.get(U,g.length),_.init(),g.push(_),V.enabled===!0&&V.isPresenting===!0){const De=A.xr.getDepthSensingMesh();De!==null&&Xc(De,Z,-1/0,A.sortObjects)}Xc(U,Z,0,A.sortObjects),_.finish(),A.sortObjects===!0&&_.sort(k,q),it=V.enabled===!1||V.isPresenting===!1||V.hasDepthSensing()===!1,it&&Ce.addToRenderList(_,U),this.info.render.frame++,oe===!0&&Fe.beginShadows();const re=x.state.shadowsArray;pt.render(re,U,Z),oe===!0&&Fe.endShadows(),this.info.autoReset===!0&&this.info.reset();const ae=_.opaque,ee=_.transmissive;if(x.setupLights(),Z.isArrayCamera){const De=Z.cameras;if(ee.length>0)for(let We=0,Ze=De.length;We0&&Yc(ae,ee,U,Z),it&&Ce.render(U),Eh(_,U,Z);L!==null&&(ke.updateMultisampleRenderTarget(L),ke.updateRenderTargetMipmap(L)),U.isScene===!0&&U.onAfterRender(A,U,Z),H.resetDefaultState(),I=-1,P=null,S.pop(),S.length>0?(x=S[S.length-1],oe===!0&&Fe.setGlobalState(A.clippingPlanes,x.state.camera)):x=null,g.pop(),g.length>0?_=g[g.length-1]:_=null};function Xc(U,Z,re,ae){if(U.visible===!1)return;if(U.layers.test(Z.layers)){if(U.isGroup)re=U.renderOrder;else if(U.isLOD)U.autoUpdate===!0&&U.update(Z);else if(U.isLight)x.pushLight(U),U.castShadow&&x.pushShadow(U);else if(U.isSprite){if(!U.frustumCulled||Ne.intersectsSprite(U)){ae&&Me.setFromMatrixPosition(U.matrixWorld).applyMatrix4(Te);const We=xe.update(U),Ze=U.material;Ze.visible&&_.push(U,We,Ze,re,Me.z,null)}}else if((U.isMesh||U.isLine||U.isPoints)&&(!U.frustumCulled||Ne.intersectsObject(U))){const We=xe.update(U),Ze=U.material;if(ae&&(U.boundingSphere!==void 0?(U.boundingSphere===null&&U.computeBoundingSphere(),Me.copy(U.boundingSphere.center)):(We.boundingSphere===null&&We.computeBoundingSphere(),Me.copy(We.boundingSphere.center)),Me.applyMatrix4(U.matrixWorld).applyMatrix4(Te)),Array.isArray(Ze)){const $e=We.groups;for(let ct=0,st=$e.length;ct0&&Zs(ee,Z,re),De.length>0&&Zs(De,Z,re),We.length>0&&Zs(We,Z,re),Se.buffers.depth.setTest(!0),Se.buffers.depth.setMask(!0),Se.buffers.color.setMask(!0),Se.setPolygonOffset(!1)}function Yc(U,Z,re,ae){if((re.isScene===!0?re.overrideMaterial:null)!==null)return;x.state.transmissionRenderTarget[ae.id]===void 0&&(x.state.transmissionRenderTarget[ae.id]=new Fr(1,1,{generateMipmaps:!0,type:fe.has("EXT_color_buffer_half_float")||fe.has("EXT_color_buffer_float")?hh:ls,minFilter:ts,samples:4,stencilBuffer:s,resolveDepthBuffer:!1,resolveStencilBuffer:!1,colorSpace:Bt.workingColorSpace}));const De=x.state.transmissionRenderTarget[ae.id],We=ae.viewport||b;De.setSize(We.z,We.w);const Ze=A.getRenderTarget();A.setRenderTarget(De),A.getClearColor(X),te=A.getClearAlpha(),te<1&&A.setClearColor(16777215,.5),it?Ce.render(re):A.clear();const $e=A.toneMapping;A.toneMapping=os;const ct=ae.viewport;if(ae.viewport!==void 0&&(ae.viewport=void 0),x.setupLightsView(ae),oe===!0&&Fe.setGlobalState(A.clippingPlanes,ae),Zs(U,re,ae),ke.updateMultisampleRenderTarget(De),ke.updateRenderTargetMipmap(De),fe.has("WEBGL_multisampled_render_to_texture")===!1){let st=!1;for(let rt=0,Lt=Z.length;rt0),rt=!!re.morphAttributes.position,Lt=!!re.morphAttributes.normal,en=!!re.morphAttributes.color;let jt=os;ae.toneMapped&&(L===null||L.isXRRenderTarget===!0)&&(jt=A.toneMapping);const Mn=re.morphAttributes.position||re.morphAttributes.normal||re.morphAttributes.color,Tt=Mn!==void 0?Mn.length:0,Oe=Ue.get(ae),yt=x.state.lights;if(oe===!0&&(ve===!0||U!==P)){const fi=U===P&&ae.id===I;Fe.setState(ae,U,fi)}let Ct=!1;ae.version===Oe.__version?(Oe.needsLights&&Oe.lightsStateVersion!==yt.state.version||Oe.outputColorSpace!==Ze||ee.isBatchedMesh&&Oe.batching===!1||!ee.isBatchedMesh&&Oe.batching===!0||ee.isBatchedMesh&&Oe.batchingColor===!0&&ee.colorTexture===null||ee.isBatchedMesh&&Oe.batchingColor===!1&&ee.colorTexture!==null||ee.isInstancedMesh&&Oe.instancing===!1||!ee.isInstancedMesh&&Oe.instancing===!0||ee.isSkinnedMesh&&Oe.skinning===!1||!ee.isSkinnedMesh&&Oe.skinning===!0||ee.isInstancedMesh&&Oe.instancingColor===!0&&ee.instanceColor===null||ee.isInstancedMesh&&Oe.instancingColor===!1&&ee.instanceColor!==null||ee.isInstancedMesh&&Oe.instancingMorph===!0&&ee.morphTexture===null||ee.isInstancedMesh&&Oe.instancingMorph===!1&&ee.morphTexture!==null||Oe.envMap!==$e||ae.fog===!0&&Oe.fog!==De||Oe.numClippingPlanes!==void 0&&(Oe.numClippingPlanes!==Fe.numPlanes||Oe.numIntersection!==Fe.numIntersection)||Oe.vertexAlphas!==ct||Oe.vertexTangents!==st||Oe.morphTargets!==rt||Oe.morphNormals!==Lt||Oe.morphColors!==en||Oe.toneMapping!==jt||Oe.morphTargetsCount!==Tt)&&(Ct=!0):(Ct=!0,Oe.__version=ae.version);let Xt=Oe.currentProgram;Ct===!0&&(Xt=Hr(ae,Z,ee));let Ln=!1,ui=!1,Gr=!1;const It=Xt.getUniforms(),Bi=Oe.uniforms;if(Se.useProgram(Xt.program)&&(Ln=!0,ui=!0,Gr=!0),ae.id!==I&&(I=ae.id,ui=!0),Ln||P!==U){It.setValue(z,"projectionMatrix",U.projectionMatrix),It.setValue(z,"viewMatrix",U.matrixWorldInverse);const fi=It.map.cameraPosition;fi!==void 0&&fi.setValue(z,Me.setFromMatrixPosition(U.matrixWorld)),we.logarithmicDepthBuffer&&It.setValue(z,"logDepthBufFC",2/(Math.log(U.far+1)/Math.LN2)),(ae.isMeshPhongMaterial||ae.isMeshToonMaterial||ae.isMeshLambertMaterial||ae.isMeshBasicMaterial||ae.isMeshStandardMaterial||ae.isShaderMaterial)&&It.setValue(z,"isOrthographic",U.isOrthographicCamera===!0),P!==U&&(P=U,ui=!0,Gr=!0)}if(ee.isSkinnedMesh){It.setOptional(z,ee,"bindMatrix"),It.setOptional(z,ee,"bindMatrixInverse");const fi=ee.skeleton;fi&&(fi.boneTexture===null&&fi.computeBoneTexture(),It.setValue(z,"boneTexture",fi.boneTexture,ke))}ee.isBatchedMesh&&(It.setOptional(z,ee,"batchingTexture"),It.setValue(z,"batchingTexture",ee._matricesTexture,ke),It.setOptional(z,ee,"batchingColorTexture"),ee._colorsTexture!==null&&It.setValue(z,"batchingColorTexture",ee._colorsTexture,ke));const fl=re.morphAttributes;if((fl.position!==void 0||fl.normal!==void 0||fl.color!==void 0)&&Je.update(ee,re,Xt),(ui||Oe.receiveShadow!==ee.receiveShadow)&&(Oe.receiveShadow=ee.receiveShadow,It.setValue(z,"receiveShadow",ee.receiveShadow)),ae.isMeshGouraudMaterial&&ae.envMap!==null&&(Bi.envMap.value=$e,Bi.flipEnvMap.value=$e.isCubeTexture&&$e.isRenderTargetTexture===!1?-1:1),ae.isMeshStandardMaterial&&ae.envMap===null&&Z.environment!==null&&(Bi.envMapIntensity.value=Z.environmentIntensity),ui&&(It.setValue(z,"toneMappingExposure",A.toneMappingExposure),Oe.needsLights&&Qg(Bi,Gr),De&&ae.fog===!0&&Ae.refreshFogUniforms(Bi,De),Ae.refreshMaterialUniforms(Bi,ae,le,Q,x.state.transmissionRenderTarget[U.id]),om.upload(z,bh(Oe),Bi,ke)),ae.isShaderMaterial&&ae.uniformsNeedUpdate===!0&&(om.upload(z,bh(Oe),Bi,ke),ae.uniformsNeedUpdate=!1),ae.isSpriteMaterial&&It.setValue(z,"center",ee.center),It.setValue(z,"modelViewMatrix",ee.modelViewMatrix),It.setValue(z,"normalMatrix",ee.normalMatrix),It.setValue(z,"modelMatrix",ee.matrixWorld),ae.isShaderMaterial||ae.isRawShaderMaterial){const fi=ae.uniformsGroups;for(let Ks=0,Ph=fi.length;Ks0&&ke.useMultisampledRTT(U)===!1?ee=Ue.get(U).__webglMultisampledFramebuffer:Array.isArray(st)?ee=st[re]:ee=st,b.copy(U.viewport),N.copy(U.scissor),j=U.scissorTest}else b.copy(J).multiplyScalar(le).floor(),N.copy($).multiplyScalar(le).floor(),j=_e;if(Se.bindFramebuffer(z.FRAMEBUFFER,ee)&&ae&&Se.drawBuffers(U,ee),Se.viewport(b),Se.scissor(N),Se.setScissorTest(j),De){const $e=Ue.get(U.texture);z.framebufferTexture2D(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,z.TEXTURE_CUBE_MAP_POSITIVE_X+Z,$e.__webglTexture,re)}else if(We){const $e=Ue.get(U.texture),ct=Z||0;z.framebufferTextureLayer(z.FRAMEBUFFER,z.COLOR_ATTACHMENT0,$e.__webglTexture,re||0,ct)}I=-1},this.readRenderTargetPixels=function(U,Z,re,ae,ee,De,We){if(!(U&&U.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ze=Ue.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&We!==void 0&&(Ze=Ze[We]),Ze){Se.bindFramebuffer(z.FRAMEBUFFER,Ze);try{const $e=U.texture,ct=$e.format,st=$e.type;if(!we.textureFormatReadable(ct)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}if(!we.textureTypeReadable(st)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Z>=0&&Z<=U.width-ae&&re>=0&&re<=U.height-ee&&z.readPixels(Z,re,ae,ee,Be.convert(ct),Be.convert(st),De)}finally{const $e=L!==null?Ue.get(L).__webglFramebuffer:null;Se.bindFramebuffer(z.FRAMEBUFFER,$e)}}},this.readRenderTargetPixelsAsync=async function(U,Z,re,ae,ee,De,We){if(!(U&&U.isWebGLRenderTarget))throw new Error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");let Ze=Ue.get(U).__webglFramebuffer;if(U.isWebGLCubeRenderTarget&&We!==void 0&&(Ze=Ze[We]),Ze){Se.bindFramebuffer(z.FRAMEBUFFER,Ze);try{const $e=U.texture,ct=$e.format,st=$e.type;if(!we.textureFormatReadable(ct))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in RGBA or implementation defined format.");if(!we.textureTypeReadable(st))throw new Error("THREE.WebGLRenderer.readRenderTargetPixelsAsync: renderTarget is not in UnsignedByteType or implementation defined type.");if(Z>=0&&Z<=U.width-ae&&re>=0&&re<=U.height-ee){const rt=z.createBuffer();z.bindBuffer(z.PIXEL_PACK_BUFFER,rt),z.bufferData(z.PIXEL_PACK_BUFFER,De.byteLength,z.STREAM_READ),z.readPixels(Z,re,ae,ee,Be.convert(ct),Be.convert(st),0),z.flush();const Lt=z.fenceSync(z.SYNC_GPU_COMMANDS_COMPLETE,0);await DV(z,Lt,4);try{z.bindBuffer(z.PIXEL_PACK_BUFFER,rt),z.getBufferSubData(z.PIXEL_PACK_BUFFER,0,De)}finally{z.deleteBuffer(rt),z.deleteSync(Lt)}return De}}finally{const $e=L!==null?Ue.get(L).__webglFramebuffer:null;Se.bindFramebuffer(z.FRAMEBUFFER,$e)}}},this.copyFramebufferToTexture=function(U,Z=null,re=0){U.isTexture!==!0&&(console.warn("WebGLRenderer: copyFramebufferToTexture function signature has changed."),Z=arguments[0]||null,U=arguments[1]);const ae=Math.pow(2,-re),ee=Math.floor(U.image.width*ae),De=Math.floor(U.image.height*ae),We=Z!==null?Z.x:0,Ze=Z!==null?Z.y:0;ke.setTexture2D(U,0),z.copyTexSubImage2D(z.TEXTURE_2D,re,0,0,We,Ze,ee,De),Se.unbindTexture()},this.copyTextureToTexture=function(U,Z,re=null,ae=null,ee=0){U.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture function signature has changed."),ae=arguments[0]||null,U=arguments[1],Z=arguments[2],ee=arguments[3]||0,re=null);let De,We,Ze,$e,ct,st;re!==null?(De=re.max.x-re.min.x,We=re.max.y-re.min.y,Ze=re.min.x,$e=re.min.y):(De=U.image.width,We=U.image.height,Ze=0,$e=0),ae!==null?(ct=ae.x,st=ae.y):(ct=0,st=0);const rt=Be.convert(Z.format),Lt=Be.convert(Z.type);ke.setTexture2D(Z,0),z.pixelStorei(z.UNPACK_FLIP_Y_WEBGL,Z.flipY),z.pixelStorei(z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Z.premultiplyAlpha),z.pixelStorei(z.UNPACK_ALIGNMENT,Z.unpackAlignment);const en=z.getParameter(z.UNPACK_ROW_LENGTH),jt=z.getParameter(z.UNPACK_IMAGE_HEIGHT),Mn=z.getParameter(z.UNPACK_SKIP_PIXELS),Tt=z.getParameter(z.UNPACK_SKIP_ROWS),Oe=z.getParameter(z.UNPACK_SKIP_IMAGES),yt=U.isCompressedTexture?U.mipmaps[ee]:U.image;z.pixelStorei(z.UNPACK_ROW_LENGTH,yt.width),z.pixelStorei(z.UNPACK_IMAGE_HEIGHT,yt.height),z.pixelStorei(z.UNPACK_SKIP_PIXELS,Ze),z.pixelStorei(z.UNPACK_SKIP_ROWS,$e),U.isDataTexture?z.texSubImage2D(z.TEXTURE_2D,ee,ct,st,De,We,rt,Lt,yt.data):U.isCompressedTexture?z.compressedTexSubImage2D(z.TEXTURE_2D,ee,ct,st,yt.width,yt.height,rt,yt.data):z.texSubImage2D(z.TEXTURE_2D,ee,ct,st,rt,Lt,yt),z.pixelStorei(z.UNPACK_ROW_LENGTH,en),z.pixelStorei(z.UNPACK_IMAGE_HEIGHT,jt),z.pixelStorei(z.UNPACK_SKIP_PIXELS,Mn),z.pixelStorei(z.UNPACK_SKIP_ROWS,Tt),z.pixelStorei(z.UNPACK_SKIP_IMAGES,Oe),ee===0&&Z.generateMipmaps&&z.generateMipmap(z.TEXTURE_2D),Se.unbindTexture()},this.copyTextureToTexture3D=function(U,Z,re=null,ae=null,ee=0){U.isTexture!==!0&&(console.warn("WebGLRenderer: copyTextureToTexture3D function signature has changed."),re=arguments[0]||null,ae=arguments[1]||null,U=arguments[2],Z=arguments[3],ee=arguments[4]||0);let De,We,Ze,$e,ct,st,rt,Lt,en;const jt=U.isCompressedTexture?U.mipmaps[ee]:U.image;re!==null?(De=re.max.x-re.min.x,We=re.max.y-re.min.y,Ze=re.max.z-re.min.z,$e=re.min.x,ct=re.min.y,st=re.min.z):(De=jt.width,We=jt.height,Ze=jt.depth,$e=0,ct=0,st=0),ae!==null?(rt=ae.x,Lt=ae.y,en=ae.z):(rt=0,Lt=0,en=0);const Mn=Be.convert(Z.format),Tt=Be.convert(Z.type);let Oe;if(Z.isData3DTexture)ke.setTexture3D(Z,0),Oe=z.TEXTURE_3D;else if(Z.isDataArrayTexture||Z.isCompressedArrayTexture)ke.setTexture2DArray(Z,0),Oe=z.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}z.pixelStorei(z.UNPACK_FLIP_Y_WEBGL,Z.flipY),z.pixelStorei(z.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Z.premultiplyAlpha),z.pixelStorei(z.UNPACK_ALIGNMENT,Z.unpackAlignment);const yt=z.getParameter(z.UNPACK_ROW_LENGTH),Ct=z.getParameter(z.UNPACK_IMAGE_HEIGHT),Xt=z.getParameter(z.UNPACK_SKIP_PIXELS),Ln=z.getParameter(z.UNPACK_SKIP_ROWS),ui=z.getParameter(z.UNPACK_SKIP_IMAGES);z.pixelStorei(z.UNPACK_ROW_LENGTH,jt.width),z.pixelStorei(z.UNPACK_IMAGE_HEIGHT,jt.height),z.pixelStorei(z.UNPACK_SKIP_PIXELS,$e),z.pixelStorei(z.UNPACK_SKIP_ROWS,ct),z.pixelStorei(z.UNPACK_SKIP_IMAGES,st),U.isDataTexture||U.isData3DTexture?z.texSubImage3D(Oe,ee,rt,Lt,en,De,We,Ze,Mn,Tt,jt.data):Z.isCompressedArrayTexture?z.compressedTexSubImage3D(Oe,ee,rt,Lt,en,De,We,Ze,Mn,jt.data):z.texSubImage3D(Oe,ee,rt,Lt,en,De,We,Ze,Mn,Tt,jt),z.pixelStorei(z.UNPACK_ROW_LENGTH,yt),z.pixelStorei(z.UNPACK_IMAGE_HEIGHT,Ct),z.pixelStorei(z.UNPACK_SKIP_PIXELS,Xt),z.pixelStorei(z.UNPACK_SKIP_ROWS,Ln),z.pixelStorei(z.UNPACK_SKIP_IMAGES,ui),ee===0&&Z.generateMipmaps&&z.generateMipmap(Oe),Se.unbindTexture()},this.initRenderTarget=function(U){Ue.get(U).__webglFramebuffer===void 0&&ke.setupRenderTarget(U)},this.initTexture=function(U){U.isCubeTexture?ke.setTextureCube(U,0):U.isData3DTexture?ke.setTexture3D(U,0):U.isDataArrayTexture||U.isCompressedArrayTexture?ke.setTexture2DArray(U,0):ke.setTexture2D(U,0),Se.unbindTexture()},this.resetState=function(){R=0,C=0,L=null,Se.reset(),H.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return ns}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(e){this._outputColorSpace=e;const t=this.getContext();t.drawingBufferColorSpace=e===bg?"display-p3":"srgb",t.unpackColorSpace=Bt.workingColorSpace===dh?"display-p3":"srgb"}}class Rg{constructor(e,t=25e-5){this.isFogExp2=!0,this.name="",this.color=new je(e),this.density=t}clone(){return new Rg(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class Lg{constructor(e,t=1,i=1e3){this.isFog=!0,this.name="",this.color=new je(e),this.near=t,this.far=i}clone(){return new Lg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class Wm extends Ut{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 Mi,this.environmentIntensity=1,this.environmentRotation=new Mi,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 Ig{constructor(e,t){this.isInterleavedBuffer=!0,this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Wf,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.version=0,this.uuid=Qi()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}get updateRange(){return _1("THREE.InterleavedBuffer: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}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:c,point:Pu.clone(),uv:qi.getInterpolation(Pu,hp,Lu,dp,zT,py,VT,new pe),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 pp(n,e,t,i,r,s){Wl.subVectors(n,t).addScalar(.5).multiply(i),r!==void 0?(Ru.x=s*Wl.x-r*Wl.y,Ru.y=r*Wl.x+s*Wl.y):Ru.copy(Wl),n.copy(e),n.x+=Ru.x,n.y+=Ru.y,n.applyMatrix4(pI)}const mp=new O,HT=new O;class gI extends Ut{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){mp.setFromMatrixPosition(this.matrixWorld);const r=e.ray.origin.distanceTo(mp);this.getObjectForDistance(r).raycast(e,t)}}update(e){const t=this.levels;if(t.length>1){mp.setFromMatrixPosition(e.matrixWorld),HT.setFromMatrixPosition(this.matrixWorld);const i=mp.distanceTo(HT)/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=i.length&&i.push({start:-1,count:-1,z:-1});const s=i[this.index];r.push(s),this.index++,s.start=e.start,s.count=e.count,s.z=t}reset(){this.list.length=0,this.index=0}}const Xl="batchId",mo=new at,vy=new at,X6=new at,Y6=new je(1,1,1),JT=new at,yy=new gh,yp=new Ai,da=new li,Nu=new O,QT=new O,q6=new O,xy=new j6,ri=new An,xp=[];function Z6(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;s65536?new Uint32Array(s):new Uint16Array(s);t.setIndex(new Ht(a,1))}const o=r>65536?new Uint32Array(i):new Uint16Array(i);t.setAttribute(Xl,new Ht(o,1)),this._geometryInitialized=!0}}_validateGeometry(e){if(e.getAttribute(Xl))throw new Error(`BatchedMesh: Geometry cannot use attribute "${Xl}"`);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(i===Xl)continue;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 Ai);const e=this._geometryCount,t=this.boundingBox,i=this._active;t.makeEmpty();for(let r=0;r=this._maxGeometryCount)throw new Error("BatchedMesh: Maximum geometry count reached.");const r={vertexStart:-1,vertexCount:-1,indexStart:-1,indexCount:-1};let s=null;const o=this._reservedRanges,a=this._drawRanges,c=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._visibility,p=this._active,m=this._matricesTexture,y=this._matricesTexture.image.data,_=this._colorsTexture;d.push(!0),p.push(!0);const x=this._geometryCount;this._geometryCount++,X6.toArray(y,x*16),m.needsUpdate=!0,_!==null&&(Y6.toArray(_.image.data,x*4),_.needsUpdate=!0),o.push(r),a.push({start:h?r.indexStart:r.vertexStart,count:-1}),c.push({boxInitialized:!1,box:new Ai,sphereInitialized:!1,sphere:new li});const g=this.geometry.getAttribute(Xl);for(let S=0;S=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 c=a.vertexStart,f=a.vertexCount;for(const m in i.attributes){if(m===Xl)continue;const y=t.getAttribute(m),_=i.getAttribute(m);Z6(y,_,c);const x=y.itemSize;for(let g=y.count,S=f;g=t.length||t[e]===!1?this:(t[e]=!1,this._visibilityChanged=!0,this)}getInstanceCountAt(e){return this._multiDrawInstances===null?null:this._multiDrawInstances[e]}setInstanceCountAt(e,t){return this._multiDrawInstances===null&&(this._multiDrawInstances=new Int32Array(this._maxGeometryCount).fill(1)),this._multiDrawInstances[e]=t,e}getBoundingBoxAt(e,t){if(this._active[e]===!1)return null;const r=this._bounds[e],s=r.box,o=this.geometry;if(r.boxInitialized===!1){s.makeEmpty();const a=o.index,c=o.attributes.position,f=this._drawRanges[e];for(let h=f.start,d=f.start+f.count;h=o||i[e]===!1?this:(t.toArray(s,e*16),r.needsUpdate=!0,this)}getMatrixAt(e,t){const i=this._active,r=this._matricesTexture.image.data,s=this._geometryCount;return e>=s||i[e]===!1?null:t.fromArray(r,e*16)}setColorAt(e,t){this._colorsTexture===null&&this._initColorsTexture();const i=this._active,r=this._colorsTexture,s=this._colorsTexture.image.data,o=this._geometryCount;return e>=o||i[e]===!1?this:(t.toArray(s,e*4),r.needsUpdate=!0,this)}getColorAt(e,t){const i=this._active,r=this._colorsTexture.image.data,s=this._geometryCount;return e>=s||i[e]===!1?null:t.fromArray(r,e*4)}setVisibleAt(e,t){const i=this._visibility,r=this._active,s=this._geometryCount;return e>=s||r[e]===!1||i[e]===t?this:(i[e]=t,this._visibilityChanged=!0,this)}getVisibleAt(e){const t=this._visibility,i=this._active,r=this._geometryCount;return e>=r||i[e]===!1?!1:t[e]}raycast(e,t){const i=this._visibility,r=this._active,s=this._drawRanges,o=this._geometryCount,a=this.matrixWorld,c=this.geometry;ri.material=this.material,ri.geometry.index=c.index,ri.geometry.attributes=c.attributes,ri.geometry.boundingBox===null&&(ri.geometry.boundingBox=new Ai),ri.geometry.boundingSphere===null&&(ri.geometry.boundingSphere=new li);for(let f=0;f({...t})),this._reservedRanges=e._reservedRanges.map(t=>({...t})),this._visibility=e._visibility.slice(),this._active=e._active.slice(),this._bounds=e._bounds.map(t=>({boxInitialized:t.boxInitialized,box:t.box.clone(),sphereInitialized:t.sphereInitialized,sphere:t.sphere.clone()})),this._maxGeometryCount=e._maxGeometryCount,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.slice(),this._colorsTexture!==null&&(this._colorsTexture=e._colorsTexture.clone(),this._colorsTexture.image.data=this._colorsTexture.image.slice()),this}dispose(){return this.geometry.dispose(),this._matricesTexture.dispose(),this._matricesTexture=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,c=this._active,f=this._visibility,h=this._multiDrawStarts,d=this._multiDrawCounts,p=this._drawRanges,m=this.perObjectFrustumCulled;m&&(JT.multiplyMatrices(i.projectionMatrix,i.matrixWorldInverse).multiply(this.matrixWorld),yy.setFromProjectionMatrix(JT,e.coordinateSystem));let y=0;if(this.sortObjects){vy.copy(this.matrixWorld).invert(),Nu.setFromMatrixPosition(i.matrixWorld).applyMatrix4(vy),QT.set(0,0,-1).transformDirection(i.matrixWorld).transformDirection(vy);for(let g=0,S=f.length;g0){const r=t[i[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let s=0,o=r.length;si)return;_y.applyMatrix4(n.matrixWorld);const c=e.ray.origin.distanceTo(_y);if(!(ce.far))return{distance:c,point:eb.clone().applyMatrix4(n.matrixWorld),index:r,face:null,faceIndex:null,object:n}}const tb=new O,nb=new O;class us extends Vo{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:c,index:e,face:null,object:o})}}class K6 extends $t{constructor(e,t,i,r,s,o,a,c,f){super(e,t,i,r,s,o,a,c,f),this.isVideoTexture=!0,this.minFilter=o!==void 0?o:Pn,this.magFilter=s!==void 0?s:Pn,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 J6 extends $t{constructor(e,t){super({width:e,height:t}),this.isFramebufferTexture=!0,this.magFilter=Gn,this.minFilter=Gn,this.generateMipmaps=!1,this.needsUpdate=!0}}class Ng extends $t{constructor(e,t,i,r,s,o,a,c,f,h,d,p){super(null,o,a,c,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 Q6 extends Ng{constructor(e,t,i,r,s,o){super(e,t,i,s,o),this.isCompressedArrayTexture=!0,this.image.depth=r,this.wrapR=yr,this.layerUpdates=new Set}addLayerUpdates(e){this.layerUpdates.add(e)}clearLayerUpdates(){this.layerUpdates.clear()}}class $6 extends Ng{constructor(e,t,i){super(void 0,e[0].width,e[0].height,t,i,js),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=e}}class e8 extends $t{constructor(e,t,i,r,s,o,a,c,f){super(e,t,i,r,s,o,a,c,f),this.isCanvasTexture=!0,this.needsUpdate=!0}}class zr{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,c=s-1,f;for(;a<=c;)if(r=Math.floor(a+(c-a)/2),f=i[r]-o,f<0)a=r+1;else if(f>0)c=r-1;else{c=r;break}if(r=c,i[r]===o)return r/(s-1);const h=i[r],p=i[r+1]-h,m=(o-h)/p;return(r+m)/(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),c=t||(o.isVector2?new pe:new O);return c.copy(a).sub(o).normalize(),c}getTangentAt(e,t){const i=this.getUtoTmapping(e);return this.getTangent(i,t)}computeFrenetFrames(e,t){const i=new O,r=[],s=[],o=[],a=new O,c=new at;for(let m=0;m<=e;m++){const y=m/e;r[m]=this.getTangentAt(y,new O)}s[0]=new O,o[0]=new O;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 m=1;m<=e;m++){if(s[m]=s[m-1].clone(),o[m]=o[m-1].clone(),a.crossVectors(r[m-1],r[m]),a.length()>Number.EPSILON){a.normalize();const y=Math.acos(vn(r[m-1].dot(r[m]),-1,1));s[m].applyMatrix4(c.makeRotationAxis(a,y))}o[m].crossVectors(r[m],s[m])}if(t===!0){let m=Math.acos(vn(s[0].dot(s[e]),-1,1));m/=e,r[0].dot(a.crossVectors(s[0],s[e]))>0&&(m=-m);for(let y=1;y<=e;y++)s[y].applyMatrix4(c.makeRotationAxis(r[y],m*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 Ug extends zr{constructor(e=0,t=0,i=1,r=1,s=0,o=Math.PI*2,a=!1,c=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=c}getPoint(e,t=new pe){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:c===0&&a===s-1&&(a=s-2,c=1);let f,h;this.closed||a>0?f=r[(a-1)%s]:(wp.subVectors(r[0],r[1]).add(r[0]),f=wp);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(sb(a,c.x,f.x,h.x,d.x),sb(a,c.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],c=a.getLength(),f=c===0?0:1-o/c;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 vh extends St{constructor(e=[new pe(0,-.5),new pe(.5,0),new pe(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=vn(r,0,Math.PI*2);const s=[],o=[],a=[],c=[],f=[],h=1/t,d=new O,p=new pe,m=new O,y=new O,_=new O;let x=0,g=0;for(let S=0;S<=e.length-1;S++)switch(S){case 0:x=e[S+1].x-e[S].x,g=e[S+1].y-e[S].y,m.x=g*1,m.y=-x,m.z=g*0,_.copy(m),m.normalize(),c.push(m.x,m.y,m.z);break;case e.length-1:c.push(_.x,_.y,_.z);break;default:x=e[S+1].x-e[S].x,g=e[S+1].y-e[S].y,m.x=g*1,m.y=-x,m.z=g*0,y.copy(m),m.x+=_.x,m.y+=_.y,m.z+=_.z,m.normalize(),c.push(m.x,m.y,m.z),_.copy(y)}for(let S=0;S<=t;S++){const A=i+S*h*r,E=Math.sin(A),R=Math.cos(A);for(let C=0;C<=e.length-1;C++){d.x=e[C].x*E,d.y=e[C].y,d.z=e[C].x*R,o.push(d.x,d.y,d.z),p.x=S/t,p.y=C/(e.length-1),a.push(p.x,p.y);const L=c[3*C+0]*E,I=c[3*C+1],P=c[3*C+0]*R;f.push(L,I,P)}}for(let S=0;S0&&A(!0),t>0&&A(!1)),this.setIndex(h),this.setAttribute("position",new Ke(d,3)),this.setAttribute("normal",new Ke(p,3)),this.setAttribute("uv",new Ke(m,2));function S(){const E=new O,R=new O;let C=0;const L=(t-e)/i;for(let I=0;I<=s;I++){const P=[],b=I/s,N=b*(t-e)+e;for(let j=0;j<=r;j++){const X=j/r,te=X*c+a,ne=Math.sin(te),Q=Math.cos(te);R.x=N*ne,R.y=-b*i+x,R.z=N*Q,d.push(R.x,R.y,R.z),E.set(ne,L,Q).normalize(),p.push(E.x,E.y,E.z),m.push(X,1-b),P.push(y++)}_.push(P)}for(let I=0;I.9&&L<.1&&(A<.2&&(o[S+0]+=1),E<.2&&(o[S+2]+=1),R<.2&&(o[S+4]+=1))}}function p(S){s.push(S.x,S.y,S.z)}function m(S,A){const E=S*3;A.x=e[E+0],A.y=e[E+1],A.z=e[E+2]}function y(){const S=new O,A=new O,E=new O,R=new O,C=new pe,L=new pe,I=new pe;for(let P=0,b=0;P80*t){a=f=n[0],c=h=n[1];for(let y=t;yf&&(f=d),p>h&&(h=p);m=Math.max(f-a,h-c),m=m!==0?32767/m:0}return qf(s,o,t,a,c,m,0),o}};function CI(n,e,t,i,r){let s,o;if(r===w8(n,e,t,i)>0)for(s=e;s=e;s-=i)o=ob(s,n[s],n[s+1],o);return o&&zg(o,o.next)&&(Kf(o),o=o.next),o}function el(n,e){if(!n)return n;e||(e=n);let t=n,i;do if(i=!1,!t.steiner&&(zg(t,t.next)||fn(t.prev,t,t.next)===0)){if(Kf(t),t=e=t.prev,t===t.next)break;i=!0}else t=t.next;while(i||t!==e);return e}function qf(n,e,t,i,r,s,o){if(!n)return;!o&&s&&y8(n,i,r,s);let a=n,c,f;for(;n.prev!==n.next;){if(c=n.prev,f=n.next,s?u8(n,i,r,s):c8(n)){e.push(c.i/t|0),e.push(n.i/t|0),e.push(f.i/t|0),Kf(n),n=f.next,a=f.next;continue}if(n=f,n===a){o?o===1?(n=f8(el(n),e,t),qf(n,e,t,i,r,s,2)):o===2&&h8(n,e,t,i,r,s):qf(el(n),e,t,i,r,s,1);break}}}function c8(n){const e=n.prev,t=n,i=n.next;if(fn(e,t,i)>=0)return!1;const r=e.x,s=t.x,o=i.x,a=e.y,c=t.y,f=i.y,h=rs?r>o?r:o:s>o?s:o,m=a>c?a>f?a:f:c>f?c:f;let y=i.next;for(;y!==e;){if(y.x>=h&&y.x<=p&&y.y>=d&&y.y<=m&&gc(r,a,s,c,o,f,y.x,y.y)&&fn(y.prev,y,y.next)>=0)return!1;y=y.next}return!0}function u8(n,e,t,i){const r=n.prev,s=n,o=n.next;if(fn(r,s,o)>=0)return!1;const a=r.x,c=s.x,f=o.x,h=r.y,d=s.y,p=o.y,m=ac?a>f?a:f:c>f?c:f,x=h>d?h>p?h:p:d>p?d:p,g=L_(m,y,e,t,i),S=L_(_,x,e,t,i);let A=n.prevZ,E=n.nextZ;for(;A&&A.z>=g&&E&&E.z<=S;){if(A.x>=m&&A.x<=_&&A.y>=y&&A.y<=x&&A!==r&&A!==o&&gc(a,h,c,d,f,p,A.x,A.y)&&fn(A.prev,A,A.next)>=0||(A=A.prevZ,E.x>=m&&E.x<=_&&E.y>=y&&E.y<=x&&E!==r&&E!==o&&gc(a,h,c,d,f,p,E.x,E.y)&&fn(E.prev,E,E.next)>=0))return!1;E=E.nextZ}for(;A&&A.z>=g;){if(A.x>=m&&A.x<=_&&A.y>=y&&A.y<=x&&A!==r&&A!==o&&gc(a,h,c,d,f,p,A.x,A.y)&&fn(A.prev,A,A.next)>=0)return!1;A=A.prevZ}for(;E&&E.z<=S;){if(E.x>=m&&E.x<=_&&E.y>=y&&E.y<=x&&E!==r&&E!==o&&gc(a,h,c,d,f,p,E.x,E.y)&&fn(E.prev,E,E.next)>=0)return!1;E=E.nextZ}return!0}function f8(n,e,t){let i=n;do{const r=i.prev,s=i.next.next;!zg(r,s)&&PI(r,i,i.next,s)&&Zf(r,s)&&Zf(s,r)&&(e.push(r.i/t|0),e.push(i.i/t|0),e.push(s.i/t|0),Kf(i),Kf(i.next),i=n=s),i=i.next}while(i!==n);return el(i)}function h8(n,e,t,i,r,s){let o=n;do{let a=o.next.next;for(;a!==o.prev;){if(o.i!==a.i&&S8(o,a)){let c=RI(o,a);o=el(o,o.next),c=el(c,c.next),qf(o,e,t,i,r,s,0),qf(c,e,t,i,r,s,0);return}a=a.next}o=o.next}while(o!==n)}function d8(n,e,t,i){const r=[];let s,o,a,c,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>=c&&s!==t.x&&gc(or.x||t.x===r.x&&v8(r,t)))&&(r=t,h=d)),t=t.next;while(t!==a);return r}function v8(n,e){return fn(n.prev,n,e.prev)<0&&fn(e.next,n,n.next)<0}function y8(n,e,t,i){let r=n;do r.z===0&&(r.z=L_(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,x8(r)}function x8(n){let e,t,i,r,s,o,a,c,f=1;do{for(t=n,n=null,s=null,o=0;t;){for(o++,i=t,a=0,e=0;e0||c>0&&i;)a!==0&&(c===0||!i||t.z<=i.z)?(r=t,t=t.nextZ,a--):(r=i,i=i.nextZ,c--),s?s.nextZ=r:n=r,r.prevZ=s,s=r;t=i}s.nextZ=null,f*=2}while(o>1);return n}function L_(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 _8(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 S8(n,e){return n.next.i!==e.i&&n.prev.i!==e.i&&!A8(n,e)&&(Zf(n,e)&&Zf(e,n)&&M8(n,e)&&(fn(n.prev,n,e.prev)||fn(n,e.prev,e))||zg(n,e)&&fn(n.prev,n,n.next)>0&&fn(e.prev,e,e.next)>0)}function fn(n,e,t){return(e.y-n.y)*(t.x-e.x)-(e.x-n.x)*(t.y-e.y)}function zg(n,e){return n.x===e.x&&n.y===e.y}function PI(n,e,t,i){const r=Pp(fn(n,e,t)),s=Pp(fn(n,e,i)),o=Pp(fn(t,i,n)),a=Pp(fn(t,i,e));return!!(r!==s&&o!==a||r===0&&Cp(n,t,e)||s===0&&Cp(n,i,e)||o===0&&Cp(t,n,i)||a===0&&Cp(t,e,i))}function Cp(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 Pp(n){return n>0?1:n<0?-1:0}function A8(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&&PI(t,t.next,n,e))return!0;t=t.next}while(t!==n);return!1}function Zf(n,e){return fn(n.prev,n,n.next)<0?fn(n,e,n.next)>=0&&fn(n,n.prev,e)>=0:fn(n,e,n.prev)<0||fn(n,n.next,e)<0}function M8(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 RI(n,e){const t=new I_(n.i,n.x,n.y),i=new I_(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 ob(n,e,t,i){const r=new I_(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 Kf(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 I_(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 w8(n,e,t,i){let r=0;for(let s=e,o=t-i;s2&&n[e-1].equals(n[0])&&n.pop()}function lb(n,e){for(let t=0;tNumber.EPSILON){const ye=Math.sqrt(se),Ae=Math.sqrt(B*B+D*D),Qe=fe.x-lt/ye,Pe=fe.y+ke/ye,Fe=we.x-D/Ae,pt=we.y+B/Ae,Ce=((Fe-Qe)*D-(pt-Pe)*B)/(ke*D-lt*B);Se=Qe+ke*Ce-de.x,Ee=Pe+lt*Ce-de.y;const Je=Se*Se+Ee*Ee;if(Je<=2)return new pe(Se,Ee);Ue=Math.sqrt(Je/2)}else{let ye=!1;ke>Number.EPSILON?B>Number.EPSILON&&(ye=!0):ke<-Number.EPSILON?B<-Number.EPSILON&&(ye=!0):Math.sign(lt)===Math.sign(D)&&(ye=!0),ye?(Se=-lt,Ee=ke,Ue=Math.sqrt(se)):(Se=ke,Ee=lt,Ue=Math.sqrt(se/2))}return new pe(Se/Ue,Ee/Ue)}const q=[];for(let de=0,fe=te.length,we=fe-1,Se=de+1;de=0;de--){const fe=de/x,we=m*Math.cos(fe*Math.PI/2),Se=y*Math.sin(fe*Math.PI/2)+_;for(let Ee=0,Ue=te.length;Ee=0;){const Se=we;let Ee=we-1;Ee<0&&(Ee=de.length-1);for(let Ue=0,ke=h+x*2;Ue0)&&m.push(A,E,C),(g!==i-1||c0!=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 UI extends Zn{constructor(e){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new je(16777215),this.specular=new je(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Mi,this.combine=fh,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 OI extends Zn{constructor(e){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new je(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yo,this.normalScale=new pe(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 kI extends Zn{constructor(e){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yo,this.normalScale=new pe(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 FI extends Zn{constructor(e){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yo,this.normalScale=new pe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Mi,this.combine=fh,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 BI extends Zn{constructor(e){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new je(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=Yo,this.normalScale=new pe(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 zI extends Ti{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 Oa(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 VI(n){return ArrayBuffer.isView(n)&&!(n instanceof DataView)}function HI(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 D_(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 c=0;c!==e;++c)r[o++]=n[a+c]}return r}function z1(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 C8(n,e,t,i,r=30){const s=n.clone();s.name=e;const o=[];for(let c=0;c=i)){d.push(f.times[m]);for(let _=0;_s.tracks[c].times[0]&&(a=s.tracks[c].times[0]);for(let c=0;c=a.times[y]){const g=y*d+h,S=g+d-h;_=a.values.slice(g,S)}else{const g=a.createInterpolant(),S=h,A=d-h;g.evaluate(s),_=g.resultBuffer.slice(S,A)}c==="quaternion"&&new ai().fromArray(_).normalize().conjugate().toArray(_);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 c=i[a];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,c),e=!1;break}if(o!==null&&o>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,c,o),e=!1;break}o=c}if(r!==void 0&&VI(r))for(let a=0,c=r.length;a!==c;++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()===sm,s=e.length-1;let o=1;for(let a=1;a0){e[o]=e[s];for(let a=s*i,c=o*i,f=0;f!==i;++f)t[c+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}}Vr.prototype.TimeBufferType=Float32Array;Vr.prototype.ValueBufferType=Float32Array;Vr.prototype.DefaultInterpolation=Gm;class ll extends Vr{constructor(e,t,i){super(e,t,i)}}ll.prototype.ValueTypeName="bool";ll.prototype.ValueBufferType=Array;ll.prototype.DefaultInterpolation=Bf;ll.prototype.InterpolantFactoryMethodLinear=void 0;ll.prototype.InterpolantFactoryMethodSmooth=void 0;class H1 extends Vr{}H1.prototype.ValueTypeName="color";class Jf extends Vr{}Jf.prototype.ValueTypeName="number";class jI extends _h{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,c=(i-t)/(r-t);let f=e*a;for(let h=f+a;f!==h;f+=4)ai.slerpFlat(s,0,o,f-a,o,f,c);return s}}class Sh extends Vr{InterpolantFactoryMethodLinear(e){return new jI(this.times,this.values,this.getValueSize(),e)}}Sh.prototype.ValueTypeName="quaternion";Sh.prototype.InterpolantFactoryMethodSmooth=void 0;class cl extends Vr{constructor(e,t,i){super(e,t,i)}}cl.prototype.ValueTypeName="string";cl.prototype.ValueBufferType=Array;cl.prototype.DefaultInterpolation=Bf;cl.prototype.InterpolantFactoryMethodLinear=void 0;cl.prototype.InterpolantFactoryMethodSmooth=void 0;class Qf extends Vr{}Qf.prototype.ValueTypeName="vector";class $f{constructor(e="",t=-1,i=[],r=Tg){this.name=e,this.tracks=i,this.duration=t,this.blendMode=r,this.uuid=Qi(),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(I8(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(Vr.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,m,y,_){if(m.length!==0){const x=[],g=[];z1(m,x,g,y),x.length!==0&&_.push(new d(p,x,g))}},r=[],s=e.name||"default",o=e.fps||30,a=e.blendMode;let c=e.length||-1;const f=e.hierarchy||[];for(let d=0;d{t&&t(s),this.manager.itemEnd(e)},0),s;if(Ms[e]!==void 0){Ms[e].push({onLoad:t,onProgress:i,onError:r});return}Ms[e]=[],Ms[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,c=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=Ms[e],d=f.body.getReader(),p=f.headers.get("X-File-Size")||f.headers.get("Content-Length"),m=p?parseInt(p):0,y=m!==0;let _=0;const x=new ReadableStream({start(g){S();function S(){d.read().then(({done:A,value:E})=>{if(A)g.close();else{_+=E.byteLength;const R=new ProgressEvent("progress",{lengthComputable:y,loaded:_,total:m});for(let C=0,L=h.length;C{g.error(A)})}}});return new Response(x)}else throw new D8(`fetch for "${f.url}" responded with ${f.status}: ${f.statusText}`,f)}).then(f=>{switch(c){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,m=new TextDecoder(p);return f.arrayBuffer().then(y=>m.decode(y))}}}).then(f=>{Is.add(e,f);const h=Ms[e];delete Ms[e];for(let d=0,p=h.length;d{const h=Ms[e];if(h===void 0)throw this.manager.itemError(e),f;delete Ms[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 N8 extends Fi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Xs(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(c){r?r(c):console.error(c),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 je().setHex(o.value);break;case"v2":r.uniforms[s].value=new pe().fromArray(o.value);break;case"v3":r.uniforms[s].value=new O().fromArray(o.value);break;case"v4":r.uniforms[s].value=new zt().fromArray(o.value);break;case"m3":r.uniforms[s].value=new xt().fromArray(o.value);break;case"m4":r.uniforms[s].value=new at().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 pe().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 pe().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}static createMaterialFromType(e){const t={ShadowMaterial:II,SpriteMaterial:R1,RawShaderMaterial:DI,ShaderMaterial:Br,PointsMaterial:I1,MeshPhysicalMaterial:NI,MeshStandardMaterial:B1,MeshPhongMaterial:UI,MeshToonMaterial:OI,MeshNormalMaterial:kI,MeshLambertMaterial:FI,MeshDepthMaterial:C1,MeshDistanceMaterial:P1,MeshBasicMaterial:qo,MeshMatcapMaterial:BI,LineDashedMaterial:zI,LineBasicMaterial:Ti,Material:Zn};return new t[e]}}class N_{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 c=new G1(t);s=new eh(c),s.setCrossOrigin(this.crossOrigin);for(let f=0,h=e.length;f0){r=new eh(this.manager),r.setCrossOrigin(this.crossOrigin);for(let o=0,a=e.length;o{const x=new Ai;x.min.fromArray(_.boxMin),x.max.fromArray(_.boxMax);const g=new li;return g.radius=_.sphereRadius,g.center.fromArray(_.sphereCenter),{boxInitialized:_.boxInitialized,box:x,sphereInitialized:_.sphereInitialized,sphere:g}}),o._maxGeometryCount=e.maxGeometryCount,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 gI;break;case"Line":o=new Vo(a(e.geometry),c(e.material));break;case"LineLoop":o=new _I(a(e.geometry),c(e.material));break;case"LineSegments":o=new us(a(e.geometry),c(e.material));break;case"PointCloud":case"Points":o=new SI(a(e.geometry),c(e.material));break;case"Sprite":o=new mI(c(e.material));break;case"Group":o=new mc;break;case"Bone":o=new L1;break;default:o=new Ut}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.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 m=0;m"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=Is.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 c=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 Is.add(e,f),t&&t(f),s.manager.itemEnd(e),f}).catch(function(f){r&&r(f),Is.remove(e),s.manager.itemError(e),s.manager.itemEnd(e)});Is.add(e,c),s.manager.itemStart(e)}}let Rp;class j1{static getContext(){return Rp===void 0&&(Rp=new(window.AudioContext||window.webkitAudioContext)),Rp}static setContext(e){Rp=e}}class W8 extends Fi{constructor(e){super(e)}load(e,t,i,r){const s=this,o=new Xs(this.manager);o.setResponseType("arraybuffer"),o.setPath(this.path),o.setRequestHeader(this.requestHeader),o.setWithCredentials(this.withCredentials),o.load(e,function(c){try{const f=c.slice(0);j1.getContext().decodeAudioData(f,function(d){t(d)}).catch(a)}catch(f){a(f)}},i,r);function a(c){r?r(c):console.error(c),s.manager.itemError(e)}}}const gb=new at,vb=new at,pa=new at;class j8{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new sn,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new sn,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,pa.copy(e.projectionMatrix);const r=t.eyeSep/2,s=r*t.near/t.focus,o=t.near*Math.tan(Ha*t.fov*.5)/t.zoom;let a,c;vb.elements[12]=-r,gb.elements[12]=r,a=-o*t.aspect+s,c=o*t.aspect+s,pa.elements[0]=2*t.near/(c-a),pa.elements[8]=(c+a)/(c-a),this.cameraL.projectionMatrix.copy(pa),a=-o*t.aspect-s,c=o*t.aspect-s,pa.elements[0]=2*t.near/(c-a),pa.elements[8]=(c+a)/(c-a),this.cameraR.projectionMatrix.copy(pa)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(vb),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(gb)}}class X1{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=yb(),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=yb();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}}function yb(){return(typeof performance>"u"?Date:performance).now()}const ma=new O,xb=new ai,X8=new O,ga=new O;class Y8 extends Ut{constructor(){super(),this.type="AudioListener",this.context=j1.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new X1}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(ma,xb,X8),ga.set(0,0,-1).applyQuaternion(xb),t.positionX){const r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(ma.x,r),t.positionY.linearRampToValueAtTime(ma.y,r),t.positionZ.linearRampToValueAtTime(ma.z,r),t.forwardX.linearRampToValueAtTime(ga.x,r),t.forwardY.linearRampToValueAtTime(ga.y,r),t.forwardZ.linearRampToValueAtTime(ga.z,r),t.upX.linearRampToValueAtTime(i.x,r),t.upY.linearRampToValueAtTime(i.y,r),t.upZ.linearRampToValueAtTime(i.z,r)}else t.setPosition(ma.x,ma.y,ma.z),t.setOrientation(ga.x,ga.y,ga.z,i.x,i.y,i.z)}}class n3 extends Ut{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(){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.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 c=t,f=t+t;c!==f;++c)if(i[c]!==i[c+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){ai.slerpFlat(e,t,e,t,e,i,r)}_slerpAdditive(e,t,i,r,s){const o=this._workIndex*s;ai.multiplyQuaternionsFlat(e,o,e,t,e,i),ai.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 c=t+a;e[c]=e[c]*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 Y1="\\[\\]\\.:\\/",J8=new RegExp("["+Y1+"]","g"),q1="[^"+Y1+"]",Q8="[^"+Y1.replace("\\.","")+"]",$8=/((?:WC+[\/:])*)/.source.replace("WC",q1),ej=/(WCOD+)?/.source.replace("WCOD",Q8),tj=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",q1),nj=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",q1),ij=new RegExp("^"+$8+ej+tj+nj+"$"),rj=["material","materials","bones","map"];class sj{constructor(e,t,i){const r=i||Dt.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 Dt{constructor(e,t,i){this.path=t,this.parsedPath=i||Dt.parseTrackName(t),this.node=Dt.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 Dt.Composite(e,t,i):new Dt(e,t,i)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(J8,"")}static parseTrackName(e){const t=ij.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);rj.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]=c;for(let m=0,y=r;m!==y;++m){const _=i[m],x=_[d],g=_[h];_[h]=x,_[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,c=arguments.length;a!==c;++a){const f=arguments[a],h=f.uuid,d=t[h];if(d!==void 0)if(delete t[h],d0&&(t[m.uuid]=d),e[d]=m,e.pop();for(let y=0,_=r;y!==_;++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,c=this._objects,f=c.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,m=c.length;p!==m;++p){const y=c[p];d[p]=new Dt(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,c=o[a],f=e[a];t[f]=i,o[i]=c,o.pop(),s[i]=s[a],s.pop(),r[i]=r[a],r.pop()}}}class r3{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),c={endingStart:Da,endingEnd:Da};for(let f=0;f!==o;++f){const h=s[f].createInterpolant(null);a[f]=h,h.settings=c}this._interpolantSettings=c,this._interpolants=a,this._propertyBindings=new Array(o),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=BL,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 c=a.parameterPositions,f=a.sampleValues;return c[0]=s,c[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 c=(e-s)*i;c<0||i===0?t=0:(this._startTime=null,t=i*c)}t*=this._updateTimeScale(e);const o=this._updateTime(t),a=this._updateWeight(e);if(a>0){const c=this._interpolants,f=this._propertyBindings;switch(this.blendMode){case v1:for(let h=0,d=c.length;h!==d;++h)c[h].evaluate(o),f[h].accumulateAdditive(a);break;case Tg:default:for(let h=0,d=c.length;h!==d;++h)c[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===zL;if(e===0)return s===-1?r:o&&(s&1)===1?t-r:r;if(i===FL){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 c=this.repetitions-s;if(c<=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(c===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=Na,r.endingEnd=Na):(e?r.endingStart=this.zeroSlopeAtStart?Na:Da:r.endingStart=zf,t?r.endingEnd=this.zeroSlopeAtEnd?Na:Da:r.endingEnd=zf)}_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,c=o.sampleValues;return a[0]=s,c[0]=t,a[1]=s+e,c[1]=i,this}}const aj=new Float32Array(1);class lj extends cs{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,c=i.uuid,f=this._bindingsByRootAndName;let h=f[c];h===void 0&&(h={},f[c]=h);for(let d=0;d!==s;++d){const p=r[d],m=p.name;let y=h[m];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,c,m));continue}const _=t&&t._propertyBindings[d].binding.parsedPath;y=new i3(Dt.create(i,m,_),p.ValueTypeName,p.getValueSize()),++y.referenceCount,this._addInactiveBinding(y,c,m),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,c=this._nActiveBindings;for(let f=0;f!==c;++f)a[f].apply(o);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.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.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return this.clampPoint(e,Mb).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 wb=new O,Lp=new O;class mj{constructor(e=new O,t=new O){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){wb.subVectors(e,this.start),Lp.subVectors(this.end,this.start);const i=Lp.dot(Lp);let s=Lp.dot(wb)/i;return t&&(s=vn(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 Eb=new O;class gj extends Ut{constructor(e,t){super(),this.light=e,this.matrixAutoUpdate=!1,this.color=t,this.type="SpotLightHelper";const i=new St,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,c=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{Rb.set(e.z,0,-e.x).normalize();const t=Math.acos(e.y);this.quaternion.setFromAxisAngle(Rb,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 Pj extends us{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 St;r.setAttribute("position",new Ke(t,3)),r.setAttribute("color",new Ke(i,3));const s=new Ti({vertexColors:!0,toneMapped:!1});super(r,s),this.type="AxesHelper"}setColors(e,t,i){const r=new je,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 Rj{constructor(){this.type="ShapePath",this.color=new je,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new Yf,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 S=[];for(let A=0,E=g.length;ANumber.EPSILON){if(b<0&&(L=S[C],P=-P,I=S[R],b=-b),g.yI.y)continue;if(g.y===L.y){if(g.x===L.x)return!0}else{const N=b*(g.x-L.x)-P*(g.y-L.y);if(N===0)return!0;if(N<0)continue;E=!E}}else{if(g.y!==L.y)continue;if(I.x<=g.x&&g.x<=L.x||L.x<=g.x&&g.x<=I.x)return!0}}return E}const r=as.isClockWise,s=this.subPaths;if(s.length===0)return[];let o,a,c;const f=[];if(s.length===1)return a=s[0],c=new Wa,c.curves=a.curves,f.push(c),f;let h=!r(s[0].getPoints());h=e?!h:h;const d=[],p=[];let m=[],y=0,_;p[y]=void 0,m[y]=[];for(let g=0,S=s.length;g1){let g=!1,S=0;for(let A=0,E=p.length;A0&&g===!1&&(m=d)}let x;for(let g=0,S=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(m=>m(e,p))}},r=()=>e,s=(f,h=r,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=h(e);function m(){const y=h(e);if(!d(p,y)){const _=p;f(p=y,_)}}return t.add(m),()=>t.delete(m)},l={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,l),l}const X7=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),uC=X7?F.useEffect:F.useLayoutEffect;function J3(n){const e=typeof n=="function"?j7(n):n,t=(i=e.getState,r=Object.is)=>{const[,s]=F.useReducer(x=>x+1,0),o=e.getState(),a=F.useRef(o),l=F.useRef(i),f=F.useRef(r),h=F.useRef(!1),d=F.useRef();d.current===void 0&&(d.current=i(o));let p,m=!1;(a.current!==o||l.current!==i||f.current!==r||h.current)&&(p=i(o),m=!r(d.current,p)),uC(()=>{m&&(d.current=p),a.current=o,l.current=i,f.current=r,h.current=!1});const y=F.useRef(o);uC(()=>{const x=()=>{try{const S=e.getState(),A=l.current(S);f.current(d.current,A)||(a.current=S,d.current=A,s())}catch{h.current=!0,s()}},g=e.subscribe(x);return e.getState()!==y.current&&x(),g},[]);const _=m?p:d.current;return F.useDebugValue(_),_};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}var $3={exports:{}},Q3={exports:{}},eN={};/** + */ul.ConcurrentRoot=1;ul.ContinuousEventPriority=4;ul.DefaultEventPriority=16;ul.DiscreteEventPriority=1;ul.IdleEventPriority=536870912;ul.LegacyRoot=0;a3.exports=ul;var yc=a3.exports;function Dj(n){let e;const t=new Set,i=(f,h)=>{const d=typeof f=="function"?f(e):f;if(d!==e){const p=e;e=h?d:Object.assign({},e,d),t.forEach(m=>m(e,p))}},r=()=>e,s=(f,h=r,d=Object.is)=>{console.warn("[DEPRECATED] Please use `subscribeWithSelector` middleware");let p=h(e);function m(){const y=h(e);if(!d(p,y)){const _=p;f(p=y,_)}}return t.add(m),()=>t.delete(m)},c={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,c),c}const Nj=typeof window>"u"||!window.navigator||/ServerSideRendering|^Deno\//.test(window.navigator.userAgent),Lb=Nj?G.useEffect:G.useLayoutEffect;function l3(n){const e=typeof n=="function"?Dj(n):n,t=(i=e.getState,r=Object.is)=>{const[,s]=G.useReducer(x=>x+1,0),o=e.getState(),a=G.useRef(o),c=G.useRef(i),f=G.useRef(r),h=G.useRef(!1),d=G.useRef();d.current===void 0&&(d.current=i(o));let p,m=!1;(a.current!==o||c.current!==i||f.current!==r||h.current)&&(p=i(o),m=!r(d.current,p)),Lb(()=>{m&&(d.current=p),a.current=o,c.current=i,f.current=r,h.current=!1});const y=G.useRef(o);Lb(()=>{const x=()=>{try{const S=e.getState(),A=c.current(S);f.current(d.current,A)||(a.current=S,d.current=A,s())}catch{h.current=!0,s()}},g=e.subscribe(x);return e.getState()!==y.current&&x(),g},[]);const _=m?p:d.current;return G.useDebugValue(_),_};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}var c3={exports:{}},u3={exports:{}},f3={};/** * @license React * scheduler.production.min.js * @@ -3896,7 +3869,7 @@ void main() { * * 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(k,q){var J=k.length;k.push(q);e:for(;0>>1,_e=k[Q];if(0>>1;Qr(ve,J))Te<_e&&0>r(we,ve)?(k[Q]=we,k[Te]=J,Q=Te):(k[Q]=ve,k[oe]=J,Q=oe);else if(Te<_e&&0>r(we,J))k[Q]=we,k[Te]=J,Q=Te;else break e}}return q}function r(k,q){var J=k.sortIndex-q.sortIndex;return J!==0?J:k.id-q.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 l=[],f=[],h=1,d=null,p=3,m=!1,y=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(k){for(var q=t(f);q!==null;){if(q.callback===null)i(f);else if(q.startTime<=k)i(f),q.sortIndex=q.expirationTime,e(l,q);else break;q=t(f)}}function E(k){if(_=!1,A(k),!y)if(t(l)!==null)y=!0,$(R);else{var q=t(f);q!==null&&le(E,q.startTime-k)}}function R(k,q){y=!1,_&&(_=!1,g(I),I=-1),m=!0;var J=p;try{for(A(q),d=t(l);d!==null&&(!(d.expirationTime>q)||k&&!D());){var Q=d.callback;if(typeof Q=="function"){d.callback=null,p=d.priorityLevel;var _e=Q(d.expirationTime<=q);q=n.unstable_now(),typeof _e=="function"?d.callback=_e:d===t(l)&&i(l),A(q)}else i(l);d=t(l)}if(d!==null)var De=!0;else{var oe=t(f);oe!==null&&le(E,oe.startTime-q),De=!1}return De}finally{d=null,p=J,m=!1}}var C=!1,L=null,I=-1,P=5,b=-1;function D(){return!(n.unstable_now()-bk||125Q?(k.sortIndex=J,e(f,k),t(l)===null&&k===t(f)&&(_?(g(I),I=-1):_=!0,le(E,J-Q))):(k.sortIndex=_e,e(l,k),y||m||(y=!0,$(R))),k},n.unstable_shouldYield=D,n.unstable_wrapCallback=function(k){var q=p;return function(){var J=p;p=q;try{return k.apply(this,arguments)}finally{p=J}}}})(eN);Q3.exports=eN;var rS=Q3.exports;/** + */(function(n){function e(k,q){var J=k.length;k.push(q);e:for(;0>>1,_e=k[$];if(0>>1;$r(ve,J))Te<_e&&0>r(Me,ve)?(k[$]=Me,k[Te]=J,$=Te):(k[$]=ve,k[oe]=J,$=oe);else if(Te<_e&&0>r(Me,J))k[$]=Me,k[Te]=J,$=Te;else break e}}return q}function r(k,q){var J=k.sortIndex-q.sortIndex;return J!==0?J:k.id-q.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 c=[],f=[],h=1,d=null,p=3,m=!1,y=!1,_=!1,x=typeof setTimeout=="function"?setTimeout:null,g=typeof clearTimeout=="function"?clearTimeout:null,S=typeof setImmediate<"u"?setImmediate:null;typeof navigator<"u"&&navigator.scheduling!==void 0&&navigator.scheduling.isInputPending!==void 0&&navigator.scheduling.isInputPending.bind(navigator.scheduling);function A(k){for(var q=t(f);q!==null;){if(q.callback===null)i(f);else if(q.startTime<=k)i(f),q.sortIndex=q.expirationTime,e(c,q);else break;q=t(f)}}function E(k){if(_=!1,A(k),!y)if(t(c)!==null)y=!0,Q(R);else{var q=t(f);q!==null&&le(E,q.startTime-k)}}function R(k,q){y=!1,_&&(_=!1,g(I),I=-1),m=!0;var J=p;try{for(A(q),d=t(c);d!==null&&(!(d.expirationTime>q)||k&&!N());){var $=d.callback;if(typeof $=="function"){d.callback=null,p=d.priorityLevel;var _e=$(d.expirationTime<=q);q=n.unstable_now(),typeof _e=="function"?d.callback=_e:d===t(c)&&i(c),A(q)}else i(c);d=t(c)}if(d!==null)var Ne=!0;else{var oe=t(f);oe!==null&&le(E,oe.startTime-q),Ne=!1}return Ne}finally{d=null,p=J,m=!1}}var C=!1,L=null,I=-1,P=5,b=-1;function N(){return!(n.unstable_now()-bk||125$?(k.sortIndex=J,e(f,k),t(c)===null&&k===t(f)&&(_?(g(I),I=-1):_=!0,le(E,J-$))):(k.sortIndex=_e,e(c,k),y||m||(y=!0,Q(R))),k},n.unstable_shouldYield=N,n.unstable_wrapCallback=function(k){var q=p;return function(){var J=p;p=q;try{return k.apply(this,arguments)}finally{p=J}}}})(f3);u3.exports=f3;var k_=u3.exports;/** * @license React * react-reconciler.production.min.js * @@ -3904,17 +3877,17 @@ void main() { * * This source code is licensed under the MIT license found in the * LICENSE file in the root directory of this source tree. - */var Y7=function(e){var t={},i=F,r=rS,s=Object.assign;function o(c){for(var u="https://reactjs.org/docs/error-decoder.html?invariant="+c,v=1;vY||M[B]!==T[Y]){var ue=` -`+M[B].replace(" at new "," at ");return c.displayName&&ue.includes("")&&(ue=ue.replace("",c.displayName)),ue}while(1<=B&&0<=Y);break}}}finally{rt=!1,Error.prepareStackTrace=v}return(c=c?c.displayName||c.name:"")?st(c):""}var nn=Object.prototype.hasOwnProperty,jt=[],wn=-1;function Tt(c){return{current:c}}function Oe(c){0>wn||(c.current=jt[wn],jt[wn]=null,wn--)}function yt(c,u){wn++,jt[wn]=c.current,c.current=u}var Ct={},Xt=Tt(Ct),In=Tt(!1),fi=Ct;function Wr(c,u){var v=c.type.contextTypes;if(!v)return Ct;var w=c.stateNode;if(w&&w.__reactInternalMemoizedUnmaskedChildContext===u)return w.__reactInternalMemoizedMaskedChildContext;var M={},T;for(T in v)M[T]=u[T];return w&&(c=c.stateNode,c.__reactInternalMemoizedUnmaskedChildContext=u,c.__reactInternalMemoizedMaskedChildContext=M),M}function It(c){return c=c.childContextTypes,c!=null}function zi(){Oe(In),Oe(Xt)}function yl(c,u,v){if(Xt.current!==Ct)throw Error(o(168));yt(Xt,u),yt(In,v)}function hi(c,u,v){var w=c.stateNode;if(u=u.childContextTypes,typeof w.getChildContext!="function")return v;w=w.getChildContext();for(var M in w)if(!(M in u))throw Error(o(108,I(c)||"Unknown",M));return s({},v,w)}function Qs(c){return c=(c=c.stateNode)&&c.__reactInternalMemoizedMergedChildContext||Ct,fi=Xt.current,yt(Xt,c),yt(In,In.current),!0}function Hh(c,u,v){var w=c.stateNode;if(!w)throw Error(o(169));v?(c=hi(c,u,fi),w.__reactInternalMemoizedMergedChildContext=c,Oe(In),Oe(Xt),yt(Xt,c)):Oe(In),yt(In,v)}var Ci=Math.clz32?Math.clz32:wN,SN=Math.log,AN=Math.LN2;function wN(c){return c>>>=0,c===0?32:31-(SN(c)/AN|0)|0}var Gh=64,Wh=4194304;function nu(c){switch(c&-c){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 c&4194240;case 4194304:case 8388608:case 16777216:case 33554432:case 67108864:return c&130023424;case 134217728:return 134217728;case 268435456:return 268435456;case 536870912:return 536870912;case 1073741824:return 1073741824;default:return c}}function jh(c,u){var v=c.pendingLanes;if(v===0)return 0;var w=0,M=c.suspendedLanes,T=c.pingedLanes,B=v&268435455;if(B!==0){var Y=B&~M;Y!==0?w=nu(Y):(T&=B,T!==0&&(w=nu(T)))}else B=v&~M,B!==0?w=nu(B):T!==0&&(w=nu(T));if(w===0)return 0;if(u!==0&&u!==w&&!(u&M)&&(M=w&-w,T=u&-u,M>=T||M===16&&(T&4194240)!==0))return u;if(w&4&&(w|=v&16),u=c.entangledLanes,u!==0)for(c=c.entanglements,u&=w;0v;v++)u.push(c);return u}function iu(c,u,v){c.pendingLanes|=u,u!==536870912&&(c.suspendedLanes=0,c.pingedLanes=0),c=c.eventTimes,u=31-Ci(u),c[u]=v}function TN(c,u){var v=c.pendingLanes&~u;c.pendingLanes=u,c.suspendedLanes=0,c.pingedLanes=0,c.expiredLanes&=u,c.mutableReadLanes&=u,c.entangledLanes&=u,u=c.entanglements;var w=c.eventTimes;for(c=c.expirationTimes;0>=B,M-=B,gs=1<<32-Ci(u)+M|v<kt?(Vn=vt,vt=null):Vn=vt.sibling;var Ft=ot(ie,vt,ce[kt],He);if(Ft===null){vt===null&&(vt=Vn);break}c&&vt&&Ft.alternate===null&&u(ie,vt),Z=T(Ft,Z,kt),Mt===null?et=Ft:Mt.sibling=Ft,Mt=Ft,vt=Vn}if(kt===ce.length)return v(ie,vt),rn&&ra(ie,kt),et;if(vt===null){for(;ktkt?(Vn=vt,vt=null):Vn=vt.sibling;var ao=ot(ie,vt,Ft.value,He);if(ao===null){vt===null&&(vt=Vn);break}c&&vt&&ao.alternate===null&&u(ie,vt),Z=T(ao,Z,kt),Mt===null?et=ao:Mt.sibling=ao,Mt=ao,vt=Vn}if(Ft.done)return v(ie,vt),rn&&ra(ie,kt),et;if(vt===null){for(;!Ft.done;kt++,Ft=ce.next())Ft=gt(ie,Ft.value,He),Ft!==null&&(Z=T(Ft,Z,kt),Mt===null?et=Ft:Mt.sibling=Ft,Mt=Ft);return rn&&ra(ie,kt),et}for(vt=w(ie,vt);!Ft.done;kt++,Ft=ce.next())Ft=Gt(vt,ie,kt,Ft.value,He),Ft!==null&&(c&&Ft.alternate!==null&&vt.delete(Ft.key===null?kt:Ft.key),Z=T(Ft,Z,kt),Mt===null?et=Ft:Mt.sibling=Ft,Mt=Ft);return c&&vt.forEach(function(fD){return u(ie,fD)}),rn&&ra(ie,kt),et}function fr(ie,Z,ce,He){if(typeof ce=="object"&&ce!==null&&ce.type===h&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case l:e:{for(var et=ce.key,Mt=Z;Mt!==null;){if(Mt.key===et){if(et=ce.type,et===h){if(Mt.tag===7){v(ie,Mt.sibling),Z=M(Mt,ce.props.children),Z.return=ie,ie=Z;break e}}else if(Mt.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===A&&BA(et)===Mt.type){v(ie,Mt.sibling),Z=M(Mt,ce.props),Z.ref=ou(ie,Mt,ce),Z.return=ie,ie=Z;break e}v(ie,Mt);break}else u(ie,Mt);Mt=Mt.sibling}ce.type===h?(Z=fa(ce.props.children,ie.mode,He,ce.key),Z.return=ie,ie=Z):(He=Nd(ce.type,ce.key,ce.props,null,ie.mode,He),He.ref=ou(ie,Z,ce),He.return=ie,ie=He)}return B(ie);case f:e:{for(Mt=ce.key;Z!==null;){if(Z.key===Mt)if(Z.tag===4&&Z.stateNode.containerInfo===ce.containerInfo&&Z.stateNode.implementation===ce.implementation){v(ie,Z.sibling),Z=M(Z,ce.children||[]),Z.return=ie,ie=Z;break e}else{v(ie,Z);break}else u(ie,Z);Z=Z.sibling}Z=yv(ce,ie.mode,He),Z.return=ie,ie=Z}return B(ie);case A:return Mt=ce._init,fr(ie,Z,Mt(ce._payload),He)}if(ne(ce))return tt(ie,Z,ce,He);if(C(ce))return ei(ie,Z,ce,He);nd(ie,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"?(ce=""+ce,Z!==null&&Z.tag===6?(v(ie,Z.sibling),Z=M(Z,ce),Z.return=ie,ie=Z):(v(ie,Z),Z=vv(ce,ie.mode,He),Z.return=ie,ie=Z),B(ie)):v(ie,Z)}return fr}var Ml=zA(!0),VA=zA(!1),au={},ar=Tt(au),lu=Tt(au),El=Tt(au);function Kr(c){if(c===au)throw Error(o(174));return c}function U0(c,u){yt(El,u),yt(lu,c),yt(ar,au),c=le(u),Oe(ar),yt(ar,c)}function Tl(){Oe(ar),Oe(lu),Oe(El)}function HA(c){var u=Kr(El.current),v=Kr(ar.current);u=k(v,c.type,u),v!==u&&(yt(lu,c),yt(ar,u))}function O0(c){lu.current===c&&(Oe(ar),Oe(lu))}var ln=Tt(0);function id(c){for(var u=c;u!==null;){if(u.tag===13){var v=u.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||tu(v)||$s(v)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===c)break;for(;u.sibling===null;){if(u.return===null||u.return===c)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var k0=[];function F0(){for(var c=0;cv?v:4,c(!0);var w=lr.transition;lr.transition={};try{c(!1),u()}finally{Ot=v,lr.transition=w}}function nw(){return Zr().memoizedState}function FN(c,u,v){var w=ro(c);v={lane:w,action:v,hasEagerState:!1,eagerState:null,next:null},iw(c)?rw(u,v):(sw(c,u,v),v=pi(),c=cr(c,w,v),c!==null&&ow(c,u,w))}function BN(c,u,v){var w=ro(c),M={lane:w,action:v,hasEagerState:!1,eagerState:null,next:null};if(iw(c))rw(u,M);else{sw(c,u,M);var T=c.alternate;if(c.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var B=u.lastRenderedState,Y=T(B,v);if(M.hasEagerState=!0,M.eagerState=Y,Xr(Y,B))return}catch{}finally{}v=pi(),c=cr(c,w,v),c!==null&&ow(c,u,w)}}function iw(c){var u=c.alternate;return c===pn||u!==null&&u===pn}function rw(c,u){cu=sd=!0;var v=c.pending;v===null?u.next=u:(u.next=v.next,v.next=u),c.pending=u}function sw(c,u,v){Mn!==null&&c.mode&1&&!(Et&2)?(c=u.interleaved,c===null?(v.next=v,qr===null?qr=[u]:qr.push(u)):(v.next=c.next,c.next=v),u.interleaved=v):(c=u.pending,c===null?v.next=v:(v.next=c.next,c.next=v),u.pending=v)}function ow(c,u,v){if(v&4194240){var w=u.lanes;w&=c.pendingLanes,v|=w,u.lanes=v,y0(c,v)}}var ud={readContext:rr,useCallback:$n,useContext:$n,useEffect:$n,useImperativeHandle:$n,useInsertionEffect:$n,useLayoutEffect:$n,useMemo:$n,useReducer:$n,useRef:$n,useState:$n,useDebugValue:$n,useDeferredValue:$n,useTransition:$n,useMutableSource:$n,useSyncExternalStore:$n,useId:$n,unstable_isNewReconciler:!1},zN={readContext:rr,useCallback:function(c,u){return ys().memoizedState=[c,u===void 0?null:u],c},useContext:rr,useEffect:G0,useImperativeHandle:function(c,u,v){return v=v!=null?v.concat([c]):null,ld(4194308,4,$A.bind(null,u,c),v)},useLayoutEffect:function(c,u){return ld(4194308,4,c,u)},useInsertionEffect:function(c,u){return ld(4,2,c,u)},useMemo:function(c,u){var v=ys();return u=u===void 0?null:u,c=c(),v.memoizedState=[c,u],c},useReducer:function(c,u,v){var w=ys();return u=v!==void 0?v(u):u,w.memoizedState=w.baseState=u,c={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:c,lastRenderedState:u},w.queue=c,c=c.dispatch=FN.bind(null,pn,c),[w.memoizedState,c]},useRef:function(c){var u=ys();return c={current:c},u.memoizedState=c},useState:H0,useDebugValue:W0,useDeferredValue:function(c){var u=H0(c),v=u[0],w=u[1];return G0(function(){var M=lr.transition;lr.transition={};try{w(c)}finally{lr.transition=M}},[c]),v},useTransition:function(){var c=H0(!1),u=c[0];return c=kN.bind(null,c[1]),ys().memoizedState=c,[u,c]},useMutableSource:function(){},useSyncExternalStore:function(c,u,v){var w=pn,M=ys();if(rn){if(v===void 0)throw Error(o(407));v=v()}else{if(v=u(),Mn===null)throw Error(o(349));bl&30||jA(w,u,v)}M.memoizedState=v;var T={value:v,getSnapshot:u};return M.queue=T,G0(YA.bind(null,w,T,c),[c]),w.flags|=2048,fu(9,XA.bind(null,w,T,v,u),void 0,null),v},useId:function(){var c=ys(),u=Mn.identifierPrefix;if(rn){var v=vs,w=gs;v=(w&~(1<<32-Ci(w)-1)).toString(32)+v,u=":"+u+"R"+v,v=uu++,0Y||w[F]!==T[Y]){var ue=` +`+w[F].replace(" at new "," at ");return l.displayName&&ue.includes("")&&(ue=ue.replace("",l.displayName)),ue}while(1<=F&&0<=Y);break}}}finally{rt=!1,Error.prepareStackTrace=v}return(l=l?l.displayName||l.name:"")?st(l):""}var en=Object.prototype.hasOwnProperty,jt=[],Mn=-1;function Tt(l){return{current:l}}function Oe(l){0>Mn||(l.current=jt[Mn],jt[Mn]=null,Mn--)}function yt(l,u){Mn++,jt[Mn]=l.current,l.current=u}var Ct={},Xt=Tt(Ct),Ln=Tt(!1),ui=Ct;function Gr(l,u){var v=l.type.contextTypes;if(!v)return Ct;var M=l.stateNode;if(M&&M.__reactInternalMemoizedUnmaskedChildContext===u)return M.__reactInternalMemoizedMaskedChildContext;var w={},T;for(T in v)w[T]=u[T];return M&&(l=l.stateNode,l.__reactInternalMemoizedUnmaskedChildContext=u,l.__reactInternalMemoizedMaskedChildContext=w),w}function It(l){return l=l.childContextTypes,l!=null}function Bi(){Oe(Ln),Oe(Xt)}function fl(l,u,v){if(Xt.current!==Ct)throw Error(o(168));yt(Xt,u),yt(Ln,v)}function fi(l,u,v){var M=l.stateNode;if(u=u.childContextTypes,typeof M.getChildContext!="function")return v;M=M.getChildContext();for(var w in M)if(!(w in u))throw Error(o(108,I(l)||"Unknown",w));return s({},v,M)}function Ks(l){return l=(l=l.stateNode)&&l.__reactInternalMemoizedMergedChildContext||Ct,ui=Xt.current,yt(Xt,l),yt(Ln,Ln.current),!0}function Ph(l,u,v){var M=l.stateNode;if(!M)throw Error(o(169));v?(l=fi(l,u,ui),M.__reactInternalMemoizedMergedChildContext=l,Oe(Ln),Oe(Xt),yt(Xt,l)):Oe(Ln),yt(Ln,v)}var bi=Math.clz32?Math.clz32:N3,I3=Math.log,D3=Math.LN2;function N3(l){return l>>>=0,l===0?32:31-(I3(l)/D3|0)|0}var Rh=64,Lh=4194304;function qc(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 Ih(l,u){var v=l.pendingLanes;if(v===0)return 0;var M=0,w=l.suspendedLanes,T=l.pingedLanes,F=v&268435455;if(F!==0){var Y=F&~w;Y!==0?M=qc(Y):(T&=F,T!==0&&(M=qc(T)))}else F=v&~w,F!==0?M=qc(F):T!==0&&(M=qc(T));if(M===0)return 0;if(u!==0&&u!==M&&!(u&w)&&(w=M&-M,T=u&-u,w>=T||w===16&&(T&4194240)!==0))return u;if(M&4&&(M|=v&16),u=l.entangledLanes,u!==0)for(l=l.entanglements,u&=M;0v;v++)u.push(l);return u}function Zc(l,u,v){l.pendingLanes|=u,u!==536870912&&(l.suspendedLanes=0,l.pingedLanes=0),l=l.eventTimes,u=31-bi(u),l[u]=v}function k3(l,u){var v=l.pendingLanes&~u;l.pendingLanes=u,l.suspendedLanes=0,l.pingedLanes=0,l.expiredLanes&=u,l.mutableReadLanes&=u,l.entangledLanes&=u,u=l.entanglements;var M=l.eventTimes;for(l=l.expirationTimes;0>=F,w-=F,ps=1<<32-bi(u)+w|v<kt?(zn=vt,vt=null):zn=vt.sibling;var Ft=ot(ie,vt,ce[kt],He);if(Ft===null){vt===null&&(vt=zn);break}l&&vt&&Ft.alternate===null&&u(ie,vt),K=T(Ft,K,kt),wt===null?et=Ft:wt.sibling=Ft,wt=Ft,vt=zn}if(kt===ce.length)return v(ie,vt),tn&&Qo(ie,kt),et;if(vt===null){for(;ktkt?(zn=vt,vt=null):zn=vt.sibling;var ro=ot(ie,vt,Ft.value,He);if(ro===null){vt===null&&(vt=zn);break}l&&vt&&ro.alternate===null&&u(ie,vt),K=T(ro,K,kt),wt===null?et=ro:wt.sibling=ro,wt=ro,vt=zn}if(Ft.done)return v(ie,vt),tn&&Qo(ie,kt),et;if(vt===null){for(;!Ft.done;kt++,Ft=ce.next())Ft=gt(ie,Ft.value,He),Ft!==null&&(K=T(Ft,K,kt),wt===null?et=Ft:wt.sibling=Ft,wt=Ft);return tn&&Qo(ie,kt),et}for(vt=M(ie,vt);!Ft.done;kt++,Ft=ce.next())Ft=Gt(vt,ie,kt,Ft.value,He),Ft!==null&&(l&&Ft.alternate!==null&&vt.delete(Ft.key===null?kt:Ft.key),K=T(Ft,K,kt),wt===null?et=Ft:wt.sibling=Ft,wt=Ft);return l&&vt.forEach(function(AD){return u(ie,AD)}),tn&&Qo(ie,kt),et}function ur(ie,K,ce,He){if(typeof ce=="object"&&ce!==null&&ce.type===h&&ce.key===null&&(ce=ce.props.children),typeof ce=="object"&&ce!==null){switch(ce.$$typeof){case c:e:{for(var et=ce.key,wt=K;wt!==null;){if(wt.key===et){if(et=ce.type,et===h){if(wt.tag===7){v(ie,wt.sibling),K=w(wt,ce.props.children),K.return=ie,ie=K;break e}}else if(wt.elementType===et||typeof et=="object"&&et!==null&&et.$$typeof===A&&gA(et)===wt.type){v(ie,wt.sibling),K=w(wt,ce.props),K.ref=Qc(ie,wt,ce),K.return=ie,ie=K;break e}v(ie,wt);break}else u(ie,wt);wt=wt.sibling}ce.type===h?(K=sa(ce.props.children,ie.mode,He,ce.key),K.return=ie,ie=K):(He=_d(ce.type,ce.key,ce.props,null,ie.mode,He),He.ref=Qc(ie,K,ce),He.return=ie,ie=He)}return F(ie);case f:e:{for(wt=ce.key;K!==null;){if(K.key===wt)if(K.tag===4&&K.stateNode.containerInfo===ce.containerInfo&&K.stateNode.implementation===ce.implementation){v(ie,K.sibling),K=w(K,ce.children||[]),K.return=ie,ie=K;break e}else{v(ie,K);break}else u(ie,K);K=K.sibling}K=nv(ce,ie.mode,He),K.return=ie,ie=K}return F(ie);case A:return wt=ce._init,ur(ie,K,wt(ce._payload),He)}if(ne(ce))return tt(ie,K,ce,He);if(C(ce))return $n(ie,K,ce,He);Gh(ie,ce)}return typeof ce=="string"&&ce!==""||typeof ce=="number"?(ce=""+ce,K!==null&&K.tag===6?(v(ie,K.sibling),K=w(K,ce),K.return=ie,ie=K):(v(ie,K),K=tv(ce,ie.mode,He),K.return=ie,ie=K),F(ie)):v(ie,K)}return ur}var vl=vA(!0),yA=vA(!1),$c={},or=Tt($c),eu=Tt($c),yl=Tt($c);function qr(l){if(l===$c)throw Error(o(174));return l}function x0(l,u){yt(yl,u),yt(eu,l),yt(or,$c),l=le(u),Oe(or),yt(or,l)}function xl(){Oe(or),Oe(eu),Oe(yl)}function xA(l){var u=qr(yl.current),v=qr(or.current);u=k(v,l.type,u),v!==u&&(yt(eu,l),yt(or,u))}function _0(l){eu.current===l&&(Oe(or),Oe(eu))}var ln=Tt(0);function Wh(l){for(var u=l;u!==null;){if(u.tag===13){var v=u.memoizedState;if(v!==null&&(v=v.dehydrated,v===null||Yc(v)||Zs(v)))return u}else if(u.tag===19&&u.memoizedProps.revealOrder!==void 0){if(u.flags&128)return u}else if(u.child!==null){u.child.return=u,u=u.child;continue}if(u===l)break;for(;u.sibling===null;){if(u.return===null||u.return===l)return null;u=u.return}u.sibling.return=u.return,u=u.sibling}return null}var S0=[];function A0(){for(var l=0;lv?v:4,l(!0);var M=ar.transition;ar.transition={};try{l(!1),u()}finally{Ot=v,ar.transition=M}}function DA(){return Zr().memoizedState}function Z3(l,u,v){var M=to(l);v={lane:M,action:v,hasEagerState:!1,eagerState:null,next:null},NA(l)?UA(u,v):(OA(l,u,v),v=di(),l=lr(l,M,v),l!==null&&kA(l,u,M))}function K3(l,u,v){var M=to(l),w={lane:M,action:v,hasEagerState:!1,eagerState:null,next:null};if(NA(l))UA(u,w);else{OA(l,u,w);var T=l.alternate;if(l.lanes===0&&(T===null||T.lanes===0)&&(T=u.lastRenderedReducer,T!==null))try{var F=u.lastRenderedState,Y=T(F,v);if(w.hasEagerState=!0,w.eagerState=Y,jr(Y,F))return}catch{}finally{}v=di(),l=lr(l,M,v),l!==null&&kA(l,u,M)}}function NA(l){var u=l.alternate;return l===pn||u!==null&&u===pn}function UA(l,u){tu=Xh=!0;var v=l.pending;v===null?u.next=u:(u.next=v.next,v.next=u),l.pending=u}function OA(l,u,v){wn!==null&&l.mode&1&&!(Et&2)?(l=u.interleaved,l===null?(v.next=v,Yr===null?Yr=[u]:Yr.push(u)):(v.next=l.next,l.next=v),u.interleaved=v):(l=u.pending,l===null?v.next=v:(v.next=l.next,l.next=v),u.pending=v)}function kA(l,u,v){if(v&4194240){var M=u.lanes;M&=l.pendingLanes,v|=M,u.lanes=v,n0(l,v)}}var Jh={readContext:ir,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},J3={readContext:ir,useCallback:function(l,u){return gs().memoizedState=[l,u===void 0?null:u],l},useContext:ir,useEffect:b0,useImperativeHandle:function(l,u,v){return v=v!=null?v.concat([l]):null,Zh(4194308,4,PA.bind(null,u,l),v)},useLayoutEffect:function(l,u){return Zh(4194308,4,l,u)},useInsertionEffect:function(l,u){return Zh(4,2,l,u)},useMemo:function(l,u){var v=gs();return u=u===void 0?null:u,l=l(),v.memoizedState=[l,u],l},useReducer:function(l,u,v){var M=gs();return u=v!==void 0?v(u):u,M.memoizedState=M.baseState=u,l={pending:null,interleaved:null,lanes:0,dispatch:null,lastRenderedReducer:l,lastRenderedState:u},M.queue=l,l=l.dispatch=Z3.bind(null,pn,l),[M.memoizedState,l]},useRef:function(l){var u=gs();return l={current:l},u.memoizedState=l},useState:T0,useDebugValue:C0,useDeferredValue:function(l){var u=T0(l),v=u[0],M=u[1];return b0(function(){var w=ar.transition;ar.transition={};try{M(l)}finally{ar.transition=w}},[l]),v},useTransition:function(){var l=T0(!1),u=l[0];return l=q3.bind(null,l[1]),gs().memoizedState=l,[u,l]},useMutableSource:function(){},useSyncExternalStore:function(l,u,v){var M=pn,w=gs();if(tn){if(v===void 0)throw Error(o(407));v=v()}else{if(v=u(),wn===null)throw Error(o(349));_l&30||AA(M,u,v)}w.memoizedState=v;var T={value:v,getSnapshot:u};return w.queue=T,b0(wA.bind(null,M,T,l),[l]),M.flags|=2048,iu(9,MA.bind(null,M,T,v,u),void 0,null),v},useId:function(){var l=gs(),u=wn.identifierPrefix;if(tn){var v=ms,M=ps;v=(M&~(1<<32-bi(M)-1)).toString(32)+v,u=":"+u+"R"+v,v=nu++,0cv&&(u.flags|=128,w=!0,mu(M,!1),u.lanes=4194304)}else{if(!w)if(c=id(T),c!==null){if(u.flags|=128,w=!0,c=c.updateQueue,c!==null&&(u.updateQueue=c,u.flags|=4),mu(M,!0),M.tail===null&&M.tailMode==="hidden"&&!T.alternate&&!rn)return Qn(u),null}else 2*Bn()-M.renderingStartTime>cv&&v!==1073741824&&(u.flags|=128,w=!0,mu(M,!1),u.lanes=4194304);M.isBackwards?(T.sibling=u.child,u.child=T):(c=M.last,c!==null?c.sibling=T:u.child=T,M.last=T)}return M.tail!==null?(u=M.tail,M.rendering=u,M.tail=u.sibling,M.renderingStartTime=Bn(),u.sibling=null,c=ln.current,yt(ln,w?c&1|2:c&1),u):(Qn(u),null);case 22:case 23:return pv(),w=u.memoizedState!==null,c!==null&&c.memoizedState!==null!==w&&(u.flags|=8192),w&&u.mode&1?Wi&1073741824&&(Qn(u),V&&u.subtreeFlags&6&&(u.flags|=8192)):Qn(u),null;case 24:return null;case 25:return null}throw Error(o(156,u.tag))}var jN=a.ReactCurrentOwner,Gi=!1;function di(c,u,v,w){u.child=c===null?VA(u,null,v,w):Ml(u,c.child,v,w)}function pw(c,u,v,w,M){v=v.render;var T=u.ref;return _l(u,M),w=z0(c,u,v,w,T,M),v=V0(),c!==null&&!Gi?(u.updateQueue=c.updateQueue,u.flags&=-2053,c.lanes&=~M,xs(c,u,M)):(rn&&v&&R0(u),u.flags|=1,di(c,u,w,M),u.child)}function mw(c,u,v,w,M){if(c===null){var T=v.type;return typeof T=="function"&&!gv(T)&&T.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(u.tag=15,u.type=T,gw(c,u,T,w,M)):(c=Nd(v.type,null,w,u,u.mode,M),c.ref=u.ref,c.return=u,u.child=c)}if(T=c.child,!(c.lanes&M)){var B=T.memoizedProps;if(v=v.compare,v=v!==null?v:qh,v(B,w)&&c.ref===u.ref)return xs(c,u,M)}return u.flags|=1,c=oo(T,w),c.ref=u.ref,c.return=u,u.child=c}function gw(c,u,v,w,M){if(c!==null&&qh(c.memoizedProps,w)&&c.ref===u.ref)if(Gi=!1,(c.lanes&M)!==0)c.flags&131072&&(Gi=!0);else return u.lanes=c.lanes,xs(c,u,M);return Y0(c,u,v,w,M)}function vw(c,u,v){var w=u.pendingProps,M=w.children,T=c!==null?c.memoizedState:null;if(w.mode==="hidden")if(!(u.mode&1))u.memoizedState={baseLanes:0,cachePool:null},yt(Cl,Wi),Wi|=v;else if(v&1073741824)u.memoizedState={baseLanes:0,cachePool:null},w=T!==null?T.baseLanes:v,yt(Cl,Wi),Wi|=w;else return c=T!==null?T.baseLanes|v:v,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:c,cachePool:null},u.updateQueue=null,yt(Cl,Wi),Wi|=c,null;else T!==null?(w=T.baseLanes|v,u.memoizedState=null):w=v,yt(Cl,Wi),Wi|=w;return di(c,u,M,v),u.child}function yw(c,u){var v=u.ref;(c===null&&v!==null||c!==null&&c.ref!==v)&&(u.flags|=512,u.flags|=2097152)}function Y0(c,u,v,w,M){var T=It(v)?fi:Xt.current;return T=Wr(u,T),_l(u,M),v=z0(c,u,v,w,T,M),w=V0(),c!==null&&!Gi?(u.updateQueue=c.updateQueue,u.flags&=-2053,c.lanes&=~M,xs(c,u,M)):(rn&&w&&R0(u),u.flags|=1,di(c,u,v,M),u.child)}function xw(c,u,v,w,M){if(It(v)){var T=!0;Qs(u)}else T=!1;if(_l(u,M),u.stateNode===null)c!==null&&(c.alternate=null,u.alternate=null,u.flags|=2),NA(u,v,w),P0(u,v,w,M),w=!0;else if(c===null){var B=u.stateNode,Y=u.memoizedProps;B.props=Y;var ue=B.context,Le=v.contextType;typeof Le=="object"&&Le!==null?Le=rr(Le):(Le=It(v)?fi:Xt.current,Le=Wr(u,Le));var qe=v.getDerivedStateFromProps,gt=typeof qe=="function"||typeof B.getSnapshotBeforeUpdate=="function";gt||typeof B.UNSAFE_componentWillReceiveProps!="function"&&typeof B.componentWillReceiveProps!="function"||(Y!==w||ue!==Le)&&DA(u,B,w,Le),eo=!1;var ot=u.memoizedState;B.state=ot,$h(u,w,B,M),ue=u.memoizedState,Y!==w||ot!==ue||In.current||eo?(typeof qe=="function"&&(C0(u,v,qe,w),ue=u.memoizedState),(Y=eo||IA(u,v,Y,w,ot,ue,Le))?(gt||typeof B.UNSAFE_componentWillMount!="function"&&typeof B.componentWillMount!="function"||(typeof B.componentWillMount=="function"&&B.componentWillMount(),typeof B.UNSAFE_componentWillMount=="function"&&B.UNSAFE_componentWillMount()),typeof B.componentDidMount=="function"&&(u.flags|=4194308)):(typeof B.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=w,u.memoizedState=ue),B.props=w,B.state=ue,B.context=Le,w=Y):(typeof B.componentDidMount=="function"&&(u.flags|=4194308),w=!1)}else{B=u.stateNode,CA(c,u),Y=u.memoizedProps,Le=u.type===u.elementType?Y:wr(u.type,Y),B.props=Le,gt=u.pendingProps,ot=B.context,ue=v.contextType,typeof ue=="object"&&ue!==null?ue=rr(ue):(ue=It(v)?fi:Xt.current,ue=Wr(u,ue));var Gt=v.getDerivedStateFromProps;(qe=typeof Gt=="function"||typeof B.getSnapshotBeforeUpdate=="function")||typeof B.UNSAFE_componentWillReceiveProps!="function"&&typeof B.componentWillReceiveProps!="function"||(Y!==gt||ot!==ue)&&DA(u,B,w,ue),eo=!1,ot=u.memoizedState,B.state=ot,$h(u,w,B,M);var tt=u.memoizedState;Y!==gt||ot!==tt||In.current||eo?(typeof Gt=="function"&&(C0(u,v,Gt,w),tt=u.memoizedState),(Le=eo||IA(u,v,Le,w,ot,tt,ue)||!1)?(qe||typeof B.UNSAFE_componentWillUpdate!="function"&&typeof B.componentWillUpdate!="function"||(typeof B.componentWillUpdate=="function"&&B.componentWillUpdate(w,tt,ue),typeof B.UNSAFE_componentWillUpdate=="function"&&B.UNSAFE_componentWillUpdate(w,tt,ue)),typeof B.componentDidUpdate=="function"&&(u.flags|=4),typeof B.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof B.componentDidUpdate!="function"||Y===c.memoizedProps&&ot===c.memoizedState||(u.flags|=4),typeof B.getSnapshotBeforeUpdate!="function"||Y===c.memoizedProps&&ot===c.memoizedState||(u.flags|=1024),u.memoizedProps=w,u.memoizedState=tt),B.props=w,B.state=tt,B.context=ue,w=Le):(typeof B.componentDidUpdate!="function"||Y===c.memoizedProps&&ot===c.memoizedState||(u.flags|=4),typeof B.getSnapshotBeforeUpdate!="function"||Y===c.memoizedProps&&ot===c.memoizedState||(u.flags|=1024),w=!1)}return q0(c,u,v,w,T,M)}function q0(c,u,v,w,M,T){yw(c,u);var B=(u.flags&128)!==0;if(!w&&!B)return M&&Hh(u,v,!1),xs(c,u,T);w=u.stateNode,jN.current=u;var Y=B&&typeof v.getDerivedStateFromError!="function"?null:w.render();return u.flags|=1,c!==null&&B?(u.child=Ml(u,c.child,null,T),u.child=Ml(u,null,Y,T)):di(c,u,Y,T),u.memoizedState=w.state,M&&Hh(u,v,!0),u.child}function _w(c){var u=c.stateNode;u.pendingContext?yl(c,u.pendingContext,u.pendingContext!==u.context):u.context&&yl(c,u.context,!1),U0(c,u.containerInfo)}function Sw(c,u,v,w,M){return wl(),D0(M),u.flags|=256,di(c,u,v,w),u.child}var dd={dehydrated:null,treeContext:null,retryLane:0};function pd(c){return{baseLanes:c,cachePool:null}}function Aw(c,u,v){var w=u.pendingProps,M=ln.current,T=!1,B=(u.flags&128)!==0,Y;if((Y=B)||(Y=c!==null&&c.memoizedState===null?!1:(M&2)!==0),Y?(T=!0,u.flags&=-129):(c===null||c.memoizedState!==null)&&(M|=1),yt(ln,M&1),c===null)return N0(u),c=u.memoizedState,c!==null&&(c=c.dehydrated,c!==null)?(u.mode&1?$s(c)?u.lanes=8:u.lanes=1073741824:u.lanes=1,null):(M=w.children,c=w.fallback,T?(w=u.mode,T=u.child,M={mode:"hidden",children:M},!(w&1)&&T!==null?(T.childLanes=0,T.pendingProps=M):T=Dd(M,w,0,null),c=fa(c,w,v,null),T.return=u,c.return=u,T.sibling=c,u.child=T,u.child.memoizedState=pd(v),u.memoizedState=dd,c):K0(u,M));if(M=c.memoizedState,M!==null){if(Y=M.dehydrated,Y!==null){if(B)return u.flags&256?(u.flags&=-257,md(c,u,v,Error(o(422)))):u.memoizedState!==null?(u.child=c.child,u.flags|=128,null):(T=w.fallback,M=u.mode,w=Dd({mode:"visible",children:w.children},M,0,null),T=fa(T,M,v,null),T.flags|=2,w.return=u,T.return=u,w.sibling=T,u.child=w,u.mode&1&&Ml(u,c.child,null,v),u.child.memoizedState=pd(v),u.memoizedState=dd,T);if(!(u.mode&1))u=md(c,u,v,null);else if($s(Y))u=md(c,u,v,Error(o(419)));else if(w=(v&c.childLanes)!==0,Gi||w){if(w=Mn,w!==null){switch(v&-v){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}w=T&(w.suspendedLanes|v)?0:T,w!==0&&w!==M.retryLane&&(M.retryLane=w,cr(c,w,-1))}mv(),u=md(c,u,v,Error(o(421)))}else tu(Y)?(u.flags|=128,u.child=c.child,u=rD.bind(null,c),Bh(Y,u),u=null):(v=M.treeContext,fe&&(Hi=d0(Y),Vi=u,rn=!0,Mr=null,ru=!1,v!==null&&(sr[or++]=gs,sr[or++]=vs,sr[or++]=ia,gs=v.id,vs=v.overflow,ia=u)),u=K0(u,u.pendingProps.children),u.flags|=4096);return u}return T?(w=Mw(c,u,w.children,w.fallback,v),T=u.child,M=c.child.memoizedState,T.memoizedState=M===null?pd(v):{baseLanes:M.baseLanes|v,cachePool:null},T.childLanes=c.childLanes&~v,u.memoizedState=dd,w):(v=ww(c,u,w.children,v),u.memoizedState=null,v)}return T?(w=Mw(c,u,w.children,w.fallback,v),T=u.child,M=c.child.memoizedState,T.memoizedState=M===null?pd(v):{baseLanes:M.baseLanes|v,cachePool:null},T.childLanes=c.childLanes&~v,u.memoizedState=dd,w):(v=ww(c,u,w.children,v),u.memoizedState=null,v)}function K0(c,u){return u=Dd({mode:"visible",children:u},c.mode,0,null),u.return=c,c.child=u}function ww(c,u,v,w){var M=c.child;return c=M.sibling,v=oo(M,{mode:"visible",children:v}),!(u.mode&1)&&(v.lanes=w),v.return=u,v.sibling=null,c!==null&&(w=u.deletions,w===null?(u.deletions=[c],u.flags|=16):w.push(c)),u.child=v}function Mw(c,u,v,w,M){var T=u.mode;c=c.child;var B=c.sibling,Y={mode:"hidden",children:v};return!(T&1)&&u.child!==c?(v=u.child,v.childLanes=0,v.pendingProps=Y,u.deletions=null):(v=oo(c,Y),v.subtreeFlags=c.subtreeFlags&14680064),B!==null?w=oo(B,w):(w=fa(w,T,M,null),w.flags|=2),w.return=u,v.return=u,v.sibling=w,u.child=v,w}function md(c,u,v,w){return w!==null&&D0(w),Ml(u,c.child,null,v),c=K0(u,u.pendingProps.children),c.flags|=2,u.memoizedState=null,c}function Ew(c,u,v){c.lanes|=u;var w=c.alternate;w!==null&&(w.lanes|=u),T0(c.return,u,v)}function Z0(c,u,v,w,M){var T=c.memoizedState;T===null?c.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:w,tail:v,tailMode:M}:(T.isBackwards=u,T.rendering=null,T.renderingStartTime=0,T.last=w,T.tail=v,T.tailMode=M)}function Tw(c,u,v){var w=u.pendingProps,M=w.revealOrder,T=w.tail;if(di(c,u,w.children,v),w=ln.current,w&2)w=w&1|2,u.flags|=128;else{if(c!==null&&c.flags&128)e:for(c=u.child;c!==null;){if(c.tag===13)c.memoizedState!==null&&Ew(c,v,u);else if(c.tag===19)Ew(c,v,u);else if(c.child!==null){c.child.return=c,c=c.child;continue}if(c===u)break e;for(;c.sibling===null;){if(c.return===null||c.return===u)break e;c=c.return}c.sibling.return=c.return,c=c.sibling}w&=1}if(yt(ln,w),!(u.mode&1))u.memoizedState=null;else switch(M){case"forwards":for(v=u.child,M=null;v!==null;)c=v.alternate,c!==null&&id(c)===null&&(M=v),v=v.sibling;v=M,v===null?(M=u.child,u.child=null):(M=v.sibling,v.sibling=null),Z0(u,!1,M,v,T);break;case"backwards":for(v=null,M=u.child,u.child=null;M!==null;){if(c=M.alternate,c!==null&&id(c)===null){u.child=M;break}c=M.sibling,M.sibling=v,v=M,M=c}Z0(u,!0,v,null,T);break;case"together":Z0(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function xs(c,u,v){if(c!==null&&(u.dependencies=c.dependencies),Pl|=u.lanes,!(v&u.childLanes))return null;if(c!==null&&u.child!==c.child)throw Error(o(153));if(u.child!==null){for(c=u.child,v=oo(c,c.pendingProps),u.child=v,v.return=u;c.sibling!==null;)c=c.sibling,v=v.sibling=oo(c,c.pendingProps),v.return=u;v.sibling=null}return u.child}function XN(c,u,v){switch(u.tag){case 3:_w(u),wl();break;case 5:HA(u);break;case 1:It(u.type)&&Qs(u);break;case 4:U0(u,u.stateNode.containerInfo);break;case 10:bA(u,u.type._context,u.memoizedProps.value);break;case 13:var w=u.memoizedState;if(w!==null)return w.dehydrated!==null?(yt(ln,ln.current&1),u.flags|=128,null):v&u.child.childLanes?Aw(c,u,v):(yt(ln,ln.current&1),c=xs(c,u,v),c!==null?c.sibling:null);yt(ln,ln.current&1);break;case 19:if(w=(v&u.childLanes)!==0,c.flags&128){if(w)return Tw(c,u,v);u.flags|=128}var M=u.memoizedState;if(M!==null&&(M.rendering=null,M.tail=null,M.lastEffect=null),yt(ln,ln.current),w)break;return null;case 22:case 23:return u.lanes=0,vw(c,u,v)}return xs(c,u,v)}function YN(c,u){switch(L0(u),u.tag){case 1:return It(u.type)&&zi(),c=u.flags,c&65536?(u.flags=c&-65537|128,u):null;case 3:return Tl(),Oe(In),Oe(Xt),F0(),c=u.flags,c&65536&&!(c&128)?(u.flags=c&-65537|128,u):null;case 5:return O0(u),null;case 13:if(Oe(ln),c=u.memoizedState,c!==null&&c.dehydrated!==null){if(u.alternate===null)throw Error(o(340));wl()}return c=u.flags,c&65536?(u.flags=c&-65537|128,u):null;case 19:return Oe(ln),null;case 4:return Tl(),null;case 10:return E0(u.type._context),null;case 22:case 23:return pv(),null;case 24:return null;default:return null}}var gd=!1,oa=!1,qN=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function vd(c,u){var v=c.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(w){Li(c,u,w)}else v.current=null}function J0(c,u,v){try{v()}catch(w){Li(c,u,w)}}var bw=!1;function KN(c,u){for(q(c.containerInfo),Ve=u;Ve!==null;)if(c=Ve,u=c.child,(c.subtreeFlags&1028)!==0&&u!==null)u.return=c,Ve=u;else for(;Ve!==null;){c=Ve;try{var v=c.alternate;if(c.flags&1024)switch(c.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var w=v.memoizedProps,M=v.memoizedState,T=c.stateNode,B=T.getSnapshotBeforeUpdate(c.elementType===c.type?w:wr(c.type,w),M);T.__reactInternalSnapshotBeforeUpdate=B}break;case 3:V&&Ie(c.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(Y){Li(c,c.return,Y)}if(u=c.sibling,u!==null){u.return=c.return,Ve=u;break}Ve=c.return}return v=bw,bw=!1,v}function aa(c,u,v){var w=u.updateQueue;if(w=w!==null?w.lastEffect:null,w!==null){var M=w=w.next;do{if((M.tag&c)===c){var T=M.destroy;M.destroy=void 0,T!==void 0&&J0(u,v,T)}M=M.next}while(M!==w)}}function gu(c,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var v=u=u.next;do{if((v.tag&c)===c){var w=v.create;v.destroy=w()}v=v.next}while(v!==u)}}function $0(c){var u=c.ref;if(u!==null){var v=c.stateNode;switch(c.tag){case 5:c=$(v);break;default:c=v}typeof u=="function"?u(c):u.current=c}}function Cw(c,u,v){if(jr&&typeof jr.onCommitFiberUnmount=="function")try{jr.onCommitFiberUnmount(Xh,u)}catch{}switch(u.tag){case 0:case 11:case 14:case 15:if(c=u.updateQueue,c!==null&&(c=c.lastEffect,c!==null)){var w=c=c.next;do{var M=w,T=M.destroy;M=M.tag,T!==void 0&&(M&2||M&4)&&J0(u,v,T),w=w.next}while(w!==c)}break;case 1:if(vd(u,v),c=u.stateNode,typeof c.componentWillUnmount=="function")try{c.props=u.memoizedProps,c.state=u.memoizedState,c.componentWillUnmount()}catch(B){Li(u,v,B)}break;case 5:vd(u,v);break;case 4:V?Dw(c,u,v):de&&de&&(u=u.stateNode.containerInfo,v=mt(u),bt(u,v))}}function Pw(c,u,v){for(var w=u;;)if(Cw(c,w,v),w.child===null||V&&w.tag===4){if(w===u)break;for(;w.sibling===null;){if(w.return===null||w.return===u)return;w=w.return}w.sibling.return=w.return,w=w.sibling}else w.child.return=w,w=w.child}function Rw(c){var u=c.alternate;u!==null&&(c.alternate=null,Rw(u)),c.child=null,c.deletions=null,c.sibling=null,c.tag===5&&(u=c.stateNode,u!==null&&Ue(u)),c.stateNode=null,c.return=null,c.dependencies=null,c.memoizedProps=null,c.memoizedState=null,c.pendingProps=null,c.stateNode=null,c.updateQueue=null}function Lw(c){return c.tag===5||c.tag===3||c.tag===4}function Iw(c){e:for(;;){for(;c.sibling===null;){if(c.return===null||Lw(c.return))return null;c=c.return}for(c.sibling.return=c.return,c=c.sibling;c.tag!==5&&c.tag!==6&&c.tag!==18;){if(c.flags&2||c.child===null||c.tag===4)continue e;c.child.return=c,c=c.child}if(!(c.flags&2))return c.stateNode}}function Nw(c){if(V){e:{for(var u=c.return;u!==null;){if(Lw(u))break e;u=u.return}throw Error(o(160))}var v=u;switch(v.tag){case 5:u=v.stateNode,v.flags&32&&(Ge(u),v.flags&=-33),v=Iw(c),ev(c,v,u);break;case 3:case 4:u=v.stateNode.containerInfo,v=Iw(c),Q0(c,v,u);break;default:throw Error(o(161))}}}function Q0(c,u,v){var w=c.tag;if(w===5||w===6)c=c.stateNode,u?Be(v,c,u):pt(v,c);else if(w!==4&&(c=c.child,c!==null))for(Q0(c,u,v),c=c.sibling;c!==null;)Q0(c,u,v),c=c.sibling}function ev(c,u,v){var w=c.tag;if(w===5||w===6)c=c.stateNode,u?ut(v,c,u):Fe(v,c);else if(w!==4&&(c=c.child,c!==null))for(ev(c,u,v),c=c.sibling;c!==null;)ev(c,u,v),c=c.sibling}function Dw(c,u,v){for(var w=u,M=!1,T,B;;){if(!M){M=w.return;e:for(;;){if(M===null)throw Error(o(160));switch(T=M.stateNode,M.tag){case 5:B=!1;break e;case 3:T=T.containerInfo,B=!0;break e;case 4:T=T.containerInfo,B=!0;break e}M=M.return}M=!0}if(w.tag===5||w.tag===6)Pw(c,w,v),B?me(T,w.stateNode):W(T,w.stateNode);else if(w.tag===18)B?Ne(T,w.stateNode):ee(T,w.stateNode);else if(w.tag===4){if(w.child!==null){T=w.stateNode.containerInfo,B=!0,w.child.return=w,w=w.child;continue}}else if(Cw(c,w,v),w.child!==null){w.child.return=w,w=w.child;continue}if(w===u)break;for(;w.sibling===null;){if(w.return===null||w.return===u)return;w=w.return,w.tag===4&&(M=!1)}w.sibling.return=w.return,w=w.sibling}}function tv(c,u){if(V){switch(u.tag){case 0:case 11:case 14:case 15:aa(3,u,u.return),gu(3,u),aa(5,u,u.return);return;case 1:return;case 5:var v=u.stateNode;if(v!=null){var w=u.memoizedProps;c=c!==null?c.memoizedProps:w;var M=u.type,T=u.updateQueue;u.updateQueue=null,T!==null&&wt(v,T,M,c,w,u)}return;case 6:if(u.stateNode===null)throw Error(o(162));v=u.memoizedProps,Ce(u.stateNode,c!==null?c.memoizedProps:v,v);return;case 3:fe&&c!==null&&c.memoizedState.isDehydrated&&re(u.stateNode.containerInfo);return;case 12:return;case 13:yd(u);return;case 19:yd(u);return;case 17:return}throw Error(o(163))}switch(u.tag){case 0:case 11:case 14:case 15:aa(3,u,u.return),gu(3,u),aa(5,u,u.return);return;case 12:return;case 13:yd(u);return;case 19:yd(u);return;case 3:fe&&c!==null&&c.memoizedState.isDehydrated&&re(u.stateNode.containerInfo);break;case 22:case 23:return}e:if(de){switch(u.tag){case 1:case 5:case 6:break e;case 3:case 4:u=u.stateNode,bt(u.containerInfo,u.pendingChildren);break e}throw Error(o(163))}}function yd(c){var u=c.updateQueue;if(u!==null){c.updateQueue=null;var v=c.stateNode;v===null&&(v=c.stateNode=new qN),u.forEach(function(w){var M=sD.bind(null,c,w);v.has(w)||(v.add(w),w.then(M,M))})}}function ZN(c,u){for(Ve=u;Ve!==null;){u=Ve;var v=u.deletions;if(v!==null)for(var w=0;w";case _d:return":has("+(rv(c)||"")+")";case Sd:return'[role="'+c.value+'"]';case wd:return'"'+c.value+'"';case Ad:return'[data-testname="'+c.value+'"]';default:throw Error(o(365))}}function Bw(c,u){var v=[];c=[c,0];for(var w=0;wM&&(M=B),w&=~T}if(w=M,w=Bn()-w,w=(120>w?120:480>w?480:1080>w?1080:1920>w?1920:3e3>w?3e3:4320>w?4320:1960*$N(w/1960))-w,10c?16:c,io===null)var w=!1;else{if(c=io,io=null,Cd=0,Et&6)throw Error(o(331));var M=Et;for(Et|=4,Ve=c.current;Ve!==null;){var T=Ve,B=T.child;if(Ve.flags&16){var Y=T.deletions;if(Y!==null){for(var ue=0;ueBn()-lv?la(c,0):av|=v),Ri(c,u)}function qw(c,u){u===0&&(c.mode&1?(u=Wh,Wh<<=1,!(Wh&130023424)&&(Wh=4194304)):u=1);var v=pi();c=Ld(c,u),c!==null&&(iu(c,u,v),Ri(c,v))}function rD(c){var u=c.memoizedState,v=0;u!==null&&(v=u.retryLane),qw(c,v)}function sD(c,u){var v=0;switch(c.tag){case 13:var w=c.stateNode,M=c.memoizedState;M!==null&&(v=M.retryLane);break;case 19:w=c.stateNode;break;default:throw Error(o(314))}w!==null&&w.delete(u),qw(c,v)}var Kw;Kw=function(c,u,v){if(c!==null)if(c.memoizedProps!==u.pendingProps||In.current)Gi=!0;else{if(!(c.lanes&v)&&!(u.flags&128))return Gi=!1,XN(c,u,v);Gi=!!(c.flags&131072)}else Gi=!1,rn&&u.flags&1048576&&UA(u,td,u.index);switch(u.lanes=0,u.tag){case 2:var w=u.type;c!==null&&(c.alternate=null,u.alternate=null,u.flags|=2),c=u.pendingProps;var M=Wr(u,Xt.current);_l(u,v),M=z0(null,u,w,c,M,v);var T=V0();return u.flags|=1,typeof M=="object"&&M!==null&&typeof M.render=="function"&&M.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,It(w)?(T=!0,Qs(u)):T=!1,u.memoizedState=M.state!==null&&M.state!==void 0?M.state:null,b0(u),M.updater=Qh,u.stateNode=M,M._reactInternals=u,P0(u,w,c,v),u=q0(null,u,w,!0,T,v)):(u.tag=0,rn&&T&&R0(u),di(null,u,M,v),u=u.child),u;case 16:w=u.elementType;e:{switch(c!==null&&(c.alternate=null,u.alternate=null,u.flags|=2),c=u.pendingProps,M=w._init,w=M(w._payload),u.type=w,M=u.tag=aD(w),c=wr(w,c),M){case 0:u=Y0(null,u,w,c,v);break e;case 1:u=xw(null,u,w,c,v);break e;case 11:u=pw(null,u,w,c,v);break e;case 14:u=mw(null,u,w,wr(w.type,c),v);break e}throw Error(o(306,w,""))}return u;case 0:return w=u.type,M=u.pendingProps,M=u.elementType===w?M:wr(w,M),Y0(c,u,w,M,v);case 1:return w=u.type,M=u.pendingProps,M=u.elementType===w?M:wr(w,M),xw(c,u,w,M,v);case 3:e:{if(_w(u),c===null)throw Error(o(387));w=u.pendingProps,T=u.memoizedState,M=T.element,CA(c,u),$h(u,w,null,v);var B=u.memoizedState;if(w=B.element,fe&&T.isDehydrated)if(T={element:w,isDehydrated:!1,cache:B.cache,transitions:B.transitions},u.updateQueue.baseState=T,u.memoizedState=T,u.flags&256){M=Error(o(423)),u=Sw(c,u,w,v,M);break e}else if(w!==M){M=Error(o(424)),u=Sw(c,u,w,v,M);break e}else for(fe&&(Hi=Vh(u.stateNode.containerInfo),Vi=u,rn=!0,Mr=null,ru=!1),v=VA(u,null,w,v),u.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(wl(),w===M){u=xs(c,u,v);break e}di(c,u,w,v)}u=u.child}return u;case 5:return HA(u),c===null&&N0(u),w=u.type,M=u.pendingProps,T=c!==null?c.memoizedProps:null,B=M.children,ve(w,M)?B=null:T!==null&&ve(w,T)&&(u.flags|=32),yw(c,u),di(c,u,B,v),u.child;case 6:return c===null&&N0(u),null;case 13:return Aw(c,u,v);case 4:return U0(u,u.stateNode.containerInfo),w=u.pendingProps,c===null?u.child=Ml(u,null,w,v):di(c,u,w,v),u.child;case 11:return w=u.type,M=u.pendingProps,M=u.elementType===w?M:wr(w,M),pw(c,u,w,M,v);case 7:return di(c,u,u.pendingProps,v),u.child;case 8:return di(c,u,u.pendingProps.children,v),u.child;case 12:return di(c,u,u.pendingProps.children,v),u.child;case 10:e:{if(w=u.type._context,M=u.pendingProps,T=u.memoizedProps,B=M.value,bA(u,w,B),T!==null)if(Xr(T.value,B)){if(T.children===M.children&&!In.current){u=xs(c,u,v);break e}}else for(T=u.child,T!==null&&(T.return=u);T!==null;){var Y=T.dependencies;if(Y!==null){B=T.child;for(var ue=Y.firstContext;ue!==null;){if(ue.context===w){if(T.tag===1){ue=ms(-1,v&-v),ue.tag=2;var Le=T.updateQueue;if(Le!==null){Le=Le.shared;var qe=Le.pending;qe===null?ue.next=ue:(ue.next=qe.next,qe.next=ue),Le.pending=ue}}T.lanes|=v,ue=T.alternate,ue!==null&&(ue.lanes|=v),T0(T.return,v,u),Y.lanes|=v;break}ue=ue.next}}else if(T.tag===10)B=T.type===u.type?null:T.child;else if(T.tag===18){if(B=T.return,B===null)throw Error(o(341));B.lanes|=v,Y=B.alternate,Y!==null&&(Y.lanes|=v),T0(B,v,u),B=T.sibling}else B=T.child;if(B!==null)B.return=T;else for(B=T;B!==null;){if(B===u){B=null;break}if(T=B.sibling,T!==null){T.return=B.return,B=T;break}B=B.return}T=B}di(c,u,M.children,v),u=u.child}return u;case 9:return M=u.type,w=u.pendingProps.children,_l(u,v),M=rr(M),w=w(M),u.flags|=1,di(c,u,w,v),u.child;case 14:return w=u.type,M=wr(w,u.pendingProps),M=wr(w.type,M),mw(c,u,w,M,v);case 15:return gw(c,u,u.type,u.pendingProps,v);case 17:return w=u.type,M=u.pendingProps,M=u.elementType===w?M:wr(w,M),c!==null&&(c.alternate=null,u.alternate=null,u.flags|=2),u.tag=1,It(w)?(c=!0,Qs(u)):c=!1,_l(u,v),NA(u,w,M),P0(u,w,M,v),q0(null,u,w,!0,c,v);case 19:return Tw(c,u,v);case 22:return vw(c,u,v)}throw Error(o(156,u.tag))};function Zw(c,u){return x0(c,u)}function oD(c,u,v,w){this.tag=c,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=w,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function ur(c,u,v,w){return new oD(c,u,v,w)}function gv(c){return c=c.prototype,!(!c||!c.isReactComponent)}function aD(c){if(typeof c=="function")return gv(c)?1:0;if(c!=null){if(c=c.$$typeof,c===_)return 11;if(c===S)return 14}return 2}function oo(c,u){var v=c.alternate;return v===null?(v=ur(c.tag,u,c.key,c.mode),v.elementType=c.elementType,v.type=c.type,v.stateNode=c.stateNode,v.alternate=c,c.alternate=v):(v.pendingProps=u,v.type=c.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=c.flags&14680064,v.childLanes=c.childLanes,v.lanes=c.lanes,v.child=c.child,v.memoizedProps=c.memoizedProps,v.memoizedState=c.memoizedState,v.updateQueue=c.updateQueue,u=c.dependencies,v.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},v.sibling=c.sibling,v.index=c.index,v.ref=c.ref,v}function Nd(c,u,v,w,M,T){var B=2;if(w=c,typeof c=="function")gv(c)&&(B=1);else if(typeof c=="string")B=5;else e:switch(c){case h:return fa(v.children,M,T,u);case d:B=8,M|=8;break;case p:return c=ur(12,v,u,M|2),c.elementType=p,c.lanes=T,c;case x:return c=ur(13,v,u,M),c.elementType=x,c.lanes=T,c;case g:return c=ur(19,v,u,M),c.elementType=g,c.lanes=T,c;case E:return Dd(v,M,T,u);default:if(typeof c=="object"&&c!==null)switch(c.$$typeof){case m:B=10;break e;case y:B=9;break e;case _:B=11;break e;case S:B=14;break e;case A:B=16,w=null;break e}throw Error(o(130,c==null?c:typeof c,""))}return u=ur(B,v,u,M),u.elementType=c,u.type=w,u.lanes=T,u}function fa(c,u,v,w){return c=ur(7,c,w,u),c.lanes=v,c}function Dd(c,u,v,w){return c=ur(22,c,w,u),c.elementType=E,c.lanes=v,c.stateNode={},c}function vv(c,u,v){return c=ur(6,c,null,u),c.lanes=v,c}function yv(c,u,v){return u=ur(4,c.children!==null?c.children:[],c.key,u),u.lanes=v,u.stateNode={containerInfo:c.containerInfo,pendingChildren:null,implementation:c.implementation},u}function lD(c,u,v,w,M){this.tag=u,this.containerInfo=c,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=it,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=v0(0),this.expirationTimes=v0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=v0(0),this.identifierPrefix=w,this.onRecoverableError=M,fe&&(this.mutableSourceEagerHydrationData=null)}function Jw(c,u,v,w,M,T,B,Y,ue){return c=new lD(c,u,v,Y,ue),u===1?(u=1,T===!0&&(u|=8)):u=0,T=ur(3,null,null,u),c.current=T,T.stateNode=c,T.memoizedState={element:w,isDehydrated:v,cache:null,transitions:null},b0(T),c}function $w(c){if(!c)return Ct;c=c._reactInternals;e:{if(P(c)!==c||c.tag!==1)throw Error(o(170));var u=c;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(It(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(o(171))}if(c.tag===1){var v=c.type;if(It(v))return hi(c,v,u)}return u}function Qw(c){var u=c._reactInternals;if(u===void 0)throw typeof c.render=="function"?Error(o(188)):(c=Object.keys(c).join(","),Error(o(268,c)));return c=j(u),c===null?null:c.stateNode}function eM(c,u){if(c=c.memoizedState,c!==null&&c.dehydrated!==null){var v=c.retryLane;c.retryLane=v!==0&&v=Le&&T>=gt&&M<=qe&&B<=ot){c.splice(u,1);break}else if(w!==Le||v.width!==ue.width||otB){if(!(T!==gt||v.height!==ue.height||qeM)){Le>w&&(ue.width+=Le-w,ue.x=w),qeT&&(ue.height+=gt-T,ue.y=T),otv&&(v=B)),B ")+` +`+T.stack}return{value:l,source:u,stack:w}}function R0(l,u){try{console.error(u.value)}catch(v){setTimeout(function(){throw v})}}var eD=typeof WeakMap=="function"?WeakMap:Map;function FA(l,u,v){v=ds(-1,v),v.tag=3,v.payload={element:null};var M=u.value;return v.callback=function(){dd||(dd=!0,q0=M),R0(l,u)},v}function BA(l,u,v){v=ds(-1,v),v.tag=3;var M=l.type.getDerivedStateFromError;if(typeof M=="function"){var w=u.value;v.payload=function(){return M(w)},v.callback=function(){R0(l,u)}}var T=l.stateNode;return T!==null&&typeof T.componentDidCatch=="function"&&(v.callback=function(){R0(l,u),typeof M!="function"&&($s===null?$s=new Set([this]):$s.add(this));var F=u.stack;this.componentDidCatch(u.value,{componentStack:F!==null?F:""})}),v}function zA(l,u,v){var M=l.pingCache;if(M===null){M=l.pingCache=new eD;var w=new Set;M.set(u,w)}else w=M.get(u),w===void 0&&(w=new Set,M.set(u,w));w.has(v)||(w.add(v),l=pD.bind(null,l,u,v),u.then(l,l))}function VA(l){do{var u;if((u=l.tag===13)&&(u=l.memoizedState,u=u!==null?u.dehydrated!==null:!0),u)return l;l=l.return}while(l!==null);return null}function HA(l,u,v,M,w){return l.mode&1?(l.flags|=65536,l.lanes=w,l):(l===u?l.flags|=65536:(l.flags|=128,v.flags|=131072,v.flags&=-52805,v.tag===1&&(v.alternate===null?v.tag=17:(u=ds(-1,1),u.tag=2,Qs(v,u))),v.lanes|=1),l)}function Kr(l){l.flags|=4}function GA(l,u){if(l!==null&&l.child===u.child)return!0;if(u.flags&16)return!1;for(l=u.child;l!==null;){if(l.flags&12854||l.subtreeFlags&12854)return!1;l=l.sibling}return!0}var su,ou,Qh,$h;if(z)su=function(l,u){for(var v=u.child;v!==null;){if(v.tag===5||v.tag===6)_e(l,v.stateNode);else if(v.tag!==4&&v.child!==null){v.child.return=v,v=v.child;continue}if(v===u)break;for(;v.sibling===null;){if(v.return===null||v.return===u)return;v=v.return}v.sibling.return=v.return,v=v.sibling}},ou=function(){},Qh=function(l,u,v,M,w){if(l=l.memoizedProps,l!==M){var T=u.stateNode,F=qr(or.current);v=oe(T,v,l,M,w,F),(u.updateQueue=v)&&Kr(u)}},$h=function(l,u,v,M){v!==M&&Kr(u)};else if(de){su=function(l,u,v,M){for(var w=u.child;w!==null;){if(w.tag===5){var T=w.stateNode;v&&M&&(T=Rn(T,w.type,w.memoizedProps,w)),_e(l,T)}else if(w.tag===6)T=w.stateNode,v&&M&&(T=kn(T,w.memoizedProps,w)),_e(l,T);else if(w.tag!==4){if(w.tag===22&&w.memoizedState!==null)T=w.child,T!==null&&(T.return=w),su(l,w,!0,!0);else if(w.child!==null){w.child.return=w,w=w.child;continue}}if(w===u)break;for(;w.sibling===null;){if(w.return===null||w.return===u)return;w=w.return}w.sibling.return=w.return,w=w.sibling}};var WA=function(l,u,v,M){for(var w=u.child;w!==null;){if(w.tag===5){var T=w.stateNode;v&&M&&(T=Rn(T,w.type,w.memoizedProps,w)),Rt(l,T)}else if(w.tag===6)T=w.stateNode,v&&M&&(T=kn(T,w.memoizedProps,w)),Rt(l,T);else if(w.tag!==4){if(w.tag===22&&w.memoizedState!==null)T=w.child,T!==null&&(T.return=w),WA(l,w,!0,!0);else if(w.child!==null){w.child.return=w,w=w.child;continue}}if(w===u)break;for(;w.sibling===null;){if(w.return===null||w.return===u)return;w=w.return}w.sibling.return=w.return,w=w.sibling}};ou=function(l,u){var v=u.stateNode;if(!GA(l,u)){l=v.containerInfo;var M=mt(l);WA(M,u,!1,!1),v.pendingChildren=M,Kr(u),Wt(l,M)}},Qh=function(l,u,v,M,w){var T=l.stateNode,F=l.memoizedProps;if((l=GA(l,u))&&F===M)u.stateNode=T;else{var Y=u.stateNode,ue=qr(or.current),Le=null;F!==M&&(Le=oe(Y,v,F,M,w,ue)),l&&Le===null?u.stateNode=T:(T=ft(T,Le,v,F,M,u,l,Y),Ne(T,v,M,w,ue)&&Kr(u),u.stateNode=T,l?Kr(u):su(T,u,!1,!1))}},$h=function(l,u,v,M){v!==M?(l=qr(yl.current),v=qr(or.current),u.stateNode=Te(M,l,v,u),Kr(u)):u.stateNode=l.stateNode}}else ou=function(){},Qh=function(){},$h=function(){};function au(l,u){if(!tn)switch(l.tailMode){case"hidden":u=l.tail;for(var v=null;u!==null;)u.alternate!==null&&(v=u),u=u.sibling;v===null?l.tail=null:v.sibling=null;break;case"collapsed":v=l.tail;for(var M=null;v!==null;)v.alternate!==null&&(M=v),v=v.sibling;M===null?u||l.tail===null?l.tail=null:l.tail.sibling=null:M.sibling=null}}function Qn(l){var u=l.alternate!==null&&l.alternate.child===l.child,v=0,M=0;if(u)for(var w=l.child;w!==null;)v|=w.lanes|w.childLanes,M|=w.subtreeFlags&14680064,M|=w.flags&14680064,w.return=l,w=w.sibling;else for(w=l.child;w!==null;)v|=w.lanes|w.childLanes,M|=w.subtreeFlags,M|=w.flags,w.return=l,w=w.sibling;return l.subtreeFlags|=M,l.childLanes=v,u}function tD(l,u,v){var M=u.pendingProps;switch(m0(u),u.tag){case 2:case 16:case 15:case 0:case 11:case 7:case 8:case 12:case 9:case 14:return Qn(u),null;case 1:return It(u.type)&&Bi(),Qn(u),null;case 3:return M=u.stateNode,xl(),Oe(Ln),Oe(Xt),A0(),M.pendingContext&&(M.context=M.pendingContext,M.pendingContext=null),(l===null||l.child===null)&&(Jc(u)?Kr(u):l===null||l.memoizedState.isDehydrated&&!(u.flags&256)||(u.flags|=1024,Mr!==null&&(J0(Mr),Mr=null))),ou(l,u),Qn(u),null;case 5:_0(u),v=qr(yl.current);var w=u.type;if(l!==null&&u.stateNode!=null)Qh(l,u,w,M,v),l.ref!==u.ref&&(u.flags|=512,u.flags|=2097152);else{if(!M){if(u.stateNode===null)throw Error(o(166));return Qn(u),null}if(l=qr(or.current),Jc(u)){if(!fe)throw Error(o(175));l=Qg(u.stateNode,u.type,u.memoizedProps,v,l,u,!Kc),u.updateQueue=l,l!==null&&Kr(u)}else{var T=$(w,M,v,l,u);su(T,u,!1,!1),u.stateNode=T,Ne(T,w,M,v,l)&&Kr(u)}u.ref!==null&&(u.flags|=512,u.flags|=2097152)}return Qn(u),null;case 6:if(l&&u.stateNode!=null)$h(l,u,l.memoizedProps,M);else{if(typeof M!="string"&&u.stateNode===null)throw Error(o(166));if(l=qr(yl.current),v=qr(or.current),Jc(u)){if(!fe)throw Error(o(176));if(l=u.stateNode,M=u.memoizedProps,(v=$g(l,M,u,!Kc))&&(w=zi,w!==null))switch(T=(w.mode&1)!==0,w.tag){case 3:Ze(w.stateNode.containerInfo,l,M,T);break;case 5:$e(w.type,w.memoizedProps,w.stateNode,l,M,T)}v&&Kr(u)}else u.stateNode=Te(M,l,v,u)}return Qn(u),null;case 13:if(Oe(ln),M=u.memoizedState,tn&&Vi!==null&&u.mode&1&&!(u.flags&128)){for(l=Vi;l;)l=Hr(l);return gl(),u.flags|=98560,u}if(M!==null&&M.dehydrated!==null){if(M=Jc(u),l===null){if(!M)throw Error(o(318));if(!fe)throw Error(o(344));if(l=u.memoizedState,l=l!==null?l.dehydrated:null,!l)throw Error(o(317));U(l,u)}else gl(),!(u.flags&128)&&(u.memoizedState=null),u.flags|=4;return Qn(u),null}return Mr!==null&&(J0(Mr),Mr=null),u.flags&128?(u.lanes=v,u):(M=M!==null,v=!1,l===null?Jc(u):v=l.memoizedState!==null,M&&!v&&(u.child.flags|=8192,u.mode&1&&(l===null||ln.current&1?In===0&&(In=3):$0())),u.updateQueue!==null&&(u.flags|=4),Qn(u),null);case 4:return xl(),ou(l,u),l===null&&Se(u.stateNode.containerInfo),Qn(u),null;case 10:return c0(u.type._context),Qn(u),null;case 17:return It(u.type)&&Bi(),Qn(u),null;case 19:if(Oe(ln),w=u.memoizedState,w===null)return Qn(u),null;if(M=(u.flags&128)!==0,T=w.rendering,T===null)if(M)au(w,!1);else{if(In!==0||l!==null&&l.flags&128)for(l=u.child;l!==null;){if(T=Wh(l),T!==null){for(u.flags|=128,au(w,!1),l=T.updateQueue,l!==null&&(u.updateQueue=l,u.flags|=4),u.subtreeFlags=0,l=v,M=u.child;M!==null;)v=M,w=l,v.flags&=14680066,T=v.alternate,T===null?(v.childLanes=0,v.lanes=w,v.child=null,v.subtreeFlags=0,v.memoizedProps=null,v.memoizedState=null,v.updateQueue=null,v.dependencies=null,v.stateNode=null):(v.childLanes=T.childLanes,v.lanes=T.lanes,v.child=T.child,v.subtreeFlags=0,v.deletions=null,v.memoizedProps=T.memoizedProps,v.memoizedState=T.memoizedState,v.updateQueue=T.updateQueue,v.type=T.type,w=T.dependencies,v.dependencies=w===null?null:{lanes:w.lanes,firstContext:w.firstContext}),M=M.sibling;return yt(ln,ln.current&1|2),u.child}l=l.sibling}w.tail!==null&&Fn()>Y0&&(u.flags|=128,M=!0,au(w,!1),u.lanes=4194304)}else{if(!M)if(l=Wh(T),l!==null){if(u.flags|=128,M=!0,l=l.updateQueue,l!==null&&(u.updateQueue=l,u.flags|=4),au(w,!0),w.tail===null&&w.tailMode==="hidden"&&!T.alternate&&!tn)return Qn(u),null}else 2*Fn()-w.renderingStartTime>Y0&&v!==1073741824&&(u.flags|=128,M=!0,au(w,!1),u.lanes=4194304);w.isBackwards?(T.sibling=u.child,u.child=T):(l=w.last,l!==null?l.sibling=T:u.child=T,w.last=T)}return w.tail!==null?(u=w.tail,w.rendering=u,w.tail=u.sibling,w.renderingStartTime=Fn(),u.sibling=null,l=ln.current,yt(ln,M?l&1|2:l&1),u):(Qn(u),null);case 22:case 23:return Q0(),M=u.memoizedState!==null,l!==null&&l.memoizedState!==null!==M&&(u.flags|=8192),M&&u.mode&1?Gi&1073741824&&(Qn(u),z&&u.subtreeFlags&6&&(u.flags|=8192)):Qn(u),null;case 24:return null;case 25:return null}throw Error(o(156,u.tag))}var nD=a.ReactCurrentOwner,Hi=!1;function hi(l,u,v,M){u.child=l===null?yA(u,null,v,M):vl(u,l.child,v,M)}function jA(l,u,v,M,w){v=v.render;var T=u.ref;return dl(u,w),M=w0(l,u,v,M,T,w),v=E0(),l!==null&&!Hi?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~w,vs(l,u,w)):(tn&&v&&p0(u),u.flags|=1,hi(l,u,M,w),u.child)}function XA(l,u,v,M,w){if(l===null){var T=v.type;return typeof T=="function"&&!ev(T)&&T.defaultProps===void 0&&v.compare===null&&v.defaultProps===void 0?(u.tag=15,u.type=T,YA(l,u,T,M,w)):(l=_d(v.type,null,M,u,u.mode,w),l.ref=u.ref,l.return=u,u.child=l)}if(T=l.child,!(l.lanes&w)){var F=T.memoizedProps;if(v=v.compare,v=v!==null?v:Uh,v(F,M)&&l.ref===u.ref)return vs(l,u,w)}return u.flags|=1,l=io(T,M),l.ref=u.ref,l.return=u,u.child=l}function YA(l,u,v,M,w){if(l!==null&&Uh(l.memoizedProps,M)&&l.ref===u.ref)if(Hi=!1,(l.lanes&w)!==0)l.flags&131072&&(Hi=!0);else return u.lanes=l.lanes,vs(l,u,w);return L0(l,u,v,M,w)}function qA(l,u,v){var M=u.pendingProps,w=M.children,T=l!==null?l.memoizedState:null;if(M.mode==="hidden")if(!(u.mode&1))u.memoizedState={baseLanes:0,cachePool:null},yt(Sl,Gi),Gi|=v;else if(v&1073741824)u.memoizedState={baseLanes:0,cachePool:null},M=T!==null?T.baseLanes:v,yt(Sl,Gi),Gi|=M;else return l=T!==null?T.baseLanes|v:v,u.lanes=u.childLanes=1073741824,u.memoizedState={baseLanes:l,cachePool:null},u.updateQueue=null,yt(Sl,Gi),Gi|=l,null;else T!==null?(M=T.baseLanes|v,u.memoizedState=null):M=v,yt(Sl,Gi),Gi|=M;return hi(l,u,w,v),u.child}function ZA(l,u){var v=u.ref;(l===null&&v!==null||l!==null&&l.ref!==v)&&(u.flags|=512,u.flags|=2097152)}function L0(l,u,v,M,w){var T=It(v)?ui:Xt.current;return T=Gr(u,T),dl(u,w),v=w0(l,u,v,M,T,w),M=E0(),l!==null&&!Hi?(u.updateQueue=l.updateQueue,u.flags&=-2053,l.lanes&=~w,vs(l,u,w)):(tn&&M&&p0(u),u.flags|=1,hi(l,u,v,w),u.child)}function KA(l,u,v,M,w){if(It(v)){var T=!0;Ks(u)}else T=!1;if(dl(u,w),u.stateNode===null)l!==null&&(l.alternate=null,u.alternate=null,u.flags|=2),uA(u,v,M),d0(u,v,M,w),M=!0;else if(l===null){var F=u.stateNode,Y=u.memoizedProps;F.props=Y;var ue=F.context,Le=v.contextType;typeof Le=="object"&&Le!==null?Le=ir(Le):(Le=It(v)?ui:Xt.current,Le=Gr(u,Le));var qe=v.getDerivedStateFromProps,gt=typeof qe=="function"||typeof F.getSnapshotBeforeUpdate=="function";gt||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(Y!==M||ue!==Le)&&fA(u,F,M,Le),Js=!1;var ot=u.memoizedState;F.state=ot,Bh(u,M,F,w),ue=u.memoizedState,Y!==M||ot!==ue||Ln.current||Js?(typeof qe=="function"&&(h0(u,v,qe,M),ue=u.memoizedState),(Y=Js||cA(u,v,Y,M,ot,ue,Le))?(gt||typeof F.UNSAFE_componentWillMount!="function"&&typeof F.componentWillMount!="function"||(typeof F.componentWillMount=="function"&&F.componentWillMount(),typeof F.UNSAFE_componentWillMount=="function"&&F.UNSAFE_componentWillMount()),typeof F.componentDidMount=="function"&&(u.flags|=4194308)):(typeof F.componentDidMount=="function"&&(u.flags|=4194308),u.memoizedProps=M,u.memoizedState=ue),F.props=M,F.state=ue,F.context=Le,M=Y):(typeof F.componentDidMount=="function"&&(u.flags|=4194308),M=!1)}else{F=u.stateNode,sA(l,u),Y=u.memoizedProps,Le=u.type===u.elementType?Y:Ar(u.type,Y),F.props=Le,gt=u.pendingProps,ot=F.context,ue=v.contextType,typeof ue=="object"&&ue!==null?ue=ir(ue):(ue=It(v)?ui:Xt.current,ue=Gr(u,ue));var Gt=v.getDerivedStateFromProps;(qe=typeof Gt=="function"||typeof F.getSnapshotBeforeUpdate=="function")||typeof F.UNSAFE_componentWillReceiveProps!="function"&&typeof F.componentWillReceiveProps!="function"||(Y!==gt||ot!==ue)&&fA(u,F,M,ue),Js=!1,ot=u.memoizedState,F.state=ot,Bh(u,M,F,w);var tt=u.memoizedState;Y!==gt||ot!==tt||Ln.current||Js?(typeof Gt=="function"&&(h0(u,v,Gt,M),tt=u.memoizedState),(Le=Js||cA(u,v,Le,M,ot,tt,ue)||!1)?(qe||typeof F.UNSAFE_componentWillUpdate!="function"&&typeof F.componentWillUpdate!="function"||(typeof F.componentWillUpdate=="function"&&F.componentWillUpdate(M,tt,ue),typeof F.UNSAFE_componentWillUpdate=="function"&&F.UNSAFE_componentWillUpdate(M,tt,ue)),typeof F.componentDidUpdate=="function"&&(u.flags|=4),typeof F.getSnapshotBeforeUpdate=="function"&&(u.flags|=1024)):(typeof F.componentDidUpdate!="function"||Y===l.memoizedProps&&ot===l.memoizedState||(u.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||Y===l.memoizedProps&&ot===l.memoizedState||(u.flags|=1024),u.memoizedProps=M,u.memoizedState=tt),F.props=M,F.state=tt,F.context=ue,M=Le):(typeof F.componentDidUpdate!="function"||Y===l.memoizedProps&&ot===l.memoizedState||(u.flags|=4),typeof F.getSnapshotBeforeUpdate!="function"||Y===l.memoizedProps&&ot===l.memoizedState||(u.flags|=1024),M=!1)}return I0(l,u,v,M,T,w)}function I0(l,u,v,M,w,T){ZA(l,u);var F=(u.flags&128)!==0;if(!M&&!F)return w&&Ph(u,v,!1),vs(l,u,T);M=u.stateNode,nD.current=u;var Y=F&&typeof v.getDerivedStateFromError!="function"?null:M.render();return u.flags|=1,l!==null&&F?(u.child=vl(u,l.child,null,T),u.child=vl(u,null,Y,T)):hi(l,u,Y,T),u.memoizedState=M.state,w&&Ph(u,v,!0),u.child}function JA(l){var u=l.stateNode;u.pendingContext?fl(l,u.pendingContext,u.pendingContext!==u.context):u.context&&fl(l,u.context,!1),x0(l,u.containerInfo)}function QA(l,u,v,M,w){return gl(),y0(w),u.flags|=256,hi(l,u,v,M),u.child}var ed={dehydrated:null,treeContext:null,retryLane:0};function td(l){return{baseLanes:l,cachePool:null}}function $A(l,u,v){var M=u.pendingProps,w=ln.current,T=!1,F=(u.flags&128)!==0,Y;if((Y=F)||(Y=l!==null&&l.memoizedState===null?!1:(w&2)!==0),Y?(T=!0,u.flags&=-129):(l===null||l.memoizedState!==null)&&(w|=1),yt(ln,w&1),l===null)return v0(u),l=u.memoizedState,l!==null&&(l=l.dehydrated,l!==null)?(u.mode&1?Zs(l)?u.lanes=8:u.lanes=1073741824:u.lanes=1,null):(w=M.children,l=M.fallback,T?(M=u.mode,T=u.child,w={mode:"hidden",children:w},!(M&1)&&T!==null?(T.childLanes=0,T.pendingProps=w):T=Sd(w,M,0,null),l=sa(l,M,v,null),T.return=u,l.return=u,T.sibling=l,u.child=T,u.child.memoizedState=td(v),u.memoizedState=ed,l):D0(u,w));if(w=l.memoizedState,w!==null){if(Y=w.dehydrated,Y!==null){if(F)return u.flags&256?(u.flags&=-257,nd(l,u,v,Error(o(422)))):u.memoizedState!==null?(u.child=l.child,u.flags|=128,null):(T=M.fallback,w=u.mode,M=Sd({mode:"visible",children:M.children},w,0,null),T=sa(T,w,v,null),T.flags|=2,M.return=u,T.return=u,M.sibling=T,u.child=M,u.mode&1&&vl(u,l.child,null,v),u.child.memoizedState=td(v),u.memoizedState=ed,T);if(!(u.mode&1))u=nd(l,u,v,null);else if(Zs(Y))u=nd(l,u,v,Error(o(419)));else if(M=(v&l.childLanes)!==0,Hi||M){if(M=wn,M!==null){switch(v&-v){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}M=T&(M.suspendedLanes|v)?0:T,M!==0&&M!==w.retryLane&&(w.retryLane=M,lr(l,M,-1))}$0(),u=nd(l,u,v,Error(o(421)))}else Yc(Y)?(u.flags|=128,u.child=l.child,u=mD.bind(null,l),Th(Y,u),u=null):(v=w.treeContext,fe&&(Vi=Jg(Y),zi=u,tn=!0,Mr=null,Kc=!1,v!==null&&(rr[sr++]=ps,rr[sr++]=ms,rr[sr++]=Jo,ps=v.id,ms=v.overflow,Jo=u)),u=D0(u,u.pendingProps.children),u.flags|=4096);return u}return T?(M=tM(l,u,M.children,M.fallback,v),T=u.child,w=l.child.memoizedState,T.memoizedState=w===null?td(v):{baseLanes:w.baseLanes|v,cachePool:null},T.childLanes=l.childLanes&~v,u.memoizedState=ed,M):(v=eM(l,u,M.children,v),u.memoizedState=null,v)}return T?(M=tM(l,u,M.children,M.fallback,v),T=u.child,w=l.child.memoizedState,T.memoizedState=w===null?td(v):{baseLanes:w.baseLanes|v,cachePool:null},T.childLanes=l.childLanes&~v,u.memoizedState=ed,M):(v=eM(l,u,M.children,v),u.memoizedState=null,v)}function D0(l,u){return u=Sd({mode:"visible",children:u},l.mode,0,null),u.return=l,l.child=u}function eM(l,u,v,M){var w=l.child;return l=w.sibling,v=io(w,{mode:"visible",children:v}),!(u.mode&1)&&(v.lanes=M),v.return=u,v.sibling=null,l!==null&&(M=u.deletions,M===null?(u.deletions=[l],u.flags|=16):M.push(l)),u.child=v}function tM(l,u,v,M,w){var T=u.mode;l=l.child;var F=l.sibling,Y={mode:"hidden",children:v};return!(T&1)&&u.child!==l?(v=u.child,v.childLanes=0,v.pendingProps=Y,u.deletions=null):(v=io(l,Y),v.subtreeFlags=l.subtreeFlags&14680064),F!==null?M=io(F,M):(M=sa(M,T,w,null),M.flags|=2),M.return=u,v.return=u,v.sibling=M,u.child=v,M}function nd(l,u,v,M){return M!==null&&y0(M),vl(u,l.child,null,v),l=D0(u,u.pendingProps.children),l.flags|=2,u.memoizedState=null,l}function nM(l,u,v){l.lanes|=u;var M=l.alternate;M!==null&&(M.lanes|=u),u0(l.return,u,v)}function N0(l,u,v,M,w){var T=l.memoizedState;T===null?l.memoizedState={isBackwards:u,rendering:null,renderingStartTime:0,last:M,tail:v,tailMode:w}:(T.isBackwards=u,T.rendering=null,T.renderingStartTime=0,T.last=M,T.tail=v,T.tailMode=w)}function iM(l,u,v){var M=u.pendingProps,w=M.revealOrder,T=M.tail;if(hi(l,u,M.children,v),M=ln.current,M&2)M=M&1|2,u.flags|=128;else{if(l!==null&&l.flags&128)e:for(l=u.child;l!==null;){if(l.tag===13)l.memoizedState!==null&&nM(l,v,u);else if(l.tag===19)nM(l,v,u);else if(l.child!==null){l.child.return=l,l=l.child;continue}if(l===u)break e;for(;l.sibling===null;){if(l.return===null||l.return===u)break e;l=l.return}l.sibling.return=l.return,l=l.sibling}M&=1}if(yt(ln,M),!(u.mode&1))u.memoizedState=null;else switch(w){case"forwards":for(v=u.child,w=null;v!==null;)l=v.alternate,l!==null&&Wh(l)===null&&(w=v),v=v.sibling;v=w,v===null?(w=u.child,u.child=null):(w=v.sibling,v.sibling=null),N0(u,!1,w,v,T);break;case"backwards":for(v=null,w=u.child,u.child=null;w!==null;){if(l=w.alternate,l!==null&&Wh(l)===null){u.child=w;break}l=w.sibling,w.sibling=v,v=w,w=l}N0(u,!0,v,null,T);break;case"together":N0(u,!1,null,null,void 0);break;default:u.memoizedState=null}return u.child}function vs(l,u,v){if(l!==null&&(u.dependencies=l.dependencies),Al|=u.lanes,!(v&u.childLanes))return null;if(l!==null&&u.child!==l.child)throw Error(o(153));if(u.child!==null){for(l=u.child,v=io(l,l.pendingProps),u.child=v,v.return=u;l.sibling!==null;)l=l.sibling,v=v.sibling=io(l,l.pendingProps),v.return=u;v.sibling=null}return u.child}function iD(l,u,v){switch(u.tag){case 3:JA(u),gl();break;case 5:xA(u);break;case 1:It(u.type)&&Ks(u);break;case 4:x0(u,u.stateNode.containerInfo);break;case 10:rA(u,u.type._context,u.memoizedProps.value);break;case 13:var M=u.memoizedState;if(M!==null)return M.dehydrated!==null?(yt(ln,ln.current&1),u.flags|=128,null):v&u.child.childLanes?$A(l,u,v):(yt(ln,ln.current&1),l=vs(l,u,v),l!==null?l.sibling:null);yt(ln,ln.current&1);break;case 19:if(M=(v&u.childLanes)!==0,l.flags&128){if(M)return iM(l,u,v);u.flags|=128}var w=u.memoizedState;if(w!==null&&(w.rendering=null,w.tail=null,w.lastEffect=null),yt(ln,ln.current),M)break;return null;case 22:case 23:return u.lanes=0,qA(l,u,v)}return vs(l,u,v)}function rD(l,u){switch(m0(u),u.tag){case 1:return It(u.type)&&Bi(),l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 3:return xl(),Oe(Ln),Oe(Xt),A0(),l=u.flags,l&65536&&!(l&128)?(u.flags=l&-65537|128,u):null;case 5:return _0(u),null;case 13:if(Oe(ln),l=u.memoizedState,l!==null&&l.dehydrated!==null){if(u.alternate===null)throw Error(o(340));gl()}return l=u.flags,l&65536?(u.flags=l&-65537|128,u):null;case 19:return Oe(ln),null;case 4:return xl(),null;case 10:return c0(u.type._context),null;case 22:case 23:return Q0(),null;case 24:return null;default:return null}}var id=!1,ea=!1,sD=typeof WeakSet=="function"?WeakSet:Set,Ve=null;function rd(l,u){var v=l.ref;if(v!==null)if(typeof v=="function")try{v(null)}catch(M){Ri(l,u,M)}else v.current=null}function U0(l,u,v){try{v()}catch(M){Ri(l,u,M)}}var rM=!1;function oD(l,u){for(q(l.containerInfo),Ve=u;Ve!==null;)if(l=Ve,u=l.child,(l.subtreeFlags&1028)!==0&&u!==null)u.return=l,Ve=u;else for(;Ve!==null;){l=Ve;try{var v=l.alternate;if(l.flags&1024)switch(l.tag){case 0:case 11:case 15:break;case 1:if(v!==null){var M=v.memoizedProps,w=v.memoizedState,T=l.stateNode,F=T.getSnapshotBeforeUpdate(l.elementType===l.type?M:Ar(l.type,M),w);T.__reactInternalSnapshotBeforeUpdate=F}break;case 3:z&&Ie(l.stateNode.containerInfo);break;case 5:case 6:case 4:case 17:break;default:throw Error(o(163))}}catch(Y){Ri(l,l.return,Y)}if(u=l.sibling,u!==null){u.return=l.return,Ve=u;break}Ve=l.return}return v=rM,rM=!1,v}function ta(l,u,v){var M=u.updateQueue;if(M=M!==null?M.lastEffect:null,M!==null){var w=M=M.next;do{if((w.tag&l)===l){var T=w.destroy;w.destroy=void 0,T!==void 0&&U0(u,v,T)}w=w.next}while(w!==M)}}function lu(l,u){if(u=u.updateQueue,u=u!==null?u.lastEffect:null,u!==null){var v=u=u.next;do{if((v.tag&l)===l){var M=v.create;v.destroy=M()}v=v.next}while(v!==u)}}function O0(l){var u=l.ref;if(u!==null){var v=l.stateNode;switch(l.tag){case 5:l=Q(v);break;default:l=v}typeof u=="function"?u(l):u.current=l}}function sM(l,u,v){if(Wr&&typeof Wr.onCommitFiberUnmount=="function")try{Wr.onCommitFiberUnmount(Dh,u)}catch{}switch(u.tag){case 0:case 11:case 14:case 15:if(l=u.updateQueue,l!==null&&(l=l.lastEffect,l!==null)){var M=l=l.next;do{var w=M,T=w.destroy;w=w.tag,T!==void 0&&(w&2||w&4)&&U0(u,v,T),M=M.next}while(M!==l)}break;case 1:if(rd(u,v),l=u.stateNode,typeof l.componentWillUnmount=="function")try{l.props=u.memoizedProps,l.state=u.memoizedState,l.componentWillUnmount()}catch(F){Ri(u,v,F)}break;case 5:rd(u,v);break;case 4:z?fM(l,u,v):de&&de&&(u=u.stateNode.containerInfo,v=mt(u),bt(u,v))}}function oM(l,u,v){for(var M=u;;)if(sM(l,M,v),M.child===null||z&&M.tag===4){if(M===u)break;for(;M.sibling===null;){if(M.return===null||M.return===u)return;M=M.return}M.sibling.return=M.return,M=M.sibling}else M.child.return=M,M=M.child}function aM(l){var u=l.alternate;u!==null&&(l.alternate=null,aM(u)),l.child=null,l.deletions=null,l.sibling=null,l.tag===5&&(u=l.stateNode,u!==null&&Ue(u)),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 lM(l){return l.tag===5||l.tag===3||l.tag===4}function cM(l){e:for(;;){for(;l.sibling===null;){if(l.return===null||lM(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 uM(l){if(z){e:{for(var u=l.return;u!==null;){if(lM(u))break e;u=u.return}throw Error(o(160))}var v=u;switch(v.tag){case 5:u=v.stateNode,v.flags&32&&(Ge(u),v.flags&=-33),v=cM(l),F0(l,v,u);break;case 3:case 4:u=v.stateNode.containerInfo,v=cM(l),k0(l,v,u);break;default:throw Error(o(161))}}}function k0(l,u,v){var M=l.tag;if(M===5||M===6)l=l.stateNode,u?Be(v,l,u):pt(v,l);else if(M!==4&&(l=l.child,l!==null))for(k0(l,u,v),l=l.sibling;l!==null;)k0(l,u,v),l=l.sibling}function F0(l,u,v){var M=l.tag;if(M===5||M===6)l=l.stateNode,u?ut(v,l,u):Fe(v,l);else if(M!==4&&(l=l.child,l!==null))for(F0(l,u,v),l=l.sibling;l!==null;)F0(l,u,v),l=l.sibling}function fM(l,u,v){for(var M=u,w=!1,T,F;;){if(!w){w=M.return;e:for(;;){if(w===null)throw Error(o(160));switch(T=w.stateNode,w.tag){case 5:F=!1;break e;case 3:T=T.containerInfo,F=!0;break e;case 4:T=T.containerInfo,F=!0;break e}w=w.return}w=!0}if(M.tag===5||M.tag===6)oM(l,M,v),F?me(T,M.stateNode):H(T,M.stateNode);else if(M.tag===18)F?De(T,M.stateNode):ee(T,M.stateNode);else if(M.tag===4){if(M.child!==null){T=M.stateNode.containerInfo,F=!0,M.child.return=M,M=M.child;continue}}else if(sM(l,M,v),M.child!==null){M.child.return=M,M=M.child;continue}if(M===u)break;for(;M.sibling===null;){if(M.return===null||M.return===u)return;M=M.return,M.tag===4&&(w=!1)}M.sibling.return=M.return,M=M.sibling}}function B0(l,u){if(z){switch(u.tag){case 0:case 11:case 14:case 15:ta(3,u,u.return),lu(3,u),ta(5,u,u.return);return;case 1:return;case 5:var v=u.stateNode;if(v!=null){var M=u.memoizedProps;l=l!==null?l.memoizedProps:M;var w=u.type,T=u.updateQueue;u.updateQueue=null,T!==null&&Mt(v,T,w,l,M,u)}return;case 6:if(u.stateNode===null)throw Error(o(162));v=u.memoizedProps,Ce(u.stateNode,l!==null?l.memoizedProps:v,v);return;case 3:fe&&l!==null&&l.memoizedState.isDehydrated&&re(u.stateNode.containerInfo);return;case 12:return;case 13:sd(u);return;case 19:sd(u);return;case 17:return}throw Error(o(163))}switch(u.tag){case 0:case 11:case 14:case 15:ta(3,u,u.return),lu(3,u),ta(5,u,u.return);return;case 12:return;case 13:sd(u);return;case 19:sd(u);return;case 3:fe&&l!==null&&l.memoizedState.isDehydrated&&re(u.stateNode.containerInfo);break;case 22:case 23:return}e:if(de){switch(u.tag){case 1:case 5:case 6:break e;case 3:case 4:u=u.stateNode,bt(u.containerInfo,u.pendingChildren);break e}throw Error(o(163))}}function sd(l){var u=l.updateQueue;if(u!==null){l.updateQueue=null;var v=l.stateNode;v===null&&(v=l.stateNode=new sD),u.forEach(function(M){var w=gD.bind(null,l,M);v.has(M)||(v.add(M),M.then(w,w))})}}function aD(l,u){for(Ve=u;Ve!==null;){u=Ve;var v=u.deletions;if(v!==null)for(var M=0;M";case ad:return":has("+(H0(l)||"")+")";case ld:return'[role="'+l.value+'"]';case ud:return'"'+l.value+'"';case cd:return'[data-testname="'+l.value+'"]';default:throw Error(o(365))}}function gM(l,u){var v=[];l=[l,0];for(var M=0;Mw&&(w=F),M&=~T}if(M=w,M=Fn()-M,M=(120>M?120:480>M?480:1080>M?1080:1920>M?1920:3e3>M?3e3:4320>M?4320:1960*cD(M/1960))-M,10l?16:l,eo===null)var M=!1;else{if(l=eo,eo=null,md=0,Et&6)throw Error(o(331));var w=Et;for(Et|=4,Ve=l.current;Ve!==null;){var T=Ve,F=T.child;if(Ve.flags&16){var Y=T.deletions;if(Y!==null){for(var ue=0;ueFn()-X0?na(l,0):j0|=v),Pi(l,u)}function EM(l,u){u===0&&(l.mode&1?(u=Lh,Lh<<=1,!(Lh&130023424)&&(Lh=4194304)):u=1);var v=di();l=yd(l,u),l!==null&&(Zc(l,u,v),Pi(l,v))}function mD(l){var u=l.memoizedState,v=0;u!==null&&(v=u.retryLane),EM(l,v)}function gD(l,u){var v=0;switch(l.tag){case 13:var M=l.stateNode,w=l.memoizedState;w!==null&&(v=w.retryLane);break;case 19:M=l.stateNode;break;default:throw Error(o(314))}M!==null&&M.delete(u),EM(l,v)}var TM;TM=function(l,u,v){if(l!==null)if(l.memoizedProps!==u.pendingProps||Ln.current)Hi=!0;else{if(!(l.lanes&v)&&!(u.flags&128))return Hi=!1,iD(l,u,v);Hi=!!(l.flags&131072)}else Hi=!1,tn&&u.flags&1048576&&hA(u,Hh,u.index);switch(u.lanes=0,u.tag){case 2:var M=u.type;l!==null&&(l.alternate=null,u.alternate=null,u.flags|=2),l=u.pendingProps;var w=Gr(u,Xt.current);dl(u,v),w=w0(null,u,M,l,w,v);var T=E0();return u.flags|=1,typeof w=="object"&&w!==null&&typeof w.render=="function"&&w.$$typeof===void 0?(u.tag=1,u.memoizedState=null,u.updateQueue=null,It(M)?(T=!0,Ks(u)):T=!1,u.memoizedState=w.state!==null&&w.state!==void 0?w.state:null,f0(u),w.updater=zh,u.stateNode=w,w._reactInternals=u,d0(u,M,l,v),u=I0(null,u,M,!0,T,v)):(u.tag=0,tn&&T&&p0(u),hi(null,u,w,v),u=u.child),u;case 16:M=u.elementType;e:{switch(l!==null&&(l.alternate=null,u.alternate=null,u.flags|=2),l=u.pendingProps,w=M._init,M=w(M._payload),u.type=M,w=u.tag=yD(M),l=Ar(M,l),w){case 0:u=L0(null,u,M,l,v);break e;case 1:u=KA(null,u,M,l,v);break e;case 11:u=jA(null,u,M,l,v);break e;case 14:u=XA(null,u,M,Ar(M.type,l),v);break e}throw Error(o(306,M,""))}return u;case 0:return M=u.type,w=u.pendingProps,w=u.elementType===M?w:Ar(M,w),L0(l,u,M,w,v);case 1:return M=u.type,w=u.pendingProps,w=u.elementType===M?w:Ar(M,w),KA(l,u,M,w,v);case 3:e:{if(JA(u),l===null)throw Error(o(387));M=u.pendingProps,T=u.memoizedState,w=T.element,sA(l,u),Bh(u,M,null,v);var F=u.memoizedState;if(M=F.element,fe&&T.isDehydrated)if(T={element:M,isDehydrated:!1,cache:F.cache,transitions:F.transitions},u.updateQueue.baseState=T,u.memoizedState=T,u.flags&256){w=Error(o(423)),u=QA(l,u,M,v,w);break e}else if(M!==w){w=Error(o(424)),u=QA(l,u,M,v,w);break e}else for(fe&&(Vi=Ch(u.stateNode.containerInfo),zi=u,tn=!0,Mr=null,Kc=!1),v=yA(u,null,M,v),u.child=v;v;)v.flags=v.flags&-3|4096,v=v.sibling;else{if(gl(),M===w){u=vs(l,u,v);break e}hi(l,u,M,v)}u=u.child}return u;case 5:return xA(u),l===null&&v0(u),M=u.type,w=u.pendingProps,T=l!==null?l.memoizedProps:null,F=w.children,ve(M,w)?F=null:T!==null&&ve(M,T)&&(u.flags|=32),ZA(l,u),hi(l,u,F,v),u.child;case 6:return l===null&&v0(u),null;case 13:return $A(l,u,v);case 4:return x0(u,u.stateNode.containerInfo),M=u.pendingProps,l===null?u.child=vl(u,null,M,v):hi(l,u,M,v),u.child;case 11:return M=u.type,w=u.pendingProps,w=u.elementType===M?w:Ar(M,w),jA(l,u,M,w,v);case 7:return hi(l,u,u.pendingProps,v),u.child;case 8:return hi(l,u,u.pendingProps.children,v),u.child;case 12:return hi(l,u,u.pendingProps.children,v),u.child;case 10:e:{if(M=u.type._context,w=u.pendingProps,T=u.memoizedProps,F=w.value,rA(u,M,F),T!==null)if(jr(T.value,F)){if(T.children===w.children&&!Ln.current){u=vs(l,u,v);break e}}else for(T=u.child,T!==null&&(T.return=u);T!==null;){var Y=T.dependencies;if(Y!==null){F=T.child;for(var ue=Y.firstContext;ue!==null;){if(ue.context===M){if(T.tag===1){ue=ds(-1,v&-v),ue.tag=2;var Le=T.updateQueue;if(Le!==null){Le=Le.shared;var qe=Le.pending;qe===null?ue.next=ue:(ue.next=qe.next,qe.next=ue),Le.pending=ue}}T.lanes|=v,ue=T.alternate,ue!==null&&(ue.lanes|=v),u0(T.return,v,u),Y.lanes|=v;break}ue=ue.next}}else if(T.tag===10)F=T.type===u.type?null:T.child;else if(T.tag===18){if(F=T.return,F===null)throw Error(o(341));F.lanes|=v,Y=F.alternate,Y!==null&&(Y.lanes|=v),u0(F,v,u),F=T.sibling}else F=T.child;if(F!==null)F.return=T;else for(F=T;F!==null;){if(F===u){F=null;break}if(T=F.sibling,T!==null){T.return=F.return,F=T;break}F=F.return}T=F}hi(l,u,w.children,v),u=u.child}return u;case 9:return w=u.type,M=u.pendingProps.children,dl(u,v),w=ir(w),M=M(w),u.flags|=1,hi(l,u,M,v),u.child;case 14:return M=u.type,w=Ar(M,u.pendingProps),w=Ar(M.type,w),XA(l,u,M,w,v);case 15:return YA(l,u,u.type,u.pendingProps,v);case 17:return M=u.type,w=u.pendingProps,w=u.elementType===M?w:Ar(M,w),l!==null&&(l.alternate=null,u.alternate=null,u.flags|=2),u.tag=1,It(M)?(l=!0,Ks(u)):l=!1,dl(u,v),uA(u,M,w),d0(u,M,w,v),I0(null,u,M,!0,l,v);case 19:return iM(l,u,v);case 22:return qA(l,u,v)}throw Error(o(156,u.tag))};function bM(l,u){return i0(l,u)}function vD(l,u,v,M){this.tag=l,this.key=v,this.sibling=this.child=this.return=this.stateNode=this.type=this.elementType=null,this.index=0,this.ref=null,this.pendingProps=u,this.dependencies=this.memoizedState=this.updateQueue=this.memoizedProps=null,this.mode=M,this.subtreeFlags=this.flags=0,this.deletions=null,this.childLanes=this.lanes=0,this.alternate=null}function cr(l,u,v,M){return new vD(l,u,v,M)}function ev(l){return l=l.prototype,!(!l||!l.isReactComponent)}function yD(l){if(typeof l=="function")return ev(l)?1:0;if(l!=null){if(l=l.$$typeof,l===_)return 11;if(l===S)return 14}return 2}function io(l,u){var v=l.alternate;return v===null?(v=cr(l.tag,u,l.key,l.mode),v.elementType=l.elementType,v.type=l.type,v.stateNode=l.stateNode,v.alternate=l,l.alternate=v):(v.pendingProps=u,v.type=l.type,v.flags=0,v.subtreeFlags=0,v.deletions=null),v.flags=l.flags&14680064,v.childLanes=l.childLanes,v.lanes=l.lanes,v.child=l.child,v.memoizedProps=l.memoizedProps,v.memoizedState=l.memoizedState,v.updateQueue=l.updateQueue,u=l.dependencies,v.dependencies=u===null?null:{lanes:u.lanes,firstContext:u.firstContext},v.sibling=l.sibling,v.index=l.index,v.ref=l.ref,v}function _d(l,u,v,M,w,T){var F=2;if(M=l,typeof l=="function")ev(l)&&(F=1);else if(typeof l=="string")F=5;else e:switch(l){case h:return sa(v.children,w,T,u);case d:F=8,w|=8;break;case p:return l=cr(12,v,u,w|2),l.elementType=p,l.lanes=T,l;case x:return l=cr(13,v,u,w),l.elementType=x,l.lanes=T,l;case g:return l=cr(19,v,u,w),l.elementType=g,l.lanes=T,l;case E:return Sd(v,w,T,u);default:if(typeof l=="object"&&l!==null)switch(l.$$typeof){case m:F=10;break e;case y:F=9;break e;case _:F=11;break e;case S:F=14;break e;case A:F=16,M=null;break e}throw Error(o(130,l==null?l:typeof l,""))}return u=cr(F,v,u,w),u.elementType=l,u.type=M,u.lanes=T,u}function sa(l,u,v,M){return l=cr(7,l,M,u),l.lanes=v,l}function Sd(l,u,v,M){return l=cr(22,l,M,u),l.elementType=E,l.lanes=v,l.stateNode={},l}function tv(l,u,v){return l=cr(6,l,null,u),l.lanes=v,l}function nv(l,u,v){return u=cr(4,l.children!==null?l.children:[],l.key,u),u.lanes=v,u.stateNode={containerInfo:l.containerInfo,pendingChildren:null,implementation:l.implementation},u}function xD(l,u,v,M,w){this.tag=u,this.containerInfo=l,this.finishedWork=this.pingCache=this.current=this.pendingChildren=null,this.timeoutHandle=it,this.callbackNode=this.pendingContext=this.context=null,this.callbackPriority=0,this.eventTimes=t0(0),this.expirationTimes=t0(-1),this.entangledLanes=this.finishedLanes=this.mutableReadLanes=this.expiredLanes=this.pingedLanes=this.suspendedLanes=this.pendingLanes=0,this.entanglements=t0(0),this.identifierPrefix=M,this.onRecoverableError=w,fe&&(this.mutableSourceEagerHydrationData=null)}function CM(l,u,v,M,w,T,F,Y,ue){return l=new xD(l,u,v,Y,ue),u===1?(u=1,T===!0&&(u|=8)):u=0,T=cr(3,null,null,u),l.current=T,T.stateNode=l,T.memoizedState={element:M,isDehydrated:v,cache:null,transitions:null},f0(T),l}function PM(l){if(!l)return Ct;l=l._reactInternals;e:{if(P(l)!==l||l.tag!==1)throw Error(o(170));var u=l;do{switch(u.tag){case 3:u=u.stateNode.context;break e;case 1:if(It(u.type)){u=u.stateNode.__reactInternalMemoizedMergedChildContext;break e}}u=u.return}while(u!==null);throw Error(o(171))}if(l.tag===1){var v=l.type;if(It(v))return fi(l,v,u)}return u}function RM(l){var u=l._reactInternals;if(u===void 0)throw typeof l.render=="function"?Error(o(188)):(l=Object.keys(l).join(","),Error(o(268,l)));return l=j(u),l===null?null:l.stateNode}function LM(l,u){if(l=l.memoizedState,l!==null&&l.dehydrated!==null){var v=l.retryLane;l.retryLane=v!==0&&v=Le&&T>=gt&&w<=qe&&F<=ot){l.splice(u,1);break}else if(M!==Le||v.width!==ue.width||otF){if(!(T!==gt||v.height!==ue.height||qew)){Le>M&&(ue.width+=Le-M,ue.x=M),qeT&&(ue.height+=gt-T,ue.y=T),otv&&(v=F)),F ")+` No matching component was found for: - `)+c.join(" > ")}return null},t.getPublicRootInstance=function(c){if(c=c.current,!c.child)return null;switch(c.child.tag){case 5:return $(c.child.stateNode);default:return c.child.stateNode}},t.injectIntoDevTools=function(c){if(c={bundleType:c.bundleType,version:c.version,rendererPackageName:c.rendererPackageName,rendererConfig:c.rendererConfig,overrideHookState:null,overrideHookStateDeletePath:null,overrideHookStateRenamePath:null,overrideProps:null,overridePropsDeletePath:null,overridePropsRenamePath:null,setErrorHandler:null,setSuspenseHandler:null,scheduleUpdate:null,currentDispatcherRef:a.ReactCurrentDispatcher,findHostInstanceByFiber:cD,findFiberByHostInstance:c.findFiberByHostInstance||uD,findHostInstancesForRefresh:null,scheduleRefresh:null,scheduleRoot:null,setRefreshHandler:null,getCurrentFiber:null,reconcilerVersion:"18.0.0-fc46dba67-20220329"},typeof __REACT_DEVTOOLS_GLOBAL_HOOK__>"u")c=!1;else{var u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)c=!0;else{try{Xh=u.inject(c),jr=u}catch{}c=!!u.checkDCE}}return c},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(c,u,v,w){if(!z)throw Error(o(363));c=sv(c,u);var M=Pe(c,v,w).disconnect;return{disconnect:function(){M()}}},t.registerMutableSourceForHydration=function(c,u){var v=u._getVersion;v=v(u._source),c.mutableSourceEagerHydrationData==null?c.mutableSourceEagerHydrationData=[u,v]:c.mutableSourceEagerHydrationData.push(u,v)},t.runWithPriority=function(c,u){var v=Ot;try{return Ot=c,u()}finally{Ot=v}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(c,u,v,w){var M=u.current,T=pi(),B=ro(M);return v=$w(v),u.context===null?u.context=v:u.pendingContext=v,u=ms(T,B),u.payload={element:c},w=w===void 0?null:w,w!==null&&(u.callback=w),to(M,u),c=cr(M,B,T),c!==null&&Jh(c,M,B),B},t};$3.exports=Y7;var q7=$3.exports;const K7=cS(q7),Z7=n=>typeof n=="object"&&typeof n.then=="function",Ga=[];function tN(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=Ga.indexOf(r);s!==-1&&Ga.splice(s,1)},promise:(Z7(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(Ga.push(r),!t)throw r.promise}const J7=(n,e,t)=>nN(n,e,!1,t),$7=(n,e,t)=>void nN(n,e,!0,t),Q7=n=>{if(n===void 0||n.length===0)Ga.splice(0,Ga.length);else{const e=Ga.find(t=>tN(n,t.keys,t.equal));e&&e.remove()}},xA={},eX=n=>void Object.assign(xA,n);function tX(n,e){function t(h,{args:d=[],attach:p,...m},y){let _=`${h[0].toUpperCase()}${h.slice(1)}`,x;if(h==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;x=tc(g,{type:h,root:y,attach:p,primitive:!0})}else{const g=xA[_];if(!g)throw new Error(`R3F: ${_} 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=tc(new g(...d),{type:h,root:y,attach:p,memoizedProps:{args:d}})}return x.__r3f.attach===void 0&&(x instanceof St?x.__r3f.attach="geometry":x instanceof Zn&&(x.__r3f.attach="material")),_!=="inject"&&Zy(x,m),x}function i(h,d){let p=!1;if(d){var m,y;(m=d.__r3f)!=null&&m.attach?Ky(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||tc(d,{}),d.__r3f.parent=h,oS(d),nc(d)}}function r(h,d,p){let m=!1;if(d){var y,_;if((y=d.__r3f)!=null&&y.attach)Ky(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(S=>S!==d),g=x.indexOf(p);h.children=[...x.slice(0,g),d,...x.slice(g)],m=!0}m||(_=h.__r3f)==null||_.objects.push(d),d.__r3f||tc(d,{}),d.__r3f.parent=h,oS(d),nc(d)}}function s(h,d,p=!1){h&&[...h].forEach(m=>o(d,m,p))}function o(h,d,p){if(d){var m,y,_;if(d.__r3f&&(d.__r3f.parent=null),(m=h.__r3f)!=null&&m.objects&&(h.__r3f.objects=h.__r3f.objects.filter(E=>E!==d)),(y=d.__r3f)!=null&&y.attach)mC(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var x;h.remove(d),(x=d.__r3f)!=null&&x.root&&uX(_m(d),d)}const S=(_=d.__r3f)==null?void 0:_.primitive,A=!S&&(p===void 0?d.dispose!==null:p);if(!S){var g;s((g=d.__r3f)==null?void 0:g.objects,d,A),s(d.children,d,A)}if(delete d.__r3f,A&&d.dispose&&d.type!=="Scene"){const E=()=>{try{d.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?rS.unstable_scheduleCallback(rS.unstable_IdlePriority,E):E()}nc(h)}}function a(h,d,p,m){var y;const _=(y=h.__r3f)==null?void 0:y.parent;if(!_)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(_,h),x.parent&&(x.__r3f.autoRemovedBeforeAppend=!0),i(_,x),x.raycast&&x.__r3f.eventCount&&_m(x).getState().internal.interaction.push(x),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=x,g.ref&&(typeof g.ref=="function"?g.ref(x):g.ref.current=x))})}const l=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:K7({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 m=h.getState().scene;m.__r3f&&r(m,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,m){var y;if(((y=h==null?void 0:h.__r3f)!=null?y:{}).primitive&&m.object&&m.object!==h)return[!0];{const{args:x=[],children:g,...S}=m,{args:A=[],children:E,...R}=p;if(!Array.isArray(x))throw new Error("R3F: the args prop must be an array!");if(x.some((L,I)=>L!==A[I]))return[!0];const C=cN(h,S,R,!0);return C.changes.length?[!1,C]:null}},commitUpdate(h,[d,p],m,y,_,x){d?a(h,m,_,x):Zy(h,p)},commitMount(h,d,p,m){var y;const _=(y=h.__r3f)!=null?y:{};h.raycast&&_.handlers&&_.eventCount&&_m(h).getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>tc(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:m}=(d=h.__r3f)!=null?d:{};p&&m&&mC(m,h,p),h.isObject3D&&(h.visible=!1),nc(h)},unhideInstance(h,d){var p;const{attach:m,parent:y}=(p=h.__r3f)!=null?p:{};m&&y&&Ky(y,h,m),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),nc(h)},createTextInstance:l,hideTextInstance:l,unhideTextInstance:l,getCurrentEventPriority:()=>e?e():Ec.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&qt.fun(performance.now)?performance.now:qt.fun(Date.now)?Date.now:()=>0,scheduleTimeout:qt.fun(setTimeout)?setTimeout:void 0,cancelTimeout:qt.fun(clearTimeout)?clearTimeout:void 0}),applyProps:Zy}}var fC,hC;const qy=n=>"colorSpace"in n||"outputColorSpace"in n,iN=()=>{var n;return(n=xA.ColorManagement)!=null?n:null},rN=n=>n&&n.isOrthographicCamera,nX=n=>n&&n.hasOwnProperty("current"),Uh=typeof window<"u"&&((fC=window.document)!=null&&fC.createElement||((hC=window.navigator)==null?void 0:hC.product)==="ReactNative")?F.useLayoutEffect:F.useEffect;function sN(n){const e=F.useRef(n);return Uh(()=>void(e.current=n),[n]),e}function iX({set:n}){return Uh(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class oN extends F.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}oN.getDerivedStateFromError=()=>({error:!0});const aN="__default",dC=new Map,rX=n=>n&&!!n.memoized&&!!n.changes;function lN(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 ju=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()};function _m(n){let e=n.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const qt={obj:n=>n===Object(n)&&!qt.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(qt.str(n)||qt.num(n)||qt.boo(n))return n===e;const s=qt.obj(n);if(s&&i==="reference")return n===e;const o=qt.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(!qt.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(qt.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 sX(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 oX(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function tc(n,e){const t=n;return t.__r3f={type:"",root:null,previousAttach:null,memoizedProps:{},eventCount:0,handlers:{},objects:[],parent:null,...e},n}function sS(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 pC=/-\d+$/;function Ky(n,e,t){if(qt.str(t)){if(pC.test(t)){const s=t.replace(pC,""),{target:o,key:a}=sS(n,s);Array.isArray(o[a])||(o[a]=[])}const{target:i,key:r}=sS(n,t);e.__r3f.previousAttach=i[r],i[r]=e}else e.__r3f.previousAttach=t(n,e)}function mC(n,e,t){var i,r;if(qt.str(t)){const{target:s,key:o}=sS(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 cN(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...l}={},f=!1){const h=n.__r3f,d=Object.entries(r),p=[];if(f){const y=Object.keys(l);for(let _=0;_{var x;if((x=n.__r3f)!=null&&x.primitive&&y==="object"||qt.equ(_,l[y]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(y))return p.push([y,_,!0,[]]);let g=[];y.includes("-")&&(g=y.split("-")),p.push([y,_,!1,g]);for(const S in r){const A=r[S];S.startsWith(`${y}-`)&&p.push([S,A,!1,S.split("-")])}});const m={...r};return h!=null&&h.memoizedProps&&h!=null&&h.memoizedProps.args&&(m.args=h.memoizedProps.args),h!=null&&h.memoizedProps&&h!=null&&h.memoizedProps.attach&&(m.attach=h.memoizedProps.attach),{memoized:m,changes:p}}const aX=typeof process<"u"&&!1;function Zy(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}=rX(e)?e:cN(n,e),l=i==null?void 0:i.eventCount;n.__r3f&&(n.__r3f.memoizedProps=o);for(let h=0;hg[S],n),!(x&&x.set))){const[g,...S]=y.reverse();_=S.reverse().reduce((A,E)=>A[E],n),d=g}if(p===aN+"remove")if(_.constructor){let g=dC.get(_.constructor);g||(g=new _.constructor,dC.set(_.constructor,g)),p=g[d]}else p=0;if(m&&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 Ka)){if(Array.isArray(p))x.fromArray?x.fromArray(p):x.set(...p);else if(x.copy&&p&&p.constructor&&(aX?x.constructor.name===p.constructor.name:x.constructor===p.constructor))x.copy(p);else if(p!==void 0){const g=x instanceof je;!g&&x.setScalar?x.setScalar(p):x instanceof Ka&&p instanceof Ka?x.mask=p.mask:x.set(p),!iN()&&s&&!s.linear&&g&&x.convertSRGBToLinear()}}else if(_[d]=p,_[d]instanceof tn&&_[d].format===_i&&_[d].type===us&&s){const g=_[d];qy(g)&&qy(s.gl)?g.colorSpace=s.gl.outputColorSpace:g.encoding=s.gl.outputEncoding}nc(n)}if(i&&i.parent&&n.raycast&&l!==i.eventCount){const h=_m(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&&oS(n),n}function nc(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 oS(n){n.onUpdate==null||n.onUpdate(n)}function lX(n,e){n.manual||(rN(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 Zp(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function cX(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return Ec.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return Ec.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return Ec.ContinuousEventPriority;default:return Ec.DefaultEventPriority}}function uN(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function uX(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)=>{uN(t.capturedMap,e,i,r)})}function fX(n){function e(l){const{internal:f}=n.getState(),h=l.offsetX-f.initialClick[0],d=l.offsetY-f.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(l){return l.filter(f=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=f.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(l,f){const h=n.getState(),d=new Set,p=[],m=f?f(h.internal.interaction):h.internal.interaction;for(let g=0;g{const A=ju(g.object),E=ju(S.object);return!A||!E?g.distance-S.distance:E.events.priority-A.events.priority||g.distance-S.distance}).filter(g=>{const S=Zp(g);return d.has(S)?!1:(d.add(S),!0)});h.events.filter&&(_=h.events.filter(_,h));for(const g of _){let S=g.object;for(;S;){var x;(x=S.__r3f)!=null&&x.eventCount&&p.push({...g,eventObject:S}),S=S.parent}}if("pointerId"in l&&h.internal.capturedMap.has(l.pointerId))for(let g of h.internal.capturedMap.get(l.pointerId).values())d.has(Zp(g.intersection))||p.push(g.intersection);return p}function r(l,f,h,d){const p=n.getState();if(l.length){const m={stopped:!1};for(const y of l){const _=ju(y.object)||p,{raycaster:x,pointer:g,camera:S,internal:A}=_,E=new O(g.x,g.y,0).unproject(S),R=b=>{var D,j;return(D=(j=A.capturedMap.get(b))==null?void 0:j.has(y.eventObject))!=null?D:!1},C=b=>{const D={intersection:y,target:f.target};A.capturedMap.has(b)?A.capturedMap.get(b).set(y.eventObject,D):A.capturedMap.set(b,new Map([[y.eventObject,D]])),f.target.setPointerCapture(b)},L=b=>{const D=A.capturedMap.get(b);D&&uN(A.capturedMap,y.eventObject,D,b)};let I={};for(let b in f){let D=f[b];typeof D!="function"&&(I[b]=D)}let P={...y,...I,pointer:g,intersections:l,stopped:m.stopped,delta:h,unprojectedPoint:E,ray:x.ray,camera:S,stopPropagation(){const b="pointerId"in f&&A.capturedMap.get(f.pointerId);if((!b||b.has(y.eventObject))&&(P.stopped=m.stopped=!0,A.hovered.size&&Array.from(A.hovered.values()).find(D=>D.eventObject===y.eventObject))){const D=l.slice(0,l.indexOf(y));s([...D,y])}},target:{hasPointerCapture:R,setPointerCapture:C,releasePointerCapture:L},currentTarget:{hasPointerCapture:R,setPointerCapture:C,releasePointerCapture:L},nativeEvent:f};if(d(P),m.stopped===!0)break}}return l}function s(l){const{internal:f}=n.getState();for(const h of f.hovered.values())if(!l.length||!l.find(d=>d.object===h.object&&d.index===h.index&&d.instanceId===h.instanceId)){const p=h.eventObject.__r3f,m=p==null?void 0:p.handlers;if(f.hovered.delete(Zp(h)),p!=null&&p.eventCount){const y={...h,intersections:l};m.onPointerOut==null||m.onPointerOut(y),m.onPointerLeave==null||m.onPointerLeave(y)}}}function o(l,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 m=l==="onPointerMove",y=l==="onClick"||l==="onContextMenu"||l==="onDoubleClick",x=i(h,m?t:void 0),g=y?e(h):0;l==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=x.map(A=>A.eventObject)),y&&!x.length&&g<=2&&(o(h,p.interaction),d&&d(h)),m&&s(x);function S(A){const E=A.eventObject,R=E.__r3f,C=R==null?void 0:R.handlers;if(R!=null&&R.eventCount)if(m){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const L=Zp(A),I=p.hovered.get(L);I?I.stopped&&A.stopPropagation():(p.hovered.set(L,A),C.onPointerOver==null||C.onPointerOver(A),C.onPointerEnter==null||C.onPointerEnter(A))}C.onPointerMove==null||C.onPointerMove(A)}else{const L=C[l];L?(!y||p.initialHits.includes(E))&&(o(h,p.interaction.filter(I=>!p.initialHits.includes(I))),L(A)):y&&p.initialHits.includes(E)&&o(h,p.interaction.filter(I=>!p.initialHits.includes(I)))}}r(x,h,g,S)}}return{handlePointer:a}}const fN=n=>!!(n!=null&&n.render),hN=F.createContext(null),hX=(n,e)=>{const t=J3((a,l)=>{const f=new O,h=new O,d=new O;function p(g=l().camera,S=h,A=l().size){const{width:E,height:R,top:C,left:L}=A,I=E/R;S instanceof O?d.copy(S):d.set(...S);const P=g.getWorldPosition(f).distanceTo(d);if(rN(g))return{width:E/g.zoom,height:R/g.zoom,top:C,left:L,factor:1,distance:P,aspect:I};{const b=g.fov*Math.PI/180,D=2*Math.tan(b/2)*P,j=D*(E/R);return{width:j,height:D,top:C,left:L,factor:E/j,distance:P,aspect:I}}}let m;const y=g=>a(S=>({performance:{...S.performance,current:g}})),_=new pe;return{set:a,get:l,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>n(l(),g),advance:(g,S)=>e(g,S,l()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new mA,pointer:_,mouse:_,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=l();m&&clearTimeout(m),g.performance.current!==g.performance.min&&y(g.performance.min),m=setTimeout(()=>y(l().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(S=>({...S,events:{...S.events,...g}})),setSize:(g,S,A,E,R)=>{const C=l().camera,L={width:g,height:S,top:E||0,left:R||0,updateStyle:A};a(I=>({size:L,viewport:{...I.viewport,...p(C,h,L)}}))},setDpr:g=>a(S=>{const A=lN(g);return{viewport:{...S.viewport,dpr:A,initialDpr:S.viewport.initialDpr||A}}}),setFrameloop:(g="always")=>{const S=l().clock;S.stop(),S.elapsedTime=0,g!=="never"&&(S.start(),S.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:F.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,S,A)=>{const E=l().internal;return E.priority=E.priority+(S>0?1:0),E.subscribers.push({ref:g,priority:S,store:A}),E.subscribers=E.subscribers.sort((R,C)=>R.priority-C.priority),()=>{const R=l().internal;R!=null&&R.subscribers&&(R.priority=R.priority-(S>0?1:0),R.subscribers=R.subscribers.filter(C=>C.ref!==g))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:l,viewport:f,gl:h,set:d}=t.getState();if(l.width!==r.width||l.height!==r.height||f.dpr!==s){var p;r=l,s=f.dpr,lX(a,l),h.setPixelRatio(f.dpr);const m=(p=l.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&h.domElement instanceof HTMLCanvasElement;h.setSize(l.width,l.height,m)}a!==o&&(o=a,d(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Jp,dX=new Set,pX=new Set,mX=new Set;function Jy(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function Xu(n,e){switch(n){case"before":return Jy(dX,e);case"after":return Jy(pX,e);case"tail":return Jy(mX,e)}}let $y,Qy;function ex(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),$y=e.internal.subscribers,Jp=0;Jp<$y.length;Jp++)Qy=$y[Jp],Qy.ref.current(Qy.store.getState(),i,t);return!e.internal.priority&&e.gl.render&&e.gl.render(e.scene,e.camera),e.internal.frames=Math.max(0,e.internal.frames-1),e.frameloop==="always"?1:e.internal.frames}function gX(n){let e=!1,t=!1,i,r,s;function o(f){r=requestAnimationFrame(o),e=!0,i=0,Xu("before",f),t=!0;for(const d of n.values()){var h;s=d.store.getState(),s.internal.active&&(s.frameloop==="always"||s.internal.frames>0)&&!((h=s.gl.xr)!=null&&h.isPresenting)&&(i+=ex(f,s))}if(t=!1,Xu("after",f),i===0)return Xu("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 l(f,h=!0,d,p){if(h&&Xu("before",f),d)ex(f,d,p);else for(const m of n.values())ex(f,m.store.getState());h&&Xu("after",f)}return{loop:o,invalidate:a,advance:l}}function dN(){const n=F.useContext(hN);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function qi(n=t=>t,e){return dN()(n,e)}function _A(n,e=0){const t=dN(),i=t.getState().internal.subscribe,r=sN(n);return Uh(()=>i(r,e,t),[e,i,t]),null}const gC=new WeakMap;function pN(n,e){return function(t,...i){let r=gC.get(t);return r||(r=new t,gC.set(t,r)),n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,l=>{l.scene&&Object.assign(l,sX(l.scene)),o(l)},e,l=>a(new Error(`Could not load ${s}: ${l==null?void 0:l.message}`))))))}}function Oh(n,e,t,i){const r=Array.isArray(e)?e:[e],s=J7(pN(t,i),[n,...r],{equal:qt.equ});return Array.isArray(e)?s:s[0]}Oh.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return $7(pN(t),[n,...i])};Oh.clear=function(n,e){const t=Array.isArray(e)?e:[e];return Q7([n,...t])};const jc=new Map,{invalidate:vC,advance:yC}=gX(jc),{reconciler:cg,applyProps:es}=tX(jc,cX),ec={objects:"shallow",strict:!1},vX=(n,e)=>{const t=typeof n=="function"?n(e):n;return fN(t)?t:new n3({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function yX(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 xX(n){const e=jc.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||hX(vC,yC),o=t||cg.createContainer(s,Ec.ConcurrentRoot,null,!1,null,"",r,null);e||jc.set(n,{fiber:o,store:s});let a,l=!1,f;return{configure(h={}){let{gl:d,size:p,scene:m,events:y,onCreated:_,shadows:x=!1,linear:g=!1,flat:S=!1,legacy:A=!1,orthographic:E=!1,frameloop:R="always",dpr:C=[1,2],performance:L,raycaster:I,camera:P,onPointerMissed:b}=h,D=s.getState(),j=D.gl;D.gl||D.set({gl:j=vX(d,n)});let X=D.raycaster;X||D.set({raycaster:X=new q3});const{params:te,...ne}=I||{};if(qt.equ(ne,X,ec)||es(X,{...ne}),qt.equ(te,X.params,ec)||es(X,{params:{...X.params,...te}}),!D.camera||D.camera===f&&!qt.equ(f,P,ec)){f=P;const J=P instanceof bh,Q=J?P:E?new Ur(0,0,0,0,.1,1e3):new an(75,0,.1,1e3);J||(Q.position.z=5,P&&(es(Q,P),("aspect"in P||"left"in P||"right"in P||"bottom"in P||"top"in P)&&(Q.manual=!0,Q.updateProjectionMatrix())),!D.camera&&!(P!=null&&P.rotation)&&Q.lookAt(0,0,0)),D.set({camera:Q}),X.camera=Q}if(!D.scene){let J;m instanceof sg?J=m:(J=new sg,m&&es(J,m)),D.set({scene:tc(J)})}if(!D.xr){var $;const J=(De,oe)=>{const ve=s.getState();ve.frameloop!=="never"&&yC(De,!0,ve,oe)},Q=()=>{const De=s.getState();De.gl.xr.enabled=De.gl.xr.isPresenting,De.gl.xr.setAnimationLoop(De.gl.xr.isPresenting?J:null),De.gl.xr.isPresenting||vC(De)},_e={connect(){const De=s.getState().gl;De.xr.addEventListener("sessionstart",Q),De.xr.addEventListener("sessionend",Q)},disconnect(){const De=s.getState().gl;De.xr.removeEventListener("sessionstart",Q),De.xr.removeEventListener("sessionend",Q)}};typeof(($=j.xr)==null?void 0:$.addEventListener)=="function"&&_e.connect(),D.set({xr:_e})}if(j.shadowMap){const J=j.shadowMap.enabled,Q=j.shadowMap.type;if(j.shadowMap.enabled=!!x,qt.boo(x))j.shadowMap.type=mf;else if(qt.str(x)){var le;const _e={basic:kL,percentage:zg,soft:mf,variance:Rr};j.shadowMap.type=(le=_e[x])!=null?le:mf}else qt.obj(x)&&Object.assign(j.shadowMap,x);(J!==j.shadowMap.enabled||Q!==j.shadowMap.type)&&(j.shadowMap.needsUpdate=!0)}const k=iN();k&&("enabled"in k?k.enabled=!A:"legacyMode"in k&&(k.legacyMode=A)),l||es(j,{outputEncoding:g?3e3:3001,toneMapping:S?ls:L1}),D.legacy!==A&&D.set(()=>({legacy:A})),D.linear!==g&&D.set(()=>({linear:g})),D.flat!==S&&D.set(()=>({flat:S})),d&&!qt.fun(d)&&!fN(d)&&!qt.equ(d,j,ec)&&es(j,d),y&&!D.events.handlers&&D.set({events:y(s)});const q=yX(n,p);return qt.equ(q,D.size,ec)||D.setSize(q.width,q.height,q.updateStyle,q.top,q.left),C&&D.viewport.dpr!==lN(C)&&D.setDpr(C),D.frameloop!==R&&D.setFrameloop(R),D.onPointerMissed||D.set({onPointerMissed:b}),L&&!qt.equ(L,D.performance,ec)&&D.set(J=>({performance:{...J.performance,...L}})),a=_,l=!0,this},render(h){return l||this.configure(),cg.updateContainer(H.jsx(_X,{store:s,children:h,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){mN(n)}}}function _X({store:n,children:e,onCreated:t,rootElement:i}){return Uh(()=>{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)},[]),H.jsx(hN.Provider,{value:n,children:e})}function mN(n,e){const t=jc.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),cg.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,l;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(),(l=r.gl)!=null&&l.xr&&r.xr.disconnect(),oX(r),jc.delete(n),e&&e(n)}catch{}},500)})}}cg.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:F.version});function aS(n,e,t){var i,r,s,o,a;e==null&&(e=100);function l(){var h=Date.now()-o;h=0?i=setTimeout(l,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(l,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}aS.debounce=aS;var SX=aS;const xC=cS(SX);function AX(n){let{debounce:e,scroll:t,polyfill:i,offsetSize:r}=n===void 0?{debounce:0,scroll:!1,offsetSize:!1}:n;const s=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=F.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),l=F.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),f=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=F.useRef(!1);F.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,m,y]=F.useMemo(()=>{const S=()=>{if(!l.current.element)return;const{left:A,top:E,width:R,height:C,bottom:L,right:I,x:P,y:b}=l.current.element.getBoundingClientRect(),D={left:A,top:E,width:R,height:C,bottom:L,right:I,x:P,y:b};l.current.element instanceof HTMLElement&&r&&(D.height=l.current.element.offsetHeight,D.width=l.current.element.offsetWidth),Object.freeze(D),d.current&&!TX(l.current.lastBounds,D)&&a(l.current.lastBounds=D)};return[S,h?xC(S,h):S,f?xC(S,f):S]},[a,r,f,h]);function _(){l.current.scrollContainers&&(l.current.scrollContainers.forEach(S=>S.removeEventListener("scroll",y,!0)),l.current.scrollContainers=null),l.current.resizeObserver&&(l.current.resizeObserver.disconnect(),l.current.resizeObserver=null)}function x(){l.current.element&&(l.current.resizeObserver=new s(y),l.current.resizeObserver.observe(l.current.element),t&&l.current.scrollContainers&&l.current.scrollContainers.forEach(S=>S.addEventListener("scroll",y,{capture:!0,passive:!0})))}const g=S=>{!S||S===l.current.element||(_(),l.current.element=S,l.current.scrollContainers=gN(S),x())};return MX(y,!!t),wX(m),F.useEffect(()=>{_(),x()},[t,y,m]),F.useEffect(()=>_,[]),[g,o,p]}function wX(n){F.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function MX(n,e){F.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function gN(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,...gN(n.parentElement)]}const EX=["x","y","top","bottom","left","right","width","height"],TX=(n,e)=>EX.every(t=>n[t]===e[t]);var bX=Object.defineProperty,CX=Object.defineProperties,PX=Object.getOwnPropertyDescriptors,_C=Object.getOwnPropertySymbols,RX=Object.prototype.hasOwnProperty,LX=Object.prototype.propertyIsEnumerable,SC=(n,e,t)=>e in n?bX(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,AC=(n,e)=>{for(var t in e||(e={}))RX.call(e,t)&&SC(n,t,e[t]);if(_C)for(var t of _C(e))LX.call(e,t)&&SC(n,t,e[t]);return n},IX=(n,e)=>CX(n,PX(e)),wC,MC;typeof window<"u"&&((wC=window.document)!=null&&wC.createElement||((MC=window.navigator)==null?void 0:MC.product)==="ReactNative")?F.useLayoutEffect:F.useEffect;function vN(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=vN(i,e,t);if(r)return r;i=e?null:i.sibling}}function yN(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const EC=console.error;console.error=function(){const n=[...arguments].join("");if(n!=null&&n.startsWith("Warning:")&&n.includes("useContext")){console.error=EC;return}return EC.apply(this,arguments)};const SA=yN(F.createContext(null));class xN extends F.Component{render(){return F.createElement(SA.Provider,{value:this._reactInternals},this.props.children)}}function NX(){const n=F.useContext(SA);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=F.useId();return F.useMemo(()=>{for(const i of[n,n==null?void 0:n.alternate]){if(!i)continue;const r=vN(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 DX(){const n=NX(),[e]=F.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,F.useContext(yN(r)))}t=t.return}return e}function UX(){const n=DX();return F.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>F.createElement(e,null,F.createElement(t.Provider,IX(AC({},i),{value:n.get(t)}))),e=>F.createElement(xN,AC({},e))),[n])}const tx={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 OX(n){const{handlePointer:e}=fX(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(tx).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[l,f]=tx[o];t.addEventListener(l,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]=tx[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const kX=F.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=OX,eventSource:a,eventPrefix:l,shadows:f,linear:h,flat:d,legacy:p,orthographic:m,frameloop:y,dpr:_,performance:x,raycaster:g,camera:S,scene:A,onPointerMissed:E,onCreated:R,...C},L){F.useMemo(()=>eX(W7),[]);const I=UX(),[P,b]=AX({scroll:!0,debounce:{scroll:50,resize:0},...i}),D=F.useRef(null),j=F.useRef(null);F.useImperativeHandle(L,()=>D.current);const X=sN(E),[te,ne]=F.useState(!1),[$,le]=F.useState(!1);if(te)throw te;if($)throw $;const k=F.useRef(null);Uh(()=>{const J=D.current;b.width>0&&b.height>0&&J&&(k.current||(k.current=xX(J)),k.current.configure({gl:s,events:o,shadows:f,linear:h,flat:d,legacy:p,orthographic:m,frameloop:y,dpr:_,performance:x,raycaster:g,camera:S,scene:A,size:b,onPointerMissed:(...Q)=>X.current==null?void 0:X.current(...Q),onCreated:Q=>{Q.events.connect==null||Q.events.connect(a?nX(a)?a.current:a:j.current),l&&Q.setEvents({compute:(_e,De)=>{const oe=_e[l+"X"],ve=_e[l+"Y"];De.pointer.set(oe/De.size.width*2-1,-(ve/De.size.height)*2+1),De.raycaster.setFromCamera(De.pointer,De.camera)}}),R==null||R(Q)}}),k.current.render(H.jsx(I,{children:H.jsx(oN,{set:le,children:H.jsx(F.Suspense,{fallback:H.jsx(iX,{set:ne}),children:e})})})))}),F.useEffect(()=>{const J=D.current;if(J)return()=>mN(J)},[]);const q=a?"none":"auto";return H.jsx("div",{ref:j,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:q,...r},...C,children:H.jsx("div",{ref:P,style:{width:"100%",height:"100%"},children:H.jsx("canvas",{ref:D,style:{display:"block"},children:t})})})}),FX=F.forwardRef(function(e,t){return H.jsx(xN,{children:H.jsx(kX,{...e,ref:t})})});function fh(){return fh=Object.assign?Object.assign.bind():function(n){for(var e=1;eMath.PI/2}function HX(n,e,t,i){const r=kh.setFromMatrixPosition(n.matrixWorld),s=r.clone();s.project(e),TC.set(s.x,s.y),t.setFromCamera(TC,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return r.distanceTo(t.ray.origin)Math.abs(n)<1e-10?0:n;function _N(n,e,t=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=lS(e[r]*n.elements[r])+(r!==15?",":")");return t+i}const jX=(n=>e=>_N(e,n))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),XX=(n=>(e,t)=>_N(e,n(t),"translate(-50%,-50%)"))(n=>[1/n,1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1]);function YX(n){return n&&typeof n=="object"&&"current"in n}const qX=F.forwardRef(({children:n,eps:e=.001,style:t,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:l,sprite:f=!1,transform:h=!1,occlude:d,onOcclude:p,castShadow:m,receiveShadow:y,material:_,geometry:x,zIndexRange:g=[16777271,0],calculatePosition:S=zX,as:A="div",wrapperClass:E,pointerEvents:R="auto",...C},L)=>{const{gl:I,camera:P,scene:b,size:D,raycaster:j,events:X,viewport:te}=qi(),[ne]=F.useState(()=>document.createElement(A)),$=F.useRef(),le=F.useRef(null),k=F.useRef(0),q=F.useRef([0,0]),J=F.useRef(null),Q=F.useRef(null),_e=(a==null?void 0:a.current)||X.connected||I.domElement.parentNode,De=F.useRef(null),oe=F.useRef(!1),ve=F.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&YX(d[0]),[d]);F.useLayoutEffect(()=>{const Xe=I.domElement;d&&d==="blending"?(Xe.style.zIndex=`${Math.floor(g[0]/2)}`,Xe.style.position="absolute",Xe.style.pointerEvents="none"):(Xe.style.zIndex=null,Xe.style.position=null,Xe.style.pointerEvents=null)},[d]),F.useLayoutEffect(()=>{if(le.current){const Xe=$.current=HR(ne);if(b.updateMatrixWorld(),h)ne.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const V=S(le.current,P,D);ne.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${V[0]}px,${V[1]}px,0);transform-origin:0 0;`}return _e&&(r?_e.prepend(ne):_e.appendChild(ne)),()=>{_e&&_e.removeChild(ne),Xe.unmount()}}},[_e,h]),F.useLayoutEffect(()=>{E&&(ne.className=E)},[E]);const Te=F.useMemo(()=>h?{position:"absolute",top:0,left:0,width:D.width,height:D.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-D.height/2,left:-D.width/2,width:D.width,height:D.height},...t},[t,s,o,D,h]),we=F.useMemo(()=>({position:"absolute",pointerEvents:R}),[R]);F.useLayoutEffect(()=>{if(oe.current=!1,h){var Xe;(Xe=$.current)==null||Xe.render(F.createElement("div",{ref:J,style:Te},F.createElement("div",{ref:Q,style:we},F.createElement("div",{ref:L,className:i,style:t,children:n}))))}else{var V;(V=$.current)==null||V.render(F.createElement("div",{ref:L,style:Te,className:i,children:n}))}});const nt=F.useRef(!0);_A(Xe=>{if(le.current){P.updateMatrixWorld(),le.current.updateWorldMatrix(!0,!1);const V=h?q.current:S(le.current,P,D);if(h||Math.abs(k.current-P.zoom)>e||Math.abs(q.current[0]-V[0])>e||Math.abs(q.current[1]-V[1])>e){const de=VX(le.current,P);let fe=!1;ve&&(Array.isArray(d)?fe=d.map(Ue=>Ue.current):d!=="blending"&&(fe=[b]));const Me=nt.current;if(fe){const Ue=HX(le.current,P,j,fe);nt.current=Ue&&!de}else nt.current=!de;Me!==nt.current&&(p?p(!nt.current):ne.style.display=nt.current?"block":"none");const Se=Math.floor(g[0]/2),Ee=d?ve?[g[0],Se]:[Se-1,0]:g;if(ne.style.zIndex=`${WX(le.current,P,Ee)}`,h){const[Ue,ke]=[D.width/2,D.height/2],lt=P.projectionMatrix.elements[5]*ke,{isOrthographicCamera:z,top:N,left:se,bottom:xe,right:ye}=P,Ae=jX(P.matrixWorldInverse),$e=z?`scale(${lt})translate(${lS(-(ye+se)/2)}px,${lS((N+xe)/2)}px)`:`translateZ(${lt}px)`;let Pe=le.current.matrixWorld;f&&(Pe=P.matrixWorldInverse.clone().transpose().copyPosition(Pe).scale(le.current.scale),Pe.elements[3]=Pe.elements[7]=Pe.elements[11]=0,Pe.elements[15]=1),ne.style.width=D.width+"px",ne.style.height=D.height+"px",ne.style.perspective=z?"":`${lt}px`,J.current&&Q.current&&(J.current.style.transform=`${$e}${Ae}translate(${Ue}px,${ke}px)`,Q.current.style.transform=XX(Pe,1/((l||10)/400)))}else{const Ue=l===void 0?1:GX(le.current,P)*l;ne.style.transform=`translate3d(${V[0]}px,${V[1]}px,0) scale(${Ue})`}q.current=V,k.current=P.zoom}}if(!ve&&De.current&&!oe.current)if(h){if(J.current){const V=J.current.children[0];if(V!=null&&V.clientWidth&&V!=null&&V.clientHeight){const{isOrthographicCamera:de}=P;if(de||x)C.scale&&(Array.isArray(C.scale)?C.scale instanceof O?De.current.scale.copy(C.scale.clone().divideScalar(1)):De.current.scale.set(1/C.scale[0],1/C.scale[1],1/C.scale[2]):De.current.scale.setScalar(1/C.scale));else{const fe=(l||10)/400,Me=V.clientWidth*fe,Se=V.clientHeight*fe;De.current.scale.set(Me,Se,1)}oe.current=!0}}}else{const V=ne.children[0];if(V!=null&&V.clientWidth&&V!=null&&V.clientHeight){const de=1/te.factor,fe=V.clientWidth*de,Me=V.clientHeight*de;De.current.scale.set(fe,Me,1),oe.current=!0}De.current.lookAt(Xe.camera.position)}});const it=F.useMemo(()=>({vertexShader:h?void 0:` + `)+l.join(" > ")}return null},t.getPublicRootInstance=function(l){if(l=l.current,!l.child)return null;switch(l.child.tag){case 5:return Q(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:_D,findFiberByHostInstance:l.findFiberByHostInstance||SD,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 u=__REACT_DEVTOOLS_GLOBAL_HOOK__;if(u.isDisabled||!u.supportsFiber)l=!0;else{try{Dh=u.inject(l),Wr=u}catch{}l=!!u.checkDCE}}return l},t.isAlreadyRendering=function(){return!1},t.observeVisibleRects=function(l,u,v,M){if(!B)throw Error(o(363));l=G0(l,u);var w=Pe(l,v,M).disconnect;return{disconnect:function(){w()}}},t.registerMutableSourceForHydration=function(l,u){var v=u._getVersion;v=v(u._source),l.mutableSourceEagerHydrationData==null?l.mutableSourceEagerHydrationData=[u,v]:l.mutableSourceEagerHydrationData.push(u,v)},t.runWithPriority=function(l,u){var v=Ot;try{return Ot=l,u()}finally{Ot=v}},t.shouldError=function(){return null},t.shouldSuspend=function(){return!1},t.updateContainer=function(l,u,v,M){var w=u.current,T=di(),F=to(w);return v=PM(v),u.context===null?u.context=v:u.pendingContext=v,u=ds(T,F),u.payload={element:l},M=M===void 0?null:M,M!==null&&(u.callback=M),Qs(w,u),l=lr(w,F,T),l!==null&&Fh(l,w,F),F},t};c3.exports=Uj;var Oj=c3.exports;const kj=H_(Oj),Fj=n=>typeof n=="object"&&typeof n.then=="function",ka=[];function h3(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=ka.indexOf(r);s!==-1&&ka.splice(s,1)},promise:(Fj(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(ka.push(r),!t)throw r.promise}const Bj=(n,e,t)=>d3(n,e,!1,t),zj=(n,e,t)=>void d3(n,e,!0,t),Vj=n=>{if(n===void 0||n.length===0)ka.splice(0,ka.length);else{const e=ka.find(t=>h3(n,t.keys,t.equal));e&&e.remove()}},K1={},Hj=n=>void Object.assign(K1,n);function Gj(n,e){function t(h,{args:d=[],attach:p,...m},y){let _=`${h[0].toUpperCase()}${h.slice(1)}`,x;if(h==="primitive"){if(m.object===void 0)throw new Error("R3F: Primitives without 'object' are invalid!");const g=m.object;x=ql(g,{type:h,root:y,attach:p,primitive:!0})}else{const g=K1[_];if(!g)throw new Error(`R3F: ${_} 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=ql(new g(...d),{type:h,root:y,attach:p,memoizedProps:{args:d}})}return x.__r3f.attach===void 0&&(x instanceof St?x.__r3f.attach="geometry":x instanceof Zn&&(x.__r3f.attach="material")),_!=="inject"&&Ly(x,m),x}function i(h,d){let p=!1;if(d){var m,y;(m=d.__r3f)!=null&&m.attach?Ry(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||ql(d,{}),d.__r3f.parent=h,B_(d),Zl(d)}}function r(h,d,p){let m=!1;if(d){var y,_;if((y=d.__r3f)!=null&&y.attach)Ry(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(S=>S!==d),g=x.indexOf(p);h.children=[...x.slice(0,g),d,...x.slice(g)],m=!0}m||(_=h.__r3f)==null||_.objects.push(d),d.__r3f||ql(d,{}),d.__r3f.parent=h,B_(d),Zl(d)}}function s(h,d,p=!1){h&&[...h].forEach(m=>o(d,m,p))}function o(h,d,p){if(d){var m,y,_;if(d.__r3f&&(d.__r3f.parent=null),(m=h.__r3f)!=null&&m.objects&&(h.__r3f.objects=h.__r3f.objects.filter(E=>E!==d)),(y=d.__r3f)!=null&&y.attach)Ob(h,d,d.__r3f.attach);else if(d.isObject3D&&h.isObject3D){var x;h.remove(d),(x=d.__r3f)!=null&&x.root&&Qj(am(d),d)}const S=(_=d.__r3f)==null?void 0:_.primitive,A=!S&&(p===void 0?d.dispose!==null:p);if(!S){var g;s((g=d.__r3f)==null?void 0:g.objects,d,A),s(d.children,d,A)}if(delete d.__r3f,A&&d.dispose&&d.type!=="Scene"){const E=()=>{try{d.dispose()}catch{}};typeof IS_REACT_ACT_ENVIRONMENT>"u"?k_.unstable_scheduleCallback(k_.unstable_IdlePriority,E):E()}Zl(h)}}function a(h,d,p,m){var y;const _=(y=h.__r3f)==null?void 0:y.parent;if(!_)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(_,h),x.parent&&(x.__r3f.autoRemovedBeforeAppend=!0),i(_,x),x.raycast&&x.__r3f.eventCount&&am(x).getState().internal.interaction.push(x),[m,m.alternate].forEach(g=>{g!==null&&(g.stateNode=x,g.ref&&(typeof g.ref=="function"?g.ref(x):g.ref.current=x))})}const c=()=>console.warn("Text is not allowed in the R3F tree! This could be stray whitespace or characters.");return{reconciler:kj({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 m=h.getState().scene;m.__r3f&&r(m,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,m){var y;if(((y=h==null?void 0:h.__r3f)!=null?y:{}).primitive&&m.object&&m.object!==h)return[!0];{const{args:x=[],children:g,...S}=m,{args:A=[],children:E,...R}=p;if(!Array.isArray(x))throw new Error("R3F: the args prop must be an array!");if(x.some((L,I)=>L!==A[I]))return[!0];const C=_3(h,S,R,!0);return C.changes.length?[!1,C]:null}},commitUpdate(h,[d,p],m,y,_,x){d?a(h,m,_,x):Ly(h,p)},commitMount(h,d,p,m){var y;const _=(y=h.__r3f)!=null?y:{};h.raycast&&_.handlers&&_.eventCount&&am(h).getState().internal.interaction.push(h)},getPublicInstance:h=>h,prepareForCommit:()=>null,preparePortalMount:h=>ql(h.getState().scene),resetAfterCommit:()=>{},shouldSetTextContent:()=>!1,clearContainer:()=>!1,hideInstance(h){var d;const{attach:p,parent:m}=(d=h.__r3f)!=null?d:{};p&&m&&Ob(m,h,p),h.isObject3D&&(h.visible=!1),Zl(h)},unhideInstance(h,d){var p;const{attach:m,parent:y}=(p=h.__r3f)!=null?p:{};m&&y&&Ry(y,h,m),(h.isObject3D&&d.visible==null||d.visible)&&(h.visible=!0),Zl(h)},createTextInstance:c,hideTextInstance:c,unhideTextInstance:c,getCurrentEventPriority:()=>e?e():yc.DefaultEventPriority,beforeActiveInstanceBlur:()=>{},afterActiveInstanceBlur:()=>{},detachDeletedInstance:()=>{},now:typeof performance<"u"&&qt.fun(performance.now)?performance.now:qt.fun(Date.now)?Date.now:()=>0,scheduleTimeout:qt.fun(setTimeout)?setTimeout:void 0,cancelTimeout:qt.fun(clearTimeout)?clearTimeout:void 0}),applyProps:Ly}}var Ib,Db;const Py=n=>"colorSpace"in n||"outputColorSpace"in n,p3=()=>{var n;return(n=K1.ColorManagement)!=null?n:null},m3=n=>n&&n.isOrthographicCamera,Wj=n=>n&&n.hasOwnProperty("current"),Ah=typeof window<"u"&&((Ib=window.document)!=null&&Ib.createElement||((Db=window.navigator)==null?void 0:Db.product)==="ReactNative")?G.useLayoutEffect:G.useEffect;function g3(n){const e=G.useRef(n);return Ah(()=>void(e.current=n),[n]),e}function jj({set:n}){return Ah(()=>(n(new Promise(()=>null)),()=>n(!1)),[n]),null}class v3 extends G.Component{constructor(...e){super(...e),this.state={error:!1}}componentDidCatch(e){this.props.set(e)}render(){return this.state.error?null:this.props.children}}v3.getDerivedStateFromError=()=>({error:!0});const y3="__default",Nb=new Map,Xj=n=>n&&!!n.memoized&&!!n.changes;function x3(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 ku=n=>{var e;return(e=n.__r3f)==null?void 0:e.root.getState()};function am(n){let e=n.__r3f.root;for(;e.getState().previousRoot;)e=e.getState().previousRoot;return e}const qt={obj:n=>n===Object(n)&&!qt.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(qt.str(n)||qt.num(n)||qt.boo(n))return n===e;const s=qt.obj(n);if(s&&i==="reference")return n===e;const o=qt.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(!qt.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(qt.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 Yj(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 qj(n){n.dispose&&n.type!=="Scene"&&n.dispose();for(const e in n)e.dispose==null||e.dispose(),delete n[e]}function ql(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 Ub=/-\d+$/;function Ry(n,e,t){if(qt.str(t)){if(Ub.test(t)){const s=t.replace(Ub,""),{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 Ob(n,e,t){var i,r;if(qt.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 _3(n,{children:e,key:t,ref:i,...r},{children:s,key:o,ref:a,...c}={},f=!1){const h=n.__r3f,d=Object.entries(r),p=[];if(f){const y=Object.keys(c);for(let _=0;_{var x;if((x=n.__r3f)!=null&&x.primitive&&y==="object"||qt.equ(_,c[y]))return;if(/^on(Pointer|Click|DoubleClick|ContextMenu|Wheel)/.test(y))return p.push([y,_,!0,[]]);let g=[];y.includes("-")&&(g=y.split("-")),p.push([y,_,!1,g]);for(const S in r){const A=r[S];S.startsWith(`${y}-`)&&p.push([S,A,!1,S.split("-")])}});const m={...r};return h!=null&&h.memoizedProps&&h!=null&&h.memoizedProps.args&&(m.args=h.memoizedProps.args),h!=null&&h.memoizedProps&&h!=null&&h.memoizedProps.attach&&(m.attach=h.memoizedProps.attach),{memoized:m,changes:p}}const Zj=typeof process<"u"&&!1;function Ly(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}=Xj(e)?e:_3(n,e),c=i==null?void 0:i.eventCount;n.__r3f&&(n.__r3f.memoizedProps=o);for(let h=0;hg[S],n),!(x&&x.set))){const[g,...S]=y.reverse();_=S.reverse().reduce((A,E)=>A[E],n),d=g}if(p===y3+"remove")if(_.constructor){let g=Nb.get(_.constructor);g||(g=new _.constructor,Nb.set(_.constructor,g)),p=g[d]}else p=0;if(m&&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 Ga)){if(Array.isArray(p))x.fromArray?x.fromArray(p):x.set(...p);else if(x.copy&&p&&p.constructor&&(Zj?x.constructor.name===p.constructor.name:x.constructor===p.constructor))x.copy(p);else if(p!==void 0){const g=x instanceof je;!g&&x.setScalar?x.setScalar(p):x instanceof Ga&&p instanceof Ga?x.mask=p.mask:x.set(p),!p3()&&s&&!s.linear&&g&&x.convertSRGBToLinear()}}else if(_[d]=p,_[d]instanceof $t&&_[d].format===xi&&_[d].type===ls&&s){const g=_[d];Py(g)&&Py(s.gl)?g.colorSpace=s.gl.outputColorSpace:g.encoding=s.gl.outputEncoding}Zl(n)}if(i&&i.parent&&n.raycast&&c!==i.eventCount){const h=am(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&&B_(n),n}function Zl(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 B_(n){n.onUpdate==null||n.onUpdate(n)}function Kj(n,e){n.manual||(m3(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 kp(n){return(n.eventObject||n.object).uuid+"/"+n.index+n.instanceId}function Jj(){var n;const e=typeof self<"u"&&self||typeof window<"u"&&window;if(!e)return yc.DefaultEventPriority;switch((n=e.event)==null?void 0:n.type){case"click":case"contextmenu":case"dblclick":case"pointercancel":case"pointerdown":case"pointerup":return yc.DiscreteEventPriority;case"pointermove":case"pointerout":case"pointerover":case"pointerenter":case"pointerleave":case"wheel":return yc.ContinuousEventPriority;default:return yc.DefaultEventPriority}}function S3(n,e,t,i){const r=t.get(e);r&&(t.delete(e),t.size===0&&(n.delete(i),r.target.releasePointerCapture(i)))}function Qj(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)=>{S3(t.capturedMap,e,i,r)})}function $j(n){function e(c){const{internal:f}=n.getState(),h=c.offsetX-f.initialClick[0],d=c.offsetY-f.initialClick[1];return Math.round(Math.sqrt(h*h+d*d))}function t(c){return c.filter(f=>["Move","Over","Enter","Out","Leave"].some(h=>{var d;return(d=f.__r3f)==null?void 0:d.handlers["onPointer"+h]}))}function i(c,f){const h=n.getState(),d=new Set,p=[],m=f?f(h.internal.interaction):h.internal.interaction;for(let g=0;g{const A=ku(g.object),E=ku(S.object);return!A||!E?g.distance-S.distance:E.events.priority-A.events.priority||g.distance-S.distance}).filter(g=>{const S=kp(g);return d.has(S)?!1:(d.add(S),!0)});h.events.filter&&(_=h.events.filter(_,h));for(const g of _){let S=g.object;for(;S;){var x;(x=S.__r3f)!=null&&x.eventCount&&p.push({...g,eventObject:S}),S=S.parent}}if("pointerId"in c&&h.internal.capturedMap.has(c.pointerId))for(let g of h.internal.capturedMap.get(c.pointerId).values())d.has(kp(g.intersection))||p.push(g.intersection);return p}function r(c,f,h,d){const p=n.getState();if(c.length){const m={stopped:!1};for(const y of c){const _=ku(y.object)||p,{raycaster:x,pointer:g,camera:S,internal:A}=_,E=new O(g.x,g.y,0).unproject(S),R=b=>{var N,j;return(N=(j=A.capturedMap.get(b))==null?void 0:j.has(y.eventObject))!=null?N:!1},C=b=>{const N={intersection:y,target:f.target};A.capturedMap.has(b)?A.capturedMap.get(b).set(y.eventObject,N):A.capturedMap.set(b,new Map([[y.eventObject,N]])),f.target.setPointerCapture(b)},L=b=>{const N=A.capturedMap.get(b);N&&S3(A.capturedMap,y.eventObject,N,b)};let I={};for(let b in f){let N=f[b];typeof N!="function"&&(I[b]=N)}let P={...y,...I,pointer:g,intersections:c,stopped:m.stopped,delta:h,unprojectedPoint:E,ray:x.ray,camera:S,stopPropagation(){const b="pointerId"in f&&A.capturedMap.get(f.pointerId);if((!b||b.has(y.eventObject))&&(P.stopped=m.stopped=!0,A.hovered.size&&Array.from(A.hovered.values()).find(N=>N.eventObject===y.eventObject))){const N=c.slice(0,c.indexOf(y));s([...N,y])}},target:{hasPointerCapture:R,setPointerCapture:C,releasePointerCapture:L},currentTarget:{hasPointerCapture:R,setPointerCapture:C,releasePointerCapture:L},nativeEvent:f};if(d(P),m.stopped===!0)break}}return c}function s(c){const{internal:f}=n.getState();for(const h of f.hovered.values())if(!c.length||!c.find(d=>d.object===h.object&&d.index===h.index&&d.instanceId===h.instanceId)){const p=h.eventObject.__r3f,m=p==null?void 0:p.handlers;if(f.hovered.delete(kp(h)),p!=null&&p.eventCount){const y={...h,intersections:c};m.onPointerOut==null||m.onPointerOut(y),m.onPointerLeave==null||m.onPointerLeave(y)}}}function o(c,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 m=c==="onPointerMove",y=c==="onClick"||c==="onContextMenu"||c==="onDoubleClick",x=i(h,m?t:void 0),g=y?e(h):0;c==="onPointerDown"&&(p.initialClick=[h.offsetX,h.offsetY],p.initialHits=x.map(A=>A.eventObject)),y&&!x.length&&g<=2&&(o(h,p.interaction),d&&d(h)),m&&s(x);function S(A){const E=A.eventObject,R=E.__r3f,C=R==null?void 0:R.handlers;if(R!=null&&R.eventCount)if(m){if(C.onPointerOver||C.onPointerEnter||C.onPointerOut||C.onPointerLeave){const L=kp(A),I=p.hovered.get(L);I?I.stopped&&A.stopPropagation():(p.hovered.set(L,A),C.onPointerOver==null||C.onPointerOver(A),C.onPointerEnter==null||C.onPointerEnter(A))}C.onPointerMove==null||C.onPointerMove(A)}else{const L=C[c];L?(!y||p.initialHits.includes(E))&&(o(h,p.interaction.filter(I=>!p.initialHits.includes(I))),L(A)):y&&p.initialHits.includes(E)&&o(h,p.interaction.filter(I=>!p.initialHits.includes(I)))}}r(x,h,g,S)}}return{handlePointer:a}}const A3=n=>!!(n!=null&&n.render),M3=G.createContext(null),e9=(n,e)=>{const t=l3((a,c)=>{const f=new O,h=new O,d=new O;function p(g=c().camera,S=h,A=c().size){const{width:E,height:R,top:C,left:L}=A,I=E/R;S instanceof O?d.copy(S):d.set(...S);const P=g.getWorldPosition(f).distanceTo(d);if(m3(g))return{width:E/g.zoom,height:R/g.zoom,top:C,left:L,factor:1,distance:P,aspect:I};{const b=g.fov*Math.PI/180,N=2*Math.tan(b/2)*P,j=N*(E/R);return{width:j,height:N,top:C,left:L,factor:E/j,distance:P,aspect:I}}}let m;const y=g=>a(S=>({performance:{...S.performance,current:g}})),_=new pe;return{set:a,get:c,gl:null,camera:null,raycaster:null,events:{priority:1,enabled:!0,connected:!1},xr:null,scene:null,invalidate:(g=1)=>n(c(),g),advance:(g,S)=>e(g,S,c()),legacy:!1,linear:!1,flat:!1,controls:null,clock:new X1,pointer:_,mouse:_,frameloop:"always",onPointerMissed:void 0,performance:{current:1,min:.5,max:1,debounce:200,regress:()=>{const g=c();m&&clearTimeout(m),g.performance.current!==g.performance.min&&y(g.performance.min),m=setTimeout(()=>y(c().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(S=>({...S,events:{...S.events,...g}})),setSize:(g,S,A,E,R)=>{const C=c().camera,L={width:g,height:S,top:E||0,left:R||0,updateStyle:A};a(I=>({size:L,viewport:{...I.viewport,...p(C,h,L)}}))},setDpr:g=>a(S=>{const A=x3(g);return{viewport:{...S.viewport,dpr:A,initialDpr:S.viewport.initialDpr||A}}}),setFrameloop:(g="always")=>{const S=c().clock;S.stop(),S.elapsedTime=0,g!=="never"&&(S.start(),S.elapsedTime=0),a(()=>({frameloop:g}))},previousRoot:void 0,internal:{active:!1,priority:0,frames:0,lastEvent:G.createRef(),interaction:[],hovered:new Map,subscribers:[],initialClick:[0,0],initialHits:[],capturedMap:new Map,subscribe:(g,S,A)=>{const E=c().internal;return E.priority=E.priority+(S>0?1:0),E.subscribers.push({ref:g,priority:S,store:A}),E.subscribers=E.subscribers.sort((R,C)=>R.priority-C.priority),()=>{const R=c().internal;R!=null&&R.subscribers&&(R.priority=R.priority-(S>0?1:0),R.subscribers=R.subscribers.filter(C=>C.ref!==g))}}}}}),i=t.getState();let r=i.size,s=i.viewport.dpr,o=i.camera;return t.subscribe(()=>{const{camera:a,size:c,viewport:f,gl:h,set:d}=t.getState();if(c.width!==r.width||c.height!==r.height||f.dpr!==s){var p;r=c,s=f.dpr,Kj(a,c),h.setPixelRatio(f.dpr);const m=(p=c.updateStyle)!=null?p:typeof HTMLCanvasElement<"u"&&h.domElement instanceof HTMLCanvasElement;h.setSize(c.width,c.height,m)}a!==o&&(o=a,d(m=>({viewport:{...m.viewport,...m.viewport.getCurrentViewport(a)}})))}),t.subscribe(a=>n(a)),t};let Fp,t9=new Set,n9=new Set,i9=new Set;function Iy(n,e){if(n.size)for(const{callback:t}of n.values())t(e)}function Fu(n,e){switch(n){case"before":return Iy(t9,e);case"after":return Iy(n9,e);case"tail":return Iy(i9,e)}}let Dy,Ny;function Uy(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),Dy=e.internal.subscribers,Fp=0;Fp0)&&!((h=s.gl.xr)!=null&&h.isPresenting)&&(i+=Uy(f,s))}if(t=!1,Fu("after",f),i===0)return Fu("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 c(f,h=!0,d,p){if(h&&Fu("before",f),d)Uy(f,d,p);else for(const m of n.values())Uy(f,m.store.getState());h&&Fu("after",f)}return{loop:o,invalidate:a,advance:c}}function w3(){const n=G.useContext(M3);if(!n)throw new Error("R3F: Hooks can only be used within the Canvas component!");return n}function Yi(n=t=>t,e){return w3()(n,e)}function J1(n,e=0){const t=w3(),i=t.getState().internal.subscribe,r=g3(n);return Ah(()=>i(r,e,t),[e,i,t]),null}const kb=new WeakMap;function E3(n,e){return function(t,...i){let r=kb.get(t);return r||(r=new t,kb.set(t,r)),n&&n(r),Promise.all(i.map(s=>new Promise((o,a)=>r.load(s,c=>{c.scene&&Object.assign(c,Yj(c.scene)),o(c)},e,c=>a(new Error(`Could not load ${s}: ${c==null?void 0:c.message}`))))))}}function Mh(n,e,t,i){const r=Array.isArray(e)?e:[e],s=Bj(E3(t,i),[n,...r],{equal:qt.equ});return Array.isArray(e)?s:s[0]}Mh.preload=function(n,e,t){const i=Array.isArray(e)?e:[e];return zj(E3(t),[n,...i])};Mh.clear=function(n,e){const t=Array.isArray(e)?e:[e];return Vj([n,...t])};const Fc=new Map,{invalidate:Fb,advance:Bb}=r9(Fc),{reconciler:qm,applyProps:$r}=Gj(Fc,Jj),Yl={objects:"shallow",strict:!1},s9=(n,e)=>{const t=typeof n=="function"?n(e):n;return A3(t)?t:new dI({powerPreference:"high-performance",canvas:e,antialias:!0,alpha:!0,...n})};function o9(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 a9(n){const e=Fc.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||e9(Fb,Bb),o=t||qm.createContainer(s,yc.ConcurrentRoot,null,!1,null,"",r,null);e||Fc.set(n,{fiber:o,store:s});let a,c=!1,f;return{configure(h={}){let{gl:d,size:p,scene:m,events:y,onCreated:_,shadows:x=!1,linear:g=!1,flat:S=!1,legacy:A=!1,orthographic:E=!1,frameloop:R="always",dpr:C=[1,2],performance:L,raycaster:I,camera:P,onPointerMissed:b}=h,N=s.getState(),j=N.gl;N.gl||N.set({gl:j=s9(d,n)});let X=N.raycaster;X||N.set({raycaster:X=new s3});const{params:te,...ne}=I||{};if(qt.equ(ne,X,Yl)||$r(X,{...ne}),qt.equ(te,X.params,Yl)||$r(X,{params:{...X.params,...te}}),!N.camera||N.camera===f&&!qt.equ(f,P,Yl)){f=P;const J=P instanceof ph,$=J?P:E?new Nr(0,0,0,0,.1,1e3):new sn(75,0,.1,1e3);J||($.position.z=5,P&&($r($,P),("aspect"in P||"left"in P||"right"in P||"bottom"in P||"top"in P)&&($.manual=!0,$.updateProjectionMatrix())),!N.camera&&!(P!=null&&P.rotation)&&$.lookAt(0,0,0)),N.set({camera:$}),X.camera=$}if(!N.scene){let J;m instanceof Wm?J=m:(J=new Wm,m&&$r(J,m)),N.set({scene:ql(J)})}if(!N.xr){var Q;const J=(Ne,oe)=>{const ve=s.getState();ve.frameloop!=="never"&&Bb(Ne,!0,ve,oe)},$=()=>{const Ne=s.getState();Ne.gl.xr.enabled=Ne.gl.xr.isPresenting,Ne.gl.xr.setAnimationLoop(Ne.gl.xr.isPresenting?J:null),Ne.gl.xr.isPresenting||Fb(Ne)},_e={connect(){const Ne=s.getState().gl;Ne.xr.addEventListener("sessionstart",$),Ne.xr.addEventListener("sessionend",$)},disconnect(){const Ne=s.getState().gl;Ne.xr.removeEventListener("sessionstart",$),Ne.xr.removeEventListener("sessionend",$)}};typeof((Q=j.xr)==null?void 0:Q.addEventListener)=="function"&&_e.connect(),N.set({xr:_e})}if(j.shadowMap){const J=j.shadowMap.enabled,$=j.shadowMap.type;if(j.shadowMap.enabled=!!x,qt.boo(x))j.shadowMap.type=af;else if(qt.str(x)){var le;const _e={basic:q2,percentage:wg,soft:af,variance:Pr};j.shadowMap.type=(le=_e[x])!=null?le:af}else qt.obj(x)&&Object.assign(j.shadowMap,x);(J!==j.shadowMap.enabled||$!==j.shadowMap.type)&&(j.shadowMap.needsUpdate=!0)}const k=p3();k&&("enabled"in k?k.enabled=!A:"legacyMode"in k&&(k.legacyMode=A)),c||$r(j,{outputEncoding:g?3e3:3001,toneMapping:S?os:l1}),N.legacy!==A&&N.set(()=>({legacy:A})),N.linear!==g&&N.set(()=>({linear:g})),N.flat!==S&&N.set(()=>({flat:S})),d&&!qt.fun(d)&&!A3(d)&&!qt.equ(d,j,Yl)&&$r(j,d),y&&!N.events.handlers&&N.set({events:y(s)});const q=o9(n,p);return qt.equ(q,N.size,Yl)||N.setSize(q.width,q.height,q.updateStyle,q.top,q.left),C&&N.viewport.dpr!==x3(C)&&N.setDpr(C),N.frameloop!==R&&N.setFrameloop(R),N.onPointerMissed||N.set({onPointerMissed:b}),L&&!qt.equ(L,N.performance,Yl)&&N.set(J=>({performance:{...J.performance,...L}})),a=_,c=!0,this},render(h){return c||this.configure(),qm.updateContainer(W.jsx(l9,{store:s,children:h,onCreated:a,rootElement:n}),o,null,()=>{}),s},unmount(){T3(n)}}}function l9({store:n,children:e,onCreated:t,rootElement:i}){return Ah(()=>{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)},[]),W.jsx(M3.Provider,{value:n,children:e})}function T3(n,e){const t=Fc.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),qm.updateContainer(null,i,null,()=>{r&&setTimeout(()=>{try{var s,o,a,c;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(),(c=r.gl)!=null&&c.xr&&r.xr.disconnect(),qj(r),Fc.delete(n),e&&e(n)}catch{}},500)})}}qm.injectIntoDevTools({bundleType:0,rendererPackageName:"@react-three/fiber",version:G.version});function z_(n,e,t){var i,r,s,o,a;e==null&&(e=100);function c(){var h=Date.now()-o;h=0?i=setTimeout(c,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(c,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}z_.debounce=z_;var c9=z_;const zb=H_(c9);function u9(n){let{debounce:e,scroll:t,polyfill:i,offsetSize:r}=n===void 0?{debounce:0,scroll:!1,offsetSize:!1}:n;const s=i||(typeof window>"u"?class{}:window.ResizeObserver);if(!s)throw new Error("This browser does not support ResizeObserver out of the box. See: https://github.com/react-spring/react-use-measure/#resize-observer-polyfills");const[o,a]=G.useState({left:0,top:0,width:0,height:0,bottom:0,right:0,x:0,y:0}),c=G.useRef({element:null,scrollContainers:null,resizeObserver:null,lastBounds:o}),f=e?typeof e=="number"?e:e.scroll:null,h=e?typeof e=="number"?e:e.resize:null,d=G.useRef(!1);G.useEffect(()=>(d.current=!0,()=>void(d.current=!1)));const[p,m,y]=G.useMemo(()=>{const S=()=>{if(!c.current.element)return;const{left:A,top:E,width:R,height:C,bottom:L,right:I,x:P,y:b}=c.current.element.getBoundingClientRect(),N={left:A,top:E,width:R,height:C,bottom:L,right:I,x:P,y:b};c.current.element instanceof HTMLElement&&r&&(N.height=c.current.element.offsetHeight,N.width=c.current.element.offsetWidth),Object.freeze(N),d.current&&!p9(c.current.lastBounds,N)&&a(c.current.lastBounds=N)};return[S,h?zb(S,h):S,f?zb(S,f):S]},[a,r,f,h]);function _(){c.current.scrollContainers&&(c.current.scrollContainers.forEach(S=>S.removeEventListener("scroll",y,!0)),c.current.scrollContainers=null),c.current.resizeObserver&&(c.current.resizeObserver.disconnect(),c.current.resizeObserver=null)}function x(){c.current.element&&(c.current.resizeObserver=new s(y),c.current.resizeObserver.observe(c.current.element),t&&c.current.scrollContainers&&c.current.scrollContainers.forEach(S=>S.addEventListener("scroll",y,{capture:!0,passive:!0})))}const g=S=>{!S||S===c.current.element||(_(),c.current.element=S,c.current.scrollContainers=b3(S),x())};return h9(y,!!t),f9(m),G.useEffect(()=>{_(),x()},[t,y,m]),G.useEffect(()=>_,[]),[g,o,p]}function f9(n){G.useEffect(()=>{const e=n;return window.addEventListener("resize",e),()=>void window.removeEventListener("resize",e)},[n])}function h9(n,e){G.useEffect(()=>{if(e){const t=n;return window.addEventListener("scroll",t,{capture:!0,passive:!0}),()=>void window.removeEventListener("scroll",t,!0)}},[n,e])}function b3(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,...b3(n.parentElement)]}const d9=["x","y","top","bottom","left","right","width","height"],p9=(n,e)=>d9.every(t=>n[t]===e[t]);var m9=Object.defineProperty,g9=Object.defineProperties,v9=Object.getOwnPropertyDescriptors,Vb=Object.getOwnPropertySymbols,y9=Object.prototype.hasOwnProperty,x9=Object.prototype.propertyIsEnumerable,Hb=(n,e,t)=>e in n?m9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,Gb=(n,e)=>{for(var t in e||(e={}))y9.call(e,t)&&Hb(n,t,e[t]);if(Vb)for(var t of Vb(e))x9.call(e,t)&&Hb(n,t,e[t]);return n},_9=(n,e)=>g9(n,v9(e)),Wb,jb;typeof window<"u"&&((Wb=window.document)!=null&&Wb.createElement||((jb=window.navigator)==null?void 0:jb.product)==="ReactNative")?G.useLayoutEffect:G.useEffect;function C3(n,e,t){if(!n)return;if(t(n)===!0)return n;let i=e?n.return:n.child;for(;i;){const r=C3(i,e,t);if(r)return r;i=e?null:i.sibling}}function P3(n){try{return Object.defineProperties(n,{_currentRenderer:{get(){return null},set(){}},_currentRenderer2:{get(){return null},set(){}}})}catch{return n}}const Xb=console.error;console.error=function(){const n=[...arguments].join("");if(n!=null&&n.startsWith("Warning:")&&n.includes("useContext")){console.error=Xb;return}return Xb.apply(this,arguments)};const Q1=P3(G.createContext(null));class R3 extends G.Component{render(){return G.createElement(Q1.Provider,{value:this._reactInternals},this.props.children)}}function S9(){const n=G.useContext(Q1);if(n===null)throw new Error("its-fine: useFiber must be called within a !");const e=G.useId();return G.useMemo(()=>{for(const i of[n,n==null?void 0:n.alternate]){if(!i)continue;const r=C3(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 A9(){const n=S9(),[e]=G.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!==Q1&&!e.has(r)&&e.set(r,G.useContext(P3(r)))}t=t.return}return e}function M9(){const n=A9();return G.useMemo(()=>Array.from(n.keys()).reduce((e,t)=>i=>G.createElement(e,null,G.createElement(t.Provider,_9(Gb({},i),{value:n.get(t)}))),e=>G.createElement(R3,Gb({},e))),[n])}const Oy={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 w9(n){const{handlePointer:e}=$j(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(Oy).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[c,f]=Oy[o];t.addEventListener(c,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]=Oy[s];i.connected.removeEventListener(a,o)}}),t(s=>({events:{...s.events,connected:void 0}}))}}}}const E9=G.forwardRef(function({children:e,fallback:t,resize:i,style:r,gl:s,events:o=w9,eventSource:a,eventPrefix:c,shadows:f,linear:h,flat:d,legacy:p,orthographic:m,frameloop:y,dpr:_,performance:x,raycaster:g,camera:S,scene:A,onPointerMissed:E,onCreated:R,...C},L){G.useMemo(()=>Hj(Ij),[]);const I=M9(),[P,b]=u9({scroll:!0,debounce:{scroll:50,resize:0},...i}),N=G.useRef(null),j=G.useRef(null);G.useImperativeHandle(L,()=>N.current);const X=g3(E),[te,ne]=G.useState(!1),[Q,le]=G.useState(!1);if(te)throw te;if(Q)throw Q;const k=G.useRef(null);Ah(()=>{const J=N.current;b.width>0&&b.height>0&&J&&(k.current||(k.current=a9(J)),k.current.configure({gl:s,events:o,shadows:f,linear:h,flat:d,legacy:p,orthographic:m,frameloop:y,dpr:_,performance:x,raycaster:g,camera:S,scene:A,size:b,onPointerMissed:(...$)=>X.current==null?void 0:X.current(...$),onCreated:$=>{$.events.connect==null||$.events.connect(a?Wj(a)?a.current:a:j.current),c&&$.setEvents({compute:(_e,Ne)=>{const oe=_e[c+"X"],ve=_e[c+"Y"];Ne.pointer.set(oe/Ne.size.width*2-1,-(ve/Ne.size.height)*2+1),Ne.raycaster.setFromCamera(Ne.pointer,Ne.camera)}}),R==null||R($)}}),k.current.render(W.jsx(I,{children:W.jsx(v3,{set:le,children:W.jsx(G.Suspense,{fallback:W.jsx(jj,{set:ne}),children:e})})})))}),G.useEffect(()=>{const J=N.current;if(J)return()=>T3(J)},[]);const q=a?"none":"auto";return W.jsx("div",{ref:j,style:{position:"relative",width:"100%",height:"100%",overflow:"hidden",pointerEvents:q,...r},...C,children:W.jsx("div",{ref:P,style:{width:"100%",height:"100%"},children:W.jsx("canvas",{ref:N,style:{display:"block"},children:t})})})}),T9=G.forwardRef(function(e,t){return W.jsx(R3,{children:W.jsx(E9,{...e,ref:t})})});function th(){return th=Object.assign?Object.assign.bind():function(n){for(var e=1;eMath.PI/2}function R9(n,e,t,i){const r=wh.setFromMatrixPosition(n.matrixWorld),s=r.clone();s.project(e),Yb.set(s.x,s.y),t.setFromCamera(Yb,e);const o=t.intersectObjects(i,!0);if(o.length){const a=o[0].distance;return r.distanceTo(t.ray.origin)Math.abs(n)<1e-10?0:n;function L3(n,e,t=""){let i="matrix3d(";for(let r=0;r!==16;r++)i+=V_(e[r]*n.elements[r])+(r!==15?",":")");return t+i}const D9=(n=>e=>L3(e,n))([1,-1,1,1,1,-1,1,1,1,-1,1,1,1,-1,1,1]),N9=(n=>(e,t)=>L3(e,n(t),"translate(-50%,-50%)"))(n=>[1/n,1/n,1/n,1,-1/n,-1/n,-1/n,-1,1/n,1/n,1/n,1,1,1,1,1]);function U9(n){return n&&typeof n=="object"&&"current"in n}const O9=G.forwardRef(({children:n,eps:e=.001,style:t,className:i,prepend:r,center:s,fullscreen:o,portal:a,distanceFactor:c,sprite:f=!1,transform:h=!1,occlude:d,onOcclude:p,castShadow:m,receiveShadow:y,material:_,geometry:x,zIndexRange:g=[16777271,0],calculatePosition:S=C9,as:A="div",wrapperClass:E,pointerEvents:R="auto",...C},L)=>{const{gl:I,camera:P,scene:b,size:N,raycaster:j,events:X,viewport:te}=Yi(),[ne]=G.useState(()=>document.createElement(A)),Q=G.useRef(),le=G.useRef(null),k=G.useRef(0),q=G.useRef([0,0]),J=G.useRef(null),$=G.useRef(null),_e=(a==null?void 0:a.current)||X.connected||I.domElement.parentNode,Ne=G.useRef(null),oe=G.useRef(!1),ve=G.useMemo(()=>d&&d!=="blending"||Array.isArray(d)&&d.length&&U9(d[0]),[d]);G.useLayoutEffect(()=>{const Xe=I.domElement;d&&d==="blending"?(Xe.style.zIndex=`${Math.floor(g[0]/2)}`,Xe.style.position="absolute",Xe.style.pointerEvents="none"):(Xe.style.zIndex=null,Xe.style.position=null,Xe.style.pointerEvents=null)},[d]),G.useLayoutEffect(()=>{if(le.current){const Xe=Q.current=fR(ne);if(b.updateMatrixWorld(),h)ne.style.cssText="position:absolute;top:0;left:0;pointer-events:none;overflow:hidden;";else{const z=S(le.current,P,N);ne.style.cssText=`position:absolute;top:0;left:0;transform:translate3d(${z[0]}px,${z[1]}px,0);transform-origin:0 0;`}return _e&&(r?_e.prepend(ne):_e.appendChild(ne)),()=>{_e&&_e.removeChild(ne),Xe.unmount()}}},[_e,h]),G.useLayoutEffect(()=>{E&&(ne.className=E)},[E]);const Te=G.useMemo(()=>h?{position:"absolute",top:0,left:0,width:N.width,height:N.height,transformStyle:"preserve-3d",pointerEvents:"none"}:{position:"absolute",transform:s?"translate3d(-50%,-50%,0)":"none",...o&&{top:-N.height/2,left:-N.width/2,width:N.width,height:N.height},...t},[t,s,o,N,h]),Me=G.useMemo(()=>({position:"absolute",pointerEvents:R}),[R]);G.useLayoutEffect(()=>{if(oe.current=!1,h){var Xe;(Xe=Q.current)==null||Xe.render(G.createElement("div",{ref:J,style:Te},G.createElement("div",{ref:$,style:Me},G.createElement("div",{ref:L,className:i,style:t,children:n}))))}else{var z;(z=Q.current)==null||z.render(G.createElement("div",{ref:L,style:Te,className:i,children:n}))}});const nt=G.useRef(!0);J1(Xe=>{if(le.current){P.updateMatrixWorld(),le.current.updateWorldMatrix(!0,!1);const z=h?q.current:S(le.current,P,N);if(h||Math.abs(k.current-P.zoom)>e||Math.abs(q.current[0]-z[0])>e||Math.abs(q.current[1]-z[1])>e){const de=P9(le.current,P);let fe=!1;ve&&(Array.isArray(d)?fe=d.map(Ue=>Ue.current):d!=="blending"&&(fe=[b]));const we=nt.current;if(fe){const Ue=R9(le.current,P,j,fe);nt.current=Ue&&!de}else nt.current=!de;we!==nt.current&&(p?p(!nt.current):ne.style.display=nt.current?"block":"none");const Se=Math.floor(g[0]/2),Ee=d?ve?[g[0],Se]:[Se-1,0]:g;if(ne.style.zIndex=`${I9(le.current,P,Ee)}`,h){const[Ue,ke]=[N.width/2,N.height/2],lt=P.projectionMatrix.elements[5]*ke,{isOrthographicCamera:B,top:D,left:se,bottom:xe,right:ye}=P,Ae=D9(P.matrixWorldInverse),Qe=B?`scale(${lt})translate(${V_(-(ye+se)/2)}px,${V_((D+xe)/2)}px)`:`translateZ(${lt}px)`;let Pe=le.current.matrixWorld;f&&(Pe=P.matrixWorldInverse.clone().transpose().copyPosition(Pe).scale(le.current.scale),Pe.elements[3]=Pe.elements[7]=Pe.elements[11]=0,Pe.elements[15]=1),ne.style.width=N.width+"px",ne.style.height=N.height+"px",ne.style.perspective=B?"":`${lt}px`,J.current&&$.current&&(J.current.style.transform=`${Qe}${Ae}translate(${Ue}px,${ke}px)`,$.current.style.transform=N9(Pe,1/((c||10)/400)))}else{const Ue=c===void 0?1:L9(le.current,P)*c;ne.style.transform=`translate3d(${z[0]}px,${z[1]}px,0) scale(${Ue})`}q.current=z,k.current=P.zoom}}if(!ve&&Ne.current&&!oe.current)if(h){if(J.current){const z=J.current.children[0];if(z!=null&&z.clientWidth&&z!=null&&z.clientHeight){const{isOrthographicCamera:de}=P;if(de||x)C.scale&&(Array.isArray(C.scale)?C.scale instanceof O?Ne.current.scale.copy(C.scale.clone().divideScalar(1)):Ne.current.scale.set(1/C.scale[0],1/C.scale[1],1/C.scale[2]):Ne.current.scale.setScalar(1/C.scale));else{const fe=(c||10)/400,we=z.clientWidth*fe,Se=z.clientHeight*fe;Ne.current.scale.set(we,Se,1)}oe.current=!0}}}else{const z=ne.children[0];if(z!=null&&z.clientWidth&&z!=null&&z.clientHeight){const de=1/te.factor,fe=z.clientWidth*de,we=z.clientHeight*de;Ne.current.scale.set(fe,we,1),oe.current=!0}Ne.current.lookAt(Xe.camera.position)}});const it=G.useMemo(()=>({vertexShader:h?void 0:` /* This shader is from the THREE's SpriteMaterial. We need to turn the backing plane into a Sprite @@ -3951,4 +3924,4 @@ No matching component was found for: void main() { gl_FragColor = vec4(0.0, 0.0, 0.0, 0.0); } - `}),[h]);return F.createElement("group",fh({},C,{ref:le}),d&&!ve&&F.createElement("mesh",{castShadow:m,receiveShadow:y,ref:De},x||F.createElement("planeGeometry",null),_||F.createElement("shaderMaterial",{side:Dr,vertexShader:it.vertexShader,fragmentShader:it.fragmentShader})))});let Yu=0;const KX=J3(n=>(Mc.onStart=(e,t,i)=>{n({active:!0,item:e,loaded:t,total:i,progress:(t-Yu)/(i-Yu)*100})},Mc.onLoad=()=>{n({active:!1})},Mc.onError=e=>n(t=>({errors:[...t.errors,e]})),Mc.onProgress=(e,t,i)=>{t===i&&(Yu=i),n({active:!0,item:e,loaded:t,total:i,progress:(t-Yu)/(i-Yu)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));var ZX=Object.defineProperty,JX=(n,e,t)=>e in n?ZX(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,dt=(n,e,t)=>(JX(n,typeof e!="symbol"?e+"":e,t),t);const $p=new dl,bC=new Ps,$X=Math.cos(70*(Math.PI/180)),CC=(n,e)=>(n%e+e)%e;let QX=class extends fs{constructor(e,t){super(),dt(this,"object"),dt(this,"domElement"),dt(this,"enabled",!0),dt(this,"target",new O),dt(this,"minDistance",0),dt(this,"maxDistance",1/0),dt(this,"minZoom",0),dt(this,"maxZoom",1/0),dt(this,"minPolarAngle",0),dt(this,"maxPolarAngle",Math.PI),dt(this,"minAzimuthAngle",-1/0),dt(this,"maxAzimuthAngle",1/0),dt(this,"enableDamping",!1),dt(this,"dampingFactor",.05),dt(this,"enableZoom",!0),dt(this,"zoomSpeed",1),dt(this,"enableRotate",!0),dt(this,"rotateSpeed",1),dt(this,"enablePan",!0),dt(this,"panSpeed",1),dt(this,"screenSpacePanning",!0),dt(this,"keyPanSpeed",7),dt(this,"zoomToCursor",!1),dt(this,"autoRotate",!1),dt(this,"autoRotateSpeed",2),dt(this,"reverseOrbit",!1),dt(this,"reverseHorizontalOrbit",!1),dt(this,"reverseVerticalOrbit",!1),dt(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),dt(this,"mouseButtons",{LEFT:Ra.ROTATE,MIDDLE:Ra.DOLLY,RIGHT:Ra.PAN}),dt(this,"touches",{ONE:La.ROTATE,TWO:La.DOLLY_PAN}),dt(this,"target0"),dt(this,"position0"),dt(this,"zoom0"),dt(this,"_domElementKeyEvents",null),dt(this,"getPolarAngle"),dt(this,"getAzimuthalAngle"),dt(this,"setPolarAngle"),dt(this,"setAzimuthalAngle"),dt(this,"getDistance"),dt(this,"listenToKeyEvents"),dt(this,"stopListenToKeyEvents"),dt(this,"saveState"),dt(this,"reset"),dt(this,"update"),dt(this,"connect"),dt(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 me=CC(W,2*Math.PI),Ge=h.phi;Ge<0&&(Ge+=2*Math.PI),me<0&&(me+=2*Math.PI);let G=Math.abs(me-Ge);2*Math.PI-G{let me=CC(W,2*Math.PI),Ge=h.theta;Ge<0&&(Ge+=2*Math.PI),me<0&&(me+=2*Math.PI);let G=Math.abs(me-Ge);2*Math.PI-Gi.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(),l=a.NONE},this.update=(()=>{const W=new O,me=new O(0,1,0),Ge=new li().setFromUnitVectors(e.up,me),G=Ge.clone().invert(),Re=new O,he=new li,ge=2*Math.PI;return function(){const ft=i.object.position;Ge.setFromUnitVectors(e.up,me),G.copy(Ge).invert(),W.copy(ft).sub(i.target),W.applyQuaternion(Ge),h.setFromVector3(W),i.autoRotate&&l===a.NONE&&te(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,Rt=i.maxAzimuthAngle;isFinite(mt)&&isFinite(Rt)&&(mt<-Math.PI?mt+=ge:mt>Math.PI&&(mt-=ge),Rt<-Math.PI?Rt+=ge:Rt>Math.PI&&(Rt-=ge),mt<=Rt?h.theta=Math.max(mt,Math.min(Rt,h.theta)):h.theta=h.theta>(mt+Rt)/2?Math.max(mt,h.theta):Math.min(Rt,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(m,i.dampingFactor):i.target.add(m),i.zoomToCursor&&P||i.object.isOrthographicCamera?h.radius=_e(h.radius):h.radius=_e(h.radius*p),W.setFromSpherical(h),W.applyQuaternion(G),ft.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,m.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),m.set(0,0,0));let Wt=!1;if(i.zoomToCursor&&P){let bt=null;if(i.object instanceof an&&i.object.isPerspectiveCamera){const Ln=W.length();bt=_e(Ln*p);const Fn=Ln-bt;i.object.position.addScaledVector(L,Fn),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const Ln=new O(I.x,I.y,0);Ln.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),Wt=!0;const Fn=new O(I.x,I.y,0);Fn.unproject(i.object),i.object.position.sub(Fn).add(Ln),i.object.updateMatrixWorld(),bt=W.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;bt!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(bt).add(i.object.position):($p.origin.copy(i.object.position),$p.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot($p.direction))<$X?e.lookAt(i.target):(bC.setFromNormalAndCoplanarPoint(i.object.up,i.target),$p.intersectPlane(bC,i.target))))}else i.object instanceof Ur&&i.object.isOrthographicCamera&&(Wt=p!==1,Wt&&(i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix()));return p=1,P=!1,Wt||Re.distanceToSquared(i.object.position)>f||8*(1-he.dot(i.object.quaternion))>f?(i.dispatchEvent(r),Re.copy(i.object.position),he.copy(i.object.quaternion),Wt=!1,!0):!1}})(),this.connect=W=>{W===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=W,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Ce),i.domElement.addEventListener("pointerdown",N),i.domElement.addEventListener("pointercancel",xe),i.domElement.addEventListener("wheel",$e)},this.dispose=()=>{var W,me,Ge,G,Re,he;i.domElement&&(i.domElement.style.touchAction="auto"),(W=i.domElement)==null||W.removeEventListener("contextmenu",Ce),(me=i.domElement)==null||me.removeEventListener("pointerdown",N),(Ge=i.domElement)==null||Ge.removeEventListener("pointercancel",xe),(G=i.domElement)==null||G.removeEventListener("wheel",$e),(Re=i.domElement)==null||Re.ownerDocument.removeEventListener("pointermove",se),(he=i.domElement)==null||he.ownerDocument.removeEventListener("pointerup",xe),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 l=a.NONE;const f=1e-6,h=new iS,d=new iS;let p=1;const m=new O,y=new pe,_=new pe,x=new pe,g=new pe,S=new pe,A=new pe,E=new pe,R=new pe,C=new pe,L=new O,I=new pe;let P=!1;const b=[],D={};function j(){return 2*Math.PI/60/60*i.autoRotateSpeed}function X(){return Math.pow(.95,i.zoomSpeed)}function te(W){i.reverseOrbit||i.reverseHorizontalOrbit?d.theta+=W:d.theta-=W}function ne(W){i.reverseOrbit||i.reverseVerticalOrbit?d.phi+=W:d.phi-=W}const $=(()=>{const W=new O;return function(Ge,G){W.setFromMatrixColumn(G,0),W.multiplyScalar(-Ge),m.add(W)}})(),le=(()=>{const W=new O;return function(Ge,G){i.screenSpacePanning===!0?W.setFromMatrixColumn(G,1):(W.setFromMatrixColumn(G,0),W.crossVectors(i.object.up,W)),W.multiplyScalar(Ge),m.add(W)}})(),k=(()=>{const W=new O;return function(Ge,G){const Re=i.domElement;if(Re&&i.object instanceof an&&i.object.isPerspectiveCamera){const he=i.object.position;W.copy(he).sub(i.target);let ge=W.length();ge*=Math.tan(i.object.fov/2*Math.PI/180),$(2*Ge*ge/Re.clientHeight,i.object.matrix),le(2*G*ge/Re.clientHeight,i.object.matrix)}else Re&&i.object instanceof Ur&&i.object.isOrthographicCamera?($(Ge*(i.object.right-i.object.left)/i.object.zoom/Re.clientWidth,i.object.matrix),le(G*(i.object.top-i.object.bottom)/i.object.zoom/Re.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function q(W){i.object instanceof an&&i.object.isPerspectiveCamera||i.object instanceof Ur&&i.object.isOrthographicCamera?p/=W:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function J(W){i.object instanceof an&&i.object.isPerspectiveCamera||i.object instanceof Ur&&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;P=!0;const me=i.domElement.getBoundingClientRect(),Ge=W.clientX-me.left,G=W.clientY-me.top,Re=me.width,he=me.height;I.x=Ge/Re*2-1,I.y=-(G/he)*2+1,L.set(I.x,I.y,1).unproject(i.object).sub(i.object.position).normalize()}function _e(W){return Math.max(i.minDistance,Math.min(i.maxDistance,W))}function De(W){y.set(W.clientX,W.clientY)}function oe(W){Q(W),E.set(W.clientX,W.clientY)}function ve(W){g.set(W.clientX,W.clientY)}function Te(W){_.set(W.clientX,W.clientY),x.subVectors(_,y).multiplyScalar(i.rotateSpeed);const me=i.domElement;me&&(te(2*Math.PI*x.x/me.clientHeight),ne(2*Math.PI*x.y/me.clientHeight)),y.copy(_),i.update()}function we(W){R.set(W.clientX,W.clientY),C.subVectors(R,E),C.y>0?q(X()):C.y<0&&J(X()),E.copy(R),i.update()}function nt(W){S.set(W.clientX,W.clientY),A.subVectors(S,g).multiplyScalar(i.panSpeed),k(A.x,A.y),g.copy(S),i.update()}function it(W){Q(W),W.deltaY<0?J(X()):W.deltaY>0&&q(X()),i.update()}function Xe(W){let me=!1;switch(W.code){case i.keys.UP:k(0,i.keyPanSpeed),me=!0;break;case i.keys.BOTTOM:k(0,-i.keyPanSpeed),me=!0;break;case i.keys.LEFT:k(i.keyPanSpeed,0),me=!0;break;case i.keys.RIGHT:k(-i.keyPanSpeed,0),me=!0;break}me&&(W.preventDefault(),i.update())}function V(){if(b.length==1)y.set(b[0].pageX,b[0].pageY);else{const W=.5*(b[0].pageX+b[1].pageX),me=.5*(b[0].pageY+b[1].pageY);y.set(W,me)}}function de(){if(b.length==1)g.set(b[0].pageX,b[0].pageY);else{const W=.5*(b[0].pageX+b[1].pageX),me=.5*(b[0].pageY+b[1].pageY);g.set(W,me)}}function fe(){const W=b[0].pageX-b[1].pageX,me=b[0].pageY-b[1].pageY,Ge=Math.sqrt(W*W+me*me);E.set(0,Ge)}function Me(){i.enableZoom&&fe(),i.enablePan&&de()}function Se(){i.enableZoom&&fe(),i.enableRotate&&V()}function Ee(W){if(b.length==1)_.set(W.pageX,W.pageY);else{const Ge=Be(W),G=.5*(W.pageX+Ge.x),Re=.5*(W.pageY+Ge.y);_.set(G,Re)}x.subVectors(_,y).multiplyScalar(i.rotateSpeed);const me=i.domElement;me&&(te(2*Math.PI*x.x/me.clientHeight),ne(2*Math.PI*x.y/me.clientHeight)),y.copy(_)}function Ue(W){if(b.length==1)S.set(W.pageX,W.pageY);else{const me=Be(W),Ge=.5*(W.pageX+me.x),G=.5*(W.pageY+me.y);S.set(Ge,G)}A.subVectors(S,g).multiplyScalar(i.panSpeed),k(A.x,A.y),g.copy(S)}function ke(W){const me=Be(W),Ge=W.pageX-me.x,G=W.pageY-me.y,Re=Math.sqrt(Ge*Ge+G*G);R.set(0,Re),C.set(0,Math.pow(R.y/E.y,i.zoomSpeed)),q(C.y),E.copy(R)}function lt(W){i.enableZoom&&ke(W),i.enablePan&&Ue(W)}function z(W){i.enableZoom&&ke(W),i.enableRotate&&Ee(W)}function N(W){var me,Ge;i.enabled!==!1&&(b.length===0&&((me=i.domElement)==null||me.ownerDocument.addEventListener("pointermove",se),(Ge=i.domElement)==null||Ge.ownerDocument.addEventListener("pointerup",xe)),Je(W),W.pointerType==="touch"?Fe(W):ye(W))}function se(W){i.enabled!==!1&&(W.pointerType==="touch"?pt(W):Ae(W))}function xe(W){var me,Ge,G;wt(W),b.length===0&&((me=i.domElement)==null||me.releasePointerCapture(W.pointerId),(Ge=i.domElement)==null||Ge.ownerDocument.removeEventListener("pointermove",se),(G=i.domElement)==null||G.ownerDocument.removeEventListener("pointerup",xe)),i.dispatchEvent(o),l=a.NONE}function ye(W){let me;switch(W.button){case 0:me=i.mouseButtons.LEFT;break;case 1:me=i.mouseButtons.MIDDLE;break;case 2:me=i.mouseButtons.RIGHT;break;default:me=-1}switch(me){case Ra.DOLLY:if(i.enableZoom===!1)return;oe(W),l=a.DOLLY;break;case Ra.ROTATE:if(W.ctrlKey||W.metaKey||W.shiftKey){if(i.enablePan===!1)return;ve(W),l=a.PAN}else{if(i.enableRotate===!1)return;De(W),l=a.ROTATE}break;case Ra.PAN:if(W.ctrlKey||W.metaKey||W.shiftKey){if(i.enableRotate===!1)return;De(W),l=a.ROTATE}else{if(i.enablePan===!1)return;ve(W),l=a.PAN}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function Ae(W){if(i.enabled!==!1)switch(l){case a.ROTATE:if(i.enableRotate===!1)return;Te(W);break;case a.DOLLY:if(i.enableZoom===!1)return;we(W);break;case a.PAN:if(i.enablePan===!1)return;nt(W);break}}function $e(W){i.enabled===!1||i.enableZoom===!1||l!==a.NONE&&l!==a.ROTATE||(W.preventDefault(),i.dispatchEvent(s),it(W),i.dispatchEvent(o))}function Pe(W){i.enabled===!1||i.enablePan===!1||Xe(W)}function Fe(W){switch(ut(W),b.length){case 1:switch(i.touches.ONE){case La.ROTATE:if(i.enableRotate===!1)return;V(),l=a.TOUCH_ROTATE;break;case La.PAN:if(i.enablePan===!1)return;de(),l=a.TOUCH_PAN;break;default:l=a.NONE}break;case 2:switch(i.touches.TWO){case La.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;Me(),l=a.TOUCH_DOLLY_PAN;break;case La.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Se(),l=a.TOUCH_DOLLY_ROTATE;break;default:l=a.NONE}break;default:l=a.NONE}l!==a.NONE&&i.dispatchEvent(s)}function pt(W){switch(ut(W),l){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;Ee(W),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;Ue(W),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;lt(W),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;z(W),i.update();break;default:l=a.NONE}}function Ce(W){i.enabled!==!1&&W.preventDefault()}function Je(W){b.push(W)}function wt(W){delete D[W.pointerId];for(let me=0;me0,R=X>0,C=te>0,L=(E?1:0)+(R?1:0)+(C?1:0),L){case 0:{g.push(_[A]),g.push(_[A+1]),g.push(_[A+2]);break}case 1:{if(E&&(I=_[A+1],P=_[A+2],b=y(_[A],I,x,S),D=y(_[A],P,x,S)),R){I=_[A],P=_[A+2],b=y(_[A+1],I,x,S),D=y(_[A+1],P,x,S),g.push(b),g.push(P.clone()),g.push(I.clone()),g.push(P.clone()),g.push(b.clone()),g.push(D);break}C&&(I=_[A],P=_[A+1],b=y(_[A+2],I,x,S),D=y(_[A+2],P,x,S)),g.push(I.clone()),g.push(P.clone()),g.push(b),g.push(D),g.push(b.clone()),g.push(P.clone());break}case 2:{E||(I=_[A].clone(),P=y(I,_[A+1],x,S),b=y(I,_[A+2],x,S),g.push(I),g.push(P),g.push(b)),R||(I=_[A+1].clone(),P=y(I,_[A+2],x,S),b=y(I,_[A],x,S),g.push(I),g.push(P),g.push(b)),C||(I=_[A+2].clone(),P=y(I,_[A],x,S),b=y(I,_[A+1],x,S),g.push(I),g.push(P),g.push(b));break}}}return g}function y(_,x,g,S){const A=_.position.dot(g)-S,E=x.position.dot(g)-S,R=A/(A-E);return new PC(new O(_.position.x+R*(x.position.x-_.position.x),_.position.y+R*(x.position.y-_.position.y),_.position.z+R*(x.position.z-_.position.z)),new O(_.normal.x+R*(x.normal.x-_.normal.x),_.normal.y+R*(x.normal.y-_.normal.y),_.normal.z+R*(x.normal.z-_.normal.z)))}}}class PC{constructor(e,t){this.position=e,this.normal=t}clone(){return new this.constructor(this.position.clone(),this.normal.clone())}}const nx=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function wA(n,e){const t=qi(s=>s.gl),i=Oh(f0,nx(n)?Object.values(n):n);return F.useLayoutEffect(()=>{e==null||e(i)},[e]),F.useEffect(()=>{if("initTexture"in t){let s=[];Array.isArray(i)?s=i:i instanceof tn?s=[i]:nx(i)&&(s=Object.values(i)),s.forEach(o=>{o instanceof tn&&t.initTexture(o)})}},[t,i]),F.useMemo(()=>{if(nx(n)){const s={};let o=0;for(const a in n)s[a]=i[o++];return console.log("keyed",s),s}else return i},[n,i])}wA.preload=n=>Oh.preload(f0,n);wA.clear=n=>Oh.clear(f0,n);function tY(n){return Array.isArray(n)}function ix(n=[0,0,0]){return tY(n)?n:n instanceof O||n instanceof Mi?[n.x,n.y,n.z]:[n,n,n]}const nY=F.forwardRef(function({debug:e,depthTest:t=!1,polygonOffsetFactor:i=-10,map:r,mesh:s,children:o,position:a,rotation:l,scale:f,...h},d){const p=F.useRef(null);F.useImperativeHandle(d,()=>p.current);const m=F.useRef(null);return F.useLayoutEffect(()=>{const y=(s==null?void 0:s.current)||p.current.parent,_=p.current;if(!(y instanceof An))throw new Error('Decal must have a Mesh as parent or specify its "mesh" prop');const x={position:new O,rotation:new Mi,scale:new O(1,1,1)};if(y){es(x,{position:a,scale:f});const g=y.matrixWorld.clone();if(y.matrixWorld.identity(),!l||typeof l=="number"){const S=new Ut;S.position.copy(x.position),S.lookAt(y.position),typeof l=="number"&&S.rotateZ(l),es(x,{rotation:S.rotation})}else es(x,{rotation:l});return _.geometry=new eY(y,x.position,x.rotation,x.scale),m.current&&(es(m.current,x),m.current.traverse(S=>S.raycast=()=>null)),y.matrixWorld=g,()=>{_.geometry.dispose()}}},[s,...ix(a),...ix(f),...ix(l)]),F.createElement("mesh",fh({ref:p,"material-transparent":!0,"material-polygonOffset":!0,"material-polygonOffsetFactor":i,"material-depthTest":t,"material-map":r},h),o,e&&F.createElement("mesh",{ref:m},F.createElement("boxGeometry",null),F.createElement("meshNormalMaterial",{wireframe:!0}),F.createElement("axesHelper",null)))}),iY=F.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:l,...f},h)=>{const d=qi(C=>C.invalidate),p=qi(C=>C.camera),m=qi(C=>C.gl),y=qi(C=>C.events),_=qi(C=>C.setEvents),x=qi(C=>C.set),g=qi(C=>C.get),S=qi(C=>C.performance),A=e||p,E=i||y.connected||m.domElement,R=F.useMemo(()=>new QX(A),[A]);return _A(()=>{R.enabled&&R.update()},-1),F.useEffect(()=>(s&&R.connect(s===!0?E:s),R.connect(E),()=>void R.dispose()),[s,E,t,R,d]),F.useEffect(()=>{const C=P=>{d(),t&&S.regress(),o&&o(P)},L=P=>{a&&a(P)},I=P=>{l&&l(P)};return R.addEventListener("change",C),R.addEventListener("start",L),R.addEventListener("end",I),()=>{R.removeEventListener("start",L),R.removeEventListener("end",I),R.removeEventListener("change",C)}},[o,a,l,R,d,_]),F.useEffect(()=>{if(n){const C=g().controls;return x({controls:R}),()=>x({controls:C})}},[n,R]),F.createElement("primitive",fh({ref:h,object:R,enableDamping:r},f))}),rY=F.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:i=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],...o},a)=>{const l=F.useRef(null);F.useImperativeHandle(a,()=>l.current,[]);const f=F.useRef(Math.random()*1e4);return _A(h=>{var d,p;if(!e||t===0)return;const m=f.current+h.clock.getElapsedTime();l.current.rotation.x=Math.cos(m/4*t)/8*i,l.current.rotation.y=Math.sin(m/4*t)/8*i,l.current.rotation.z=Math.sin(m/4*t)/20*i;let y=Math.sin(m/4*t)/10;y=zI.mapLinear(y,-.1,.1,(d=s==null?void 0:s[0])!==null&&d!==void 0?d:-.1,(p=s==null?void 0:s[1])!==null&&p!==void 0?p:.1),l.current.position.y=y*r,l.current.updateMatrix()}),F.createElement("group",o,F.createElement("group",{ref:l,matrixAutoUpdate:!1},n))});function sY({all:n,scene:e,camera:t}){const i=qi(({gl:o})=>o),r=qi(({camera:o})=>o),s=qi(({scene:o})=>o);return F.useLayoutEffect(()=>{const o=[];n&&(e||s).traverse(f=>{f.visible===!1&&(o.push(f),f.visible=!0)}),i.compile(e||s,t||r);const a=new q1(128);new Y1(.01,1e5,a).update(i,e||s),a.dispose(),o.forEach(f=>f.visible=!1)},[]),null}const oY=()=>{const{progress:n}=KX(),e={display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},t={fontSize:14,color:"#F1F1F1",fontWeight:800,marginTop:40};return H.jsxs(qX,{as:"div",center:!0,style:e,children:[H.jsx("span",{className:"canvas-loader"}),H.jsxs("p",{style:t,children:[n.toFixed(0),"%"]})]})},aY=n=>{const[e]=wA([n.imgUrl]);return H.jsxs(rY,{speed:1,rotationIntensity:0,floatIntensity:5,children:[H.jsx("ambientLight",{intensity:2.4}),H.jsx("directionalLight",{position:[0,0,.05]}),H.jsxs("mesh",{castShadow:!0,receiveShadow:!0,scale:2.75,children:[H.jsx("icosahedronGeometry",{args:[1,1]}),H.jsx("meshStandardMaterial",{color:"#fcd4d4",polygonOffset:!0,polygonOffsetFactor:-5,flatShading:!0}),H.jsx(nY,{position:[0,0,1],rotation:[2*Math.PI,0,6.25],scale:1,map:e,flatShading:!0})]})]})},lY=({icon:n})=>H.jsxs(FX,{frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},children:[H.jsxs(F.Suspense,{fallback:H.jsx(oY,{}),children:[H.jsx(iY,{enableZoom:!1}),H.jsx(aY,{imgUrl:n})]}),H.jsx(sY,{all:!0})]}),cY="/portfolio-react-threejs/assets/texture-5adaf7bf.webp",uY=()=>H.jsxs("div",{className:"xl:mt-6 flex flex-row flex-wrap justify-center items-center gap-10",children:[H.jsxs(en.div,{variants:as(),children:[H.jsx("h2",{className:`${Jt.sectionHeadText} text-center`,children:"Skills & Technologies."}),H.jsx("p",{className:`${Jt.sectionSubText} text-center`,children:"What have i learnd?"})]}),H.jsx("div",{className:"w-full lg:w-[400px] lg:h-[400px] ",children:H.jsx(lY,{icon:cY})},"skillsBall")]}),fY=Zs(uY,"skills"),hY=()=>H.jsx("div",{className:"h-screen flex justify-center items-center",children:H.jsx("img",{src:xh,className:"w-[150px] h-[117px] "})});function dY(){return H.jsx(F.Suspense,{fallback:hY(),children:H.jsxs("div",{className:"bg-white",children:[H.jsx($o,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(fY,{})})]})})}const pY=()=>H.jsx("div",{className:"h-screen flex justify-center items-center",children:H.jsx("img",{src:xh,className:"w-[150px] h-[117px] "})});function mY(){return H.jsx(F.Suspense,{fallback:pY(),children:H.jsxs("div",{className:"bg-white",children:[H.jsx($o,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsx(DL,{})})]})})}const gY=()=>H.jsx("div",{className:"h-screen flex justify-center items-center",children:H.jsx("img",{src:xh,className:"w-[150px] h-[117px] "})});function vY(){return H.jsx(F.Suspense,{fallback:gY(),children:H.jsxs("div",{className:"bg-white",children:[H.jsx($o,{}),H.jsx("div",{className:"relative pb-10 top-[120px] lg:top-[100px] bg-gradient-to-b from-white to-primary",children:H.jsxs("div",{className:"h-screen ",children:[H.jsx("h1",{className:`${Jt.sectionHeadText} text-center`,children:"No Page Found"}),H.jsx("p",{className:`${Jt.heroSubText} mt-2 text-black-100 text-center`,children:"Try after something, it might showup 😊."})]})})]})})}function yY(){return H.jsx(kk,{basename:"/portfolio-react-threejs",children:H.jsxs(Rk,{children:[H.jsx(Ts,{index:!0,element:H.jsx(L5,{})}),H.jsx(Ts,{path:"/certificate",element:H.jsx(U5,{})}),H.jsx(Ts,{path:"/resume",element:H.jsx(B5,{})}),H.jsx(Ts,{path:"/blogs",element:H.jsx(H5,{})}),H.jsx(Ts,{path:"/projects",element:H.jsx(Z5,{})}),H.jsx(Ts,{path:"/skills",element:H.jsx(dY,{})}),H.jsx(Ts,{path:"/freetools",element:H.jsx(mY,{})}),H.jsx(Ts,{path:"*",element:H.jsx(vY,{})})]})})}rx.createRoot(document.getElementById("root")).render(H.jsx(dh.StrictMode,{children:H.jsx(yY,{})})); + `}),[h]);return G.createElement("group",th({},C,{ref:le}),d&&!ve&&G.createElement("mesh",{castShadow:m,receiveShadow:y,ref:Ne},x||G.createElement("planeGeometry",null),_||G.createElement("shaderMaterial",{side:Dr,vertexShader:it.vertexShader,fragmentShader:it.fragmentShader})))});let Bu=0;const k9=l3(n=>(vc.onStart=(e,t,i)=>{n({active:!0,item:e,loaded:t,total:i,progress:(t-Bu)/(i-Bu)*100})},vc.onLoad=()=>{n({active:!1})},vc.onError=e=>n(t=>({errors:[...t.errors,e]})),vc.onProgress=(e,t,i)=>{t===i&&(Bu=i),n({active:!0,item:e,loaded:t,total:i,progress:(t-Bu)/(i-Bu)*100||100})},{errors:[],active:!1,progress:0,item:"",loaded:0,total:0}));var F9=Object.defineProperty,B9=(n,e,t)=>e in n?F9(n,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[e]=t,dt=(n,e,t)=>(B9(n,typeof e!="symbol"?e+"":e,t),t);const Bp=new ol,qb=new Ts,z9=Math.cos(70*(Math.PI/180)),Zb=(n,e)=>(n%e+e)%e;let V9=class extends cs{constructor(e,t){super(),dt(this,"object"),dt(this,"domElement"),dt(this,"enabled",!0),dt(this,"target",new O),dt(this,"minDistance",0),dt(this,"maxDistance",1/0),dt(this,"minZoom",0),dt(this,"maxZoom",1/0),dt(this,"minPolarAngle",0),dt(this,"maxPolarAngle",Math.PI),dt(this,"minAzimuthAngle",-1/0),dt(this,"maxAzimuthAngle",1/0),dt(this,"enableDamping",!1),dt(this,"dampingFactor",.05),dt(this,"enableZoom",!0),dt(this,"zoomSpeed",1),dt(this,"enableRotate",!0),dt(this,"rotateSpeed",1),dt(this,"enablePan",!0),dt(this,"panSpeed",1),dt(this,"screenSpacePanning",!0),dt(this,"keyPanSpeed",7),dt(this,"zoomToCursor",!1),dt(this,"autoRotate",!1),dt(this,"autoRotateSpeed",2),dt(this,"reverseOrbit",!1),dt(this,"reverseHorizontalOrbit",!1),dt(this,"reverseVerticalOrbit",!1),dt(this,"keys",{LEFT:"ArrowLeft",UP:"ArrowUp",RIGHT:"ArrowRight",BOTTOM:"ArrowDown"}),dt(this,"mouseButtons",{LEFT:wa.ROTATE,MIDDLE:wa.DOLLY,RIGHT:wa.PAN}),dt(this,"touches",{ONE:Ea.ROTATE,TWO:Ea.DOLLY_PAN}),dt(this,"target0"),dt(this,"position0"),dt(this,"zoom0"),dt(this,"_domElementKeyEvents",null),dt(this,"getPolarAngle"),dt(this,"getAzimuthalAngle"),dt(this,"setPolarAngle"),dt(this,"setAzimuthalAngle"),dt(this,"getDistance"),dt(this,"listenToKeyEvents"),dt(this,"stopListenToKeyEvents"),dt(this,"saveState"),dt(this,"reset"),dt(this,"update"),dt(this,"connect"),dt(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=H=>{let me=Zb(H,2*Math.PI),Ge=h.phi;Ge<0&&(Ge+=2*Math.PI),me<0&&(me+=2*Math.PI);let V=Math.abs(me-Ge);2*Math.PI-V{let me=Zb(H,2*Math.PI),Ge=h.theta;Ge<0&&(Ge+=2*Math.PI),me<0&&(me+=2*Math.PI);let V=Math.abs(me-Ge);2*Math.PI-Vi.object.position.distanceTo(i.target),this.listenToKeyEvents=H=>{H.addEventListener("keydown",Pe),this._domElementKeyEvents=H},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(),c=a.NONE},this.update=(()=>{const H=new O,me=new O(0,1,0),Ge=new ai().setFromUnitVectors(e.up,me),V=Ge.clone().invert(),Re=new O,he=new ai,ge=2*Math.PI;return function(){const ft=i.object.position;Ge.setFromUnitVectors(e.up,me),V.copy(Ge).invert(),H.copy(ft).sub(i.target),H.applyQuaternion(Ge),h.setFromVector3(H),i.autoRotate&&c===a.NONE&&te(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,Rt=i.maxAzimuthAngle;isFinite(mt)&&isFinite(Rt)&&(mt<-Math.PI?mt+=ge:mt>Math.PI&&(mt-=ge),Rt<-Math.PI?Rt+=ge:Rt>Math.PI&&(Rt-=ge),mt<=Rt?h.theta=Math.max(mt,Math.min(Rt,h.theta)):h.theta=h.theta>(mt+Rt)/2?Math.max(mt,h.theta):Math.min(Rt,h.theta)),h.phi=Math.max(i.minPolarAngle,Math.min(i.maxPolarAngle,h.phi)),h.makeSafe(),i.enableDamping===!0?i.target.addScaledVector(m,i.dampingFactor):i.target.add(m),i.zoomToCursor&&P||i.object.isOrthographicCamera?h.radius=_e(h.radius):h.radius=_e(h.radius*p),H.setFromSpherical(h),H.applyQuaternion(V),ft.copy(i.target).add(H),i.object.matrixAutoUpdate||i.object.updateMatrix(),i.object.lookAt(i.target),i.enableDamping===!0?(d.theta*=1-i.dampingFactor,d.phi*=1-i.dampingFactor,m.multiplyScalar(1-i.dampingFactor)):(d.set(0,0,0),m.set(0,0,0));let Wt=!1;if(i.zoomToCursor&&P){let bt=null;if(i.object instanceof sn&&i.object.isPerspectiveCamera){const Rn=H.length();bt=_e(Rn*p);const kn=Rn-bt;i.object.position.addScaledVector(L,kn),i.object.updateMatrixWorld()}else if(i.object.isOrthographicCamera){const Rn=new O(I.x,I.y,0);Rn.unproject(i.object),i.object.zoom=Math.max(i.minZoom,Math.min(i.maxZoom,i.object.zoom/p)),i.object.updateProjectionMatrix(),Wt=!0;const kn=new O(I.x,I.y,0);kn.unproject(i.object),i.object.position.sub(kn).add(Rn),i.object.updateMatrixWorld(),bt=H.length()}else console.warn("WARNING: OrbitControls.js encountered an unknown camera type - zoom to cursor disabled."),i.zoomToCursor=!1;bt!==null&&(i.screenSpacePanning?i.target.set(0,0,-1).transformDirection(i.object.matrix).multiplyScalar(bt).add(i.object.position):(Bp.origin.copy(i.object.position),Bp.direction.set(0,0,-1).transformDirection(i.object.matrix),Math.abs(i.object.up.dot(Bp.direction))f||8*(1-he.dot(i.object.quaternion))>f?(i.dispatchEvent(r),Re.copy(i.object.position),he.copy(i.object.quaternion),Wt=!1,!0):!1}})(),this.connect=H=>{H===document&&console.error('THREE.OrbitControls: "document" should not be used as the target "domElement". Please use "renderer.domElement" instead.'),i.domElement=H,i.domElement.style.touchAction="none",i.domElement.addEventListener("contextmenu",Ce),i.domElement.addEventListener("pointerdown",D),i.domElement.addEventListener("pointercancel",xe),i.domElement.addEventListener("wheel",Qe)},this.dispose=()=>{var H,me,Ge,V,Re,he;i.domElement&&(i.domElement.style.touchAction="auto"),(H=i.domElement)==null||H.removeEventListener("contextmenu",Ce),(me=i.domElement)==null||me.removeEventListener("pointerdown",D),(Ge=i.domElement)==null||Ge.removeEventListener("pointercancel",xe),(V=i.domElement)==null||V.removeEventListener("wheel",Qe),(Re=i.domElement)==null||Re.ownerDocument.removeEventListener("pointermove",se),(he=i.domElement)==null||he.ownerDocument.removeEventListener("pointerup",xe),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 c=a.NONE;const f=1e-6,h=new O_,d=new O_;let p=1;const m=new O,y=new pe,_=new pe,x=new pe,g=new pe,S=new pe,A=new pe,E=new pe,R=new pe,C=new pe,L=new O,I=new pe;let P=!1;const b=[],N={};function j(){return 2*Math.PI/60/60*i.autoRotateSpeed}function X(){return Math.pow(.95,i.zoomSpeed)}function te(H){i.reverseOrbit||i.reverseHorizontalOrbit?d.theta+=H:d.theta-=H}function ne(H){i.reverseOrbit||i.reverseVerticalOrbit?d.phi+=H:d.phi-=H}const Q=(()=>{const H=new O;return function(Ge,V){H.setFromMatrixColumn(V,0),H.multiplyScalar(-Ge),m.add(H)}})(),le=(()=>{const H=new O;return function(Ge,V){i.screenSpacePanning===!0?H.setFromMatrixColumn(V,1):(H.setFromMatrixColumn(V,0),H.crossVectors(i.object.up,H)),H.multiplyScalar(Ge),m.add(H)}})(),k=(()=>{const H=new O;return function(Ge,V){const Re=i.domElement;if(Re&&i.object instanceof sn&&i.object.isPerspectiveCamera){const he=i.object.position;H.copy(he).sub(i.target);let ge=H.length();ge*=Math.tan(i.object.fov/2*Math.PI/180),Q(2*Ge*ge/Re.clientHeight,i.object.matrix),le(2*V*ge/Re.clientHeight,i.object.matrix)}else Re&&i.object instanceof Nr&&i.object.isOrthographicCamera?(Q(Ge*(i.object.right-i.object.left)/i.object.zoom/Re.clientWidth,i.object.matrix),le(V*(i.object.top-i.object.bottom)/i.object.zoom/Re.clientHeight,i.object.matrix)):(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - pan disabled."),i.enablePan=!1)}})();function q(H){i.object instanceof sn&&i.object.isPerspectiveCamera||i.object instanceof Nr&&i.object.isOrthographicCamera?p/=H:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function J(H){i.object instanceof sn&&i.object.isPerspectiveCamera||i.object instanceof Nr&&i.object.isOrthographicCamera?p*=H:(console.warn("WARNING: OrbitControls.js encountered an unknown camera type - dolly/zoom disabled."),i.enableZoom=!1)}function $(H){if(!i.zoomToCursor||!i.domElement)return;P=!0;const me=i.domElement.getBoundingClientRect(),Ge=H.clientX-me.left,V=H.clientY-me.top,Re=me.width,he=me.height;I.x=Ge/Re*2-1,I.y=-(V/he)*2+1,L.set(I.x,I.y,1).unproject(i.object).sub(i.object.position).normalize()}function _e(H){return Math.max(i.minDistance,Math.min(i.maxDistance,H))}function Ne(H){y.set(H.clientX,H.clientY)}function oe(H){$(H),E.set(H.clientX,H.clientY)}function ve(H){g.set(H.clientX,H.clientY)}function Te(H){_.set(H.clientX,H.clientY),x.subVectors(_,y).multiplyScalar(i.rotateSpeed);const me=i.domElement;me&&(te(2*Math.PI*x.x/me.clientHeight),ne(2*Math.PI*x.y/me.clientHeight)),y.copy(_),i.update()}function Me(H){R.set(H.clientX,H.clientY),C.subVectors(R,E),C.y>0?q(X()):C.y<0&&J(X()),E.copy(R),i.update()}function nt(H){S.set(H.clientX,H.clientY),A.subVectors(S,g).multiplyScalar(i.panSpeed),k(A.x,A.y),g.copy(S),i.update()}function it(H){$(H),H.deltaY<0?J(X()):H.deltaY>0&&q(X()),i.update()}function Xe(H){let me=!1;switch(H.code){case i.keys.UP:k(0,i.keyPanSpeed),me=!0;break;case i.keys.BOTTOM:k(0,-i.keyPanSpeed),me=!0;break;case i.keys.LEFT:k(i.keyPanSpeed,0),me=!0;break;case i.keys.RIGHT:k(-i.keyPanSpeed,0),me=!0;break}me&&(H.preventDefault(),i.update())}function z(){if(b.length==1)y.set(b[0].pageX,b[0].pageY);else{const H=.5*(b[0].pageX+b[1].pageX),me=.5*(b[0].pageY+b[1].pageY);y.set(H,me)}}function de(){if(b.length==1)g.set(b[0].pageX,b[0].pageY);else{const H=.5*(b[0].pageX+b[1].pageX),me=.5*(b[0].pageY+b[1].pageY);g.set(H,me)}}function fe(){const H=b[0].pageX-b[1].pageX,me=b[0].pageY-b[1].pageY,Ge=Math.sqrt(H*H+me*me);E.set(0,Ge)}function we(){i.enableZoom&&fe(),i.enablePan&&de()}function Se(){i.enableZoom&&fe(),i.enableRotate&&z()}function Ee(H){if(b.length==1)_.set(H.pageX,H.pageY);else{const Ge=Be(H),V=.5*(H.pageX+Ge.x),Re=.5*(H.pageY+Ge.y);_.set(V,Re)}x.subVectors(_,y).multiplyScalar(i.rotateSpeed);const me=i.domElement;me&&(te(2*Math.PI*x.x/me.clientHeight),ne(2*Math.PI*x.y/me.clientHeight)),y.copy(_)}function Ue(H){if(b.length==1)S.set(H.pageX,H.pageY);else{const me=Be(H),Ge=.5*(H.pageX+me.x),V=.5*(H.pageY+me.y);S.set(Ge,V)}A.subVectors(S,g).multiplyScalar(i.panSpeed),k(A.x,A.y),g.copy(S)}function ke(H){const me=Be(H),Ge=H.pageX-me.x,V=H.pageY-me.y,Re=Math.sqrt(Ge*Ge+V*V);R.set(0,Re),C.set(0,Math.pow(R.y/E.y,i.zoomSpeed)),q(C.y),E.copy(R)}function lt(H){i.enableZoom&&ke(H),i.enablePan&&Ue(H)}function B(H){i.enableZoom&&ke(H),i.enableRotate&&Ee(H)}function D(H){var me,Ge;i.enabled!==!1&&(b.length===0&&((me=i.domElement)==null||me.ownerDocument.addEventListener("pointermove",se),(Ge=i.domElement)==null||Ge.ownerDocument.addEventListener("pointerup",xe)),Je(H),H.pointerType==="touch"?Fe(H):ye(H))}function se(H){i.enabled!==!1&&(H.pointerType==="touch"?pt(H):Ae(H))}function xe(H){var me,Ge,V;Mt(H),b.length===0&&((me=i.domElement)==null||me.releasePointerCapture(H.pointerId),(Ge=i.domElement)==null||Ge.ownerDocument.removeEventListener("pointermove",se),(V=i.domElement)==null||V.ownerDocument.removeEventListener("pointerup",xe)),i.dispatchEvent(o),c=a.NONE}function ye(H){let me;switch(H.button){case 0:me=i.mouseButtons.LEFT;break;case 1:me=i.mouseButtons.MIDDLE;break;case 2:me=i.mouseButtons.RIGHT;break;default:me=-1}switch(me){case wa.DOLLY:if(i.enableZoom===!1)return;oe(H),c=a.DOLLY;break;case wa.ROTATE:if(H.ctrlKey||H.metaKey||H.shiftKey){if(i.enablePan===!1)return;ve(H),c=a.PAN}else{if(i.enableRotate===!1)return;Ne(H),c=a.ROTATE}break;case wa.PAN:if(H.ctrlKey||H.metaKey||H.shiftKey){if(i.enableRotate===!1)return;Ne(H),c=a.ROTATE}else{if(i.enablePan===!1)return;ve(H),c=a.PAN}break;default:c=a.NONE}c!==a.NONE&&i.dispatchEvent(s)}function Ae(H){if(i.enabled!==!1)switch(c){case a.ROTATE:if(i.enableRotate===!1)return;Te(H);break;case a.DOLLY:if(i.enableZoom===!1)return;Me(H);break;case a.PAN:if(i.enablePan===!1)return;nt(H);break}}function Qe(H){i.enabled===!1||i.enableZoom===!1||c!==a.NONE&&c!==a.ROTATE||(H.preventDefault(),i.dispatchEvent(s),it(H),i.dispatchEvent(o))}function Pe(H){i.enabled===!1||i.enablePan===!1||Xe(H)}function Fe(H){switch(ut(H),b.length){case 1:switch(i.touches.ONE){case Ea.ROTATE:if(i.enableRotate===!1)return;z(),c=a.TOUCH_ROTATE;break;case Ea.PAN:if(i.enablePan===!1)return;de(),c=a.TOUCH_PAN;break;default:c=a.NONE}break;case 2:switch(i.touches.TWO){case Ea.DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;we(),c=a.TOUCH_DOLLY_PAN;break;case Ea.DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;Se(),c=a.TOUCH_DOLLY_ROTATE;break;default:c=a.NONE}break;default:c=a.NONE}c!==a.NONE&&i.dispatchEvent(s)}function pt(H){switch(ut(H),c){case a.TOUCH_ROTATE:if(i.enableRotate===!1)return;Ee(H),i.update();break;case a.TOUCH_PAN:if(i.enablePan===!1)return;Ue(H),i.update();break;case a.TOUCH_DOLLY_PAN:if(i.enableZoom===!1&&i.enablePan===!1)return;lt(H),i.update();break;case a.TOUCH_DOLLY_ROTATE:if(i.enableZoom===!1&&i.enableRotate===!1)return;B(H),i.update();break;default:c=a.NONE}}function Ce(H){i.enabled!==!1&&H.preventDefault()}function Je(H){b.push(H)}function Mt(H){delete N[H.pointerId];for(let me=0;me0,R=X>0,C=te>0,L=(E?1:0)+(R?1:0)+(C?1:0),L){case 0:{g.push(_[A]),g.push(_[A+1]),g.push(_[A+2]);break}case 1:{if(E&&(I=_[A+1],P=_[A+2],b=y(_[A],I,x,S),N=y(_[A],P,x,S)),R){I=_[A],P=_[A+2],b=y(_[A+1],I,x,S),N=y(_[A+1],P,x,S),g.push(b),g.push(P.clone()),g.push(I.clone()),g.push(P.clone()),g.push(b.clone()),g.push(N);break}C&&(I=_[A],P=_[A+1],b=y(_[A+2],I,x,S),N=y(_[A+2],P,x,S)),g.push(I.clone()),g.push(P.clone()),g.push(b),g.push(N),g.push(b.clone()),g.push(P.clone());break}case 2:{E||(I=_[A].clone(),P=y(I,_[A+1],x,S),b=y(I,_[A+2],x,S),g.push(I),g.push(P),g.push(b)),R||(I=_[A+1].clone(),P=y(I,_[A+2],x,S),b=y(I,_[A],x,S),g.push(I),g.push(P),g.push(b)),C||(I=_[A+2].clone(),P=y(I,_[A],x,S),b=y(I,_[A+1],x,S),g.push(I),g.push(P),g.push(b));break}}}return g}function y(_,x,g,S){const A=_.position.dot(g)-S,E=x.position.dot(g)-S,R=A/(A-E);return new Kb(new O(_.position.x+R*(x.position.x-_.position.x),_.position.y+R*(x.position.y-_.position.y),_.position.z+R*(x.position.z-_.position.z)),new O(_.normal.x+R*(x.normal.x-_.normal.x),_.normal.y+R*(x.normal.y-_.normal.y),_.normal.z+R*(x.normal.z-_.normal.z)))}}}class Kb{constructor(e,t){this.position=e,this.normal=t}clone(){return new this.constructor(this.position.clone(),this.normal.clone())}}const ky=n=>n===Object(n)&&!Array.isArray(n)&&typeof n!="function";function eA(n,e){const t=Yi(s=>s.gl),i=Mh(Zg,ky(n)?Object.values(n):n);return G.useLayoutEffect(()=>{e==null||e(i)},[e]),G.useEffect(()=>{if("initTexture"in t){let s=[];Array.isArray(i)?s=i:i instanceof $t?s=[i]:ky(i)&&(s=Object.values(i)),s.forEach(o=>{o instanceof $t&&t.initTexture(o)})}},[t,i]),G.useMemo(()=>{if(ky(n)){const s={};let o=0;for(const a in n)s[a]=i[o++];return console.log("keyed",s),s}else return i},[n,i])}eA.preload=n=>Mh.preload(Zg,n);eA.clear=n=>Mh.clear(Zg,n);function G9(n){return Array.isArray(n)}function Fy(n=[0,0,0]){return G9(n)?n:n instanceof O||n instanceof Mi?[n.x,n.y,n.z]:[n,n,n]}const W9=G.forwardRef(function({debug:e,depthTest:t=!1,polygonOffsetFactor:i=-10,map:r,mesh:s,children:o,position:a,rotation:c,scale:f,...h},d){const p=G.useRef(null);G.useImperativeHandle(d,()=>p.current);const m=G.useRef(null);return G.useLayoutEffect(()=>{const y=(s==null?void 0:s.current)||p.current.parent,_=p.current;if(!(y instanceof An))throw new Error('Decal must have a Mesh as parent or specify its "mesh" prop');const x={position:new O,rotation:new Mi,scale:new O(1,1,1)};if(y){$r(x,{position:a,scale:f});const g=y.matrixWorld.clone();if(y.matrixWorld.identity(),!c||typeof c=="number"){const S=new Ut;S.position.copy(x.position),S.lookAt(y.position),typeof c=="number"&&S.rotateZ(c),$r(x,{rotation:S.rotation})}else $r(x,{rotation:c});return _.geometry=new H9(y,x.position,x.rotation,x.scale),m.current&&($r(m.current,x),m.current.traverse(S=>S.raycast=()=>null)),y.matrixWorld=g,()=>{_.geometry.dispose()}}},[s,...Fy(a),...Fy(f),...Fy(c)]),G.createElement("mesh",th({ref:p,"material-transparent":!0,"material-polygonOffset":!0,"material-polygonOffsetFactor":i,"material-depthTest":t,"material-map":r},h),o,e&&G.createElement("mesh",{ref:m},G.createElement("boxGeometry",null),G.createElement("meshNormalMaterial",{wireframe:!0}),G.createElement("axesHelper",null)))}),j9=G.forwardRef(({makeDefault:n,camera:e,regress:t,domElement:i,enableDamping:r=!0,keyEvents:s=!1,onChange:o,onStart:a,onEnd:c,...f},h)=>{const d=Yi(C=>C.invalidate),p=Yi(C=>C.camera),m=Yi(C=>C.gl),y=Yi(C=>C.events),_=Yi(C=>C.setEvents),x=Yi(C=>C.set),g=Yi(C=>C.get),S=Yi(C=>C.performance),A=e||p,E=i||y.connected||m.domElement,R=G.useMemo(()=>new V9(A),[A]);return J1(()=>{R.enabled&&R.update()},-1),G.useEffect(()=>(s&&R.connect(s===!0?E:s),R.connect(E),()=>void R.dispose()),[s,E,t,R,d]),G.useEffect(()=>{const C=P=>{d(),t&&S.regress(),o&&o(P)},L=P=>{a&&a(P)},I=P=>{c&&c(P)};return R.addEventListener("change",C),R.addEventListener("start",L),R.addEventListener("end",I),()=>{R.removeEventListener("start",L),R.removeEventListener("end",I),R.removeEventListener("change",C)}},[o,a,c,R,d,_]),G.useEffect(()=>{if(n){const C=g().controls;return x({controls:R}),()=>x({controls:C})}},[n,R]),G.createElement("primitive",th({ref:h,object:R,enableDamping:r},f))}),X9=G.forwardRef(({children:n,enabled:e=!0,speed:t=1,rotationIntensity:i=1,floatIntensity:r=1,floatingRange:s=[-.1,.1],...o},a)=>{const c=G.useRef(null);G.useImperativeHandle(a,()=>c.current,[]);const f=G.useRef(Math.random()*1e4);return J1(h=>{var d,p;if(!e||t===0)return;const m=f.current+h.clock.getElapsedTime();c.current.rotation.x=Math.cos(m/4*t)/8*i,c.current.rotation.y=Math.sin(m/4*t)/8*i,c.current.rotation.z=Math.sin(m/4*t)/20*i;let y=Math.sin(m/4*t)/10;y=JL.mapLinear(y,-.1,.1,(d=s==null?void 0:s[0])!==null&&d!==void 0?d:-.1,(p=s==null?void 0:s[1])!==null&&p!==void 0?p:.1),c.current.position.y=y*r,c.current.updateMatrix()}),G.createElement("group",o,G.createElement("group",{ref:c,matrixAutoUpdate:!1},n))});function Y9({all:n,scene:e,camera:t}){const i=Yi(({gl:o})=>o),r=Yi(({camera:o})=>o),s=Yi(({scene:o})=>o);return G.useLayoutEffect(()=>{const o=[];n&&(e||s).traverse(f=>{f.visible===!1&&(o.push(f),f.visible=!0)}),i.compile(e||s,t||r);const a=new E1(128);new w1(.01,1e5,a).update(i,e||s),a.dispose(),o.forEach(f=>f.visible=!1)},[]),null}const q9=()=>{const{progress:n}=k9(),e={display:"flex",justifyContent:"center",alignItems:"center",flexDirection:"column"},t={fontSize:14,color:"#F1F1F1",fontWeight:800,marginTop:40};return W.jsxs(O9,{as:"div",center:!0,style:e,children:[W.jsx("span",{className:"canvas-loader"}),W.jsxs("p",{style:t,children:[n.toFixed(0),"%"]})]})},Z9=n=>{const[e]=eA([n.imgUrl]);return W.jsxs(X9,{speed:1,rotationIntensity:0,floatIntensity:5,children:[W.jsx("ambientLight",{intensity:2.4}),W.jsx("directionalLight",{position:[0,0,.05]}),W.jsxs("mesh",{castShadow:!0,receiveShadow:!0,scale:2.75,children:[W.jsx("icosahedronGeometry",{args:[1,1]}),W.jsx("meshStandardMaterial",{color:"#fcd4d4",polygonOffset:!0,polygonOffsetFactor:-5,flatShading:!0}),W.jsx(W9,{position:[0,0,1],rotation:[2*Math.PI,0,6.25],scale:1,map:e,flatShading:!0})]})]})},K9=({icon:n})=>W.jsxs(T9,{frameloop:"demand",dpr:[1,2],gl:{preserveDrawingBuffer:!0},children:[W.jsxs(G.Suspense,{fallback:W.jsx(q9,{}),children:[W.jsx(j9,{enableZoom:!1}),W.jsx(Z9,{imgUrl:n})]}),W.jsx(Y9,{all:!0})]}),J9="/portfolio-react-threejs/assets/texture-5adaf7bf.webp",Q9=()=>W.jsxs("section",{className:"xl:mt-6 flex flex-row flex-wrap justify-center items-center gap-10",children:[W.jsxs(an.div,{variants:Os(),children:[W.jsx("h2",{className:`${on.sectionHeadText} text-center`,children:"Skills & Technologies."}),W.jsx("p",{className:`${on.sectionSubText} text-center`,children:"What have i learnd?"})]}),W.jsx("div",{className:"w-full lg:w-[400px] lg:h-[400px] ",children:W.jsx(K9,{icon:J9})},"skillsBall")]}),$9=sl(Q9,"TechSkillsSection"),e7="/portfolio-react-threejs/assets/cover_img-d3ab652c.png",Jb="/portfolio-react-threejs/assets/resume-24caeb09.pdf",t7=()=>{const[n,e]=G.useState(!1),t=()=>e(!0),i=()=>e(!1),r=()=>{const s=document.createElement("a");s.href=Jb,s.download="Satyam_Mishra_Resume",s.click()};return W.jsxs("section",{className:"-m-5 md:-m-10 max-w-screen-xl mx-auto my-10 space-y-10 max",children:[W.jsxs(an.div,{variants:Os(0),children:[W.jsx("h2",{className:`${on.sectionHeadText} text-center`,children:"Resume."}),W.jsx("p",{className:`${on.sectionSubText} text-center`,children:"Check out my resume"})]}),W.jsx(an.div,{variants:Xo("right","spring",.5*0,.75),className:"md:flex justify-center items-center",children:W.jsxs(_g,{options:{max:45,scale:1,speed:450},className:"group bg-white shadow-[#fcd4d4] shadow-card rounded-2xl mx-auto w-[90%] md:min-w-1/3 md:max-w-3xl h-full",children:[W.jsx("div",{className:"group-hover:opacity-100 relative w-full h-full mb-5",children:W.jsx("img",{src:e7,loading:"lazy",alt:"Resume cover image",className:"w-full h-full object-cover rounded-2xl"})}),W.jsxs("div",{className:" flex items-center space-x-5 md:space-y-5 justify-center md:absolute md:top-10 md:-right-10 md:bottom-0 md:flex md:flex-col md:items-center md:justify-center transition-opacity duration-300",children:[W.jsx("button",{className:"bg-blue-600 text-white hover:text-white-100 hover:bg-blue-800 py-2 px-3 rounded-xl text-[15px] font-medium cursor-pointer mb-2 md:mb-0",onClick:r,children:"Download"}),W.jsx("button",{className:"bg-green-600 text-white hover:text-white-100 hover:bg-green-800 py-2 px-3 rounded-xl text-[15px] font-medium cursor-pointer mb-2 md:mb-0",onClick:t,children:"View"})]})]})}),n&&W.jsx("div",{className:"fixed inset-0 z-50 overflow-auto -top-10 bg-black bg-opacity-60 flex items-center justify-center",children:W.jsxs("div",{className:"bg-white p-2 rounded-2xl max-w-screen-lg w-[70%] relative",children:[W.jsx("button",{className:"absolute -top-12 right-0 md:top-2 md:-right-20 bg-black hover:bg-gray-800 py-2 px-3 rounded-xl text-white hover:text-gray-200",onClick:i,children:"Close"}),W.jsx("iframe",{title:"PDF Viewer",src:Jb,className:"w-full h-[400px]"})]})})]})},n7=sl(t7,"ResumeSection"),i7="data:image/webp;base64,UklGRggMAABXRUJQVlA4WAoAAAAwAAAA7wAA7wAASUNDUMgBAAAAAAHIAAAAAAQwAABtbnRyUkdCIFhZWiAH4AABAAEAAAAAAABhY3NwAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAQAA9tYAAQAAAADTLQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAlkZXNjAAAA8AAAACRyWFlaAAABFAAAABRnWFlaAAABKAAAABRiWFlaAAABPAAAABR3dHB0AAABUAAAABRyVFJDAAABZAAAAChnVFJDAAABZAAAAChiVFJDAAABZAAAAChjcHJ0AAABjAAAADxtbHVjAAAAAAAAAAEAAAAMZW5VUwAAAAgAAAAcAHMAUgBHAEJYWVogAAAAAAAAb6IAADj1AAADkFhZWiAAAAAAAABimQAAt4UAABjaWFlaIAAAAAAAACSgAAAPhAAAts9YWVogAAAAAAAA9tYAAQAAAADTLXBhcmEAAAAAAAQAAAACZmYAAPKnAAANWQAAE9AAAApbAAAAAAAAAABtbHVjAAAAAAAAAAEAAAAMZW5VUwAAACAAAAAcAEcAbwBvAGcAbABlACAASQBuAGMALgAgADIAMAAxADZBTFBIggkAAAGwBgC0MTfWGWamsV3bbVDbdvu29tp23dRuk7VRu12btW0H89Kkk0wwcx6Ce8+959tf721ETAD87f//pevfqP+jaW9v+fHERZfrHuI9l+viiR+3vJX2aP9G/n81nMlTln+biVLvfLN8SrLzr0HMgLSfPUi05ETG+OrGztE9bT+Sv5AxwGHQQibsdKOi7h3jgw2X/5jtHlTas220v5FqlJaDGrybkWSQnNMPoDb3T3MYn8jnb6BWM9PijE3V9ALUbsHaROMSlVaIWi7KiDMmYUsKUNsFi0ONh3V6Jmo953Grweh5ArV/rLuRCMtAFtdHGoYRmcika7oxiNuDjO6ONQCDs5DVrEHcOVcgux/4s1b/JDJ8vC5jA/6JLOcN48oy34dM++ZaWPLfhozvCWQoZh+yfjienUaXkflLDZlJykb2Xa1Z6XAXDWB+V0a65KMhdPdio6cHDaKnBxNt89EwujuxkJqHBvJuCgONXGgosxtqL+YyGsxL0Zpz/o6Gc7+/1izb0IBuMetsPhrS2Rob5DMmvmHaqpuLBjWvgab8T6JhPVZFT2+ggV2rpcEoPbuWf2i9HtNW/1akH8+vq6Z2rxvqXztbmG+AhuKy5A2CcgMGvOnSSU5Gf38od6gwzIzRzx6U/g1U2G/UL7r4abgdKvy9MNypnXEof2DFAKDD7zr4tR1Udog4HK2ZqCx5LmulwDTinGrnhpug0rZccXci9PIJyt8IIh1LvCp5F/qByC3i8H2t9ESCrwgB6HpVnUudQOwLErCLRqwnKIwWBBE/qvJtGAgeIOOIRR+PIMVWosDv/cpk7duw+JH+bVrWjAu1WEMTaia1HfDY0s0HXZV52w6im8nAB7QRlk0iShiYVpSXtWtGv0gQHjtw9heu8paA+GgpmSG6WIIkg8SBaQUiurdPrwnyTXUf2lOIiEtAYogUXKCJuAIagRLAvC69nxPI+g9+K90kI0iOO0YPa5Cmvwy9BsrB5Vqo5jEWAZIKE3SQjkTjuUiQhKs1EFlApTkXSbLcEerNQKo9uegjC19VzplJZgwXE6Tddqg2Dcm+ysUMaThFtQN0PuTiM3l/KpaEdPdxcUgetlArnVCeiQezm8BqpfzvEsI6PDRAgrlVVBqLlMfwMJECjlJpB6kVPKwjsVmhEA+pP3g4SKIwUJ2JSLo0lINwLwkco85OWjiYg+FIc6syDjex+RwsJ5JvV6UX0r4czUH1TBrYVZXltAqSgMX2RTQWqnKa1jBg8iEaxxSJQ9IZwOYGEhijxkhS5wP5iLhFYogayyh5WwOjA0ksVmMfpXRgdTuF35RwFhNyRfJS20OgyKFCChJ+HJhdQACTVJhK6LaDm7B8AhNVWEHoWWB3GYElKnxHJzeYn4QieV+pcIfOCmD4c3k3FfBHukkcDZDnq0KvMZ0TwLH1tjRsQK8/nddYgnXy+tJ7lE5bnobLe4heGpk8G0/hXmnz6L1FZjcwfUjaG/S2kpnP1fvSNtH7icwErl6S9j29U2RacTVE2nF618jEcZUk7Qq9TDIBXNWVdoteLhWvmatYaS56BVTuAdeB0tz0SqmUsBUlrZSelwr6cVVDPx4yYVw1kVZIL49MDa7aScujl0OmC1djpGXTu05mGlevS7tC7ziZNK4+lHaE3s9ktnO1T9qP9HaQyTHzFFgibQe998hgU556o/S36M2l8whP8+XNpPcQnb08HZX3AL2BdEpiOGqK8gfQa0EHn+BoIYFG9AJ8dA4yZLsmz+ekBzfoYE9+JqH8a6DgN4R+ZMdylsDXKqwhhJ24GYMEF6owjdJhGy9VLlIYqUISJXyGl2VIsaYK9iJK7pqcJJdSyDGpAAcp4c92PoJOIsUvQcmVpHANG6YNSHKuGsNp4WQuXkWaw9SI9tEq6sfDZC+N0nA14CQt9PTlYIIXaf4Kii4lhp6++hvvRaKvqtKTGpY8rznT816kmqyKXz41xDftOgvYhGQzzarAVnr4Sy19NT+OdD8AZccogPceM+vJNqMYCd+nTlChAog/1NdRymGk7A5SB7Ypgd711XRTLcOLpD8AhUepgeieF66T+DXFSLy7Sg6XIoieD5roouUHxUj9mkUlWKMMou+roQ71Asb8igrOAaVTFELEux/0tankHLa+AFX01VEL/lQKEXM+mVJNjboPbcpDRX8Gxcep9t/n1o1vbKVkbznlnSuo8CjV/G5r4L8L/lj3QM/adll+9fs8+uaBIlT7vEU1mKGJsksvv2oRZ3n9mg91+CAoH54v6tLQyLovnqHmug+kjs7VwR2nerBEVFcAAPOQk6QO1QTJNQ5r4BXQYJxH0MD/ArA9U0jnS3+QHvilcvlhOoAVgq7VKwOgySkqOx1A0LFXtcWgxah8MXh3aFkQ8iWN35xA0rlfLVeYHmCWIPQ+WBbYN1G4GAVEq2Yq9SRoMuiOIPSNKAusW+QVpwLZziUKnbPrAqaJQndSWVBln7TngPALCg0FbZoPiMKrQWVB7FVJf5op2Y4q8wNotJ1PFC4rB5rlSSlNAtLtfIp4k3UCbworaVYODPPJeBOIv6XIatBq6E1RuK08mCPBk0gttlCJCwF6geHCfA3LM70jbiWQT1fB1wV0u14UvlMemJeJ8taiV7tUgTWg3fAbou4FlAcw8IKY7aDg5/QuBugHevoE4YSKgLn7gq9PuYoQ81xXLxz7dfs7aQ/3behQoSc5XxfQ8VJRX1dIn9Y71OaDlm0/C/Im6gjWEvvGoidIzBKDz2upE60rkaDrXqViTmjJXkjJkwL6fkYMpuoIfqU0FXT+rph0LS0j9CZo3e9HIe5IHY2ms9umNwg9LgJn66g9md/8QffxV0S4a2moPpWzUaD/RlkC8EuzfiKIXE0EDlu4BOBy/ZhpZDcAHlNyBeBck26ARFYScNnKJQA3BvNzoyHw2ey2ALw52sTMhZrAab2rAhBPPhDKyYk44DX+sAjEkh9mjmySGMzCvgjgNugLIUJ1tT0Q+LVlMOabYwaWpxdxdW84cN3+Fk8XmwLfMV9z9FUEcG56vJibwufNwHzbc7wcaAT8O9O8fJSm2cEQdjvPxdk2YBQdMzwcuGc4wEA2+Ep7vk8TwGB2P6a3Qx3BeNoeuamvGw9YwJD6Tb+lpyuPO8GwBjx1TT/nJtvA0NonHNfLsbFWMLymLuuLK2RVxYaI7vfagUGOfelUBaJVqYqHHw4BI5266nZZjVSJTwXDbU6acRoR/6GKUa85ff2Cv1Z/+///8wRWUDggkAAAAFAPAJ0BKvAA8AA+bTaZSaQjIqEgKACADYlpbuF2sRtACewD32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D32ych77ZOQ99snIe+2TkPfbJyHvtk5D31gAAP7/1gAAAAAAAAAAAA==",r7="/portfolio-react-threejs/assets/appstore-0b8f390b.png",s7="/portfolio-react-threejs/assets/colab-9e4861eb.png",o7="/portfolio-react-threejs/assets/huggingface-720eadc9.png",Qb="/portfolio-react-threejs/assets/website-078d1216.gif",a7=({index:n,name:e,description:t,tags:i,image:r,source_code_link:s,date:o})=>W.jsx(_g,{className:"sm:w-[360px] w-full",children:W.jsx(an.div,{variants:Xo("right","spring",.5*n,.75),className:"shadow-[#fcd4d4] green-pink-gradient shadow-card p-[1px] rounded-2xl ",children:W.jsxs("div",{className:"bg-primary rounded-2xl py-5 px-8",options:{max:45,scale:1,speed:450},children:[W.jsxs("div",{className:"relative w-full h-[230px]",children:[W.jsx("img",{src:r,alt:"project_image",className:"w-full h-full object-cover rounded-2xl"}),W.jsx("div",{className:"absolute inset-0 z-10 space-y-3 flex-col justify-end m-3 card-img_hover",children:Object.entries(s).map(([a,c])=>W.jsx("div",{onClick:()=>window.open(c,"_blank"),className:"border-black border-2 white-gradient w-10 h-10 rounded-full flex justify-center items-center cursor-pointer",title:a==="Github"?"View in GitHub":a==="Appstore"?"View in App Store":a==="Colab"?"View in Google Colab":a==="Huggingface"?"View in Hugging Face":a==="Live"?"View Live Website":"View Now",children:W.jsx("img",{src:a==="Github"?i7:a==="Appstore"?r7:a==="Colab"?s7:a==="Huggingface"?o7:Qb,alt:`${a} link`,className:"w-1/2 h-1/2 object-contain"})},a))})]}),W.jsxs("div",{className:"mt-5",children:[W.jsx("h3",{className:"text-black font-bold text-[24px]",children:e}),W.jsx("p",{className:"mt-2 text-secondary text-[14px]",children:t})]}),W.jsxs("div",{className:"mt-4 flex flex-wrap gap-2",children:[i.map(a=>W.jsxs("p",{className:`text-[14px] ${a.color}`,children:["#",a.name," "]},`${e}-${a.name}`))," "]}),W.jsx("p",{children:o})]})})}),l7=()=>W.jsxs("section",{className:"-m-5 md:-m-10 ",children:[W.jsxs(an.div,{variants:Os(0),children:[W.jsx("h2",{className:`${on.sectionHeadText} text-center`,children:"Projects."}),W.jsx("p",{className:`${on.sectionSubText} text-center`,children:"My works?"})]}),W.jsx(an.div,{variants:Xo("","",.1,1),className:"w-full flex",children:W.jsx("p",{className:"mt-3 text-secondary text-center text-[17px] max-w-full leading-[30px]",children:"The projects that are listed below provide examples of my work in the real world, showcasing my abilities and experience. Each project has a brief description, links to code repositories, and live demonstrations. It exhibits my ability to work with various technologies, manage projects efficiently, and solve complex problems."})}),W.jsxs("div",{className:" mt-20 grid md:grid-cols-2 lg:grid-cols-3 gap-5",children:[e4.map((n,e)=>W.jsx(a7,{index:e,...n},`project-${e}`))," "]})]}),c7=sl(l7,"ProjectsSection"),u7=({index:n,name:e,image:t})=>W.jsx(an.div,{children:W.jsx(an.div,{variants:Xo("right","spring",.5*n,.75),children:W.jsxs(_g,{options:{max:45,scale:1,speed:450},className:"bg-white shadow-[#fcd4d4] shadow-card p-5 rounded-2xl sm:w-[360px] w-full",children:[W.jsx("div",{className:"relative w-full h-[230px]",children:W.jsx("img",{src:t,placeholder:e,loading:"lazy",alt:"certificate image",className:"w-full h-full object-cover rounded-2xl"})}),W.jsx("h3",{className:"mt-5 text-black font-bold text-[24px] text-center",children:e})]})})}),By=n=>n.map(({index:e,...t})=>W.jsx(u7,{index:e,...t},`project-${e}`)),f7=()=>W.jsxs("section",{className:"-m-5 md:-m-10",children:[W.jsxs(an.div,{variants:Os(0),children:[W.jsx("h2",{className:`${on.sectionHeadText} text-center`,children:"Certificates."}),W.jsx("p",{className:`${on.sectionSubText} text-center`,children:"Professional Certificates"})]}),W.jsx("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:By(i4)}),W.jsx(an.p,{variants:Os(0),className:`${on.sectionSubText} text-center`,children:"Work Certificates"}),W.jsx("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:By(n4)}),W.jsx(an.p,{variants:Os(0),className:`${on.sectionSubText} text-center`,children:"Course Certificates"}),W.jsx("div",{className:"my-20 flex flex-wrap justify-center mx-auto space-x-5 gap-5 w-full",children:By(t4)})]}),h7=sl(f7,"CertificatesSection");function d7(){return W.jsxs("div",{className:"bg-gradient-to-b from-white to-primary",children:[W.jsx(F4,{}),W.jsx(P4,{}),W.jsx($9,{}),W.jsx(n7,{}),W.jsx(c7,{}),W.jsx(h7,{}),W.jsx(N4,{})]})}zy.createRoot(document.getElementById("root")).render(W.jsx(Km.StrictMode,{children:W.jsx(d7,{})})); diff --git a/index.html b/index.html index 25d3dcd..bb0a138 100644 --- a/index.html +++ b/index.html @@ -17,8 +17,8 @@ gtag("config", "G-7KPH635EWM"); - - + +