diff --git a/docs/_astro/CoreNodeGraph.AFt904_y.js b/docs/_astro/CoreNodeGraph.BwbEQ4_U.js similarity index 94% rename from docs/_astro/CoreNodeGraph.AFt904_y.js rename to docs/_astro/CoreNodeGraph.BwbEQ4_U.js index 05c35f7c36..7591845cfe 100644 --- a/docs/_astro/CoreNodeGraph.AFt904_y.js +++ b/docs/_astro/CoreNodeGraph.BwbEQ4_U.js @@ -1,8 +1,8 @@ -import{j as n1}from"./jsx-runtime.CzgMDNMm.js";import{g as w_,r as ps,R as O5,a as M_}from"./index.DQ2WTIsS.js";import{P as vt}from"./index.BEUvLPWW.js";function F5(s,e){var n=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(n!=null){var i,o,a,c,u=[],h=!0,d=!1;try{if(a=(n=n.call(s)).next,e===0){if(Object(n)!==n)return;h=!1}else for(;!(h=(i=a.call(n)).done)&&(u.push(i.value),u.length!==e);h=!0);}catch(f){d=!0,o=f}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(d)throw o}}return u}}function N5(s,e,n){return e=W5(e),e in s?Object.defineProperty(s,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):s[e]=n,s}function aC(s,e){return z5(s)||F5(s,e)||eI(s,e)||H5()}function U5(s){return k5(s)||G5(s)||eI(s)||V5()}function k5(s){if(Array.isArray(s))return pb(s)}function z5(s){if(Array.isArray(s))return s}function G5(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}function eI(s,e){if(s){if(typeof s=="string")return pb(s,e);var n=Object.prototype.toString.call(s).slice(8,-1);if(n==="Object"&&s.constructor&&(n=s.constructor.name),n==="Map"||n==="Set")return Array.from(s);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return pb(s,e)}}function pb(s,e){(e==null||e>s.length)&&(e=s.length);for(var n=0,i=new Array(e);ns.length)&&(e=s.length);for(var n=0,i=new Array(e);n */var X5=function(e){return[...e].reduce((n,[i,o])=>(n[i]=o,n),{})};const lC=w_(X5);function K5(s,e){var n=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(n!=null){var i,o,a,c,u=[],h=!0,d=!1;try{if(a=(n=n.call(s)).next,e===0){if(Object(n)!==n)return;h=!1}else for(;!(h=(i=a.call(n)).done)&&(u.push(i.value),u.length!==e);h=!0);}catch(f){d=!0,o=f}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(d)throw o}}return u}}function mb(s){"@babel/helpers - typeof";return mb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},mb(s)}function tI(s,e){return Y5(s)||K5(s,e)||nI(s,e)||Z5()}function cC(s){return q5(s)||$5(s)||nI(s)||J5()}function q5(s){if(Array.isArray(s))return gb(s)}function Y5(s){if(Array.isArray(s))return s}function $5(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}function nI(s,e){if(s){if(typeof s=="string")return gb(s,e);var n=Object.prototype.toString.call(s).slice(8,-1);if(n==="Object"&&s.constructor&&(n=s.constructor.name),n==="Map"||n==="Set")return Array.from(s);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return gb(s,e)}}function gb(s,e){(e==null||e>s.length)&&(e=s.length);for(var n=0,i=new Array(e);n */var X5=function(e){return[...e].reduce((n,[i,o])=>(n[i]=o,n),{})};const cC=M_(X5);function K5(s,e){var n=s==null?null:typeof Symbol<"u"&&s[Symbol.iterator]||s["@@iterator"];if(n!=null){var i,o,a,c,u=[],h=!0,d=!1;try{if(a=(n=n.call(s)).next,e===0){if(Object(n)!==n)return;h=!1}else for(;!(h=(i=a.call(n)).done)&&(u.push(i.value),u.length!==e);h=!0);}catch(f){d=!0,o=f}finally{try{if(!h&&n.return!=null&&(c=n.return(),Object(c)!==c))return}finally{if(d)throw o}}return u}}function gb(s){"@babel/helpers - typeof";return gb=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},gb(s)}function nI(s,e){return Y5(s)||K5(s,e)||iI(s,e)||Z5()}function hC(s){return q5(s)||$5(s)||iI(s)||J5()}function q5(s){if(Array.isArray(s))return Ab(s)}function Y5(s){if(Array.isArray(s))return s}function $5(s){if(typeof Symbol<"u"&&s[Symbol.iterator]!=null||s["@@iterator"]!=null)return Array.from(s)}function iI(s,e){if(s){if(typeof s=="string")return Ab(s,e);var n=Object.prototype.toString.call(s).slice(8,-1);if(n==="Object"&&s.constructor&&(n=s.constructor.name),n==="Map"||n==="Set")return Array.from(s);if(n==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return Ab(s,e)}}function Ab(s,e){(e==null||e>s.length)&&(e=s.length);for(var n=0,i=new Array(e);n1?L-1:0),F=1;F1&&arguments[1]!==void 0?arguments[1]:ps.useEffect,n=ps.useRef(),i=ps.useRef(!1),o=ps.useRef(!1),a=ps.useState(0),c=tI(a,2);c[0];var u=c[1];i.current&&(o.current=!0),e(function(){return i.current||(n.current=s(),i.current=!0),u(function(h){return h+1}),function(){o.current&&n.current&&n.current()}},[])}var eU={exports:{}};(function(s,e){(function(i,o){s.exports=o()})(self,()=>(()=>{var n={"./node_modules/@ungap/custom-elements/index.js":()=>{/*! (c) Andrea Giammarchi @webreflection ISC */(function(){var c=function(sn,Rt){var gn=function(Jn){for(var $n=0,Ei=Jn.length;$nsn.length)&&(Rt=sn.length);for(var gn=0,si=new Array(Rt);gn=sn.length?{done:!0}:{done:!1,value:sn[si++]}},e:function(Fi){throw Fi},f:Ln}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. +In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Fv(s,e){var n=gb(e)==="object"?e:{wrapperElementType:e,methodNames:(arguments.length<=2?void 0:arguments[2])||void 0,initPropNames:(arguments.length<=3?void 0:arguments[3])||void 0},i=n.wrapperElementType,o=i===void 0?"div":i,a=n.nodeMapper,c=a===void 0?function(p){return p}:a,u=n.methodNames,h=u===void 0?[]:u,d=n.initPropNames,f=d===void 0?[]:d;return ps.forwardRef(function(p,A){var g=ps.useRef(),v=ps.useState({}),b=nI(v,2),x=b[0],E=b[1];ps.useEffect(function(){return E(p)});var S=ps.useMemo(function(){var T=cC(f.filter(function(L){return p.hasOwnProperty(L)}).map(function(L){return[L,p[L]]}));return s(T)},[]);uC(function(){S(c(g.current))},ps.useLayoutEffect),uC(function(){return S._destructor instanceof Function?S._destructor:void 0});var M=ps.useCallback(function(T){for(var L=arguments.length,B=new Array(L>1?L-1:0),F=1;F1&&arguments[1]!==void 0?arguments[1]:ps.useEffect,n=ps.useRef(),i=ps.useRef(!1),o=ps.useRef(!1),a=ps.useState(0),c=nI(a,2);c[0];var u=c[1];i.current&&(o.current=!0),e(function(){return i.current||(n.current=s(),i.current=!0),u(function(h){return h+1}),function(){o.current&&n.current&&n.current()}},[])}var eU={exports:{}};(function(s,e){(function(i,o){s.exports=o()})(self,()=>(()=>{var n={"./node_modules/@ungap/custom-elements/index.js":()=>{/*! (c) Andrea Giammarchi @webreflection ISC */(function(){var c=function(sn,Rt){var gn=function(Jn){for(var $n=0,Ei=Jn.length;$nsn.length)&&(Rt=sn.length);for(var gn=0,si=new Array(Rt);gn=sn.length?{done:!0}:{done:!1,value:sn[si++]}},e:function(Fi){throw Fi},f:Ln}}throw new TypeError(`Invalid attempt to iterate non-iterable instance. In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var Jn=!0,$n=!1,Ei;return{s:function(){gn=gn.call(sn)},n:function(){var Fi=gn.next();return Jn=Fi.done,Fi},e:function(Fi){$n=!0,Ei=Fi},f:function(){try{!Jn&&gn.return!=null&&gn.return()}finally{if($n)throw Ei}}}}/*! (c) Andrea Giammarchi - ISC */var f=!0,p=!1,A="querySelectorAll",g=function(Rt){var gn=arguments.length>1&&arguments[1]!==void 0?arguments[1]:document,si=arguments.length>2&&arguments[2]!==void 0?arguments[2]:MutationObserver,Ln=arguments.length>3&&arguments[3]!==void 0?arguments[3]:["*"],Jn=function Fi(Vi,lr,cr,Le,ht,yt){var de=d(Vi),be;try{for(de.s();!(be=de.n()).done;){var Ve=be.value;(yt||A in Ve)&&(ht?cr.has(Ve)||(cr.add(Ve),Le.delete(Ve),Rt(Ve,ht)):Le.has(Ve)||(Le.add(Ve),cr.delete(Ve),Rt(Ve,ht)),yt||Fi(Ve[A](lr),lr,cr,Le,ht,f))}}catch(dt){de.e(dt)}finally{de.f()}},$n=new si(function(Fi){if(Ln.length){var Vi=Ln.join(","),lr=new Set,cr=new Set,Le=d(Fi),ht;try{for(Le.s();!(ht=Le.n()).done;){var yt=ht.value,de=yt.addedNodes,be=yt.removedNodes;Jn(be,Vi,lr,cr,p,p),Jn(de,Vi,lr,cr,f,p)}}catch(Ve){Le.e(Ve)}finally{Le.f()}}}),Ei=$n.observe;return($n.observe=function(Fi){return Ei.call($n,Fi,{subtree:f,childList:f})})(gn),$n},v="querySelectorAll",b=self,x=b.document,E=b.Element,S=b.MutationObserver,M=b.Set,C=b.WeakMap,T=function(Rt){return v in Rt},L=[].filter,B=function(sn){var Rt=new C,gn=function(Le){for(var ht=0,yt=Le.length;ht1&&arguments[1]!==void 0?arguments[1]:!0,yt=0,de=Le.length;yt{var u=Object.prototype.toString;c.exports=h;function h(d){return d.BYTES_PER_ELEMENT&&u.call(d.buffer)==="[object ArrayBuffer]"||Array.isArray(d)}},"./node_modules/as-number/index.js":c=>{c.exports=function(h,d){return typeof h=="number"?h:typeof d=="number"?d:0}},"./node_modules/base64-js/index.js":(c,u)=>{u.byteLength=b,u.toByteArray=E,u.fromByteArray=C;for(var h=[],d=[],f=typeof Uint8Array<"u"?Uint8Array:Array,p="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",A=0,g=p.length;A0)throw new Error("Invalid string. Length must be a multiple of 4");var B=T.indexOf("=");B===-1&&(B=L);var F=B===L?0:4-B%4;return[B,F]}function b(T){var L=v(T),B=L[0],F=L[1];return(B+F)*3/4-F}function x(T,L,B){return(L+B)*3/4-B}function E(T){var L,B=v(T),F=B[0],D=B[1],P=new f(x(T,F,D)),U=0,K=D>0?F-4:F,J;for(J=0;J>16&255,P[U++]=L>>8&255,P[U++]=L&255;return D===2&&(L=d[T.charCodeAt(J)]<<2|d[T.charCodeAt(J+1)]>>4,P[U++]=L&255),D===1&&(L=d[T.charCodeAt(J)]<<10|d[T.charCodeAt(J+1)]<<4|d[T.charCodeAt(J+2)]>>2,P[U++]=L>>8&255,P[U++]=L&255),P}function S(T){return h[T>>18&63]+h[T>>12&63]+h[T>>6&63]+h[T&63]}function M(T,L,B){for(var F,D=[],P=L;PK?K:U+P));return F===1?(L=T[B-1],D.push(h[L>>2]+h[L<<4&63]+"==")):F===2&&(L=(T[B-2]<<8)+T[B-1],D.push(h[L>>10]+h[L>>4&63]+h[L<<2&63]+"=")),D.join("")}},"./node_modules/buffer-equal/index.js":(c,u,h)=>{var d=h("./node_modules/buffer/index.js").Buffer;c.exports=function(f,p){if(d.isBuffer(f)&&d.isBuffer(p)){if(typeof f.equals=="function")return f.equals(p);if(f.length!==p.length)return!1;for(var A=0;A{/*! * The buffer module from node.js, for the browser. * @@ -1202,15 +1202,15 @@ a-scene audio { } } `],sourceRoot:""}]);const v=g},"./src/style/aframe.css":(c,u,h)=>{h.r(u),h.d(u,{default:()=>B});var d=h("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),f=h.n(d),p=h("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),A=h.n(p),g=h("./node_modules/style-loader/dist/runtime/insertBySelector.js"),v=h.n(g),b=h("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),x=h.n(b),E=h("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),S=h.n(E),M=h("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),C=h.n(M),T=h("./node_modules/css-loader/dist/cjs.js!./src/style/aframe.css"),L={};L.styleTagTransform=C(),L.setAttributes=x(),L.insert=v().bind(null,"head"),L.domAPI=A(),L.insertStyleElement=S(),f()(T.default,L);const B=T.default&&T.default.locals?T.default.locals:void 0},"./src/style/rStats.css":(c,u,h)=>{h.r(u),h.d(u,{default:()=>B});var d=h("./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js"),f=h.n(d),p=h("./node_modules/style-loader/dist/runtime/styleDomAPI.js"),A=h.n(p),g=h("./node_modules/style-loader/dist/runtime/insertBySelector.js"),v=h.n(g),b=h("./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js"),x=h.n(b),E=h("./node_modules/style-loader/dist/runtime/insertStyleElement.js"),S=h.n(E),M=h("./node_modules/style-loader/dist/runtime/styleTagTransform.js"),C=h.n(M),T=h("./node_modules/css-loader/dist/cjs.js!./src/style/rStats.css"),L={};L.styleTagTransform=C(),L.setAttributes=x(),L.insert=v().bind(null,"head"),L.domAPI=A(),L.insertStyleElement=S(),f()(T.default,L);const B=T.default&&T.default.locals?T.default.locals:void 0},"./node_modules/style-loader/dist/runtime/injectStylesIntoStyleTag.js":c=>{var u=[];function h(p){for(var A=-1,g=0;g{var u={};function h(f){if(typeof u[f]>"u"){var p=document.querySelector(f);if(window.HTMLIFrameElement&&p instanceof window.HTMLIFrameElement)try{p=p.contentDocument.head}catch{p=null}u[f]=p}return u[f]}function d(f,p){var A=h(f);if(!A)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");A.appendChild(p)}c.exports=d},"./node_modules/style-loader/dist/runtime/insertStyleElement.js":c=>{function u(h){var d=document.createElement("style");return h.setAttributes(d,h.attributes),h.insert(d,h.options),d}c.exports=u},"./node_modules/style-loader/dist/runtime/setAttributesWithoutAttributes.js":(c,u,h)=>{function d(f){var p=h.nc;p&&f.setAttribute("nonce",p)}c.exports=d},"./node_modules/style-loader/dist/runtime/styleDomAPI.js":c=>{function u(f,p,A){var g="";A.supports&&(g+="@supports (".concat(A.supports,") {")),A.media&&(g+="@media ".concat(A.media," {"));var v=typeof A.layer<"u";v&&(g+="@layer".concat(A.layer.length>0?" ".concat(A.layer):""," {")),g+=A.css,v&&(g+="}"),A.media&&(g+="}"),A.supports&&(g+="}");var b=A.sourceMap;b&&typeof btoa<"u"&&(g+=` -/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(b))))," */")),p.styleTagTransform(g,f,p.options)}function h(f){if(f.parentNode===null)return!1;f.parentNode.removeChild(f)}function d(f){if(typeof document>"u")return{update:function(){},remove:function(){}};var p=f.insertStyleElement(f);return{update:function(g){u(p,f,g)},remove:function(){h(p)}}}c.exports=d},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":c=>{function u(h,d){if(d.styleSheet)d.styleSheet.cssText=h;else{for(;d.firstChild;)d.removeChild(d.firstChild);d.appendChild(document.createTextNode(h))}}c.exports=u},"data:image/svg+xml,%3C%3Fxml version=%271.0%27 encoding=%27UTF-8%27 standalone=%27no%27%3F%3E%3Csvg width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27 version=%271.1%27 id=%27svg320%27 sodipodi:docname=%27fullscreen-aframe.svg%27 xml:space=%27preserve%27 inkscape:version=%271.2.1 %289c6d41e 2022-07-14%29%27 xmlns:inkscape=%27http://www.inkscape.org/namespaces/inkscape%27 xmlns:sodipodi=%27http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd%27 xmlns=%27http://www.w3.org/2000/svg%27 xmlns:svg=%27http://www.w3.org/2000/svg%27 xmlns:rdf=%27http://www.w3.org/1999/02/22-rdf-syntax-ns%23%27 xmlns:cc=%27http://creativecommons.org/ns%23%27 xmlns:dc=%27http://purl.org/dc/elements/1.1/%27%3E%3Cdefs id=%27defs324%27 /%3E%3Csodipodi:namedview id=%27namedview322%27 pagecolor=%27%23ffffff%27 bordercolor=%27%23000000%27 borderopacity=%270.25%27 inkscape:showpageshadow=%272%27 inkscape:pageopacity=%270.0%27 inkscape:pagecheckerboard=%270%27 inkscape:deskcolor=%27%23d1d1d1%27 showgrid=%27false%27 inkscape:zoom=%273.8064516%27 inkscape:cx=%2791.423729%27 inkscape:cy=%27-1.4449153%27 inkscape:window-width=%271440%27 inkscape:window-height=%27847%27 inkscape:window-x=%2732%27 inkscape:window-y=%2725%27 inkscape:window-maximized=%270%27 inkscape:current-layer=%27svg320%27 /%3E%3Ctitle id=%27title312%27%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M96 0H12A12 12 0 0 0 0 12V50A12 12 0 0 0 12 62H96a12 12 0 0 0 12-12V12A12 12 0 0 0 96 0Zm8 50a8 8 0 0 1-8 8H12a8 8 0 0 1-8-8V12a8 8 0 0 1 8-8H96a8 8 0 0 1 8 8Z%27 fill=%27%23fff%27 id=%27path314%27 style=%27fill:%23ffffff%27 /%3E%3Cg id=%27g356%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g358%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g360%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g362%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g364%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g366%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g368%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g370%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g372%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g374%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g376%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g378%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g380%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g382%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g384%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cmetadata id=%27metadata561%27%3E%3Crdf:RDF%3E%3Ccc:Work rdf:about=%27%27%3E%3Cdc:title%3Eaframe-armode-noborder-reduced-tracking%3C/dc:title%3E%3C/cc:Work%3E%3C/rdf:RDF%3E%3C/metadata%3E%3Cpath d=%27m 98.168511 40.083649 c 0 -1.303681 -0.998788 -2.358041 -2.239389 -2.358041 -1.230088 0.0031 -2.240892 1.05436 -2.240892 2.358041 v 4.881296 l -9.041661 -9.041662 c -0.874129 -0.875631 -2.288954 -0.875631 -3.16308 0 -0.874129 0.874126 -0.874129 2.293459 0 3.167585 l 8.995101 8.992101 h -4.858767 c -1.323206 0.0031 -2.389583 1.004796 -2.389583 2.239386 0 1.237598 1.066377 2.237888 2.389583 2.237888 h 10.154599 c 1.323206 0 2.388082 -0.998789 2.392587 -2.237888 -0.0044 -0.03305 -0.009 -0.05858 -0.0134 -0.09161 0.0046 -0.04207 0.0134 -0.08712 0.0134 -0.13066 V 40.085172 h -1.52e-4%27 id=%27path596%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 23.091002 35.921781 -9.026643 9.041662 v -4.881296 c 0 -1.303681 -1.009302 -2.355037 -2.242393 -2.358041 -1.237598 0 -2.237888 1.05436 -2.237888 2.358041 l -0.0031 10.016421 c 0 0.04356 0.01211 0.08862 0.0015 0.130659 -0.0031 0.03153 -0.009 0.05709 -0.01211 0.09161 0.0031 1.239099 1.069379 2.237888 2.391085 2.237888 h 10.156101 c 1.320202 0 2.388079 -1.000291 2.388079 -2.237888 0 -1.234591 -1.067877 -2.236383 -2.388079 -2.239387 h -4.858767 l 8.995101 -8.9921 c 0.871126 -0.874127 0.871126 -2.293459 0 -3.167586 -0.875628 -0.877132 -2.291957 -0.877132 -3.169087 -1.52e-4%27 id=%27path598%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 84.649572 25.978033 9.041662 -9.041664 v 4.881298 c 0 1.299176 1.010806 2.350532 2.240891 2.355037 1.240601 0 2.23939 -1.055861 2.23939 -2.355037 V 11.798242 c 0 -0.04356 -0.009 -0.08862 -0.0134 -0.127671 0.0044 -0.03153 0.009 -0.06157 0.0134 -0.09313 -0.0044 -1.240598 -1.069379 -2.2393873 -2.391085 -2.2393873 h -10.1546 c -1.323205 0 -2.38958 0.9987893 -2.38958 2.2393873 0 1.233091 1.066375 2.237887 2.38958 2.240891 h 4.858768 l -8.995102 8.9921 c -0.874129 0.872625 -0.874129 2.288954 0 3.161578 0.874127 0.880137 2.288951 0.880137 3.16308 1.5e-4%27 id=%27path600%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 17.264988 13.822853 h 4.857265 c 1.320202 -0.0031 2.388079 -1.0078 2.388079 -2.240889 0 -1.240601 -1.067877 -2.2393893 -2.388079 -2.2393893 H 11.967654 c -1.321707 0 -2.388082 0.9987883 -2.391085 2.2393893 0.0031 0.03153 0.009 0.06157 0.01211 0.09313 -0.0031 0.03905 -0.0015 0.08262 -0.0015 0.127671 l 0.0031 10.020926 c 0 1.299176 1.00029 2.355038 2.237887 2.355038 1.233092 -0.0044 2.242393 -1.055862 2.242393 -2.355038 v -4.881295 l 9.026644 9.041661 c 0.877132 0.878635 2.293459 0.878635 3.169087 0 0.871125 -0.872624 0.871125 -2.288953 0 -3.161577 l -8.995282 -8.993616%27 id=%27path602%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3C/svg%3E":c=>{c.exports="data:image/svg+xml,%3C%3Fxml version=%271.0%27 encoding=%27UTF-8%27 standalone=%27no%27%3F%3E%3Csvg width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27 version=%271.1%27 id=%27svg320%27 sodipodi:docname=%27fullscreen-aframe.svg%27 xml:space=%27preserve%27 inkscape:version=%271.2.1 %289c6d41e 2022-07-14%29%27 xmlns:inkscape=%27http://www.inkscape.org/namespaces/inkscape%27 xmlns:sodipodi=%27http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd%27 xmlns=%27http://www.w3.org/2000/svg%27 xmlns:svg=%27http://www.w3.org/2000/svg%27 xmlns:rdf=%27http://www.w3.org/1999/02/22-rdf-syntax-ns%23%27 xmlns:cc=%27http://creativecommons.org/ns%23%27 xmlns:dc=%27http://purl.org/dc/elements/1.1/%27%3E%3Cdefs id=%27defs324%27 /%3E%3Csodipodi:namedview id=%27namedview322%27 pagecolor=%27%23ffffff%27 bordercolor=%27%23000000%27 borderopacity=%270.25%27 inkscape:showpageshadow=%272%27 inkscape:pageopacity=%270.0%27 inkscape:pagecheckerboard=%270%27 inkscape:deskcolor=%27%23d1d1d1%27 showgrid=%27false%27 inkscape:zoom=%273.8064516%27 inkscape:cx=%2791.423729%27 inkscape:cy=%27-1.4449153%27 inkscape:window-width=%271440%27 inkscape:window-height=%27847%27 inkscape:window-x=%2732%27 inkscape:window-y=%2725%27 inkscape:window-maximized=%270%27 inkscape:current-layer=%27svg320%27 /%3E%3Ctitle id=%27title312%27%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M96 0H12A12 12 0 0 0 0 12V50A12 12 0 0 0 12 62H96a12 12 0 0 0 12-12V12A12 12 0 0 0 96 0Zm8 50a8 8 0 0 1-8 8H12a8 8 0 0 1-8-8V12a8 8 0 0 1 8-8H96a8 8 0 0 1 8 8Z%27 fill=%27%23fff%27 id=%27path314%27 style=%27fill:%23ffffff%27 /%3E%3Cg id=%27g356%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g358%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g360%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g362%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g364%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g366%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g368%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g370%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g372%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g374%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g376%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g378%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g380%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g382%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g384%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cmetadata id=%27metadata561%27%3E%3Crdf:RDF%3E%3Ccc:Work rdf:about=%27%27%3E%3Cdc:title%3Eaframe-armode-noborder-reduced-tracking%3C/dc:title%3E%3C/cc:Work%3E%3C/rdf:RDF%3E%3C/metadata%3E%3Cpath d=%27m 98.168511 40.083649 c 0 -1.303681 -0.998788 -2.358041 -2.239389 -2.358041 -1.230088 0.0031 -2.240892 1.05436 -2.240892 2.358041 v 4.881296 l -9.041661 -9.041662 c -0.874129 -0.875631 -2.288954 -0.875631 -3.16308 0 -0.874129 0.874126 -0.874129 2.293459 0 3.167585 l 8.995101 8.992101 h -4.858767 c -1.323206 0.0031 -2.389583 1.004796 -2.389583 2.239386 0 1.237598 1.066377 2.237888 2.389583 2.237888 h 10.154599 c 1.323206 0 2.388082 -0.998789 2.392587 -2.237888 -0.0044 -0.03305 -0.009 -0.05858 -0.0134 -0.09161 0.0046 -0.04207 0.0134 -0.08712 0.0134 -0.13066 V 40.085172 h -1.52e-4%27 id=%27path596%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 23.091002 35.921781 -9.026643 9.041662 v -4.881296 c 0 -1.303681 -1.009302 -2.355037 -2.242393 -2.358041 -1.237598 0 -2.237888 1.05436 -2.237888 2.358041 l -0.0031 10.016421 c 0 0.04356 0.01211 0.08862 0.0015 0.130659 -0.0031 0.03153 -0.009 0.05709 -0.01211 0.09161 0.0031 1.239099 1.069379 2.237888 2.391085 2.237888 h 10.156101 c 1.320202 0 2.388079 -1.000291 2.388079 -2.237888 0 -1.234591 -1.067877 -2.236383 -2.388079 -2.239387 h -4.858767 l 8.995101 -8.9921 c 0.871126 -0.874127 0.871126 -2.293459 0 -3.167586 -0.875628 -0.877132 -2.291957 -0.877132 -3.169087 -1.52e-4%27 id=%27path598%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 84.649572 25.978033 9.041662 -9.041664 v 4.881298 c 0 1.299176 1.010806 2.350532 2.240891 2.355037 1.240601 0 2.23939 -1.055861 2.23939 -2.355037 V 11.798242 c 0 -0.04356 -0.009 -0.08862 -0.0134 -0.127671 0.0044 -0.03153 0.009 -0.06157 0.0134 -0.09313 -0.0044 -1.240598 -1.069379 -2.2393873 -2.391085 -2.2393873 h -10.1546 c -1.323205 0 -2.38958 0.9987893 -2.38958 2.2393873 0 1.233091 1.066375 2.237887 2.38958 2.240891 h 4.858768 l -8.995102 8.9921 c -0.874129 0.872625 -0.874129 2.288954 0 3.161578 0.874127 0.880137 2.288951 0.880137 3.16308 1.5e-4%27 id=%27path600%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 17.264988 13.822853 h 4.857265 c 1.320202 -0.0031 2.388079 -1.0078 2.388079 -2.240889 0 -1.240601 -1.067877 -2.2393893 -2.388079 -2.2393893 H 11.967654 c -1.321707 0 -2.388082 0.9987883 -2.391085 2.2393893 0.0031 0.03153 0.009 0.06157 0.01211 0.09313 -0.0031 0.03905 -0.0015 0.08262 -0.0015 0.127671 l 0.0031 10.020926 c 0 1.299176 1.00029 2.355038 2.237887 2.355038 1.233092 -0.0044 2.242393 -1.055862 2.242393 -2.355038 v -4.881295 l 9.026644 9.041661 c 0.877132 0.878635 2.293459 0.878635 3.169087 0 0.871125 -0.872624 0.871125 -2.288953 0 -3.161577 l -8.995282 -8.993616%27 id=%27path602%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3C/svg%3E"},"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.33,5.12,9.09,9.09,0,0,1-4,3.26l6.49,12.26V46H73.73Zm-4.93-5h5a5.09,5.09,0,0,0,3.6-1.18,4.21,4.21,0,0,0,1.28-3.27,4.56,4.56,0,0,0-1.2-3.34A5,5,0,0,0,68.15,21h-5Z%27 fill=%27%23fff%27/%3E%3C/svg%3E":c=>{c.exports="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.33,5.12,9.09,9.09,0,0,1-4,3.26l6.49,12.26V46H73.73Zm-4.93-5h5a5.09,5.09,0,0,0,3.6-1.18,4.21,4.21,0,0,0,1.28-3.27,4.56,4.56,0,0,0-1.2-3.34A5,5,0,0,0,68.15,21h-5Z%27 fill=%27%23fff%27/%3E%3C/svg%3E"},"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27%3E%3Ctitle%3Eaframe-vrmode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M68.81,21.56H64.23v8.27h4.58a4.13,4.13,0,0,0,3.1-1.09,4.2,4.2,0,0,0,1-3,4.24,4.24,0,0,0-1-3A4.05,4.05,0,0,0,68.81,21.56Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0ZM41.9,46H34L24,16h8l6,21.84,6-21.84H52Zm39.29,0H73.44L68.15,35.39H64.23V46H57V16H68.81q5.32,0,8.34,2.37a8,8,0,0,1,3,6.69,9.68,9.68,0,0,1-1.27,5.18,8.9,8.9,0,0,1-4,3.34l6.26,12.11Z%27 fill=%27%23fff%27/%3E%3C/svg%3E":c=>{c.exports="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27%3E%3Ctitle%3Eaframe-vrmode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M68.81,21.56H64.23v8.27h4.58a4.13,4.13,0,0,0,3.1-1.09,4.2,4.2,0,0,0,1-3,4.24,4.24,0,0,0-1-3A4.05,4.05,0,0,0,68.81,21.56Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0ZM41.9,46H34L24,16h8l6,21.84,6-21.84H52Zm39.29,0H73.44L68.15,35.39H64.23V46H57V16H68.81q5.32,0,8.34,2.37a8,8,0,0,1,3,6.69,9.68,9.68,0,0,1-1.27,5.18,8.9,8.9,0,0,1-4,3.34l6.26,12.11Z%27 fill=%27%23fff%27/%3E%3C/svg%3E"},"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E":c=>{c.exports="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E"},"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E":c=>{c.exports="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E"},"./node_modules/super-three/build/three.module.js":(c,u,h)=>{h.r(u),h.d(u,{ACESFilmicToneMapping:()=>Ne,AddEquation:()=>z,AddOperation:()=>Vt,AdditiveAnimationBlendMode:()=>hr,AdditiveBlending:()=>P,AlphaFormat:()=>Le,AlwaysCompare:()=>Gm,AlwaysDepth:()=>Qt,AlwaysStencilFunc:()=>Mf,AmbientLight:()=>T2,AnimationAction:()=>j2,AnimationClip:()=>rp,AnimationLoader:()=>RN,AnimationMixer:()=>r5,AnimationObjectGroup:()=>n5,AnimationUtils:()=>MN,ArcCurve:()=>jM,ArrayCamera:()=>fx,ArrowHelper:()=>C5,AttachedBindMode:()=>De,Audio:()=>G2,AudioAnalyser:()=>QN,AudioContext:()=>Wx,AudioListener:()=>HN,AudioLoader:()=>zN,AxesHelper:()=>S5,BackSide:()=>T,BasicDepthPacking:()=>qo,BasicShadowMap:()=>x,Bone:()=>yx,BooleanKeyframeTrack:()=>bh,Box2:()=>d5,Box3:()=>er,Box3Helper:()=>w5,BoxGeometry:()=>fh,BoxHelper:()=>_5,BufferAttribute:()=>Sr,BufferGeometry:()=>Yi,BufferGeometryLoader:()=>P2,ByteType:()=>gn,Cache:()=>wh,Camera:()=>ug,CameraHelper:()=>b5,CanvasTexture:()=>qF,CapsuleGeometry:()=>Fg,CatmullRomCurve3:()=>WM,CineonToneMapping:()=>_e,CircleGeometry:()=>Ng,ClampToEdgeWrapping:()=>We,Clock:()=>U2,Color:()=>Hn,ColorKeyframeTrack:()=>kx,ColorManagement:()=>vr,CompressedArrayTexture:()=>XF,CompressedCubeTexture:()=>KF,CompressedTexture:()=>Lg,CompressedTextureLoader:()=>IN,ConeGeometry:()=>Ug,ConstantAlphaFactor:()=>Ze,ConstantColorFactor:()=>gt,CubeCamera:()=>Nw,CubeReflectionMapping:()=>Qe,CubeRefractionMapping:()=>ne,CubeTexture:()=>Uf,CubeTextureLoader:()=>BN,CubeUVReflectionMapping:()=>he,CubicBezierCurve:()=>Sx,CubicBezierCurve3:()=>XM,CubicInterpolant:()=>A2,CullFaceBack:()=>g,CullFaceFront:()=>v,CullFaceFrontBack:()=>b,CullFaceNone:()=>A,Curve:()=>pa,CurvePath:()=>qM,CustomBlending:()=>J,CustomToneMapping:()=>ye,CylinderGeometry:()=>Hu,Cylindrical:()=>u5,Data3DTexture:()=>Pi,DataArrayTexture:()=>yu,DataTexture:()=>zu,DataTextureLoader:()=>LN,DataUtils:()=>LP,DecrementStencilOp:()=>hy,DecrementWrapStencilOp:()=>dy,DefaultLoadingManager:()=>x2,DepthFormat:()=>be,DepthStencilFormat:()=>Ve,DepthTexture:()=>mM,DetachedBindMode:()=>ke,DirectionalLight:()=>S2,DirectionalLightHelper:()=>E5,DiscreteInterpolant:()=>v2,DisplayP3ColorSpace:()=>fu,DodecahedronGeometry:()=>kg,DoubleSide:()=>L,DstAlphaFactor:()=>Ce,DstColorFactor:()=>Oe,DynamicCopyUsage:()=>Sy,DynamicDrawUsage:()=>Ey,DynamicReadUsage:()=>wy,EdgesGeometry:()=>YM,EllipseCurve:()=>Pg,EqualCompare:()=>Fm,EqualDepth:()=>vn,EqualStencilFunc:()=>gy,EquirectangularReflectionMapping:()=>W,EquirectangularRefractionMapping:()=>k,Euler:()=>Df,EventDispatcher:()=>to,ExtrudeGeometry:()=>Qg,FileLoader:()=>gl,Float16BufferAttribute:()=>UP,Float32BufferAttribute:()=>ni,Float64BufferAttribute:()=>kP,FloatType:()=>Ei,Fog:()=>xg,FogExp2:()=>yg,FramebufferTexture:()=>QF,FrontSide:()=>C,Frustum:()=>fg,GLBufferAttribute:()=>l5,GLSL1:()=>Ry,GLSL3:()=>Cf,GreaterCompare:()=>Um,GreaterDepth:()=>Te,GreaterEqualCompare:()=>zm,GreaterEqualDepth:()=>Fe,GreaterEqualStencilFunc:()=>xy,GreaterStencilFunc:()=>vy,GridHelper:()=>y5,Group:()=>Ah,HalfFloatType:()=>Fi,HemisphereLight:()=>E2,HemisphereLightHelper:()=>v5,IcosahedronGeometry:()=>Xg,ImageBitmapLoader:()=>kN,ImageLoader:()=>sp,ImageUtils:()=>cl,IncrementStencilOp:()=>cy,IncrementWrapStencilOp:()=>uy,InstancedBufferAttribute:()=>Gu,InstancedBufferGeometry:()=>L2,InstancedInterleavedBuffer:()=>a5,InstancedMesh:()=>DM,Int16BufferAttribute:()=>FP,Int32BufferAttribute:()=>NP,Int8BufferAttribute:()=>PP,IntType:()=>Jn,InterleavedBuffer:()=>Eg,InterleavedBufferAttribute:()=>vh,Interpolant:()=>tp,InterpolateDiscrete:()=>Vn,InterpolateLinear:()=>Wn,InterpolateSmooth:()=>Nn,InvertStencilOp:()=>fy,KeepStencilOp:()=>ol,KeyframeTrack:()=>ma,LOD:()=>wM,LatheGeometry:()=>qf,Layers:()=>Jm,LessCompare:()=>Om,LessDepth:()=>Xt,LessEqualCompare:()=>Nm,LessEqualDepth:()=>Tn,LessEqualStencilFunc:()=>Ay,LessStencilFunc:()=>my,Light:()=>mc,LightProbe:()=>B2,Line:()=>fc,Line3:()=>f5,LineBasicMaterial:()=>oo,LineCurve:()=>Tx,LineCurve3:()=>KM,LineDashedMaterial:()=>p2,LineLoop:()=>zM,LineSegments:()=>qa,LinearDisplayP3ColorSpace:()=>ih,LinearEncoding:()=>eo,LinearFilter:()=>Bn,LinearInterpolant:()=>Ux,LinearMipMapLinearFilter:()=>sn,LinearMipMapNearestFilter:()=>Ri,LinearMipmapLinearFilter:()=>Fn,LinearMipmapNearestFilter:()=>pi,LinearSRGBColorSpace:()=>pr,LinearToneMapping:()=>mt,LinearTransfer:()=>rh,Loader:()=>wo,LoaderUtils:()=>jx,LoadingManager:()=>zx,LoopOnce:()=>kt,LoopPingPong:()=>oi,LoopRepeat:()=>bn,LuminanceAlphaFormat:()=>de,LuminanceFormat:()=>yt,MOUSE:()=>f,Material:()=>js,MaterialLoader:()=>eA,MathUtils:()=>Hy,Matrix3:()=>Ui,Matrix4:()=>_i,MaxEquation:()=>te,Mesh:()=>Os,MeshBasicMaterial:()=>uc,MeshDepthMaterial:()=>ux,MeshDistanceMaterial:()=>dx,MeshLambertMaterial:()=>d2,MeshMatcapMaterial:()=>f2,MeshNormalMaterial:()=>u2,MeshPhongMaterial:()=>c2,MeshPhysicalMaterial:()=>l2,MeshStandardMaterial:()=>Ox,MeshToonMaterial:()=>h2,MinEquation:()=>H,MirroredRepeatWrapping:()=>ve,MixOperation:()=>zt,MultiplyBlending:()=>K,MultiplyOperation:()=>Nt,NearestFilter:()=>at,NearestMipMapLinearFilter:()=>$t,NearestMipMapNearestFilter:()=>Ct,NearestMipmapLinearFilter:()=>Pt,NearestMipmapNearestFilter:()=>At,NeverCompare:()=>Dm,NeverDepth:()=>Ft,NeverStencilFunc:()=>py,NoBlending:()=>F,NoColorSpace:()=>qr,NoToneMapping:()=>fn,NormalAnimationBlendMode:()=>Bi,NormalBlending:()=>D,NotEqualCompare:()=>km,NotEqualDepth:()=>pt,NotEqualStencilFunc:()=>yy,NumberKeyframeTrack:()=>np,Object3D:()=>mr,ObjectLoader:()=>NN,ObjectSpaceNormalMap:()=>ja,OctahedronGeometry:()=>Zf,OneFactor:()=>ee,OneMinusConstantAlphaFactor:()=>mn,OneMinusConstantColorFactor:()=>Tt,OneMinusDstAlphaFactor:()=>Je,OneMinusDstColorFactor:()=>$e,OneMinusSrcAlphaFactor:()=>me,OneMinusSrcColorFactor:()=>xe,OrthographicCamera:()=>mg,P3Primaries:()=>oh,PCFShadowMap:()=>E,PCFSoftShadowMap:()=>S,PMREMGenerator:()=>ax,Path:()=>Kf,PerspectiveCamera:()=>hs,Plane:()=>dc,PlaneGeometry:()=>kf,PlaneHelper:()=>M5,PointLight:()=>C2,PointLightHelper:()=>g5,Points:()=>VM,PointsMaterial:()=>Ex,PolarGridHelper:()=>x5,PolyhedronGeometry:()=>pc,PositionalAudio:()=>WN,PropertyBinding:()=>dr,PropertyMixer:()=>H2,QuadraticBezierCurve:()=>Rx,QuadraticBezierCurve3:()=>Ix,Quaternion:()=>Ti,QuaternionKeyframeTrack:()=>Wu,QuaternionLinearInterpolant:()=>y2,RED_GREEN_RGTC2_Format:()=>Yt,RED_RGTC1_Format:()=>xt,REVISION:()=>d,RGBADepthPacking:()=>Ha,RGBAFormat:()=>ht,RGBAIntegerFormat:()=>Zt,RGBA_ASTC_10x10_Format:()=>ae,RGBA_ASTC_10x5_Format:()=>Ue,RGBA_ASTC_10x6_Format:()=>Ke,RGBA_ASTC_10x8_Format:()=>ft,RGBA_ASTC_12x10_Format:()=>le,RGBA_ASTC_12x12_Format:()=>ce,RGBA_ASTC_4x4_Format:()=>Rn,RGBA_ASTC_5x4_Format:()=>Kn,RGBA_ASTC_5x5_Format:()=>zi,RGBA_ASTC_6x5_Format:()=>Si,RGBA_ASTC_6x6_Format:()=>Y,RGBA_ASTC_8x5_Format:()=>se,RGBA_ASTC_8x6_Format:()=>pe,RGBA_ASTC_8x8_Format:()=>we,RGBA_BPTC_Format:()=>ge,RGBA_ETC2_EAC_Format:()=>Rr,RGBA_PVRTC_2BPPV1_Format:()=>vi,RGBA_PVRTC_4BPPV1_Format:()=>Cn,RGBA_S3TC_DXT1_Format:()=>Lt,RGBA_S3TC_DXT3_Format:()=>Pn,RGBA_S3TC_DXT5_Format:()=>Dn,RGB_BPTC_SIGNED_Format:()=>Ae,RGB_BPTC_UNSIGNED_Format:()=>tt,RGB_ETC1_Format:()=>Zn,RGB_ETC2_Format:()=>nr,RGB_PVRTC_2BPPV1_Format:()=>di,RGB_PVRTC_4BPPV1_Format:()=>jn,RGB_S3TC_DXT1_Format:()=>Wt,RGFormat:()=>_t,RGIntegerFormat:()=>It,RawShaderMaterial:()=>a2,Ray:()=>Vs,Raycaster:()=>c5,Rec709Primaries:()=>sh,RectAreaLight:()=>R2,RedFormat:()=>dt,RedIntegerFormat:()=>ut,ReinhardToneMapping:()=>Ee,RenderTarget:()=>vu,RepeatWrapping:()=>Re,ReplaceStencilOp:()=>ly,ReverseSubtractEquation:()=>G,RingGeometry:()=>Kg,SIGNED_RED_GREEN_RGTC2_Format:()=>on,SIGNED_RED_RGTC1_Format:()=>Dt,SRGBColorSpace:()=>Cr,SRGBTransfer:()=>wr,Scene:()=>vM,ShaderChunk:()=>Wi,ShaderLib:()=>fa,ShaderMaterial:()=>Ka,ShadowMaterial:()=>o2,Shape:()=>yh,ShapeGeometry:()=>qg,ShapePath:()=>T5,ShapeUtils:()=>Ya,ShortType:()=>si,Skeleton:()=>Sg,SkeletonHelper:()=>m5,SkinnedMesh:()=>IM,Source:()=>Br,Sphere:()=>Eo,SphereGeometry:()=>ep,Spherical:()=>h5,SphericalHarmonics3:()=>I2,SplineCurve:()=>Bx,SpotLight:()=>w2,SpotLightHelper:()=>p5,Sprite:()=>bM,SpriteMaterial:()=>mx,SrcAlphaFactor:()=>Pe,SrcAlphaSaturateFactor:()=>nt,SrcColorFactor:()=>oe,StaticCopyUsage:()=>Cy,StaticDrawUsage:()=>ah,StaticReadUsage:()=>_y,StereoCamera:()=>GN,StreamCopyUsage:()=>Ty,StreamDrawUsage:()=>by,StreamReadUsage:()=>My,StringKeyframeTrack:()=>_h,SubtractEquation:()=>j,SubtractiveBlending:()=>U,TOUCH:()=>p,TangentSpaceNormalMap:()=>ks,TetrahedronGeometry:()=>Yg,Texture:()=>Ir,TextureLoader:()=>PN,TorusGeometry:()=>$g,TorusKnotGeometry:()=>Jg,Triangle:()=>bo,TriangleFanDrawMode:()=>bi,TriangleStripDrawMode:()=>Fr,TrianglesDrawMode:()=>Li,TubeGeometry:()=>Zg,TwoPassDoubleSide:()=>B,UVMapping:()=>Ye,Uint16BufferAttribute:()=>$y,Uint32BufferAttribute:()=>Jy,Uint8BufferAttribute:()=>DP,Uint8ClampedBufferAttribute:()=>OP,Uniform:()=>Kx,UniformsGroup:()=>o5,UniformsLib:()=>Un,UniformsUtils:()=>Fw,UnsignedByteType:()=>Rt,UnsignedInt248Type:()=>cr,UnsignedIntType:()=>$n,UnsignedShort4444Type:()=>Vi,UnsignedShort5551Type:()=>lr,UnsignedShortType:()=>Ln,VSMShadowMap:()=>M,Vector2:()=>en,Vector3:()=>je,Vector4:()=>ur,VectorKeyframeTrack:()=>ip,VideoTexture:()=>WF,WebGL1Renderer:()=>AM,WebGL3DRenderTarget:()=>ar,WebGLArrayRenderTarget:()=>qn,WebGLCoordinateSystem:()=>Yo,WebGLCubeRenderTarget:()=>Uw,WebGLMultipleRenderTargets:()=>bs,WebGLRenderTarget:()=>yo,WebGLRenderer:()=>gM,WebGLUtils:()=>hM,WebGPUCoordinateSystem:()=>lh,WireframeGeometry:()=>i2,WrapAroundEnding:()=>xi,ZeroCurvatureEnding:()=>ai,ZeroFactor:()=>Z,ZeroSlopeEnding:()=>li,ZeroStencilOp:()=>ay,_SRGBAFormat:()=>pu,createCanvasElement:()=>Wm,sRGBEncoding:()=>Kr});/** +/*# sourceMappingURL=data:application/json;base64,`.concat(btoa(unescape(encodeURIComponent(JSON.stringify(b))))," */")),p.styleTagTransform(g,f,p.options)}function h(f){if(f.parentNode===null)return!1;f.parentNode.removeChild(f)}function d(f){if(typeof document>"u")return{update:function(){},remove:function(){}};var p=f.insertStyleElement(f);return{update:function(g){u(p,f,g)},remove:function(){h(p)}}}c.exports=d},"./node_modules/style-loader/dist/runtime/styleTagTransform.js":c=>{function u(h,d){if(d.styleSheet)d.styleSheet.cssText=h;else{for(;d.firstChild;)d.removeChild(d.firstChild);d.appendChild(document.createTextNode(h))}}c.exports=u},"data:image/svg+xml,%3C%3Fxml version=%271.0%27 encoding=%27UTF-8%27 standalone=%27no%27%3F%3E%3Csvg width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27 version=%271.1%27 id=%27svg320%27 sodipodi:docname=%27fullscreen-aframe.svg%27 xml:space=%27preserve%27 inkscape:version=%271.2.1 %289c6d41e 2022-07-14%29%27 xmlns:inkscape=%27http://www.inkscape.org/namespaces/inkscape%27 xmlns:sodipodi=%27http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd%27 xmlns=%27http://www.w3.org/2000/svg%27 xmlns:svg=%27http://www.w3.org/2000/svg%27 xmlns:rdf=%27http://www.w3.org/1999/02/22-rdf-syntax-ns%23%27 xmlns:cc=%27http://creativecommons.org/ns%23%27 xmlns:dc=%27http://purl.org/dc/elements/1.1/%27%3E%3Cdefs id=%27defs324%27 /%3E%3Csodipodi:namedview id=%27namedview322%27 pagecolor=%27%23ffffff%27 bordercolor=%27%23000000%27 borderopacity=%270.25%27 inkscape:showpageshadow=%272%27 inkscape:pageopacity=%270.0%27 inkscape:pagecheckerboard=%270%27 inkscape:deskcolor=%27%23d1d1d1%27 showgrid=%27false%27 inkscape:zoom=%273.8064516%27 inkscape:cx=%2791.423729%27 inkscape:cy=%27-1.4449153%27 inkscape:window-width=%271440%27 inkscape:window-height=%27847%27 inkscape:window-x=%2732%27 inkscape:window-y=%2725%27 inkscape:window-maximized=%270%27 inkscape:current-layer=%27svg320%27 /%3E%3Ctitle id=%27title312%27%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M96 0H12A12 12 0 0 0 0 12V50A12 12 0 0 0 12 62H96a12 12 0 0 0 12-12V12A12 12 0 0 0 96 0Zm8 50a8 8 0 0 1-8 8H12a8 8 0 0 1-8-8V12a8 8 0 0 1 8-8H96a8 8 0 0 1 8 8Z%27 fill=%27%23fff%27 id=%27path314%27 style=%27fill:%23ffffff%27 /%3E%3Cg id=%27g356%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g358%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g360%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g362%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g364%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g366%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g368%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g370%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g372%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g374%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g376%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g378%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g380%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g382%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g384%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cmetadata id=%27metadata561%27%3E%3Crdf:RDF%3E%3Ccc:Work rdf:about=%27%27%3E%3Cdc:title%3Eaframe-armode-noborder-reduced-tracking%3C/dc:title%3E%3C/cc:Work%3E%3C/rdf:RDF%3E%3C/metadata%3E%3Cpath d=%27m 98.168511 40.083649 c 0 -1.303681 -0.998788 -2.358041 -2.239389 -2.358041 -1.230088 0.0031 -2.240892 1.05436 -2.240892 2.358041 v 4.881296 l -9.041661 -9.041662 c -0.874129 -0.875631 -2.288954 -0.875631 -3.16308 0 -0.874129 0.874126 -0.874129 2.293459 0 3.167585 l 8.995101 8.992101 h -4.858767 c -1.323206 0.0031 -2.389583 1.004796 -2.389583 2.239386 0 1.237598 1.066377 2.237888 2.389583 2.237888 h 10.154599 c 1.323206 0 2.388082 -0.998789 2.392587 -2.237888 -0.0044 -0.03305 -0.009 -0.05858 -0.0134 -0.09161 0.0046 -0.04207 0.0134 -0.08712 0.0134 -0.13066 V 40.085172 h -1.52e-4%27 id=%27path596%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 23.091002 35.921781 -9.026643 9.041662 v -4.881296 c 0 -1.303681 -1.009302 -2.355037 -2.242393 -2.358041 -1.237598 0 -2.237888 1.05436 -2.237888 2.358041 l -0.0031 10.016421 c 0 0.04356 0.01211 0.08862 0.0015 0.130659 -0.0031 0.03153 -0.009 0.05709 -0.01211 0.09161 0.0031 1.239099 1.069379 2.237888 2.391085 2.237888 h 10.156101 c 1.320202 0 2.388079 -1.000291 2.388079 -2.237888 0 -1.234591 -1.067877 -2.236383 -2.388079 -2.239387 h -4.858767 l 8.995101 -8.9921 c 0.871126 -0.874127 0.871126 -2.293459 0 -3.167586 -0.875628 -0.877132 -2.291957 -0.877132 -3.169087 -1.52e-4%27 id=%27path598%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 84.649572 25.978033 9.041662 -9.041664 v 4.881298 c 0 1.299176 1.010806 2.350532 2.240891 2.355037 1.240601 0 2.23939 -1.055861 2.23939 -2.355037 V 11.798242 c 0 -0.04356 -0.009 -0.08862 -0.0134 -0.127671 0.0044 -0.03153 0.009 -0.06157 0.0134 -0.09313 -0.0044 -1.240598 -1.069379 -2.2393873 -2.391085 -2.2393873 h -10.1546 c -1.323205 0 -2.38958 0.9987893 -2.38958 2.2393873 0 1.233091 1.066375 2.237887 2.38958 2.240891 h 4.858768 l -8.995102 8.9921 c -0.874129 0.872625 -0.874129 2.288954 0 3.161578 0.874127 0.880137 2.288951 0.880137 3.16308 1.5e-4%27 id=%27path600%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 17.264988 13.822853 h 4.857265 c 1.320202 -0.0031 2.388079 -1.0078 2.388079 -2.240889 0 -1.240601 -1.067877 -2.2393893 -2.388079 -2.2393893 H 11.967654 c -1.321707 0 -2.388082 0.9987883 -2.391085 2.2393893 0.0031 0.03153 0.009 0.06157 0.01211 0.09313 -0.0031 0.03905 -0.0015 0.08262 -0.0015 0.127671 l 0.0031 10.020926 c 0 1.299176 1.00029 2.355038 2.237887 2.355038 1.233092 -0.0044 2.242393 -1.055862 2.242393 -2.355038 v -4.881295 l 9.026644 9.041661 c 0.877132 0.878635 2.293459 0.878635 3.169087 0 0.871125 -0.872624 0.871125 -2.288953 0 -3.161577 l -8.995282 -8.993616%27 id=%27path602%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3C/svg%3E":c=>{c.exports="data:image/svg+xml,%3C%3Fxml version=%271.0%27 encoding=%27UTF-8%27 standalone=%27no%27%3F%3E%3Csvg width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27 version=%271.1%27 id=%27svg320%27 sodipodi:docname=%27fullscreen-aframe.svg%27 xml:space=%27preserve%27 inkscape:version=%271.2.1 %289c6d41e 2022-07-14%29%27 xmlns:inkscape=%27http://www.inkscape.org/namespaces/inkscape%27 xmlns:sodipodi=%27http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd%27 xmlns=%27http://www.w3.org/2000/svg%27 xmlns:svg=%27http://www.w3.org/2000/svg%27 xmlns:rdf=%27http://www.w3.org/1999/02/22-rdf-syntax-ns%23%27 xmlns:cc=%27http://creativecommons.org/ns%23%27 xmlns:dc=%27http://purl.org/dc/elements/1.1/%27%3E%3Cdefs id=%27defs324%27 /%3E%3Csodipodi:namedview id=%27namedview322%27 pagecolor=%27%23ffffff%27 bordercolor=%27%23000000%27 borderopacity=%270.25%27 inkscape:showpageshadow=%272%27 inkscape:pageopacity=%270.0%27 inkscape:pagecheckerboard=%270%27 inkscape:deskcolor=%27%23d1d1d1%27 showgrid=%27false%27 inkscape:zoom=%273.8064516%27 inkscape:cx=%2791.423729%27 inkscape:cy=%27-1.4449153%27 inkscape:window-width=%271440%27 inkscape:window-height=%27847%27 inkscape:window-x=%2732%27 inkscape:window-y=%2725%27 inkscape:window-maximized=%270%27 inkscape:current-layer=%27svg320%27 /%3E%3Ctitle id=%27title312%27%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M96 0H12A12 12 0 0 0 0 12V50A12 12 0 0 0 12 62H96a12 12 0 0 0 12-12V12A12 12 0 0 0 96 0Zm8 50a8 8 0 0 1-8 8H12a8 8 0 0 1-8-8V12a8 8 0 0 1 8-8H96a8 8 0 0 1 8 8Z%27 fill=%27%23fff%27 id=%27path314%27 style=%27fill:%23ffffff%27 /%3E%3Cg id=%27g356%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g358%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g360%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g362%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g364%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g366%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g368%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g370%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g372%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g374%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g376%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g378%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g380%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g382%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cg id=%27g384%27 transform=%27translate%28-206.61017 -232.61864%29%27%3E%3C/g%3E%3Cmetadata id=%27metadata561%27%3E%3Crdf:RDF%3E%3Ccc:Work rdf:about=%27%27%3E%3Cdc:title%3Eaframe-armode-noborder-reduced-tracking%3C/dc:title%3E%3C/cc:Work%3E%3C/rdf:RDF%3E%3C/metadata%3E%3Cpath d=%27m 98.168511 40.083649 c 0 -1.303681 -0.998788 -2.358041 -2.239389 -2.358041 -1.230088 0.0031 -2.240892 1.05436 -2.240892 2.358041 v 4.881296 l -9.041661 -9.041662 c -0.874129 -0.875631 -2.288954 -0.875631 -3.16308 0 -0.874129 0.874126 -0.874129 2.293459 0 3.167585 l 8.995101 8.992101 h -4.858767 c -1.323206 0.0031 -2.389583 1.004796 -2.389583 2.239386 0 1.237598 1.066377 2.237888 2.389583 2.237888 h 10.154599 c 1.323206 0 2.388082 -0.998789 2.392587 -2.237888 -0.0044 -0.03305 -0.009 -0.05858 -0.0134 -0.09161 0.0046 -0.04207 0.0134 -0.08712 0.0134 -0.13066 V 40.085172 h -1.52e-4%27 id=%27path596%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 23.091002 35.921781 -9.026643 9.041662 v -4.881296 c 0 -1.303681 -1.009302 -2.355037 -2.242393 -2.358041 -1.237598 0 -2.237888 1.05436 -2.237888 2.358041 l -0.0031 10.016421 c 0 0.04356 0.01211 0.08862 0.0015 0.130659 -0.0031 0.03153 -0.009 0.05709 -0.01211 0.09161 0.0031 1.239099 1.069379 2.237888 2.391085 2.237888 h 10.156101 c 1.320202 0 2.388079 -1.000291 2.388079 -2.237888 0 -1.234591 -1.067877 -2.236383 -2.388079 -2.239387 h -4.858767 l 8.995101 -8.9921 c 0.871126 -0.874127 0.871126 -2.293459 0 -3.167586 -0.875628 -0.877132 -2.291957 -0.877132 -3.169087 -1.52e-4%27 id=%27path598%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 84.649572 25.978033 9.041662 -9.041664 v 4.881298 c 0 1.299176 1.010806 2.350532 2.240891 2.355037 1.240601 0 2.23939 -1.055861 2.23939 -2.355037 V 11.798242 c 0 -0.04356 -0.009 -0.08862 -0.0134 -0.127671 0.0044 -0.03153 0.009 -0.06157 0.0134 -0.09313 -0.0044 -1.240598 -1.069379 -2.2393873 -2.391085 -2.2393873 h -10.1546 c -1.323205 0 -2.38958 0.9987893 -2.38958 2.2393873 0 1.233091 1.066375 2.237887 2.38958 2.240891 h 4.858768 l -8.995102 8.9921 c -0.874129 0.872625 -0.874129 2.288954 0 3.161578 0.874127 0.880137 2.288951 0.880137 3.16308 1.5e-4%27 id=%27path600%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3Cpath d=%27m 17.264988 13.822853 h 4.857265 c 1.320202 -0.0031 2.388079 -1.0078 2.388079 -2.240889 0 -1.240601 -1.067877 -2.2393893 -2.388079 -2.2393893 H 11.967654 c -1.321707 0 -2.388082 0.9987883 -2.391085 2.2393893 0.0031 0.03153 0.009 0.06157 0.01211 0.09313 -0.0031 0.03905 -0.0015 0.08262 -0.0015 0.127671 l 0.0031 10.020926 c 0 1.299176 1.00029 2.355038 2.237887 2.355038 1.233092 -0.0044 2.242393 -1.055862 2.242393 -2.355038 v -4.881295 l 9.026644 9.041661 c 0.877132 0.878635 2.293459 0.878635 3.169087 0 0.871125 -0.872624 0.871125 -2.288953 0 -3.161577 l -8.995282 -8.993616%27 id=%27path602%27 style=%27fill:%23ffffff%3Bstroke-width:1.50194%27 /%3E%3C/svg%3E"},"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.33,5.12,9.09,9.09,0,0,1-4,3.26l6.49,12.26V46H73.73Zm-4.93-5h5a5.09,5.09,0,0,0,3.6-1.18,4.21,4.21,0,0,0,1.28-3.27,4.56,4.56,0,0,0-1.2-3.34A5,5,0,0,0,68.15,21h-5Z%27 fill=%27%23fff%27/%3E%3C/svg%3E":c=>{c.exports="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27%3E%3Ctitle%3Eaframe-armode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0Zm8,50a8,8,0,0,1-8,8H12a8,8,0,0,1-8-8V12a8,8,0,0,1,8-8H96a8,8,0,0,1,8,8Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M43.35,39.82H32.51L30.45,46H23.88L35,16h5.73L52,46H45.43Zm-9.17-5h7.5L37.91,23.58Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M68.11,35H63.18V46H57V16H68.15q5.31,0,8.2,2.37a8.18,8.18,0,0,1,2.88,6.7,9.22,9.22,0,0,1-1.33,5.12,9.09,9.09,0,0,1-4,3.26l6.49,12.26V46H73.73Zm-4.93-5h5a5.09,5.09,0,0,0,3.6-1.18,4.21,4.21,0,0,0,1.28-3.27,4.56,4.56,0,0,0-1.2-3.34A5,5,0,0,0,68.15,21h-5Z%27 fill=%27%23fff%27/%3E%3C/svg%3E"},"data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27%3E%3Ctitle%3Eaframe-vrmode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M68.81,21.56H64.23v8.27h4.58a4.13,4.13,0,0,0,3.1-1.09,4.2,4.2,0,0,0,1-3,4.24,4.24,0,0,0-1-3A4.05,4.05,0,0,0,68.81,21.56Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0ZM41.9,46H34L24,16h8l6,21.84,6-21.84H52Zm39.29,0H73.44L68.15,35.39H64.23V46H57V16H68.81q5.32,0,8.34,2.37a8,8,0,0,1,3,6.69,9.68,9.68,0,0,1-1.27,5.18,8.9,8.9,0,0,1-4,3.34l6.26,12.11Z%27 fill=%27%23fff%27/%3E%3C/svg%3E":c=>{c.exports="data:image/svg+xml,%3Csvg xmlns=%27http://www.w3.org/2000/svg%27 width=%27108%27 height=%2762%27 viewBox=%270 0 108 62%27%3E%3Ctitle%3Eaframe-vrmode-noborder-reduced-tracking%3C/title%3E%3Cpath d=%27M68.81,21.56H64.23v8.27h4.58a4.13,4.13,0,0,0,3.1-1.09,4.2,4.2,0,0,0,1-3,4.24,4.24,0,0,0-1-3A4.05,4.05,0,0,0,68.81,21.56Z%27 fill=%27%23fff%27/%3E%3Cpath d=%27M96,0H12A12,12,0,0,0,0,12V50A12,12,0,0,0,12,62H96a12,12,0,0,0,12-12V12A12,12,0,0,0,96,0ZM41.9,46H34L24,16h8l6,21.84,6-21.84H52Zm39.29,0H73.44L68.15,35.39H64.23V46H57V16H68.81q5.32,0,8.34,2.37a8,8,0,0,1,3,6.69,9.68,9.68,0,0,1-1.27,5.18,8.9,8.9,0,0,1-4,3.34l6.26,12.11Z%27 fill=%27%23fff%27/%3E%3C/svg%3E"},"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E":c=>{c.exports="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%20100%20100%22%20enable-background%3D%22new%200%200%20100%20100%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpath%20fill%3D%22%23000000%22%20d%3D%22M55.209%2C50l17.803-17.803c1.416-1.416%2C1.416-3.713%2C0-5.129c-1.416-1.417-3.713-1.417-5.129%2C0L50.08%2C44.872%20%20L32.278%2C27.069c-1.416-1.417-3.714-1.417-5.129%2C0c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129L44.951%2C50L27.149%2C67.803%20%20c-1.417%2C1.416-1.417%2C3.713%2C0%2C5.129c0.708%2C0.708%2C1.636%2C1.062%2C2.564%2C1.062c0.928%2C0%2C1.856-0.354%2C2.564-1.062L50.08%2C55.13l17.803%2C17.802%20%20c0.708%2C0.708%2C1.637%2C1.062%2C2.564%2C1.062s1.856-0.354%2C2.564-1.062c1.416-1.416%2C1.416-3.713%2C0-5.129L55.209%2C50z%22%3E%3C/path%3E%3C/svg%3E"},"data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E":c=>{c.exports="data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A//www.w3.org/2000/svg%22%20xmlns%3Axlink%3D%22http%3A//www.w3.org/1999/xlink%22%20version%3D%221.1%22%20x%3D%220px%22%20y%3D%220px%22%20viewBox%3D%220%200%2090%2090%22%20enable-background%3D%22new%200%200%2090%2090%22%20xml%3Aspace%3D%22preserve%22%3E%3Cpolygon%20points%3D%220%2C0%200%2C0%200%2C0%20%22%3E%3C/polygon%3E%3Cg%3E%3Cpath%20d%3D%22M71.545%2C48.145h-31.98V20.743c0-2.627-2.138-4.765-4.765-4.765H18.456c-2.628%2C0-4.767%2C2.138-4.767%2C4.765v42.789%20%20%20c0%2C2.628%2C2.138%2C4.766%2C4.767%2C4.766h5.535v0.959c0%2C2.628%2C2.138%2C4.765%2C4.766%2C4.765h42.788c2.628%2C0%2C4.766-2.137%2C4.766-4.765V52.914%20%20%20C76.311%2C50.284%2C74.173%2C48.145%2C71.545%2C48.145z%20M18.455%2C16.935h16.344c2.1%2C0%2C3.808%2C1.708%2C3.808%2C3.808v27.401H37.25V22.636%20%20%20c0-0.264-0.215-0.478-0.479-0.478H16.482c-0.264%2C0-0.479%2C0.214-0.479%2C0.478v36.585c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h7.507v7.644%20%20%20h-5.534c-2.101%2C0-3.81-1.709-3.81-3.81V20.743C14.645%2C18.643%2C16.354%2C16.935%2C18.455%2C16.935z%20M16.96%2C23.116h19.331v25.031h-7.535%20%20%20c-2.628%2C0-4.766%2C2.139-4.766%2C4.768v5.828h-7.03V23.116z%20M71.545%2C73.064H28.757c-2.101%2C0-3.81-1.708-3.81-3.808V52.914%20%20%20c0-2.102%2C1.709-3.812%2C3.81-3.812h42.788c2.1%2C0%2C3.809%2C1.71%2C3.809%2C3.812v16.343C75.354%2C71.356%2C73.645%2C73.064%2C71.545%2C73.064z%22%3E%3C/path%3E%3Cpath%20d%3D%22M28.919%2C58.424c-1.466%2C0-2.659%2C1.193-2.659%2C2.66c0%2C1.466%2C1.193%2C2.658%2C2.659%2C2.658c1.468%2C0%2C2.662-1.192%2C2.662-2.658%20%20%20C31.581%2C59.617%2C30.387%2C58.424%2C28.919%2C58.424z%20M28.919%2C62.786c-0.939%2C0-1.703-0.764-1.703-1.702c0-0.939%2C0.764-1.704%2C1.703-1.704%20%20%20c0.94%2C0%2C1.705%2C0.765%2C1.705%2C1.704C30.623%2C62.022%2C29.858%2C62.786%2C28.919%2C62.786z%22%3E%3C/path%3E%3Cpath%20d%3D%22M69.654%2C50.461H33.069c-0.264%2C0-0.479%2C0.215-0.479%2C0.479v20.288c0%2C0.264%2C0.215%2C0.478%2C0.479%2C0.478h36.585%20%20%20c0.263%2C0%2C0.477-0.214%2C0.477-0.478V50.939C70.131%2C50.676%2C69.917%2C50.461%2C69.654%2C50.461z%20M69.174%2C51.417V70.75H33.548V51.417H69.174z%22%3E%3C/path%3E%3Cpath%20d%3D%22M45.201%2C30.296c6.651%2C0%2C12.233%2C5.351%2C12.551%2C11.977l-3.033-2.638c-0.193-0.165-0.507-0.142-0.675%2C0.048%20%20%20c-0.174%2C0.198-0.153%2C0.501%2C0.045%2C0.676l3.883%2C3.375c0.09%2C0.075%2C0.198%2C0.115%2C0.312%2C0.115c0.141%2C0%2C0.273-0.061%2C0.362-0.166%20%20%20l3.371-3.877c0.173-0.2%2C0.151-0.502-0.047-0.675c-0.194-0.166-0.508-0.144-0.676%2C0.048l-2.592%2C2.979%20%20%20c-0.18-3.417-1.629-6.605-4.099-9.001c-2.538-2.461-5.877-3.817-9.404-3.817c-0.264%2C0-0.479%2C0.215-0.479%2C0.479%20%20%20C44.72%2C30.083%2C44.936%2C30.296%2C45.201%2C30.296z%22%3E%3C/path%3E%3C/g%3E%3C/svg%3E"},"./node_modules/super-three/build/three.module.js":(c,u,h)=>{h.r(u),h.d(u,{ACESFilmicToneMapping:()=>Ne,AddEquation:()=>z,AddOperation:()=>Vt,AdditiveAnimationBlendMode:()=>hr,AdditiveBlending:()=>P,AlphaFormat:()=>Le,AlwaysCompare:()=>Gm,AlwaysDepth:()=>Qt,AlwaysStencilFunc:()=>Mf,AmbientLight:()=>R2,AnimationAction:()=>W2,AnimationClip:()=>rp,AnimationLoader:()=>RN,AnimationMixer:()=>r5,AnimationObjectGroup:()=>n5,AnimationUtils:()=>MN,ArcCurve:()=>WM,ArrayCamera:()=>px,ArrowHelper:()=>C5,AttachedBindMode:()=>De,Audio:()=>V2,AudioAnalyser:()=>QN,AudioContext:()=>Qx,AudioListener:()=>HN,AudioLoader:()=>zN,AxesHelper:()=>S5,BackSide:()=>T,BasicDepthPacking:()=>qo,BasicShadowMap:()=>x,Bone:()=>xx,BooleanKeyframeTrack:()=>bh,Box2:()=>d5,Box3:()=>er,Box3Helper:()=>w5,BoxGeometry:()=>fh,BoxHelper:()=>_5,BufferAttribute:()=>Sr,BufferGeometry:()=>Yi,BufferGeometryLoader:()=>D2,ByteType:()=>gn,Cache:()=>wh,Camera:()=>ug,CameraHelper:()=>b5,CanvasTexture:()=>qF,CapsuleGeometry:()=>Fg,CatmullRomCurve3:()=>QM,CineonToneMapping:()=>_e,CircleGeometry:()=>Ng,ClampToEdgeWrapping:()=>We,Clock:()=>k2,Color:()=>Hn,ColorKeyframeTrack:()=>zx,ColorManagement:()=>vr,CompressedArrayTexture:()=>XF,CompressedCubeTexture:()=>KF,CompressedTexture:()=>Lg,CompressedTextureLoader:()=>IN,ConeGeometry:()=>Ug,ConstantAlphaFactor:()=>Ze,ConstantColorFactor:()=>gt,CubeCamera:()=>Uw,CubeReflectionMapping:()=>Qe,CubeRefractionMapping:()=>ne,CubeTexture:()=>Uf,CubeTextureLoader:()=>BN,CubeUVReflectionMapping:()=>he,CubicBezierCurve:()=>Tx,CubicBezierCurve3:()=>KM,CubicInterpolant:()=>v2,CullFaceBack:()=>g,CullFaceFront:()=>v,CullFaceFrontBack:()=>b,CullFaceNone:()=>A,Curve:()=>pa,CurvePath:()=>YM,CustomBlending:()=>J,CustomToneMapping:()=>ye,CylinderGeometry:()=>Hu,Cylindrical:()=>u5,Data3DTexture:()=>Pi,DataArrayTexture:()=>yu,DataTexture:()=>zu,DataTextureLoader:()=>LN,DataUtils:()=>LP,DecrementStencilOp:()=>uy,DecrementWrapStencilOp:()=>fy,DefaultLoadingManager:()=>E2,DepthFormat:()=>be,DepthStencilFormat:()=>Ve,DepthTexture:()=>gM,DetachedBindMode:()=>ke,DirectionalLight:()=>T2,DirectionalLightHelper:()=>E5,DiscreteInterpolant:()=>y2,DisplayP3ColorSpace:()=>fu,DodecahedronGeometry:()=>kg,DoubleSide:()=>L,DstAlphaFactor:()=>Ce,DstColorFactor:()=>Oe,DynamicCopyUsage:()=>Ty,DynamicDrawUsage:()=>by,DynamicReadUsage:()=>My,EdgesGeometry:()=>$M,EllipseCurve:()=>Pg,EqualCompare:()=>Fm,EqualDepth:()=>vn,EqualStencilFunc:()=>Ay,EquirectangularReflectionMapping:()=>W,EquirectangularRefractionMapping:()=>k,Euler:()=>Df,EventDispatcher:()=>to,ExtrudeGeometry:()=>Qg,FileLoader:()=>gl,Float16BufferAttribute:()=>UP,Float32BufferAttribute:()=>ni,Float64BufferAttribute:()=>kP,FloatType:()=>Ei,Fog:()=>xg,FogExp2:()=>yg,FramebufferTexture:()=>QF,FrontSide:()=>C,Frustum:()=>fg,GLBufferAttribute:()=>l5,GLSL1:()=>Iy,GLSL3:()=>Cf,GreaterCompare:()=>Um,GreaterDepth:()=>Te,GreaterEqualCompare:()=>zm,GreaterEqualDepth:()=>Fe,GreaterEqualStencilFunc:()=>Ey,GreaterStencilFunc:()=>yy,GridHelper:()=>y5,Group:()=>Ah,HalfFloatType:()=>Fi,HemisphereLight:()=>b2,HemisphereLightHelper:()=>v5,IcosahedronGeometry:()=>Xg,ImageBitmapLoader:()=>kN,ImageLoader:()=>sp,ImageUtils:()=>cl,IncrementStencilOp:()=>hy,IncrementWrapStencilOp:()=>dy,InstancedBufferAttribute:()=>Gu,InstancedBufferGeometry:()=>P2,InstancedInterleavedBuffer:()=>a5,InstancedMesh:()=>OM,Int16BufferAttribute:()=>FP,Int32BufferAttribute:()=>NP,Int8BufferAttribute:()=>PP,IntType:()=>Jn,InterleavedBuffer:()=>Eg,InterleavedBufferAttribute:()=>vh,Interpolant:()=>tp,InterpolateDiscrete:()=>Vn,InterpolateLinear:()=>Wn,InterpolateSmooth:()=>Nn,InvertStencilOp:()=>py,KeepStencilOp:()=>ol,KeyframeTrack:()=>ma,LOD:()=>MM,LatheGeometry:()=>qf,Layers:()=>Jm,LessCompare:()=>Om,LessDepth:()=>Xt,LessEqualCompare:()=>Nm,LessEqualDepth:()=>Tn,LessEqualStencilFunc:()=>vy,LessStencilFunc:()=>gy,Light:()=>mc,LightProbe:()=>L2,Line:()=>fc,Line3:()=>f5,LineBasicMaterial:()=>oo,LineCurve:()=>Rx,LineCurve3:()=>qM,LineDashedMaterial:()=>m2,LineLoop:()=>GM,LineSegments:()=>qa,LinearDisplayP3ColorSpace:()=>ih,LinearEncoding:()=>eo,LinearFilter:()=>Bn,LinearInterpolant:()=>kx,LinearMipMapLinearFilter:()=>sn,LinearMipMapNearestFilter:()=>Ri,LinearMipmapLinearFilter:()=>Fn,LinearMipmapNearestFilter:()=>pi,LinearSRGBColorSpace:()=>pr,LinearToneMapping:()=>mt,LinearTransfer:()=>rh,Loader:()=>wo,LoaderUtils:()=>Wx,LoadingManager:()=>Gx,LoopOnce:()=>kt,LoopPingPong:()=>oi,LoopRepeat:()=>bn,LuminanceAlphaFormat:()=>de,LuminanceFormat:()=>yt,MOUSE:()=>f,Material:()=>js,MaterialLoader:()=>eA,MathUtils:()=>jy,Matrix3:()=>Ui,Matrix4:()=>_i,MaxEquation:()=>te,Mesh:()=>Os,MeshBasicMaterial:()=>uc,MeshDepthMaterial:()=>dx,MeshDistanceMaterial:()=>fx,MeshLambertMaterial:()=>f2,MeshMatcapMaterial:()=>p2,MeshNormalMaterial:()=>d2,MeshPhongMaterial:()=>h2,MeshPhysicalMaterial:()=>c2,MeshStandardMaterial:()=>Fx,MeshToonMaterial:()=>u2,MinEquation:()=>H,MirroredRepeatWrapping:()=>ve,MixOperation:()=>zt,MultiplyBlending:()=>K,MultiplyOperation:()=>Nt,NearestFilter:()=>at,NearestMipMapLinearFilter:()=>$t,NearestMipMapNearestFilter:()=>Ct,NearestMipmapLinearFilter:()=>Pt,NearestMipmapNearestFilter:()=>At,NeverCompare:()=>Dm,NeverDepth:()=>Ft,NeverStencilFunc:()=>my,NoBlending:()=>F,NoColorSpace:()=>qr,NoToneMapping:()=>fn,NormalAnimationBlendMode:()=>Bi,NormalBlending:()=>D,NotEqualCompare:()=>km,NotEqualDepth:()=>pt,NotEqualStencilFunc:()=>xy,NumberKeyframeTrack:()=>np,Object3D:()=>mr,ObjectLoader:()=>NN,ObjectSpaceNormalMap:()=>ja,OctahedronGeometry:()=>Zf,OneFactor:()=>ee,OneMinusConstantAlphaFactor:()=>mn,OneMinusConstantColorFactor:()=>Tt,OneMinusDstAlphaFactor:()=>Je,OneMinusDstColorFactor:()=>$e,OneMinusSrcAlphaFactor:()=>me,OneMinusSrcColorFactor:()=>xe,OrthographicCamera:()=>mg,P3Primaries:()=>oh,PCFShadowMap:()=>E,PCFSoftShadowMap:()=>S,PMREMGenerator:()=>lx,Path:()=>Kf,PerspectiveCamera:()=>hs,Plane:()=>dc,PlaneGeometry:()=>kf,PlaneHelper:()=>M5,PointLight:()=>S2,PointLightHelper:()=>g5,Points:()=>HM,PointsMaterial:()=>bx,PolarGridHelper:()=>x5,PolyhedronGeometry:()=>pc,PositionalAudio:()=>WN,PropertyBinding:()=>dr,PropertyMixer:()=>j2,QuadraticBezierCurve:()=>Ix,QuadraticBezierCurve3:()=>Bx,Quaternion:()=>Ti,QuaternionKeyframeTrack:()=>Wu,QuaternionLinearInterpolant:()=>x2,RED_GREEN_RGTC2_Format:()=>Yt,RED_RGTC1_Format:()=>xt,REVISION:()=>d,RGBADepthPacking:()=>Ha,RGBAFormat:()=>ht,RGBAIntegerFormat:()=>Zt,RGBA_ASTC_10x10_Format:()=>ae,RGBA_ASTC_10x5_Format:()=>Ue,RGBA_ASTC_10x6_Format:()=>Ke,RGBA_ASTC_10x8_Format:()=>ft,RGBA_ASTC_12x10_Format:()=>le,RGBA_ASTC_12x12_Format:()=>ce,RGBA_ASTC_4x4_Format:()=>Rn,RGBA_ASTC_5x4_Format:()=>Kn,RGBA_ASTC_5x5_Format:()=>zi,RGBA_ASTC_6x5_Format:()=>Si,RGBA_ASTC_6x6_Format:()=>Y,RGBA_ASTC_8x5_Format:()=>se,RGBA_ASTC_8x6_Format:()=>pe,RGBA_ASTC_8x8_Format:()=>we,RGBA_BPTC_Format:()=>ge,RGBA_ETC2_EAC_Format:()=>Rr,RGBA_PVRTC_2BPPV1_Format:()=>vi,RGBA_PVRTC_4BPPV1_Format:()=>Cn,RGBA_S3TC_DXT1_Format:()=>Lt,RGBA_S3TC_DXT3_Format:()=>Pn,RGBA_S3TC_DXT5_Format:()=>Dn,RGB_BPTC_SIGNED_Format:()=>Ae,RGB_BPTC_UNSIGNED_Format:()=>tt,RGB_ETC1_Format:()=>Zn,RGB_ETC2_Format:()=>nr,RGB_PVRTC_2BPPV1_Format:()=>di,RGB_PVRTC_4BPPV1_Format:()=>jn,RGB_S3TC_DXT1_Format:()=>Wt,RGFormat:()=>_t,RGIntegerFormat:()=>It,RawShaderMaterial:()=>l2,Ray:()=>Vs,Raycaster:()=>c5,Rec709Primaries:()=>sh,RectAreaLight:()=>I2,RedFormat:()=>dt,RedIntegerFormat:()=>ut,ReinhardToneMapping:()=>Ee,RenderTarget:()=>vu,RepeatWrapping:()=>Re,ReplaceStencilOp:()=>cy,ReverseSubtractEquation:()=>G,RingGeometry:()=>Kg,SIGNED_RED_GREEN_RGTC2_Format:()=>on,SIGNED_RED_RGTC1_Format:()=>Dt,SRGBColorSpace:()=>Cr,SRGBTransfer:()=>wr,Scene:()=>yM,ShaderChunk:()=>Wi,ShaderLib:()=>fa,ShaderMaterial:()=>Ka,ShadowMaterial:()=>a2,Shape:()=>yh,ShapeGeometry:()=>qg,ShapePath:()=>T5,ShapeUtils:()=>Ya,ShortType:()=>si,Skeleton:()=>Sg,SkeletonHelper:()=>m5,SkinnedMesh:()=>BM,Source:()=>Br,Sphere:()=>Eo,SphereGeometry:()=>ep,Spherical:()=>h5,SphericalHarmonics3:()=>B2,SplineCurve:()=>Lx,SpotLight:()=>M2,SpotLightHelper:()=>p5,Sprite:()=>_M,SpriteMaterial:()=>gx,SrcAlphaFactor:()=>Pe,SrcAlphaSaturateFactor:()=>nt,SrcColorFactor:()=>oe,StaticCopyUsage:()=>Sy,StaticDrawUsage:()=>ah,StaticReadUsage:()=>wy,StereoCamera:()=>GN,StreamCopyUsage:()=>Ry,StreamDrawUsage:()=>_y,StreamReadUsage:()=>Cy,StringKeyframeTrack:()=>_h,SubtractEquation:()=>j,SubtractiveBlending:()=>U,TOUCH:()=>p,TangentSpaceNormalMap:()=>ks,TetrahedronGeometry:()=>Yg,Texture:()=>Ir,TextureLoader:()=>PN,TorusGeometry:()=>$g,TorusKnotGeometry:()=>Jg,Triangle:()=>bo,TriangleFanDrawMode:()=>bi,TriangleStripDrawMode:()=>Fr,TrianglesDrawMode:()=>Li,TubeGeometry:()=>Zg,TwoPassDoubleSide:()=>B,UVMapping:()=>Ye,Uint16BufferAttribute:()=>Jy,Uint32BufferAttribute:()=>Zy,Uint8BufferAttribute:()=>DP,Uint8ClampedBufferAttribute:()=>OP,Uniform:()=>qx,UniformsGroup:()=>o5,UniformsLib:()=>Un,UniformsUtils:()=>Nw,UnsignedByteType:()=>Rt,UnsignedInt248Type:()=>cr,UnsignedIntType:()=>$n,UnsignedShort4444Type:()=>Vi,UnsignedShort5551Type:()=>lr,UnsignedShortType:()=>Ln,VSMShadowMap:()=>M,Vector2:()=>en,Vector3:()=>je,Vector4:()=>ur,VectorKeyframeTrack:()=>ip,VideoTexture:()=>WF,WebGL1Renderer:()=>vM,WebGL3DRenderTarget:()=>ar,WebGLArrayRenderTarget:()=>qn,WebGLCoordinateSystem:()=>Yo,WebGLCubeRenderTarget:()=>kw,WebGLMultipleRenderTargets:()=>bs,WebGLRenderTarget:()=>yo,WebGLRenderer:()=>AM,WebGLUtils:()=>uM,WebGPUCoordinateSystem:()=>lh,WireframeGeometry:()=>r2,WrapAroundEnding:()=>xi,ZeroCurvatureEnding:()=>ai,ZeroFactor:()=>Z,ZeroSlopeEnding:()=>li,ZeroStencilOp:()=>ly,_SRGBAFormat:()=>pu,createCanvasElement:()=>Wm,sRGBEncoding:()=>Kr});/** * @license * Copyright 2010-2023 Three.js Authors * SPDX-License-Identifier: MIT - */const d="158",f={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},p={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},A=0,g=1,v=2,b=3,x=0,E=1,S=2,M=3,C=0,T=1,L=2,B=2,F=0,D=1,P=2,U=3,K=4,J=5,z=100,j=101,G=102,H=103,te=104,Z=200,ee=201,oe=202,xe=203,Pe=204,me=205,Ce=206,Je=207,Oe=208,$e=209,nt=210,gt=211,Tt=212,Ze=213,mn=214,Ft=0,Qt=1,Xt=2,Tn=3,vn=4,Fe=5,Te=6,pt=7,Nt=0,zt=1,Vt=2,fn=0,mt=1,Ee=2,_e=3,Ne=4,ye=5,De="attached",ke="detached",Ye=300,Qe=301,ne=302,W=303,k=304,he=306,Re=1e3,We=1001,ve=1002,at=1003,At=1004,Ct=1004,Pt=1005,$t=1005,Bn=1006,pi=1007,Ri=1007,Fn=1008,sn=1008,Rt=1009,gn=1010,si=1011,Ln=1012,Jn=1013,$n=1014,Ei=1015,Fi=1016,Vi=1017,lr=1018,cr=1020,Le=1021,ht=1023,yt=1024,de=1025,be=1026,Ve=1027,dt=1028,ut=1029,_t=1030,It=1031,Zt=1033,Wt=33776,Lt=33777,Pn=33778,Dn=33779,jn=35840,di=35841,Cn=35842,vi=35843,Zn=36196,nr=37492,Rr=37496,Rn=37808,Kn=37809,zi=37810,Si=37811,Y=37812,se=37813,pe=37814,we=37815,Ue=37816,Ke=37817,ft=37818,ae=37819,le=37820,ce=37821,ge=36492,Ae=36494,tt=36495,xt=36283,Dt=36284,Yt=36285,on=36286,kt=2200,bn=2201,oi=2202,Vn=2300,Wn=2301,Nn=2302,ai=2400,li=2401,xi=2402,Bi=2500,hr=2501,Li=0,Fr=1,bi=2,eo=3e3,Kr=3001,qo=3200,Ha=3201,ks=0,ja=1,qr="",Cr="srgb",pr="srgb-linear",fu="display-p3",ih="display-p3-linear",rh="linear",wr="srgb",sh="rec709",oh="p3",ay=0,ol=7680,ly=7681,cy=7682,hy=7683,uy=34055,dy=34056,fy=5386,py=512,my=513,gy=514,Ay=515,vy=516,yy=517,xy=518,Mf=519,Dm=512,Om=513,Fm=514,Nm=515,Um=516,km=517,zm=518,Gm=519,ah=35044,Ey=35048,by=35040,_y=35045,wy=35049,My=35041,Cy=35046,Sy=35050,Ty=35042,Ry="100",Cf="300 es",pu=1035,Yo=2e3,lh=2001;class to{addEventListener(r,l){this._listeners===void 0&&(this._listeners={});const m=this._listeners;m[r]===void 0&&(m[r]=[]),m[r].indexOf(l)===-1&&m[r].push(l)}hasEventListener(r,l){if(this._listeners===void 0)return!1;const m=this._listeners;return m[r]!==void 0&&m[r].indexOf(l)!==-1}removeEventListener(r,l){if(this._listeners===void 0)return;const y=this._listeners[r];if(y!==void 0){const _=y.indexOf(l);_!==-1&&y.splice(_,1)}}dispatchEvent(r){if(this._listeners===void 0)return;const m=this._listeners[r.type];if(m!==void 0){r.target=this;const y=m.slice(0);for(let _=0,R=y.length;_>8&255]+Es[w>>16&255]+Es[w>>24&255]+"-"+Es[r&255]+Es[r>>8&255]+"-"+Es[r>>16&15|64]+Es[r>>24&255]+"-"+Es[l&63|128]+Es[l>>8&255]+"-"+Es[l>>16&255]+Es[l>>24&255]+Es[m&255]+Es[m>>8&255]+Es[m>>16&255]+Es[m>>24&255]).toLowerCase()}function Nr(w,r,l){return Math.max(r,Math.min(l,w))}function Sf(w,r){return(w%r+r)%r}function Iy(w,r,l,m,y){return m+(w-r)*(y-m)/(l-r)}function By(w,r,l){return w!==r?(l-w)/(r-w):0}function ch(w,r,l){return(1-l)*w+l*r}function Ly(w,r,l,m){return ch(w,r,1-Math.exp(-l*m))}function Py(w,r=1){return r-Math.abs(Sf(w,r*2)-r)}function Dy(w,r,l){return w<=r?0:w>=l?1:(w=(w-r)/(l-r),w*w*(3-2*w))}function Oy(w,r,l){return w<=r?0:w>=l?1:(w=(w-r)/(l-r),w*w*w*(w*(w*6-15)+10))}function Fy(w,r){return w+Math.floor(Math.random()*(r-w+1))}function Ny(w,r){return w+Math.random()*(r-w)}function Uy(w){return w*(.5-Math.random())}function ky(w){w!==void 0&&(Vm=w);let r=Vm+=1831565813;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),((r^r>>>14)>>>0)/4294967296}function zy(w){return w*al}function Gy(w){return w*sc}function Tf(w){return(w&w-1)===0&&w!==0}function Hm(w){return Math.pow(2,Math.ceil(Math.log(w)/Math.LN2))}function mu(w){return Math.pow(2,Math.floor(Math.log(w)/Math.LN2))}function Vy(w,r,l,m,y){const _=Math.cos,R=Math.sin,I=_(l/2),O=R(l/2),N=_((r+m)/2),V=R((r+m)/2),Q=_((r-m)/2),X=R((r-m)/2),$=_((m-r)/2),ie=R((m-r)/2);switch(y){case"XYX":w.set(I*V,O*Q,O*X,I*N);break;case"YZY":w.set(O*X,I*V,O*Q,I*N);break;case"ZXZ":w.set(O*Q,O*X,I*V,I*N);break;case"XZX":w.set(I*V,O*ie,O*$,I*N);break;case"YXY":w.set(O*$,I*V,O*ie,I*N);break;case"ZYZ":w.set(O*ie,O*$,I*V,I*N);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+y)}}function zs(w,r){switch(r.constructor){case Float32Array:return w;case Uint32Array:return w/4294967295;case Uint16Array:return w/65535;case Uint8Array:return w/255;case Int32Array:return Math.max(w/2147483647,-1);case Int16Array:return Math.max(w/32767,-1);case Int8Array:return Math.max(w/127,-1);default:throw new Error("Invalid component type.")}}function Ni(w,r){switch(r.constructor){case Float32Array:return w;case Uint32Array:return Math.round(w*4294967295);case Uint16Array:return Math.round(w*65535);case Uint8Array:return Math.round(w*255);case Int32Array:return Math.round(w*2147483647);case Int16Array:return Math.round(w*32767);case Int8Array:return Math.round(w*127);default:throw new Error("Invalid component type.")}}const Hy={DEG2RAD:al,RAD2DEG:sc,generateUUID:no,clamp:Nr,euclideanModulo:Sf,mapLinear:Iy,inverseLerp:By,lerp:ch,damp:Ly,pingpong:Py,smoothstep:Dy,smootherstep:Oy,randInt:Fy,randFloat:Ny,randFloatSpread:Uy,seededRandom:ky,degToRad:zy,radToDeg:Gy,isPowerOfTwo:Tf,ceilPowerOfTwo:Hm,floorPowerOfTwo:mu,setQuaternionFromProperEuler:Vy,normalize:Ni,denormalize:zs};class en{constructor(r=0,l=0){en.prototype.isVector2=!0,this.x=r,this.y=l}get width(){return this.x}set width(r){this.x=r}get height(){return this.y}set height(r){this.y=r}set(r,l){return this.x=r,this.y=l,this}setScalar(r){return this.x=r,this.y=r,this}setX(r){return this.x=r,this}setY(r){return this.y=r,this}setComponent(r,l){switch(r){case 0:this.x=l;break;case 1:this.y=l;break;default:throw new Error("index is out of range: "+r)}return this}getComponent(r){switch(r){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+r)}}clone(){return new this.constructor(this.x,this.y)}copy(r){return this.x=r.x,this.y=r.y,this}add(r){return this.x+=r.x,this.y+=r.y,this}addScalar(r){return this.x+=r,this.y+=r,this}addVectors(r,l){return this.x=r.x+l.x,this.y=r.y+l.y,this}addScaledVector(r,l){return this.x+=r.x*l,this.y+=r.y*l,this}sub(r){return this.x-=r.x,this.y-=r.y,this}subScalar(r){return this.x-=r,this.y-=r,this}subVectors(r,l){return this.x=r.x-l.x,this.y=r.y-l.y,this}multiply(r){return this.x*=r.x,this.y*=r.y,this}multiplyScalar(r){return this.x*=r,this.y*=r,this}divide(r){return this.x/=r.x,this.y/=r.y,this}divideScalar(r){return this.multiplyScalar(1/r)}applyMatrix3(r){const l=this.x,m=this.y,y=r.elements;return this.x=y[0]*l+y[3]*m+y[6],this.y=y[1]*l+y[4]*m+y[7],this}min(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this}max(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this}clamp(r,l){return this.x=Math.max(r.x,Math.min(l.x,this.x)),this.y=Math.max(r.y,Math.min(l.y,this.y)),this}clampScalar(r,l){return this.x=Math.max(r,Math.min(l,this.x)),this.y=Math.max(r,Math.min(l,this.y)),this}clampLength(r,l){const m=this.length();return this.divideScalar(m||1).multiplyScalar(Math.max(r,Math.min(l,m)))}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(r){return this.x*r.x+this.y*r.y}cross(r){return this.x*r.y-this.y*r.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(r){const l=Math.sqrt(this.lengthSq()*r.lengthSq());if(l===0)return Math.PI/2;const m=this.dot(r)/l;return Math.acos(Nr(m,-1,1))}distanceTo(r){return Math.sqrt(this.distanceToSquared(r))}distanceToSquared(r){const l=this.x-r.x,m=this.y-r.y;return l*l+m*m}manhattanDistanceTo(r){return Math.abs(this.x-r.x)+Math.abs(this.y-r.y)}setLength(r){return this.normalize().multiplyScalar(r)}lerp(r,l){return this.x+=(r.x-this.x)*l,this.y+=(r.y-this.y)*l,this}lerpVectors(r,l,m){return this.x=r.x+(l.x-r.x)*m,this.y=r.y+(l.y-r.y)*m,this}equals(r){return r.x===this.x&&r.y===this.y}fromArray(r,l=0){return this.x=r[l],this.y=r[l+1],this}toArray(r=[],l=0){return r[l]=this.x,r[l+1]=this.y,r}fromBufferAttribute(r,l){return this.x=r.getX(l),this.y=r.getY(l),this}rotateAround(r,l){const m=Math.cos(l),y=Math.sin(l),_=this.x-r.x,R=this.y-r.y;return this.x=_*m-R*y+r.x,this.y=_*y+R*m+r.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ui{constructor(r,l,m,y,_,R,I,O,N){Ui.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],r!==void 0&&this.set(r,l,m,y,_,R,I,O,N)}set(r,l,m,y,_,R,I,O,N){const V=this.elements;return V[0]=r,V[1]=y,V[2]=I,V[3]=l,V[4]=_,V[5]=O,V[6]=m,V[7]=R,V[8]=N,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(r){const l=this.elements,m=r.elements;return l[0]=m[0],l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=m[6],l[7]=m[7],l[8]=m[8],this}extractBasis(r,l,m){return r.setFromMatrix3Column(this,0),l.setFromMatrix3Column(this,1),m.setFromMatrix3Column(this,2),this}setFromMatrix4(r){const l=r.elements;return this.set(l[0],l[4],l[8],l[1],l[5],l[9],l[2],l[6],l[10]),this}multiply(r){return this.multiplyMatrices(this,r)}premultiply(r){return this.multiplyMatrices(r,this)}multiplyMatrices(r,l){const m=r.elements,y=l.elements,_=this.elements,R=m[0],I=m[3],O=m[6],N=m[1],V=m[4],Q=m[7],X=m[2],$=m[5],ie=m[8],ue=y[0],re=y[3],q=y[6],Se=y[1],fe=y[4],Me=y[7],ze=y[2],He=y[5],et=y[8];return _[0]=R*ue+I*Se+O*ze,_[3]=R*re+I*fe+O*He,_[6]=R*q+I*Me+O*et,_[1]=N*ue+V*Se+Q*ze,_[4]=N*re+V*fe+Q*He,_[7]=N*q+V*Me+Q*et,_[2]=X*ue+$*Se+ie*ze,_[5]=X*re+$*fe+ie*He,_[8]=X*q+$*Me+ie*et,this}multiplyScalar(r){const l=this.elements;return l[0]*=r,l[3]*=r,l[6]*=r,l[1]*=r,l[4]*=r,l[7]*=r,l[2]*=r,l[5]*=r,l[8]*=r,this}determinant(){const r=this.elements,l=r[0],m=r[1],y=r[2],_=r[3],R=r[4],I=r[5],O=r[6],N=r[7],V=r[8];return l*R*V-l*I*N-m*_*V+m*I*O+y*_*N-y*R*O}invert(){const r=this.elements,l=r[0],m=r[1],y=r[2],_=r[3],R=r[4],I=r[5],O=r[6],N=r[7],V=r[8],Q=V*R-I*N,X=I*O-V*_,$=N*_-R*O,ie=l*Q+m*X+y*$;if(ie===0)return this.set(0,0,0,0,0,0,0,0,0);const ue=1/ie;return r[0]=Q*ue,r[1]=(y*N-V*m)*ue,r[2]=(I*m-y*R)*ue,r[3]=X*ue,r[4]=(V*l-y*O)*ue,r[5]=(y*_-I*l)*ue,r[6]=$*ue,r[7]=(m*O-N*l)*ue,r[8]=(R*l-m*_)*ue,this}transpose(){let r;const l=this.elements;return r=l[1],l[1]=l[3],l[3]=r,r=l[2],l[2]=l[6],l[6]=r,r=l[5],l[5]=l[7],l[7]=r,this}getNormalMatrix(r){return this.setFromMatrix4(r).invert().transpose()}transposeIntoArray(r){const l=this.elements;return r[0]=l[0],r[1]=l[3],r[2]=l[6],r[3]=l[1],r[4]=l[4],r[5]=l[7],r[6]=l[2],r[7]=l[5],r[8]=l[8],this}setUvTransform(r,l,m,y,_,R,I){const O=Math.cos(_),N=Math.sin(_);return this.set(m*O,m*N,-m*(O*R+N*I)+R+r,-y*N,y*O,-y*(-N*R+O*I)+I+l,0,0,1),this}scale(r,l){return this.premultiply(Rf.makeScale(r,l)),this}rotate(r){return this.premultiply(Rf.makeRotation(-r)),this}translate(r,l){return this.premultiply(Rf.makeTranslation(r,l)),this}makeTranslation(r,l){return r.isVector2?this.set(1,0,r.x,0,1,r.y,0,0,1):this.set(1,0,r,0,1,l,0,0,1),this}makeRotation(r){const l=Math.cos(r),m=Math.sin(r);return this.set(l,-m,0,m,l,0,0,0,1),this}makeScale(r,l){return this.set(r,0,0,0,l,0,0,0,1),this}equals(r){const l=this.elements,m=r.elements;for(let y=0;y<9;y++)if(l[y]!==m[y])return!1;return!0}fromArray(r,l=0){for(let m=0;m<9;m++)this.elements[m]=r[m+l];return this}toArray(r=[],l=0){const m=this.elements;return r[l]=m[0],r[l+1]=m[1],r[l+2]=m[2],r[l+3]=m[3],r[l+4]=m[4],r[l+5]=m[5],r[l+6]=m[6],r[l+7]=m[7],r[l+8]=m[8],r}clone(){return new this.constructor().fromArray(this.elements)}}const Rf=new Ui;function jm(w){for(let r=w.length-1;r>=0;--r)if(w[r]>=65535)return!0;return!1}const jy={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function oc(w,r){return new jy[w](r)}function hh(w){return document.createElementNS("http://www.w3.org/1999/xhtml",w)}function Wm(){const w=hh("canvas");return w.style.display="block",w}const Qm={};function uh(w){w in Qm||(Qm[w]=!0,console.warn(w))}const Xm=new Ui().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Km=new Ui().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),gu={[pr]:{transfer:rh,primaries:sh,toReference:w=>w,fromReference:w=>w},[Cr]:{transfer:wr,primaries:sh,toReference:w=>w.convertSRGBToLinear(),fromReference:w=>w.convertLinearToSRGB()},[ih]:{transfer:rh,primaries:oh,toReference:w=>w.applyMatrix3(Km),fromReference:w=>w.applyMatrix3(Xm)},[fu]:{transfer:wr,primaries:oh,toReference:w=>w.convertSRGBToLinear().applyMatrix3(Km),fromReference:w=>w.applyMatrix3(Xm).convertLinearToSRGB()}},Wy=new Set([pr,ih]),vr={enabled:!0,_workingColorSpace:pr,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(w){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!w},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(w){if(!Wy.has(w))throw new Error(`Unsupported working color space, "${w}".`);this._workingColorSpace=w},convert:function(w,r,l){if(this.enabled===!1||r===l||!r||!l)return w;const m=gu[r].toReference,y=gu[l].fromReference;return y(m(w))},fromWorkingColorSpace:function(w,r){return this.convert(w,this._workingColorSpace,r)},toWorkingColorSpace:function(w,r){return this.convert(w,r,this._workingColorSpace)},getPrimaries:function(w){return gu[w].primaries},getTransfer:function(w){return w===qr?rh:gu[w].transfer}};function ac(w){return w<.04045?w*.0773993808:Math.pow(w*.9478672986+.0521327014,2.4)}function If(w){return w<.0031308?w*12.92:1.055*Math.pow(w,.41666)-.055}let ll;class cl{static getDataURL(r){if(/^data:/i.test(r.src)||typeof HTMLCanvasElement>"u")return r.src;let l;if(r instanceof HTMLCanvasElement)l=r;else{ll===void 0&&(ll=hh("canvas")),ll.width=r.width,ll.height=r.height;const m=ll.getContext("2d");r instanceof ImageData?m.putImageData(r,0,0):m.drawImage(r,0,0,r.width,r.height),l=ll}return l.width>2048||l.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",r),l.toDataURL("image/jpeg",.6)):l.toDataURL("image/png")}static sRGBToLinear(r){if(typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap){const l=hh("canvas");l.width=r.width,l.height=r.height;const m=l.getContext("2d");m.drawImage(r,0,0,r.width,r.height);const y=m.getImageData(0,0,r.width,r.height),_=y.data;for(let R=0;R<_.length;R++)_[R]=ac(_[R]/255)*255;return m.putImageData(y,0,0),l}else if(r.data){const l=r.data.slice(0);for(let m=0;m0&&(m.userData=this.userData),l||(r.textures[this.uuid]=m),m}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(r){if(this.mapping!==Ye)return r;if(r.applyMatrix3(this.matrix),r.x<0||r.x>1)switch(this.wrapS){case Re:r.x=r.x-Math.floor(r.x);break;case We:r.x=r.x<0?0:1;break;case ve:Math.abs(Math.floor(r.x)%2)===1?r.x=Math.ceil(r.x)-r.x:r.x=r.x-Math.floor(r.x);break}if(r.y<0||r.y>1)switch(this.wrapT){case Re:r.y=r.y-Math.floor(r.y);break;case We:r.y=r.y<0?0:1;break;case ve:Math.abs(Math.floor(r.y)%2)===1?r.y=Math.ceil(r.y)-r.y:r.y=r.y-Math.floor(r.y);break}return this.flipY&&(r.y=1-r.y),r}set needsUpdate(r){r===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return uh("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Cr?Kr:eo}set encoding(r){uh("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=r===Kr?Cr:qr}}Ir.DEFAULT_IMAGE=null,Ir.DEFAULT_MAPPING=Ye,Ir.DEFAULT_ANISOTROPY=1;class ur{constructor(r=0,l=0,m=0,y=1){ur.prototype.isVector4=!0,this.x=r,this.y=l,this.z=m,this.w=y}get width(){return this.z}set width(r){this.z=r}get height(){return this.w}set height(r){this.w=r}set(r,l,m,y){return this.x=r,this.y=l,this.z=m,this.w=y,this}setScalar(r){return this.x=r,this.y=r,this.z=r,this.w=r,this}setX(r){return this.x=r,this}setY(r){return this.y=r,this}setZ(r){return this.z=r,this}setW(r){return this.w=r,this}setComponent(r,l){switch(r){case 0:this.x=l;break;case 1:this.y=l;break;case 2:this.z=l;break;case 3:this.w=l;break;default:throw new Error("index is out of range: "+r)}return this}getComponent(r){switch(r){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: "+r)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(r){return this.x=r.x,this.y=r.y,this.z=r.z,this.w=r.w!==void 0?r.w:1,this}add(r){return this.x+=r.x,this.y+=r.y,this.z+=r.z,this.w+=r.w,this}addScalar(r){return this.x+=r,this.y+=r,this.z+=r,this.w+=r,this}addVectors(r,l){return this.x=r.x+l.x,this.y=r.y+l.y,this.z=r.z+l.z,this.w=r.w+l.w,this}addScaledVector(r,l){return this.x+=r.x*l,this.y+=r.y*l,this.z+=r.z*l,this.w+=r.w*l,this}sub(r){return this.x-=r.x,this.y-=r.y,this.z-=r.z,this.w-=r.w,this}subScalar(r){return this.x-=r,this.y-=r,this.z-=r,this.w-=r,this}subVectors(r,l){return this.x=r.x-l.x,this.y=r.y-l.y,this.z=r.z-l.z,this.w=r.w-l.w,this}multiply(r){return this.x*=r.x,this.y*=r.y,this.z*=r.z,this.w*=r.w,this}multiplyScalar(r){return this.x*=r,this.y*=r,this.z*=r,this.w*=r,this}applyMatrix4(r){const l=this.x,m=this.y,y=this.z,_=this.w,R=r.elements;return this.x=R[0]*l+R[4]*m+R[8]*y+R[12]*_,this.y=R[1]*l+R[5]*m+R[9]*y+R[13]*_,this.z=R[2]*l+R[6]*m+R[10]*y+R[14]*_,this.w=R[3]*l+R[7]*m+R[11]*y+R[15]*_,this}divideScalar(r){return this.multiplyScalar(1/r)}setAxisAngleFromQuaternion(r){this.w=2*Math.acos(r.w);const l=Math.sqrt(1-r.w*r.w);return l<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=r.x/l,this.y=r.y/l,this.z=r.z/l),this}setAxisAngleFromRotationMatrix(r){let l,m,y,_;const O=r.elements,N=O[0],V=O[4],Q=O[8],X=O[1],$=O[5],ie=O[9],ue=O[2],re=O[6],q=O[10];if(Math.abs(V-X)<.01&&Math.abs(Q-ue)<.01&&Math.abs(ie-re)<.01){if(Math.abs(V+X)<.1&&Math.abs(Q+ue)<.1&&Math.abs(ie+re)<.1&&Math.abs(N+$+q-3)<.1)return this.set(1,0,0,0),this;l=Math.PI;const fe=(N+1)/2,Me=($+1)/2,ze=(q+1)/2,He=(V+X)/4,et=(Q+ue)/4,st=(ie+re)/4;return fe>Me&&fe>ze?fe<.01?(m=0,y=.707106781,_=.707106781):(m=Math.sqrt(fe),y=He/m,_=et/m):Me>ze?Me<.01?(m=.707106781,y=0,_=.707106781):(y=Math.sqrt(Me),m=He/y,_=st/y):ze<.01?(m=.707106781,y=.707106781,_=0):(_=Math.sqrt(ze),m=et/_,y=st/_),this.set(m,y,_,l),this}let Se=Math.sqrt((re-ie)*(re-ie)+(Q-ue)*(Q-ue)+(X-V)*(X-V));return Math.abs(Se)<.001&&(Se=1),this.x=(re-ie)/Se,this.y=(Q-ue)/Se,this.z=(X-V)/Se,this.w=Math.acos((N+$+q-1)/2),this}min(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this.z=Math.min(this.z,r.z),this.w=Math.min(this.w,r.w),this}max(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this.z=Math.max(this.z,r.z),this.w=Math.max(this.w,r.w),this}clamp(r,l){return this.x=Math.max(r.x,Math.min(l.x,this.x)),this.y=Math.max(r.y,Math.min(l.y,this.y)),this.z=Math.max(r.z,Math.min(l.z,this.z)),this.w=Math.max(r.w,Math.min(l.w,this.w)),this}clampScalar(r,l){return this.x=Math.max(r,Math.min(l,this.x)),this.y=Math.max(r,Math.min(l,this.y)),this.z=Math.max(r,Math.min(l,this.z)),this.w=Math.max(r,Math.min(l,this.w)),this}clampLength(r,l){const m=this.length();return this.divideScalar(m||1).multiplyScalar(Math.max(r,Math.min(l,m)))}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(r){return this.x*r.x+this.y*r.y+this.z*r.z+this.w*r.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(r){return this.normalize().multiplyScalar(r)}lerp(r,l){return this.x+=(r.x-this.x)*l,this.y+=(r.y-this.y)*l,this.z+=(r.z-this.z)*l,this.w+=(r.w-this.w)*l,this}lerpVectors(r,l,m){return this.x=r.x+(l.x-r.x)*m,this.y=r.y+(l.y-r.y)*m,this.z=r.z+(l.z-r.z)*m,this.w=r.w+(l.w-r.w)*m,this}equals(r){return r.x===this.x&&r.y===this.y&&r.z===this.z&&r.w===this.w}fromArray(r,l=0){return this.x=r[l],this.y=r[l+1],this.z=r[l+2],this.w=r[l+3],this}toArray(r=[],l=0){return r[l]=this.x,r[l+1]=this.y,r[l+2]=this.z,r[l+3]=this.w,r}fromBufferAttribute(r,l){return this.x=r.getX(l),this.y=r.getY(l),this.z=r.getZ(l),this.w=r.getW(l),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 vu extends to{constructor(r=1,l=1,m={}){super(),this.isRenderTarget=!0,this.width=r,this.height=l,this.depth=1,this.scissor=new ur(0,0,r,l),this.scissorTest=!1,this.viewport=new ur(0,0,r,l);const y={width:r,height:l,depth:1};m.encoding!==void 0&&(uh("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),m.colorSpace=m.encoding===Kr?Cr:qr),m=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Bn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},m),this.texture=new Ir(y,m.mapping,m.wrapS,m.wrapT,m.magFilter,m.minFilter,m.format,m.type,m.anisotropy,m.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=m.generateMipmaps,this.texture.internalFormat=m.internalFormat,this.depthBuffer=m.depthBuffer,this.stencilBuffer=m.stencilBuffer,this.depthTexture=m.depthTexture,this.samples=m.samples}setSize(r,l,m=1){(this.width!==r||this.height!==l||this.depth!==m)&&(this.width=r,this.height=l,this.depth=m,this.texture.image.width=r,this.texture.image.height=l,this.texture.image.depth=m,this.dispose()),this.viewport.set(0,0,r,l),this.scissor.set(0,0,r,l)}clone(){return new this.constructor().copy(this)}copy(r){this.width=r.width,this.height=r.height,this.depth=r.depth,this.scissor.copy(r.scissor),this.scissorTest=r.scissorTest,this.viewport.copy(r.viewport),this.texture=r.texture.clone(),this.texture.isRenderTargetTexture=!0;const l=Object.assign({},r.texture.image);return this.texture.source=new Br(l),this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,r.depthTexture!==null&&(this.depthTexture=r.depthTexture.clone()),this.samples=r.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class yo extends vu{constructor(r=1,l=1,m={}){super(r,l,m),this.isWebGLRenderTarget=!0}}class yu extends Ir{constructor(r=null,l=1,m=1,y=1){super(null),this.isDataArrayTexture=!0,this.image={data:r,width:l,height:m,depth:y},this.magFilter=at,this.minFilter=at,this.wrapR=We,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class qn extends yo{constructor(r=1,l=1,m=1){super(r,l),this.isWebGLArrayRenderTarget=!0,this.depth=m,this.texture=new yu(null,r,l,m),this.texture.isRenderTargetTexture=!0}}class Pi extends Ir{constructor(r=null,l=1,m=1,y=1){super(null),this.isData3DTexture=!0,this.image={data:r,width:l,height:m,depth:y},this.magFilter=at,this.minFilter=at,this.wrapR=We,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ar extends yo{constructor(r=1,l=1,m=1){super(r,l),this.isWebGL3DRenderTarget=!0,this.depth=m,this.texture=new Pi(null,r,l,m),this.texture.isRenderTargetTexture=!0}}class bs extends yo{constructor(r=1,l=1,m=1,y={}){super(r,l,y),this.isWebGLMultipleRenderTargets=!0;const _=this.texture;this.texture=[];for(let R=0;R=0?1:-1,fe=1-q*q;if(fe>Number.EPSILON){const ze=Math.sqrt(fe),He=Math.atan2(ze,q*Se);re=Math.sin(re*He)/ze,I=Math.sin(I*He)/ze}const Me=I*Se;if(O=O*re+X*Me,N=N*re+$*Me,V=V*re+ie*Me,Q=Q*re+ue*Me,re===1-I){const ze=1/Math.sqrt(O*O+N*N+V*V+Q*Q);O*=ze,N*=ze,V*=ze,Q*=ze}}r[l]=O,r[l+1]=N,r[l+2]=V,r[l+3]=Q}static multiplyQuaternionsFlat(r,l,m,y,_,R){const I=m[y],O=m[y+1],N=m[y+2],V=m[y+3],Q=_[R],X=_[R+1],$=_[R+2],ie=_[R+3];return r[l]=I*ie+V*Q+O*$-N*X,r[l+1]=O*ie+V*X+N*Q-I*$,r[l+2]=N*ie+V*$+I*X-O*Q,r[l+3]=V*ie-I*Q-O*X-N*$,r}get x(){return this._x}set x(r){this._x=r,this._onChangeCallback()}get y(){return this._y}set y(r){this._y=r,this._onChangeCallback()}get z(){return this._z}set z(r){this._z=r,this._onChangeCallback()}get w(){return this._w}set w(r){this._w=r,this._onChangeCallback()}set(r,l,m,y){return this._x=r,this._y=l,this._z=m,this._w=y,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(r){return this._x=r.x,this._y=r.y,this._z=r.z,this._w=r.w,this._onChangeCallback(),this}setFromEuler(r,l){const m=r._x,y=r._y,_=r._z,R=r._order,I=Math.cos,O=Math.sin,N=I(m/2),V=I(y/2),Q=I(_/2),X=O(m/2),$=O(y/2),ie=O(_/2);switch(R){case"XYZ":this._x=X*V*Q+N*$*ie,this._y=N*$*Q-X*V*ie,this._z=N*V*ie+X*$*Q,this._w=N*V*Q-X*$*ie;break;case"YXZ":this._x=X*V*Q+N*$*ie,this._y=N*$*Q-X*V*ie,this._z=N*V*ie-X*$*Q,this._w=N*V*Q+X*$*ie;break;case"ZXY":this._x=X*V*Q-N*$*ie,this._y=N*$*Q+X*V*ie,this._z=N*V*ie+X*$*Q,this._w=N*V*Q-X*$*ie;break;case"ZYX":this._x=X*V*Q-N*$*ie,this._y=N*$*Q+X*V*ie,this._z=N*V*ie-X*$*Q,this._w=N*V*Q+X*$*ie;break;case"YZX":this._x=X*V*Q+N*$*ie,this._y=N*$*Q+X*V*ie,this._z=N*V*ie-X*$*Q,this._w=N*V*Q-X*$*ie;break;case"XZY":this._x=X*V*Q-N*$*ie,this._y=N*$*Q-X*V*ie,this._z=N*V*ie+X*$*Q,this._w=N*V*Q+X*$*ie;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+R)}return l!==!1&&this._onChangeCallback(),this}setFromAxisAngle(r,l){const m=l/2,y=Math.sin(m);return this._x=r.x*y,this._y=r.y*y,this._z=r.z*y,this._w=Math.cos(m),this._onChangeCallback(),this}setFromRotationMatrix(r){const l=r.elements,m=l[0],y=l[4],_=l[8],R=l[1],I=l[5],O=l[9],N=l[2],V=l[6],Q=l[10],X=m+I+Q;if(X>0){const $=.5/Math.sqrt(X+1);this._w=.25/$,this._x=(V-O)*$,this._y=(_-N)*$,this._z=(R-y)*$}else if(m>I&&m>Q){const $=2*Math.sqrt(1+m-I-Q);this._w=(V-O)/$,this._x=.25*$,this._y=(y+R)/$,this._z=(_+N)/$}else if(I>Q){const $=2*Math.sqrt(1+I-m-Q);this._w=(_-N)/$,this._x=(y+R)/$,this._y=.25*$,this._z=(O+V)/$}else{const $=2*Math.sqrt(1+Q-m-I);this._w=(R-y)/$,this._x=(_+N)/$,this._y=(O+V)/$,this._z=.25*$}return this._onChangeCallback(),this}setFromUnitVectors(r,l){let m=r.dot(l)+1;return mMath.abs(r.z)?(this._x=-r.y,this._y=r.x,this._z=0,this._w=m):(this._x=0,this._y=-r.z,this._z=r.y,this._w=m)):(this._x=r.y*l.z-r.z*l.y,this._y=r.z*l.x-r.x*l.z,this._z=r.x*l.y-r.y*l.x,this._w=m),this.normalize()}angleTo(r){return 2*Math.acos(Math.abs(Nr(this.dot(r),-1,1)))}rotateTowards(r,l){const m=this.angleTo(r);if(m===0)return this;const y=Math.min(1,l/m);return this.slerp(r,y),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(r){return this._x*r._x+this._y*r._y+this._z*r._z+this._w*r._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 r=this.length();return r===0?(this._x=0,this._y=0,this._z=0,this._w=1):(r=1/r,this._x=this._x*r,this._y=this._y*r,this._z=this._z*r,this._w=this._w*r),this._onChangeCallback(),this}multiply(r){return this.multiplyQuaternions(this,r)}premultiply(r){return this.multiplyQuaternions(r,this)}multiplyQuaternions(r,l){const m=r._x,y=r._y,_=r._z,R=r._w,I=l._x,O=l._y,N=l._z,V=l._w;return this._x=m*V+R*I+y*N-_*O,this._y=y*V+R*O+_*I-m*N,this._z=_*V+R*N+m*O-y*I,this._w=R*V-m*I-y*O-_*N,this._onChangeCallback(),this}slerp(r,l){if(l===0)return this;if(l===1)return this.copy(r);const m=this._x,y=this._y,_=this._z,R=this._w;let I=R*r._w+m*r._x+y*r._y+_*r._z;if(I<0?(this._w=-r._w,this._x=-r._x,this._y=-r._y,this._z=-r._z,I=-I):this.copy(r),I>=1)return this._w=R,this._x=m,this._y=y,this._z=_,this;const O=1-I*I;if(O<=Number.EPSILON){const $=1-l;return this._w=$*R+l*this._w,this._x=$*m+l*this._x,this._y=$*y+l*this._y,this._z=$*_+l*this._z,this.normalize(),this._onChangeCallback(),this}const N=Math.sqrt(O),V=Math.atan2(N,I),Q=Math.sin((1-l)*V)/N,X=Math.sin(l*V)/N;return this._w=R*Q+this._w*X,this._x=m*Q+this._x*X,this._y=y*Q+this._y*X,this._z=_*Q+this._z*X,this._onChangeCallback(),this}slerpQuaternions(r,l,m){return this.copy(r).slerp(l,m)}random(){const r=Math.random(),l=Math.sqrt(1-r),m=Math.sqrt(r),y=2*Math.PI*Math.random(),_=2*Math.PI*Math.random();return this.set(l*Math.cos(y),m*Math.sin(_),m*Math.cos(_),l*Math.sin(y))}equals(r){return r._x===this._x&&r._y===this._y&&r._z===this._z&&r._w===this._w}fromArray(r,l=0){return this._x=r[l],this._y=r[l+1],this._z=r[l+2],this._w=r[l+3],this._onChangeCallback(),this}toArray(r=[],l=0){return r[l]=this._x,r[l+1]=this._y,r[l+2]=this._z,r[l+3]=this._w,r}fromBufferAttribute(r,l){return this._x=r.getX(l),this._y=r.getY(l),this._z=r.getZ(l),this._w=r.getW(l),this}toJSON(){return this.toArray()}_onChange(r){return this._onChangeCallback=r,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class je{constructor(r=0,l=0,m=0){je.prototype.isVector3=!0,this.x=r,this.y=l,this.z=m}set(r,l,m){return m===void 0&&(m=this.z),this.x=r,this.y=l,this.z=m,this}setScalar(r){return this.x=r,this.y=r,this.z=r,this}setX(r){return this.x=r,this}setY(r){return this.y=r,this}setZ(r){return this.z=r,this}setComponent(r,l){switch(r){case 0:this.x=l;break;case 1:this.y=l;break;case 2:this.z=l;break;default:throw new Error("index is out of range: "+r)}return this}getComponent(r){switch(r){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+r)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(r){return this.x=r.x,this.y=r.y,this.z=r.z,this}add(r){return this.x+=r.x,this.y+=r.y,this.z+=r.z,this}addScalar(r){return this.x+=r,this.y+=r,this.z+=r,this}addVectors(r,l){return this.x=r.x+l.x,this.y=r.y+l.y,this.z=r.z+l.z,this}addScaledVector(r,l){return this.x+=r.x*l,this.y+=r.y*l,this.z+=r.z*l,this}sub(r){return this.x-=r.x,this.y-=r.y,this.z-=r.z,this}subScalar(r){return this.x-=r,this.y-=r,this.z-=r,this}subVectors(r,l){return this.x=r.x-l.x,this.y=r.y-l.y,this.z=r.z-l.z,this}multiply(r){return this.x*=r.x,this.y*=r.y,this.z*=r.z,this}multiplyScalar(r){return this.x*=r,this.y*=r,this.z*=r,this}multiplyVectors(r,l){return this.x=r.x*l.x,this.y=r.y*l.y,this.z=r.z*l.z,this}applyEuler(r){return this.applyQuaternion(Wa.setFromEuler(r))}applyAxisAngle(r,l){return this.applyQuaternion(Wa.setFromAxisAngle(r,l))}applyMatrix3(r){const l=this.x,m=this.y,y=this.z,_=r.elements;return this.x=_[0]*l+_[3]*m+_[6]*y,this.y=_[1]*l+_[4]*m+_[7]*y,this.z=_[2]*l+_[5]*m+_[8]*y,this}applyNormalMatrix(r){return this.applyMatrix3(r).normalize()}applyMatrix4(r){const l=this.x,m=this.y,y=this.z,_=r.elements,R=1/(_[3]*l+_[7]*m+_[11]*y+_[15]);return this.x=(_[0]*l+_[4]*m+_[8]*y+_[12])*R,this.y=(_[1]*l+_[5]*m+_[9]*y+_[13])*R,this.z=(_[2]*l+_[6]*m+_[10]*y+_[14])*R,this}applyQuaternion(r){const l=this.x,m=this.y,y=this.z,_=r.x,R=r.y,I=r.z,O=r.w,N=2*(R*y-I*m),V=2*(I*l-_*y),Q=2*(_*m-R*l);return this.x=l+O*N+R*Q-I*V,this.y=m+O*V+I*N-_*Q,this.z=y+O*Q+_*V-R*N,this}project(r){return this.applyMatrix4(r.matrixWorldInverse).applyMatrix4(r.projectionMatrix)}unproject(r){return this.applyMatrix4(r.projectionMatrixInverse).applyMatrix4(r.matrixWorld)}transformDirection(r){const l=this.x,m=this.y,y=this.z,_=r.elements;return this.x=_[0]*l+_[4]*m+_[8]*y,this.y=_[1]*l+_[5]*m+_[9]*y,this.z=_[2]*l+_[6]*m+_[10]*y,this.normalize()}divide(r){return this.x/=r.x,this.y/=r.y,this.z/=r.z,this}divideScalar(r){return this.multiplyScalar(1/r)}min(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this.z=Math.min(this.z,r.z),this}max(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this.z=Math.max(this.z,r.z),this}clamp(r,l){return this.x=Math.max(r.x,Math.min(l.x,this.x)),this.y=Math.max(r.y,Math.min(l.y,this.y)),this.z=Math.max(r.z,Math.min(l.z,this.z)),this}clampScalar(r,l){return this.x=Math.max(r,Math.min(l,this.x)),this.y=Math.max(r,Math.min(l,this.y)),this.z=Math.max(r,Math.min(l,this.z)),this}clampLength(r,l){const m=this.length();return this.divideScalar(m||1).multiplyScalar(Math.max(r,Math.min(l,m)))}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(r){return this.x*r.x+this.y*r.y+this.z*r.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(r){return this.normalize().multiplyScalar(r)}lerp(r,l){return this.x+=(r.x-this.x)*l,this.y+=(r.y-this.y)*l,this.z+=(r.z-this.z)*l,this}lerpVectors(r,l,m){return this.x=r.x+(l.x-r.x)*m,this.y=r.y+(l.y-r.y)*m,this.z=r.z+(l.z-r.z)*m,this}cross(r){return this.crossVectors(this,r)}crossVectors(r,l){const m=r.x,y=r.y,_=r.z,R=l.x,I=l.y,O=l.z;return this.x=y*O-_*I,this.y=_*R-m*O,this.z=m*I-y*R,this}projectOnVector(r){const l=r.lengthSq();if(l===0)return this.set(0,0,0);const m=r.dot(this)/l;return this.copy(r).multiplyScalar(m)}projectOnPlane(r){return Vr.copy(this).projectOnVector(r),this.sub(Vr)}reflect(r){return this.sub(Vr.copy(r).multiplyScalar(2*this.dot(r)))}angleTo(r){const l=Math.sqrt(this.lengthSq()*r.lengthSq());if(l===0)return Math.PI/2;const m=this.dot(r)/l;return Math.acos(Nr(m,-1,1))}distanceTo(r){return Math.sqrt(this.distanceToSquared(r))}distanceToSquared(r){const l=this.x-r.x,m=this.y-r.y,y=this.z-r.z;return l*l+m*m+y*y}manhattanDistanceTo(r){return Math.abs(this.x-r.x)+Math.abs(this.y-r.y)+Math.abs(this.z-r.z)}setFromSpherical(r){return this.setFromSphericalCoords(r.radius,r.phi,r.theta)}setFromSphericalCoords(r,l,m){const y=Math.sin(l)*r;return this.x=y*Math.sin(m),this.y=Math.cos(l)*r,this.z=y*Math.cos(m),this}setFromCylindrical(r){return this.setFromCylindricalCoords(r.radius,r.theta,r.y)}setFromCylindricalCoords(r,l,m){return this.x=r*Math.sin(l),this.y=m,this.z=r*Math.cos(l),this}setFromMatrixPosition(r){const l=r.elements;return this.x=l[12],this.y=l[13],this.z=l[14],this}setFromMatrixScale(r){const l=this.setFromMatrixColumn(r,0).length(),m=this.setFromMatrixColumn(r,1).length(),y=this.setFromMatrixColumn(r,2).length();return this.x=l,this.y=m,this.z=y,this}setFromMatrixColumn(r,l){return this.fromArray(r.elements,l*4)}setFromMatrix3Column(r,l){return this.fromArray(r.elements,l*3)}setFromEuler(r){return this.x=r._x,this.y=r._y,this.z=r._z,this}setFromColor(r){return this.x=r.r,this.y=r.g,this.z=r.b,this}equals(r){return r.x===this.x&&r.y===this.y&&r.z===this.z}fromArray(r,l=0){return this.x=r[l],this.y=r[l+1],this.z=r[l+2],this}toArray(r=[],l=0){return r[l]=this.x,r[l+1]=this.y,r[l+2]=this.z,r}fromBufferAttribute(r,l){return this.x=r.getX(l),this.y=r.getY(l),this.z=r.getZ(l),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const r=(Math.random()-.5)*2,l=Math.random()*Math.PI*2,m=Math.sqrt(1-r**2);return this.x=m*Math.cos(l),this.y=m*Math.sin(l),this.z=r,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Vr=new je,Wa=new Ti;class er{constructor(r=new je(1/0,1/0,1/0),l=new je(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=r,this.max=l}set(r,l){return this.min.copy(r),this.max.copy(l),this}setFromArray(r){this.makeEmpty();for(let l=0,m=r.length;lthis.max.x||r.ythis.max.y||r.zthis.max.z)}containsBox(r){return this.min.x<=r.min.x&&r.max.x<=this.max.x&&this.min.y<=r.min.y&&r.max.y<=this.max.y&&this.min.z<=r.min.z&&r.max.z<=this.max.z}getParameter(r,l){return l.set((r.x-this.min.x)/(this.max.x-this.min.x),(r.y-this.min.y)/(this.max.y-this.min.y),(r.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(r){return!(r.max.xthis.max.x||r.max.ythis.max.y||r.max.zthis.max.z)}intersectsSphere(r){return this.clampPoint(r.center,Ds),Ds.distanceToSquared(r.center)<=r.radius*r.radius}intersectsPlane(r){let l,m;return r.normal.x>0?(l=r.normal.x*this.min.x,m=r.normal.x*this.max.x):(l=r.normal.x*this.max.x,m=r.normal.x*this.min.x),r.normal.y>0?(l+=r.normal.y*this.min.y,m+=r.normal.y*this.max.y):(l+=r.normal.y*this.max.y,m+=r.normal.y*this.min.y),r.normal.z>0?(l+=r.normal.z*this.min.z,m+=r.normal.z*this.max.z):(l+=r.normal.z*this.max.z,m+=r.normal.z*this.min.z),l<=-r.constant&&m>=-r.constant}intersectsTriangle(r){if(this.isEmpty())return!1;this.getCenter(Er),ji.subVectors(this.max,Er),_s.subVectors(r.a,Er),Hi.subVectors(r.b,Er),io.subVectors(r.c,Er),Do.subVectors(Hi,_s),ls.subVectors(io,Hi),rr.subVectors(_s,io);let l=[0,-Do.z,Do.y,0,-ls.z,ls.y,0,-rr.z,rr.y,Do.z,0,-Do.x,ls.z,0,-ls.x,rr.z,0,-rr.x,-Do.y,Do.x,0,-ls.y,ls.x,0,-rr.y,rr.x,0];return!Qa(l,_s,Hi,io,ji)||(l=[1,0,0,0,1,0,0,0,1],!Qa(l,_s,Hi,io,ji))?!1:(yr.crossVectors(Do,ls),l=[yr.x,yr.y,yr.z],Qa(l,_s,Hi,io,ji))}clampPoint(r,l){return l.copy(r).clamp(this.min,this.max)}distanceToPoint(r){return this.clampPoint(r,Ds).distanceTo(r)}getBoundingSphere(r){return this.isEmpty()?r.makeEmpty():(this.getCenter(r.center),r.radius=this.getSize(Ds).length()*.5),r}intersect(r){return this.min.max(r.min),this.max.min(r.max),this.isEmpty()&&this.makeEmpty(),this}union(r){return this.min.min(r.min),this.max.max(r.max),this}applyMatrix4(r){return this.isEmpty()?this:(xo[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(r),xo[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(r),xo[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(r),xo[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(r),xo[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(r),xo[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(r),xo[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(r),xo[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(r),this.setFromPoints(xo),this)}translate(r){return this.min.add(r),this.max.add(r),this}equals(r){return r.min.equals(this.min)&&r.max.equals(this.max)}}const xo=[new je,new je,new je,new je,new je,new je,new je,new je],Ds=new je,$o=new er,_s=new je,Hi=new je,io=new je,Do=new je,ls=new je,rr=new je,Er=new je,ji=new je,yr=new je,cs=new je;function Qa(w,r,l,m,y){for(let _=0,R=w.length-3;_<=R;_+=3){cs.fromArray(w,_);const I=y.x*Math.abs(cs.x)+y.y*Math.abs(cs.y)+y.z*Math.abs(cs.z),O=r.dot(cs),N=l.dot(cs),V=m.dot(cs);if(Math.max(-Math.max(O,N,V),Math.min(O,N,V))>I)return!1}return!0}const Bf=new er,lc=new je,xu=new je;class Eo{constructor(r=new je,l=-1){this.center=r,this.radius=l}set(r,l){return this.center.copy(r),this.radius=l,this}setFromPoints(r,l){const m=this.center;l!==void 0?m.copy(l):Bf.setFromPoints(r).getCenter(m);let y=0;for(let _=0,R=r.length;_this.radius*this.radius&&(l.sub(this.center).normalize(),l.multiplyScalar(this.radius).add(this.center)),l}getBoundingBox(r){return this.isEmpty()?(r.makeEmpty(),r):(r.set(this.center,this.center),r.expandByScalar(this.radius),r)}applyMatrix4(r){return this.center.applyMatrix4(r),this.radius=this.radius*r.getMaxScaleOnAxis(),this}translate(r){return this.center.add(r),this}expandByPoint(r){if(this.isEmpty())return this.center.copy(r),this.radius=0,this;lc.subVectors(r,this.center);const l=lc.lengthSq();if(l>this.radius*this.radius){const m=Math.sqrt(l),y=(m-this.radius)*.5;this.center.addScaledVector(lc,y/m),this.radius+=y}return this}union(r){return r.isEmpty()?this:this.isEmpty()?(this.copy(r),this):(this.center.equals(r.center)===!0?this.radius=Math.max(this.radius,r.radius):(xu.subVectors(r.center,this.center).setLength(r.radius),this.expandByPoint(lc.copy(r.center).add(xu)),this.expandByPoint(lc.copy(r.center).sub(xu))),this)}equals(r){return r.center.equals(this.center)&&r.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Jo=new je,Lf=new je,Eu=new je,Xa=new je,Pf=new je,bu=new je,Gs=new je;class Vs{constructor(r=new je,l=new je(0,0,-1)){this.origin=r,this.direction=l}set(r,l){return this.origin.copy(r),this.direction.copy(l),this}copy(r){return this.origin.copy(r.origin),this.direction.copy(r.direction),this}at(r,l){return l.copy(this.origin).addScaledVector(this.direction,r)}lookAt(r){return this.direction.copy(r).sub(this.origin).normalize(),this}recast(r){return this.origin.copy(this.at(r,Jo)),this}closestPointToPoint(r,l){l.subVectors(r,this.origin);const m=l.dot(this.direction);return m<0?l.copy(this.origin):l.copy(this.origin).addScaledVector(this.direction,m)}distanceToPoint(r){return Math.sqrt(this.distanceSqToPoint(r))}distanceSqToPoint(r){const l=Jo.subVectors(r,this.origin).dot(this.direction);return l<0?this.origin.distanceToSquared(r):(Jo.copy(this.origin).addScaledVector(this.direction,l),Jo.distanceToSquared(r))}distanceSqToSegment(r,l,m,y){Lf.copy(r).add(l).multiplyScalar(.5),Eu.copy(l).sub(r).normalize(),Xa.copy(this.origin).sub(Lf);const _=r.distanceTo(l)*.5,R=-this.direction.dot(Eu),I=Xa.dot(this.direction),O=-Xa.dot(Eu),N=Xa.lengthSq(),V=Math.abs(1-R*R);let Q,X,$,ie;if(V>0)if(Q=R*O-I,X=R*I-O,ie=_*V,Q>=0)if(X>=-ie)if(X<=ie){const ue=1/V;Q*=ue,X*=ue,$=Q*(Q+R*X+2*I)+X*(R*Q+X+2*O)+N}else X=_,Q=Math.max(0,-(R*X+I)),$=-Q*Q+X*(X+2*O)+N;else X=-_,Q=Math.max(0,-(R*X+I)),$=-Q*Q+X*(X+2*O)+N;else X<=-ie?(Q=Math.max(0,-(-R*_+I)),X=Q>0?-_:Math.min(Math.max(-_,-O),_),$=-Q*Q+X*(X+2*O)+N):X<=ie?(Q=0,X=Math.min(Math.max(-_,-O),_),$=X*(X+2*O)+N):(Q=Math.max(0,-(R*_+I)),X=Q>0?_:Math.min(Math.max(-_,-O),_),$=-Q*Q+X*(X+2*O)+N);else X=R>0?-_:_,Q=Math.max(0,-(R*X+I)),$=-Q*Q+X*(X+2*O)+N;return m&&m.copy(this.origin).addScaledVector(this.direction,Q),y&&y.copy(Lf).addScaledVector(Eu,X),$}intersectSphere(r,l){Jo.subVectors(r.center,this.origin);const m=Jo.dot(this.direction),y=Jo.dot(Jo)-m*m,_=r.radius*r.radius;if(y>_)return null;const R=Math.sqrt(_-y),I=m-R,O=m+R;return O<0?null:I<0?this.at(O,l):this.at(I,l)}intersectsSphere(r){return this.distanceSqToPoint(r.center)<=r.radius*r.radius}distanceToPlane(r){const l=r.normal.dot(this.direction);if(l===0)return r.distanceToPoint(this.origin)===0?0:null;const m=-(this.origin.dot(r.normal)+r.constant)/l;return m>=0?m:null}intersectPlane(r,l){const m=this.distanceToPlane(r);return m===null?null:this.at(m,l)}intersectsPlane(r){const l=r.distanceToPoint(this.origin);return l===0||r.normal.dot(this.direction)*l<0}intersectBox(r,l){let m,y,_,R,I,O;const N=1/this.direction.x,V=1/this.direction.y,Q=1/this.direction.z,X=this.origin;return N>=0?(m=(r.min.x-X.x)*N,y=(r.max.x-X.x)*N):(m=(r.max.x-X.x)*N,y=(r.min.x-X.x)*N),V>=0?(_=(r.min.y-X.y)*V,R=(r.max.y-X.y)*V):(_=(r.max.y-X.y)*V,R=(r.min.y-X.y)*V),m>R||_>y||((_>m||isNaN(m))&&(m=_),(R=0?(I=(r.min.z-X.z)*Q,O=(r.max.z-X.z)*Q):(I=(r.max.z-X.z)*Q,O=(r.min.z-X.z)*Q),m>O||I>y)||((I>m||m!==m)&&(m=I),(O=0?m:y,l)}intersectsBox(r){return this.intersectBox(r,Jo)!==null}intersectTriangle(r,l,m,y,_){Pf.subVectors(l,r),bu.subVectors(m,r),Gs.crossVectors(Pf,bu);let R=this.direction.dot(Gs),I;if(R>0){if(y)return null;I=1}else if(R<0)I=-1,R=-R;else return null;Xa.subVectors(this.origin,r);const O=I*this.direction.dot(bu.crossVectors(Xa,bu));if(O<0)return null;const N=I*this.direction.dot(Pf.cross(Xa));if(N<0||O+N>R)return null;const V=-I*Xa.dot(Gs);return V<0?null:this.at(V/R,_)}applyMatrix4(r){return this.origin.applyMatrix4(r),this.direction.transformDirection(r),this}equals(r){return r.origin.equals(this.origin)&&r.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class _i{constructor(r,l,m,y,_,R,I,O,N,V,Q,X,$,ie,ue,re){_i.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r!==void 0&&this.set(r,l,m,y,_,R,I,O,N,V,Q,X,$,ie,ue,re)}set(r,l,m,y,_,R,I,O,N,V,Q,X,$,ie,ue,re){const q=this.elements;return q[0]=r,q[4]=l,q[8]=m,q[12]=y,q[1]=_,q[5]=R,q[9]=I,q[13]=O,q[2]=N,q[6]=V,q[10]=Q,q[14]=X,q[3]=$,q[7]=ie,q[11]=ue,q[15]=re,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 _i().fromArray(this.elements)}copy(r){const l=this.elements,m=r.elements;return l[0]=m[0],l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=m[6],l[7]=m[7],l[8]=m[8],l[9]=m[9],l[10]=m[10],l[11]=m[11],l[12]=m[12],l[13]=m[13],l[14]=m[14],l[15]=m[15],this}copyPosition(r){const l=this.elements,m=r.elements;return l[12]=m[12],l[13]=m[13],l[14]=m[14],this}setFromMatrix3(r){const l=r.elements;return this.set(l[0],l[3],l[6],0,l[1],l[4],l[7],0,l[2],l[5],l[8],0,0,0,0,1),this}extractBasis(r,l,m){return r.setFromMatrixColumn(this,0),l.setFromMatrixColumn(this,1),m.setFromMatrixColumn(this,2),this}makeBasis(r,l,m){return this.set(r.x,l.x,m.x,0,r.y,l.y,m.y,0,r.z,l.z,m.z,0,0,0,0,1),this}extractRotation(r){const l=this.elements,m=r.elements,y=1/hl.setFromMatrixColumn(r,0).length(),_=1/hl.setFromMatrixColumn(r,1).length(),R=1/hl.setFromMatrixColumn(r,2).length();return l[0]=m[0]*y,l[1]=m[1]*y,l[2]=m[2]*y,l[3]=0,l[4]=m[4]*_,l[5]=m[5]*_,l[6]=m[6]*_,l[7]=0,l[8]=m[8]*R,l[9]=m[9]*R,l[10]=m[10]*R,l[11]=0,l[12]=0,l[13]=0,l[14]=0,l[15]=1,this}makeRotationFromEuler(r){const l=this.elements,m=r.x,y=r.y,_=r.z,R=Math.cos(m),I=Math.sin(m),O=Math.cos(y),N=Math.sin(y),V=Math.cos(_),Q=Math.sin(_);if(r.order==="XYZ"){const X=R*V,$=R*Q,ie=I*V,ue=I*Q;l[0]=O*V,l[4]=-O*Q,l[8]=N,l[1]=$+ie*N,l[5]=X-ue*N,l[9]=-I*O,l[2]=ue-X*N,l[6]=ie+$*N,l[10]=R*O}else if(r.order==="YXZ"){const X=O*V,$=O*Q,ie=N*V,ue=N*Q;l[0]=X+ue*I,l[4]=ie*I-$,l[8]=R*N,l[1]=R*Q,l[5]=R*V,l[9]=-I,l[2]=$*I-ie,l[6]=ue+X*I,l[10]=R*O}else if(r.order==="ZXY"){const X=O*V,$=O*Q,ie=N*V,ue=N*Q;l[0]=X-ue*I,l[4]=-R*Q,l[8]=ie+$*I,l[1]=$+ie*I,l[5]=R*V,l[9]=ue-X*I,l[2]=-R*N,l[6]=I,l[10]=R*O}else if(r.order==="ZYX"){const X=R*V,$=R*Q,ie=I*V,ue=I*Q;l[0]=O*V,l[4]=ie*N-$,l[8]=X*N+ue,l[1]=O*Q,l[5]=ue*N+X,l[9]=$*N-ie,l[2]=-N,l[6]=I*O,l[10]=R*O}else if(r.order==="YZX"){const X=R*O,$=R*N,ie=I*O,ue=I*N;l[0]=O*V,l[4]=ue-X*Q,l[8]=ie*Q+$,l[1]=Q,l[5]=R*V,l[9]=-I*V,l[2]=-N*V,l[6]=$*Q+ie,l[10]=X-ue*Q}else if(r.order==="XZY"){const X=R*O,$=R*N,ie=I*O,ue=I*N;l[0]=O*V,l[4]=-Q,l[8]=N*V,l[1]=X*Q+ue,l[5]=R*V,l[9]=$*Q-ie,l[2]=ie*Q-$,l[6]=I*V,l[10]=ue*Q+X}return l[3]=0,l[7]=0,l[11]=0,l[12]=0,l[13]=0,l[14]=0,l[15]=1,this}makeRotationFromQuaternion(r){return this.compose(_P,r,wP)}lookAt(r,l,m){const y=this.elements;return Oo.subVectors(r,l),Oo.lengthSq()===0&&(Oo.z=1),Oo.normalize(),cc.crossVectors(m,Oo),cc.lengthSq()===0&&(Math.abs(m.z)===1?Oo.x+=1e-4:Oo.z+=1e-4,Oo.normalize(),cc.crossVectors(m,Oo)),cc.normalize(),$m.crossVectors(Oo,cc),y[0]=cc.x,y[4]=$m.x,y[8]=Oo.x,y[1]=cc.y,y[5]=$m.y,y[9]=Oo.y,y[2]=cc.z,y[6]=$m.z,y[10]=Oo.z,this}multiply(r){return this.multiplyMatrices(this,r)}premultiply(r){return this.multiplyMatrices(r,this)}multiplyMatrices(r,l){const m=r.elements,y=l.elements,_=this.elements,R=m[0],I=m[4],O=m[8],N=m[12],V=m[1],Q=m[5],X=m[9],$=m[13],ie=m[2],ue=m[6],re=m[10],q=m[14],Se=m[3],fe=m[7],Me=m[11],ze=m[15],He=y[0],et=y[4],st=y[8],Be=y[12],Xe=y[1],rt=y[5],bt=y[9],Gt=y[13],lt=y[2],wt=y[6],Kt=y[10],qt=y[14],ln=y[3],Jt=y[7],pn=y[11],dn=y[15];return _[0]=R*He+I*Xe+O*lt+N*ln,_[4]=R*et+I*rt+O*wt+N*Jt,_[8]=R*st+I*bt+O*Kt+N*pn,_[12]=R*Be+I*Gt+O*qt+N*dn,_[1]=V*He+Q*Xe+X*lt+$*ln,_[5]=V*et+Q*rt+X*wt+$*Jt,_[9]=V*st+Q*bt+X*Kt+$*pn,_[13]=V*Be+Q*Gt+X*qt+$*dn,_[2]=ie*He+ue*Xe+re*lt+q*ln,_[6]=ie*et+ue*rt+re*wt+q*Jt,_[10]=ie*st+ue*bt+re*Kt+q*pn,_[14]=ie*Be+ue*Gt+re*qt+q*dn,_[3]=Se*He+fe*Xe+Me*lt+ze*ln,_[7]=Se*et+fe*rt+Me*wt+ze*Jt,_[11]=Se*st+fe*bt+Me*Kt+ze*pn,_[15]=Se*Be+fe*Gt+Me*qt+ze*dn,this}multiplyScalar(r){const l=this.elements;return l[0]*=r,l[4]*=r,l[8]*=r,l[12]*=r,l[1]*=r,l[5]*=r,l[9]*=r,l[13]*=r,l[2]*=r,l[6]*=r,l[10]*=r,l[14]*=r,l[3]*=r,l[7]*=r,l[11]*=r,l[15]*=r,this}determinant(){const r=this.elements,l=r[0],m=r[4],y=r[8],_=r[12],R=r[1],I=r[5],O=r[9],N=r[13],V=r[2],Q=r[6],X=r[10],$=r[14],ie=r[3],ue=r[7],re=r[11],q=r[15];return ie*(+_*O*Q-y*N*Q-_*I*X+m*N*X+y*I*$-m*O*$)+ue*(+l*O*$-l*N*X+_*R*X-y*R*$+y*N*V-_*O*V)+re*(+l*N*Q-l*I*$-_*R*Q+m*R*$+_*I*V-m*N*V)+q*(-y*I*V-l*O*Q+l*I*X+y*R*Q-m*R*X+m*O*V)}transpose(){const r=this.elements;let l;return l=r[1],r[1]=r[4],r[4]=l,l=r[2],r[2]=r[8],r[8]=l,l=r[6],r[6]=r[9],r[9]=l,l=r[3],r[3]=r[12],r[12]=l,l=r[7],r[7]=r[13],r[13]=l,l=r[11],r[11]=r[14],r[14]=l,this}setPosition(r,l,m){const y=this.elements;return r.isVector3?(y[12]=r.x,y[13]=r.y,y[14]=r.z):(y[12]=r,y[13]=l,y[14]=m),this}invert(){const r=this.elements,l=r[0],m=r[1],y=r[2],_=r[3],R=r[4],I=r[5],O=r[6],N=r[7],V=r[8],Q=r[9],X=r[10],$=r[11],ie=r[12],ue=r[13],re=r[14],q=r[15],Se=Q*re*N-ue*X*N+ue*O*$-I*re*$-Q*O*q+I*X*q,fe=ie*X*N-V*re*N-ie*O*$+R*re*$+V*O*q-R*X*q,Me=V*ue*N-ie*Q*N+ie*I*$-R*ue*$-V*I*q+R*Q*q,ze=ie*Q*O-V*ue*O-ie*I*X+R*ue*X+V*I*re-R*Q*re,He=l*Se+m*fe+y*Me+_*ze;if(He===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const et=1/He;return r[0]=Se*et,r[1]=(ue*X*_-Q*re*_-ue*y*$+m*re*$+Q*y*q-m*X*q)*et,r[2]=(I*re*_-ue*O*_+ue*y*N-m*re*N-I*y*q+m*O*q)*et,r[3]=(Q*O*_-I*X*_-Q*y*N+m*X*N+I*y*$-m*O*$)*et,r[4]=fe*et,r[5]=(V*re*_-ie*X*_+ie*y*$-l*re*$-V*y*q+l*X*q)*et,r[6]=(ie*O*_-R*re*_-ie*y*N+l*re*N+R*y*q-l*O*q)*et,r[7]=(R*X*_-V*O*_+V*y*N-l*X*N-R*y*$+l*O*$)*et,r[8]=Me*et,r[9]=(ie*Q*_-V*ue*_-ie*m*$+l*ue*$+V*m*q-l*Q*q)*et,r[10]=(R*ue*_-ie*I*_+ie*m*N-l*ue*N-R*m*q+l*I*q)*et,r[11]=(V*I*_-R*Q*_-V*m*N+l*Q*N+R*m*$-l*I*$)*et,r[12]=ze*et,r[13]=(V*ue*y-ie*Q*y+ie*m*X-l*ue*X-V*m*re+l*Q*re)*et,r[14]=(ie*I*y-R*ue*y-ie*m*O+l*ue*O+R*m*re-l*I*re)*et,r[15]=(R*Q*y-V*I*y+V*m*O-l*Q*O-R*m*X+l*I*X)*et,this}scale(r){const l=this.elements,m=r.x,y=r.y,_=r.z;return l[0]*=m,l[4]*=y,l[8]*=_,l[1]*=m,l[5]*=y,l[9]*=_,l[2]*=m,l[6]*=y,l[10]*=_,l[3]*=m,l[7]*=y,l[11]*=_,this}getMaxScaleOnAxis(){const r=this.elements,l=r[0]*r[0]+r[1]*r[1]+r[2]*r[2],m=r[4]*r[4]+r[5]*r[5]+r[6]*r[6],y=r[8]*r[8]+r[9]*r[9]+r[10]*r[10];return Math.sqrt(Math.max(l,m,y))}makeTranslation(r,l,m){return r.isVector3?this.set(1,0,0,r.x,0,1,0,r.y,0,0,1,r.z,0,0,0,1):this.set(1,0,0,r,0,1,0,l,0,0,1,m,0,0,0,1),this}makeRotationX(r){const l=Math.cos(r),m=Math.sin(r);return this.set(1,0,0,0,0,l,-m,0,0,m,l,0,0,0,0,1),this}makeRotationY(r){const l=Math.cos(r),m=Math.sin(r);return this.set(l,0,m,0,0,1,0,0,-m,0,l,0,0,0,0,1),this}makeRotationZ(r){const l=Math.cos(r),m=Math.sin(r);return this.set(l,-m,0,0,m,l,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(r,l){const m=Math.cos(l),y=Math.sin(l),_=1-m,R=r.x,I=r.y,O=r.z,N=_*R,V=_*I;return this.set(N*R+m,N*I-y*O,N*O+y*I,0,N*I+y*O,V*I+m,V*O-y*R,0,N*O-y*I,V*O+y*R,_*O*O+m,0,0,0,0,1),this}makeScale(r,l,m){return this.set(r,0,0,0,0,l,0,0,0,0,m,0,0,0,0,1),this}makeShear(r,l,m,y,_,R){return this.set(1,m,_,0,r,1,R,0,l,y,1,0,0,0,0,1),this}compose(r,l,m){const y=this.elements,_=l._x,R=l._y,I=l._z,O=l._w,N=_+_,V=R+R,Q=I+I,X=_*N,$=_*V,ie=_*Q,ue=R*V,re=R*Q,q=I*Q,Se=O*N,fe=O*V,Me=O*Q,ze=m.x,He=m.y,et=m.z;return y[0]=(1-(ue+q))*ze,y[1]=($+Me)*ze,y[2]=(ie-fe)*ze,y[3]=0,y[4]=($-Me)*He,y[5]=(1-(X+q))*He,y[6]=(re+Se)*He,y[7]=0,y[8]=(ie+fe)*et,y[9]=(re-Se)*et,y[10]=(1-(X+ue))*et,y[11]=0,y[12]=r.x,y[13]=r.y,y[14]=r.z,y[15]=1,this}decompose(r,l,m){const y=this.elements;let _=hl.set(y[0],y[1],y[2]).length();const R=hl.set(y[4],y[5],y[6]).length(),I=hl.set(y[8],y[9],y[10]).length();this.determinant()<0&&(_=-_),r.x=y[12],r.y=y[13],r.z=y[14],ua.copy(this);const N=1/_,V=1/R,Q=1/I;return ua.elements[0]*=N,ua.elements[1]*=N,ua.elements[2]*=N,ua.elements[4]*=V,ua.elements[5]*=V,ua.elements[6]*=V,ua.elements[8]*=Q,ua.elements[9]*=Q,ua.elements[10]*=Q,l.setFromRotationMatrix(ua),m.x=_,m.y=R,m.z=I,this}makePerspective(r,l,m,y,_,R,I=Yo){const O=this.elements,N=2*_/(l-r),V=2*_/(m-y),Q=(l+r)/(l-r),X=(m+y)/(m-y);let $,ie;if(I===Yo)$=-(R+_)/(R-_),ie=-2*R*_/(R-_);else if(I===lh)$=-R/(R-_),ie=-R*_/(R-_);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+I);return O[0]=N,O[4]=0,O[8]=Q,O[12]=0,O[1]=0,O[5]=V,O[9]=X,O[13]=0,O[2]=0,O[6]=0,O[10]=$,O[14]=ie,O[3]=0,O[7]=0,O[11]=-1,O[15]=0,this}makeOrthographic(r,l,m,y,_,R,I=Yo){const O=this.elements,N=1/(l-r),V=1/(m-y),Q=1/(R-_),X=(l+r)*N,$=(m+y)*V;let ie,ue;if(I===Yo)ie=(R+_)*Q,ue=-2*Q;else if(I===lh)ie=_*Q,ue=-1*Q;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+I);return O[0]=2*N,O[4]=0,O[8]=0,O[12]=-X,O[1]=0,O[5]=2*V,O[9]=0,O[13]=-$,O[2]=0,O[6]=0,O[10]=ue,O[14]=-ie,O[3]=0,O[7]=0,O[11]=0,O[15]=1,this}equals(r){const l=this.elements,m=r.elements;for(let y=0;y<16;y++)if(l[y]!==m[y])return!1;return!0}fromArray(r,l=0){for(let m=0;m<16;m++)this.elements[m]=r[m+l];return this}toArray(r=[],l=0){const m=this.elements;return r[l]=m[0],r[l+1]=m[1],r[l+2]=m[2],r[l+3]=m[3],r[l+4]=m[4],r[l+5]=m[5],r[l+6]=m[6],r[l+7]=m[7],r[l+8]=m[8],r[l+9]=m[9],r[l+10]=m[10],r[l+11]=m[11],r[l+12]=m[12],r[l+13]=m[13],r[l+14]=m[14],r[l+15]=m[15],r}}const hl=new je,ua=new _i,_P=new je(0,0,0),wP=new je(1,1,1),cc=new je,$m=new je,Oo=new je,bw=new _i,_w=new Ti;class Df{constructor(r=0,l=0,m=0,y=Df.DEFAULT_ORDER){this.isEuler=!0,this._x=r,this._y=l,this._z=m,this._order=y}get x(){return this._x}set x(r){this._x=r,this._onChangeCallback()}get y(){return this._y}set y(r){this._y=r,this._onChangeCallback()}get z(){return this._z}set z(r){this._z=r,this._onChangeCallback()}get order(){return this._order}set order(r){this._order=r,this._onChangeCallback()}set(r,l,m,y=this._order){return this._x=r,this._y=l,this._z=m,this._order=y,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(r){return this._x=r._x,this._y=r._y,this._z=r._z,this._order=r._order,this._onChangeCallback(),this}setFromRotationMatrix(r,l=this._order,m=!0){const y=r.elements,_=y[0],R=y[4],I=y[8],O=y[1],N=y[5],V=y[9],Q=y[2],X=y[6],$=y[10];switch(l){case"XYZ":this._y=Math.asin(Nr(I,-1,1)),Math.abs(I)<.9999999?(this._x=Math.atan2(-V,$),this._z=Math.atan2(-R,_)):(this._x=Math.atan2(X,N),this._z=0);break;case"YXZ":this._x=Math.asin(-Nr(V,-1,1)),Math.abs(V)<.9999999?(this._y=Math.atan2(I,$),this._z=Math.atan2(O,N)):(this._y=Math.atan2(-Q,_),this._z=0);break;case"ZXY":this._x=Math.asin(Nr(X,-1,1)),Math.abs(X)<.9999999?(this._y=Math.atan2(-Q,$),this._z=Math.atan2(-R,N)):(this._y=0,this._z=Math.atan2(O,_));break;case"ZYX":this._y=Math.asin(-Nr(Q,-1,1)),Math.abs(Q)<.9999999?(this._x=Math.atan2(X,$),this._z=Math.atan2(O,_)):(this._x=0,this._z=Math.atan2(-R,N));break;case"YZX":this._z=Math.asin(Nr(O,-1,1)),Math.abs(O)<.9999999?(this._x=Math.atan2(-V,N),this._y=Math.atan2(-Q,_)):(this._x=0,this._y=Math.atan2(I,$));break;case"XZY":this._z=Math.asin(-Nr(R,-1,1)),Math.abs(R)<.9999999?(this._x=Math.atan2(X,N),this._y=Math.atan2(I,_)):(this._x=Math.atan2(-V,$),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+l)}return this._order=l,m===!0&&this._onChangeCallback(),this}setFromQuaternion(r,l,m){return bw.makeRotationFromQuaternion(r),this.setFromRotationMatrix(bw,l,m)}setFromVector3(r,l=this._order){return this.set(r.x,r.y,r.z,l)}reorder(r){return _w.setFromEuler(this),this.setFromQuaternion(_w,r)}equals(r){return r._x===this._x&&r._y===this._y&&r._z===this._z&&r._order===this._order}fromArray(r){return this._x=r[0],this._y=r[1],this._z=r[2],r[3]!==void 0&&(this._order=r[3]),this._onChangeCallback(),this}toArray(r=[],l=0){return r[l]=this._x,r[l+1]=this._y,r[l+2]=this._z,r[l+3]=this._order,r}_onChange(r){return this._onChangeCallback=r,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Df.DEFAULT_ORDER="XYZ";class Jm{constructor(){this.mask=1}set(r){this.mask=(1<>>0}enable(r){this.mask|=1<1){for(let l=0;l1){for(let m=0;m0&&(m=m.concat(R))}return m}getWorldPosition(r){return this.updateWorldMatrix(!0,!1),r.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(r){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Of,r,CP),r}getWorldScale(r){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Of,SP,r),r}getWorldDirection(r){this.updateWorldMatrix(!0,!1);const l=this.matrixWorld.elements;return r.set(l[8],l[9],l[10]).normalize()}raycast(){}traverse(r){r(this);const l=this.children;for(let m=0,y=l.length;m0&&(y.userData=this.userData),y.layers=this.layers.mask,y.matrix=this.matrix.toArray(),y.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(y.matrixAutoUpdate=!1),this.isInstancedMesh&&(y.type="InstancedMesh",y.count=this.count,y.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(y.instanceColor=this.instanceColor.toJSON()));function _(I,O){return I[O.uuid]===void 0&&(I[O.uuid]=O.toJSON(r)),O.uuid}if(this.isScene)this.background&&(this.background.isColor?y.background=this.background.toJSON():this.background.isTexture&&(y.background=this.background.toJSON(r).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(y.environment=this.environment.toJSON(r).uuid);else if(this.isMesh||this.isLine||this.isPoints){y.geometry=_(r.geometries,this.geometry);const I=this.geometry.parameters;if(I!==void 0&&I.shapes!==void 0){const O=I.shapes;if(Array.isArray(O))for(let N=0,V=O.length;N0){y.children=[];for(let I=0;I0){y.animations=[];for(let I=0;I0&&(m.geometries=I),O.length>0&&(m.materials=O),N.length>0&&(m.textures=N),V.length>0&&(m.images=V),Q.length>0&&(m.shapes=Q),X.length>0&&(m.skeletons=X),$.length>0&&(m.animations=$),ie.length>0&&(m.nodes=ie)}return m.object=y,m;function R(I){const O=[];for(const N in I){const V=I[N];delete V.metadata,O.push(V)}return O}}clone(r){return new this.constructor().copy(this,r)}copy(r,l=!0){if(this.name=r.name,this.up.copy(r.up),this.position.copy(r.position),this.rotation.order=r.rotation.order,this.quaternion.copy(r.quaternion),this.scale.copy(r.scale),this.matrix.copy(r.matrix),this.matrixWorld.copy(r.matrixWorld),this.matrixAutoUpdate=r.matrixAutoUpdate,this.matrixWorldNeedsUpdate=r.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=r.matrixWorldAutoUpdate,this.layers.mask=r.layers.mask,this.visible=r.visible,this.castShadow=r.castShadow,this.receiveShadow=r.receiveShadow,this.frustumCulled=r.frustumCulled,this.renderOrder=r.renderOrder,this.animations=r.animations.slice(),this.userData=JSON.parse(JSON.stringify(r.userData)),l===!0)for(let m=0;m0?y.multiplyScalar(1/Math.sqrt(_)):y.set(0,0,0)}static getBarycoord(r,l,m,y,_){da.subVectors(y,l),dl.subVectors(m,l),Qy.subVectors(r,l);const R=da.dot(da),I=da.dot(dl),O=da.dot(Qy),N=dl.dot(dl),V=dl.dot(Qy),Q=R*N-I*I;if(Q===0)return _.set(-2,-1,-1);const X=1/Q,$=(N*O-I*V)*X,ie=(R*V-I*O)*X;return _.set(1-$-ie,ie,$)}static containsPoint(r,l,m,y){return this.getBarycoord(r,l,m,y,fl),fl.x>=0&&fl.y>=0&&fl.x+fl.y<=1}static getUV(r,l,m,y,_,R,I,O){return eg===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),eg=!0),this.getInterpolation(r,l,m,y,_,R,I,O)}static getInterpolation(r,l,m,y,_,R,I,O){return this.getBarycoord(r,l,m,y,fl),O.setScalar(0),O.addScaledVector(_,fl.x),O.addScaledVector(R,fl.y),O.addScaledVector(I,fl.z),O}static isFrontFacing(r,l,m,y){return da.subVectors(m,l),dl.subVectors(r,l),da.cross(dl).dot(y)<0}set(r,l,m){return this.a.copy(r),this.b.copy(l),this.c.copy(m),this}setFromPointsAndIndices(r,l,m,y){return this.a.copy(r[l]),this.b.copy(r[m]),this.c.copy(r[y]),this}setFromAttributeAndIndices(r,l,m,y){return this.a.fromBufferAttribute(r,l),this.b.fromBufferAttribute(r,m),this.c.fromBufferAttribute(r,y),this}clone(){return new this.constructor().copy(this)}copy(r){return this.a.copy(r.a),this.b.copy(r.b),this.c.copy(r.c),this}getArea(){return da.subVectors(this.c,this.b),dl.subVectors(this.a,this.b),da.cross(dl).length()*.5}getMidpoint(r){return r.addVectors(this.a,this.b).add(this.c).multiplyScalar(.3333333333333333)}getNormal(r){return bo.getNormal(this.a,this.b,this.c,r)}getPlane(r){return r.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(r,l){return bo.getBarycoord(r,this.a,this.b,this.c,l)}getUV(r,l,m,y,_){return eg===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),eg=!0),bo.getInterpolation(r,this.a,this.b,this.c,l,m,y,_)}getInterpolation(r,l,m,y,_){return bo.getInterpolation(r,this.a,this.b,this.c,l,m,y,_)}containsPoint(r){return bo.containsPoint(r,this.a,this.b,this.c)}isFrontFacing(r){return bo.isFrontFacing(this.a,this.b,this.c,r)}intersectsBox(r){return r.intersectsTriangle(this)}closestPointToPoint(r,l){const m=this.a,y=this.b,_=this.c;let R,I;wu.subVectors(y,m),Mu.subVectors(_,m),Xy.subVectors(r,m);const O=wu.dot(Xy),N=Mu.dot(Xy);if(O<=0&&N<=0)return l.copy(m);Ky.subVectors(r,y);const V=wu.dot(Ky),Q=Mu.dot(Ky);if(V>=0&&Q<=V)return l.copy(y);const X=O*Q-V*N;if(X<=0&&O>=0&&V<=0)return R=O/(O-V),l.copy(m).addScaledVector(wu,R);qy.subVectors(r,_);const $=wu.dot(qy),ie=Mu.dot(qy);if(ie>=0&&$<=ie)return l.copy(_);const ue=$*N-O*ie;if(ue<=0&&N>=0&&ie<=0)return I=N/(N-ie),l.copy(m).addScaledVector(Mu,I);const re=V*ie-$*Q;if(re<=0&&Q-V>=0&&$-ie>=0)return Tw.subVectors(_,y),I=(Q-V)/(Q-V+($-ie)),l.copy(y).addScaledVector(Tw,I);const q=1/(re+ue+X);return R=ue*q,I=X*q,l.copy(m).addScaledVector(wu,R).addScaledVector(Mu,I)}equals(r){return r.a.equals(this.a)&&r.b.equals(this.b)&&r.c.equals(this.c)}}const Rw={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},hc={h:0,s:0,l:0},tg={h:0,s:0,l:0};function Yy(w,r,l){return l<0&&(l+=1),l>1&&(l-=1),l<.16666666666666666?w+(r-w)*6*l:l<.5?r:l<.6666666666666666?w+(r-w)*6*(.6666666666666666-l):w}class Hn{constructor(r,l,m){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(r,l,m)}set(r,l,m){if(l===void 0&&m===void 0){const y=r;y&&y.isColor?this.copy(y):typeof y=="number"?this.setHex(y):typeof y=="string"&&this.setStyle(y)}else this.setRGB(r,l,m);return this}setScalar(r){return this.r=r,this.g=r,this.b=r,this}setHex(r,l=Cr){return r=Math.floor(r),this.r=(r>>16&255)/255,this.g=(r>>8&255)/255,this.b=(r&255)/255,vr.toWorkingColorSpace(this,l),this}setRGB(r,l,m,y=vr.workingColorSpace){return this.r=r,this.g=l,this.b=m,vr.toWorkingColorSpace(this,y),this}setHSL(r,l,m,y=vr.workingColorSpace){if(r=Sf(r,1),l=Nr(l,0,1),m=Nr(m,0,1),l===0)this.r=this.g=this.b=m;else{const _=m<=.5?m*(1+l):m+l-m*l,R=2*m-_;this.r=Yy(R,_,r+.3333333333333333),this.g=Yy(R,_,r),this.b=Yy(R,_,r-.3333333333333333)}return vr.toWorkingColorSpace(this,y),this}setStyle(r,l=Cr){function m(_){_!==void 0&&parseFloat(_)<1&&console.warn("THREE.Color: Alpha component of "+r+" will be ignored.")}let y;if(y=/^(\w+)\(([^\)]*)\)/.exec(r)){let _;const R=y[1],I=y[2];switch(R){case"rgb":case"rgba":if(_=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(I))return m(_[4]),this.setRGB(Math.min(255,parseInt(_[1],10))/255,Math.min(255,parseInt(_[2],10))/255,Math.min(255,parseInt(_[3],10))/255,l);if(_=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(I))return m(_[4]),this.setRGB(Math.min(100,parseInt(_[1],10))/100,Math.min(100,parseInt(_[2],10))/100,Math.min(100,parseInt(_[3],10))/100,l);break;case"hsl":case"hsla":if(_=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(I))return m(_[4]),this.setHSL(parseFloat(_[1])/360,parseFloat(_[2])/100,parseFloat(_[3])/100,l);break;default:console.warn("THREE.Color: Unknown color model "+r)}}else if(y=/^\#([A-Fa-f\d]+)$/.exec(r)){const _=y[1],R=_.length;if(R===3)return this.setRGB(parseInt(_.charAt(0),16)/15,parseInt(_.charAt(1),16)/15,parseInt(_.charAt(2),16)/15,l);if(R===6)return this.setHex(parseInt(_,16),l);console.warn("THREE.Color: Invalid hex color "+r)}else if(r&&r.length>0)return this.setColorName(r,l);return this}setColorName(r,l=Cr){const m=Rw[r.toLowerCase()];return m!==void 0?this.setHex(m,l):console.warn("THREE.Color: Unknown color "+r),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(r){return this.r=r.r,this.g=r.g,this.b=r.b,this}copySRGBToLinear(r){return this.r=ac(r.r),this.g=ac(r.g),this.b=ac(r.b),this}copyLinearToSRGB(r){return this.r=If(r.r),this.g=If(r.g),this.b=If(r.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(r=Cr){return vr.fromWorkingColorSpace(Hs.copy(this),r),Math.round(Nr(Hs.r*255,0,255))*65536+Math.round(Nr(Hs.g*255,0,255))*256+Math.round(Nr(Hs.b*255,0,255))}getHexString(r=Cr){return("000000"+this.getHex(r).toString(16)).slice(-6)}getHSL(r,l=vr.workingColorSpace){vr.fromWorkingColorSpace(Hs.copy(this),l);const m=Hs.r,y=Hs.g,_=Hs.b,R=Math.max(m,y,_),I=Math.min(m,y,_);let O,N;const V=(I+R)/2;if(I===R)O=0,N=0;else{const Q=R-I;switch(N=V<=.5?Q/(R+I):Q/(2-R-I),R){case m:O=(y-_)/Q+(y<_?6:0);break;case y:O=(_-m)/Q+2;break;case _:O=(m-y)/Q+4;break}O/=6}return r.h=O,r.s=N,r.l=V,r}getRGB(r,l=vr.workingColorSpace){return vr.fromWorkingColorSpace(Hs.copy(this),l),r.r=Hs.r,r.g=Hs.g,r.b=Hs.b,r}getStyle(r=Cr){vr.fromWorkingColorSpace(Hs.copy(this),r);const l=Hs.r,m=Hs.g,y=Hs.b;return r!==Cr?`color(${r} ${l.toFixed(3)} ${m.toFixed(3)} ${y.toFixed(3)})`:`rgb(${Math.round(l*255)},${Math.round(m*255)},${Math.round(y*255)})`}offsetHSL(r,l,m){return this.getHSL(hc),this.setHSL(hc.h+r,hc.s+l,hc.l+m)}add(r){return this.r+=r.r,this.g+=r.g,this.b+=r.b,this}addColors(r,l){return this.r=r.r+l.r,this.g=r.g+l.g,this.b=r.b+l.b,this}addScalar(r){return this.r+=r,this.g+=r,this.b+=r,this}sub(r){return this.r=Math.max(0,this.r-r.r),this.g=Math.max(0,this.g-r.g),this.b=Math.max(0,this.b-r.b),this}multiply(r){return this.r*=r.r,this.g*=r.g,this.b*=r.b,this}multiplyScalar(r){return this.r*=r,this.g*=r,this.b*=r,this}lerp(r,l){return this.r+=(r.r-this.r)*l,this.g+=(r.g-this.g)*l,this.b+=(r.b-this.b)*l,this}lerpColors(r,l,m){return this.r=r.r+(l.r-r.r)*m,this.g=r.g+(l.g-r.g)*m,this.b=r.b+(l.b-r.b)*m,this}lerpHSL(r,l){this.getHSL(hc),r.getHSL(tg);const m=ch(hc.h,tg.h,l),y=ch(hc.s,tg.s,l),_=ch(hc.l,tg.l,l);return this.setHSL(m,y,_),this}setFromVector3(r){return this.r=r.x,this.g=r.y,this.b=r.z,this}applyMatrix3(r){const l=this.r,m=this.g,y=this.b,_=r.elements;return this.r=_[0]*l+_[3]*m+_[6]*y,this.g=_[1]*l+_[4]*m+_[7]*y,this.b=_[2]*l+_[5]*m+_[8]*y,this}equals(r){return r.r===this.r&&r.g===this.g&&r.b===this.b}fromArray(r,l=0){return this.r=r[l],this.g=r[l+1],this.b=r[l+2],this}toArray(r=[],l=0){return r[l]=this.r,r[l+1]=this.g,r[l+2]=this.b,r}fromBufferAttribute(r,l){return this.r=r.getX(l),this.g=r.getY(l),this.b=r.getZ(l),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Hs=new Hn;Hn.NAMES=Rw;let IP=0;class js extends to{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:IP++}),this.uuid=no(),this.name="",this.type="Material",this.blending=D,this.side=C,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Pe,this.blendDst=me,this.blendEquation=z,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Hn(0,0,0),this.blendAlpha=0,this.depthFunc=Tn,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Mf,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=ol,this.stencilZFail=ol,this.stencilZPass=ol,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(r){this._alphaTest>0!=r>0&&this.version++,this._alphaTest=r}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(r){if(r!==void 0)for(const l in r){const m=r[l];if(m===void 0){console.warn(`THREE.Material: parameter '${l}' has value of undefined.`);continue}const y=this[l];if(y===void 0){console.warn(`THREE.Material: '${l}' is not a property of THREE.${this.type}.`);continue}y&&y.isColor?y.set(m):y&&y.isVector3&&m&&m.isVector3?y.copy(m):this[l]=m}}toJSON(r){const l=r===void 0||typeof r=="string";l&&(r={textures:{},images:{}});const m={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};m.uuid=this.uuid,m.type=this.type,this.name!==""&&(m.name=this.name),this.color&&this.color.isColor&&(m.color=this.color.getHex()),this.roughness!==void 0&&(m.roughness=this.roughness),this.metalness!==void 0&&(m.metalness=this.metalness),this.sheen!==void 0&&(m.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(m.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(m.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(m.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(m.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(m.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(m.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(m.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(m.shininess=this.shininess),this.clearcoat!==void 0&&(m.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(m.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(m.clearcoatMap=this.clearcoatMap.toJSON(r).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(m.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(r).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(m.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(r).uuid,m.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(m.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(m.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(m.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(m.iridescenceMap=this.iridescenceMap.toJSON(r).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(m.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(r).uuid),this.anisotropy!==void 0&&(m.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(m.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(m.anisotropyMap=this.anisotropyMap.toJSON(r).uuid),this.map&&this.map.isTexture&&(m.map=this.map.toJSON(r).uuid),this.matcap&&this.matcap.isTexture&&(m.matcap=this.matcap.toJSON(r).uuid),this.alphaMap&&this.alphaMap.isTexture&&(m.alphaMap=this.alphaMap.toJSON(r).uuid),this.lightMap&&this.lightMap.isTexture&&(m.lightMap=this.lightMap.toJSON(r).uuid,m.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(m.aoMap=this.aoMap.toJSON(r).uuid,m.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(m.bumpMap=this.bumpMap.toJSON(r).uuid,m.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(m.normalMap=this.normalMap.toJSON(r).uuid,m.normalMapType=this.normalMapType,m.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(m.displacementMap=this.displacementMap.toJSON(r).uuid,m.displacementScale=this.displacementScale,m.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(m.roughnessMap=this.roughnessMap.toJSON(r).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(m.metalnessMap=this.metalnessMap.toJSON(r).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(m.emissiveMap=this.emissiveMap.toJSON(r).uuid),this.specularMap&&this.specularMap.isTexture&&(m.specularMap=this.specularMap.toJSON(r).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(m.specularIntensityMap=this.specularIntensityMap.toJSON(r).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(m.specularColorMap=this.specularColorMap.toJSON(r).uuid),this.envMap&&this.envMap.isTexture&&(m.envMap=this.envMap.toJSON(r).uuid,this.combine!==void 0&&(m.combine=this.combine)),this.envMapIntensity!==void 0&&(m.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(m.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(m.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(m.gradientMap=this.gradientMap.toJSON(r).uuid),this.transmission!==void 0&&(m.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(m.transmissionMap=this.transmissionMap.toJSON(r).uuid),this.thickness!==void 0&&(m.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(m.thicknessMap=this.thicknessMap.toJSON(r).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(m.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(m.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(m.size=this.size),this.shadowSide!==null&&(m.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(m.sizeAttenuation=this.sizeAttenuation),this.blending!==D&&(m.blending=this.blending),this.side!==C&&(m.side=this.side),this.vertexColors===!0&&(m.vertexColors=!0),this.opacity<1&&(m.opacity=this.opacity),this.transparent===!0&&(m.transparent=!0),this.blendSrc!==Pe&&(m.blendSrc=this.blendSrc),this.blendDst!==me&&(m.blendDst=this.blendDst),this.blendEquation!==z&&(m.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(m.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(m.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(m.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(m.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(m.blendAlpha=this.blendAlpha),this.depthFunc!==Tn&&(m.depthFunc=this.depthFunc),this.depthTest===!1&&(m.depthTest=this.depthTest),this.depthWrite===!1&&(m.depthWrite=this.depthWrite),this.colorWrite===!1&&(m.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(m.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Mf&&(m.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(m.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(m.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ol&&(m.stencilFail=this.stencilFail),this.stencilZFail!==ol&&(m.stencilZFail=this.stencilZFail),this.stencilZPass!==ol&&(m.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(m.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(m.rotation=this.rotation),this.polygonOffset===!0&&(m.polygonOffset=!0),this.polygonOffsetFactor!==0&&(m.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(m.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(m.linewidth=this.linewidth),this.dashSize!==void 0&&(m.dashSize=this.dashSize),this.gapSize!==void 0&&(m.gapSize=this.gapSize),this.scale!==void 0&&(m.scale=this.scale),this.dithering===!0&&(m.dithering=!0),this.alphaTest>0&&(m.alphaTest=this.alphaTest),this.alphaHash===!0&&(m.alphaHash=!0),this.alphaToCoverage===!0&&(m.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(m.premultipliedAlpha=!0),this.forceSinglePass===!0&&(m.forceSinglePass=!0),this.wireframe===!0&&(m.wireframe=!0),this.wireframeLinewidth>1&&(m.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(m.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(m.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(m.flatShading=!0),this.visible===!1&&(m.visible=!1),this.toneMapped===!1&&(m.toneMapped=!1),this.fog===!1&&(m.fog=!1),Object.keys(this.userData).length>0&&(m.userData=this.userData);function y(_){const R=[];for(const I in _){const O=_[I];delete O.metadata,R.push(O)}return R}if(l){const _=y(r.textures),R=y(r.images);_.length>0&&(m.textures=_),R.length>0&&(m.images=R)}return m}clone(){return new this.constructor().copy(this)}copy(r){this.name=r.name,this.blending=r.blending,this.side=r.side,this.vertexColors=r.vertexColors,this.opacity=r.opacity,this.transparent=r.transparent,this.blendSrc=r.blendSrc,this.blendDst=r.blendDst,this.blendEquation=r.blendEquation,this.blendSrcAlpha=r.blendSrcAlpha,this.blendDstAlpha=r.blendDstAlpha,this.blendEquationAlpha=r.blendEquationAlpha,this.blendColor.copy(r.blendColor),this.blendAlpha=r.blendAlpha,this.depthFunc=r.depthFunc,this.depthTest=r.depthTest,this.depthWrite=r.depthWrite,this.stencilWriteMask=r.stencilWriteMask,this.stencilFunc=r.stencilFunc,this.stencilRef=r.stencilRef,this.stencilFuncMask=r.stencilFuncMask,this.stencilFail=r.stencilFail,this.stencilZFail=r.stencilZFail,this.stencilZPass=r.stencilZPass,this.stencilWrite=r.stencilWrite;const l=r.clippingPlanes;let m=null;if(l!==null){const y=l.length;m=new Array(y);for(let _=0;_!==y;++_)m[_]=l[_].clone()}return this.clippingPlanes=m,this.clipIntersection=r.clipIntersection,this.clipShadows=r.clipShadows,this.shadowSide=r.shadowSide,this.colorWrite=r.colorWrite,this.precision=r.precision,this.polygonOffset=r.polygonOffset,this.polygonOffsetFactor=r.polygonOffsetFactor,this.polygonOffsetUnits=r.polygonOffsetUnits,this.dithering=r.dithering,this.alphaTest=r.alphaTest,this.alphaHash=r.alphaHash,this.alphaToCoverage=r.alphaToCoverage,this.premultipliedAlpha=r.premultipliedAlpha,this.forceSinglePass=r.forceSinglePass,this.visible=r.visible,this.toneMapped=r.toneMapped,this.userData=JSON.parse(JSON.stringify(r.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(r){r===!0&&this.version++}}class uc extends js{constructor(r){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Hn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Nt,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.specularMap=r.specularMap,this.alphaMap=r.alphaMap,this.envMap=r.envMap,this.combine=r.combine,this.reflectivity=r.reflectivity,this.refractionRatio=r.refractionRatio,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.fog=r.fog,this}}const pl=BP();function BP(){const w=new ArrayBuffer(4),r=new Float32Array(w),l=new Uint32Array(w),m=new Uint32Array(512),y=new Uint32Array(512);for(let O=0;O<256;++O){const N=O-127;N<-27?(m[O]=0,m[O|256]=32768,y[O]=24,y[O|256]=24):N<-14?(m[O]=1024>>-N-14,m[O|256]=1024>>-N-14|32768,y[O]=-N-1,y[O|256]=-N-1):N<=15?(m[O]=N+15<<10,m[O|256]=N+15<<10|32768,y[O]=13,y[O|256]=13):N<128?(m[O]=31744,m[O|256]=64512,y[O]=24,y[O|256]=24):(m[O]=31744,m[O|256]=64512,y[O]=13,y[O|256]=13)}const _=new Uint32Array(2048),R=new Uint32Array(64),I=new Uint32Array(64);for(let O=1;O<1024;++O){let N=O<<13,V=0;for(;!(N&8388608);)N<<=1,V-=8388608;N&=-8388609,V+=947912704,_[O]=N|V}for(let O=1024;O<2048;++O)_[O]=939524096+(O-1024<<13);for(let O=1;O<31;++O)R[O]=O<<23;R[31]=1199570944,R[32]=2147483648;for(let O=33;O<63;++O)R[O]=2147483648+(O-32<<23);R[63]=3347054592;for(let O=1;O<64;++O)O!==32&&(I[O]=1024);return{floatView:r,uint32View:l,baseTable:m,shiftTable:y,mantissaTable:_,exponentTable:R,offsetTable:I}}function _o(w){Math.abs(w)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),w=Nr(w,-65504,65504),pl.floatView[0]=w;const r=pl.uint32View[0],l=r>>23&511;return pl.baseTable[l]+((r&8388607)>>pl.shiftTable[l])}function Ff(w){const r=w>>10;return pl.uint32View[0]=pl.mantissaTable[pl.offsetTable[r]+(w&1023)]+pl.exponentTable[r],pl.floatView[0]}const LP={toHalfFloat:_o,fromHalfFloat:Ff},is=new je,ng=new en;class Sr{constructor(r,l,m=!1){if(Array.isArray(r))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=r,this.itemSize=l,this.count=r!==void 0?r.length/l:0,this.normalized=m,this.usage=ah,this.updateRange={offset:0,count:-1},this.gpuType=Ei,this.version=0}onUploadCallback(){}set needsUpdate(r){r===!0&&this.version++}setUsage(r){return this.usage=r,this}copy(r){return this.name=r.name,this.array=new r.array.constructor(r.array),this.itemSize=r.itemSize,this.count=r.count,this.normalized=r.normalized,this.usage=r.usage,this.gpuType=r.gpuType,this}copyAt(r,l,m){r*=this.itemSize,m*=l.itemSize;for(let y=0,_=this.itemSize;y<_;y++)this.array[r+y]=l.array[m+y];return this}copyArray(r){return this.array.set(r),this}applyMatrix3(r){if(this.itemSize===2)for(let l=0,m=this.count;l0&&(r.userData=this.userData),this.parameters!==void 0){const O=this.parameters;for(const N in O)O[N]!==void 0&&(r[N]=O[N]);return r}r.data={attributes:{}};const l=this.index;l!==null&&(r.data.index={type:l.array.constructor.name,array:Array.prototype.slice.call(l.array)});const m=this.attributes;for(const O in m){const N=m[O];r.data.attributes[O]=N.toJSON(r.data)}const y={};let _=!1;for(const O in this.morphAttributes){const N=this.morphAttributes[O],V=[];for(let Q=0,X=N.length;Q0&&(y[O]=V,_=!0)}_&&(r.data.morphAttributes=y,r.data.morphTargetsRelative=this.morphTargetsRelative);const R=this.groups;R.length>0&&(r.data.groups=JSON.parse(JSON.stringify(R)));const I=this.boundingSphere;return I!==null&&(r.data.boundingSphere={center:I.center.toArray(),radius:I.radius}),r}clone(){return new this.constructor().copy(this)}copy(r){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const l={};this.name=r.name;const m=r.index;m!==null&&this.setIndex(m.clone(l));const y=r.attributes;for(const N in y){const V=y[N];this.setAttribute(N,V.clone(l))}const _=r.morphAttributes;for(const N in _){const V=[],Q=_[N];for(let X=0,$=Q.length;X<$;X++)V.push(Q[X].clone(l));this.morphAttributes[N]=V}this.morphTargetsRelative=r.morphTargetsRelative;const R=r.groups;for(let N=0,V=R.length;N0){const y=l[m[0]];if(y!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,R=y.length;_(r.far-r.near)**2))&&(Iw.copy(_).invert(),dh.copy(r.ray).applyMatrix4(Iw),!(m.boundingBox!==null&&dh.intersectsBox(m.boundingBox)===!1)&&this._computeIntersections(r,l,dh)))}_computeIntersections(r,l,m){let y;const _=this.geometry,R=this.material,I=_.index,O=_.attributes.position,N=_.attributes.uv,V=_.attributes.uv1,Q=_.attributes.normal,X=_.groups,$=_.drawRange;if(I!==null)if(Array.isArray(R))for(let ie=0,ue=X.length;iel.far?null:{distance:N,point:cg.clone(),object:w}}function hg(w,r,l,m,y,_,R,I,O,N){w.getVertexPosition(I,Su),w.getVertexPosition(O,Tu),w.getVertexPosition(N,Ru);const V=GP(w,r,l,m,Su,Tu,Ru,lg);if(V){y&&(sg.fromBufferAttribute(y,I),og.fromBufferAttribute(y,O),ag.fromBufferAttribute(y,N),V.uv=bo.getInterpolation(lg,Su,Tu,Ru,sg,og,ag,new en)),_&&(sg.fromBufferAttribute(_,I),og.fromBufferAttribute(_,O),ag.fromBufferAttribute(_,N),V.uv1=bo.getInterpolation(lg,Su,Tu,Ru,sg,og,ag,new en),V.uv2=V.uv1),R&&(Lw.fromBufferAttribute(R,I),Pw.fromBufferAttribute(R,O),Dw.fromBufferAttribute(R,N),V.normal=bo.getInterpolation(lg,Su,Tu,Ru,Lw,Pw,Dw,new je),V.normal.dot(m.direction)>0&&V.normal.multiplyScalar(-1));const Q={a:I,b:O,c:N,normal:new je,materialIndex:0};bo.getNormal(Su,Tu,Ru,Q.normal),V.face=Q}return V}class fh extends Yi{constructor(r=1,l=1,m=1,y=1,_=1,R=1){super(),this.type="BoxGeometry",this.parameters={width:r,height:l,depth:m,widthSegments:y,heightSegments:_,depthSegments:R};const I=this;y=Math.floor(y),_=Math.floor(_),R=Math.floor(R);const O=[],N=[],V=[],Q=[];let X=0,$=0;ie("z","y","x",-1,-1,m,l,r,R,_,0),ie("z","y","x",1,-1,m,l,-r,R,_,1),ie("x","z","y",1,1,r,m,l,y,R,2),ie("x","z","y",1,-1,r,m,-l,y,R,3),ie("x","y","z",1,-1,r,l,m,y,_,4),ie("x","y","z",-1,-1,r,l,-m,y,_,5),this.setIndex(O),this.setAttribute("position",new ni(N,3)),this.setAttribute("normal",new ni(V,3)),this.setAttribute("uv",new ni(Q,2));function ie(ue,re,q,Se,fe,Me,ze,He,et,st,Be){const Xe=Me/et,rt=ze/st,bt=Me/2,Gt=ze/2,lt=He/2,wt=et+1,Kt=st+1;let qt=0,ln=0;const Jt=new je;for(let pn=0;pn0?1:-1,V.push(Jt.x,Jt.y,Jt.z),Q.push(Qn/et),Q.push(1-pn/st),qt+=1}}for(let pn=0;pn>8&255]+Es[w>>16&255]+Es[w>>24&255]+"-"+Es[r&255]+Es[r>>8&255]+"-"+Es[r>>16&15|64]+Es[r>>24&255]+"-"+Es[l&63|128]+Es[l>>8&255]+"-"+Es[l>>16&255]+Es[l>>24&255]+Es[m&255]+Es[m>>8&255]+Es[m>>16&255]+Es[m>>24&255]).toLowerCase()}function Nr(w,r,l){return Math.max(r,Math.min(l,w))}function Sf(w,r){return(w%r+r)%r}function By(w,r,l,m,y){return m+(w-r)*(y-m)/(l-r)}function Ly(w,r,l){return w!==r?(l-w)/(r-w):0}function ch(w,r,l){return(1-l)*w+l*r}function Py(w,r,l,m){return ch(w,r,1-Math.exp(-l*m))}function Dy(w,r=1){return r-Math.abs(Sf(w,r*2)-r)}function Oy(w,r,l){return w<=r?0:w>=l?1:(w=(w-r)/(l-r),w*w*(3-2*w))}function Fy(w,r,l){return w<=r?0:w>=l?1:(w=(w-r)/(l-r),w*w*w*(w*(w*6-15)+10))}function Ny(w,r){return w+Math.floor(Math.random()*(r-w+1))}function Uy(w,r){return w+Math.random()*(r-w)}function ky(w){return w*(.5-Math.random())}function zy(w){w!==void 0&&(Vm=w);let r=Vm+=1831565813;return r=Math.imul(r^r>>>15,r|1),r^=r+Math.imul(r^r>>>7,r|61),((r^r>>>14)>>>0)/4294967296}function Gy(w){return w*al}function Vy(w){return w*sc}function Tf(w){return(w&w-1)===0&&w!==0}function Hm(w){return Math.pow(2,Math.ceil(Math.log(w)/Math.LN2))}function mu(w){return Math.pow(2,Math.floor(Math.log(w)/Math.LN2))}function Hy(w,r,l,m,y){const _=Math.cos,R=Math.sin,I=_(l/2),O=R(l/2),N=_((r+m)/2),V=R((r+m)/2),Q=_((r-m)/2),X=R((r-m)/2),$=_((m-r)/2),ie=R((m-r)/2);switch(y){case"XYX":w.set(I*V,O*Q,O*X,I*N);break;case"YZY":w.set(O*X,I*V,O*Q,I*N);break;case"ZXZ":w.set(O*Q,O*X,I*V,I*N);break;case"XZX":w.set(I*V,O*ie,O*$,I*N);break;case"YXY":w.set(O*$,I*V,O*ie,I*N);break;case"ZYZ":w.set(O*ie,O*$,I*V,I*N);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+y)}}function zs(w,r){switch(r.constructor){case Float32Array:return w;case Uint32Array:return w/4294967295;case Uint16Array:return w/65535;case Uint8Array:return w/255;case Int32Array:return Math.max(w/2147483647,-1);case Int16Array:return Math.max(w/32767,-1);case Int8Array:return Math.max(w/127,-1);default:throw new Error("Invalid component type.")}}function Ni(w,r){switch(r.constructor){case Float32Array:return w;case Uint32Array:return Math.round(w*4294967295);case Uint16Array:return Math.round(w*65535);case Uint8Array:return Math.round(w*255);case Int32Array:return Math.round(w*2147483647);case Int16Array:return Math.round(w*32767);case Int8Array:return Math.round(w*127);default:throw new Error("Invalid component type.")}}const jy={DEG2RAD:al,RAD2DEG:sc,generateUUID:no,clamp:Nr,euclideanModulo:Sf,mapLinear:By,inverseLerp:Ly,lerp:ch,damp:Py,pingpong:Dy,smoothstep:Oy,smootherstep:Fy,randInt:Ny,randFloat:Uy,randFloatSpread:ky,seededRandom:zy,degToRad:Gy,radToDeg:Vy,isPowerOfTwo:Tf,ceilPowerOfTwo:Hm,floorPowerOfTwo:mu,setQuaternionFromProperEuler:Hy,normalize:Ni,denormalize:zs};class en{constructor(r=0,l=0){en.prototype.isVector2=!0,this.x=r,this.y=l}get width(){return this.x}set width(r){this.x=r}get height(){return this.y}set height(r){this.y=r}set(r,l){return this.x=r,this.y=l,this}setScalar(r){return this.x=r,this.y=r,this}setX(r){return this.x=r,this}setY(r){return this.y=r,this}setComponent(r,l){switch(r){case 0:this.x=l;break;case 1:this.y=l;break;default:throw new Error("index is out of range: "+r)}return this}getComponent(r){switch(r){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+r)}}clone(){return new this.constructor(this.x,this.y)}copy(r){return this.x=r.x,this.y=r.y,this}add(r){return this.x+=r.x,this.y+=r.y,this}addScalar(r){return this.x+=r,this.y+=r,this}addVectors(r,l){return this.x=r.x+l.x,this.y=r.y+l.y,this}addScaledVector(r,l){return this.x+=r.x*l,this.y+=r.y*l,this}sub(r){return this.x-=r.x,this.y-=r.y,this}subScalar(r){return this.x-=r,this.y-=r,this}subVectors(r,l){return this.x=r.x-l.x,this.y=r.y-l.y,this}multiply(r){return this.x*=r.x,this.y*=r.y,this}multiplyScalar(r){return this.x*=r,this.y*=r,this}divide(r){return this.x/=r.x,this.y/=r.y,this}divideScalar(r){return this.multiplyScalar(1/r)}applyMatrix3(r){const l=this.x,m=this.y,y=r.elements;return this.x=y[0]*l+y[3]*m+y[6],this.y=y[1]*l+y[4]*m+y[7],this}min(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this}max(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this}clamp(r,l){return this.x=Math.max(r.x,Math.min(l.x,this.x)),this.y=Math.max(r.y,Math.min(l.y,this.y)),this}clampScalar(r,l){return this.x=Math.max(r,Math.min(l,this.x)),this.y=Math.max(r,Math.min(l,this.y)),this}clampLength(r,l){const m=this.length();return this.divideScalar(m||1).multiplyScalar(Math.max(r,Math.min(l,m)))}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(r){return this.x*r.x+this.y*r.y}cross(r){return this.x*r.y-this.y*r.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(r){const l=Math.sqrt(this.lengthSq()*r.lengthSq());if(l===0)return Math.PI/2;const m=this.dot(r)/l;return Math.acos(Nr(m,-1,1))}distanceTo(r){return Math.sqrt(this.distanceToSquared(r))}distanceToSquared(r){const l=this.x-r.x,m=this.y-r.y;return l*l+m*m}manhattanDistanceTo(r){return Math.abs(this.x-r.x)+Math.abs(this.y-r.y)}setLength(r){return this.normalize().multiplyScalar(r)}lerp(r,l){return this.x+=(r.x-this.x)*l,this.y+=(r.y-this.y)*l,this}lerpVectors(r,l,m){return this.x=r.x+(l.x-r.x)*m,this.y=r.y+(l.y-r.y)*m,this}equals(r){return r.x===this.x&&r.y===this.y}fromArray(r,l=0){return this.x=r[l],this.y=r[l+1],this}toArray(r=[],l=0){return r[l]=this.x,r[l+1]=this.y,r}fromBufferAttribute(r,l){return this.x=r.getX(l),this.y=r.getY(l),this}rotateAround(r,l){const m=Math.cos(l),y=Math.sin(l),_=this.x-r.x,R=this.y-r.y;return this.x=_*m-R*y+r.x,this.y=_*y+R*m+r.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}}class Ui{constructor(r,l,m,y,_,R,I,O,N){Ui.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],r!==void 0&&this.set(r,l,m,y,_,R,I,O,N)}set(r,l,m,y,_,R,I,O,N){const V=this.elements;return V[0]=r,V[1]=y,V[2]=I,V[3]=l,V[4]=_,V[5]=O,V[6]=m,V[7]=R,V[8]=N,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(r){const l=this.elements,m=r.elements;return l[0]=m[0],l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=m[6],l[7]=m[7],l[8]=m[8],this}extractBasis(r,l,m){return r.setFromMatrix3Column(this,0),l.setFromMatrix3Column(this,1),m.setFromMatrix3Column(this,2),this}setFromMatrix4(r){const l=r.elements;return this.set(l[0],l[4],l[8],l[1],l[5],l[9],l[2],l[6],l[10]),this}multiply(r){return this.multiplyMatrices(this,r)}premultiply(r){return this.multiplyMatrices(r,this)}multiplyMatrices(r,l){const m=r.elements,y=l.elements,_=this.elements,R=m[0],I=m[3],O=m[6],N=m[1],V=m[4],Q=m[7],X=m[2],$=m[5],ie=m[8],ue=y[0],re=y[3],q=y[6],Se=y[1],fe=y[4],Me=y[7],ze=y[2],He=y[5],et=y[8];return _[0]=R*ue+I*Se+O*ze,_[3]=R*re+I*fe+O*He,_[6]=R*q+I*Me+O*et,_[1]=N*ue+V*Se+Q*ze,_[4]=N*re+V*fe+Q*He,_[7]=N*q+V*Me+Q*et,_[2]=X*ue+$*Se+ie*ze,_[5]=X*re+$*fe+ie*He,_[8]=X*q+$*Me+ie*et,this}multiplyScalar(r){const l=this.elements;return l[0]*=r,l[3]*=r,l[6]*=r,l[1]*=r,l[4]*=r,l[7]*=r,l[2]*=r,l[5]*=r,l[8]*=r,this}determinant(){const r=this.elements,l=r[0],m=r[1],y=r[2],_=r[3],R=r[4],I=r[5],O=r[6],N=r[7],V=r[8];return l*R*V-l*I*N-m*_*V+m*I*O+y*_*N-y*R*O}invert(){const r=this.elements,l=r[0],m=r[1],y=r[2],_=r[3],R=r[4],I=r[5],O=r[6],N=r[7],V=r[8],Q=V*R-I*N,X=I*O-V*_,$=N*_-R*O,ie=l*Q+m*X+y*$;if(ie===0)return this.set(0,0,0,0,0,0,0,0,0);const ue=1/ie;return r[0]=Q*ue,r[1]=(y*N-V*m)*ue,r[2]=(I*m-y*R)*ue,r[3]=X*ue,r[4]=(V*l-y*O)*ue,r[5]=(y*_-I*l)*ue,r[6]=$*ue,r[7]=(m*O-N*l)*ue,r[8]=(R*l-m*_)*ue,this}transpose(){let r;const l=this.elements;return r=l[1],l[1]=l[3],l[3]=r,r=l[2],l[2]=l[6],l[6]=r,r=l[5],l[5]=l[7],l[7]=r,this}getNormalMatrix(r){return this.setFromMatrix4(r).invert().transpose()}transposeIntoArray(r){const l=this.elements;return r[0]=l[0],r[1]=l[3],r[2]=l[6],r[3]=l[1],r[4]=l[4],r[5]=l[7],r[6]=l[2],r[7]=l[5],r[8]=l[8],this}setUvTransform(r,l,m,y,_,R,I){const O=Math.cos(_),N=Math.sin(_);return this.set(m*O,m*N,-m*(O*R+N*I)+R+r,-y*N,y*O,-y*(-N*R+O*I)+I+l,0,0,1),this}scale(r,l){return this.premultiply(Rf.makeScale(r,l)),this}rotate(r){return this.premultiply(Rf.makeRotation(-r)),this}translate(r,l){return this.premultiply(Rf.makeTranslation(r,l)),this}makeTranslation(r,l){return r.isVector2?this.set(1,0,r.x,0,1,r.y,0,0,1):this.set(1,0,r,0,1,l,0,0,1),this}makeRotation(r){const l=Math.cos(r),m=Math.sin(r);return this.set(l,-m,0,m,l,0,0,0,1),this}makeScale(r,l){return this.set(r,0,0,0,l,0,0,0,1),this}equals(r){const l=this.elements,m=r.elements;for(let y=0;y<9;y++)if(l[y]!==m[y])return!1;return!0}fromArray(r,l=0){for(let m=0;m<9;m++)this.elements[m]=r[m+l];return this}toArray(r=[],l=0){const m=this.elements;return r[l]=m[0],r[l+1]=m[1],r[l+2]=m[2],r[l+3]=m[3],r[l+4]=m[4],r[l+5]=m[5],r[l+6]=m[6],r[l+7]=m[7],r[l+8]=m[8],r}clone(){return new this.constructor().fromArray(this.elements)}}const Rf=new Ui;function jm(w){for(let r=w.length-1;r>=0;--r)if(w[r]>=65535)return!0;return!1}const Wy={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function oc(w,r){return new Wy[w](r)}function hh(w){return document.createElementNS("http://www.w3.org/1999/xhtml",w)}function Wm(){const w=hh("canvas");return w.style.display="block",w}const Qm={};function uh(w){w in Qm||(Qm[w]=!0,console.warn(w))}const Xm=new Ui().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),Km=new Ui().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),gu={[pr]:{transfer:rh,primaries:sh,toReference:w=>w,fromReference:w=>w},[Cr]:{transfer:wr,primaries:sh,toReference:w=>w.convertSRGBToLinear(),fromReference:w=>w.convertLinearToSRGB()},[ih]:{transfer:rh,primaries:oh,toReference:w=>w.applyMatrix3(Km),fromReference:w=>w.applyMatrix3(Xm)},[fu]:{transfer:wr,primaries:oh,toReference:w=>w.convertSRGBToLinear().applyMatrix3(Km),fromReference:w=>w.applyMatrix3(Xm).convertLinearToSRGB()}},Qy=new Set([pr,ih]),vr={enabled:!0,_workingColorSpace:pr,get legacyMode(){return console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),!this.enabled},set legacyMode(w){console.warn("THREE.ColorManagement: .legacyMode=false renamed to .enabled=true in r150."),this.enabled=!w},get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(w){if(!Qy.has(w))throw new Error(`Unsupported working color space, "${w}".`);this._workingColorSpace=w},convert:function(w,r,l){if(this.enabled===!1||r===l||!r||!l)return w;const m=gu[r].toReference,y=gu[l].fromReference;return y(m(w))},fromWorkingColorSpace:function(w,r){return this.convert(w,this._workingColorSpace,r)},toWorkingColorSpace:function(w,r){return this.convert(w,r,this._workingColorSpace)},getPrimaries:function(w){return gu[w].primaries},getTransfer:function(w){return w===qr?rh:gu[w].transfer}};function ac(w){return w<.04045?w*.0773993808:Math.pow(w*.9478672986+.0521327014,2.4)}function If(w){return w<.0031308?w*12.92:1.055*Math.pow(w,.41666)-.055}let ll;class cl{static getDataURL(r){if(/^data:/i.test(r.src)||typeof HTMLCanvasElement>"u")return r.src;let l;if(r instanceof HTMLCanvasElement)l=r;else{ll===void 0&&(ll=hh("canvas")),ll.width=r.width,ll.height=r.height;const m=ll.getContext("2d");r instanceof ImageData?m.putImageData(r,0,0):m.drawImage(r,0,0,r.width,r.height),l=ll}return l.width>2048||l.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",r),l.toDataURL("image/jpeg",.6)):l.toDataURL("image/png")}static sRGBToLinear(r){if(typeof HTMLImageElement<"u"&&r instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&r instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&r instanceof ImageBitmap){const l=hh("canvas");l.width=r.width,l.height=r.height;const m=l.getContext("2d");m.drawImage(r,0,0,r.width,r.height);const y=m.getImageData(0,0,r.width,r.height),_=y.data;for(let R=0;R<_.length;R++)_[R]=ac(_[R]/255)*255;return m.putImageData(y,0,0),l}else if(r.data){const l=r.data.slice(0);for(let m=0;m0&&(m.userData=this.userData),l||(r.textures[this.uuid]=m),m}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(r){if(this.mapping!==Ye)return r;if(r.applyMatrix3(this.matrix),r.x<0||r.x>1)switch(this.wrapS){case Re:r.x=r.x-Math.floor(r.x);break;case We:r.x=r.x<0?0:1;break;case ve:Math.abs(Math.floor(r.x)%2)===1?r.x=Math.ceil(r.x)-r.x:r.x=r.x-Math.floor(r.x);break}if(r.y<0||r.y>1)switch(this.wrapT){case Re:r.y=r.y-Math.floor(r.y);break;case We:r.y=r.y<0?0:1;break;case ve:Math.abs(Math.floor(r.y)%2)===1?r.y=Math.ceil(r.y)-r.y:r.y=r.y-Math.floor(r.y);break}return this.flipY&&(r.y=1-r.y),r}set needsUpdate(r){r===!0&&(this.version++,this.source.needsUpdate=!0)}get encoding(){return uh("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace===Cr?Kr:eo}set encoding(r){uh("THREE.Texture: Property .encoding has been replaced by .colorSpace."),this.colorSpace=r===Kr?Cr:qr}}Ir.DEFAULT_IMAGE=null,Ir.DEFAULT_MAPPING=Ye,Ir.DEFAULT_ANISOTROPY=1;class ur{constructor(r=0,l=0,m=0,y=1){ur.prototype.isVector4=!0,this.x=r,this.y=l,this.z=m,this.w=y}get width(){return this.z}set width(r){this.z=r}get height(){return this.w}set height(r){this.w=r}set(r,l,m,y){return this.x=r,this.y=l,this.z=m,this.w=y,this}setScalar(r){return this.x=r,this.y=r,this.z=r,this.w=r,this}setX(r){return this.x=r,this}setY(r){return this.y=r,this}setZ(r){return this.z=r,this}setW(r){return this.w=r,this}setComponent(r,l){switch(r){case 0:this.x=l;break;case 1:this.y=l;break;case 2:this.z=l;break;case 3:this.w=l;break;default:throw new Error("index is out of range: "+r)}return this}getComponent(r){switch(r){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: "+r)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(r){return this.x=r.x,this.y=r.y,this.z=r.z,this.w=r.w!==void 0?r.w:1,this}add(r){return this.x+=r.x,this.y+=r.y,this.z+=r.z,this.w+=r.w,this}addScalar(r){return this.x+=r,this.y+=r,this.z+=r,this.w+=r,this}addVectors(r,l){return this.x=r.x+l.x,this.y=r.y+l.y,this.z=r.z+l.z,this.w=r.w+l.w,this}addScaledVector(r,l){return this.x+=r.x*l,this.y+=r.y*l,this.z+=r.z*l,this.w+=r.w*l,this}sub(r){return this.x-=r.x,this.y-=r.y,this.z-=r.z,this.w-=r.w,this}subScalar(r){return this.x-=r,this.y-=r,this.z-=r,this.w-=r,this}subVectors(r,l){return this.x=r.x-l.x,this.y=r.y-l.y,this.z=r.z-l.z,this.w=r.w-l.w,this}multiply(r){return this.x*=r.x,this.y*=r.y,this.z*=r.z,this.w*=r.w,this}multiplyScalar(r){return this.x*=r,this.y*=r,this.z*=r,this.w*=r,this}applyMatrix4(r){const l=this.x,m=this.y,y=this.z,_=this.w,R=r.elements;return this.x=R[0]*l+R[4]*m+R[8]*y+R[12]*_,this.y=R[1]*l+R[5]*m+R[9]*y+R[13]*_,this.z=R[2]*l+R[6]*m+R[10]*y+R[14]*_,this.w=R[3]*l+R[7]*m+R[11]*y+R[15]*_,this}divideScalar(r){return this.multiplyScalar(1/r)}setAxisAngleFromQuaternion(r){this.w=2*Math.acos(r.w);const l=Math.sqrt(1-r.w*r.w);return l<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=r.x/l,this.y=r.y/l,this.z=r.z/l),this}setAxisAngleFromRotationMatrix(r){let l,m,y,_;const O=r.elements,N=O[0],V=O[4],Q=O[8],X=O[1],$=O[5],ie=O[9],ue=O[2],re=O[6],q=O[10];if(Math.abs(V-X)<.01&&Math.abs(Q-ue)<.01&&Math.abs(ie-re)<.01){if(Math.abs(V+X)<.1&&Math.abs(Q+ue)<.1&&Math.abs(ie+re)<.1&&Math.abs(N+$+q-3)<.1)return this.set(1,0,0,0),this;l=Math.PI;const fe=(N+1)/2,Me=($+1)/2,ze=(q+1)/2,He=(V+X)/4,et=(Q+ue)/4,st=(ie+re)/4;return fe>Me&&fe>ze?fe<.01?(m=0,y=.707106781,_=.707106781):(m=Math.sqrt(fe),y=He/m,_=et/m):Me>ze?Me<.01?(m=.707106781,y=0,_=.707106781):(y=Math.sqrt(Me),m=He/y,_=st/y):ze<.01?(m=.707106781,y=.707106781,_=0):(_=Math.sqrt(ze),m=et/_,y=st/_),this.set(m,y,_,l),this}let Se=Math.sqrt((re-ie)*(re-ie)+(Q-ue)*(Q-ue)+(X-V)*(X-V));return Math.abs(Se)<.001&&(Se=1),this.x=(re-ie)/Se,this.y=(Q-ue)/Se,this.z=(X-V)/Se,this.w=Math.acos((N+$+q-1)/2),this}min(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this.z=Math.min(this.z,r.z),this.w=Math.min(this.w,r.w),this}max(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this.z=Math.max(this.z,r.z),this.w=Math.max(this.w,r.w),this}clamp(r,l){return this.x=Math.max(r.x,Math.min(l.x,this.x)),this.y=Math.max(r.y,Math.min(l.y,this.y)),this.z=Math.max(r.z,Math.min(l.z,this.z)),this.w=Math.max(r.w,Math.min(l.w,this.w)),this}clampScalar(r,l){return this.x=Math.max(r,Math.min(l,this.x)),this.y=Math.max(r,Math.min(l,this.y)),this.z=Math.max(r,Math.min(l,this.z)),this.w=Math.max(r,Math.min(l,this.w)),this}clampLength(r,l){const m=this.length();return this.divideScalar(m||1).multiplyScalar(Math.max(r,Math.min(l,m)))}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(r){return this.x*r.x+this.y*r.y+this.z*r.z+this.w*r.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(r){return this.normalize().multiplyScalar(r)}lerp(r,l){return this.x+=(r.x-this.x)*l,this.y+=(r.y-this.y)*l,this.z+=(r.z-this.z)*l,this.w+=(r.w-this.w)*l,this}lerpVectors(r,l,m){return this.x=r.x+(l.x-r.x)*m,this.y=r.y+(l.y-r.y)*m,this.z=r.z+(l.z-r.z)*m,this.w=r.w+(l.w-r.w)*m,this}equals(r){return r.x===this.x&&r.y===this.y&&r.z===this.z&&r.w===this.w}fromArray(r,l=0){return this.x=r[l],this.y=r[l+1],this.z=r[l+2],this.w=r[l+3],this}toArray(r=[],l=0){return r[l]=this.x,r[l+1]=this.y,r[l+2]=this.z,r[l+3]=this.w,r}fromBufferAttribute(r,l){return this.x=r.getX(l),this.y=r.getY(l),this.z=r.getZ(l),this.w=r.getW(l),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 vu extends to{constructor(r=1,l=1,m={}){super(),this.isRenderTarget=!0,this.width=r,this.height=l,this.depth=1,this.scissor=new ur(0,0,r,l),this.scissorTest=!1,this.viewport=new ur(0,0,r,l);const y={width:r,height:l,depth:1};m.encoding!==void 0&&(uh("THREE.WebGLRenderTarget: option.encoding has been replaced by option.colorSpace."),m.colorSpace=m.encoding===Kr?Cr:qr),m=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:Bn,depthBuffer:!0,stencilBuffer:!1,depthTexture:null,samples:0},m),this.texture=new Ir(y,m.mapping,m.wrapS,m.wrapT,m.magFilter,m.minFilter,m.format,m.type,m.anisotropy,m.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.flipY=!1,this.texture.generateMipmaps=m.generateMipmaps,this.texture.internalFormat=m.internalFormat,this.depthBuffer=m.depthBuffer,this.stencilBuffer=m.stencilBuffer,this.depthTexture=m.depthTexture,this.samples=m.samples}setSize(r,l,m=1){(this.width!==r||this.height!==l||this.depth!==m)&&(this.width=r,this.height=l,this.depth=m,this.texture.image.width=r,this.texture.image.height=l,this.texture.image.depth=m,this.dispose()),this.viewport.set(0,0,r,l),this.scissor.set(0,0,r,l)}clone(){return new this.constructor().copy(this)}copy(r){this.width=r.width,this.height=r.height,this.depth=r.depth,this.scissor.copy(r.scissor),this.scissorTest=r.scissorTest,this.viewport.copy(r.viewport),this.texture=r.texture.clone(),this.texture.isRenderTargetTexture=!0;const l=Object.assign({},r.texture.image);return this.texture.source=new Br(l),this.depthBuffer=r.depthBuffer,this.stencilBuffer=r.stencilBuffer,r.depthTexture!==null&&(this.depthTexture=r.depthTexture.clone()),this.samples=r.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}}class yo extends vu{constructor(r=1,l=1,m={}){super(r,l,m),this.isWebGLRenderTarget=!0}}class yu extends Ir{constructor(r=null,l=1,m=1,y=1){super(null),this.isDataArrayTexture=!0,this.image={data:r,width:l,height:m,depth:y},this.magFilter=at,this.minFilter=at,this.wrapR=We,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class qn extends yo{constructor(r=1,l=1,m=1){super(r,l),this.isWebGLArrayRenderTarget=!0,this.depth=m,this.texture=new yu(null,r,l,m),this.texture.isRenderTargetTexture=!0}}class Pi extends Ir{constructor(r=null,l=1,m=1,y=1){super(null),this.isData3DTexture=!0,this.image={data:r,width:l,height:m,depth:y},this.magFilter=at,this.minFilter=at,this.wrapR=We,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}}class ar extends yo{constructor(r=1,l=1,m=1){super(r,l),this.isWebGL3DRenderTarget=!0,this.depth=m,this.texture=new Pi(null,r,l,m),this.texture.isRenderTargetTexture=!0}}class bs extends yo{constructor(r=1,l=1,m=1,y={}){super(r,l,y),this.isWebGLMultipleRenderTargets=!0;const _=this.texture;this.texture=[];for(let R=0;R=0?1:-1,fe=1-q*q;if(fe>Number.EPSILON){const ze=Math.sqrt(fe),He=Math.atan2(ze,q*Se);re=Math.sin(re*He)/ze,I=Math.sin(I*He)/ze}const Me=I*Se;if(O=O*re+X*Me,N=N*re+$*Me,V=V*re+ie*Me,Q=Q*re+ue*Me,re===1-I){const ze=1/Math.sqrt(O*O+N*N+V*V+Q*Q);O*=ze,N*=ze,V*=ze,Q*=ze}}r[l]=O,r[l+1]=N,r[l+2]=V,r[l+3]=Q}static multiplyQuaternionsFlat(r,l,m,y,_,R){const I=m[y],O=m[y+1],N=m[y+2],V=m[y+3],Q=_[R],X=_[R+1],$=_[R+2],ie=_[R+3];return r[l]=I*ie+V*Q+O*$-N*X,r[l+1]=O*ie+V*X+N*Q-I*$,r[l+2]=N*ie+V*$+I*X-O*Q,r[l+3]=V*ie-I*Q-O*X-N*$,r}get x(){return this._x}set x(r){this._x=r,this._onChangeCallback()}get y(){return this._y}set y(r){this._y=r,this._onChangeCallback()}get z(){return this._z}set z(r){this._z=r,this._onChangeCallback()}get w(){return this._w}set w(r){this._w=r,this._onChangeCallback()}set(r,l,m,y){return this._x=r,this._y=l,this._z=m,this._w=y,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(r){return this._x=r.x,this._y=r.y,this._z=r.z,this._w=r.w,this._onChangeCallback(),this}setFromEuler(r,l){const m=r._x,y=r._y,_=r._z,R=r._order,I=Math.cos,O=Math.sin,N=I(m/2),V=I(y/2),Q=I(_/2),X=O(m/2),$=O(y/2),ie=O(_/2);switch(R){case"XYZ":this._x=X*V*Q+N*$*ie,this._y=N*$*Q-X*V*ie,this._z=N*V*ie+X*$*Q,this._w=N*V*Q-X*$*ie;break;case"YXZ":this._x=X*V*Q+N*$*ie,this._y=N*$*Q-X*V*ie,this._z=N*V*ie-X*$*Q,this._w=N*V*Q+X*$*ie;break;case"ZXY":this._x=X*V*Q-N*$*ie,this._y=N*$*Q+X*V*ie,this._z=N*V*ie+X*$*Q,this._w=N*V*Q-X*$*ie;break;case"ZYX":this._x=X*V*Q-N*$*ie,this._y=N*$*Q+X*V*ie,this._z=N*V*ie-X*$*Q,this._w=N*V*Q+X*$*ie;break;case"YZX":this._x=X*V*Q+N*$*ie,this._y=N*$*Q+X*V*ie,this._z=N*V*ie-X*$*Q,this._w=N*V*Q-X*$*ie;break;case"XZY":this._x=X*V*Q-N*$*ie,this._y=N*$*Q-X*V*ie,this._z=N*V*ie+X*$*Q,this._w=N*V*Q+X*$*ie;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+R)}return l!==!1&&this._onChangeCallback(),this}setFromAxisAngle(r,l){const m=l/2,y=Math.sin(m);return this._x=r.x*y,this._y=r.y*y,this._z=r.z*y,this._w=Math.cos(m),this._onChangeCallback(),this}setFromRotationMatrix(r){const l=r.elements,m=l[0],y=l[4],_=l[8],R=l[1],I=l[5],O=l[9],N=l[2],V=l[6],Q=l[10],X=m+I+Q;if(X>0){const $=.5/Math.sqrt(X+1);this._w=.25/$,this._x=(V-O)*$,this._y=(_-N)*$,this._z=(R-y)*$}else if(m>I&&m>Q){const $=2*Math.sqrt(1+m-I-Q);this._w=(V-O)/$,this._x=.25*$,this._y=(y+R)/$,this._z=(_+N)/$}else if(I>Q){const $=2*Math.sqrt(1+I-m-Q);this._w=(_-N)/$,this._x=(y+R)/$,this._y=.25*$,this._z=(O+V)/$}else{const $=2*Math.sqrt(1+Q-m-I);this._w=(R-y)/$,this._x=(_+N)/$,this._y=(O+V)/$,this._z=.25*$}return this._onChangeCallback(),this}setFromUnitVectors(r,l){let m=r.dot(l)+1;return mMath.abs(r.z)?(this._x=-r.y,this._y=r.x,this._z=0,this._w=m):(this._x=0,this._y=-r.z,this._z=r.y,this._w=m)):(this._x=r.y*l.z-r.z*l.y,this._y=r.z*l.x-r.x*l.z,this._z=r.x*l.y-r.y*l.x,this._w=m),this.normalize()}angleTo(r){return 2*Math.acos(Math.abs(Nr(this.dot(r),-1,1)))}rotateTowards(r,l){const m=this.angleTo(r);if(m===0)return this;const y=Math.min(1,l/m);return this.slerp(r,y),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(r){return this._x*r._x+this._y*r._y+this._z*r._z+this._w*r._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 r=this.length();return r===0?(this._x=0,this._y=0,this._z=0,this._w=1):(r=1/r,this._x=this._x*r,this._y=this._y*r,this._z=this._z*r,this._w=this._w*r),this._onChangeCallback(),this}multiply(r){return this.multiplyQuaternions(this,r)}premultiply(r){return this.multiplyQuaternions(r,this)}multiplyQuaternions(r,l){const m=r._x,y=r._y,_=r._z,R=r._w,I=l._x,O=l._y,N=l._z,V=l._w;return this._x=m*V+R*I+y*N-_*O,this._y=y*V+R*O+_*I-m*N,this._z=_*V+R*N+m*O-y*I,this._w=R*V-m*I-y*O-_*N,this._onChangeCallback(),this}slerp(r,l){if(l===0)return this;if(l===1)return this.copy(r);const m=this._x,y=this._y,_=this._z,R=this._w;let I=R*r._w+m*r._x+y*r._y+_*r._z;if(I<0?(this._w=-r._w,this._x=-r._x,this._y=-r._y,this._z=-r._z,I=-I):this.copy(r),I>=1)return this._w=R,this._x=m,this._y=y,this._z=_,this;const O=1-I*I;if(O<=Number.EPSILON){const $=1-l;return this._w=$*R+l*this._w,this._x=$*m+l*this._x,this._y=$*y+l*this._y,this._z=$*_+l*this._z,this.normalize(),this._onChangeCallback(),this}const N=Math.sqrt(O),V=Math.atan2(N,I),Q=Math.sin((1-l)*V)/N,X=Math.sin(l*V)/N;return this._w=R*Q+this._w*X,this._x=m*Q+this._x*X,this._y=y*Q+this._y*X,this._z=_*Q+this._z*X,this._onChangeCallback(),this}slerpQuaternions(r,l,m){return this.copy(r).slerp(l,m)}random(){const r=Math.random(),l=Math.sqrt(1-r),m=Math.sqrt(r),y=2*Math.PI*Math.random(),_=2*Math.PI*Math.random();return this.set(l*Math.cos(y),m*Math.sin(_),m*Math.cos(_),l*Math.sin(y))}equals(r){return r._x===this._x&&r._y===this._y&&r._z===this._z&&r._w===this._w}fromArray(r,l=0){return this._x=r[l],this._y=r[l+1],this._z=r[l+2],this._w=r[l+3],this._onChangeCallback(),this}toArray(r=[],l=0){return r[l]=this._x,r[l+1]=this._y,r[l+2]=this._z,r[l+3]=this._w,r}fromBufferAttribute(r,l){return this._x=r.getX(l),this._y=r.getY(l),this._z=r.getZ(l),this._w=r.getW(l),this}toJSON(){return this.toArray()}_onChange(r){return this._onChangeCallback=r,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}}class je{constructor(r=0,l=0,m=0){je.prototype.isVector3=!0,this.x=r,this.y=l,this.z=m}set(r,l,m){return m===void 0&&(m=this.z),this.x=r,this.y=l,this.z=m,this}setScalar(r){return this.x=r,this.y=r,this.z=r,this}setX(r){return this.x=r,this}setY(r){return this.y=r,this}setZ(r){return this.z=r,this}setComponent(r,l){switch(r){case 0:this.x=l;break;case 1:this.y=l;break;case 2:this.z=l;break;default:throw new Error("index is out of range: "+r)}return this}getComponent(r){switch(r){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+r)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(r){return this.x=r.x,this.y=r.y,this.z=r.z,this}add(r){return this.x+=r.x,this.y+=r.y,this.z+=r.z,this}addScalar(r){return this.x+=r,this.y+=r,this.z+=r,this}addVectors(r,l){return this.x=r.x+l.x,this.y=r.y+l.y,this.z=r.z+l.z,this}addScaledVector(r,l){return this.x+=r.x*l,this.y+=r.y*l,this.z+=r.z*l,this}sub(r){return this.x-=r.x,this.y-=r.y,this.z-=r.z,this}subScalar(r){return this.x-=r,this.y-=r,this.z-=r,this}subVectors(r,l){return this.x=r.x-l.x,this.y=r.y-l.y,this.z=r.z-l.z,this}multiply(r){return this.x*=r.x,this.y*=r.y,this.z*=r.z,this}multiplyScalar(r){return this.x*=r,this.y*=r,this.z*=r,this}multiplyVectors(r,l){return this.x=r.x*l.x,this.y=r.y*l.y,this.z=r.z*l.z,this}applyEuler(r){return this.applyQuaternion(Wa.setFromEuler(r))}applyAxisAngle(r,l){return this.applyQuaternion(Wa.setFromAxisAngle(r,l))}applyMatrix3(r){const l=this.x,m=this.y,y=this.z,_=r.elements;return this.x=_[0]*l+_[3]*m+_[6]*y,this.y=_[1]*l+_[4]*m+_[7]*y,this.z=_[2]*l+_[5]*m+_[8]*y,this}applyNormalMatrix(r){return this.applyMatrix3(r).normalize()}applyMatrix4(r){const l=this.x,m=this.y,y=this.z,_=r.elements,R=1/(_[3]*l+_[7]*m+_[11]*y+_[15]);return this.x=(_[0]*l+_[4]*m+_[8]*y+_[12])*R,this.y=(_[1]*l+_[5]*m+_[9]*y+_[13])*R,this.z=(_[2]*l+_[6]*m+_[10]*y+_[14])*R,this}applyQuaternion(r){const l=this.x,m=this.y,y=this.z,_=r.x,R=r.y,I=r.z,O=r.w,N=2*(R*y-I*m),V=2*(I*l-_*y),Q=2*(_*m-R*l);return this.x=l+O*N+R*Q-I*V,this.y=m+O*V+I*N-_*Q,this.z=y+O*Q+_*V-R*N,this}project(r){return this.applyMatrix4(r.matrixWorldInverse).applyMatrix4(r.projectionMatrix)}unproject(r){return this.applyMatrix4(r.projectionMatrixInverse).applyMatrix4(r.matrixWorld)}transformDirection(r){const l=this.x,m=this.y,y=this.z,_=r.elements;return this.x=_[0]*l+_[4]*m+_[8]*y,this.y=_[1]*l+_[5]*m+_[9]*y,this.z=_[2]*l+_[6]*m+_[10]*y,this.normalize()}divide(r){return this.x/=r.x,this.y/=r.y,this.z/=r.z,this}divideScalar(r){return this.multiplyScalar(1/r)}min(r){return this.x=Math.min(this.x,r.x),this.y=Math.min(this.y,r.y),this.z=Math.min(this.z,r.z),this}max(r){return this.x=Math.max(this.x,r.x),this.y=Math.max(this.y,r.y),this.z=Math.max(this.z,r.z),this}clamp(r,l){return this.x=Math.max(r.x,Math.min(l.x,this.x)),this.y=Math.max(r.y,Math.min(l.y,this.y)),this.z=Math.max(r.z,Math.min(l.z,this.z)),this}clampScalar(r,l){return this.x=Math.max(r,Math.min(l,this.x)),this.y=Math.max(r,Math.min(l,this.y)),this.z=Math.max(r,Math.min(l,this.z)),this}clampLength(r,l){const m=this.length();return this.divideScalar(m||1).multiplyScalar(Math.max(r,Math.min(l,m)))}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(r){return this.x*r.x+this.y*r.y+this.z*r.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(r){return this.normalize().multiplyScalar(r)}lerp(r,l){return this.x+=(r.x-this.x)*l,this.y+=(r.y-this.y)*l,this.z+=(r.z-this.z)*l,this}lerpVectors(r,l,m){return this.x=r.x+(l.x-r.x)*m,this.y=r.y+(l.y-r.y)*m,this.z=r.z+(l.z-r.z)*m,this}cross(r){return this.crossVectors(this,r)}crossVectors(r,l){const m=r.x,y=r.y,_=r.z,R=l.x,I=l.y,O=l.z;return this.x=y*O-_*I,this.y=_*R-m*O,this.z=m*I-y*R,this}projectOnVector(r){const l=r.lengthSq();if(l===0)return this.set(0,0,0);const m=r.dot(this)/l;return this.copy(r).multiplyScalar(m)}projectOnPlane(r){return Vr.copy(this).projectOnVector(r),this.sub(Vr)}reflect(r){return this.sub(Vr.copy(r).multiplyScalar(2*this.dot(r)))}angleTo(r){const l=Math.sqrt(this.lengthSq()*r.lengthSq());if(l===0)return Math.PI/2;const m=this.dot(r)/l;return Math.acos(Nr(m,-1,1))}distanceTo(r){return Math.sqrt(this.distanceToSquared(r))}distanceToSquared(r){const l=this.x-r.x,m=this.y-r.y,y=this.z-r.z;return l*l+m*m+y*y}manhattanDistanceTo(r){return Math.abs(this.x-r.x)+Math.abs(this.y-r.y)+Math.abs(this.z-r.z)}setFromSpherical(r){return this.setFromSphericalCoords(r.radius,r.phi,r.theta)}setFromSphericalCoords(r,l,m){const y=Math.sin(l)*r;return this.x=y*Math.sin(m),this.y=Math.cos(l)*r,this.z=y*Math.cos(m),this}setFromCylindrical(r){return this.setFromCylindricalCoords(r.radius,r.theta,r.y)}setFromCylindricalCoords(r,l,m){return this.x=r*Math.sin(l),this.y=m,this.z=r*Math.cos(l),this}setFromMatrixPosition(r){const l=r.elements;return this.x=l[12],this.y=l[13],this.z=l[14],this}setFromMatrixScale(r){const l=this.setFromMatrixColumn(r,0).length(),m=this.setFromMatrixColumn(r,1).length(),y=this.setFromMatrixColumn(r,2).length();return this.x=l,this.y=m,this.z=y,this}setFromMatrixColumn(r,l){return this.fromArray(r.elements,l*4)}setFromMatrix3Column(r,l){return this.fromArray(r.elements,l*3)}setFromEuler(r){return this.x=r._x,this.y=r._y,this.z=r._z,this}setFromColor(r){return this.x=r.r,this.y=r.g,this.z=r.b,this}equals(r){return r.x===this.x&&r.y===this.y&&r.z===this.z}fromArray(r,l=0){return this.x=r[l],this.y=r[l+1],this.z=r[l+2],this}toArray(r=[],l=0){return r[l]=this.x,r[l+1]=this.y,r[l+2]=this.z,r}fromBufferAttribute(r,l){return this.x=r.getX(l),this.y=r.getY(l),this.z=r.getZ(l),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){const r=(Math.random()-.5)*2,l=Math.random()*Math.PI*2,m=Math.sqrt(1-r**2);return this.x=m*Math.cos(l),this.y=m*Math.sin(l),this.z=r,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}}const Vr=new je,Wa=new Ti;class er{constructor(r=new je(1/0,1/0,1/0),l=new je(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=r,this.max=l}set(r,l){return this.min.copy(r),this.max.copy(l),this}setFromArray(r){this.makeEmpty();for(let l=0,m=r.length;lthis.max.x||r.ythis.max.y||r.zthis.max.z)}containsBox(r){return this.min.x<=r.min.x&&r.max.x<=this.max.x&&this.min.y<=r.min.y&&r.max.y<=this.max.y&&this.min.z<=r.min.z&&r.max.z<=this.max.z}getParameter(r,l){return l.set((r.x-this.min.x)/(this.max.x-this.min.x),(r.y-this.min.y)/(this.max.y-this.min.y),(r.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(r){return!(r.max.xthis.max.x||r.max.ythis.max.y||r.max.zthis.max.z)}intersectsSphere(r){return this.clampPoint(r.center,Ds),Ds.distanceToSquared(r.center)<=r.radius*r.radius}intersectsPlane(r){let l,m;return r.normal.x>0?(l=r.normal.x*this.min.x,m=r.normal.x*this.max.x):(l=r.normal.x*this.max.x,m=r.normal.x*this.min.x),r.normal.y>0?(l+=r.normal.y*this.min.y,m+=r.normal.y*this.max.y):(l+=r.normal.y*this.max.y,m+=r.normal.y*this.min.y),r.normal.z>0?(l+=r.normal.z*this.min.z,m+=r.normal.z*this.max.z):(l+=r.normal.z*this.max.z,m+=r.normal.z*this.min.z),l<=-r.constant&&m>=-r.constant}intersectsTriangle(r){if(this.isEmpty())return!1;this.getCenter(Er),ji.subVectors(this.max,Er),_s.subVectors(r.a,Er),Hi.subVectors(r.b,Er),io.subVectors(r.c,Er),Do.subVectors(Hi,_s),ls.subVectors(io,Hi),rr.subVectors(_s,io);let l=[0,-Do.z,Do.y,0,-ls.z,ls.y,0,-rr.z,rr.y,Do.z,0,-Do.x,ls.z,0,-ls.x,rr.z,0,-rr.x,-Do.y,Do.x,0,-ls.y,ls.x,0,-rr.y,rr.x,0];return!Qa(l,_s,Hi,io,ji)||(l=[1,0,0,0,1,0,0,0,1],!Qa(l,_s,Hi,io,ji))?!1:(yr.crossVectors(Do,ls),l=[yr.x,yr.y,yr.z],Qa(l,_s,Hi,io,ji))}clampPoint(r,l){return l.copy(r).clamp(this.min,this.max)}distanceToPoint(r){return this.clampPoint(r,Ds).distanceTo(r)}getBoundingSphere(r){return this.isEmpty()?r.makeEmpty():(this.getCenter(r.center),r.radius=this.getSize(Ds).length()*.5),r}intersect(r){return this.min.max(r.min),this.max.min(r.max),this.isEmpty()&&this.makeEmpty(),this}union(r){return this.min.min(r.min),this.max.max(r.max),this}applyMatrix4(r){return this.isEmpty()?this:(xo[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(r),xo[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(r),xo[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(r),xo[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(r),xo[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(r),xo[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(r),xo[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(r),xo[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(r),this.setFromPoints(xo),this)}translate(r){return this.min.add(r),this.max.add(r),this}equals(r){return r.min.equals(this.min)&&r.max.equals(this.max)}}const xo=[new je,new je,new je,new je,new je,new je,new je,new je],Ds=new je,$o=new er,_s=new je,Hi=new je,io=new je,Do=new je,ls=new je,rr=new je,Er=new je,ji=new je,yr=new je,cs=new je;function Qa(w,r,l,m,y){for(let _=0,R=w.length-3;_<=R;_+=3){cs.fromArray(w,_);const I=y.x*Math.abs(cs.x)+y.y*Math.abs(cs.y)+y.z*Math.abs(cs.z),O=r.dot(cs),N=l.dot(cs),V=m.dot(cs);if(Math.max(-Math.max(O,N,V),Math.min(O,N,V))>I)return!1}return!0}const Bf=new er,lc=new je,xu=new je;class Eo{constructor(r=new je,l=-1){this.center=r,this.radius=l}set(r,l){return this.center.copy(r),this.radius=l,this}setFromPoints(r,l){const m=this.center;l!==void 0?m.copy(l):Bf.setFromPoints(r).getCenter(m);let y=0;for(let _=0,R=r.length;_this.radius*this.radius&&(l.sub(this.center).normalize(),l.multiplyScalar(this.radius).add(this.center)),l}getBoundingBox(r){return this.isEmpty()?(r.makeEmpty(),r):(r.set(this.center,this.center),r.expandByScalar(this.radius),r)}applyMatrix4(r){return this.center.applyMatrix4(r),this.radius=this.radius*r.getMaxScaleOnAxis(),this}translate(r){return this.center.add(r),this}expandByPoint(r){if(this.isEmpty())return this.center.copy(r),this.radius=0,this;lc.subVectors(r,this.center);const l=lc.lengthSq();if(l>this.radius*this.radius){const m=Math.sqrt(l),y=(m-this.radius)*.5;this.center.addScaledVector(lc,y/m),this.radius+=y}return this}union(r){return r.isEmpty()?this:this.isEmpty()?(this.copy(r),this):(this.center.equals(r.center)===!0?this.radius=Math.max(this.radius,r.radius):(xu.subVectors(r.center,this.center).setLength(r.radius),this.expandByPoint(lc.copy(r.center).add(xu)),this.expandByPoint(lc.copy(r.center).sub(xu))),this)}equals(r){return r.center.equals(this.center)&&r.radius===this.radius}clone(){return new this.constructor().copy(this)}}const Jo=new je,Lf=new je,Eu=new je,Xa=new je,Pf=new je,bu=new je,Gs=new je;class Vs{constructor(r=new je,l=new je(0,0,-1)){this.origin=r,this.direction=l}set(r,l){return this.origin.copy(r),this.direction.copy(l),this}copy(r){return this.origin.copy(r.origin),this.direction.copy(r.direction),this}at(r,l){return l.copy(this.origin).addScaledVector(this.direction,r)}lookAt(r){return this.direction.copy(r).sub(this.origin).normalize(),this}recast(r){return this.origin.copy(this.at(r,Jo)),this}closestPointToPoint(r,l){l.subVectors(r,this.origin);const m=l.dot(this.direction);return m<0?l.copy(this.origin):l.copy(this.origin).addScaledVector(this.direction,m)}distanceToPoint(r){return Math.sqrt(this.distanceSqToPoint(r))}distanceSqToPoint(r){const l=Jo.subVectors(r,this.origin).dot(this.direction);return l<0?this.origin.distanceToSquared(r):(Jo.copy(this.origin).addScaledVector(this.direction,l),Jo.distanceToSquared(r))}distanceSqToSegment(r,l,m,y){Lf.copy(r).add(l).multiplyScalar(.5),Eu.copy(l).sub(r).normalize(),Xa.copy(this.origin).sub(Lf);const _=r.distanceTo(l)*.5,R=-this.direction.dot(Eu),I=Xa.dot(this.direction),O=-Xa.dot(Eu),N=Xa.lengthSq(),V=Math.abs(1-R*R);let Q,X,$,ie;if(V>0)if(Q=R*O-I,X=R*I-O,ie=_*V,Q>=0)if(X>=-ie)if(X<=ie){const ue=1/V;Q*=ue,X*=ue,$=Q*(Q+R*X+2*I)+X*(R*Q+X+2*O)+N}else X=_,Q=Math.max(0,-(R*X+I)),$=-Q*Q+X*(X+2*O)+N;else X=-_,Q=Math.max(0,-(R*X+I)),$=-Q*Q+X*(X+2*O)+N;else X<=-ie?(Q=Math.max(0,-(-R*_+I)),X=Q>0?-_:Math.min(Math.max(-_,-O),_),$=-Q*Q+X*(X+2*O)+N):X<=ie?(Q=0,X=Math.min(Math.max(-_,-O),_),$=X*(X+2*O)+N):(Q=Math.max(0,-(R*_+I)),X=Q>0?_:Math.min(Math.max(-_,-O),_),$=-Q*Q+X*(X+2*O)+N);else X=R>0?-_:_,Q=Math.max(0,-(R*X+I)),$=-Q*Q+X*(X+2*O)+N;return m&&m.copy(this.origin).addScaledVector(this.direction,Q),y&&y.copy(Lf).addScaledVector(Eu,X),$}intersectSphere(r,l){Jo.subVectors(r.center,this.origin);const m=Jo.dot(this.direction),y=Jo.dot(Jo)-m*m,_=r.radius*r.radius;if(y>_)return null;const R=Math.sqrt(_-y),I=m-R,O=m+R;return O<0?null:I<0?this.at(O,l):this.at(I,l)}intersectsSphere(r){return this.distanceSqToPoint(r.center)<=r.radius*r.radius}distanceToPlane(r){const l=r.normal.dot(this.direction);if(l===0)return r.distanceToPoint(this.origin)===0?0:null;const m=-(this.origin.dot(r.normal)+r.constant)/l;return m>=0?m:null}intersectPlane(r,l){const m=this.distanceToPlane(r);return m===null?null:this.at(m,l)}intersectsPlane(r){const l=r.distanceToPoint(this.origin);return l===0||r.normal.dot(this.direction)*l<0}intersectBox(r,l){let m,y,_,R,I,O;const N=1/this.direction.x,V=1/this.direction.y,Q=1/this.direction.z,X=this.origin;return N>=0?(m=(r.min.x-X.x)*N,y=(r.max.x-X.x)*N):(m=(r.max.x-X.x)*N,y=(r.min.x-X.x)*N),V>=0?(_=(r.min.y-X.y)*V,R=(r.max.y-X.y)*V):(_=(r.max.y-X.y)*V,R=(r.min.y-X.y)*V),m>R||_>y||((_>m||isNaN(m))&&(m=_),(R=0?(I=(r.min.z-X.z)*Q,O=(r.max.z-X.z)*Q):(I=(r.max.z-X.z)*Q,O=(r.min.z-X.z)*Q),m>O||I>y)||((I>m||m!==m)&&(m=I),(O=0?m:y,l)}intersectsBox(r){return this.intersectBox(r,Jo)!==null}intersectTriangle(r,l,m,y,_){Pf.subVectors(l,r),bu.subVectors(m,r),Gs.crossVectors(Pf,bu);let R=this.direction.dot(Gs),I;if(R>0){if(y)return null;I=1}else if(R<0)I=-1,R=-R;else return null;Xa.subVectors(this.origin,r);const O=I*this.direction.dot(bu.crossVectors(Xa,bu));if(O<0)return null;const N=I*this.direction.dot(Pf.cross(Xa));if(N<0||O+N>R)return null;const V=-I*Xa.dot(Gs);return V<0?null:this.at(V/R,_)}applyMatrix4(r){return this.origin.applyMatrix4(r),this.direction.transformDirection(r),this}equals(r){return r.origin.equals(this.origin)&&r.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}}class _i{constructor(r,l,m,y,_,R,I,O,N,V,Q,X,$,ie,ue,re){_i.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],r!==void 0&&this.set(r,l,m,y,_,R,I,O,N,V,Q,X,$,ie,ue,re)}set(r,l,m,y,_,R,I,O,N,V,Q,X,$,ie,ue,re){const q=this.elements;return q[0]=r,q[4]=l,q[8]=m,q[12]=y,q[1]=_,q[5]=R,q[9]=I,q[13]=O,q[2]=N,q[6]=V,q[10]=Q,q[14]=X,q[3]=$,q[7]=ie,q[11]=ue,q[15]=re,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 _i().fromArray(this.elements)}copy(r){const l=this.elements,m=r.elements;return l[0]=m[0],l[1]=m[1],l[2]=m[2],l[3]=m[3],l[4]=m[4],l[5]=m[5],l[6]=m[6],l[7]=m[7],l[8]=m[8],l[9]=m[9],l[10]=m[10],l[11]=m[11],l[12]=m[12],l[13]=m[13],l[14]=m[14],l[15]=m[15],this}copyPosition(r){const l=this.elements,m=r.elements;return l[12]=m[12],l[13]=m[13],l[14]=m[14],this}setFromMatrix3(r){const l=r.elements;return this.set(l[0],l[3],l[6],0,l[1],l[4],l[7],0,l[2],l[5],l[8],0,0,0,0,1),this}extractBasis(r,l,m){return r.setFromMatrixColumn(this,0),l.setFromMatrixColumn(this,1),m.setFromMatrixColumn(this,2),this}makeBasis(r,l,m){return this.set(r.x,l.x,m.x,0,r.y,l.y,m.y,0,r.z,l.z,m.z,0,0,0,0,1),this}extractRotation(r){const l=this.elements,m=r.elements,y=1/hl.setFromMatrixColumn(r,0).length(),_=1/hl.setFromMatrixColumn(r,1).length(),R=1/hl.setFromMatrixColumn(r,2).length();return l[0]=m[0]*y,l[1]=m[1]*y,l[2]=m[2]*y,l[3]=0,l[4]=m[4]*_,l[5]=m[5]*_,l[6]=m[6]*_,l[7]=0,l[8]=m[8]*R,l[9]=m[9]*R,l[10]=m[10]*R,l[11]=0,l[12]=0,l[13]=0,l[14]=0,l[15]=1,this}makeRotationFromEuler(r){const l=this.elements,m=r.x,y=r.y,_=r.z,R=Math.cos(m),I=Math.sin(m),O=Math.cos(y),N=Math.sin(y),V=Math.cos(_),Q=Math.sin(_);if(r.order==="XYZ"){const X=R*V,$=R*Q,ie=I*V,ue=I*Q;l[0]=O*V,l[4]=-O*Q,l[8]=N,l[1]=$+ie*N,l[5]=X-ue*N,l[9]=-I*O,l[2]=ue-X*N,l[6]=ie+$*N,l[10]=R*O}else if(r.order==="YXZ"){const X=O*V,$=O*Q,ie=N*V,ue=N*Q;l[0]=X+ue*I,l[4]=ie*I-$,l[8]=R*N,l[1]=R*Q,l[5]=R*V,l[9]=-I,l[2]=$*I-ie,l[6]=ue+X*I,l[10]=R*O}else if(r.order==="ZXY"){const X=O*V,$=O*Q,ie=N*V,ue=N*Q;l[0]=X-ue*I,l[4]=-R*Q,l[8]=ie+$*I,l[1]=$+ie*I,l[5]=R*V,l[9]=ue-X*I,l[2]=-R*N,l[6]=I,l[10]=R*O}else if(r.order==="ZYX"){const X=R*V,$=R*Q,ie=I*V,ue=I*Q;l[0]=O*V,l[4]=ie*N-$,l[8]=X*N+ue,l[1]=O*Q,l[5]=ue*N+X,l[9]=$*N-ie,l[2]=-N,l[6]=I*O,l[10]=R*O}else if(r.order==="YZX"){const X=R*O,$=R*N,ie=I*O,ue=I*N;l[0]=O*V,l[4]=ue-X*Q,l[8]=ie*Q+$,l[1]=Q,l[5]=R*V,l[9]=-I*V,l[2]=-N*V,l[6]=$*Q+ie,l[10]=X-ue*Q}else if(r.order==="XZY"){const X=R*O,$=R*N,ie=I*O,ue=I*N;l[0]=O*V,l[4]=-Q,l[8]=N*V,l[1]=X*Q+ue,l[5]=R*V,l[9]=$*Q-ie,l[2]=ie*Q-$,l[6]=I*V,l[10]=ue*Q+X}return l[3]=0,l[7]=0,l[11]=0,l[12]=0,l[13]=0,l[14]=0,l[15]=1,this}makeRotationFromQuaternion(r){return this.compose(_P,r,wP)}lookAt(r,l,m){const y=this.elements;return Oo.subVectors(r,l),Oo.lengthSq()===0&&(Oo.z=1),Oo.normalize(),cc.crossVectors(m,Oo),cc.lengthSq()===0&&(Math.abs(m.z)===1?Oo.x+=1e-4:Oo.z+=1e-4,Oo.normalize(),cc.crossVectors(m,Oo)),cc.normalize(),$m.crossVectors(Oo,cc),y[0]=cc.x,y[4]=$m.x,y[8]=Oo.x,y[1]=cc.y,y[5]=$m.y,y[9]=Oo.y,y[2]=cc.z,y[6]=$m.z,y[10]=Oo.z,this}multiply(r){return this.multiplyMatrices(this,r)}premultiply(r){return this.multiplyMatrices(r,this)}multiplyMatrices(r,l){const m=r.elements,y=l.elements,_=this.elements,R=m[0],I=m[4],O=m[8],N=m[12],V=m[1],Q=m[5],X=m[9],$=m[13],ie=m[2],ue=m[6],re=m[10],q=m[14],Se=m[3],fe=m[7],Me=m[11],ze=m[15],He=y[0],et=y[4],st=y[8],Be=y[12],Xe=y[1],rt=y[5],bt=y[9],Gt=y[13],lt=y[2],wt=y[6],Kt=y[10],qt=y[14],ln=y[3],Jt=y[7],pn=y[11],dn=y[15];return _[0]=R*He+I*Xe+O*lt+N*ln,_[4]=R*et+I*rt+O*wt+N*Jt,_[8]=R*st+I*bt+O*Kt+N*pn,_[12]=R*Be+I*Gt+O*qt+N*dn,_[1]=V*He+Q*Xe+X*lt+$*ln,_[5]=V*et+Q*rt+X*wt+$*Jt,_[9]=V*st+Q*bt+X*Kt+$*pn,_[13]=V*Be+Q*Gt+X*qt+$*dn,_[2]=ie*He+ue*Xe+re*lt+q*ln,_[6]=ie*et+ue*rt+re*wt+q*Jt,_[10]=ie*st+ue*bt+re*Kt+q*pn,_[14]=ie*Be+ue*Gt+re*qt+q*dn,_[3]=Se*He+fe*Xe+Me*lt+ze*ln,_[7]=Se*et+fe*rt+Me*wt+ze*Jt,_[11]=Se*st+fe*bt+Me*Kt+ze*pn,_[15]=Se*Be+fe*Gt+Me*qt+ze*dn,this}multiplyScalar(r){const l=this.elements;return l[0]*=r,l[4]*=r,l[8]*=r,l[12]*=r,l[1]*=r,l[5]*=r,l[9]*=r,l[13]*=r,l[2]*=r,l[6]*=r,l[10]*=r,l[14]*=r,l[3]*=r,l[7]*=r,l[11]*=r,l[15]*=r,this}determinant(){const r=this.elements,l=r[0],m=r[4],y=r[8],_=r[12],R=r[1],I=r[5],O=r[9],N=r[13],V=r[2],Q=r[6],X=r[10],$=r[14],ie=r[3],ue=r[7],re=r[11],q=r[15];return ie*(+_*O*Q-y*N*Q-_*I*X+m*N*X+y*I*$-m*O*$)+ue*(+l*O*$-l*N*X+_*R*X-y*R*$+y*N*V-_*O*V)+re*(+l*N*Q-l*I*$-_*R*Q+m*R*$+_*I*V-m*N*V)+q*(-y*I*V-l*O*Q+l*I*X+y*R*Q-m*R*X+m*O*V)}transpose(){const r=this.elements;let l;return l=r[1],r[1]=r[4],r[4]=l,l=r[2],r[2]=r[8],r[8]=l,l=r[6],r[6]=r[9],r[9]=l,l=r[3],r[3]=r[12],r[12]=l,l=r[7],r[7]=r[13],r[13]=l,l=r[11],r[11]=r[14],r[14]=l,this}setPosition(r,l,m){const y=this.elements;return r.isVector3?(y[12]=r.x,y[13]=r.y,y[14]=r.z):(y[12]=r,y[13]=l,y[14]=m),this}invert(){const r=this.elements,l=r[0],m=r[1],y=r[2],_=r[3],R=r[4],I=r[5],O=r[6],N=r[7],V=r[8],Q=r[9],X=r[10],$=r[11],ie=r[12],ue=r[13],re=r[14],q=r[15],Se=Q*re*N-ue*X*N+ue*O*$-I*re*$-Q*O*q+I*X*q,fe=ie*X*N-V*re*N-ie*O*$+R*re*$+V*O*q-R*X*q,Me=V*ue*N-ie*Q*N+ie*I*$-R*ue*$-V*I*q+R*Q*q,ze=ie*Q*O-V*ue*O-ie*I*X+R*ue*X+V*I*re-R*Q*re,He=l*Se+m*fe+y*Me+_*ze;if(He===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);const et=1/He;return r[0]=Se*et,r[1]=(ue*X*_-Q*re*_-ue*y*$+m*re*$+Q*y*q-m*X*q)*et,r[2]=(I*re*_-ue*O*_+ue*y*N-m*re*N-I*y*q+m*O*q)*et,r[3]=(Q*O*_-I*X*_-Q*y*N+m*X*N+I*y*$-m*O*$)*et,r[4]=fe*et,r[5]=(V*re*_-ie*X*_+ie*y*$-l*re*$-V*y*q+l*X*q)*et,r[6]=(ie*O*_-R*re*_-ie*y*N+l*re*N+R*y*q-l*O*q)*et,r[7]=(R*X*_-V*O*_+V*y*N-l*X*N-R*y*$+l*O*$)*et,r[8]=Me*et,r[9]=(ie*Q*_-V*ue*_-ie*m*$+l*ue*$+V*m*q-l*Q*q)*et,r[10]=(R*ue*_-ie*I*_+ie*m*N-l*ue*N-R*m*q+l*I*q)*et,r[11]=(V*I*_-R*Q*_-V*m*N+l*Q*N+R*m*$-l*I*$)*et,r[12]=ze*et,r[13]=(V*ue*y-ie*Q*y+ie*m*X-l*ue*X-V*m*re+l*Q*re)*et,r[14]=(ie*I*y-R*ue*y-ie*m*O+l*ue*O+R*m*re-l*I*re)*et,r[15]=(R*Q*y-V*I*y+V*m*O-l*Q*O-R*m*X+l*I*X)*et,this}scale(r){const l=this.elements,m=r.x,y=r.y,_=r.z;return l[0]*=m,l[4]*=y,l[8]*=_,l[1]*=m,l[5]*=y,l[9]*=_,l[2]*=m,l[6]*=y,l[10]*=_,l[3]*=m,l[7]*=y,l[11]*=_,this}getMaxScaleOnAxis(){const r=this.elements,l=r[0]*r[0]+r[1]*r[1]+r[2]*r[2],m=r[4]*r[4]+r[5]*r[5]+r[6]*r[6],y=r[8]*r[8]+r[9]*r[9]+r[10]*r[10];return Math.sqrt(Math.max(l,m,y))}makeTranslation(r,l,m){return r.isVector3?this.set(1,0,0,r.x,0,1,0,r.y,0,0,1,r.z,0,0,0,1):this.set(1,0,0,r,0,1,0,l,0,0,1,m,0,0,0,1),this}makeRotationX(r){const l=Math.cos(r),m=Math.sin(r);return this.set(1,0,0,0,0,l,-m,0,0,m,l,0,0,0,0,1),this}makeRotationY(r){const l=Math.cos(r),m=Math.sin(r);return this.set(l,0,m,0,0,1,0,0,-m,0,l,0,0,0,0,1),this}makeRotationZ(r){const l=Math.cos(r),m=Math.sin(r);return this.set(l,-m,0,0,m,l,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(r,l){const m=Math.cos(l),y=Math.sin(l),_=1-m,R=r.x,I=r.y,O=r.z,N=_*R,V=_*I;return this.set(N*R+m,N*I-y*O,N*O+y*I,0,N*I+y*O,V*I+m,V*O-y*R,0,N*O-y*I,V*O+y*R,_*O*O+m,0,0,0,0,1),this}makeScale(r,l,m){return this.set(r,0,0,0,0,l,0,0,0,0,m,0,0,0,0,1),this}makeShear(r,l,m,y,_,R){return this.set(1,m,_,0,r,1,R,0,l,y,1,0,0,0,0,1),this}compose(r,l,m){const y=this.elements,_=l._x,R=l._y,I=l._z,O=l._w,N=_+_,V=R+R,Q=I+I,X=_*N,$=_*V,ie=_*Q,ue=R*V,re=R*Q,q=I*Q,Se=O*N,fe=O*V,Me=O*Q,ze=m.x,He=m.y,et=m.z;return y[0]=(1-(ue+q))*ze,y[1]=($+Me)*ze,y[2]=(ie-fe)*ze,y[3]=0,y[4]=($-Me)*He,y[5]=(1-(X+q))*He,y[6]=(re+Se)*He,y[7]=0,y[8]=(ie+fe)*et,y[9]=(re-Se)*et,y[10]=(1-(X+ue))*et,y[11]=0,y[12]=r.x,y[13]=r.y,y[14]=r.z,y[15]=1,this}decompose(r,l,m){const y=this.elements;let _=hl.set(y[0],y[1],y[2]).length();const R=hl.set(y[4],y[5],y[6]).length(),I=hl.set(y[8],y[9],y[10]).length();this.determinant()<0&&(_=-_),r.x=y[12],r.y=y[13],r.z=y[14],ua.copy(this);const N=1/_,V=1/R,Q=1/I;return ua.elements[0]*=N,ua.elements[1]*=N,ua.elements[2]*=N,ua.elements[4]*=V,ua.elements[5]*=V,ua.elements[6]*=V,ua.elements[8]*=Q,ua.elements[9]*=Q,ua.elements[10]*=Q,l.setFromRotationMatrix(ua),m.x=_,m.y=R,m.z=I,this}makePerspective(r,l,m,y,_,R,I=Yo){const O=this.elements,N=2*_/(l-r),V=2*_/(m-y),Q=(l+r)/(l-r),X=(m+y)/(m-y);let $,ie;if(I===Yo)$=-(R+_)/(R-_),ie=-2*R*_/(R-_);else if(I===lh)$=-R/(R-_),ie=-R*_/(R-_);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+I);return O[0]=N,O[4]=0,O[8]=Q,O[12]=0,O[1]=0,O[5]=V,O[9]=X,O[13]=0,O[2]=0,O[6]=0,O[10]=$,O[14]=ie,O[3]=0,O[7]=0,O[11]=-1,O[15]=0,this}makeOrthographic(r,l,m,y,_,R,I=Yo){const O=this.elements,N=1/(l-r),V=1/(m-y),Q=1/(R-_),X=(l+r)*N,$=(m+y)*V;let ie,ue;if(I===Yo)ie=(R+_)*Q,ue=-2*Q;else if(I===lh)ie=_*Q,ue=-1*Q;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+I);return O[0]=2*N,O[4]=0,O[8]=0,O[12]=-X,O[1]=0,O[5]=2*V,O[9]=0,O[13]=-$,O[2]=0,O[6]=0,O[10]=ue,O[14]=-ie,O[3]=0,O[7]=0,O[11]=0,O[15]=1,this}equals(r){const l=this.elements,m=r.elements;for(let y=0;y<16;y++)if(l[y]!==m[y])return!1;return!0}fromArray(r,l=0){for(let m=0;m<16;m++)this.elements[m]=r[m+l];return this}toArray(r=[],l=0){const m=this.elements;return r[l]=m[0],r[l+1]=m[1],r[l+2]=m[2],r[l+3]=m[3],r[l+4]=m[4],r[l+5]=m[5],r[l+6]=m[6],r[l+7]=m[7],r[l+8]=m[8],r[l+9]=m[9],r[l+10]=m[10],r[l+11]=m[11],r[l+12]=m[12],r[l+13]=m[13],r[l+14]=m[14],r[l+15]=m[15],r}}const hl=new je,ua=new _i,_P=new je(0,0,0),wP=new je(1,1,1),cc=new je,$m=new je,Oo=new je,_w=new _i,ww=new Ti;class Df{constructor(r=0,l=0,m=0,y=Df.DEFAULT_ORDER){this.isEuler=!0,this._x=r,this._y=l,this._z=m,this._order=y}get x(){return this._x}set x(r){this._x=r,this._onChangeCallback()}get y(){return this._y}set y(r){this._y=r,this._onChangeCallback()}get z(){return this._z}set z(r){this._z=r,this._onChangeCallback()}get order(){return this._order}set order(r){this._order=r,this._onChangeCallback()}set(r,l,m,y=this._order){return this._x=r,this._y=l,this._z=m,this._order=y,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(r){return this._x=r._x,this._y=r._y,this._z=r._z,this._order=r._order,this._onChangeCallback(),this}setFromRotationMatrix(r,l=this._order,m=!0){const y=r.elements,_=y[0],R=y[4],I=y[8],O=y[1],N=y[5],V=y[9],Q=y[2],X=y[6],$=y[10];switch(l){case"XYZ":this._y=Math.asin(Nr(I,-1,1)),Math.abs(I)<.9999999?(this._x=Math.atan2(-V,$),this._z=Math.atan2(-R,_)):(this._x=Math.atan2(X,N),this._z=0);break;case"YXZ":this._x=Math.asin(-Nr(V,-1,1)),Math.abs(V)<.9999999?(this._y=Math.atan2(I,$),this._z=Math.atan2(O,N)):(this._y=Math.atan2(-Q,_),this._z=0);break;case"ZXY":this._x=Math.asin(Nr(X,-1,1)),Math.abs(X)<.9999999?(this._y=Math.atan2(-Q,$),this._z=Math.atan2(-R,N)):(this._y=0,this._z=Math.atan2(O,_));break;case"ZYX":this._y=Math.asin(-Nr(Q,-1,1)),Math.abs(Q)<.9999999?(this._x=Math.atan2(X,$),this._z=Math.atan2(O,_)):(this._x=0,this._z=Math.atan2(-R,N));break;case"YZX":this._z=Math.asin(Nr(O,-1,1)),Math.abs(O)<.9999999?(this._x=Math.atan2(-V,N),this._y=Math.atan2(-Q,_)):(this._x=0,this._y=Math.atan2(I,$));break;case"XZY":this._z=Math.asin(-Nr(R,-1,1)),Math.abs(R)<.9999999?(this._x=Math.atan2(X,N),this._y=Math.atan2(I,_)):(this._x=Math.atan2(-V,$),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+l)}return this._order=l,m===!0&&this._onChangeCallback(),this}setFromQuaternion(r,l,m){return _w.makeRotationFromQuaternion(r),this.setFromRotationMatrix(_w,l,m)}setFromVector3(r,l=this._order){return this.set(r.x,r.y,r.z,l)}reorder(r){return ww.setFromEuler(this),this.setFromQuaternion(ww,r)}equals(r){return r._x===this._x&&r._y===this._y&&r._z===this._z&&r._order===this._order}fromArray(r){return this._x=r[0],this._y=r[1],this._z=r[2],r[3]!==void 0&&(this._order=r[3]),this._onChangeCallback(),this}toArray(r=[],l=0){return r[l]=this._x,r[l+1]=this._y,r[l+2]=this._z,r[l+3]=this._order,r}_onChange(r){return this._onChangeCallback=r,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}Df.DEFAULT_ORDER="XYZ";class Jm{constructor(){this.mask=1}set(r){this.mask=(1<>>0}enable(r){this.mask|=1<1){for(let l=0;l1){for(let m=0;m0&&(m=m.concat(R))}return m}getWorldPosition(r){return this.updateWorldMatrix(!0,!1),r.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(r){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Of,r,CP),r}getWorldScale(r){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(Of,SP,r),r}getWorldDirection(r){this.updateWorldMatrix(!0,!1);const l=this.matrixWorld.elements;return r.set(l[8],l[9],l[10]).normalize()}raycast(){}traverse(r){r(this);const l=this.children;for(let m=0,y=l.length;m0&&(y.userData=this.userData),y.layers=this.layers.mask,y.matrix=this.matrix.toArray(),y.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(y.matrixAutoUpdate=!1),this.isInstancedMesh&&(y.type="InstancedMesh",y.count=this.count,y.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(y.instanceColor=this.instanceColor.toJSON()));function _(I,O){return I[O.uuid]===void 0&&(I[O.uuid]=O.toJSON(r)),O.uuid}if(this.isScene)this.background&&(this.background.isColor?y.background=this.background.toJSON():this.background.isTexture&&(y.background=this.background.toJSON(r).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(y.environment=this.environment.toJSON(r).uuid);else if(this.isMesh||this.isLine||this.isPoints){y.geometry=_(r.geometries,this.geometry);const I=this.geometry.parameters;if(I!==void 0&&I.shapes!==void 0){const O=I.shapes;if(Array.isArray(O))for(let N=0,V=O.length;N0){y.children=[];for(let I=0;I0){y.animations=[];for(let I=0;I0&&(m.geometries=I),O.length>0&&(m.materials=O),N.length>0&&(m.textures=N),V.length>0&&(m.images=V),Q.length>0&&(m.shapes=Q),X.length>0&&(m.skeletons=X),$.length>0&&(m.animations=$),ie.length>0&&(m.nodes=ie)}return m.object=y,m;function R(I){const O=[];for(const N in I){const V=I[N];delete V.metadata,O.push(V)}return O}}clone(r){return new this.constructor().copy(this,r)}copy(r,l=!0){if(this.name=r.name,this.up.copy(r.up),this.position.copy(r.position),this.rotation.order=r.rotation.order,this.quaternion.copy(r.quaternion),this.scale.copy(r.scale),this.matrix.copy(r.matrix),this.matrixWorld.copy(r.matrixWorld),this.matrixAutoUpdate=r.matrixAutoUpdate,this.matrixWorldNeedsUpdate=r.matrixWorldNeedsUpdate,this.matrixWorldAutoUpdate=r.matrixWorldAutoUpdate,this.layers.mask=r.layers.mask,this.visible=r.visible,this.castShadow=r.castShadow,this.receiveShadow=r.receiveShadow,this.frustumCulled=r.frustumCulled,this.renderOrder=r.renderOrder,this.animations=r.animations.slice(),this.userData=JSON.parse(JSON.stringify(r.userData)),l===!0)for(let m=0;m0?y.multiplyScalar(1/Math.sqrt(_)):y.set(0,0,0)}static getBarycoord(r,l,m,y,_){da.subVectors(y,l),dl.subVectors(m,l),Xy.subVectors(r,l);const R=da.dot(da),I=da.dot(dl),O=da.dot(Xy),N=dl.dot(dl),V=dl.dot(Xy),Q=R*N-I*I;if(Q===0)return _.set(-2,-1,-1);const X=1/Q,$=(N*O-I*V)*X,ie=(R*V-I*O)*X;return _.set(1-$-ie,ie,$)}static containsPoint(r,l,m,y){return this.getBarycoord(r,l,m,y,fl),fl.x>=0&&fl.y>=0&&fl.x+fl.y<=1}static getUV(r,l,m,y,_,R,I,O){return eg===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),eg=!0),this.getInterpolation(r,l,m,y,_,R,I,O)}static getInterpolation(r,l,m,y,_,R,I,O){return this.getBarycoord(r,l,m,y,fl),O.setScalar(0),O.addScaledVector(_,fl.x),O.addScaledVector(R,fl.y),O.addScaledVector(I,fl.z),O}static isFrontFacing(r,l,m,y){return da.subVectors(m,l),dl.subVectors(r,l),da.cross(dl).dot(y)<0}set(r,l,m){return this.a.copy(r),this.b.copy(l),this.c.copy(m),this}setFromPointsAndIndices(r,l,m,y){return this.a.copy(r[l]),this.b.copy(r[m]),this.c.copy(r[y]),this}setFromAttributeAndIndices(r,l,m,y){return this.a.fromBufferAttribute(r,l),this.b.fromBufferAttribute(r,m),this.c.fromBufferAttribute(r,y),this}clone(){return new this.constructor().copy(this)}copy(r){return this.a.copy(r.a),this.b.copy(r.b),this.c.copy(r.c),this}getArea(){return da.subVectors(this.c,this.b),dl.subVectors(this.a,this.b),da.cross(dl).length()*.5}getMidpoint(r){return r.addVectors(this.a,this.b).add(this.c).multiplyScalar(.3333333333333333)}getNormal(r){return bo.getNormal(this.a,this.b,this.c,r)}getPlane(r){return r.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(r,l){return bo.getBarycoord(r,this.a,this.b,this.c,l)}getUV(r,l,m,y,_){return eg===!1&&(console.warn("THREE.Triangle.getUV() has been renamed to THREE.Triangle.getInterpolation()."),eg=!0),bo.getInterpolation(r,this.a,this.b,this.c,l,m,y,_)}getInterpolation(r,l,m,y,_){return bo.getInterpolation(r,this.a,this.b,this.c,l,m,y,_)}containsPoint(r){return bo.containsPoint(r,this.a,this.b,this.c)}isFrontFacing(r){return bo.isFrontFacing(this.a,this.b,this.c,r)}intersectsBox(r){return r.intersectsTriangle(this)}closestPointToPoint(r,l){const m=this.a,y=this.b,_=this.c;let R,I;wu.subVectors(y,m),Mu.subVectors(_,m),Ky.subVectors(r,m);const O=wu.dot(Ky),N=Mu.dot(Ky);if(O<=0&&N<=0)return l.copy(m);qy.subVectors(r,y);const V=wu.dot(qy),Q=Mu.dot(qy);if(V>=0&&Q<=V)return l.copy(y);const X=O*Q-V*N;if(X<=0&&O>=0&&V<=0)return R=O/(O-V),l.copy(m).addScaledVector(wu,R);Yy.subVectors(r,_);const $=wu.dot(Yy),ie=Mu.dot(Yy);if(ie>=0&&$<=ie)return l.copy(_);const ue=$*N-O*ie;if(ue<=0&&N>=0&&ie<=0)return I=N/(N-ie),l.copy(m).addScaledVector(Mu,I);const re=V*ie-$*Q;if(re<=0&&Q-V>=0&&$-ie>=0)return Rw.subVectors(_,y),I=(Q-V)/(Q-V+($-ie)),l.copy(y).addScaledVector(Rw,I);const q=1/(re+ue+X);return R=ue*q,I=X*q,l.copy(m).addScaledVector(wu,R).addScaledVector(Mu,I)}equals(r){return r.a.equals(this.a)&&r.b.equals(this.b)&&r.c.equals(this.c)}}const Iw={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},hc={h:0,s:0,l:0},tg={h:0,s:0,l:0};function $y(w,r,l){return l<0&&(l+=1),l>1&&(l-=1),l<.16666666666666666?w+(r-w)*6*l:l<.5?r:l<.6666666666666666?w+(r-w)*6*(.6666666666666666-l):w}class Hn{constructor(r,l,m){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(r,l,m)}set(r,l,m){if(l===void 0&&m===void 0){const y=r;y&&y.isColor?this.copy(y):typeof y=="number"?this.setHex(y):typeof y=="string"&&this.setStyle(y)}else this.setRGB(r,l,m);return this}setScalar(r){return this.r=r,this.g=r,this.b=r,this}setHex(r,l=Cr){return r=Math.floor(r),this.r=(r>>16&255)/255,this.g=(r>>8&255)/255,this.b=(r&255)/255,vr.toWorkingColorSpace(this,l),this}setRGB(r,l,m,y=vr.workingColorSpace){return this.r=r,this.g=l,this.b=m,vr.toWorkingColorSpace(this,y),this}setHSL(r,l,m,y=vr.workingColorSpace){if(r=Sf(r,1),l=Nr(l,0,1),m=Nr(m,0,1),l===0)this.r=this.g=this.b=m;else{const _=m<=.5?m*(1+l):m+l-m*l,R=2*m-_;this.r=$y(R,_,r+.3333333333333333),this.g=$y(R,_,r),this.b=$y(R,_,r-.3333333333333333)}return vr.toWorkingColorSpace(this,y),this}setStyle(r,l=Cr){function m(_){_!==void 0&&parseFloat(_)<1&&console.warn("THREE.Color: Alpha component of "+r+" will be ignored.")}let y;if(y=/^(\w+)\(([^\)]*)\)/.exec(r)){let _;const R=y[1],I=y[2];switch(R){case"rgb":case"rgba":if(_=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(I))return m(_[4]),this.setRGB(Math.min(255,parseInt(_[1],10))/255,Math.min(255,parseInt(_[2],10))/255,Math.min(255,parseInt(_[3],10))/255,l);if(_=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(I))return m(_[4]),this.setRGB(Math.min(100,parseInt(_[1],10))/100,Math.min(100,parseInt(_[2],10))/100,Math.min(100,parseInt(_[3],10))/100,l);break;case"hsl":case"hsla":if(_=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(I))return m(_[4]),this.setHSL(parseFloat(_[1])/360,parseFloat(_[2])/100,parseFloat(_[3])/100,l);break;default:console.warn("THREE.Color: Unknown color model "+r)}}else if(y=/^\#([A-Fa-f\d]+)$/.exec(r)){const _=y[1],R=_.length;if(R===3)return this.setRGB(parseInt(_.charAt(0),16)/15,parseInt(_.charAt(1),16)/15,parseInt(_.charAt(2),16)/15,l);if(R===6)return this.setHex(parseInt(_,16),l);console.warn("THREE.Color: Invalid hex color "+r)}else if(r&&r.length>0)return this.setColorName(r,l);return this}setColorName(r,l=Cr){const m=Iw[r.toLowerCase()];return m!==void 0?this.setHex(m,l):console.warn("THREE.Color: Unknown color "+r),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(r){return this.r=r.r,this.g=r.g,this.b=r.b,this}copySRGBToLinear(r){return this.r=ac(r.r),this.g=ac(r.g),this.b=ac(r.b),this}copyLinearToSRGB(r){return this.r=If(r.r),this.g=If(r.g),this.b=If(r.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(r=Cr){return vr.fromWorkingColorSpace(Hs.copy(this),r),Math.round(Nr(Hs.r*255,0,255))*65536+Math.round(Nr(Hs.g*255,0,255))*256+Math.round(Nr(Hs.b*255,0,255))}getHexString(r=Cr){return("000000"+this.getHex(r).toString(16)).slice(-6)}getHSL(r,l=vr.workingColorSpace){vr.fromWorkingColorSpace(Hs.copy(this),l);const m=Hs.r,y=Hs.g,_=Hs.b,R=Math.max(m,y,_),I=Math.min(m,y,_);let O,N;const V=(I+R)/2;if(I===R)O=0,N=0;else{const Q=R-I;switch(N=V<=.5?Q/(R+I):Q/(2-R-I),R){case m:O=(y-_)/Q+(y<_?6:0);break;case y:O=(_-m)/Q+2;break;case _:O=(m-y)/Q+4;break}O/=6}return r.h=O,r.s=N,r.l=V,r}getRGB(r,l=vr.workingColorSpace){return vr.fromWorkingColorSpace(Hs.copy(this),l),r.r=Hs.r,r.g=Hs.g,r.b=Hs.b,r}getStyle(r=Cr){vr.fromWorkingColorSpace(Hs.copy(this),r);const l=Hs.r,m=Hs.g,y=Hs.b;return r!==Cr?`color(${r} ${l.toFixed(3)} ${m.toFixed(3)} ${y.toFixed(3)})`:`rgb(${Math.round(l*255)},${Math.round(m*255)},${Math.round(y*255)})`}offsetHSL(r,l,m){return this.getHSL(hc),this.setHSL(hc.h+r,hc.s+l,hc.l+m)}add(r){return this.r+=r.r,this.g+=r.g,this.b+=r.b,this}addColors(r,l){return this.r=r.r+l.r,this.g=r.g+l.g,this.b=r.b+l.b,this}addScalar(r){return this.r+=r,this.g+=r,this.b+=r,this}sub(r){return this.r=Math.max(0,this.r-r.r),this.g=Math.max(0,this.g-r.g),this.b=Math.max(0,this.b-r.b),this}multiply(r){return this.r*=r.r,this.g*=r.g,this.b*=r.b,this}multiplyScalar(r){return this.r*=r,this.g*=r,this.b*=r,this}lerp(r,l){return this.r+=(r.r-this.r)*l,this.g+=(r.g-this.g)*l,this.b+=(r.b-this.b)*l,this}lerpColors(r,l,m){return this.r=r.r+(l.r-r.r)*m,this.g=r.g+(l.g-r.g)*m,this.b=r.b+(l.b-r.b)*m,this}lerpHSL(r,l){this.getHSL(hc),r.getHSL(tg);const m=ch(hc.h,tg.h,l),y=ch(hc.s,tg.s,l),_=ch(hc.l,tg.l,l);return this.setHSL(m,y,_),this}setFromVector3(r){return this.r=r.x,this.g=r.y,this.b=r.z,this}applyMatrix3(r){const l=this.r,m=this.g,y=this.b,_=r.elements;return this.r=_[0]*l+_[3]*m+_[6]*y,this.g=_[1]*l+_[4]*m+_[7]*y,this.b=_[2]*l+_[5]*m+_[8]*y,this}equals(r){return r.r===this.r&&r.g===this.g&&r.b===this.b}fromArray(r,l=0){return this.r=r[l],this.g=r[l+1],this.b=r[l+2],this}toArray(r=[],l=0){return r[l]=this.r,r[l+1]=this.g,r[l+2]=this.b,r}fromBufferAttribute(r,l){return this.r=r.getX(l),this.g=r.getY(l),this.b=r.getZ(l),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}}const Hs=new Hn;Hn.NAMES=Iw;let IP=0;class js extends to{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:IP++}),this.uuid=no(),this.name="",this.type="Material",this.blending=D,this.side=C,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=Pe,this.blendDst=me,this.blendEquation=z,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new Hn(0,0,0),this.blendAlpha=0,this.depthFunc=Tn,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=Mf,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=ol,this.stencilZFail=ol,this.stencilZPass=ol,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(r){this._alphaTest>0!=r>0&&this.version++,this._alphaTest=r}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(r){if(r!==void 0)for(const l in r){const m=r[l];if(m===void 0){console.warn(`THREE.Material: parameter '${l}' has value of undefined.`);continue}const y=this[l];if(y===void 0){console.warn(`THREE.Material: '${l}' is not a property of THREE.${this.type}.`);continue}y&&y.isColor?y.set(m):y&&y.isVector3&&m&&m.isVector3?y.copy(m):this[l]=m}}toJSON(r){const l=r===void 0||typeof r=="string";l&&(r={textures:{},images:{}});const m={metadata:{version:4.6,type:"Material",generator:"Material.toJSON"}};m.uuid=this.uuid,m.type=this.type,this.name!==""&&(m.name=this.name),this.color&&this.color.isColor&&(m.color=this.color.getHex()),this.roughness!==void 0&&(m.roughness=this.roughness),this.metalness!==void 0&&(m.metalness=this.metalness),this.sheen!==void 0&&(m.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(m.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(m.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(m.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(m.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(m.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(m.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(m.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(m.shininess=this.shininess),this.clearcoat!==void 0&&(m.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(m.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(m.clearcoatMap=this.clearcoatMap.toJSON(r).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(m.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(r).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(m.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(r).uuid,m.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.iridescence!==void 0&&(m.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(m.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(m.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(m.iridescenceMap=this.iridescenceMap.toJSON(r).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(m.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(r).uuid),this.anisotropy!==void 0&&(m.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(m.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(m.anisotropyMap=this.anisotropyMap.toJSON(r).uuid),this.map&&this.map.isTexture&&(m.map=this.map.toJSON(r).uuid),this.matcap&&this.matcap.isTexture&&(m.matcap=this.matcap.toJSON(r).uuid),this.alphaMap&&this.alphaMap.isTexture&&(m.alphaMap=this.alphaMap.toJSON(r).uuid),this.lightMap&&this.lightMap.isTexture&&(m.lightMap=this.lightMap.toJSON(r).uuid,m.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(m.aoMap=this.aoMap.toJSON(r).uuid,m.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(m.bumpMap=this.bumpMap.toJSON(r).uuid,m.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(m.normalMap=this.normalMap.toJSON(r).uuid,m.normalMapType=this.normalMapType,m.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(m.displacementMap=this.displacementMap.toJSON(r).uuid,m.displacementScale=this.displacementScale,m.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(m.roughnessMap=this.roughnessMap.toJSON(r).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(m.metalnessMap=this.metalnessMap.toJSON(r).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(m.emissiveMap=this.emissiveMap.toJSON(r).uuid),this.specularMap&&this.specularMap.isTexture&&(m.specularMap=this.specularMap.toJSON(r).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(m.specularIntensityMap=this.specularIntensityMap.toJSON(r).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(m.specularColorMap=this.specularColorMap.toJSON(r).uuid),this.envMap&&this.envMap.isTexture&&(m.envMap=this.envMap.toJSON(r).uuid,this.combine!==void 0&&(m.combine=this.combine)),this.envMapIntensity!==void 0&&(m.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(m.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(m.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(m.gradientMap=this.gradientMap.toJSON(r).uuid),this.transmission!==void 0&&(m.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(m.transmissionMap=this.transmissionMap.toJSON(r).uuid),this.thickness!==void 0&&(m.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(m.thicknessMap=this.thicknessMap.toJSON(r).uuid),this.attenuationDistance!==void 0&&this.attenuationDistance!==1/0&&(m.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(m.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(m.size=this.size),this.shadowSide!==null&&(m.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(m.sizeAttenuation=this.sizeAttenuation),this.blending!==D&&(m.blending=this.blending),this.side!==C&&(m.side=this.side),this.vertexColors===!0&&(m.vertexColors=!0),this.opacity<1&&(m.opacity=this.opacity),this.transparent===!0&&(m.transparent=!0),this.blendSrc!==Pe&&(m.blendSrc=this.blendSrc),this.blendDst!==me&&(m.blendDst=this.blendDst),this.blendEquation!==z&&(m.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(m.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(m.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(m.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(m.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(m.blendAlpha=this.blendAlpha),this.depthFunc!==Tn&&(m.depthFunc=this.depthFunc),this.depthTest===!1&&(m.depthTest=this.depthTest),this.depthWrite===!1&&(m.depthWrite=this.depthWrite),this.colorWrite===!1&&(m.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(m.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==Mf&&(m.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(m.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(m.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==ol&&(m.stencilFail=this.stencilFail),this.stencilZFail!==ol&&(m.stencilZFail=this.stencilZFail),this.stencilZPass!==ol&&(m.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(m.stencilWrite=this.stencilWrite),this.rotation!==void 0&&this.rotation!==0&&(m.rotation=this.rotation),this.polygonOffset===!0&&(m.polygonOffset=!0),this.polygonOffsetFactor!==0&&(m.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(m.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth!==void 0&&this.linewidth!==1&&(m.linewidth=this.linewidth),this.dashSize!==void 0&&(m.dashSize=this.dashSize),this.gapSize!==void 0&&(m.gapSize=this.gapSize),this.scale!==void 0&&(m.scale=this.scale),this.dithering===!0&&(m.dithering=!0),this.alphaTest>0&&(m.alphaTest=this.alphaTest),this.alphaHash===!0&&(m.alphaHash=!0),this.alphaToCoverage===!0&&(m.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(m.premultipliedAlpha=!0),this.forceSinglePass===!0&&(m.forceSinglePass=!0),this.wireframe===!0&&(m.wireframe=!0),this.wireframeLinewidth>1&&(m.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(m.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(m.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(m.flatShading=!0),this.visible===!1&&(m.visible=!1),this.toneMapped===!1&&(m.toneMapped=!1),this.fog===!1&&(m.fog=!1),Object.keys(this.userData).length>0&&(m.userData=this.userData);function y(_){const R=[];for(const I in _){const O=_[I];delete O.metadata,R.push(O)}return R}if(l){const _=y(r.textures),R=y(r.images);_.length>0&&(m.textures=_),R.length>0&&(m.images=R)}return m}clone(){return new this.constructor().copy(this)}copy(r){this.name=r.name,this.blending=r.blending,this.side=r.side,this.vertexColors=r.vertexColors,this.opacity=r.opacity,this.transparent=r.transparent,this.blendSrc=r.blendSrc,this.blendDst=r.blendDst,this.blendEquation=r.blendEquation,this.blendSrcAlpha=r.blendSrcAlpha,this.blendDstAlpha=r.blendDstAlpha,this.blendEquationAlpha=r.blendEquationAlpha,this.blendColor.copy(r.blendColor),this.blendAlpha=r.blendAlpha,this.depthFunc=r.depthFunc,this.depthTest=r.depthTest,this.depthWrite=r.depthWrite,this.stencilWriteMask=r.stencilWriteMask,this.stencilFunc=r.stencilFunc,this.stencilRef=r.stencilRef,this.stencilFuncMask=r.stencilFuncMask,this.stencilFail=r.stencilFail,this.stencilZFail=r.stencilZFail,this.stencilZPass=r.stencilZPass,this.stencilWrite=r.stencilWrite;const l=r.clippingPlanes;let m=null;if(l!==null){const y=l.length;m=new Array(y);for(let _=0;_!==y;++_)m[_]=l[_].clone()}return this.clippingPlanes=m,this.clipIntersection=r.clipIntersection,this.clipShadows=r.clipShadows,this.shadowSide=r.shadowSide,this.colorWrite=r.colorWrite,this.precision=r.precision,this.polygonOffset=r.polygonOffset,this.polygonOffsetFactor=r.polygonOffsetFactor,this.polygonOffsetUnits=r.polygonOffsetUnits,this.dithering=r.dithering,this.alphaTest=r.alphaTest,this.alphaHash=r.alphaHash,this.alphaToCoverage=r.alphaToCoverage,this.premultipliedAlpha=r.premultipliedAlpha,this.forceSinglePass=r.forceSinglePass,this.visible=r.visible,this.toneMapped=r.toneMapped,this.userData=JSON.parse(JSON.stringify(r.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(r){r===!0&&this.version++}}class uc extends js{constructor(r){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new Hn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Nt,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.specularMap=r.specularMap,this.alphaMap=r.alphaMap,this.envMap=r.envMap,this.combine=r.combine,this.reflectivity=r.reflectivity,this.refractionRatio=r.refractionRatio,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.fog=r.fog,this}}const pl=BP();function BP(){const w=new ArrayBuffer(4),r=new Float32Array(w),l=new Uint32Array(w),m=new Uint32Array(512),y=new Uint32Array(512);for(let O=0;O<256;++O){const N=O-127;N<-27?(m[O]=0,m[O|256]=32768,y[O]=24,y[O|256]=24):N<-14?(m[O]=1024>>-N-14,m[O|256]=1024>>-N-14|32768,y[O]=-N-1,y[O|256]=-N-1):N<=15?(m[O]=N+15<<10,m[O|256]=N+15<<10|32768,y[O]=13,y[O|256]=13):N<128?(m[O]=31744,m[O|256]=64512,y[O]=24,y[O|256]=24):(m[O]=31744,m[O|256]=64512,y[O]=13,y[O|256]=13)}const _=new Uint32Array(2048),R=new Uint32Array(64),I=new Uint32Array(64);for(let O=1;O<1024;++O){let N=O<<13,V=0;for(;!(N&8388608);)N<<=1,V-=8388608;N&=-8388609,V+=947912704,_[O]=N|V}for(let O=1024;O<2048;++O)_[O]=939524096+(O-1024<<13);for(let O=1;O<31;++O)R[O]=O<<23;R[31]=1199570944,R[32]=2147483648;for(let O=33;O<63;++O)R[O]=2147483648+(O-32<<23);R[63]=3347054592;for(let O=1;O<64;++O)O!==32&&(I[O]=1024);return{floatView:r,uint32View:l,baseTable:m,shiftTable:y,mantissaTable:_,exponentTable:R,offsetTable:I}}function _o(w){Math.abs(w)>65504&&console.warn("THREE.DataUtils.toHalfFloat(): Value out of range."),w=Nr(w,-65504,65504),pl.floatView[0]=w;const r=pl.uint32View[0],l=r>>23&511;return pl.baseTable[l]+((r&8388607)>>pl.shiftTable[l])}function Ff(w){const r=w>>10;return pl.uint32View[0]=pl.mantissaTable[pl.offsetTable[r]+(w&1023)]+pl.exponentTable[r],pl.floatView[0]}const LP={toHalfFloat:_o,fromHalfFloat:Ff},is=new je,ng=new en;class Sr{constructor(r,l,m=!1){if(Array.isArray(r))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=r,this.itemSize=l,this.count=r!==void 0?r.length/l:0,this.normalized=m,this.usage=ah,this.updateRange={offset:0,count:-1},this.gpuType=Ei,this.version=0}onUploadCallback(){}set needsUpdate(r){r===!0&&this.version++}setUsage(r){return this.usage=r,this}copy(r){return this.name=r.name,this.array=new r.array.constructor(r.array),this.itemSize=r.itemSize,this.count=r.count,this.normalized=r.normalized,this.usage=r.usage,this.gpuType=r.gpuType,this}copyAt(r,l,m){r*=this.itemSize,m*=l.itemSize;for(let y=0,_=this.itemSize;y<_;y++)this.array[r+y]=l.array[m+y];return this}copyArray(r){return this.array.set(r),this}applyMatrix3(r){if(this.itemSize===2)for(let l=0,m=this.count;l0&&(r.userData=this.userData),this.parameters!==void 0){const O=this.parameters;for(const N in O)O[N]!==void 0&&(r[N]=O[N]);return r}r.data={attributes:{}};const l=this.index;l!==null&&(r.data.index={type:l.array.constructor.name,array:Array.prototype.slice.call(l.array)});const m=this.attributes;for(const O in m){const N=m[O];r.data.attributes[O]=N.toJSON(r.data)}const y={};let _=!1;for(const O in this.morphAttributes){const N=this.morphAttributes[O],V=[];for(let Q=0,X=N.length;Q0&&(y[O]=V,_=!0)}_&&(r.data.morphAttributes=y,r.data.morphTargetsRelative=this.morphTargetsRelative);const R=this.groups;R.length>0&&(r.data.groups=JSON.parse(JSON.stringify(R)));const I=this.boundingSphere;return I!==null&&(r.data.boundingSphere={center:I.center.toArray(),radius:I.radius}),r}clone(){return new this.constructor().copy(this)}copy(r){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;const l={};this.name=r.name;const m=r.index;m!==null&&this.setIndex(m.clone(l));const y=r.attributes;for(const N in y){const V=y[N];this.setAttribute(N,V.clone(l))}const _=r.morphAttributes;for(const N in _){const V=[],Q=_[N];for(let X=0,$=Q.length;X<$;X++)V.push(Q[X].clone(l));this.morphAttributes[N]=V}this.morphTargetsRelative=r.morphTargetsRelative;const R=r.groups;for(let N=0,V=R.length;N0){const y=l[m[0]];if(y!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,R=y.length;_(r.far-r.near)**2))&&(Bw.copy(_).invert(),dh.copy(r.ray).applyMatrix4(Bw),!(m.boundingBox!==null&&dh.intersectsBox(m.boundingBox)===!1)&&this._computeIntersections(r,l,dh)))}_computeIntersections(r,l,m){let y;const _=this.geometry,R=this.material,I=_.index,O=_.attributes.position,N=_.attributes.uv,V=_.attributes.uv1,Q=_.attributes.normal,X=_.groups,$=_.drawRange;if(I!==null)if(Array.isArray(R))for(let ie=0,ue=X.length;iel.far?null:{distance:N,point:cg.clone(),object:w}}function hg(w,r,l,m,y,_,R,I,O,N){w.getVertexPosition(I,Su),w.getVertexPosition(O,Tu),w.getVertexPosition(N,Ru);const V=GP(w,r,l,m,Su,Tu,Ru,lg);if(V){y&&(sg.fromBufferAttribute(y,I),og.fromBufferAttribute(y,O),ag.fromBufferAttribute(y,N),V.uv=bo.getInterpolation(lg,Su,Tu,Ru,sg,og,ag,new en)),_&&(sg.fromBufferAttribute(_,I),og.fromBufferAttribute(_,O),ag.fromBufferAttribute(_,N),V.uv1=bo.getInterpolation(lg,Su,Tu,Ru,sg,og,ag,new en),V.uv2=V.uv1),R&&(Pw.fromBufferAttribute(R,I),Dw.fromBufferAttribute(R,O),Ow.fromBufferAttribute(R,N),V.normal=bo.getInterpolation(lg,Su,Tu,Ru,Pw,Dw,Ow,new je),V.normal.dot(m.direction)>0&&V.normal.multiplyScalar(-1));const Q={a:I,b:O,c:N,normal:new je,materialIndex:0};bo.getNormal(Su,Tu,Ru,Q.normal),V.face=Q}return V}class fh extends Yi{constructor(r=1,l=1,m=1,y=1,_=1,R=1){super(),this.type="BoxGeometry",this.parameters={width:r,height:l,depth:m,widthSegments:y,heightSegments:_,depthSegments:R};const I=this;y=Math.floor(y),_=Math.floor(_),R=Math.floor(R);const O=[],N=[],V=[],Q=[];let X=0,$=0;ie("z","y","x",-1,-1,m,l,r,R,_,0),ie("z","y","x",1,-1,m,l,-r,R,_,1),ie("x","z","y",1,1,r,m,l,y,R,2),ie("x","z","y",1,-1,r,m,-l,y,R,3),ie("x","y","z",1,-1,r,l,m,y,_,4),ie("x","y","z",-1,-1,r,l,-m,y,_,5),this.setIndex(O),this.setAttribute("position",new ni(N,3)),this.setAttribute("normal",new ni(V,3)),this.setAttribute("uv",new ni(Q,2));function ie(ue,re,q,Se,fe,Me,ze,He,et,st,Be){const Xe=Me/et,rt=ze/st,bt=Me/2,Gt=ze/2,lt=He/2,wt=et+1,Kt=st+1;let qt=0,ln=0;const Jt=new je;for(let pn=0;pn0?1:-1,V.push(Jt.x,Jt.y,Jt.z),Q.push(Qn/et),Q.push(1-pn/st),qt+=1}}for(let pn=0;pn0&&(l.defines=this.defines),l.vertexShader=this.vertexShader,l.fragmentShader=this.fragmentShader,l.lights=this.lights,l.clipping=this.clipping;const m={};for(const y in this.extensions)this.extensions[y]===!0&&(m[y]=!0);return Object.keys(m).length>0&&(l.extensions=m),l}}class ug extends mr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new _i,this.projectionMatrix=new _i,this.projectionMatrixInverse=new _i,this.coordinateSystem=Yo}copy(r,l){return super.copy(r,l),this.matrixWorldInverse.copy(r.matrixWorldInverse),this.projectionMatrix.copy(r.projectionMatrix),this.projectionMatrixInverse.copy(r.projectionMatrixInverse),this.coordinateSystem=r.coordinateSystem,this}getWorldDirection(r){return super.getWorldDirection(r).negate()}updateMatrixWorld(r){super.updateMatrixWorld(r),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(r,l){super.updateWorldMatrix(r,l),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class hs extends ug{constructor(r=50,l=1,m=.1,y=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=r,this.zoom=1,this.near=m,this.far=y,this.focus=10,this.aspect=l,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(r,l){return super.copy(r,l),this.fov=r.fov,this.zoom=r.zoom,this.near=r.near,this.far=r.far,this.focus=r.focus,this.aspect=r.aspect,this.view=r.view===null?null:Object.assign({},r.view),this.filmGauge=r.filmGauge,this.filmOffset=r.filmOffset,this}setFocalLength(r){const l=.5*this.getFilmHeight()/r;this.fov=sc*2*Math.atan(l),this.updateProjectionMatrix()}getFocalLength(){const r=Math.tan(al*.5*this.fov);return .5*this.getFilmHeight()/r}getEffectiveFOV(){return sc*2*Math.atan(Math.tan(al*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(r,l,m,y,_,R){this.aspect=r/l,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=r,this.view.fullHeight=l,this.view.offsetX=m,this.view.offsetY=y,this.view.width=_,this.view.height=R,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const r=this.near;let l=r*Math.tan(al*.5*this.fov)/this.zoom,m=2*l,y=this.aspect*m,_=-.5*y;const R=this.view;if(this.view!==null&&this.view.enabled){const O=R.fullWidth,N=R.fullHeight;_+=R.offsetX*y/O,l-=R.offsetY*m/N,y*=R.width/O,m*=R.height/N}const I=this.filmOffset;I!==0&&(_+=r*I/this.getFilmWidth()),this.projectionMatrix.makePerspective(_,_+y,l,l-m,r,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(r){const l=super.toJSON(r);return l.object.fov=this.fov,l.object.zoom=this.zoom,l.object.near=this.near,l.object.far=this.far,l.object.focus=this.focus,l.object.aspect=this.aspect,this.view!==null&&(l.object.view=Object.assign({},this.view)),l.object.filmGauge=this.filmGauge,l.object.filmOffset=this.filmOffset,l}}const Bu=-90,Lu=1;class Nw extends mr{constructor(r,l,m){super(),this.type="CubeCamera",this.renderTarget=m,this.coordinateSystem=null,this.activeMipmapLevel=0;const y=new hs(Bu,Lu,r,l);y.layers=this.layers,this.add(y);const _=new hs(Bu,Lu,r,l);_.layers=this.layers,this.add(_);const R=new hs(Bu,Lu,r,l);R.layers=this.layers,this.add(R);const I=new hs(Bu,Lu,r,l);I.layers=this.layers,this.add(I);const O=new hs(Bu,Lu,r,l);O.layers=this.layers,this.add(O);const N=new hs(Bu,Lu,r,l);N.layers=this.layers,this.add(N)}updateCoordinateSystem(){const r=this.coordinateSystem,l=this.children.concat(),[m,y,_,R,I,O]=l;for(const N of l)this.remove(N);if(r===Yo)m.up.set(0,1,0),m.lookAt(1,0,0),y.up.set(0,1,0),y.lookAt(-1,0,0),_.up.set(0,0,-1),_.lookAt(0,1,0),R.up.set(0,0,1),R.lookAt(0,-1,0),I.up.set(0,1,0),I.lookAt(0,0,1),O.up.set(0,1,0),O.lookAt(0,0,-1);else if(r===lh)m.up.set(0,-1,0),m.lookAt(-1,0,0),y.up.set(0,-1,0),y.lookAt(1,0,0),_.up.set(0,0,1),_.lookAt(0,1,0),R.up.set(0,0,-1),R.lookAt(0,-1,0),I.up.set(0,-1,0),I.lookAt(0,0,1),O.up.set(0,-1,0),O.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+r);for(const N of l)this.add(N),N.updateMatrixWorld()}update(r,l){this.parent===null&&this.updateMatrixWorld();const{renderTarget:m,activeMipmapLevel:y}=this;this.coordinateSystem!==r.coordinateSystem&&(this.coordinateSystem=r.coordinateSystem,this.updateCoordinateSystem());const[_,R,I,O,N,V]=this.children,Q=r.getRenderTarget(),X=r.getActiveCubeFace(),$=r.getActiveMipmapLevel(),ie=r.xr.enabled;r.xr.enabled=!1;const ue=m.texture.generateMipmaps;m.texture.generateMipmaps=!1,r.setRenderTarget(m,0,y),r.render(l,_),r.setRenderTarget(m,1,y),r.render(l,R),r.setRenderTarget(m,2,y),r.render(l,I),r.setRenderTarget(m,3,y),r.render(l,O),r.setRenderTarget(m,4,y),r.render(l,N),m.texture.generateMipmaps=ue,r.setRenderTarget(m,5,y),r.render(l,V),r.setRenderTarget(Q,X,$),r.xr.enabled=ie,m.texture.needsPMREMUpdate=!0}}class Uf extends Ir{constructor(r,l,m,y,_,R,I,O,N,V){r=r!==void 0?r:[],l=l!==void 0?l:Qe,super(r,l,m,y,_,R,I,O,N,V),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(r){this.image=r}}class Uw extends yo{constructor(r=1,l={}){super(r,r,l),this.isWebGLCubeRenderTarget=!0;const m={width:r,height:r,depth:1},y=[m,m,m,m,m,m];l.encoding!==void 0&&(uh("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),l.colorSpace=l.encoding===Kr?Cr:qr),this.texture=new Uf(y,l.mapping,l.wrapS,l.wrapT,l.magFilter,l.minFilter,l.format,l.type,l.anisotropy,l.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=l.generateMipmaps!==void 0?l.generateMipmaps:!1,this.texture.minFilter=l.minFilter!==void 0?l.minFilter:Bn}fromEquirectangularTexture(r,l){this.texture.type=l.type,this.texture.colorSpace=l.colorSpace,this.texture.generateMipmaps=l.generateMipmaps,this.texture.minFilter=l.minFilter,this.texture.magFilter=l.magFilter;const m={uniforms:{tEquirect:{value:null}},vertexShader:` +}`;class Ka extends js{constructor(r){super(),this.isShaderMaterial=!0,this.type="ShaderMaterial",this.defines={},this.uniforms={},this.uniformsGroups=[],this.vertexShader=HP,this.fragmentShader=jP,this.linewidth=1,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.lights=!1,this.clipping=!1,this.forceSinglePass=!0,this.extensions={derivatives:!1,fragDepth:!1,drawBuffers:!1,shaderTextureLOD:!1},this.defaultAttributeValues={color:[1,1,1],uv:[0,0],uv1:[0,0]},this.index0AttributeName=void 0,this.uniformsNeedUpdate=!1,this.glslVersion=null,r!==void 0&&this.setValues(r)}copy(r){return super.copy(r),this.fragmentShader=r.fragmentShader,this.vertexShader=r.vertexShader,this.uniforms=Iu(r.uniforms),this.uniformsGroups=VP(r.uniformsGroups),this.defines=Object.assign({},r.defines),this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.fog=r.fog,this.lights=r.lights,this.clipping=r.clipping,this.extensions=Object.assign({},r.extensions),this.glslVersion=r.glslVersion,this}toJSON(r){const l=super.toJSON(r);l.glslVersion=this.glslVersion,l.uniforms={};for(const y in this.uniforms){const R=this.uniforms[y].value;R&&R.isTexture?l.uniforms[y]={type:"t",value:R.toJSON(r).uuid}:R&&R.isColor?l.uniforms[y]={type:"c",value:R.getHex()}:R&&R.isVector2?l.uniforms[y]={type:"v2",value:R.toArray()}:R&&R.isVector3?l.uniforms[y]={type:"v3",value:R.toArray()}:R&&R.isVector4?l.uniforms[y]={type:"v4",value:R.toArray()}:R&&R.isMatrix3?l.uniforms[y]={type:"m3",value:R.toArray()}:R&&R.isMatrix4?l.uniforms[y]={type:"m4",value:R.toArray()}:l.uniforms[y]={value:R}}Object.keys(this.defines).length>0&&(l.defines=this.defines),l.vertexShader=this.vertexShader,l.fragmentShader=this.fragmentShader,l.lights=this.lights,l.clipping=this.clipping;const m={};for(const y in this.extensions)this.extensions[y]===!0&&(m[y]=!0);return Object.keys(m).length>0&&(l.extensions=m),l}}class ug extends mr{constructor(){super(),this.isCamera=!0,this.type="Camera",this.matrixWorldInverse=new _i,this.projectionMatrix=new _i,this.projectionMatrixInverse=new _i,this.coordinateSystem=Yo}copy(r,l){return super.copy(r,l),this.matrixWorldInverse.copy(r.matrixWorldInverse),this.projectionMatrix.copy(r.projectionMatrix),this.projectionMatrixInverse.copy(r.projectionMatrixInverse),this.coordinateSystem=r.coordinateSystem,this}getWorldDirection(r){return super.getWorldDirection(r).negate()}updateMatrixWorld(r){super.updateMatrixWorld(r),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(r,l){super.updateWorldMatrix(r,l),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}}class hs extends ug{constructor(r=50,l=1,m=.1,y=2e3){super(),this.isPerspectiveCamera=!0,this.type="PerspectiveCamera",this.fov=r,this.zoom=1,this.near=m,this.far=y,this.focus=10,this.aspect=l,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(r,l){return super.copy(r,l),this.fov=r.fov,this.zoom=r.zoom,this.near=r.near,this.far=r.far,this.focus=r.focus,this.aspect=r.aspect,this.view=r.view===null?null:Object.assign({},r.view),this.filmGauge=r.filmGauge,this.filmOffset=r.filmOffset,this}setFocalLength(r){const l=.5*this.getFilmHeight()/r;this.fov=sc*2*Math.atan(l),this.updateProjectionMatrix()}getFocalLength(){const r=Math.tan(al*.5*this.fov);return .5*this.getFilmHeight()/r}getEffectiveFOV(){return sc*2*Math.atan(Math.tan(al*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(r,l,m,y,_,R){this.aspect=r/l,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=r,this.view.fullHeight=l,this.view.offsetX=m,this.view.offsetY=y,this.view.width=_,this.view.height=R,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const r=this.near;let l=r*Math.tan(al*.5*this.fov)/this.zoom,m=2*l,y=this.aspect*m,_=-.5*y;const R=this.view;if(this.view!==null&&this.view.enabled){const O=R.fullWidth,N=R.fullHeight;_+=R.offsetX*y/O,l-=R.offsetY*m/N,y*=R.width/O,m*=R.height/N}const I=this.filmOffset;I!==0&&(_+=r*I/this.getFilmWidth()),this.projectionMatrix.makePerspective(_,_+y,l,l-m,r,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(r){const l=super.toJSON(r);return l.object.fov=this.fov,l.object.zoom=this.zoom,l.object.near=this.near,l.object.far=this.far,l.object.focus=this.focus,l.object.aspect=this.aspect,this.view!==null&&(l.object.view=Object.assign({},this.view)),l.object.filmGauge=this.filmGauge,l.object.filmOffset=this.filmOffset,l}}const Bu=-90,Lu=1;class Uw extends mr{constructor(r,l,m){super(),this.type="CubeCamera",this.renderTarget=m,this.coordinateSystem=null,this.activeMipmapLevel=0;const y=new hs(Bu,Lu,r,l);y.layers=this.layers,this.add(y);const _=new hs(Bu,Lu,r,l);_.layers=this.layers,this.add(_);const R=new hs(Bu,Lu,r,l);R.layers=this.layers,this.add(R);const I=new hs(Bu,Lu,r,l);I.layers=this.layers,this.add(I);const O=new hs(Bu,Lu,r,l);O.layers=this.layers,this.add(O);const N=new hs(Bu,Lu,r,l);N.layers=this.layers,this.add(N)}updateCoordinateSystem(){const r=this.coordinateSystem,l=this.children.concat(),[m,y,_,R,I,O]=l;for(const N of l)this.remove(N);if(r===Yo)m.up.set(0,1,0),m.lookAt(1,0,0),y.up.set(0,1,0),y.lookAt(-1,0,0),_.up.set(0,0,-1),_.lookAt(0,1,0),R.up.set(0,0,1),R.lookAt(0,-1,0),I.up.set(0,1,0),I.lookAt(0,0,1),O.up.set(0,1,0),O.lookAt(0,0,-1);else if(r===lh)m.up.set(0,-1,0),m.lookAt(-1,0,0),y.up.set(0,-1,0),y.lookAt(1,0,0),_.up.set(0,0,1),_.lookAt(0,1,0),R.up.set(0,0,-1),R.lookAt(0,-1,0),I.up.set(0,-1,0),I.lookAt(0,0,1),O.up.set(0,-1,0),O.lookAt(0,0,-1);else throw new Error("THREE.CubeCamera.updateCoordinateSystem(): Invalid coordinate system: "+r);for(const N of l)this.add(N),N.updateMatrixWorld()}update(r,l){this.parent===null&&this.updateMatrixWorld();const{renderTarget:m,activeMipmapLevel:y}=this;this.coordinateSystem!==r.coordinateSystem&&(this.coordinateSystem=r.coordinateSystem,this.updateCoordinateSystem());const[_,R,I,O,N,V]=this.children,Q=r.getRenderTarget(),X=r.getActiveCubeFace(),$=r.getActiveMipmapLevel(),ie=r.xr.enabled;r.xr.enabled=!1;const ue=m.texture.generateMipmaps;m.texture.generateMipmaps=!1,r.setRenderTarget(m,0,y),r.render(l,_),r.setRenderTarget(m,1,y),r.render(l,R),r.setRenderTarget(m,2,y),r.render(l,I),r.setRenderTarget(m,3,y),r.render(l,O),r.setRenderTarget(m,4,y),r.render(l,N),m.texture.generateMipmaps=ue,r.setRenderTarget(m,5,y),r.render(l,V),r.setRenderTarget(Q,X,$),r.xr.enabled=ie,m.texture.needsPMREMUpdate=!0}}class Uf extends Ir{constructor(r,l,m,y,_,R,I,O,N,V){r=r!==void 0?r:[],l=l!==void 0?l:Qe,super(r,l,m,y,_,R,I,O,N,V),this.isCubeTexture=!0,this.flipY=!1}get images(){return this.image}set images(r){this.image=r}}class kw extends yo{constructor(r=1,l={}){super(r,r,l),this.isWebGLCubeRenderTarget=!0;const m={width:r,height:r,depth:1},y=[m,m,m,m,m,m];l.encoding!==void 0&&(uh("THREE.WebGLCubeRenderTarget: option.encoding has been replaced by option.colorSpace."),l.colorSpace=l.encoding===Kr?Cr:qr),this.texture=new Uf(y,l.mapping,l.wrapS,l.wrapT,l.magFilter,l.minFilter,l.format,l.type,l.anisotropy,l.colorSpace),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=l.generateMipmaps!==void 0?l.generateMipmaps:!1,this.texture.minFilter=l.minFilter!==void 0?l.minFilter:Bn}fromEquirectangularTexture(r,l){this.texture.type=l.type,this.texture.colorSpace=l.colorSpace,this.texture.generateMipmaps=l.generateMipmaps,this.texture.minFilter=l.minFilter,this.texture.magFilter=l.magFilter;const m={uniforms:{tEquirect:{value:null}},vertexShader:` varying vec3 vWorldDirection; @@ -1245,7 +1245,7 @@ a-scene audio { gl_FragColor = texture2D( tEquirect, sampleUV ); } - `},y=new fh(5,5,5),_=new Ka({name:"CubemapFromEquirect",uniforms:Iu(m.uniforms),vertexShader:m.vertexShader,fragmentShader:m.fragmentShader,side:T,blending:F});_.uniforms.tEquirect.value=l;const R=new Os(y,_),I=l.minFilter;return l.minFilter===Fn&&(l.minFilter=Bn),new Nw(1,10,this).update(r,R),l.minFilter=I,R.geometry.dispose(),R.material.dispose(),this}clear(r,l,m,y){const _=r.getRenderTarget();for(let R=0;R<6;R++)r.setRenderTarget(this,R),r.clear(l,m,y);r.setRenderTarget(_)}}const tx=new je,WP=new je,QP=new Ui;class dc{constructor(r=new je(1,0,0),l=0){this.isPlane=!0,this.normal=r,this.constant=l}set(r,l){return this.normal.copy(r),this.constant=l,this}setComponents(r,l,m,y){return this.normal.set(r,l,m),this.constant=y,this}setFromNormalAndCoplanarPoint(r,l){return this.normal.copy(r),this.constant=-l.dot(this.normal),this}setFromCoplanarPoints(r,l,m){const y=tx.subVectors(m,l).cross(WP.subVectors(r,l)).normalize();return this.setFromNormalAndCoplanarPoint(y,r),this}copy(r){return this.normal.copy(r.normal),this.constant=r.constant,this}normalize(){const r=1/this.normal.length();return this.normal.multiplyScalar(r),this.constant*=r,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(r){return this.normal.dot(r)+this.constant}distanceToSphere(r){return this.distanceToPoint(r.center)-r.radius}projectPoint(r,l){return l.copy(r).addScaledVector(this.normal,-this.distanceToPoint(r))}intersectLine(r,l){const m=r.delta(tx),y=this.normal.dot(m);if(y===0)return this.distanceToPoint(r.start)===0?l.copy(r.start):null;const _=-(r.start.dot(this.normal)+this.constant)/y;return _<0||_>1?null:l.copy(r.start).addScaledVector(m,_)}intersectsLine(r){const l=this.distanceToPoint(r.start),m=this.distanceToPoint(r.end);return l<0&&m>0||m<0&&l>0}intersectsBox(r){return r.intersectsPlane(this)}intersectsSphere(r){return r.intersectsPlane(this)}coplanarPoint(r){return r.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(r,l){const m=l||QP.getNormalMatrix(r),y=this.coplanarPoint(tx).applyMatrix4(r),_=this.normal.applyMatrix3(m).normalize();return this.constant=-y.dot(_),this}translate(r){return this.constant-=r.dot(this.normal),this}equals(r){return r.normal.equals(this.normal)&&r.constant===this.constant}clone(){return new this.constructor().copy(this)}}const ph=new Eo,dg=new je;class fg{constructor(r=new dc,l=new dc,m=new dc,y=new dc,_=new dc,R=new dc){this.planes=[r,l,m,y,_,R]}set(r,l,m,y,_,R){const I=this.planes;return I[0].copy(r),I[1].copy(l),I[2].copy(m),I[3].copy(y),I[4].copy(_),I[5].copy(R),this}copy(r){const l=this.planes;for(let m=0;m<6;m++)l[m].copy(r.planes[m]);return this}setFromProjectionMatrix(r,l=Yo){const m=this.planes,y=r.elements,_=y[0],R=y[1],I=y[2],O=y[3],N=y[4],V=y[5],Q=y[6],X=y[7],$=y[8],ie=y[9],ue=y[10],re=y[11],q=y[12],Se=y[13],fe=y[14],Me=y[15];if(m[0].setComponents(O-_,X-N,re-$,Me-q).normalize(),m[1].setComponents(O+_,X+N,re+$,Me+q).normalize(),m[2].setComponents(O+R,X+V,re+ie,Me+Se).normalize(),m[3].setComponents(O-R,X-V,re-ie,Me-Se).normalize(),m[4].setComponents(O-I,X-Q,re-ue,Me-fe).normalize(),l===Yo)m[5].setComponents(O+I,X+Q,re+ue,Me+fe).normalize();else if(l===lh)m[5].setComponents(I,Q,ue,fe).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+l);return this}intersectsObject(r){if(r.boundingSphere!==void 0)r.boundingSphere===null&&r.computeBoundingSphere(),ph.copy(r.boundingSphere).applyMatrix4(r.matrixWorld);else{const l=r.geometry;l.boundingSphere===null&&l.computeBoundingSphere(),ph.copy(l.boundingSphere).applyMatrix4(r.matrixWorld)}return this.intersectsSphere(ph)}intersectsSprite(r){return ph.center.set(0,0,0),ph.radius=.7071067811865476,ph.applyMatrix4(r.matrixWorld),this.intersectsSphere(ph)}intersectsSphere(r){const l=this.planes,m=r.center,y=-r.radius;for(let _=0;_<6;_++)if(l[_].distanceToPoint(m)0?r.max.x:r.min.x,dg.y=y.normal.y>0?r.max.y:r.min.y,dg.z=y.normal.z>0?r.max.z:r.min.z,y.distanceToPoint(dg)<0)return!1}return!0}containsPoint(r){const l=this.planes;for(let m=0;m<6;m++)if(l[m].distanceToPoint(r)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function nx(){let w=null,r=!1,l=null,m=null;function y(_,R){l(_,R),m=w.requestAnimationFrame(y)}return{start:function(){r!==!0&&l!==null&&(m=w.requestAnimationFrame(y),r=!0)},stop:function(){w.cancelAnimationFrame(m),r=!1},setAnimationLoop:function(_){l=_},setContext:function(_){w=_}}}function XP(w,r){const l=r.isWebGL2,m=new WeakMap;function y(N,V){const Q=N.array,X=N.usage,$=w.createBuffer();w.bindBuffer(V,$),w.bufferData(V,Q,X),N.onUploadCallback();let ie;if(Q instanceof Float32Array)ie=w.FLOAT;else if(Q instanceof Uint16Array)if(N.isFloat16BufferAttribute)if(l)ie=w.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else ie=w.UNSIGNED_SHORT;else if(Q instanceof Int16Array)ie=w.SHORT;else if(Q instanceof Uint32Array)ie=w.UNSIGNED_INT;else if(Q instanceof Int32Array)ie=w.INT;else if(Q instanceof Int8Array)ie=w.BYTE;else if(Q instanceof Uint8Array)ie=w.UNSIGNED_BYTE;else if(Q instanceof Uint8ClampedArray)ie=w.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+Q);return{buffer:$,type:ie,bytesPerElement:Q.BYTES_PER_ELEMENT,version:N.version}}function _(N,V,Q){const X=V.array,$=V.updateRange;w.bindBuffer(Q,N),$.count===-1?w.bufferSubData(Q,0,X):(l?w.bufferSubData(Q,$.offset*X.BYTES_PER_ELEMENT,X,$.offset,$.count):w.bufferSubData(Q,$.offset*X.BYTES_PER_ELEMENT,X.subarray($.offset,$.offset+$.count)),$.count=-1),V.onUploadCallback()}function R(N){return N.isInterleavedBufferAttribute&&(N=N.data),m.get(N)}function I(N){N.isInterleavedBufferAttribute&&(N=N.data);const V=m.get(N);V&&(w.deleteBuffer(V.buffer),m.delete(N))}function O(N,V){if(N.isGLBufferAttribute){const X=m.get(N);(!X||X.version1?null:l.copy(r.start).addScaledVector(m,_)}intersectsLine(r){const l=this.distanceToPoint(r.start),m=this.distanceToPoint(r.end);return l<0&&m>0||m<0&&l>0}intersectsBox(r){return r.intersectsPlane(this)}intersectsSphere(r){return r.intersectsPlane(this)}coplanarPoint(r){return r.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(r,l){const m=l||QP.getNormalMatrix(r),y=this.coplanarPoint(nx).applyMatrix4(r),_=this.normal.applyMatrix3(m).normalize();return this.constant=-y.dot(_),this}translate(r){return this.constant-=r.dot(this.normal),this}equals(r){return r.normal.equals(this.normal)&&r.constant===this.constant}clone(){return new this.constructor().copy(this)}}const ph=new Eo,dg=new je;class fg{constructor(r=new dc,l=new dc,m=new dc,y=new dc,_=new dc,R=new dc){this.planes=[r,l,m,y,_,R]}set(r,l,m,y,_,R){const I=this.planes;return I[0].copy(r),I[1].copy(l),I[2].copy(m),I[3].copy(y),I[4].copy(_),I[5].copy(R),this}copy(r){const l=this.planes;for(let m=0;m<6;m++)l[m].copy(r.planes[m]);return this}setFromProjectionMatrix(r,l=Yo){const m=this.planes,y=r.elements,_=y[0],R=y[1],I=y[2],O=y[3],N=y[4],V=y[5],Q=y[6],X=y[7],$=y[8],ie=y[9],ue=y[10],re=y[11],q=y[12],Se=y[13],fe=y[14],Me=y[15];if(m[0].setComponents(O-_,X-N,re-$,Me-q).normalize(),m[1].setComponents(O+_,X+N,re+$,Me+q).normalize(),m[2].setComponents(O+R,X+V,re+ie,Me+Se).normalize(),m[3].setComponents(O-R,X-V,re-ie,Me-Se).normalize(),m[4].setComponents(O-I,X-Q,re-ue,Me-fe).normalize(),l===Yo)m[5].setComponents(O+I,X+Q,re+ue,Me+fe).normalize();else if(l===lh)m[5].setComponents(I,Q,ue,fe).normalize();else throw new Error("THREE.Frustum.setFromProjectionMatrix(): Invalid coordinate system: "+l);return this}intersectsObject(r){if(r.boundingSphere!==void 0)r.boundingSphere===null&&r.computeBoundingSphere(),ph.copy(r.boundingSphere).applyMatrix4(r.matrixWorld);else{const l=r.geometry;l.boundingSphere===null&&l.computeBoundingSphere(),ph.copy(l.boundingSphere).applyMatrix4(r.matrixWorld)}return this.intersectsSphere(ph)}intersectsSprite(r){return ph.center.set(0,0,0),ph.radius=.7071067811865476,ph.applyMatrix4(r.matrixWorld),this.intersectsSphere(ph)}intersectsSphere(r){const l=this.planes,m=r.center,y=-r.radius;for(let _=0;_<6;_++)if(l[_].distanceToPoint(m)0?r.max.x:r.min.x,dg.y=y.normal.y>0?r.max.y:r.min.y,dg.z=y.normal.z>0?r.max.z:r.min.z,y.distanceToPoint(dg)<0)return!1}return!0}containsPoint(r){const l=this.planes;for(let m=0;m<6;m++)if(l[m].distanceToPoint(r)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}}function ix(){let w=null,r=!1,l=null,m=null;function y(_,R){l(_,R),m=w.requestAnimationFrame(y)}return{start:function(){r!==!0&&l!==null&&(m=w.requestAnimationFrame(y),r=!0)},stop:function(){w.cancelAnimationFrame(m),r=!1},setAnimationLoop:function(_){l=_},setContext:function(_){w=_}}}function XP(w,r){const l=r.isWebGL2,m=new WeakMap;function y(N,V){const Q=N.array,X=N.usage,$=w.createBuffer();w.bindBuffer(V,$),w.bufferData(V,Q,X),N.onUploadCallback();let ie;if(Q instanceof Float32Array)ie=w.FLOAT;else if(Q instanceof Uint16Array)if(N.isFloat16BufferAttribute)if(l)ie=w.HALF_FLOAT;else throw new Error("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2.");else ie=w.UNSIGNED_SHORT;else if(Q instanceof Int16Array)ie=w.SHORT;else if(Q instanceof Uint32Array)ie=w.UNSIGNED_INT;else if(Q instanceof Int32Array)ie=w.INT;else if(Q instanceof Int8Array)ie=w.BYTE;else if(Q instanceof Uint8Array)ie=w.UNSIGNED_BYTE;else if(Q instanceof Uint8ClampedArray)ie=w.UNSIGNED_BYTE;else throw new Error("THREE.WebGLAttributes: Unsupported buffer data format: "+Q);return{buffer:$,type:ie,bytesPerElement:Q.BYTES_PER_ELEMENT,version:N.version}}function _(N,V,Q){const X=V.array,$=V.updateRange;w.bindBuffer(Q,N),$.count===-1?w.bufferSubData(Q,0,X):(l?w.bufferSubData(Q,$.offset*X.BYTES_PER_ELEMENT,X,$.offset,$.count):w.bufferSubData(Q,$.offset*X.BYTES_PER_ELEMENT,X.subarray($.offset,$.offset+$.count)),$.count=-1),V.onUploadCallback()}function R(N){return N.isInterleavedBufferAttribute&&(N=N.data),m.get(N)}function I(N){N.isInterleavedBufferAttribute&&(N=N.data);const V=m.get(N);V&&(w.deleteBuffer(V.buffer),m.delete(N))}function O(N,V){if(N.isGLBufferAttribute){const X=m.get(N);(!X||X.version #include #include -}`},Un={common:{diffuse:{value:new Hn(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ui},alphaMap:{value:null},alphaMapTransform:{value:new Ui},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ui}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ui}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ui}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ui},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ui},normalScale:{value:new en(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ui},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ui}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ui}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ui}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Hn(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 Hn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ui},alphaTest:{value:0},uvTransform:{value:new Ui}},sprite:{diffuse:{value:new Hn(16777215)},opacity:{value:1},center:{value:new en(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ui},alphaMap:{value:null},alphaMapTransform:{value:new Ui},alphaTest:{value:0}}},fa={basic:{uniforms:ro([Un.common,Un.specularmap,Un.envmap,Un.aomap,Un.lightmap,Un.fog]),vertexShader:Wi.meshbasic_vert,fragmentShader:Wi.meshbasic_frag},lambert:{uniforms:ro([Un.common,Un.specularmap,Un.envmap,Un.aomap,Un.lightmap,Un.emissivemap,Un.bumpmap,Un.normalmap,Un.displacementmap,Un.fog,Un.lights,{emissive:{value:new Hn(0)}}]),vertexShader:Wi.meshlambert_vert,fragmentShader:Wi.meshlambert_frag},phong:{uniforms:ro([Un.common,Un.specularmap,Un.envmap,Un.aomap,Un.lightmap,Un.emissivemap,Un.bumpmap,Un.normalmap,Un.displacementmap,Un.fog,Un.lights,{emissive:{value:new Hn(0)},specular:{value:new Hn(1118481)},shininess:{value:30}}]),vertexShader:Wi.meshphong_vert,fragmentShader:Wi.meshphong_frag},standard:{uniforms:ro([Un.common,Un.envmap,Un.aomap,Un.lightmap,Un.emissivemap,Un.bumpmap,Un.normalmap,Un.displacementmap,Un.roughnessmap,Un.metalnessmap,Un.fog,Un.lights,{emissive:{value:new Hn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Wi.meshphysical_vert,fragmentShader:Wi.meshphysical_frag},toon:{uniforms:ro([Un.common,Un.aomap,Un.lightmap,Un.emissivemap,Un.bumpmap,Un.normalmap,Un.displacementmap,Un.gradientmap,Un.fog,Un.lights,{emissive:{value:new Hn(0)}}]),vertexShader:Wi.meshtoon_vert,fragmentShader:Wi.meshtoon_frag},matcap:{uniforms:ro([Un.common,Un.bumpmap,Un.normalmap,Un.displacementmap,Un.fog,{matcap:{value:null}}]),vertexShader:Wi.meshmatcap_vert,fragmentShader:Wi.meshmatcap_frag},points:{uniforms:ro([Un.points,Un.fog]),vertexShader:Wi.points_vert,fragmentShader:Wi.points_frag},dashed:{uniforms:ro([Un.common,Un.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Wi.linedashed_vert,fragmentShader:Wi.linedashed_frag},depth:{uniforms:ro([Un.common,Un.displacementmap]),vertexShader:Wi.depth_vert,fragmentShader:Wi.depth_frag},normal:{uniforms:ro([Un.common,Un.bumpmap,Un.normalmap,Un.displacementmap,{opacity:{value:1}}]),vertexShader:Wi.meshnormal_vert,fragmentShader:Wi.meshnormal_frag},sprite:{uniforms:ro([Un.sprite,Un.fog]),vertexShader:Wi.sprite_vert,fragmentShader:Wi.sprite_frag},background:{uniforms:{uvTransform:{value:new Ui},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Wi.background_vert,fragmentShader:Wi.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Wi.backgroundCube_vert,fragmentShader:Wi.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Wi.cube_vert,fragmentShader:Wi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Wi.equirect_vert,fragmentShader:Wi.equirect_frag},distanceRGBA:{uniforms:ro([Un.common,Un.displacementmap,{referencePosition:{value:new je},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Wi.distanceRGBA_vert,fragmentShader:Wi.distanceRGBA_frag},shadow:{uniforms:ro([Un.lights,Un.fog,{color:{value:new Hn(0)},opacity:{value:1}}]),vertexShader:Wi.shadow_vert,fragmentShader:Wi.shadow_frag}};fa.physical={uniforms:ro([fa.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ui},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ui},clearcoatNormalScale:{value:new en(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ui},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ui},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ui},sheen:{value:0},sheenColor:{value:new Hn(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ui},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ui},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ui},transmissionSamplerSize:{value:new en},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ui},attenuationDistance:{value:0},attenuationColor:{value:new Hn(0)},specularColor:{value:new Hn(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ui},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ui},anisotropyVector:{value:new en},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ui}}]),vertexShader:Wi.meshphysical_vert,fragmentShader:Wi.meshphysical_frag};const pg={r:0,b:0,g:0};function WO(w,r,l,m,y,_,R){const I=new Hn(0);let O=_===!0?0:1,N,V,Q=null,X=0,$=null;function ie(re,q){let Se=!1,fe=q.isScene===!0?q.background:null;fe&&fe.isTexture&&(fe=(q.backgroundBlurriness>0?l:r).get(fe)),fe===null?ue(I,O):fe&&fe.isColor&&(ue(fe,1),Se=!0);const Me=w.xr.getEnvironmentBlendMode();Me==="additive"?m.buffers.color.setClear(0,0,0,1,R):Me==="alpha-blend"&&m.buffers.color.setClear(0,0,0,0,R),(w.autoClear||Se)&&w.clear(w.autoClearColor,w.autoClearDepth,w.autoClearStencil),fe&&(fe.isCubeTexture||fe.mapping===he)?(V===void 0&&(V=new Os(new fh(1e4,1e4,1e4),new Ka({name:"BackgroundCubeMaterial",uniforms:Iu(fa.backgroundCube.uniforms),vertexShader:fa.backgroundCube.vertexShader,fragmentShader:fa.backgroundCube.fragmentShader,side:T,depthTest:!1,depthWrite:!1,fog:!1})),V.geometry.deleteAttribute("normal"),V.geometry.deleteAttribute("uv"),V.onBeforeRender=function(ze,He,et){this.matrixWorld.copyPosition(et.matrixWorld)},Object.defineProperty(V.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),y.update(V)),V.material.uniforms.envMap.value=fe,V.material.uniforms.flipEnvMap.value=fe.isCubeTexture&&fe.isRenderTargetTexture===!1?-1:1,V.material.uniforms.backgroundBlurriness.value=q.backgroundBlurriness,V.material.uniforms.backgroundIntensity.value=q.backgroundIntensity,V.material.toneMapped=vr.getTransfer(fe.colorSpace)!==wr,(Q!==fe||X!==fe.version||$!==w.toneMapping)&&(V.material.needsUpdate=!0,Q=fe,X=fe.version,$=w.toneMapping),V.layers.enableAll(),re.unshift(V,V.geometry,V.material,0,0,null)):fe&&fe.isTexture&&(N===void 0&&(N=new Os(new kf(2,2),new Ka({name:"BackgroundMaterial",uniforms:Iu(fa.background.uniforms),vertexShader:fa.background.vertexShader,fragmentShader:fa.background.fragmentShader,side:C,depthTest:!1,depthWrite:!1,fog:!1})),N.geometry.deleteAttribute("normal"),Object.defineProperty(N.material,"map",{get:function(){return this.uniforms.t2D.value}}),y.update(N)),N.material.uniforms.t2D.value=fe,N.material.uniforms.backgroundIntensity.value=q.backgroundIntensity,N.material.toneMapped=vr.getTransfer(fe.colorSpace)!==wr,fe.matrixAutoUpdate===!0&&fe.updateMatrix(),N.material.uniforms.uvTransform.value.copy(fe.matrix),(Q!==fe||X!==fe.version||$!==w.toneMapping)&&(N.material.needsUpdate=!0,Q=fe,X=fe.version,$=w.toneMapping),N.layers.enableAll(),re.unshift(N,N.geometry,N.material,0,0,null))}function ue(re,q){re.getRGB(pg,Ow(w)),m.buffers.color.setClear(pg.r,pg.g,pg.b,q,R)}return{getClearColor:function(){return I},setClearColor:function(re,q=1){I.set(re),O=q,ue(I,O)},getClearAlpha:function(){return O},setClearAlpha:function(re){O=re,ue(I,O)},render:ie}}function QO(w,r,l,m){const y=w.getParameter(w.MAX_VERTEX_ATTRIBS),_=m.isWebGL2?null:r.get("OES_vertex_array_object"),R=m.isWebGL2||_!==null,I={},O=re(null);let N=O,V=!1;function Q(lt,wt,Kt,qt,ln){let Jt=!1;if(R){const pn=ue(qt,Kt,wt);N!==pn&&(N=pn,$(N.object)),Jt=q(lt,qt,Kt,ln),Jt&&Se(lt,qt,Kt,ln)}else{const pn=wt.wireframe===!0;(N.geometry!==qt.id||N.program!==Kt.id||N.wireframe!==pn)&&(N.geometry=qt.id,N.program=Kt.id,N.wireframe=pn,Jt=!0)}ln!==null&&l.update(ln,w.ELEMENT_ARRAY_BUFFER),(Jt||V)&&(V=!1,st(lt,wt,Kt,qt),ln!==null&&w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,l.get(ln).buffer))}function X(){return m.isWebGL2?w.createVertexArray():_.createVertexArrayOES()}function $(lt){return m.isWebGL2?w.bindVertexArray(lt):_.bindVertexArrayOES(lt)}function ie(lt){return m.isWebGL2?w.deleteVertexArray(lt):_.deleteVertexArrayOES(lt)}function ue(lt,wt,Kt){const qt=Kt.wireframe===!0;let ln=I[lt.id];ln===void 0&&(ln={},I[lt.id]=ln);let Jt=ln[wt.id];Jt===void 0&&(Jt={},ln[wt.id]=Jt);let pn=Jt[qt];return pn===void 0&&(pn=re(X()),Jt[qt]=pn),pn}function re(lt){const wt=[],Kt=[],qt=[];for(let ln=0;ln=0){const ki=ln[Qn];let Ht=Jt[Qn];if(Ht===void 0&&(Qn==="instanceMatrix"&<.instanceMatrix&&(Ht=lt.instanceMatrix),Qn==="instanceColor"&<.instanceColor&&(Ht=lt.instanceColor)),ki===void 0||ki.attribute!==Ht||Ht&&ki.data!==Ht.data)return!0;pn++}return N.attributesNum!==pn||N.index!==qt}function Se(lt,wt,Kt,qt){const ln={},Jt=wt.attributes;let pn=0;const dn=Kt.getAttributes();for(const Qn in dn)if(dn[Qn].location>=0){let ki=Jt[Qn];ki===void 0&&(Qn==="instanceMatrix"&<.instanceMatrix&&(ki=lt.instanceMatrix),Qn==="instanceColor"&<.instanceColor&&(ki=lt.instanceColor));const Ht={};Ht.attribute=ki,ki&&ki.data&&(Ht.data=ki.data),ln[Qn]=Ht,pn++}N.attributes=ln,N.attributesNum=pn,N.index=qt}function fe(){const lt=N.newAttributes;for(let wt=0,Kt=lt.length;wt=0){let Qi=ln[dn];if(Qi===void 0&&(dn==="instanceMatrix"&<.instanceMatrix&&(Qi=lt.instanceMatrix),dn==="instanceColor"&<.instanceColor&&(Qi=lt.instanceColor)),Qi!==void 0){const ki=Qi.normalized,Ht=Qi.itemSize,Sn=l.get(Qi);if(Sn===void 0)continue;const _n=Sn.buffer,wi=Sn.type,ei=Sn.bytesPerElement,ii=m.isWebGL2===!0&&(wi===w.INT||wi===w.UNSIGNED_INT||Qi.gpuType===Jn);if(Qi.isInterleavedBufferAttribute){const yi=Qi.data,nn=yi.stride,ct=Qi.offset;if(yi.isInstancedInterleavedBuffer){for(let hn=0;hn0&&w.getShaderPrecisionFormat(w.FRAGMENT_SHADER,w.HIGH_FLOAT).precision>0)return"highp";et="mediump"}return et==="mediump"&&w.getShaderPrecisionFormat(w.VERTEX_SHADER,w.MEDIUM_FLOAT).precision>0&&w.getShaderPrecisionFormat(w.FRAGMENT_SHADER,w.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const R=typeof WebGL2RenderingContext<"u"&&w.constructor.name==="WebGL2RenderingContext";let I=l.precision!==void 0?l.precision:"highp";const O=_(I);O!==I&&(console.warn("THREE.WebGLRenderer:",I,"not supported, using",O,"instead."),I=O);const N=R||r.has("WEBGL_draw_buffers"),V=l.logarithmicDepthBuffer===!0,Q=w.getParameter(w.MAX_TEXTURE_IMAGE_UNITS),X=w.getParameter(w.MAX_VERTEX_TEXTURE_IMAGE_UNITS),$=w.getParameter(w.MAX_TEXTURE_SIZE),ie=w.getParameter(w.MAX_CUBE_MAP_TEXTURE_SIZE),ue=w.getParameter(w.MAX_VERTEX_ATTRIBS),re=w.getParameter(w.MAX_VERTEX_UNIFORM_VECTORS),q=w.getParameter(w.MAX_VARYING_VECTORS),Se=w.getParameter(w.MAX_FRAGMENT_UNIFORM_VECTORS),fe=X>0,Me=R||r.has("OES_texture_float"),ze=fe&&Me,He=R?w.getParameter(w.MAX_SAMPLES):0;return{isWebGL2:R,drawBuffers:N,getMaxAnisotropy:y,getMaxPrecision:_,precision:I,logarithmicDepthBuffer:V,maxTextures:Q,maxVertexTextures:X,maxTextureSize:$,maxCubemapSize:ie,maxAttributes:ue,maxVertexUniforms:re,maxVaryings:q,maxFragmentUniforms:Se,vertexTextures:fe,floatFragmentTextures:Me,floatVertexTextures:ze,maxSamples:He}}function qO(w){const r=this;let l=null,m=0,y=!1,_=!1;const R=new dc,I=new Ui,O={value:null,needsUpdate:!1};this.uniform=O,this.numPlanes=0,this.numIntersection=0,this.init=function(Q,X){const $=Q.length!==0||X||m!==0||y;return y=X,m=Q.length,$},this.beginShadows=function(){_=!0,V(null)},this.endShadows=function(){_=!1},this.setGlobalState=function(Q,X){l=V(Q,X,0)},this.setState=function(Q,X,$){const ie=Q.clippingPlanes,ue=Q.clipIntersection,re=Q.clipShadows,q=w.get(Q);if(!y||ie===null||ie.length===0||_&&!re)_?V(null):N();else{const Se=_?0:m,fe=Se*4;let Me=q.clippingState||null;O.value=Me,Me=V(ie,X,fe,$);for(let ze=0;ze!==fe;++ze)Me[ze]=l[ze];q.clippingState=Me,this.numIntersection=ue?this.numPlanes:0,this.numPlanes+=Se}};function N(){O.value!==l&&(O.value=l,O.needsUpdate=m>0),r.numPlanes=m,r.numIntersection=0}function V(Q,X,$,ie){const ue=Q!==null?Q.length:0;let re=null;if(ue!==0){if(re=O.value,ie!==!0||re===null){const q=$+ue*4,Se=X.matrixWorldInverse;I.getNormalMatrix(Se),(re===null||re.length0){const N=new Uw(O.height/2);return N.fromEquirectangularTexture(w,R),r.set(R,N),R.addEventListener("dispose",y),l(N.texture,R.mapping)}else return null}}return R}function y(R){const I=R.target;I.removeEventListener("dispose",y);const O=r.get(I);O!==void 0&&(r.delete(I),O.dispose())}function _(){r=new WeakMap}return{get:m,dispose:_}}class mg extends ug{constructor(r=-1,l=1,m=1,y=-1,_=.1,R=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=r,this.right=l,this.top=m,this.bottom=y,this.near=_,this.far=R,this.updateProjectionMatrix()}copy(r,l){return super.copy(r,l),this.left=r.left,this.right=r.right,this.top=r.top,this.bottom=r.bottom,this.near=r.near,this.far=r.far,this.zoom=r.zoom,this.view=r.view===null?null:Object.assign({},r.view),this}setViewOffset(r,l,m,y,_,R){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=r,this.view.fullHeight=l,this.view.offsetX=m,this.view.offsetY=y,this.view.width=_,this.view.height=R,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const r=(this.right-this.left)/(2*this.zoom),l=(this.top-this.bottom)/(2*this.zoom),m=(this.right+this.left)/2,y=(this.top+this.bottom)/2;let _=m-r,R=m+r,I=y+l,O=y-l;if(this.view!==null&&this.view.enabled){const N=(this.right-this.left)/this.view.fullWidth/this.zoom,V=(this.top-this.bottom)/this.view.fullHeight/this.zoom;_+=N*this.view.offsetX,R=_+N*this.view.width,I-=V*this.view.offsetY,O=I-V*this.view.height}this.projectionMatrix.makeOrthographic(_,R,I,O,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(r){const l=super.toJSON(r);return l.object.zoom=this.zoom,l.object.left=this.left,l.object.right=this.right,l.object.top=this.top,l.object.bottom=this.bottom,l.object.near=this.near,l.object.far=this.far,this.view!==null&&(l.object.view=Object.assign({},this.view)),l}}const Pu=4,kw=[.125,.215,.35,.446,.526,.582],mh=20,ix=new mg,zw=new Hn;let rx=null,sx=0,ox=0;const gh=(1+Math.sqrt(5))/2,Du=1/gh,Gw=[new je(1,1,1),new je(-1,1,1),new je(1,1,-1),new je(-1,1,-1),new je(0,gh,Du),new je(0,gh,-Du),new je(Du,0,gh),new je(-Du,0,gh),new je(gh,Du,0),new je(-gh,Du,0)];class ax{constructor(r){this._renderer=r,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(r,l=0,m=.1,y=100){rx=this._renderer.getRenderTarget(),sx=this._renderer.getActiveCubeFace(),ox=this._renderer.getActiveMipmapLevel(),this._setSize(256);const _=this._allocateTargets();return _.depthBuffer=!0,this._sceneToCubeUV(r,m,y,_),l>0&&this._blur(_,0,0,l),this._applyPMREM(_),this._cleanup(_),_}fromEquirectangular(r,l=null){return this._fromTexture(r,l)}fromCubemap(r,l=null){return this._fromTexture(r,l)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=jw(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=Hw(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(r){this._lodMax=Math.floor(Math.log2(r)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let r=0;r2?fe:0,fe,fe),V.setRenderTarget(y),ue&&V.render(ie,I),V.render(r,I)}ie.geometry.dispose(),ie.material.dispose(),V.toneMapping=X,V.autoClear=Q,r.background=re}_textureToCubeUV(r,l){const m=this._renderer,y=r.mapping===Qe||r.mapping===ne;y?(this._cubemapMaterial===null&&(this._cubemapMaterial=jw()),this._cubemapMaterial.uniforms.flipEnvMap.value=r.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=Hw());const _=y?this._cubemapMaterial:this._equirectMaterial,R=new Os(this._lodPlanes[0],_),I=_.uniforms;I.envMap.value=r;const O=this._cubeSize;gg(l,0,0,3*O,2*O),m.setRenderTarget(l),m.render(R,ix)}_applyPMREM(r){const l=this._renderer,m=l.autoClear;l.autoClear=!1;for(let y=1;ymh&&console.warn(`sigmaRadians, ${_}, is too large and will clip, as it requested ${re} samples when the maximum is set to ${mh}`);const q=[];let Se=0;for(let et=0;etfe-Pu?y-fe+Pu:0),He=4*(this._cubeSize-Me);gg(l,ze,He,3*Me,2*Me),O.setRenderTarget(l),O.render(Q,ix)}}function $O(w){const r=[],l=[],m=[];let y=w;const _=w-Pu+1+kw.length;for(let R=0;R<_;R++){const I=Math.pow(2,y);l.push(I);let O=1/I;R>w-Pu?O=kw[R-w+Pu-1]:R===0&&(O=0),m.push(O);const N=1/(I-2),V=-N,Q=1+N,X=[V,V,Q,V,Q,Q,V,V,Q,Q,V,Q],$=6,ie=6,ue=3,re=2,q=1,Se=new Float32Array(ue*ie*$),fe=new Float32Array(re*ie*$),Me=new Float32Array(q*ie*$);for(let He=0;He<$;He++){const et=He%3*2/3-1,st=He>2?0:-1,Be=[et,st,0,et+2/3,st,0,et+2/3,st+1,0,et,st,0,et+2/3,st+1,0,et,st+1,0];Se.set(Be,ue*ie*He),fe.set(X,re*ie*He);const Xe=[He,He,He,He,He,He];Me.set(Xe,q*ie*He)}const ze=new Yi;ze.setAttribute("position",new Sr(Se,ue)),ze.setAttribute("uv",new Sr(fe,re)),ze.setAttribute("faceIndex",new Sr(Me,q)),r.push(ze),y>Pu&&y--}return{lodPlanes:r,sizeLods:l,sigmas:m}}function Vw(w,r,l){const m=new yo(w,r,l);return m.texture.mapping=he,m.texture.name="PMREM.cubeUv",m.scissorTest=!0,m}function gg(w,r,l,m,y){w.viewport.set(r,l,m,y),w.scissor.set(r,l,m,y)}function JO(w,r,l){const m=new Float32Array(mh),y=new je(0,1,0);return new Ka({name:"SphericalGaussianBlur",defines:{n:mh,CUBEUV_TEXEL_WIDTH:1/r,CUBEUV_TEXEL_HEIGHT:1/l,CUBEUV_MAX_MIP:`${w}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:m},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:y}},vertexShader:lx(),fragmentShader:` +}`},Un={common:{diffuse:{value:new Hn(16777215)},opacity:{value:1},map:{value:null},mapTransform:{value:new Ui},alphaMap:{value:null},alphaMapTransform:{value:new Ui},alphaTest:{value:0}},specularmap:{specularMap:{value:null},specularMapTransform:{value:new Ui}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1},aoMapTransform:{value:new Ui}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1},lightMapTransform:{value:new Ui}},bumpmap:{bumpMap:{value:null},bumpMapTransform:{value:new Ui},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalMapTransform:{value:new Ui},normalScale:{value:new en(1,1)}},displacementmap:{displacementMap:{value:null},displacementMapTransform:{value:new Ui},displacementScale:{value:1},displacementBias:{value:0}},emissivemap:{emissiveMap:{value:null},emissiveMapTransform:{value:new Ui}},metalnessmap:{metalnessMap:{value:null},metalnessMapTransform:{value:new Ui}},roughnessmap:{roughnessMap:{value:null},roughnessMapTransform:{value:new Ui}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Hn(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 Hn(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaMapTransform:{value:new Ui},alphaTest:{value:0},uvTransform:{value:new Ui}},sprite:{diffuse:{value:new Hn(16777215)},opacity:{value:1},center:{value:new en(.5,.5)},rotation:{value:0},map:{value:null},mapTransform:{value:new Ui},alphaMap:{value:null},alphaMapTransform:{value:new Ui},alphaTest:{value:0}}},fa={basic:{uniforms:ro([Un.common,Un.specularmap,Un.envmap,Un.aomap,Un.lightmap,Un.fog]),vertexShader:Wi.meshbasic_vert,fragmentShader:Wi.meshbasic_frag},lambert:{uniforms:ro([Un.common,Un.specularmap,Un.envmap,Un.aomap,Un.lightmap,Un.emissivemap,Un.bumpmap,Un.normalmap,Un.displacementmap,Un.fog,Un.lights,{emissive:{value:new Hn(0)}}]),vertexShader:Wi.meshlambert_vert,fragmentShader:Wi.meshlambert_frag},phong:{uniforms:ro([Un.common,Un.specularmap,Un.envmap,Un.aomap,Un.lightmap,Un.emissivemap,Un.bumpmap,Un.normalmap,Un.displacementmap,Un.fog,Un.lights,{emissive:{value:new Hn(0)},specular:{value:new Hn(1118481)},shininess:{value:30}}]),vertexShader:Wi.meshphong_vert,fragmentShader:Wi.meshphong_frag},standard:{uniforms:ro([Un.common,Un.envmap,Un.aomap,Un.lightmap,Un.emissivemap,Un.bumpmap,Un.normalmap,Un.displacementmap,Un.roughnessmap,Un.metalnessmap,Un.fog,Un.lights,{emissive:{value:new Hn(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:Wi.meshphysical_vert,fragmentShader:Wi.meshphysical_frag},toon:{uniforms:ro([Un.common,Un.aomap,Un.lightmap,Un.emissivemap,Un.bumpmap,Un.normalmap,Un.displacementmap,Un.gradientmap,Un.fog,Un.lights,{emissive:{value:new Hn(0)}}]),vertexShader:Wi.meshtoon_vert,fragmentShader:Wi.meshtoon_frag},matcap:{uniforms:ro([Un.common,Un.bumpmap,Un.normalmap,Un.displacementmap,Un.fog,{matcap:{value:null}}]),vertexShader:Wi.meshmatcap_vert,fragmentShader:Wi.meshmatcap_frag},points:{uniforms:ro([Un.points,Un.fog]),vertexShader:Wi.points_vert,fragmentShader:Wi.points_frag},dashed:{uniforms:ro([Un.common,Un.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:Wi.linedashed_vert,fragmentShader:Wi.linedashed_frag},depth:{uniforms:ro([Un.common,Un.displacementmap]),vertexShader:Wi.depth_vert,fragmentShader:Wi.depth_frag},normal:{uniforms:ro([Un.common,Un.bumpmap,Un.normalmap,Un.displacementmap,{opacity:{value:1}}]),vertexShader:Wi.meshnormal_vert,fragmentShader:Wi.meshnormal_frag},sprite:{uniforms:ro([Un.sprite,Un.fog]),vertexShader:Wi.sprite_vert,fragmentShader:Wi.sprite_frag},background:{uniforms:{uvTransform:{value:new Ui},t2D:{value:null},backgroundIntensity:{value:1}},vertexShader:Wi.background_vert,fragmentShader:Wi.background_frag},backgroundCube:{uniforms:{envMap:{value:null},flipEnvMap:{value:-1},backgroundBlurriness:{value:0},backgroundIntensity:{value:1}},vertexShader:Wi.backgroundCube_vert,fragmentShader:Wi.backgroundCube_frag},cube:{uniforms:{tCube:{value:null},tFlip:{value:-1},opacity:{value:1}},vertexShader:Wi.cube_vert,fragmentShader:Wi.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:Wi.equirect_vert,fragmentShader:Wi.equirect_frag},distanceRGBA:{uniforms:ro([Un.common,Un.displacementmap,{referencePosition:{value:new je},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:Wi.distanceRGBA_vert,fragmentShader:Wi.distanceRGBA_frag},shadow:{uniforms:ro([Un.lights,Un.fog,{color:{value:new Hn(0)},opacity:{value:1}}]),vertexShader:Wi.shadow_vert,fragmentShader:Wi.shadow_frag}};fa.physical={uniforms:ro([fa.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatMapTransform:{value:new Ui},clearcoatNormalMap:{value:null},clearcoatNormalMapTransform:{value:new Ui},clearcoatNormalScale:{value:new en(1,1)},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatRoughnessMapTransform:{value:new Ui},iridescence:{value:0},iridescenceMap:{value:null},iridescenceMapTransform:{value:new Ui},iridescenceIOR:{value:1.3},iridescenceThicknessMinimum:{value:100},iridescenceThicknessMaximum:{value:400},iridescenceThicknessMap:{value:null},iridescenceThicknessMapTransform:{value:new Ui},sheen:{value:0},sheenColor:{value:new Hn(0)},sheenColorMap:{value:null},sheenColorMapTransform:{value:new Ui},sheenRoughness:{value:1},sheenRoughnessMap:{value:null},sheenRoughnessMapTransform:{value:new Ui},transmission:{value:0},transmissionMap:{value:null},transmissionMapTransform:{value:new Ui},transmissionSamplerSize:{value:new en},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},thicknessMapTransform:{value:new Ui},attenuationDistance:{value:0},attenuationColor:{value:new Hn(0)},specularColor:{value:new Hn(1,1,1)},specularColorMap:{value:null},specularColorMapTransform:{value:new Ui},specularIntensity:{value:1},specularIntensityMap:{value:null},specularIntensityMapTransform:{value:new Ui},anisotropyVector:{value:new en},anisotropyMap:{value:null},anisotropyMapTransform:{value:new Ui}}]),vertexShader:Wi.meshphysical_vert,fragmentShader:Wi.meshphysical_frag};const pg={r:0,b:0,g:0};function WO(w,r,l,m,y,_,R){const I=new Hn(0);let O=_===!0?0:1,N,V,Q=null,X=0,$=null;function ie(re,q){let Se=!1,fe=q.isScene===!0?q.background:null;fe&&fe.isTexture&&(fe=(q.backgroundBlurriness>0?l:r).get(fe)),fe===null?ue(I,O):fe&&fe.isColor&&(ue(fe,1),Se=!0);const Me=w.xr.getEnvironmentBlendMode();Me==="additive"?m.buffers.color.setClear(0,0,0,1,R):Me==="alpha-blend"&&m.buffers.color.setClear(0,0,0,0,R),(w.autoClear||Se)&&w.clear(w.autoClearColor,w.autoClearDepth,w.autoClearStencil),fe&&(fe.isCubeTexture||fe.mapping===he)?(V===void 0&&(V=new Os(new fh(1e4,1e4,1e4),new Ka({name:"BackgroundCubeMaterial",uniforms:Iu(fa.backgroundCube.uniforms),vertexShader:fa.backgroundCube.vertexShader,fragmentShader:fa.backgroundCube.fragmentShader,side:T,depthTest:!1,depthWrite:!1,fog:!1})),V.geometry.deleteAttribute("normal"),V.geometry.deleteAttribute("uv"),V.onBeforeRender=function(ze,He,et){this.matrixWorld.copyPosition(et.matrixWorld)},Object.defineProperty(V.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),y.update(V)),V.material.uniforms.envMap.value=fe,V.material.uniforms.flipEnvMap.value=fe.isCubeTexture&&fe.isRenderTargetTexture===!1?-1:1,V.material.uniforms.backgroundBlurriness.value=q.backgroundBlurriness,V.material.uniforms.backgroundIntensity.value=q.backgroundIntensity,V.material.toneMapped=vr.getTransfer(fe.colorSpace)!==wr,(Q!==fe||X!==fe.version||$!==w.toneMapping)&&(V.material.needsUpdate=!0,Q=fe,X=fe.version,$=w.toneMapping),V.layers.enableAll(),re.unshift(V,V.geometry,V.material,0,0,null)):fe&&fe.isTexture&&(N===void 0&&(N=new Os(new kf(2,2),new Ka({name:"BackgroundMaterial",uniforms:Iu(fa.background.uniforms),vertexShader:fa.background.vertexShader,fragmentShader:fa.background.fragmentShader,side:C,depthTest:!1,depthWrite:!1,fog:!1})),N.geometry.deleteAttribute("normal"),Object.defineProperty(N.material,"map",{get:function(){return this.uniforms.t2D.value}}),y.update(N)),N.material.uniforms.t2D.value=fe,N.material.uniforms.backgroundIntensity.value=q.backgroundIntensity,N.material.toneMapped=vr.getTransfer(fe.colorSpace)!==wr,fe.matrixAutoUpdate===!0&&fe.updateMatrix(),N.material.uniforms.uvTransform.value.copy(fe.matrix),(Q!==fe||X!==fe.version||$!==w.toneMapping)&&(N.material.needsUpdate=!0,Q=fe,X=fe.version,$=w.toneMapping),N.layers.enableAll(),re.unshift(N,N.geometry,N.material,0,0,null))}function ue(re,q){re.getRGB(pg,Fw(w)),m.buffers.color.setClear(pg.r,pg.g,pg.b,q,R)}return{getClearColor:function(){return I},setClearColor:function(re,q=1){I.set(re),O=q,ue(I,O)},getClearAlpha:function(){return O},setClearAlpha:function(re){O=re,ue(I,O)},render:ie}}function QO(w,r,l,m){const y=w.getParameter(w.MAX_VERTEX_ATTRIBS),_=m.isWebGL2?null:r.get("OES_vertex_array_object"),R=m.isWebGL2||_!==null,I={},O=re(null);let N=O,V=!1;function Q(lt,wt,Kt,qt,ln){let Jt=!1;if(R){const pn=ue(qt,Kt,wt);N!==pn&&(N=pn,$(N.object)),Jt=q(lt,qt,Kt,ln),Jt&&Se(lt,qt,Kt,ln)}else{const pn=wt.wireframe===!0;(N.geometry!==qt.id||N.program!==Kt.id||N.wireframe!==pn)&&(N.geometry=qt.id,N.program=Kt.id,N.wireframe=pn,Jt=!0)}ln!==null&&l.update(ln,w.ELEMENT_ARRAY_BUFFER),(Jt||V)&&(V=!1,st(lt,wt,Kt,qt),ln!==null&&w.bindBuffer(w.ELEMENT_ARRAY_BUFFER,l.get(ln).buffer))}function X(){return m.isWebGL2?w.createVertexArray():_.createVertexArrayOES()}function $(lt){return m.isWebGL2?w.bindVertexArray(lt):_.bindVertexArrayOES(lt)}function ie(lt){return m.isWebGL2?w.deleteVertexArray(lt):_.deleteVertexArrayOES(lt)}function ue(lt,wt,Kt){const qt=Kt.wireframe===!0;let ln=I[lt.id];ln===void 0&&(ln={},I[lt.id]=ln);let Jt=ln[wt.id];Jt===void 0&&(Jt={},ln[wt.id]=Jt);let pn=Jt[qt];return pn===void 0&&(pn=re(X()),Jt[qt]=pn),pn}function re(lt){const wt=[],Kt=[],qt=[];for(let ln=0;ln=0){const ki=ln[Qn];let Ht=Jt[Qn];if(Ht===void 0&&(Qn==="instanceMatrix"&<.instanceMatrix&&(Ht=lt.instanceMatrix),Qn==="instanceColor"&<.instanceColor&&(Ht=lt.instanceColor)),ki===void 0||ki.attribute!==Ht||Ht&&ki.data!==Ht.data)return!0;pn++}return N.attributesNum!==pn||N.index!==qt}function Se(lt,wt,Kt,qt){const ln={},Jt=wt.attributes;let pn=0;const dn=Kt.getAttributes();for(const Qn in dn)if(dn[Qn].location>=0){let ki=Jt[Qn];ki===void 0&&(Qn==="instanceMatrix"&<.instanceMatrix&&(ki=lt.instanceMatrix),Qn==="instanceColor"&<.instanceColor&&(ki=lt.instanceColor));const Ht={};Ht.attribute=ki,ki&&ki.data&&(Ht.data=ki.data),ln[Qn]=Ht,pn++}N.attributes=ln,N.attributesNum=pn,N.index=qt}function fe(){const lt=N.newAttributes;for(let wt=0,Kt=lt.length;wt=0){let Qi=ln[dn];if(Qi===void 0&&(dn==="instanceMatrix"&<.instanceMatrix&&(Qi=lt.instanceMatrix),dn==="instanceColor"&<.instanceColor&&(Qi=lt.instanceColor)),Qi!==void 0){const ki=Qi.normalized,Ht=Qi.itemSize,Sn=l.get(Qi);if(Sn===void 0)continue;const _n=Sn.buffer,wi=Sn.type,ei=Sn.bytesPerElement,ii=m.isWebGL2===!0&&(wi===w.INT||wi===w.UNSIGNED_INT||Qi.gpuType===Jn);if(Qi.isInterleavedBufferAttribute){const yi=Qi.data,nn=yi.stride,ct=Qi.offset;if(yi.isInstancedInterleavedBuffer){for(let hn=0;hn0&&w.getShaderPrecisionFormat(w.FRAGMENT_SHADER,w.HIGH_FLOAT).precision>0)return"highp";et="mediump"}return et==="mediump"&&w.getShaderPrecisionFormat(w.VERTEX_SHADER,w.MEDIUM_FLOAT).precision>0&&w.getShaderPrecisionFormat(w.FRAGMENT_SHADER,w.MEDIUM_FLOAT).precision>0?"mediump":"lowp"}const R=typeof WebGL2RenderingContext<"u"&&w.constructor.name==="WebGL2RenderingContext";let I=l.precision!==void 0?l.precision:"highp";const O=_(I);O!==I&&(console.warn("THREE.WebGLRenderer:",I,"not supported, using",O,"instead."),I=O);const N=R||r.has("WEBGL_draw_buffers"),V=l.logarithmicDepthBuffer===!0,Q=w.getParameter(w.MAX_TEXTURE_IMAGE_UNITS),X=w.getParameter(w.MAX_VERTEX_TEXTURE_IMAGE_UNITS),$=w.getParameter(w.MAX_TEXTURE_SIZE),ie=w.getParameter(w.MAX_CUBE_MAP_TEXTURE_SIZE),ue=w.getParameter(w.MAX_VERTEX_ATTRIBS),re=w.getParameter(w.MAX_VERTEX_UNIFORM_VECTORS),q=w.getParameter(w.MAX_VARYING_VECTORS),Se=w.getParameter(w.MAX_FRAGMENT_UNIFORM_VECTORS),fe=X>0,Me=R||r.has("OES_texture_float"),ze=fe&&Me,He=R?w.getParameter(w.MAX_SAMPLES):0;return{isWebGL2:R,drawBuffers:N,getMaxAnisotropy:y,getMaxPrecision:_,precision:I,logarithmicDepthBuffer:V,maxTextures:Q,maxVertexTextures:X,maxTextureSize:$,maxCubemapSize:ie,maxAttributes:ue,maxVertexUniforms:re,maxVaryings:q,maxFragmentUniforms:Se,vertexTextures:fe,floatFragmentTextures:Me,floatVertexTextures:ze,maxSamples:He}}function qO(w){const r=this;let l=null,m=0,y=!1,_=!1;const R=new dc,I=new Ui,O={value:null,needsUpdate:!1};this.uniform=O,this.numPlanes=0,this.numIntersection=0,this.init=function(Q,X){const $=Q.length!==0||X||m!==0||y;return y=X,m=Q.length,$},this.beginShadows=function(){_=!0,V(null)},this.endShadows=function(){_=!1},this.setGlobalState=function(Q,X){l=V(Q,X,0)},this.setState=function(Q,X,$){const ie=Q.clippingPlanes,ue=Q.clipIntersection,re=Q.clipShadows,q=w.get(Q);if(!y||ie===null||ie.length===0||_&&!re)_?V(null):N();else{const Se=_?0:m,fe=Se*4;let Me=q.clippingState||null;O.value=Me,Me=V(ie,X,fe,$);for(let ze=0;ze!==fe;++ze)Me[ze]=l[ze];q.clippingState=Me,this.numIntersection=ue?this.numPlanes:0,this.numPlanes+=Se}};function N(){O.value!==l&&(O.value=l,O.needsUpdate=m>0),r.numPlanes=m,r.numIntersection=0}function V(Q,X,$,ie){const ue=Q!==null?Q.length:0;let re=null;if(ue!==0){if(re=O.value,ie!==!0||re===null){const q=$+ue*4,Se=X.matrixWorldInverse;I.getNormalMatrix(Se),(re===null||re.length0){const N=new kw(O.height/2);return N.fromEquirectangularTexture(w,R),r.set(R,N),R.addEventListener("dispose",y),l(N.texture,R.mapping)}else return null}}return R}function y(R){const I=R.target;I.removeEventListener("dispose",y);const O=r.get(I);O!==void 0&&(r.delete(I),O.dispose())}function _(){r=new WeakMap}return{get:m,dispose:_}}class mg extends ug{constructor(r=-1,l=1,m=1,y=-1,_=.1,R=2e3){super(),this.isOrthographicCamera=!0,this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=r,this.right=l,this.top=m,this.bottom=y,this.near=_,this.far=R,this.updateProjectionMatrix()}copy(r,l){return super.copy(r,l),this.left=r.left,this.right=r.right,this.top=r.top,this.bottom=r.bottom,this.near=r.near,this.far=r.far,this.zoom=r.zoom,this.view=r.view===null?null:Object.assign({},r.view),this}setViewOffset(r,l,m,y,_,R){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=r,this.view.fullHeight=l,this.view.offsetX=m,this.view.offsetY=y,this.view.width=_,this.view.height=R,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){const r=(this.right-this.left)/(2*this.zoom),l=(this.top-this.bottom)/(2*this.zoom),m=(this.right+this.left)/2,y=(this.top+this.bottom)/2;let _=m-r,R=m+r,I=y+l,O=y-l;if(this.view!==null&&this.view.enabled){const N=(this.right-this.left)/this.view.fullWidth/this.zoom,V=(this.top-this.bottom)/this.view.fullHeight/this.zoom;_+=N*this.view.offsetX,R=_+N*this.view.width,I-=V*this.view.offsetY,O=I-V*this.view.height}this.projectionMatrix.makeOrthographic(_,R,I,O,this.near,this.far,this.coordinateSystem),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(r){const l=super.toJSON(r);return l.object.zoom=this.zoom,l.object.left=this.left,l.object.right=this.right,l.object.top=this.top,l.object.bottom=this.bottom,l.object.near=this.near,l.object.far=this.far,this.view!==null&&(l.object.view=Object.assign({},this.view)),l}}const Pu=4,zw=[.125,.215,.35,.446,.526,.582],mh=20,rx=new mg,Gw=new Hn;let sx=null,ox=0,ax=0;const gh=(1+Math.sqrt(5))/2,Du=1/gh,Vw=[new je(1,1,1),new je(-1,1,1),new je(1,1,-1),new je(-1,1,-1),new je(0,gh,Du),new je(0,gh,-Du),new je(Du,0,gh),new je(-Du,0,gh),new je(gh,Du,0),new je(-gh,Du,0)];class lx{constructor(r){this._renderer=r,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(r,l=0,m=.1,y=100){sx=this._renderer.getRenderTarget(),ox=this._renderer.getActiveCubeFace(),ax=this._renderer.getActiveMipmapLevel(),this._setSize(256);const _=this._allocateTargets();return _.depthBuffer=!0,this._sceneToCubeUV(r,m,y,_),l>0&&this._blur(_,0,0,l),this._applyPMREM(_),this._cleanup(_),_}fromEquirectangular(r,l=null){return this._fromTexture(r,l)}fromCubemap(r,l=null){return this._fromTexture(r,l)}compileCubemapShader(){this._cubemapMaterial===null&&(this._cubemapMaterial=Ww(),this._compileMaterial(this._cubemapMaterial))}compileEquirectangularShader(){this._equirectMaterial===null&&(this._equirectMaterial=jw(),this._compileMaterial(this._equirectMaterial))}dispose(){this._dispose(),this._cubemapMaterial!==null&&this._cubemapMaterial.dispose(),this._equirectMaterial!==null&&this._equirectMaterial.dispose()}_setSize(r){this._lodMax=Math.floor(Math.log2(r)),this._cubeSize=Math.pow(2,this._lodMax)}_dispose(){this._blurMaterial!==null&&this._blurMaterial.dispose(),this._pingPongRenderTarget!==null&&this._pingPongRenderTarget.dispose();for(let r=0;r2?fe:0,fe,fe),V.setRenderTarget(y),ue&&V.render(ie,I),V.render(r,I)}ie.geometry.dispose(),ie.material.dispose(),V.toneMapping=X,V.autoClear=Q,r.background=re}_textureToCubeUV(r,l){const m=this._renderer,y=r.mapping===Qe||r.mapping===ne;y?(this._cubemapMaterial===null&&(this._cubemapMaterial=Ww()),this._cubemapMaterial.uniforms.flipEnvMap.value=r.isRenderTargetTexture===!1?-1:1):this._equirectMaterial===null&&(this._equirectMaterial=jw());const _=y?this._cubemapMaterial:this._equirectMaterial,R=new Os(this._lodPlanes[0],_),I=_.uniforms;I.envMap.value=r;const O=this._cubeSize;gg(l,0,0,3*O,2*O),m.setRenderTarget(l),m.render(R,rx)}_applyPMREM(r){const l=this._renderer,m=l.autoClear;l.autoClear=!1;for(let y=1;ymh&&console.warn(`sigmaRadians, ${_}, is too large and will clip, as it requested ${re} samples when the maximum is set to ${mh}`);const q=[];let Se=0;for(let et=0;etfe-Pu?y-fe+Pu:0),He=4*(this._cubeSize-Me);gg(l,ze,He,3*Me,2*Me),O.setRenderTarget(l),O.render(Q,rx)}}function $O(w){const r=[],l=[],m=[];let y=w;const _=w-Pu+1+zw.length;for(let R=0;R<_;R++){const I=Math.pow(2,y);l.push(I);let O=1/I;R>w-Pu?O=zw[R-w+Pu-1]:R===0&&(O=0),m.push(O);const N=1/(I-2),V=-N,Q=1+N,X=[V,V,Q,V,Q,Q,V,V,Q,Q,V,Q],$=6,ie=6,ue=3,re=2,q=1,Se=new Float32Array(ue*ie*$),fe=new Float32Array(re*ie*$),Me=new Float32Array(q*ie*$);for(let He=0;He<$;He++){const et=He%3*2/3-1,st=He>2?0:-1,Be=[et,st,0,et+2/3,st,0,et+2/3,st+1,0,et,st,0,et+2/3,st+1,0,et,st+1,0];Se.set(Be,ue*ie*He),fe.set(X,re*ie*He);const Xe=[He,He,He,He,He,He];Me.set(Xe,q*ie*He)}const ze=new Yi;ze.setAttribute("position",new Sr(Se,ue)),ze.setAttribute("uv",new Sr(fe,re)),ze.setAttribute("faceIndex",new Sr(Me,q)),r.push(ze),y>Pu&&y--}return{lodPlanes:r,sizeLods:l,sigmas:m}}function Hw(w,r,l){const m=new yo(w,r,l);return m.texture.mapping=he,m.texture.name="PMREM.cubeUv",m.scissorTest=!0,m}function gg(w,r,l,m,y){w.viewport.set(r,l,m,y),w.scissor.set(r,l,m,y)}function JO(w,r,l){const m=new Float32Array(mh),y=new je(0,1,0);return new Ka({name:"SphericalGaussianBlur",defines:{n:mh,CUBEUV_TEXEL_WIDTH:1/r,CUBEUV_TEXEL_HEIGHT:1/l,CUBEUV_MAX_MIP:`${w}.0`},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:m},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:y}},vertexShader:cx(),fragmentShader:` precision mediump float; precision mediump int; @@ -4642,7 +4642,7 @@ void main() { } } - `,blending:F,depthTest:!1,depthWrite:!1})}function Hw(){return new Ka({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:lx(),fragmentShader:` + `,blending:F,depthTest:!1,depthWrite:!1})}function jw(){return new Ka({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null}},vertexShader:cx(),fragmentShader:` precision mediump float; precision mediump int; @@ -4661,7 +4661,7 @@ void main() { gl_FragColor = vec4( texture2D ( envMap, uv ).rgb, 1.0 ); } - `,blending:F,depthTest:!1,depthWrite:!1})}function jw(){return new Ka({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:lx(),fragmentShader:` + `,blending:F,depthTest:!1,depthWrite:!1})}function Ww(){return new Ka({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},flipEnvMap:{value:-1}},vertexShader:cx(),fragmentShader:` precision mediump float; precision mediump int; @@ -4677,7 +4677,7 @@ void main() { gl_FragColor = textureCube( envMap, vec3( flipEnvMap * vOutputDirection.x, vOutputDirection.yz ) ); } - `,blending:F,depthTest:!1,depthWrite:!1})}function lx(){return` + `,blending:F,depthTest:!1,depthWrite:!1})}function cx(){return` precision mediump float; precision mediump int; @@ -4732,15 +4732,15 @@ void main() { gl_Position = vec4( position, 1.0 ); } - `}function ZO(w){let r=new WeakMap,l=null;function m(I){if(I&&I.isTexture){const O=I.mapping,N=O===W||O===k,V=O===Qe||O===ne;if(N||V)if(I.isRenderTargetTexture&&I.needsPMREMUpdate===!0){I.needsPMREMUpdate=!1;let Q=r.get(I);return l===null&&(l=new ax(w)),Q=N?l.fromEquirectangular(I,Q):l.fromCubemap(I,Q),r.set(I,Q),Q.texture}else{if(r.has(I))return r.get(I).texture;{const Q=I.image;if(N&&Q&&Q.height>0||V&&Q&&y(Q)){l===null&&(l=new ax(w));const X=N?l.fromEquirectangular(I):l.fromCubemap(I);return r.set(I,X),I.addEventListener("dispose",_),X.texture}else return null}}}return I}function y(I){let O=0;const N=6;for(let V=0;Vr.maxTextureSize&&(rt=Math.ceil(Xe/r.maxTextureSize),Xe=r.maxTextureSize);const bt=new Float32Array(Xe*rt*4*ie),Gt=new yu(bt,Xe,rt,ie);Gt.type=Ei,Gt.needsUpdate=!0;const lt=Be*4;for(let wt=0;wt0)return w;const y=r*l;let _=qw[y];if(_===void 0&&(_=new Float32Array(y),qw[y]=_),r!==0){m.toArray(_,0);for(let R=1,I=0;R!==r;++R)I+=l,w[R].toArray(_,I)}return _}function us(w,r){if(w.length!==r.length)return!1;for(let l=0,m=w.length;l0||V&&Q&&y(Q)){l===null&&(l=new lx(w));const X=N?l.fromEquirectangular(I):l.fromCubemap(I);return r.set(I,X),I.addEventListener("dispose",_),X.texture}else return null}}}return I}function y(I){let O=0;const N=6;for(let V=0;Vr.maxTextureSize&&(rt=Math.ceil(Xe/r.maxTextureSize),Xe=r.maxTextureSize);const bt=new Float32Array(Xe*rt*4*ie),Gt=new yu(bt,Xe,rt,ie);Gt.type=Ei,Gt.needsUpdate=!0;const lt=Be*4;for(let wt=0;wt0)return w;const y=r*l;let _=Yw[y];if(_===void 0&&(_=new Float32Array(y),Yw[y]=_),r!==0){m.toArray(_,0);for(let R=1,I=0;R!==r;++R)I+=l,w[R].toArray(_,I)}return _}function us(w,r){if(w.length!==r.length)return!1;for(let l=0,m=w.length;l":" "} ${I}: ${l[R]}`)}return m.join(` -`)}function nF(w){const r=vr.getPrimaries(vr.workingColorSpace),l=vr.getPrimaries(w);let m;switch(r===l?m="":r===oh&&l===sh?m="LinearDisplayP3ToLinearSRGB":r===sh&&l===oh&&(m="LinearSRGBToLinearDisplayP3"),w){case pr:case ih:return[m,"LinearTransferOETF"];case Cr:case fu:return[m,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",w),[m,"LinearTransferOETF"]}}function nM(w,r,l){const m=w.getShaderParameter(r,w.COMPILE_STATUS),y=w.getShaderInfoLog(r).trim();if(m&&y==="")return"";const _=/ERROR: 0:(\d+)/.exec(y);if(_){const R=parseInt(_[1]);return l.toUpperCase()+` +`)}function nF(w){const r=vr.getPrimaries(vr.workingColorSpace),l=vr.getPrimaries(w);let m;switch(r===l?m="":r===oh&&l===sh?m="LinearDisplayP3ToLinearSRGB":r===sh&&l===oh&&(m="LinearSRGBToLinearDisplayP3"),w){case pr:case ih:return[m,"LinearTransferOETF"];case Cr:case fu:return[m,"sRGBTransferOETF"];default:return console.warn("THREE.WebGLProgram: Unsupported color space:",w),[m,"LinearTransferOETF"]}}function iM(w,r,l){const m=w.getShaderParameter(r,w.COMPILE_STATUS),y=w.getShaderInfoLog(r).trim();if(m&&y==="")return"";const _=/ERROR: 0:(\d+)/.exec(y);if(_){const R=parseInt(_[1]);return l.toUpperCase()+` `+y+` `+tF(w.getShaderSource(r),R)}else return y}function iF(w,r){const l=nF(r);return`vec4 ${w}( vec4 value ) { return ${l[0]}( ${l[1]}( value ) ); }`}function rF(w,r){let l;switch(r){case mt:l="Linear";break;case Ee:l="Reinhard";break;case _e:l="OptimizedCineon";break;case Ne:l="ACESFilmic";break;case ye:l="Custom";break;default:console.warn("THREE.WebGLProgram: Unsupported toneMapping:",r),l="Linear"}return"vec3 "+w+"( vec3 color ) { return "+l+"ToneMapping( color ); }"}function sF(w){return[w.extensionDerivatives||w.envMapCubeUVHeight||w.bumpMap||w.normalMapTangentSpace||w.clearcoatNormalMap||w.flatShading||w.shaderID==="physical"?"#extension GL_OES_standard_derivatives : enable":"",(w.extensionFragDepth||w.logarithmicDepthBuffer)&&w.rendererExtensionFragDepth?"#extension GL_EXT_frag_depth : enable":"",w.extensionDrawBuffers&&w.rendererExtensionDrawBuffers?"#extension GL_EXT_draw_buffers : require":"",(w.extensionShaderTextureLOD||w.envMap||w.transmission)&&w.rendererExtensionShaderTextureLod?"#extension GL_EXT_shader_texture_lod : enable":""].filter(zf).join(` `)}function oF(w){const r=[];for(const l in w){const m=w[l];m!==!1&&r.push("#define "+l+" "+m)}return r.join(` -`)}function aF(w,r){const l={},m=w.getProgramParameter(r,w.ACTIVE_ATTRIBUTES);for(let y=0;y/gm;function hx(w){return w.replace(lF,hF)}const cF=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function hF(w,r){let l=Wi[r];if(l===void 0){const m=cF.get(r);if(m!==void 0)l=Wi[m],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',r,m);else throw new Error("Can not resolve #include <"+r+">")}return hx(l)}const uF=/#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 sM(w){return w.replace(uF,dF)}function dF(w,r,l,m){let y="";for(let _=parseInt(r);_/gm;function ux(w){return w.replace(lF,hF)}const cF=new Map([["encodings_fragment","colorspace_fragment"],["encodings_pars_fragment","colorspace_pars_fragment"],["output_fragment","opaque_fragment"]]);function hF(w,r){let l=Wi[r];if(l===void 0){const m=cF.get(r);if(m!==void 0)l=Wi[m],console.warn('THREE.WebGLRenderer: Shader chunk "%s" has been deprecated. Use "%s" instead.',r,m);else throw new Error("Can not resolve #include <"+r+">")}return ux(l)}const uF=/#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 oM(w){return w.replace(uF,dF)}function dF(w,r,l,m){let y="";for(let _=parseInt(r);_0&&(re+=` `),q=[$,"#define SHADER_TYPE "+l.shaderType,"#define SHADER_NAME "+l.shaderName,ie].filter(zf).join(` `),q.length>0&&(q+=` -`)):(re=[oM(l),"#define SHADER_TYPE "+l.shaderType,"#define SHADER_NAME "+l.shaderName,ie,l.instancing?"#define USE_INSTANCING":"",l.instancingColor?"#define USE_INSTANCING_COLOR":"",l.useFog&&l.fog?"#define USE_FOG":"",l.useFog&&l.fogExp2?"#define FOG_EXP2":"",l.map?"#define USE_MAP":"",l.envMap?"#define USE_ENVMAP":"",l.envMap?"#define "+V:"",l.lightMap?"#define USE_LIGHTMAP":"",l.aoMap?"#define USE_AOMAP":"",l.bumpMap?"#define USE_BUMPMAP":"",l.normalMap?"#define USE_NORMALMAP":"",l.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",l.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",l.displacementMap?"#define USE_DISPLACEMENTMAP":"",l.emissiveMap?"#define USE_EMISSIVEMAP":"",l.anisotropy?"#define USE_ANISOTROPY":"",l.anisotropyMap?"#define USE_ANISOTROPYMAP":"",l.clearcoatMap?"#define USE_CLEARCOATMAP":"",l.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",l.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",l.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",l.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",l.specularMap?"#define USE_SPECULARMAP":"",l.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",l.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",l.roughnessMap?"#define USE_ROUGHNESSMAP":"",l.metalnessMap?"#define USE_METALNESSMAP":"",l.alphaMap?"#define USE_ALPHAMAP":"",l.alphaHash?"#define USE_ALPHAHASH":"",l.transmission?"#define USE_TRANSMISSION":"",l.transmissionMap?"#define USE_TRANSMISSIONMAP":"",l.thicknessMap?"#define USE_THICKNESSMAP":"",l.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",l.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",l.mapUv?"#define MAP_UV "+l.mapUv:"",l.alphaMapUv?"#define ALPHAMAP_UV "+l.alphaMapUv:"",l.lightMapUv?"#define LIGHTMAP_UV "+l.lightMapUv:"",l.aoMapUv?"#define AOMAP_UV "+l.aoMapUv:"",l.emissiveMapUv?"#define EMISSIVEMAP_UV "+l.emissiveMapUv:"",l.bumpMapUv?"#define BUMPMAP_UV "+l.bumpMapUv:"",l.normalMapUv?"#define NORMALMAP_UV "+l.normalMapUv:"",l.displacementMapUv?"#define DISPLACEMENTMAP_UV "+l.displacementMapUv:"",l.metalnessMapUv?"#define METALNESSMAP_UV "+l.metalnessMapUv:"",l.roughnessMapUv?"#define ROUGHNESSMAP_UV "+l.roughnessMapUv:"",l.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+l.anisotropyMapUv:"",l.clearcoatMapUv?"#define CLEARCOATMAP_UV "+l.clearcoatMapUv:"",l.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+l.clearcoatNormalMapUv:"",l.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+l.clearcoatRoughnessMapUv:"",l.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+l.iridescenceMapUv:"",l.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+l.iridescenceThicknessMapUv:"",l.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+l.sheenColorMapUv:"",l.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+l.sheenRoughnessMapUv:"",l.specularMapUv?"#define SPECULARMAP_UV "+l.specularMapUv:"",l.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+l.specularColorMapUv:"",l.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+l.specularIntensityMapUv:"",l.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+l.transmissionMapUv:"",l.thicknessMapUv?"#define THICKNESSMAP_UV "+l.thicknessMapUv:"",l.vertexTangents&&l.flatShading===!1?"#define USE_TANGENT":"",l.vertexColors?"#define USE_COLOR":"",l.vertexAlphas?"#define USE_COLOR_ALPHA":"",l.vertexUv1s?"#define USE_UV1":"",l.vertexUv2s?"#define USE_UV2":"",l.vertexUv3s?"#define USE_UV3":"",l.pointsUvs?"#define USE_POINTS_UV":"",l.flatShading?"#define FLAT_SHADED":"",l.skinning?"#define USE_SKINNING":"",l.morphTargets?"#define USE_MORPHTARGETS":"",l.morphNormals&&l.flatShading===!1?"#define USE_MORPHNORMALS":"",l.morphColors&&l.isWebGL2?"#define USE_MORPHCOLORS":"",l.morphTargetsCount>0&&l.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",l.morphTargetsCount>0&&l.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+l.morphTextureStride:"",l.morphTargetsCount>0&&l.isWebGL2?"#define MORPHTARGETS_COUNT "+l.morphTargetsCount:"",l.doubleSided?"#define DOUBLE_SIDED":"",l.flipSided?"#define FLIP_SIDED":"",l.shadowMapEnabled?"#define USE_SHADOWMAP":"",l.shadowMapEnabled?"#define "+O:"",l.sizeAttenuation?"#define USE_SIZEATTENUATION":"",l.numLightProbes>0?"#define USE_LIGHT_PROBES":"",l.useLegacyLights?"#define LEGACY_LIGHTS":"",l.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",l.logarithmicDepthBuffer&&l.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#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","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`)):(re=[aM(l),"#define SHADER_TYPE "+l.shaderType,"#define SHADER_NAME "+l.shaderName,ie,l.instancing?"#define USE_INSTANCING":"",l.instancingColor?"#define USE_INSTANCING_COLOR":"",l.useFog&&l.fog?"#define USE_FOG":"",l.useFog&&l.fogExp2?"#define FOG_EXP2":"",l.map?"#define USE_MAP":"",l.envMap?"#define USE_ENVMAP":"",l.envMap?"#define "+V:"",l.lightMap?"#define USE_LIGHTMAP":"",l.aoMap?"#define USE_AOMAP":"",l.bumpMap?"#define USE_BUMPMAP":"",l.normalMap?"#define USE_NORMALMAP":"",l.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",l.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",l.displacementMap?"#define USE_DISPLACEMENTMAP":"",l.emissiveMap?"#define USE_EMISSIVEMAP":"",l.anisotropy?"#define USE_ANISOTROPY":"",l.anisotropyMap?"#define USE_ANISOTROPYMAP":"",l.clearcoatMap?"#define USE_CLEARCOATMAP":"",l.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",l.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",l.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",l.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",l.specularMap?"#define USE_SPECULARMAP":"",l.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",l.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",l.roughnessMap?"#define USE_ROUGHNESSMAP":"",l.metalnessMap?"#define USE_METALNESSMAP":"",l.alphaMap?"#define USE_ALPHAMAP":"",l.alphaHash?"#define USE_ALPHAHASH":"",l.transmission?"#define USE_TRANSMISSION":"",l.transmissionMap?"#define USE_TRANSMISSIONMAP":"",l.thicknessMap?"#define USE_THICKNESSMAP":"",l.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",l.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",l.mapUv?"#define MAP_UV "+l.mapUv:"",l.alphaMapUv?"#define ALPHAMAP_UV "+l.alphaMapUv:"",l.lightMapUv?"#define LIGHTMAP_UV "+l.lightMapUv:"",l.aoMapUv?"#define AOMAP_UV "+l.aoMapUv:"",l.emissiveMapUv?"#define EMISSIVEMAP_UV "+l.emissiveMapUv:"",l.bumpMapUv?"#define BUMPMAP_UV "+l.bumpMapUv:"",l.normalMapUv?"#define NORMALMAP_UV "+l.normalMapUv:"",l.displacementMapUv?"#define DISPLACEMENTMAP_UV "+l.displacementMapUv:"",l.metalnessMapUv?"#define METALNESSMAP_UV "+l.metalnessMapUv:"",l.roughnessMapUv?"#define ROUGHNESSMAP_UV "+l.roughnessMapUv:"",l.anisotropyMapUv?"#define ANISOTROPYMAP_UV "+l.anisotropyMapUv:"",l.clearcoatMapUv?"#define CLEARCOATMAP_UV "+l.clearcoatMapUv:"",l.clearcoatNormalMapUv?"#define CLEARCOAT_NORMALMAP_UV "+l.clearcoatNormalMapUv:"",l.clearcoatRoughnessMapUv?"#define CLEARCOAT_ROUGHNESSMAP_UV "+l.clearcoatRoughnessMapUv:"",l.iridescenceMapUv?"#define IRIDESCENCEMAP_UV "+l.iridescenceMapUv:"",l.iridescenceThicknessMapUv?"#define IRIDESCENCE_THICKNESSMAP_UV "+l.iridescenceThicknessMapUv:"",l.sheenColorMapUv?"#define SHEEN_COLORMAP_UV "+l.sheenColorMapUv:"",l.sheenRoughnessMapUv?"#define SHEEN_ROUGHNESSMAP_UV "+l.sheenRoughnessMapUv:"",l.specularMapUv?"#define SPECULARMAP_UV "+l.specularMapUv:"",l.specularColorMapUv?"#define SPECULAR_COLORMAP_UV "+l.specularColorMapUv:"",l.specularIntensityMapUv?"#define SPECULAR_INTENSITYMAP_UV "+l.specularIntensityMapUv:"",l.transmissionMapUv?"#define TRANSMISSIONMAP_UV "+l.transmissionMapUv:"",l.thicknessMapUv?"#define THICKNESSMAP_UV "+l.thicknessMapUv:"",l.vertexTangents&&l.flatShading===!1?"#define USE_TANGENT":"",l.vertexColors?"#define USE_COLOR":"",l.vertexAlphas?"#define USE_COLOR_ALPHA":"",l.vertexUv1s?"#define USE_UV1":"",l.vertexUv2s?"#define USE_UV2":"",l.vertexUv3s?"#define USE_UV3":"",l.pointsUvs?"#define USE_POINTS_UV":"",l.flatShading?"#define FLAT_SHADED":"",l.skinning?"#define USE_SKINNING":"",l.morphTargets?"#define USE_MORPHTARGETS":"",l.morphNormals&&l.flatShading===!1?"#define USE_MORPHNORMALS":"",l.morphColors&&l.isWebGL2?"#define USE_MORPHCOLORS":"",l.morphTargetsCount>0&&l.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",l.morphTargetsCount>0&&l.isWebGL2?"#define MORPHTARGETS_TEXTURE_STRIDE "+l.morphTextureStride:"",l.morphTargetsCount>0&&l.isWebGL2?"#define MORPHTARGETS_COUNT "+l.morphTargetsCount:"",l.doubleSided?"#define DOUBLE_SIDED":"",l.flipSided?"#define FLIP_SIDED":"",l.shadowMapEnabled?"#define USE_SHADOWMAP":"",l.shadowMapEnabled?"#define "+O:"",l.sizeAttenuation?"#define USE_SIZEATTENUATION":"",l.numLightProbes>0?"#define USE_LIGHT_PROBES":"",l.useLegacyLights?"#define LEGACY_LIGHTS":"",l.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",l.logarithmicDepthBuffer&&l.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#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","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` `].filter(zf).join(` -`),q=[$,oM(l),"#define SHADER_TYPE "+l.shaderType,"#define SHADER_NAME "+l.shaderName,ie,l.useFog&&l.fog?"#define USE_FOG":"",l.useFog&&l.fogExp2?"#define FOG_EXP2":"",l.map?"#define USE_MAP":"",l.matcap?"#define USE_MATCAP":"",l.envMap?"#define USE_ENVMAP":"",l.envMap?"#define "+N:"",l.envMap?"#define "+V:"",l.envMap?"#define "+Q:"",X?"#define CUBEUV_TEXEL_WIDTH "+X.texelWidth:"",X?"#define CUBEUV_TEXEL_HEIGHT "+X.texelHeight:"",X?"#define CUBEUV_MAX_MIP "+X.maxMip+".0":"",l.lightMap?"#define USE_LIGHTMAP":"",l.aoMap?"#define USE_AOMAP":"",l.bumpMap?"#define USE_BUMPMAP":"",l.normalMap?"#define USE_NORMALMAP":"",l.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",l.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",l.emissiveMap?"#define USE_EMISSIVEMAP":"",l.anisotropy?"#define USE_ANISOTROPY":"",l.anisotropyMap?"#define USE_ANISOTROPYMAP":"",l.clearcoat?"#define USE_CLEARCOAT":"",l.clearcoatMap?"#define USE_CLEARCOATMAP":"",l.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",l.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",l.iridescence?"#define USE_IRIDESCENCE":"",l.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",l.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",l.specularMap?"#define USE_SPECULARMAP":"",l.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",l.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",l.roughnessMap?"#define USE_ROUGHNESSMAP":"",l.metalnessMap?"#define USE_METALNESSMAP":"",l.alphaMap?"#define USE_ALPHAMAP":"",l.alphaTest?"#define USE_ALPHATEST":"",l.alphaHash?"#define USE_ALPHAHASH":"",l.sheen?"#define USE_SHEEN":"",l.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",l.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",l.transmission?"#define USE_TRANSMISSION":"",l.transmissionMap?"#define USE_TRANSMISSIONMAP":"",l.thicknessMap?"#define USE_THICKNESSMAP":"",l.vertexTangents&&l.flatShading===!1?"#define USE_TANGENT":"",l.vertexColors||l.instancingColor?"#define USE_COLOR":"",l.vertexAlphas?"#define USE_COLOR_ALPHA":"",l.vertexUv1s?"#define USE_UV1":"",l.vertexUv2s?"#define USE_UV2":"",l.vertexUv3s?"#define USE_UV3":"",l.pointsUvs?"#define USE_POINTS_UV":"",l.gradientMap?"#define USE_GRADIENTMAP":"",l.flatShading?"#define FLAT_SHADED":"",l.doubleSided?"#define DOUBLE_SIDED":"",l.flipSided?"#define FLIP_SIDED":"",l.shadowMapEnabled?"#define USE_SHADOWMAP":"",l.shadowMapEnabled?"#define "+O:"",l.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",l.numLightProbes>0?"#define USE_LIGHT_PROBES":"",l.useLegacyLights?"#define LEGACY_LIGHTS":"",l.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",l.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",l.logarithmicDepthBuffer&&l.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",l.toneMapping!==fn?"#define TONE_MAPPING":"",l.toneMapping!==fn?Wi.tonemapping_pars_fragment:"",l.toneMapping!==fn?rF("toneMapping",l.toneMapping):"",l.dithering?"#define DITHERING":"",l.opaque?"#define OPAQUE":"",Wi.colorspace_pars_fragment,iF("linearToOutputTexel",l.outputColorSpace),l.useDepthPacking?"#define DEPTH_PACKING "+l.depthPacking:"",` +`),q=[$,aM(l),"#define SHADER_TYPE "+l.shaderType,"#define SHADER_NAME "+l.shaderName,ie,l.useFog&&l.fog?"#define USE_FOG":"",l.useFog&&l.fogExp2?"#define FOG_EXP2":"",l.map?"#define USE_MAP":"",l.matcap?"#define USE_MATCAP":"",l.envMap?"#define USE_ENVMAP":"",l.envMap?"#define "+N:"",l.envMap?"#define "+V:"",l.envMap?"#define "+Q:"",X?"#define CUBEUV_TEXEL_WIDTH "+X.texelWidth:"",X?"#define CUBEUV_TEXEL_HEIGHT "+X.texelHeight:"",X?"#define CUBEUV_MAX_MIP "+X.maxMip+".0":"",l.lightMap?"#define USE_LIGHTMAP":"",l.aoMap?"#define USE_AOMAP":"",l.bumpMap?"#define USE_BUMPMAP":"",l.normalMap?"#define USE_NORMALMAP":"",l.normalMapObjectSpace?"#define USE_NORMALMAP_OBJECTSPACE":"",l.normalMapTangentSpace?"#define USE_NORMALMAP_TANGENTSPACE":"",l.emissiveMap?"#define USE_EMISSIVEMAP":"",l.anisotropy?"#define USE_ANISOTROPY":"",l.anisotropyMap?"#define USE_ANISOTROPYMAP":"",l.clearcoat?"#define USE_CLEARCOAT":"",l.clearcoatMap?"#define USE_CLEARCOATMAP":"",l.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",l.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",l.iridescence?"#define USE_IRIDESCENCE":"",l.iridescenceMap?"#define USE_IRIDESCENCEMAP":"",l.iridescenceThicknessMap?"#define USE_IRIDESCENCE_THICKNESSMAP":"",l.specularMap?"#define USE_SPECULARMAP":"",l.specularColorMap?"#define USE_SPECULAR_COLORMAP":"",l.specularIntensityMap?"#define USE_SPECULAR_INTENSITYMAP":"",l.roughnessMap?"#define USE_ROUGHNESSMAP":"",l.metalnessMap?"#define USE_METALNESSMAP":"",l.alphaMap?"#define USE_ALPHAMAP":"",l.alphaTest?"#define USE_ALPHATEST":"",l.alphaHash?"#define USE_ALPHAHASH":"",l.sheen?"#define USE_SHEEN":"",l.sheenColorMap?"#define USE_SHEEN_COLORMAP":"",l.sheenRoughnessMap?"#define USE_SHEEN_ROUGHNESSMAP":"",l.transmission?"#define USE_TRANSMISSION":"",l.transmissionMap?"#define USE_TRANSMISSIONMAP":"",l.thicknessMap?"#define USE_THICKNESSMAP":"",l.vertexTangents&&l.flatShading===!1?"#define USE_TANGENT":"",l.vertexColors||l.instancingColor?"#define USE_COLOR":"",l.vertexAlphas?"#define USE_COLOR_ALPHA":"",l.vertexUv1s?"#define USE_UV1":"",l.vertexUv2s?"#define USE_UV2":"",l.vertexUv3s?"#define USE_UV3":"",l.pointsUvs?"#define USE_POINTS_UV":"",l.gradientMap?"#define USE_GRADIENTMAP":"",l.flatShading?"#define FLAT_SHADED":"",l.doubleSided?"#define DOUBLE_SIDED":"",l.flipSided?"#define FLIP_SIDED":"",l.shadowMapEnabled?"#define USE_SHADOWMAP":"",l.shadowMapEnabled?"#define "+O:"",l.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",l.numLightProbes>0?"#define USE_LIGHT_PROBES":"",l.useLegacyLights?"#define LEGACY_LIGHTS":"",l.decodeVideoTexture?"#define DECODE_VIDEO_TEXTURE":"",l.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",l.logarithmicDepthBuffer&&l.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",l.toneMapping!==fn?"#define TONE_MAPPING":"",l.toneMapping!==fn?Wi.tonemapping_pars_fragment:"",l.toneMapping!==fn?rF("toneMapping",l.toneMapping):"",l.dithering?"#define DITHERING":"",l.opaque?"#define OPAQUE":"",Wi.colorspace_pars_fragment,iF("linearToOutputTexel",l.outputColorSpace),l.useDepthPacking?"#define DEPTH_PACKING "+l.depthPacking:"",` `].filter(zf).join(` -`)),R=hx(R),R=iM(R,l),R=rM(R,l),I=hx(I),I=iM(I,l),I=rM(I,l),R=sM(R),I=sM(I),l.isWebGL2&&l.isRawShaderMaterial!==!0&&(Se=`#version 300 es +`)),R=ux(R),R=rM(R,l),R=sM(R,l),I=ux(I),I=rM(I,l),I=sM(I,l),R=oM(R),I=oM(I),l.isWebGL2&&l.isRawShaderMaterial!==!0&&(Se=`#version 300 es `,re=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` `)+` `+re,q=["precision mediump sampler2DArray;","#define varying in",l.glslVersion===Cf?"":"layout(location = 0) out highp vec4 pc_fragColor;",l.glslVersion===Cf?"":"#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(` @@ -4765,11 +4765,11 @@ precision `+w.precision+" int;";return w.precision==="highp"?r+=` `)),q=["#extension GL_OVR_multiview : require","#define VIEW_ID gl_ViewID_OVR"].join(` `)+` `+q,q=q.replace("uniform mat4 viewMatrix;",["uniform mat4 viewMatrices["+fe+"];","#define viewMatrix viewMatrices[VIEW_ID]"].join(` -`))));const Me=Se+re+R,ze=Se+q+I,He=tM(y,y.VERTEX_SHADER,Me),et=tM(y,y.FRAGMENT_SHADER,ze);y.attachShader(ue,He),y.attachShader(ue,et),l.index0AttributeName!==void 0?y.bindAttribLocation(ue,0,l.index0AttributeName):l.morphTargets===!0&&y.bindAttribLocation(ue,0,"position"),y.linkProgram(ue);function st(bt){if(w.debug.checkShaderErrors){const Gt=y.getProgramInfoLog(ue).trim(),lt=y.getShaderInfoLog(He).trim(),wt=y.getShaderInfoLog(et).trim();let Kt=!0,qt=!0;if(y.getProgramParameter(ue,y.LINK_STATUS)===!1)if(Kt=!1,typeof w.debug.onShaderError=="function")w.debug.onShaderError(y,ue,He,et);else{const ln=nM(y,He,"vertex"),Jt=nM(y,et,"fragment");console.error("THREE.WebGLProgram: Shader Error "+y.getError()+" - VALIDATE_STATUS "+y.getProgramParameter(ue,y.VALIDATE_STATUS)+` +`))));const Me=Se+re+R,ze=Se+q+I,He=nM(y,y.VERTEX_SHADER,Me),et=nM(y,y.FRAGMENT_SHADER,ze);y.attachShader(ue,He),y.attachShader(ue,et),l.index0AttributeName!==void 0?y.bindAttribLocation(ue,0,l.index0AttributeName):l.morphTargets===!0&&y.bindAttribLocation(ue,0,"position"),y.linkProgram(ue);function st(bt){if(w.debug.checkShaderErrors){const Gt=y.getProgramInfoLog(ue).trim(),lt=y.getShaderInfoLog(He).trim(),wt=y.getShaderInfoLog(et).trim();let Kt=!0,qt=!0;if(y.getProgramParameter(ue,y.LINK_STATUS)===!1)if(Kt=!1,typeof w.debug.onShaderError=="function")w.debug.onShaderError(y,ue,He,et);else{const ln=iM(y,He,"vertex"),Jt=iM(y,et,"fragment");console.error("THREE.WebGLProgram: Shader Error "+y.getError()+" - VALIDATE_STATUS "+y.getProgramParameter(ue,y.VALIDATE_STATUS)+` Program Info Log: `+Gt+` `+ln+` -`+Jt)}else Gt!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Gt):(lt===""||wt==="")&&(qt=!1);qt&&(bt.diagnostics={runnable:Kt,programLog:Gt,vertexShader:{log:lt,prefix:re},fragmentShader:{log:wt,prefix:q}})}y.deleteShader(He),y.deleteShader(et),Be=new vg(y,ue),Xe=aF(y,ue)}let Be;this.getUniforms=function(){return Be===void 0&&st(this),Be};let Xe;this.getAttributes=function(){return Xe===void 0&&st(this),Xe};let rt=l.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return rt===!1&&(rt=y.getProgramParameter(ue,Z4)),rt},this.destroy=function(){m.releaseStatesOfProgram(this),y.deleteProgram(ue),this.program=void 0},this.type=l.shaderType,this.name=l.shaderName,this.id=eF++,this.cacheKey=r,this.usedTimes=1,this.program=ue,this.vertexShader=He,this.fragmentShader=et,this.numMultiviewViews=fe,this}let yF=0;class xF{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(r){const l=r.vertexShader,m=r.fragmentShader,y=this._getShaderStage(l),_=this._getShaderStage(m),R=this._getShaderCacheForMaterial(r);return R.has(y)===!1&&(R.add(y),y.usedTimes++),R.has(_)===!1&&(R.add(_),_.usedTimes++),this}remove(r){const l=this.materialCache.get(r);for(const m of l)m.usedTimes--,m.usedTimes===0&&this.shaderCache.delete(m.code);return this.materialCache.delete(r),this}getVertexShaderID(r){return this._getShaderStage(r.vertexShader).id}getFragmentShaderID(r){return this._getShaderStage(r.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(r){const l=this.materialCache;let m=l.get(r);return m===void 0&&(m=new Set,l.set(r,m)),m}_getShaderStage(r){const l=this.shaderCache;let m=l.get(r);return m===void 0&&(m=new EF(r),l.set(r,m)),m}}class EF{constructor(r){this.id=yF++,this.code=r,this.usedTimes=0}}function bF(w,r,l,m,y,_,R){const I=new Jm,O=new xF,N=[],V=y.isWebGL2,Q=y.logarithmicDepthBuffer,X=y.vertexTextures;let $=y.precision;const ie={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 ue(Be){return Be===0?"uv":`uv${Be}`}function re(Be,Xe,rt,bt,Gt){const lt=bt.fog,wt=Gt.geometry,Kt=Be.isMeshStandardMaterial?bt.environment:null,qt=(Be.isMeshStandardMaterial?l:r).get(Be.envMap||Kt),ln=qt&&qt.mapping===he?qt.image.height:null,Jt=ie[Be.type];Be.precision!==null&&($=y.getMaxPrecision(Be.precision),$!==Be.precision&&console.warn("THREE.WebGLProgram.getParameters:",Be.precision,"not supported, using",$,"instead."));const pn=wt.morphAttributes.position||wt.morphAttributes.normal||wt.morphAttributes.color,dn=pn!==void 0?pn.length:0;let Qn=0;wt.morphAttributes.position!==void 0&&(Qn=1),wt.morphAttributes.normal!==void 0&&(Qn=2),wt.morphAttributes.color!==void 0&&(Qn=3);let Qi,ki,Ht,Sn;if(Jt){const En=fa[Jt];Qi=En.vertexShader,ki=En.fragmentShader}else Qi=Be.vertexShader,ki=Be.fragmentShader,O.update(Be),Ht=O.getVertexShaderID(Be),Sn=O.getFragmentShaderID(Be);const _n=w.getRenderTarget(),wi=_n&&_n.isWebGLMultiviewRenderTarget?_n.numViews:0,ei=Gt.isInstancedMesh===!0,ii=!!Be.map,yi=!!Be.matcap,nn=!!qt,ct=!!Be.aoMap,hn=!!Be.lightMap,In=!!Be.bumpMap,rn=!!Be.normalMap,Gn=!!Be.displacementMap,mi=!!Be.emissiveMap,ti=!!Be.metalnessMap,gi=!!Be.roughnessMap,ir=Be.anisotropy>0,Lr=Be.clearcoat>0,fs=Be.iridescence>0,br=Be.sheen>0,gr=Be.transmission>0,$r=ir&&!!Be.anisotropyMap,Mo=Lr&&!!Be.clearcoatMap,qe=Lr&&!!Be.clearcoatNormalMap,Ie=Lr&&!!Be.clearcoatRoughnessMap,St=fs&&!!Be.iridescenceMap,an=fs&&!!Be.iridescenceThicknessMap,un=br&&!!Be.sheenColorMap,cn=br&&!!Be.sheenRoughnessMap,hi=!!Be.specularMap,zn=!!Be.specularColorMap,Yn=!!Be.specularIntensityMap,Ai=gr&&!!Be.transmissionMap,sr=gr&&!!Be.thicknessMap,wn=!!Be.gradientMap,Ur=!!Be.alphaMap,ot=Be.alphaTest>0,xn=!!Be.alphaHash,tn=!!Be.extensions,An=!!wt.attributes.uv1,kn=!!wt.attributes.uv2,Di=!!wt.attributes.uv3;let $i=fn;return Be.toneMapped&&(_n===null||_n.isXRRenderTarget===!0)&&($i=w.toneMapping),{isWebGL2:V,shaderID:Jt,shaderType:Be.type,shaderName:Be.name,vertexShader:Qi,fragmentShader:ki,defines:Be.defines,customVertexShaderID:Ht,customFragmentShaderID:Sn,isRawShaderMaterial:Be.isRawShaderMaterial===!0,glslVersion:Be.glslVersion,precision:$,instancing:ei,instancingColor:ei&&Gt.instanceColor!==null,supportsVertexTextures:X,numMultiviewViews:wi,outputColorSpace:_n===null?w.outputColorSpace:_n.isXRRenderTarget===!0?_n.texture.colorSpace:pr,map:ii,matcap:yi,envMap:nn,envMapMode:nn&&qt.mapping,envMapCubeUVHeight:ln,aoMap:ct,lightMap:hn,bumpMap:In,normalMap:rn,displacementMap:X&&Gn,emissiveMap:mi,normalMapObjectSpace:rn&&Be.normalMapType===ja,normalMapTangentSpace:rn&&Be.normalMapType===ks,metalnessMap:ti,roughnessMap:gi,anisotropy:ir,anisotropyMap:$r,clearcoat:Lr,clearcoatMap:Mo,clearcoatNormalMap:qe,clearcoatRoughnessMap:Ie,iridescence:fs,iridescenceMap:St,iridescenceThicknessMap:an,sheen:br,sheenColorMap:un,sheenRoughnessMap:cn,specularMap:hi,specularColorMap:zn,specularIntensityMap:Yn,transmission:gr,transmissionMap:Ai,thicknessMap:sr,gradientMap:wn,opaque:Be.transparent===!1&&Be.blending===D,alphaMap:Ur,alphaTest:ot,alphaHash:xn,combine:Be.combine,mapUv:ii&&ue(Be.map.channel),aoMapUv:ct&&ue(Be.aoMap.channel),lightMapUv:hn&&ue(Be.lightMap.channel),bumpMapUv:In&&ue(Be.bumpMap.channel),normalMapUv:rn&&ue(Be.normalMap.channel),displacementMapUv:Gn&&ue(Be.displacementMap.channel),emissiveMapUv:mi&&ue(Be.emissiveMap.channel),metalnessMapUv:ti&&ue(Be.metalnessMap.channel),roughnessMapUv:gi&&ue(Be.roughnessMap.channel),anisotropyMapUv:$r&&ue(Be.anisotropyMap.channel),clearcoatMapUv:Mo&&ue(Be.clearcoatMap.channel),clearcoatNormalMapUv:qe&&ue(Be.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ie&&ue(Be.clearcoatRoughnessMap.channel),iridescenceMapUv:St&&ue(Be.iridescenceMap.channel),iridescenceThicknessMapUv:an&&ue(Be.iridescenceThicknessMap.channel),sheenColorMapUv:un&&ue(Be.sheenColorMap.channel),sheenRoughnessMapUv:cn&&ue(Be.sheenRoughnessMap.channel),specularMapUv:hi&&ue(Be.specularMap.channel),specularColorMapUv:zn&&ue(Be.specularColorMap.channel),specularIntensityMapUv:Yn&&ue(Be.specularIntensityMap.channel),transmissionMapUv:Ai&&ue(Be.transmissionMap.channel),thicknessMapUv:sr&&ue(Be.thicknessMap.channel),alphaMapUv:Ur&&ue(Be.alphaMap.channel),vertexTangents:!!wt.attributes.tangent&&(rn||ir),vertexColors:Be.vertexColors,vertexAlphas:Be.vertexColors===!0&&!!wt.attributes.color&&wt.attributes.color.itemSize===4,vertexUv1s:An,vertexUv2s:kn,vertexUv3s:Di,pointsUvs:Gt.isPoints===!0&&!!wt.attributes.uv&&(ii||Ur),fog:!!lt,useFog:Be.fog===!0,fogExp2:lt&<.isFogExp2,flatShading:Be.flatShading===!0,sizeAttenuation:Be.sizeAttenuation===!0,logarithmicDepthBuffer:Q,skinning:Gt.isSkinnedMesh===!0,morphTargets:wt.morphAttributes.position!==void 0,morphNormals:wt.morphAttributes.normal!==void 0,morphColors:wt.morphAttributes.color!==void 0,morphTargetsCount:dn,morphTextureStride:Qn,numDirLights:Xe.directional.length,numPointLights:Xe.point.length,numSpotLights:Xe.spot.length,numSpotLightMaps:Xe.spotLightMap.length,numRectAreaLights:Xe.rectArea.length,numHemiLights:Xe.hemi.length,numDirLightShadows:Xe.directionalShadowMap.length,numPointLightShadows:Xe.pointShadowMap.length,numSpotLightShadows:Xe.spotShadowMap.length,numSpotLightShadowsWithMaps:Xe.numSpotLightShadowsWithMaps,numLightProbes:Xe.numLightProbes,numClippingPlanes:R.numPlanes,numClipIntersection:R.numIntersection,dithering:Be.dithering,shadowMapEnabled:w.shadowMap.enabled&&rt.length>0,shadowMapType:w.shadowMap.type,toneMapping:$i,useLegacyLights:w._useLegacyLights,decodeVideoTexture:ii&&Be.map.isVideoTexture===!0&&vr.getTransfer(Be.map.colorSpace)===wr,premultipliedAlpha:Be.premultipliedAlpha,doubleSided:Be.side===L,flipSided:Be.side===T,useDepthPacking:Be.depthPacking>=0,depthPacking:Be.depthPacking||0,index0AttributeName:Be.index0AttributeName,extensionDerivatives:tn&&Be.extensions.derivatives===!0,extensionFragDepth:tn&&Be.extensions.fragDepth===!0,extensionDrawBuffers:tn&&Be.extensions.drawBuffers===!0,extensionShaderTextureLOD:tn&&Be.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:V||m.has("EXT_frag_depth"),rendererExtensionDrawBuffers:V||m.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:V||m.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:m.has("KHR_parallel_shader_compile"),customProgramCacheKey:Be.customProgramCacheKey()}}function q(Be){const Xe=[];if(Be.shaderID?Xe.push(Be.shaderID):(Xe.push(Be.customVertexShaderID),Xe.push(Be.customFragmentShaderID)),Be.defines!==void 0)for(const rt in Be.defines)Xe.push(rt),Xe.push(Be.defines[rt]);return Be.isRawShaderMaterial===!1&&(Se(Xe,Be),fe(Xe,Be),Xe.push(w.outputColorSpace)),Xe.push(Be.customProgramCacheKey),Xe.join()}function Se(Be,Xe){Be.push(Xe.precision),Be.push(Xe.outputColorSpace),Be.push(Xe.envMapMode),Be.push(Xe.envMapCubeUVHeight),Be.push(Xe.mapUv),Be.push(Xe.alphaMapUv),Be.push(Xe.lightMapUv),Be.push(Xe.aoMapUv),Be.push(Xe.bumpMapUv),Be.push(Xe.normalMapUv),Be.push(Xe.displacementMapUv),Be.push(Xe.emissiveMapUv),Be.push(Xe.metalnessMapUv),Be.push(Xe.roughnessMapUv),Be.push(Xe.anisotropyMapUv),Be.push(Xe.clearcoatMapUv),Be.push(Xe.clearcoatNormalMapUv),Be.push(Xe.clearcoatRoughnessMapUv),Be.push(Xe.iridescenceMapUv),Be.push(Xe.iridescenceThicknessMapUv),Be.push(Xe.sheenColorMapUv),Be.push(Xe.sheenRoughnessMapUv),Be.push(Xe.specularMapUv),Be.push(Xe.specularColorMapUv),Be.push(Xe.specularIntensityMapUv),Be.push(Xe.transmissionMapUv),Be.push(Xe.thicknessMapUv),Be.push(Xe.combine),Be.push(Xe.fogExp2),Be.push(Xe.sizeAttenuation),Be.push(Xe.morphTargetsCount),Be.push(Xe.morphAttributeCount),Be.push(Xe.numDirLights),Be.push(Xe.numPointLights),Be.push(Xe.numSpotLights),Be.push(Xe.numSpotLightMaps),Be.push(Xe.numHemiLights),Be.push(Xe.numRectAreaLights),Be.push(Xe.numDirLightShadows),Be.push(Xe.numPointLightShadows),Be.push(Xe.numSpotLightShadows),Be.push(Xe.numSpotLightShadowsWithMaps),Be.push(Xe.numLightProbes),Be.push(Xe.shadowMapType),Be.push(Xe.toneMapping),Be.push(Xe.numClippingPlanes),Be.push(Xe.numClipIntersection),Be.push(Xe.depthPacking)}function fe(Be,Xe){I.disableAll(),Xe.isWebGL2&&I.enable(0),Xe.supportsVertexTextures&&I.enable(1),Xe.instancing&&I.enable(2),Xe.instancingColor&&I.enable(3),Xe.matcap&&I.enable(4),Xe.envMap&&I.enable(5),Xe.normalMapObjectSpace&&I.enable(6),Xe.normalMapTangentSpace&&I.enable(7),Xe.clearcoat&&I.enable(8),Xe.iridescence&&I.enable(9),Xe.alphaTest&&I.enable(10),Xe.vertexColors&&I.enable(11),Xe.vertexAlphas&&I.enable(12),Xe.vertexUv1s&&I.enable(13),Xe.vertexUv2s&&I.enable(14),Xe.vertexUv3s&&I.enable(15),Xe.vertexTangents&&I.enable(16),Xe.anisotropy&&I.enable(17),Xe.alphaHash&&I.enable(18),Be.push(I.mask),I.disableAll(),Xe.fog&&I.enable(0),Xe.useFog&&I.enable(1),Xe.flatShading&&I.enable(2),Xe.logarithmicDepthBuffer&&I.enable(3),Xe.skinning&&I.enable(4),Xe.morphTargets&&I.enable(5),Xe.morphNormals&&I.enable(6),Xe.morphColors&&I.enable(7),Xe.premultipliedAlpha&&I.enable(8),Xe.shadowMapEnabled&&I.enable(9),Xe.useLegacyLights&&I.enable(10),Xe.doubleSided&&I.enable(11),Xe.flipSided&&I.enable(12),Xe.useDepthPacking&&I.enable(13),Xe.dithering&&I.enable(14),Xe.transmission&&I.enable(15),Xe.sheen&&I.enable(16),Xe.opaque&&I.enable(17),Xe.pointsUvs&&I.enable(18),Xe.decodeVideoTexture&&I.enable(19),Xe.numMultiviewViews&&I.enable(20),Be.push(I.mask)}function Me(Be){const Xe=ie[Be.type];let rt;if(Xe){const bt=fa[Xe];rt=Fw.clone(bt.uniforms)}else rt=Be.uniforms;return rt}function ze(Be,Xe){let rt;for(let bt=0,Gt=N.length;bt0?m.push(q):$.transparent===!0?y.push(q):l.push(q)}function O(Q,X,$,ie,ue,re){const q=R(Q,X,$,ie,ue,re);$.transmission>0?m.unshift(q):$.transparent===!0?y.unshift(q):l.unshift(q)}function N(Q,X){l.length>1&&l.sort(Q||wF),m.length>1&&m.sort(X||aM),y.length>1&&y.sort(X||aM)}function V(){for(let Q=r,X=w.length;Q=_.length?(R=new lM,_.push(R)):R=_[y],R}function l(){w=new WeakMap}return{get:r,dispose:l}}function CF(){const w={};return{get:function(r){if(w[r.id]!==void 0)return w[r.id];let l;switch(r.type){case"DirectionalLight":l={direction:new je,color:new Hn};break;case"SpotLight":l={position:new je,direction:new je,color:new Hn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":l={position:new je,color:new Hn,distance:0,decay:0};break;case"HemisphereLight":l={direction:new je,skyColor:new Hn,groundColor:new Hn};break;case"RectAreaLight":l={color:new Hn,position:new je,halfWidth:new je,halfHeight:new je};break}return w[r.id]=l,l}}}function SF(){const w={};return{get:function(r){if(w[r.id]!==void 0)return w[r.id];let l;switch(r.type){case"DirectionalLight":l={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new en};break;case"SpotLight":l={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new en};break;case"PointLight":l={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new en,shadowCameraNear:1,shadowCameraFar:1e3};break}return w[r.id]=l,l}}}let TF=0;function RF(w,r){return(r.castShadow?2:0)-(w.castShadow?2:0)+(r.map?1:0)-(w.map?1:0)}function IF(w,r){const l=new CF,m=SF(),y={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 V=0;V<9;V++)y.probe.push(new je);const _=new je,R=new _i,I=new _i;function O(V,Q){let X=0,$=0,ie=0;for(let bt=0;bt<9;bt++)y.probe[bt].set(0,0,0);let ue=0,re=0,q=0,Se=0,fe=0,Me=0,ze=0,He=0,et=0,st=0,Be=0;V.sort(RF);const Xe=Q===!0?Math.PI:1;for(let bt=0,Gt=V.length;bt0&&(r.isWebGL2||w.has("OES_texture_float_linear")===!0?(y.rectAreaLTC1=Un.LTC_FLOAT_1,y.rectAreaLTC2=Un.LTC_FLOAT_2):w.has("OES_texture_half_float_linear")===!0?(y.rectAreaLTC1=Un.LTC_HALF_1,y.rectAreaLTC2=Un.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),y.ambient[0]=X,y.ambient[1]=$,y.ambient[2]=ie;const rt=y.hash;(rt.directionalLength!==ue||rt.pointLength!==re||rt.spotLength!==q||rt.rectAreaLength!==Se||rt.hemiLength!==fe||rt.numDirectionalShadows!==Me||rt.numPointShadows!==ze||rt.numSpotShadows!==He||rt.numSpotMaps!==et||rt.numLightProbes!==Be)&&(y.directional.length=ue,y.spot.length=q,y.rectArea.length=Se,y.point.length=re,y.hemi.length=fe,y.directionalShadow.length=Me,y.directionalShadowMap.length=Me,y.pointShadow.length=ze,y.pointShadowMap.length=ze,y.spotShadow.length=He,y.spotShadowMap.length=He,y.directionalShadowMatrix.length=Me,y.pointShadowMatrix.length=ze,y.spotLightMatrix.length=He+et-st,y.spotLightMap.length=et,y.numSpotLightShadowsWithMaps=st,y.numLightProbes=Be,rt.directionalLength=ue,rt.pointLength=re,rt.spotLength=q,rt.rectAreaLength=Se,rt.hemiLength=fe,rt.numDirectionalShadows=Me,rt.numPointShadows=ze,rt.numSpotShadows=He,rt.numSpotMaps=et,rt.numLightProbes=Be,y.version=TF++)}function N(V,Q){let X=0,$=0,ie=0,ue=0,re=0;const q=Q.matrixWorldInverse;for(let Se=0,fe=V.length;Se=I.length?(O=new cM(w,r),I.push(O)):O=I[R],O}function y(){l=new WeakMap}return{get:m,dispose:y}}class ux extends js{constructor(r){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=qo,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(r)}copy(r){return super.copy(r),this.depthPacking=r.depthPacking,this.map=r.map,this.alphaMap=r.alphaMap,this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this}}class dx extends js{constructor(r){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(r)}copy(r){return super.copy(r),this.map=r.map,this.alphaMap=r.alphaMap,this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this}}const LF=`void main() { +`+Jt)}else Gt!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Gt):(lt===""||wt==="")&&(qt=!1);qt&&(bt.diagnostics={runnable:Kt,programLog:Gt,vertexShader:{log:lt,prefix:re},fragmentShader:{log:wt,prefix:q}})}y.deleteShader(He),y.deleteShader(et),Be=new vg(y,ue),Xe=aF(y,ue)}let Be;this.getUniforms=function(){return Be===void 0&&st(this),Be};let Xe;this.getAttributes=function(){return Xe===void 0&&st(this),Xe};let rt=l.rendererExtensionParallelShaderCompile===!1;return this.isReady=function(){return rt===!1&&(rt=y.getProgramParameter(ue,Z4)),rt},this.destroy=function(){m.releaseStatesOfProgram(this),y.deleteProgram(ue),this.program=void 0},this.type=l.shaderType,this.name=l.shaderName,this.id=eF++,this.cacheKey=r,this.usedTimes=1,this.program=ue,this.vertexShader=He,this.fragmentShader=et,this.numMultiviewViews=fe,this}let yF=0;class xF{constructor(){this.shaderCache=new Map,this.materialCache=new Map}update(r){const l=r.vertexShader,m=r.fragmentShader,y=this._getShaderStage(l),_=this._getShaderStage(m),R=this._getShaderCacheForMaterial(r);return R.has(y)===!1&&(R.add(y),y.usedTimes++),R.has(_)===!1&&(R.add(_),_.usedTimes++),this}remove(r){const l=this.materialCache.get(r);for(const m of l)m.usedTimes--,m.usedTimes===0&&this.shaderCache.delete(m.code);return this.materialCache.delete(r),this}getVertexShaderID(r){return this._getShaderStage(r.vertexShader).id}getFragmentShaderID(r){return this._getShaderStage(r.fragmentShader).id}dispose(){this.shaderCache.clear(),this.materialCache.clear()}_getShaderCacheForMaterial(r){const l=this.materialCache;let m=l.get(r);return m===void 0&&(m=new Set,l.set(r,m)),m}_getShaderStage(r){const l=this.shaderCache;let m=l.get(r);return m===void 0&&(m=new EF(r),l.set(r,m)),m}}class EF{constructor(r){this.id=yF++,this.code=r,this.usedTimes=0}}function bF(w,r,l,m,y,_,R){const I=new Jm,O=new xF,N=[],V=y.isWebGL2,Q=y.logarithmicDepthBuffer,X=y.vertexTextures;let $=y.precision;const ie={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 ue(Be){return Be===0?"uv":`uv${Be}`}function re(Be,Xe,rt,bt,Gt){const lt=bt.fog,wt=Gt.geometry,Kt=Be.isMeshStandardMaterial?bt.environment:null,qt=(Be.isMeshStandardMaterial?l:r).get(Be.envMap||Kt),ln=qt&&qt.mapping===he?qt.image.height:null,Jt=ie[Be.type];Be.precision!==null&&($=y.getMaxPrecision(Be.precision),$!==Be.precision&&console.warn("THREE.WebGLProgram.getParameters:",Be.precision,"not supported, using",$,"instead."));const pn=wt.morphAttributes.position||wt.morphAttributes.normal||wt.morphAttributes.color,dn=pn!==void 0?pn.length:0;let Qn=0;wt.morphAttributes.position!==void 0&&(Qn=1),wt.morphAttributes.normal!==void 0&&(Qn=2),wt.morphAttributes.color!==void 0&&(Qn=3);let Qi,ki,Ht,Sn;if(Jt){const En=fa[Jt];Qi=En.vertexShader,ki=En.fragmentShader}else Qi=Be.vertexShader,ki=Be.fragmentShader,O.update(Be),Ht=O.getVertexShaderID(Be),Sn=O.getFragmentShaderID(Be);const _n=w.getRenderTarget(),wi=_n&&_n.isWebGLMultiviewRenderTarget?_n.numViews:0,ei=Gt.isInstancedMesh===!0,ii=!!Be.map,yi=!!Be.matcap,nn=!!qt,ct=!!Be.aoMap,hn=!!Be.lightMap,In=!!Be.bumpMap,rn=!!Be.normalMap,Gn=!!Be.displacementMap,mi=!!Be.emissiveMap,ti=!!Be.metalnessMap,gi=!!Be.roughnessMap,ir=Be.anisotropy>0,Lr=Be.clearcoat>0,fs=Be.iridescence>0,br=Be.sheen>0,gr=Be.transmission>0,$r=ir&&!!Be.anisotropyMap,Mo=Lr&&!!Be.clearcoatMap,qe=Lr&&!!Be.clearcoatNormalMap,Ie=Lr&&!!Be.clearcoatRoughnessMap,St=fs&&!!Be.iridescenceMap,an=fs&&!!Be.iridescenceThicknessMap,un=br&&!!Be.sheenColorMap,cn=br&&!!Be.sheenRoughnessMap,hi=!!Be.specularMap,zn=!!Be.specularColorMap,Yn=!!Be.specularIntensityMap,Ai=gr&&!!Be.transmissionMap,sr=gr&&!!Be.thicknessMap,wn=!!Be.gradientMap,Ur=!!Be.alphaMap,ot=Be.alphaTest>0,xn=!!Be.alphaHash,tn=!!Be.extensions,An=!!wt.attributes.uv1,kn=!!wt.attributes.uv2,Di=!!wt.attributes.uv3;let $i=fn;return Be.toneMapped&&(_n===null||_n.isXRRenderTarget===!0)&&($i=w.toneMapping),{isWebGL2:V,shaderID:Jt,shaderType:Be.type,shaderName:Be.name,vertexShader:Qi,fragmentShader:ki,defines:Be.defines,customVertexShaderID:Ht,customFragmentShaderID:Sn,isRawShaderMaterial:Be.isRawShaderMaterial===!0,glslVersion:Be.glslVersion,precision:$,instancing:ei,instancingColor:ei&&Gt.instanceColor!==null,supportsVertexTextures:X,numMultiviewViews:wi,outputColorSpace:_n===null?w.outputColorSpace:_n.isXRRenderTarget===!0?_n.texture.colorSpace:pr,map:ii,matcap:yi,envMap:nn,envMapMode:nn&&qt.mapping,envMapCubeUVHeight:ln,aoMap:ct,lightMap:hn,bumpMap:In,normalMap:rn,displacementMap:X&&Gn,emissiveMap:mi,normalMapObjectSpace:rn&&Be.normalMapType===ja,normalMapTangentSpace:rn&&Be.normalMapType===ks,metalnessMap:ti,roughnessMap:gi,anisotropy:ir,anisotropyMap:$r,clearcoat:Lr,clearcoatMap:Mo,clearcoatNormalMap:qe,clearcoatRoughnessMap:Ie,iridescence:fs,iridescenceMap:St,iridescenceThicknessMap:an,sheen:br,sheenColorMap:un,sheenRoughnessMap:cn,specularMap:hi,specularColorMap:zn,specularIntensityMap:Yn,transmission:gr,transmissionMap:Ai,thicknessMap:sr,gradientMap:wn,opaque:Be.transparent===!1&&Be.blending===D,alphaMap:Ur,alphaTest:ot,alphaHash:xn,combine:Be.combine,mapUv:ii&&ue(Be.map.channel),aoMapUv:ct&&ue(Be.aoMap.channel),lightMapUv:hn&&ue(Be.lightMap.channel),bumpMapUv:In&&ue(Be.bumpMap.channel),normalMapUv:rn&&ue(Be.normalMap.channel),displacementMapUv:Gn&&ue(Be.displacementMap.channel),emissiveMapUv:mi&&ue(Be.emissiveMap.channel),metalnessMapUv:ti&&ue(Be.metalnessMap.channel),roughnessMapUv:gi&&ue(Be.roughnessMap.channel),anisotropyMapUv:$r&&ue(Be.anisotropyMap.channel),clearcoatMapUv:Mo&&ue(Be.clearcoatMap.channel),clearcoatNormalMapUv:qe&&ue(Be.clearcoatNormalMap.channel),clearcoatRoughnessMapUv:Ie&&ue(Be.clearcoatRoughnessMap.channel),iridescenceMapUv:St&&ue(Be.iridescenceMap.channel),iridescenceThicknessMapUv:an&&ue(Be.iridescenceThicknessMap.channel),sheenColorMapUv:un&&ue(Be.sheenColorMap.channel),sheenRoughnessMapUv:cn&&ue(Be.sheenRoughnessMap.channel),specularMapUv:hi&&ue(Be.specularMap.channel),specularColorMapUv:zn&&ue(Be.specularColorMap.channel),specularIntensityMapUv:Yn&&ue(Be.specularIntensityMap.channel),transmissionMapUv:Ai&&ue(Be.transmissionMap.channel),thicknessMapUv:sr&&ue(Be.thicknessMap.channel),alphaMapUv:Ur&&ue(Be.alphaMap.channel),vertexTangents:!!wt.attributes.tangent&&(rn||ir),vertexColors:Be.vertexColors,vertexAlphas:Be.vertexColors===!0&&!!wt.attributes.color&&wt.attributes.color.itemSize===4,vertexUv1s:An,vertexUv2s:kn,vertexUv3s:Di,pointsUvs:Gt.isPoints===!0&&!!wt.attributes.uv&&(ii||Ur),fog:!!lt,useFog:Be.fog===!0,fogExp2:lt&<.isFogExp2,flatShading:Be.flatShading===!0,sizeAttenuation:Be.sizeAttenuation===!0,logarithmicDepthBuffer:Q,skinning:Gt.isSkinnedMesh===!0,morphTargets:wt.morphAttributes.position!==void 0,morphNormals:wt.morphAttributes.normal!==void 0,morphColors:wt.morphAttributes.color!==void 0,morphTargetsCount:dn,morphTextureStride:Qn,numDirLights:Xe.directional.length,numPointLights:Xe.point.length,numSpotLights:Xe.spot.length,numSpotLightMaps:Xe.spotLightMap.length,numRectAreaLights:Xe.rectArea.length,numHemiLights:Xe.hemi.length,numDirLightShadows:Xe.directionalShadowMap.length,numPointLightShadows:Xe.pointShadowMap.length,numSpotLightShadows:Xe.spotShadowMap.length,numSpotLightShadowsWithMaps:Xe.numSpotLightShadowsWithMaps,numLightProbes:Xe.numLightProbes,numClippingPlanes:R.numPlanes,numClipIntersection:R.numIntersection,dithering:Be.dithering,shadowMapEnabled:w.shadowMap.enabled&&rt.length>0,shadowMapType:w.shadowMap.type,toneMapping:$i,useLegacyLights:w._useLegacyLights,decodeVideoTexture:ii&&Be.map.isVideoTexture===!0&&vr.getTransfer(Be.map.colorSpace)===wr,premultipliedAlpha:Be.premultipliedAlpha,doubleSided:Be.side===L,flipSided:Be.side===T,useDepthPacking:Be.depthPacking>=0,depthPacking:Be.depthPacking||0,index0AttributeName:Be.index0AttributeName,extensionDerivatives:tn&&Be.extensions.derivatives===!0,extensionFragDepth:tn&&Be.extensions.fragDepth===!0,extensionDrawBuffers:tn&&Be.extensions.drawBuffers===!0,extensionShaderTextureLOD:tn&&Be.extensions.shaderTextureLOD===!0,rendererExtensionFragDepth:V||m.has("EXT_frag_depth"),rendererExtensionDrawBuffers:V||m.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:V||m.has("EXT_shader_texture_lod"),rendererExtensionParallelShaderCompile:m.has("KHR_parallel_shader_compile"),customProgramCacheKey:Be.customProgramCacheKey()}}function q(Be){const Xe=[];if(Be.shaderID?Xe.push(Be.shaderID):(Xe.push(Be.customVertexShaderID),Xe.push(Be.customFragmentShaderID)),Be.defines!==void 0)for(const rt in Be.defines)Xe.push(rt),Xe.push(Be.defines[rt]);return Be.isRawShaderMaterial===!1&&(Se(Xe,Be),fe(Xe,Be),Xe.push(w.outputColorSpace)),Xe.push(Be.customProgramCacheKey),Xe.join()}function Se(Be,Xe){Be.push(Xe.precision),Be.push(Xe.outputColorSpace),Be.push(Xe.envMapMode),Be.push(Xe.envMapCubeUVHeight),Be.push(Xe.mapUv),Be.push(Xe.alphaMapUv),Be.push(Xe.lightMapUv),Be.push(Xe.aoMapUv),Be.push(Xe.bumpMapUv),Be.push(Xe.normalMapUv),Be.push(Xe.displacementMapUv),Be.push(Xe.emissiveMapUv),Be.push(Xe.metalnessMapUv),Be.push(Xe.roughnessMapUv),Be.push(Xe.anisotropyMapUv),Be.push(Xe.clearcoatMapUv),Be.push(Xe.clearcoatNormalMapUv),Be.push(Xe.clearcoatRoughnessMapUv),Be.push(Xe.iridescenceMapUv),Be.push(Xe.iridescenceThicknessMapUv),Be.push(Xe.sheenColorMapUv),Be.push(Xe.sheenRoughnessMapUv),Be.push(Xe.specularMapUv),Be.push(Xe.specularColorMapUv),Be.push(Xe.specularIntensityMapUv),Be.push(Xe.transmissionMapUv),Be.push(Xe.thicknessMapUv),Be.push(Xe.combine),Be.push(Xe.fogExp2),Be.push(Xe.sizeAttenuation),Be.push(Xe.morphTargetsCount),Be.push(Xe.morphAttributeCount),Be.push(Xe.numDirLights),Be.push(Xe.numPointLights),Be.push(Xe.numSpotLights),Be.push(Xe.numSpotLightMaps),Be.push(Xe.numHemiLights),Be.push(Xe.numRectAreaLights),Be.push(Xe.numDirLightShadows),Be.push(Xe.numPointLightShadows),Be.push(Xe.numSpotLightShadows),Be.push(Xe.numSpotLightShadowsWithMaps),Be.push(Xe.numLightProbes),Be.push(Xe.shadowMapType),Be.push(Xe.toneMapping),Be.push(Xe.numClippingPlanes),Be.push(Xe.numClipIntersection),Be.push(Xe.depthPacking)}function fe(Be,Xe){I.disableAll(),Xe.isWebGL2&&I.enable(0),Xe.supportsVertexTextures&&I.enable(1),Xe.instancing&&I.enable(2),Xe.instancingColor&&I.enable(3),Xe.matcap&&I.enable(4),Xe.envMap&&I.enable(5),Xe.normalMapObjectSpace&&I.enable(6),Xe.normalMapTangentSpace&&I.enable(7),Xe.clearcoat&&I.enable(8),Xe.iridescence&&I.enable(9),Xe.alphaTest&&I.enable(10),Xe.vertexColors&&I.enable(11),Xe.vertexAlphas&&I.enable(12),Xe.vertexUv1s&&I.enable(13),Xe.vertexUv2s&&I.enable(14),Xe.vertexUv3s&&I.enable(15),Xe.vertexTangents&&I.enable(16),Xe.anisotropy&&I.enable(17),Xe.alphaHash&&I.enable(18),Be.push(I.mask),I.disableAll(),Xe.fog&&I.enable(0),Xe.useFog&&I.enable(1),Xe.flatShading&&I.enable(2),Xe.logarithmicDepthBuffer&&I.enable(3),Xe.skinning&&I.enable(4),Xe.morphTargets&&I.enable(5),Xe.morphNormals&&I.enable(6),Xe.morphColors&&I.enable(7),Xe.premultipliedAlpha&&I.enable(8),Xe.shadowMapEnabled&&I.enable(9),Xe.useLegacyLights&&I.enable(10),Xe.doubleSided&&I.enable(11),Xe.flipSided&&I.enable(12),Xe.useDepthPacking&&I.enable(13),Xe.dithering&&I.enable(14),Xe.transmission&&I.enable(15),Xe.sheen&&I.enable(16),Xe.opaque&&I.enable(17),Xe.pointsUvs&&I.enable(18),Xe.decodeVideoTexture&&I.enable(19),Xe.numMultiviewViews&&I.enable(20),Be.push(I.mask)}function Me(Be){const Xe=ie[Be.type];let rt;if(Xe){const bt=fa[Xe];rt=Nw.clone(bt.uniforms)}else rt=Be.uniforms;return rt}function ze(Be,Xe){let rt;for(let bt=0,Gt=N.length;bt0?m.push(q):$.transparent===!0?y.push(q):l.push(q)}function O(Q,X,$,ie,ue,re){const q=R(Q,X,$,ie,ue,re);$.transmission>0?m.unshift(q):$.transparent===!0?y.unshift(q):l.unshift(q)}function N(Q,X){l.length>1&&l.sort(Q||wF),m.length>1&&m.sort(X||lM),y.length>1&&y.sort(X||lM)}function V(){for(let Q=r,X=w.length;Q=_.length?(R=new cM,_.push(R)):R=_[y],R}function l(){w=new WeakMap}return{get:r,dispose:l}}function CF(){const w={};return{get:function(r){if(w[r.id]!==void 0)return w[r.id];let l;switch(r.type){case"DirectionalLight":l={direction:new je,color:new Hn};break;case"SpotLight":l={position:new je,direction:new je,color:new Hn,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":l={position:new je,color:new Hn,distance:0,decay:0};break;case"HemisphereLight":l={direction:new je,skyColor:new Hn,groundColor:new Hn};break;case"RectAreaLight":l={color:new Hn,position:new je,halfWidth:new je,halfHeight:new je};break}return w[r.id]=l,l}}}function SF(){const w={};return{get:function(r){if(w[r.id]!==void 0)return w[r.id];let l;switch(r.type){case"DirectionalLight":l={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new en};break;case"SpotLight":l={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new en};break;case"PointLight":l={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new en,shadowCameraNear:1,shadowCameraFar:1e3};break}return w[r.id]=l,l}}}let TF=0;function RF(w,r){return(r.castShadow?2:0)-(w.castShadow?2:0)+(r.map?1:0)-(w.map?1:0)}function IF(w,r){const l=new CF,m=SF(),y={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 V=0;V<9;V++)y.probe.push(new je);const _=new je,R=new _i,I=new _i;function O(V,Q){let X=0,$=0,ie=0;for(let bt=0;bt<9;bt++)y.probe[bt].set(0,0,0);let ue=0,re=0,q=0,Se=0,fe=0,Me=0,ze=0,He=0,et=0,st=0,Be=0;V.sort(RF);const Xe=Q===!0?Math.PI:1;for(let bt=0,Gt=V.length;bt0&&(r.isWebGL2||w.has("OES_texture_float_linear")===!0?(y.rectAreaLTC1=Un.LTC_FLOAT_1,y.rectAreaLTC2=Un.LTC_FLOAT_2):w.has("OES_texture_half_float_linear")===!0?(y.rectAreaLTC1=Un.LTC_HALF_1,y.rectAreaLTC2=Un.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),y.ambient[0]=X,y.ambient[1]=$,y.ambient[2]=ie;const rt=y.hash;(rt.directionalLength!==ue||rt.pointLength!==re||rt.spotLength!==q||rt.rectAreaLength!==Se||rt.hemiLength!==fe||rt.numDirectionalShadows!==Me||rt.numPointShadows!==ze||rt.numSpotShadows!==He||rt.numSpotMaps!==et||rt.numLightProbes!==Be)&&(y.directional.length=ue,y.spot.length=q,y.rectArea.length=Se,y.point.length=re,y.hemi.length=fe,y.directionalShadow.length=Me,y.directionalShadowMap.length=Me,y.pointShadow.length=ze,y.pointShadowMap.length=ze,y.spotShadow.length=He,y.spotShadowMap.length=He,y.directionalShadowMatrix.length=Me,y.pointShadowMatrix.length=ze,y.spotLightMatrix.length=He+et-st,y.spotLightMap.length=et,y.numSpotLightShadowsWithMaps=st,y.numLightProbes=Be,rt.directionalLength=ue,rt.pointLength=re,rt.spotLength=q,rt.rectAreaLength=Se,rt.hemiLength=fe,rt.numDirectionalShadows=Me,rt.numPointShadows=ze,rt.numSpotShadows=He,rt.numSpotMaps=et,rt.numLightProbes=Be,y.version=TF++)}function N(V,Q){let X=0,$=0,ie=0,ue=0,re=0;const q=Q.matrixWorldInverse;for(let Se=0,fe=V.length;Se=I.length?(O=new hM(w,r),I.push(O)):O=I[R],O}function y(){l=new WeakMap}return{get:m,dispose:y}}class dx extends js{constructor(r){super(),this.isMeshDepthMaterial=!0,this.type="MeshDepthMaterial",this.depthPacking=qo,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.setValues(r)}copy(r){return super.copy(r),this.depthPacking=r.depthPacking,this.map=r.map,this.alphaMap=r.alphaMap,this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this}}class fx extends js{constructor(r){super(),this.isMeshDistanceMaterial=!0,this.type="MeshDistanceMaterial",this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.setValues(r)}copy(r){return super.copy(r),this.map=r.map,this.alphaMap=r.alphaMap,this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this}}const LF=`void main() { gl_Position = vec4( position, 1.0 ); }`,PF=`uniform sampler2D shadow_pass; uniform vec2 resolution; @@ -4797,35 +4797,35 @@ void main() { squared_mean = squared_mean / samples; float std_dev = sqrt( squared_mean - mean * mean ); gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function DF(w,r,l){let m=new fg;const y=new en,_=new en,R=new ur,I=new ux({depthPacking:Ha}),O=new dx,N={},V=l.maxTextureSize,Q={[C]:T,[T]:C,[L]:L},X=new Ka({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new en},radius:{value:4}},vertexShader:LF,fragmentShader:PF}),$=X.clone();$.defines.HORIZONTAL_PASS=1;const ie=new Yi;ie.setAttribute("position",new Sr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const ue=new Os(ie,X),re=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=E;let q=this.type;this.render=function(ze,He,et){if(re.enabled===!1||re.autoUpdate===!1&&re.needsUpdate===!1||ze.length===0)return;const st=w.getRenderTarget(),Be=w.getActiveCubeFace(),Xe=w.getActiveMipmapLevel(),rt=w.state;rt.setBlending(F),rt.buffers.color.setClear(1,1,1,1),rt.buffers.depth.setTest(!0),rt.setScissorTest(!1);const bt=q!==M&&this.type===M,Gt=q===M&&this.type!==M;for(let lt=0,wt=ze.length;ltV||y.y>V)&&(y.x>V&&(_.x=Math.floor(V/ln.x),y.x=_.x*ln.x,qt.mapSize.x=_.x),y.y>V&&(_.y=Math.floor(V/ln.y),y.y=_.y*ln.y,qt.mapSize.y=_.y)),qt.map===null||bt===!0||Gt===!0){const pn=this.type!==M?{minFilter:at,magFilter:at}:{};qt.map!==null&&qt.map.dispose(),qt.map=new yo(y.x,y.y,pn),qt.map.texture.name=Kt.name+".shadowMap",qt.camera.updateProjectionMatrix()}w.setRenderTarget(qt.map),w.clear();const Jt=qt.getViewportCount();for(let pn=0;pn0||He.map&&He.alphaTest>0){const rt=Be.uuid,bt=He.uuid;let Gt=N[rt];Gt===void 0&&(Gt={},N[rt]=Gt);let lt=Gt[bt];lt===void 0&&(lt=Be.clone(),Gt[bt]=lt),Be=lt}if(Be.visible=He.visible,Be.wireframe=He.wireframe,st===M?Be.side=He.shadowSide!==null?He.shadowSide:He.side:Be.side=He.shadowSide!==null?He.shadowSide:Q[He.side],Be.alphaMap=He.alphaMap,Be.alphaTest=He.alphaTest,Be.map=He.map,Be.clipShadows=He.clipShadows,Be.clippingPlanes=He.clippingPlanes,Be.clipIntersection=He.clipIntersection,Be.displacementMap=He.displacementMap,Be.displacementScale=He.displacementScale,Be.displacementBias=He.displacementBias,Be.wireframeLinewidth=He.wireframeLinewidth,Be.linewidth=He.linewidth,et.isPointLight===!0&&Be.isMeshDistanceMaterial===!0){const rt=w.properties.get(Be);rt.light=et}return Be}function Me(ze,He,et,st,Be){if(ze.visible===!1)return;if(ze.layers.test(He.layers)&&(ze.isMesh||ze.isLine||ze.isPoints)&&(ze.castShadow||ze.receiveShadow&&Be===M)&&(!ze.frustumCulled||m.intersectsObject(ze))){ze.modelViewMatrix.multiplyMatrices(et.matrixWorldInverse,ze.matrixWorld);const bt=r.update(ze),Gt=ze.material;if(Array.isArray(Gt)){const lt=bt.groups;for(let wt=0,Kt=lt.length;wt=1):pn.indexOf("OpenGL ES")!==-1&&(Jt=parseFloat(/^OpenGL ES (\d)/.exec(pn)[1]),ln=Jt>=2);let dn=null,Qn={};const Qi=w.getParameter(w.SCISSOR_BOX),ki=w.getParameter(w.VIEWPORT),Ht=new ur().fromArray(Qi),Sn=new ur().fromArray(ki);function _n(ot,xn,tn,An){const kn=new Uint8Array(4),Di=w.createTexture();w.bindTexture(ot,Di),w.texParameteri(ot,w.TEXTURE_MIN_FILTER,w.NEAREST),w.texParameteri(ot,w.TEXTURE_MAG_FILTER,w.NEAREST);for(let $i=0;$i"u"?!1:/OculusBrowser/g.test(navigator.userAgent),ie=r.has("OCULUS_multiview")?r.get("OCULUS_multiview"):null,ue=new WeakMap;let re;const q=new WeakMap;let Se=[],fe=!1,Me=!1;try{Me=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function ze(qe,Ie){return Me?new OffscreenCanvas(qe,Ie):hh("canvas")}function He(qe,Ie,St,an){let un=1;if((qe.width>an||qe.height>an)&&(un=an/Math.max(qe.width,qe.height)),un<1||Ie===!0)if(typeof HTMLImageElement<"u"&&qe instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&qe instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&qe instanceof ImageBitmap){const cn=Ie?mu:Math.floor,hi=cn(un*qe.width),zn=cn(un*qe.height);re===void 0&&(re=ze(hi,zn));const Yn=St?ze(hi,zn):re;return Yn.width=hi,Yn.height=zn,Yn.getContext("2d").drawImage(qe,0,0,hi,zn),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+qe.width+"x"+qe.height+") to ("+hi+"x"+zn+")."),Yn}else return"data"in qe&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+qe.width+"x"+qe.height+")."),qe;return qe}function et(qe){return Tf(qe.width)&&Tf(qe.height)}function st(qe){return I?!1:qe.wrapS!==We||qe.wrapT!==We||qe.minFilter!==at&&qe.minFilter!==Bn}function Be(qe,Ie){return qe.generateMipmaps&&Ie&&qe.minFilter!==at&&qe.minFilter!==Bn}function Xe(qe){w.generateMipmap(qe)}function rt(qe,Ie,St,an,un=!1){if(I===!1)return Ie;if(qe!==null){if(w[qe]!==void 0)return w[qe];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+qe+"'")}let cn=Ie;if(Ie===w.RED&&(St===w.FLOAT&&(cn=w.R32F),St===w.HALF_FLOAT&&(cn=w.R16F),St===w.UNSIGNED_BYTE&&(cn=w.R8)),Ie===w.RED_INTEGER&&(St===w.UNSIGNED_BYTE&&(cn=w.R8UI),St===w.UNSIGNED_SHORT&&(cn=w.R16UI),St===w.UNSIGNED_INT&&(cn=w.R32UI),St===w.BYTE&&(cn=w.R8I),St===w.SHORT&&(cn=w.R16I),St===w.INT&&(cn=w.R32I)),Ie===w.RG&&(St===w.FLOAT&&(cn=w.RG32F),St===w.HALF_FLOAT&&(cn=w.RG16F),St===w.UNSIGNED_BYTE&&(cn=w.RG8)),Ie===w.RGBA){const hi=un?rh:vr.getTransfer(an);St===w.FLOAT&&(cn=w.RGBA32F),St===w.HALF_FLOAT&&(cn=w.RGBA16F),St===w.UNSIGNED_BYTE&&(cn=hi===wr?w.SRGB8_ALPHA8:w.RGBA8),St===w.UNSIGNED_SHORT_4_4_4_4&&(cn=w.RGBA4),St===w.UNSIGNED_SHORT_5_5_5_1&&(cn=w.RGB5_A1)}return(cn===w.R16F||cn===w.R32F||cn===w.RG16F||cn===w.RG32F||cn===w.RGBA16F||cn===w.RGBA32F)&&r.get("EXT_color_buffer_float"),cn}function bt(qe,Ie,St){return Be(qe,St)===!0||qe.isFramebufferTexture&&qe.minFilter!==at&&qe.minFilter!==Bn?Math.log2(Math.max(Ie.width,Ie.height))+1:qe.mipmaps!==void 0&&qe.mipmaps.length>0?qe.mipmaps.length:qe.isCompressedTexture&&Array.isArray(qe.image)?Ie.mipmaps.length:1}function Gt(qe){return qe===at||qe===At||qe===Pt?w.NEAREST:w.LINEAR}function lt(qe){const Ie=qe.target;Ie.removeEventListener("dispose",lt),Kt(Ie),Ie.isVideoTexture&&ue.delete(Ie)}function wt(qe){const Ie=qe.target;Ie.removeEventListener("dispose",wt),ln(Ie)}function Kt(qe){const Ie=m.get(qe);if(Ie.__webglInit===void 0)return;const St=qe.source,an=q.get(St);if(an){const un=an[Ie.__cacheKey];un.usedTimes--,un.usedTimes===0&&qt(qe),Object.keys(an).length===0&&q.delete(St)}m.remove(qe)}function qt(qe){const Ie=m.get(qe);w.deleteTexture(Ie.__webglTexture);const St=qe.source,an=q.get(St);delete an[Ie.__cacheKey],R.memory.textures--}function ln(qe){const Ie=qe.texture,St=m.get(qe),an=m.get(Ie);if(an.__webglTexture!==void 0&&(w.deleteTexture(an.__webglTexture),R.memory.textures--),qe.depthTexture&&qe.depthTexture.dispose(),qe.isWebGLCubeRenderTarget)for(let un=0;un<6;un++){if(Array.isArray(St.__webglFramebuffer[un]))for(let cn=0;cn=O&&console.warn("THREE.WebGLTextures: Trying to use "+qe+" texture units while this GPU supports only "+O),Jt+=1,qe}function Qn(qe){const Ie=[];return Ie.push(qe.wrapS),Ie.push(qe.wrapT),Ie.push(qe.wrapR||0),Ie.push(qe.magFilter),Ie.push(qe.minFilter),Ie.push(qe.anisotropy),Ie.push(qe.internalFormat),Ie.push(qe.format),Ie.push(qe.type),Ie.push(qe.generateMipmaps),Ie.push(qe.premultiplyAlpha),Ie.push(qe.flipY),Ie.push(qe.unpackAlignment),Ie.push(qe.colorSpace),Ie.join()}function Qi(qe,Ie){const St=m.get(qe);if(qe.isVideoTexture&&$r(qe),qe.isRenderTargetTexture===!1&&qe.version>0&&St.__version!==qe.version){const an=qe.image;if(an===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(an.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else if(hn(St,qe,Ie))return}l.bindTexture(w.TEXTURE_2D,St.__webglTexture,w.TEXTURE0+Ie)}function ki(qe,Ie){const St=m.get(qe);if(qe.version>0&&St.__version!==qe.version){hn(St,qe,Ie);return}l.bindTexture(w.TEXTURE_2D_ARRAY,St.__webglTexture,w.TEXTURE0+Ie)}function Ht(qe,Ie){const St=m.get(qe);if(qe.version>0&&St.__version!==qe.version){hn(St,qe,Ie);return}l.bindTexture(w.TEXTURE_3D,St.__webglTexture,w.TEXTURE0+Ie)}function Sn(qe,Ie){const St=m.get(qe);if(qe.version>0&&St.__version!==qe.version){In(St,qe,Ie);return}l.bindTexture(w.TEXTURE_CUBE_MAP,St.__webglTexture,w.TEXTURE0+Ie)}const _n={[Re]:w.REPEAT,[We]:w.CLAMP_TO_EDGE,[ve]:w.MIRRORED_REPEAT},wi={[at]:w.NEAREST,[At]:w.NEAREST_MIPMAP_NEAREST,[Pt]:w.NEAREST_MIPMAP_LINEAR,[Bn]:w.LINEAR,[pi]:w.LINEAR_MIPMAP_NEAREST,[Fn]:w.LINEAR_MIPMAP_LINEAR},ei={[Dm]:w.NEVER,[Gm]:w.ALWAYS,[Om]:w.LESS,[Nm]:w.LEQUAL,[Fm]:w.EQUAL,[zm]:w.GEQUAL,[Um]:w.GREATER,[km]:w.NOTEQUAL};function ii(qe,Ie,St){if(St?(w.texParameteri(qe,w.TEXTURE_WRAP_S,_n[Ie.wrapS]),w.texParameteri(qe,w.TEXTURE_WRAP_T,_n[Ie.wrapT]),(qe===w.TEXTURE_3D||qe===w.TEXTURE_2D_ARRAY)&&w.texParameteri(qe,w.TEXTURE_WRAP_R,_n[Ie.wrapR]),w.texParameteri(qe,w.TEXTURE_MAG_FILTER,wi[Ie.magFilter]),w.texParameteri(qe,w.TEXTURE_MIN_FILTER,wi[Ie.minFilter])):(w.texParameteri(qe,w.TEXTURE_WRAP_S,w.CLAMP_TO_EDGE),w.texParameteri(qe,w.TEXTURE_WRAP_T,w.CLAMP_TO_EDGE),(qe===w.TEXTURE_3D||qe===w.TEXTURE_2D_ARRAY)&&w.texParameteri(qe,w.TEXTURE_WRAP_R,w.CLAMP_TO_EDGE),(Ie.wrapS!==We||Ie.wrapT!==We)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),w.texParameteri(qe,w.TEXTURE_MAG_FILTER,Gt(Ie.magFilter)),w.texParameteri(qe,w.TEXTURE_MIN_FILTER,Gt(Ie.minFilter)),Ie.minFilter!==at&&Ie.minFilter!==Bn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),Ie.compareFunction&&(w.texParameteri(qe,w.TEXTURE_COMPARE_MODE,w.COMPARE_REF_TO_TEXTURE),w.texParameteri(qe,w.TEXTURE_COMPARE_FUNC,ei[Ie.compareFunction])),r.has("EXT_texture_filter_anisotropic")===!0){const an=r.get("EXT_texture_filter_anisotropic");if(Ie.magFilter===at||Ie.minFilter!==Pt&&Ie.minFilter!==Fn||Ie.type===Ei&&r.has("OES_texture_float_linear")===!1||I===!1&&Ie.type===Fi&&r.has("OES_texture_half_float_linear")===!1)return;(Ie.anisotropy>1||m.get(Ie).__currentAnisotropy)&&(w.texParameterf(qe,an.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Ie.anisotropy,y.getMaxAnisotropy())),m.get(Ie).__currentAnisotropy=Ie.anisotropy)}}function yi(qe,Ie){let St=!1;qe.__webglInit===void 0&&(qe.__webglInit=!0,Ie.addEventListener("dispose",lt));const an=Ie.source;let un=q.get(an);un===void 0&&(un={},q.set(an,un));const cn=Qn(Ie);if(cn!==qe.__cacheKey){un[cn]===void 0&&(un[cn]={texture:w.createTexture(),usedTimes:0},R.memory.textures++,St=!0),un[cn].usedTimes++;const hi=un[qe.__cacheKey];hi!==void 0&&(un[qe.__cacheKey].usedTimes--,hi.usedTimes===0&&qt(Ie)),qe.__cacheKey=cn,qe.__webglTexture=un[cn].texture}return St}function nn(qe){fe=qe}function ct(){const qe=fe;fe=!1;for(const Ie of Se)hn(Ie.textureProperties,Ie.texture,Ie.slot),Ie.texture.isPendingDeferredUpload=!1;Se=[],fe=qe}function hn(qe,Ie,St){if(fe)return Ie.isPendingDeferredUpload||(Ie.isPendingDeferredUpload=!0,Se.push({textureProperties:qe,texture:Ie,slot:St})),!1;let an=w.TEXTURE_2D;(Ie.isDataArrayTexture||Ie.isCompressedArrayTexture)&&(an=w.TEXTURE_2D_ARRAY),Ie.isData3DTexture&&(an=w.TEXTURE_3D);const un=yi(qe,Ie),cn=Ie.source;l.bindTexture(an,qe.__webglTexture,w.TEXTURE0+St);const hi=m.get(cn);if(cn.version!==hi.__version||un===!0){l.activeTexture(w.TEXTURE0+St);const zn=vr.getPrimaries(vr.workingColorSpace),Yn=Ie.colorSpace===qr?null:vr.getPrimaries(Ie.colorSpace),Ai=Ie.colorSpace===qr||zn===Yn?w.NONE:w.BROWSER_DEFAULT_WEBGL;w.pixelStorei(w.UNPACK_FLIP_Y_WEBGL,Ie.flipY),w.pixelStorei(w.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ie.premultiplyAlpha),w.pixelStorei(w.UNPACK_ALIGNMENT,Ie.unpackAlignment),w.pixelStorei(w.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ai);const sr=st(Ie)&&et(Ie.image)===!1;let wn=He(Ie.image,sr,!1,V);wn=Mo(Ie,wn);const Ur=et(wn)||I,ot=_.convert(Ie.format,Ie.colorSpace);let xn=_.convert(Ie.type),tn=rt(Ie.internalFormat,ot,xn,Ie.colorSpace,Ie.isVideoTexture);ii(an,Ie,Ur);let An;const kn=Ie.mipmaps,Di=I&&Ie.isVideoTexture!==!0,$i=hi.__version===void 0||un===!0,Ki=bt(Ie,wn,Ur);if(Ie.isDepthTexture)tn=w.DEPTH_COMPONENT,I?Ie.type===Ei?tn=w.DEPTH_COMPONENT32F:Ie.type===$n?tn=w.DEPTH_COMPONENT24:Ie.type===cr?tn=w.DEPTH24_STENCIL8:tn=w.DEPTH_COMPONENT16:Ie.type===Ei&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),Ie.format===be&&tn===w.DEPTH_COMPONENT&&Ie.type!==Ln&&Ie.type!==$n&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),Ie.type=$n,xn=_.convert(Ie.type)),Ie.format===Ve&&tn===w.DEPTH_COMPONENT&&(tn=w.DEPTH_STENCIL,Ie.type!==cr&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),Ie.type=cr,xn=_.convert(Ie.type))),$i&&(Di?l.texStorage2D(w.TEXTURE_2D,1,tn,wn.width,wn.height):l.texImage2D(w.TEXTURE_2D,0,tn,wn.width,wn.height,0,ot,xn,null));else if(Ie.isDataTexture)if(kn.length>0&&Ur){Di&&$i&&l.texStorage2D(w.TEXTURE_2D,Ki,tn,kn[0].width,kn[0].height);for(let En=0,ui=kn.length;En>=1,ui>>=1}}else if(kn.length>0&&Ur){Di&&$i&&l.texStorage2D(w.TEXTURE_2D,Ki,tn,kn[0].width,kn[0].height);for(let En=0,ui=kn.length;En0&&$i++,l.texStorage2D(w.TEXTURE_CUBE_MAP,$i,An,wn[0].width,wn[0].height));for(let En=0;En<6;En++)if(sr){kn?l.texSubImage2D(w.TEXTURE_CUBE_MAP_POSITIVE_X+En,0,0,0,wn[En].width,wn[En].height,xn,tn,wn[En].data):l.texImage2D(w.TEXTURE_CUBE_MAP_POSITIVE_X+En,0,An,wn[En].width,wn[En].height,0,xn,tn,wn[En].data);for(let ui=0;ui>cn),Ur=Math.max(1,Ie.height>>cn);Ie.isWebGLMultiviewRenderTarget===!0?l.texStorage3D(w.TEXTURE_2D_ARRAY,0,Yn,Ie.width,Ie.height,Ie.numViews):un===w.TEXTURE_3D||un===w.TEXTURE_2D_ARRAY?l.texImage3D(un,cn,Yn,wn,Ur,Ie.depth,0,hi,zn,null):l.texImage2D(un,cn,Yn,wn,Ur,0,hi,zn,null)}l.bindFramebuffer(w.FRAMEBUFFER,qe);const sr=gr(Ie);Ie.isWebGLMultiviewRenderTarget===!0?sr?ie.framebufferTextureMultisampleMultiviewOVR(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,m.get(St).__webglTexture,0,br(Ie),0,Ie.numViews):ie.framebufferTextureMultiviewOVR(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,m.get(St).__webglTexture,0,0,Ie.numViews):(un===w.TEXTURE_2D||un>=w.TEXTURE_CUBE_MAP_POSITIVE_X&&un<=w.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&(sr?X.framebufferTexture2DMultisampleEXT(w.FRAMEBUFFER,an,un,m.get(St).__webglTexture,0,br(Ie)):w.framebufferTexture2D(w.FRAMEBUFFER,an,un,m.get(St).__webglTexture,cn)),l.bindFramebuffer(w.FRAMEBUFFER,null)}function Gn(qe,Ie,St){if(w.bindRenderbuffer(w.RENDERBUFFER,qe),Ie.isWebGLMultiviewRenderTarget===!0){const an=gr(Ie),un=Ie.numViews,cn=Ie.depthTexture;let hi=w.DEPTH_COMPONENT24,zn=w.DEPTH_ATTACHMENT;cn&&cn.isDepthTexture&&(cn.type===Ei?hi=w.DEPTH_COMPONENT32F:cn.type===cr&&(hi=w.DEPTH24_STENCIL8,zn=w.DEPTH_STENCIL_ATTACHMENT));let Yn=m.get(Ie.depthTexture).__webglTexture;Yn===void 0&&(Yn=w.createTexture(),w.bindTexture(w.TEXTURE_2D_ARRAY,Yn),w.texStorage3D(w.TEXTURE_2D_ARRAY,1,hi,Ie.width,Ie.height,un)),an?ie.framebufferTextureMultisampleMultiviewOVR(w.FRAMEBUFFER,zn,Yn,0,br(Ie),0,un):ie.framebufferTextureMultiviewOVR(w.FRAMEBUFFER,zn,Yn,0,0,un)}else if(Ie.depthBuffer&&!Ie.stencilBuffer){let an=I===!0?w.DEPTH_COMPONENT24:w.DEPTH_COMPONENT16;if(St||gr(Ie)){const un=Ie.depthTexture;un&&un.isDepthTexture&&(un.type===Ei?an=w.DEPTH_COMPONENT32F:un.type===$n&&(an=w.DEPTH_COMPONENT24));const cn=br(Ie);gr(Ie)?X.renderbufferStorageMultisampleEXT(w.RENDERBUFFER,cn,an,Ie.width,Ie.height):w.renderbufferStorageMultisample(w.RENDERBUFFER,cn,an,Ie.width,Ie.height)}else w.renderbufferStorage(w.RENDERBUFFER,an,Ie.width,Ie.height);w.framebufferRenderbuffer(w.FRAMEBUFFER,w.DEPTH_ATTACHMENT,w.RENDERBUFFER,qe)}else if(Ie.depthBuffer&&Ie.stencilBuffer){const an=br(Ie);St&&gr(Ie)===!1?w.renderbufferStorageMultisample(w.RENDERBUFFER,an,w.DEPTH24_STENCIL8,Ie.width,Ie.height):gr(Ie)?X.renderbufferStorageMultisampleEXT(w.RENDERBUFFER,an,w.DEPTH24_STENCIL8,Ie.width,Ie.height):w.renderbufferStorage(w.RENDERBUFFER,w.DEPTH_STENCIL,Ie.width,Ie.height),w.framebufferRenderbuffer(w.FRAMEBUFFER,w.DEPTH_STENCIL_ATTACHMENT,w.RENDERBUFFER,qe)}else{const an=Ie.isWebGLMultipleRenderTargets===!0?Ie.texture:[Ie.texture];for(let un=0;un0){St.__webglFramebuffer[zn]=[];for(let Yn=0;Yn0){St.__webglFramebuffer=[];for(let zn=0;zn0&&gr(qe)===!1){const zn=cn?Ie:[Ie];St.__webglMultisampledFramebuffer=w.createFramebuffer(),St.__webglColorRenderbuffer=[],l.bindFramebuffer(w.FRAMEBUFFER,St.__webglMultisampledFramebuffer);for(let Yn=0;Yn0)for(let Yn=0;Yn0)for(let Yn=0;Yn0&&gr(qe)===!1){const Ie=qe.isWebGLMultipleRenderTargets?qe.texture:[qe.texture],St=qe.width,an=qe.height;let un=w.COLOR_BUFFER_BIT;const cn=[],hi=qe.stencilBuffer?w.DEPTH_STENCIL_ATTACHMENT:w.DEPTH_ATTACHMENT,zn=m.get(qe),Yn=qe.isWebGLMultipleRenderTargets===!0;if(Yn)for(let Ai=0;Ai0&&r.has("WEBGL_multisampled_render_to_texture")===!0&&Ie.__useRenderToTexture!==!1}function $r(qe){const Ie=R.render.frame;ue.get(qe)!==Ie&&(ue.set(qe,Ie),qe.update())}function Mo(qe,Ie){const St=qe.colorSpace,an=qe.format,un=qe.type;return qe.isCompressedTexture===!0||qe.isVideoTexture===!0||qe.format===pu||St!==pr&&St!==qr&&(vr.getTransfer(St)===wr?I===!1?r.has("EXT_sRGB")===!0&&an===ht?(qe.format=pu,qe.minFilter=Bn,qe.generateMipmaps=!1):Ie=cl.sRGBToLinear(Ie):(an!==ht||un!==Rt)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",St)),Ie}this.allocateTextureUnit=dn,this.resetTextureUnits=pn,this.setTexture2D=Qi,this.setTexture2DArray=ki,this.setTexture3D=Ht,this.setTextureCube=Sn,this.rebindTextures=gi,this.uploadTexture=hn,this.setupRenderTarget=ir,this.updateRenderTargetMipmap=Lr,this.updateMultisampleRenderTarget=fs,this.setupDepthTexture=mi,this.setupDepthRenderbuffer=ti,this.setupFrameBufferTexture=rn,this.useMultisampledRTT=gr,this.runDeferredUploads=ct,this.setDeferTextureUploads=nn}function hM(w,r,l){const m=l.isWebGL2;function y(_,R=qr){let I;const O=vr.getTransfer(R);if(_===Rt)return w.UNSIGNED_BYTE;if(_===Vi)return w.UNSIGNED_SHORT_4_4_4_4;if(_===lr)return w.UNSIGNED_SHORT_5_5_5_1;if(_===gn)return w.BYTE;if(_===si)return w.SHORT;if(_===Ln)return w.UNSIGNED_SHORT;if(_===Jn)return w.INT;if(_===$n)return w.UNSIGNED_INT;if(_===Ei)return w.FLOAT;if(_===Fi)return m?w.HALF_FLOAT:(I=r.get("OES_texture_half_float"),I!==null?I.HALF_FLOAT_OES:null);if(_===Le)return w.ALPHA;if(_===ht)return w.RGBA;if(_===yt)return w.LUMINANCE;if(_===de)return w.LUMINANCE_ALPHA;if(_===be)return w.DEPTH_COMPONENT;if(_===Ve)return w.DEPTH_STENCIL;if(_===pu)return I=r.get("EXT_sRGB"),I!==null?I.SRGB_ALPHA_EXT:null;if(_===dt)return w.RED;if(_===ut)return w.RED_INTEGER;if(_===_t)return w.RG;if(_===It)return w.RG_INTEGER;if(_===Zt)return w.RGBA_INTEGER;if(_===Wt||_===Lt||_===Pn||_===Dn)if(O===wr)if(I=r.get("WEBGL_compressed_texture_s3tc_srgb"),I!==null){if(_===Wt)return I.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(_===Lt)return I.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(_===Pn)return I.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(_===Dn)return I.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(I=r.get("WEBGL_compressed_texture_s3tc"),I!==null){if(_===Wt)return I.COMPRESSED_RGB_S3TC_DXT1_EXT;if(_===Lt)return I.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(_===Pn)return I.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(_===Dn)return I.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(_===jn||_===di||_===Cn||_===vi)if(I=r.get("WEBGL_compressed_texture_pvrtc"),I!==null){if(_===jn)return I.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(_===di)return I.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(_===Cn)return I.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(_===vi)return I.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(_===Zn)return I=r.get("WEBGL_compressed_texture_etc1"),I!==null?I.COMPRESSED_RGB_ETC1_WEBGL:null;if(_===nr||_===Rr)if(I=r.get("WEBGL_compressed_texture_etc"),I!==null){if(_===nr)return O===wr?I.COMPRESSED_SRGB8_ETC2:I.COMPRESSED_RGB8_ETC2;if(_===Rr)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:I.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(_===Rn||_===Kn||_===zi||_===Si||_===Y||_===se||_===pe||_===we||_===Ue||_===Ke||_===ft||_===ae||_===le||_===ce)if(I=r.get("WEBGL_compressed_texture_astc"),I!==null){if(_===Rn)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:I.COMPRESSED_RGBA_ASTC_4x4_KHR;if(_===Kn)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:I.COMPRESSED_RGBA_ASTC_5x4_KHR;if(_===zi)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:I.COMPRESSED_RGBA_ASTC_5x5_KHR;if(_===Si)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:I.COMPRESSED_RGBA_ASTC_6x5_KHR;if(_===Y)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:I.COMPRESSED_RGBA_ASTC_6x6_KHR;if(_===se)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:I.COMPRESSED_RGBA_ASTC_8x5_KHR;if(_===pe)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:I.COMPRESSED_RGBA_ASTC_8x6_KHR;if(_===we)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:I.COMPRESSED_RGBA_ASTC_8x8_KHR;if(_===Ue)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:I.COMPRESSED_RGBA_ASTC_10x5_KHR;if(_===Ke)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:I.COMPRESSED_RGBA_ASTC_10x6_KHR;if(_===ft)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:I.COMPRESSED_RGBA_ASTC_10x8_KHR;if(_===ae)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:I.COMPRESSED_RGBA_ASTC_10x10_KHR;if(_===le)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:I.COMPRESSED_RGBA_ASTC_12x10_KHR;if(_===ce)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:I.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(_===ge||_===Ae||_===tt)if(I=r.get("EXT_texture_compression_bptc"),I!==null){if(_===ge)return O===wr?I.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:I.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(_===Ae)return I.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(_===tt)return I.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(_===xt||_===Dt||_===Yt||_===on)if(I=r.get("EXT_texture_compression_rgtc"),I!==null){if(_===ge)return I.COMPRESSED_RED_RGTC1_EXT;if(_===Dt)return I.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(_===Yt)return I.COMPRESSED_RED_GREEN_RGTC2_EXT;if(_===on)return I.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return _===cr?m?w.UNSIGNED_INT_24_8:(I=r.get("WEBGL_depth_texture"),I!==null?I.UNSIGNED_INT_24_8_WEBGL:null):w[_]!==void 0?w[_]:null}return{convert:y}}class Ah extends mr{constructor(){super(),this.isGroup=!0,this.type="Group"}}class fx extends hs{constructor(r=[]){super(),this.isArrayCamera=!0,this.cameras=r}}var uM=new je,dM=new je;function NF(w,r,l){uM.setFromMatrixPosition(r.matrixWorld),dM.setFromMatrixPosition(l.matrixWorld);var m=uM.distanceTo(dM),y=r.projectionMatrix.elements,_=l.projectionMatrix.elements,R=y[14]/(y[10]-1),I=y[14]/(y[10]+1),O=(y[9]+1)/y[5],N=(y[9]-1)/y[5],V=(y[8]-1)/y[0],Q=(_[8]+1)/_[0],X=R*V,$=R*Q,ie=m/(-V+Q),ue=ie*-V;r.matrixWorld.decompose(w.position,w.quaternion,w.scale),w.translateX(ue),w.translateZ(ie),w.matrixWorld.compose(w.position,w.quaternion,w.scale),w.matrixWorldInverse.copy(w.matrixWorld).invert();var re=R+ie,q=I+ie,Se=X-ue,fe=$+(m-ue),Me=O*I/q*re,ze=N*I/q*re;w.projectionMatrix.makePerspective(Se,fe,Me,ze,re,q)}function fM(w){var r,l,m=this,y=null,_=null,R=null,I=[],O=new _i,N=new _i,V=1,Q="local-floor";typeof window<"u"&&"VRFrameData"in window&&(_=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",Me,!1));var X=new _i,$=new Ti,ie=new je,ue=new hs;ue.viewport=new ur,ue.layers.enable(1);var re=new hs;re.viewport=new ur,re.layers.enable(2);var q=new fx([ue,re]);q.layers.enable(1),q.layers.enable(2);var Se=new en,fe;function Me(){var rt=m.isPresenting=y!==null&&y.isPresenting===!0;if(rt){var bt=y.getEyeParameters("left");r=2*bt.renderWidth*V,l=bt.renderHeight*V,fe=w.getPixelRatio(),w.getSize(Se),w.setDrawingBufferSize(r,l,1),ue.viewport.set(0,0,r/2,l),re.viewport.set(r/2,0,r/2,l),Xe.start(),m.dispatchEvent({type:"sessionstart"})}else m.enabled&&w.setDrawingBufferSize(Se.width,Se.height,fe),Xe.stop(),m.dispatchEvent({type:"sessionend"})}var ze=[],He=[];function et(rt){for(var bt=navigator.getGamepads&&navigator.getGamepads(),Gt=0,lt=bt.length;Gt$+ie?(N.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:r.handedness,target:this})):!N.inputState.pinching&&X<=$-ie&&(N.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:r.handedness,target:this}))}else O!==null&&r.gripSpace&&(_=l.getPose(r.gripSpace,m),_!==null&&(O.matrix.fromArray(_.transform.matrix),O.matrix.decompose(O.position,O.rotation,O.scale),O.matrixWorldNeedsUpdate=!0,_.linearVelocity?(O.hasLinearVelocity=!0,O.linearVelocity.copy(_.linearVelocity)):O.hasLinearVelocity=!1,_.angularVelocity?(O.hasAngularVelocity=!0,O.angularVelocity.copy(_.angularVelocity)):O.hasAngularVelocity=!1));I!==null&&(y=l.getPose(r.targetRaySpace,m),y===null&&_!==null&&(y=_),y!==null&&(I.matrix.fromArray(y.transform.matrix),I.matrix.decompose(I.position,I.rotation,I.scale),I.matrixWorldNeedsUpdate=!0,y.linearVelocity?(I.hasLinearVelocity=!0,I.linearVelocity.copy(y.linearVelocity)):I.hasLinearVelocity=!1,y.angularVelocity?(I.hasAngularVelocity=!0,I.angularVelocity.copy(y.angularVelocity)):I.hasAngularVelocity=!1,this.dispatchEvent(UF)))}return I!==null&&(I.visible=y!==null),O!==null&&(O.visible=_!==null),N!==null&&(N.visible=R!==null),this}_getHandJoint(r,l){if(r.joints[l.jointName]===void 0){const m=new Ah;m.matrixAutoUpdate=!1,m.visible=!1,r.joints[l.jointName]=m,r.add(m)}return r.joints[l.jointName]}}class mM extends Ir{constructor(r,l,m,y,_,R,I,O,N,V){if(V=V!==void 0?V:be,V!==be&&V!==Ve)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");m===void 0&&V===be&&(m=$n),m===void 0&&V===Ve&&(m=cr),super(null,y,_,R,I,O,V,m,N),this.isDepthTexture=!0,this.image={width:r,height:l},this.magFilter=I!==void 0?I:at,this.minFilter=O!==void 0?O:at,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(r){return super.copy(r),this.compareFunction=r.compareFunction,this}toJSON(r){const l=super.toJSON(r);return this.compareFunction!==null&&(l.compareFunction=this.compareFunction),l}}class kF extends to{constructor(r,l,m,y){super();const _=this;let R=null,I=1;var O=null;let N=null,V="local-floor",Q=1,X=null,$=null;var ie=[];let ue=null,re=null,q=null,Se=null;const fe=l.getContextAttributes();let Me=null,ze=null;const He=[],et=[],st=new hs;st.layers.enable(1),st.viewport=new ur;const Be=new hs;Be.layers.enable(2),Be.viewport=new ur;const Xe=[st,Be],rt=new fx;rt.layers.enable(1),rt.layers.enable(2);let bt=null,Gt=null;this.cameraAutoUpdate=!0,this.layersEnabled=!1,this.enabled=!1,this.isPresenting=!1,this.isMultiview=!1,this.getCameraPose=function(){return $},this.getController=function(Ht){let Sn=He[Ht];return Sn===void 0&&(Sn=new px,He[Ht]=Sn),Sn.getTargetRaySpace()},this.getControllerGrip=function(Ht){let Sn=He[Ht];return Sn===void 0&&(Sn=new px,He[Ht]=Sn),Sn.getGripSpace()},this.getHand=function(Ht){let Sn=He[Ht];return Sn===void 0&&(Sn=new px,He[Ht]=Sn),Sn.getHandSpace()};function lt(Ht){const Sn=et.indexOf(Ht.inputSource);if(Sn===-1)return;const _n=He[Sn];_n!==void 0&&(_n.update(Ht.inputSource,Ht.frame,X||N),_n.dispatchEvent({type:Ht.type,data:Ht.inputSource}))}function wt(){R.removeEventListener("select",lt),R.removeEventListener("selectstart",lt),R.removeEventListener("selectend",lt),R.removeEventListener("squeeze",lt),R.removeEventListener("squeezestart",lt),R.removeEventListener("squeezeend",lt),R.removeEventListener("end",wt),R.removeEventListener("inputsourceschange",Kt);for(let Ht=0;Ht=0&&(et[wi]=null,He[wi].disconnect(_n))}for(let Sn=0;Sn=et.length){et.push(_n),wi=ii;break}else if(et[ii]===null){et[ii]=_n,wi=ii;break}if(wi===-1)break}const ei=He[wi];ei&&ei.connect(_n)}}const qt=new je,ln=new je;function Jt(Ht,Sn,_n){qt.setFromMatrixPosition(Sn.matrixWorld),ln.setFromMatrixPosition(_n.matrixWorld);const wi=qt.distanceTo(ln),ei=Sn.projectionMatrix.elements,ii=_n.projectionMatrix.elements,yi=ei[14]/(ei[10]-1),nn=ei[14]/(ei[10]+1),ct=(ei[9]+1)/ei[5],hn=(ei[9]-1)/ei[5],In=(ei[8]-1)/ei[0],rn=(ii[8]+1)/ii[0],Gn=yi*In,mi=yi*rn,ti=wi/(-In+rn),gi=ti*-In;Sn.matrixWorld.decompose(Ht.position,Ht.quaternion,Ht.scale),Ht.translateX(gi),Ht.translateZ(ti),Ht.matrixWorld.compose(Ht.position,Ht.quaternion,Ht.scale),Ht.matrixWorldInverse.copy(Ht.matrixWorld).invert();const ir=yi+ti,Lr=nn+ti,fs=Gn-gi,br=mi+(wi-gi),gr=ct*nn/Lr*ir,$r=hn*nn/Lr*ir;Ht.projectionMatrix.makePerspective(fs,br,gr,$r,ir,Lr),Ht.projectionMatrixInverse.copy(Ht.projectionMatrix).invert()}function pn(Ht,Sn){Sn===null?Ht.matrixWorld.copy(Ht.matrix):Ht.matrixWorld.multiplyMatrices(Sn.matrixWorld,Ht.matrix),Ht.matrixWorldInverse.copy(Ht.matrixWorld).invert()}this.setPoseTarget=function(Ht){Ht!==void 0&&(O=Ht)},this.updateCamera=function(Ht){if(R===null)return;rt.near=Be.near=st.near=Ht.near,rt.far=Be.far=st.far=Ht.far,(bt!==rt.near||Gt!==rt.far)&&(R.updateRenderState({depthNear:rt.near,depthFar:rt.far}),bt=rt.near,Gt=rt.far);const Sn=rt.cameras;var _n=O||Ht;const wi=_n.parent;pn(rt,wi);for(let ei=0;ei0&&(re.alphaTest.value=q.alphaTest);const Se=r.get(q).envMap;if(Se&&(re.envMap.value=Se,re.flipEnvMap.value=Se.isCubeTexture&&Se.isRenderTargetTexture===!1?-1:1,re.reflectivity.value=q.reflectivity,re.ior.value=q.ior,re.refractionRatio.value=q.refractionRatio),q.lightMap){re.lightMap.value=q.lightMap;const fe=w._useLegacyLights===!0?Math.PI:1;re.lightMapIntensity.value=q.lightMapIntensity*fe,l(q.lightMap,re.lightMapTransform)}q.aoMap&&(re.aoMap.value=q.aoMap,re.aoMapIntensity.value=q.aoMapIntensity,l(q.aoMap,re.aoMapTransform))}function R(re,q){re.diffuse.value.copy(q.color),re.opacity.value=q.opacity,q.map&&(re.map.value=q.map,l(q.map,re.mapTransform))}function I(re,q){re.dashSize.value=q.dashSize,re.totalSize.value=q.dashSize+q.gapSize,re.scale.value=q.scale}function O(re,q,Se,fe){re.diffuse.value.copy(q.color),re.opacity.value=q.opacity,re.size.value=q.size*Se,re.scale.value=fe*.5,q.map&&(re.map.value=q.map,l(q.map,re.uvTransform)),q.alphaMap&&(re.alphaMap.value=q.alphaMap,l(q.alphaMap,re.alphaMapTransform)),q.alphaTest>0&&(re.alphaTest.value=q.alphaTest)}function N(re,q){re.diffuse.value.copy(q.color),re.opacity.value=q.opacity,re.rotation.value=q.rotation,q.map&&(re.map.value=q.map,l(q.map,re.mapTransform)),q.alphaMap&&(re.alphaMap.value=q.alphaMap,l(q.alphaMap,re.alphaMapTransform)),q.alphaTest>0&&(re.alphaTest.value=q.alphaTest)}function V(re,q){re.specular.value.copy(q.specular),re.shininess.value=Math.max(q.shininess,1e-4)}function Q(re,q){q.gradientMap&&(re.gradientMap.value=q.gradientMap)}function X(re,q){re.metalness.value=q.metalness,q.metalnessMap&&(re.metalnessMap.value=q.metalnessMap,l(q.metalnessMap,re.metalnessMapTransform)),re.roughness.value=q.roughness,q.roughnessMap&&(re.roughnessMap.value=q.roughnessMap,l(q.roughnessMap,re.roughnessMapTransform)),r.get(q).envMap&&(re.envMapIntensity.value=q.envMapIntensity)}function $(re,q,Se){re.ior.value=q.ior,q.sheen>0&&(re.sheenColor.value.copy(q.sheenColor).multiplyScalar(q.sheen),re.sheenRoughness.value=q.sheenRoughness,q.sheenColorMap&&(re.sheenColorMap.value=q.sheenColorMap,l(q.sheenColorMap,re.sheenColorMapTransform)),q.sheenRoughnessMap&&(re.sheenRoughnessMap.value=q.sheenRoughnessMap,l(q.sheenRoughnessMap,re.sheenRoughnessMapTransform))),q.clearcoat>0&&(re.clearcoat.value=q.clearcoat,re.clearcoatRoughness.value=q.clearcoatRoughness,q.clearcoatMap&&(re.clearcoatMap.value=q.clearcoatMap,l(q.clearcoatMap,re.clearcoatMapTransform)),q.clearcoatRoughnessMap&&(re.clearcoatRoughnessMap.value=q.clearcoatRoughnessMap,l(q.clearcoatRoughnessMap,re.clearcoatRoughnessMapTransform)),q.clearcoatNormalMap&&(re.clearcoatNormalMap.value=q.clearcoatNormalMap,l(q.clearcoatNormalMap,re.clearcoatNormalMapTransform),re.clearcoatNormalScale.value.copy(q.clearcoatNormalScale),q.side===T&&re.clearcoatNormalScale.value.negate())),q.iridescence>0&&(re.iridescence.value=q.iridescence,re.iridescenceIOR.value=q.iridescenceIOR,re.iridescenceThicknessMinimum.value=q.iridescenceThicknessRange[0],re.iridescenceThicknessMaximum.value=q.iridescenceThicknessRange[1],q.iridescenceMap&&(re.iridescenceMap.value=q.iridescenceMap,l(q.iridescenceMap,re.iridescenceMapTransform)),q.iridescenceThicknessMap&&(re.iridescenceThicknessMap.value=q.iridescenceThicknessMap,l(q.iridescenceThicknessMap,re.iridescenceThicknessMapTransform))),q.transmission>0&&(re.transmission.value=q.transmission,re.transmissionSamplerMap.value=Se.texture,re.transmissionSamplerSize.value.set(Se.width,Se.height),q.transmissionMap&&(re.transmissionMap.value=q.transmissionMap,l(q.transmissionMap,re.transmissionMapTransform)),re.thickness.value=q.thickness,q.thicknessMap&&(re.thicknessMap.value=q.thicknessMap,l(q.thicknessMap,re.thicknessMapTransform)),re.attenuationDistance.value=q.attenuationDistance,re.attenuationColor.value.copy(q.attenuationColor)),q.anisotropy>0&&(re.anisotropyVector.value.set(q.anisotropy*Math.cos(q.anisotropyRotation),q.anisotropy*Math.sin(q.anisotropyRotation)),q.anisotropyMap&&(re.anisotropyMap.value=q.anisotropyMap,l(q.anisotropyMap,re.anisotropyMapTransform))),re.specularIntensity.value=q.specularIntensity,re.specularColor.value.copy(q.specularColor),q.specularColorMap&&(re.specularColorMap.value=q.specularColorMap,l(q.specularColorMap,re.specularColorMapTransform)),q.specularIntensityMap&&(re.specularIntensityMap.value=q.specularIntensityMap,l(q.specularIntensityMap,re.specularIntensityMapTransform))}function ie(re,q){q.matcap&&(re.matcap.value=q.matcap)}function ue(re,q){const Se=r.get(q).light;re.referencePosition.value.setFromMatrixPosition(Se.matrixWorld),re.nearDistance.value=Se.shadow.camera.near,re.farDistance.value=Se.shadow.camera.far}return{refreshFogUniforms:m,refreshMaterialUniforms:y}}function GF(w,r,l,m){let y={},_={},R=[];const I=l.isWebGL2?w.getParameter(w.MAX_UNIFORM_BUFFER_BINDINGS):0;function O(Se,fe){const Me=fe.program;m.uniformBlockBinding(Se,Me)}function N(Se,fe){let Me=y[Se.id];Me===void 0&&(ie(Se),Me=V(Se),y[Se.id]=Me,Se.addEventListener("dispose",re));const ze=fe.program;m.updateUBOMapping(Se,ze);const He=r.render.frame;_[Se.id]!==He&&(X(Se),_[Se.id]=He)}function V(Se){const fe=Q();Se.__bindingPointIndex=fe;const Me=w.createBuffer(),ze=Se.__size,He=Se.usage;return w.bindBuffer(w.UNIFORM_BUFFER,Me),w.bufferData(w.UNIFORM_BUFFER,ze,He),w.bindBuffer(w.UNIFORM_BUFFER,null),w.bindBufferBase(w.UNIFORM_BUFFER,fe,Me),Me}function Q(){for(let Se=0;Se0){He=Me%ze;const bt=ze-He;He!==0&&bt-Xe.boundary<0&&(Me+=ze-He,Be.__offset=Me)}Me+=Xe.storage}return He=Me%ze,He>0&&(Me+=ze-He),Se.__size=Me,Se.__cache={},this}function ue(Se){const fe={boundary:0,storage:0};return typeof Se=="number"?(fe.boundary=4,fe.storage=4):Se.isVector2?(fe.boundary=8,fe.storage=8):Se.isVector3||Se.isColor?(fe.boundary=16,fe.storage=12):Se.isVector4?(fe.boundary=16,fe.storage=16):Se.isMatrix3?(fe.boundary=48,fe.storage=48):Se.isMatrix4?(fe.boundary=64,fe.storage=64):Se.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",Se),fe}function re(Se){const fe=Se.target;fe.removeEventListener("dispose",re);const Me=R.indexOf(fe.__bindingPointIndex);R.splice(Me,1),w.deleteBuffer(y[fe.id]),delete y[fe.id],delete _[fe.id]}function q(){for(const Se in y)w.deleteBuffer(y[Se]);R=[],y={},_={}}return{bind:O,update:N,dispose:q}}class gM{constructor(r={}){const{canvas:l=Wm(),context:m=null,depth:y=!0,stencil:_=!0,alpha:R=!1,antialias:I=!1,premultipliedAlpha:O=!0,preserveDrawingBuffer:N=!1,powerPreference:V="default",failIfMajorPerformanceCaveat:Q=!1,multiviewStereo:X=!1}=r;this.isWebGLRenderer=!0;let $;m!==null?$=m.getContextAttributes().alpha:$=R;const ie=new Uint32Array(4),ue=new Int32Array(4);let re=null,q=null;const Se=[],fe=[];this.domElement=l,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=Cr,this._useLegacyLights=!1,this.toneMapping=fn,this.toneMappingExposure=1;const Me=this;let ze=!1,He=0,et=0,st=null,Be=-1,Xe=null;const rt=new ur,bt=new ur;let Gt=null;const lt=new Hn(0);let wt=0,Kt=l.width,qt=l.height,ln=1,Jt=null,pn=null;const dn=new ur(0,0,Kt,qt),Qn=new ur(0,0,Kt,qt);let Qi=!1;const ki=new fg;let Ht=!1,Sn=!1,_n=null;const wi=new _i,ei=new en,ii=new je,yi={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function nn(){return st===null?ln:1}let ct=m;function hn(Ge,Et){for(let Bt=0;Bt{function Xn(){if(Ot.forEach(function(fi){ti.get(fi).currentProgram.isReady()&&Ot.delete(fi)}),Ot.size===0){Ut(Ge);return}setTimeout(Xn,10)}In.get("KHR_parallel_shader_compile")!==null?Xn():setTimeout(Xn,10)})};let En=null;function ui(Ge){En&&En(Ge)}function xr(){Ih.stop()}function Fs(){Ih.start()}const Ih=new nx;Ih.setAnimationLoop(ui),typeof self<"u"&&Ih.setContext(self),this.setAnimationLoop=function(Ge){En=Ge,ot.setAnimationLoop(Ge),Ge===null?Ih.stop():Ih.start()},ot.addEventListener("sessionstart",xr),ot.addEventListener("sessionend",Fs),this.render=function(Ge,Et){if(Et!==void 0&&Et.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(ze===!0)return;Ge.matrixWorldAutoUpdate===!0&&Ge.updateMatrixWorld(),Et.parent===null&&Et.matrixWorldAutoUpdate===!0&&Et.updateMatrixWorld(),ot.enabled===!0&&ot.isPresenting===!0&&(ot.cameraAutoUpdate===!0&&ot.updateCamera(Et),Et=ot.getCamera()),Ge.isScene===!0&&Ge.onBeforeRender(Me,Ge,Et,st),q=Ie.get(Ge,fe.length),q.init(),fe.push(q),wi.multiplyMatrices(Et.projectionMatrix,Et.matrixWorldInverse),ki.setFromProjectionMatrix(wi),Sn=this.localClippingEnabled,Ht=St.init(this.clippingPlanes,Sn),re=qe.get(Ge,Se.length),re.init(),Se.push(re),tC(Ge,Et,0,Me.sortObjects),re.finish(),Me.sortObjects===!0&&re.sort(Jt,pn),this.info.render.frame++,Ht===!0&&St.beginShadows();const Bt=q.state.shadowsArray;if(an.render(Bt,Ge,Et),Ht===!0&&St.endShadows(),this.info.autoReset===!0&&this.info.reset(),cn.render(re,Ge),q.setupLights(Me._useLegacyLights),Et.isArrayCamera)if(ot.enabled&&ot.isMultiview)gi.setDeferTextureUploads(!0),Jx(re,Ge,Et,Et.cameras[0].viewport);else{const Ot=Et.cameras;for(let Ut=0,Xn=Ot.length;Ut0?q=fe[fe.length-1]:q=null,Se.pop(),Se.length>0?re=Se[Se.length-1]:re=null};function tC(Ge,Et,Bt,Ot){if(Ge.visible===!1)return;if(Ge.layers.test(Et.layers)){if(Ge.isGroup)Bt=Ge.renderOrder;else if(Ge.isLOD)Ge.autoUpdate===!0&&Ge.update(Et);else if(Ge.isLight)q.pushLight(Ge),Ge.castShadow&&q.pushShadow(Ge);else if(Ge.isSprite){if(!Ge.frustumCulled||ki.intersectsSprite(Ge)){Ot&&ii.setFromMatrixPosition(Ge.matrixWorld).applyMatrix4(wi);const fi=gr.update(Ge),Ci=Ge.material;Ci.visible&&re.push(Ge,fi,Ci,Bt,ii.z,null)}}else if((Ge.isMesh||Ge.isLine||Ge.isPoints)&&(!Ge.frustumCulled||ki.intersectsObject(Ge))){const fi=gr.update(Ge),Ci=Ge.material;if(Ot&&(Ge.boundingSphere!==void 0?(Ge.boundingSphere===null&&Ge.computeBoundingSphere(),ii.copy(Ge.boundingSphere.center)):(fi.boundingSphere===null&&fi.computeBoundingSphere(),ii.copy(fi.boundingSphere.center)),ii.applyMatrix4(Ge.matrixWorld).applyMatrix4(wi)),Array.isArray(Ci)){const Oi=fi.groups;for(let Ji=0,Gi=Oi.length;Ji0&&R5(Ut,Xn,Et,Bt),Ot&&Gn.viewport(rt.copy(Ot)),Ut.length>0&&lA(Ut,Et,Bt),Xn.length>0&&lA(Xn,Et,Bt),fi.length>0&&lA(fi,Et,Bt),Gn.buffers.depth.setTest(!0),Gn.buffers.depth.setMask(!0),Gn.buffers.color.setMask(!0),Gn.setPolygonOffset(!1)}function R5(Ge,Et,Bt,Ot){if((Bt.isScene===!0?Bt.overrideMaterial:null)!==null)return;const Xn=rn.isWebGL2;_n===null&&(_n=new yo(1,1,{generateMipmaps:!0,type:In.has("EXT_color_buffer_half_float")?Fi:Rt,minFilter:Fn,samples:Xn?4:0})),Me.getDrawingBufferSize(ei),Xn?_n.setSize(ei.x,ei.y):_n.setSize(mu(ei.x),mu(ei.y));const fi=Me.getRenderTarget();Me.setRenderTarget(_n),Me.getClearColor(lt),wt=Me.getClearAlpha(),wt<1&&Me.setClearColor(16777215,.5),Me.clear();const Ci=Me.toneMapping;Me.toneMapping=fn,lA(Ge,Bt,Ot),gi.updateMultisampleRenderTarget(_n),gi.updateRenderTargetMipmap(_n);let Oi=!1;for(let Ji=0,Gi=Et.length;Ji0),Xi=!!Bt.morphAttributes.position,Jr=!!Bt.morphAttributes.normal,No=!!Bt.morphAttributes.color;let Ms=fn;Ot.toneMapped&&(st===null||st.isXRRenderTarget===!0)&&(Ms=Me.toneMapping);const Ac=st&&st.isWebGLMultiviewRenderTarget?st.numViews:0,jr=Bt.morphAttributes.position||Bt.morphAttributes.normal||Bt.morphAttributes.color,Bh=jr!==void 0?jr.length:0,fr=ti.get(Ot),P5=q.state.lights;if(Ht===!0&&(Sn===!0||Ge!==Xe)){const Uo=Ge===Xe&&Ot.id===Be;St.setState(Ot,Ge,Uo)}let Zr=!1;Ot.version===fr.__version?(fr.needsLights&&fr.lightsStateVersion!==P5.state.version||fr.outputColorSpace!==Ci||Ut.isInstancedMesh&&fr.instancing===!1||!Ut.isInstancedMesh&&fr.instancing===!0||Ut.isSkinnedMesh&&fr.skinning===!1||!Ut.isSkinnedMesh&&fr.skinning===!0||Ut.isInstancedMesh&&fr.instancingColor===!0&&Ut.instanceColor===null||Ut.isInstancedMesh&&fr.instancingColor===!1&&Ut.instanceColor!==null||fr.envMap!==Oi||Ot.fog===!0&&fr.fog!==Xn||fr.numClippingPlanes!==void 0&&(fr.numClippingPlanes!==St.numPlanes||fr.numIntersection!==St.numIntersection)||fr.vertexAlphas!==Ji||fr.vertexTangents!==Gi||fr.morphTargets!==Xi||fr.morphNormals!==Jr||fr.morphColors!==No||fr.toneMapping!==Ms||rn.isWebGL2===!0&&fr.morphTargetsCount!==Bh||fr.numMultiviewViews!==Ac)&&(Zr=!0):(Zr=!0,fr.__version=Ot.version);let Al=fr.currentProgram;Zr===!0&&(Al=cA(Ot,Et,Ut));let sC=!1,ap=!1,Zx=!1;const Cs=Al.getUniforms(),Lh=fr.uniforms;if(Gn.useProgram(Al.program)&&(sC=!0,ap=!0,Zx=!0),Ot.id!==Be&&(Be=Ot.id,ap=!0),sC||Xe!==Ge){Al.numMultiviewViews>0?(un.updateCameraProjectionMatricesUniform(Ge,Cs),un.updateCameraViewMatricesUniform(Ge,Cs)):(Cs.setValue(ct,"projectionMatrix",Ge.projectionMatrix),Cs.setValue(ct,"viewMatrix",Ge.matrixWorldInverse));const Uo=Cs.map.cameraPosition;Uo!==void 0&&Uo.setValue(ct,ii.setFromMatrixPosition(Ge.matrixWorld)),rn.logarithmicDepthBuffer&&Cs.setValue(ct,"logDepthBufFC",2/(Math.log(Ge.far+1)/Math.LN2)),(Ot.isMeshPhongMaterial||Ot.isMeshToonMaterial||Ot.isMeshLambertMaterial||Ot.isMeshBasicMaterial||Ot.isMeshStandardMaterial||Ot.isShaderMaterial)&&Cs.setValue(ct,"isOrthographic",Ge.isOrthographicCamera===!0),Xe!==Ge&&(Xe=Ge,ap=!0,Zx=!0)}if(Ut.isSkinnedMesh){Cs.setOptional(ct,Ut,"bindMatrix"),Cs.setOptional(ct,Ut,"bindMatrixInverse");const Uo=Ut.skeleton;Uo&&(rn.floatVertexTextures?(Uo.boneTexture===null&&Uo.computeBoneTexture(),Cs.setValue(ct,"boneTexture",Uo.boneTexture,gi),Cs.setValue(ct,"boneTextureSize",Uo.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const e1=Bt.morphAttributes;if((e1.position!==void 0||e1.normal!==void 0||e1.color!==void 0&&rn.isWebGL2===!0)&&hi.update(Ut,Bt,Al),(ap||fr.receiveShadow!==Ut.receiveShadow)&&(fr.receiveShadow=Ut.receiveShadow,Cs.setValue(ct,"receiveShadow",Ut.receiveShadow)),Ot.isMeshGouraudMaterial&&Ot.envMap!==null&&(Lh.envMap.value=Oi,Lh.flipEnvMap.value=Oi.isCubeTexture&&Oi.isRenderTargetTexture===!1?-1:1),ap&&(Cs.setValue(ct,"toneMappingExposure",Me.toneMappingExposure),fr.needsLights&&B5(Lh,Zx),Xn&&Ot.fog===!0&&Mo.refreshFogUniforms(Lh,Xn),Mo.refreshMaterialUniforms(Lh,Ot,ln,qt,_n),vg.upload(ct,iC(fr),Lh,gi)),Ot.isShaderMaterial&&Ot.uniformsNeedUpdate===!0&&(vg.upload(ct,iC(fr),Lh,gi),Ot.uniformsNeedUpdate=!1),Ot.isSpriteMaterial&&Cs.setValue(ct,"center",Ut.center),Al.numMultiviewViews>0?un.updateObjectMatricesUniforms(Ut,Ge,Cs):(Cs.setValue(ct,"modelViewMatrix",Ut.modelViewMatrix),Cs.setValue(ct,"normalMatrix",Ut.normalMatrix)),Cs.setValue(ct,"modelMatrix",Ut.matrixWorld),Ot.isShaderMaterial||Ot.isRawShaderMaterial){const Uo=Ot.uniformsGroups;for(let t1=0,D5=Uo.length;t10&&gi.useMultisampledRTT(Ge)===!1?Ut=ti.get(Ge).__webglMultisampledFramebuffer:Array.isArray(Gi)?Ut=Gi[Bt]:Ut=Gi,rt.copy(Ge.viewport),bt.copy(Ge.scissor),Gt=Ge.scissorTest}else rt.copy(dn).multiplyScalar(ln).floor(),bt.copy(Qn).multiplyScalar(ln).floor(),Gt=Qi;if(Gn.bindFramebuffer(ct.FRAMEBUFFER,Ut)&&rn.drawBuffers&&Ot&&Gn.drawBuffers(Ge,Ut),Gn.viewport(rt),Gn.scissor(bt),Gn.setScissorTest(Gt),Xn){const Oi=ti.get(Ge.texture);ct.framebufferTexture2D(ct.FRAMEBUFFER,ct.COLOR_ATTACHMENT0,ct.TEXTURE_CUBE_MAP_POSITIVE_X+Et,Oi.__webglTexture,Bt)}else if(fi){const Oi=ti.get(Ge.texture),Ji=Et||0;ct.framebufferTextureLayer(ct.FRAMEBUFFER,ct.COLOR_ATTACHMENT0,Oi.__webglTexture,Bt||0,Ji)}Be=-1},this.readRenderTargetPixels=function(Ge,Et,Bt,Ot,Ut,Xn,fi){if(!(Ge&&Ge.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ci=ti.get(Ge).__webglFramebuffer;if(Ge.isWebGLCubeRenderTarget&&fi!==void 0&&(Ci=Ci[fi]),Ci){Gn.bindFramebuffer(ct.FRAMEBUFFER,Ci);try{const Oi=Ge.texture,Ji=Oi.format,Gi=Oi.type;if(Ji!==ht&&Ai.convert(Ji)!==ct.getParameter(ct.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Xi=Gi===Fi&&(In.has("EXT_color_buffer_half_float")||rn.isWebGL2&&In.has("EXT_color_buffer_float"));if(Gi!==Rt&&Ai.convert(Gi)!==ct.getParameter(ct.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Gi===Ei&&(rn.isWebGL2||In.has("OES_texture_float")||In.has("WEBGL_color_buffer_float")))&&!Xi){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Et>=0&&Et<=Ge.width-Ot&&Bt>=0&&Bt<=Ge.height-Ut&&ct.readPixels(Et,Bt,Ot,Ut,Ai.convert(Ji),Ai.convert(Gi),Xn)}finally{const Oi=st!==null?ti.get(st).__webglFramebuffer:null;Gn.bindFramebuffer(ct.FRAMEBUFFER,Oi)}}},this.copyFramebufferToTexture=function(Ge,Et,Bt=0){const Ot=Math.pow(2,-Bt),Ut=Math.floor(Et.image.width*Ot),Xn=Math.floor(Et.image.height*Ot);gi.setTexture2D(Et,0),ct.copyTexSubImage2D(ct.TEXTURE_2D,Bt,0,0,Ge.x,Ge.y,Ut,Xn),Gn.unbindTexture()},this.copyTextureToTexture=function(Ge,Et,Bt,Ot=0){const Ut=Et.image.width,Xn=Et.image.height,fi=Ai.convert(Bt.format),Ci=Ai.convert(Bt.type);gi.setTexture2D(Bt,0),ct.pixelStorei(ct.UNPACK_FLIP_Y_WEBGL,Bt.flipY),ct.pixelStorei(ct.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Bt.premultiplyAlpha),ct.pixelStorei(ct.UNPACK_ALIGNMENT,Bt.unpackAlignment),Et.isDataTexture?ct.texSubImage2D(ct.TEXTURE_2D,Ot,Ge.x,Ge.y,Ut,Xn,fi,Ci,Et.image.data):Et.isCompressedTexture?ct.compressedTexSubImage2D(ct.TEXTURE_2D,Ot,Ge.x,Ge.y,Et.mipmaps[0].width,Et.mipmaps[0].height,fi,Et.mipmaps[0].data):ct.texSubImage2D(ct.TEXTURE_2D,Ot,Ge.x,Ge.y,fi,Ci,Et.image),Ot===0&&Bt.generateMipmaps&&ct.generateMipmap(ct.TEXTURE_2D),Gn.unbindTexture()},this.copyTextureToTexture3D=function(Ge,Et,Bt,Ot,Ut=0){if(Me.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Xn=Ge.max.x-Ge.min.x+1,fi=Ge.max.y-Ge.min.y+1,Ci=Ge.max.z-Ge.min.z+1,Oi=Ai.convert(Ot.format),Ji=Ai.convert(Ot.type);let Gi;if(Ot.isData3DTexture)gi.setTexture3D(Ot,0),Gi=ct.TEXTURE_3D;else if(Ot.isDataArrayTexture)gi.setTexture2DArray(Ot,0),Gi=ct.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}ct.pixelStorei(ct.UNPACK_FLIP_Y_WEBGL,Ot.flipY),ct.pixelStorei(ct.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ot.premultiplyAlpha),ct.pixelStorei(ct.UNPACK_ALIGNMENT,Ot.unpackAlignment);const Xi=ct.getParameter(ct.UNPACK_ROW_LENGTH),Jr=ct.getParameter(ct.UNPACK_IMAGE_HEIGHT),No=ct.getParameter(ct.UNPACK_SKIP_PIXELS),Ms=ct.getParameter(ct.UNPACK_SKIP_ROWS),Ac=ct.getParameter(ct.UNPACK_SKIP_IMAGES),jr=Bt.isCompressedTexture?Bt.mipmaps[0]:Bt.image;ct.pixelStorei(ct.UNPACK_ROW_LENGTH,jr.width),ct.pixelStorei(ct.UNPACK_IMAGE_HEIGHT,jr.height),ct.pixelStorei(ct.UNPACK_SKIP_PIXELS,Ge.min.x),ct.pixelStorei(ct.UNPACK_SKIP_ROWS,Ge.min.y),ct.pixelStorei(ct.UNPACK_SKIP_IMAGES,Ge.min.z),Bt.isDataTexture||Bt.isData3DTexture?ct.texSubImage3D(Gi,Ut,Et.x,Et.y,Et.z,Xn,fi,Ci,Oi,Ji,jr.data):Bt.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ct.compressedTexSubImage3D(Gi,Ut,Et.x,Et.y,Et.z,Xn,fi,Ci,Oi,jr.data)):ct.texSubImage3D(Gi,Ut,Et.x,Et.y,Et.z,Xn,fi,Ci,Oi,Ji,jr),ct.pixelStorei(ct.UNPACK_ROW_LENGTH,Xi),ct.pixelStorei(ct.UNPACK_IMAGE_HEIGHT,Jr),ct.pixelStorei(ct.UNPACK_SKIP_PIXELS,No),ct.pixelStorei(ct.UNPACK_SKIP_ROWS,Ms),ct.pixelStorei(ct.UNPACK_SKIP_IMAGES,Ac),Ut===0&&Ot.generateMipmaps&&ct.generateMipmap(Gi),Gn.unbindTexture()},this.initTexture=function(Ge){Ge.isCubeTexture?gi.setTextureCube(Ge,0):Ge.isData3DTexture?gi.setTexture3D(Ge,0):Ge.isDataArrayTexture||Ge.isCompressedArrayTexture?gi.setTexture2DArray(Ge,0):gi.setTexture2D(Ge,0),Gn.unbindTexture()},this.resetState=function(){He=0,et=0,st=null,Gn.reset(),sr.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Yo}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(r){this._outputColorSpace=r;const l=this.getContext();l.drawingBufferColorSpace=r===fu?"display-p3":"srgb",l.unpackColorSpace=vr.workingColorSpace===ih?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(r){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!r}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Cr?Kr:eo}set outputEncoding(r){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=r===Kr?Cr:pr}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(r){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=r}}class AM extends gM{}AM.prototype.isWebGL1Renderer=!0;class yg{constructor(r,l=25e-5){this.isFogExp2=!0,this.name="",this.color=new Hn(r),this.density=l}clone(){return new yg(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class xg{constructor(r,l=1,m=1e3){this.isFog=!0,this.name="",this.color=new Hn(r),this.near=l,this.far=m}clone(){return new xg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class vM extends mr{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(r,l){return super.copy(r,l),r.background!==null&&(this.background=r.background.clone()),r.environment!==null&&(this.environment=r.environment.clone()),r.fog!==null&&(this.fog=r.fog.clone()),this.backgroundBlurriness=r.backgroundBlurriness,this.backgroundIntensity=r.backgroundIntensity,r.overrideMaterial!==null&&(this.overrideMaterial=r.overrideMaterial.clone()),this.matrixAutoUpdate=r.matrixAutoUpdate,this}toJSON(r){const l=super.toJSON(r);return this.fog!==null&&(l.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(l.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(l.object.backgroundIntensity=this.backgroundIntensity),l}}class Eg{constructor(r,l){this.isInterleavedBuffer=!0,this.array=r,this.stride=l,this.count=r!==void 0?r.length/l:0,this.usage=ah,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=no()}onUploadCallback(){}set needsUpdate(r){r===!0&&this.version++}setUsage(r){return this.usage=r,this}copy(r){return this.array=new r.array.constructor(r.array),this.count=r.count,this.stride=r.stride,this.usage=r.usage,this}copyAt(r,l,m){r*=this.stride,m*=l.stride;for(let y=0,_=this.stride;y<_;y++)this.array[r+y]=l.array[m+y];return this}set(r,l=0){return this.array.set(r,l),this}clone(r){r.arrayBuffers===void 0&&(r.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=no()),r.arrayBuffers[this.array.buffer._uuid]===void 0&&(r.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const l=new this.array.constructor(r.arrayBuffers[this.array.buffer._uuid]),m=new this.constructor(l,this.stride);return m.setUsage(this.usage),m}onUpload(r){return this.onUploadCallback=r,this}toJSON(r){return r.arrayBuffers===void 0&&(r.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=no()),r.arrayBuffers[this.array.buffer._uuid]===void 0&&(r.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const so=new je;class vh{constructor(r,l,m,y=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=r,this.itemSize=l,this.offset=m,this.normalized=y}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(r){this.data.needsUpdate=r}applyMatrix4(r){for(let l=0,m=this.data.count;lr.far||l.push({distance:O,point:Gf.clone(),uv:bo.getInterpolation(Gf,bg,Hf,_g,xM,gx,EM,new en),face:null,object:this})}copy(r,l){return super.copy(r,l),r.center!==void 0&&this.center.copy(r.center),this.material=r.material,this}}function wg(w,r,l,m,y,_){ku.subVectors(w,l).addScalar(.5).multiply(m),y!==void 0?(Vf.x=_*ku.x-y*ku.y,Vf.y=y*ku.x+_*ku.y):Vf.copy(ku),w.copy(r),w.x+=Vf.x,w.y+=Vf.y,w.applyMatrix4(yM)}const Mg=new je,_M=new je;class wM extends mr{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(r){super.copy(r,!1);const l=r.levels;for(let m=0,y=l.length;m0){let m,y;for(m=1,y=l.length;m0){Mg.setFromMatrixPosition(this.matrixWorld);const y=r.ray.origin.distanceTo(Mg);this.getObjectForDistance(y).raycast(r,l)}}update(r){const l=this.levels;if(l.length>1){Mg.setFromMatrixPosition(r.matrixWorld),_M.setFromMatrixPosition(this.matrixWorld);const m=Mg.distanceTo(_M)/r.zoom;l[0].object.visible=!0;let y,_;for(y=1,_=l.length;y<_;y++){let R=l[y].distance;if(l[y].object.visible&&(R-=R*l[y].hysteresis),m>=R)l[y-1].object.visible=!1,l[y].object.visible=!0;else break}for(this._currentLevel=y-1;y<_;y++)l[y].object.visible=!1}}toJSON(r){const l=super.toJSON(r);this.autoUpdate===!1&&(l.object.autoUpdate=!1),l.object.levels=[];const m=this.levels;for(let y=0,_=m.length;y<_;y++){const R=m[y];l.object.levels.push({object:R.object.uuid,distance:R.distance,hysteresis:R.hysteresis})}return l}}const MM=new je,CM=new ur,SM=new ur,VF=new je,TM=new _i,Cg=new je,Ax=new Eo,RM=new _i,vx=new Vs;class IM extends Os{constructor(r,l){super(r,l),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=De,this.bindMatrix=new _i,this.bindMatrixInverse=new _i,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const r=this.geometry;this.boundingBox===null&&(this.boundingBox=new er),this.boundingBox.makeEmpty();const l=r.getAttribute("position");for(let m=0;mO)continue;X.applyMatrix4(this.matrixWorld);const st=r.ray.origin.distanceTo(X);str.far||l.push({distance:st,point:Q.clone().applyMatrix4(this.matrixWorld),index:fe,face:null,faceIndex:null,object:this})}}else{const q=Math.max(0,R.start),Se=Math.min(re.count,R.start+R.count);for(let fe=q,Me=Se-1;feO)continue;X.applyMatrix4(this.matrixWorld);const He=r.ray.origin.distanceTo(X);Her.far||l.push({distance:He,point:Q.clone().applyMatrix4(this.matrixWorld),index:fe,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const l=this.geometry.morphAttributes,m=Object.keys(l);if(m.length>0){const y=l[m[0]];if(y!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,R=y.length;_0){const y=l[m[0]];if(y!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,R=y.length;_y.far)return;_.push({distance:N,distanceToRay:Math.sqrt(I),point:O,index:r,face:null,object:R})}}class WF extends Ir{constructor(r,l,m,y,_,R,I,O,N){super(r,l,m,y,_,R,I,O,N),this.isVideoTexture=!0,this.minFilter=R!==void 0?R:Bn,this.magFilter=_!==void 0?_:Bn,this.generateMipmaps=!1;const V=this;function Q(){V.needsUpdate=!0,r.requestVideoFrameCallback(Q)}"requestVideoFrameCallback"in r&&r.requestVideoFrameCallback(Q)}clone(){return new this.constructor(this.image).copy(this)}update(){const r=this.image;"requestVideoFrameCallback"in r===!1&&r.readyState>=r.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class QF extends Ir{constructor(r,l){super({width:r,height:l}),this.isFramebufferTexture=!0,this.magFilter=at,this.minFilter=at,this.generateMipmaps=!1,this.needsUpdate=!0}}class Lg extends Ir{constructor(r,l,m,y,_,R,I,O,N,V,Q,X){super(null,R,I,O,N,V,y,_,Q,X),this.isCompressedTexture=!0,this.image={width:l,height:m},this.mipmaps=r,this.flipY=!1,this.generateMipmaps=!1}}class XF extends Lg{constructor(r,l,m,y,_,R){super(r,l,m,_,R),this.isCompressedArrayTexture=!0,this.image.depth=y,this.wrapR=We}}class KF extends Lg{constructor(r,l,m){super(void 0,r[0].width,r[0].height,l,m,Qe),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=r}}class qF extends Ir{constructor(r,l,m,y,_,R,I,O,N){super(r,l,m,y,_,R,I,O,N),this.isCanvasTexture=!0,this.needsUpdate=!0}}class pa{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(r,l){const m=this.getUtoTmapping(r);return this.getPoint(m,l)}getPoints(r=5){const l=[];for(let m=0;m<=r;m++)l.push(this.getPoint(m/r));return l}getSpacedPoints(r=5){const l=[];for(let m=0;m<=r;m++)l.push(this.getPointAt(m/r));return l}getLength(){const r=this.getLengths();return r[r.length-1]}getLengths(r=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===r+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const l=[];let m,y=this.getPoint(0),_=0;l.push(0);for(let R=1;R<=r;R++)m=this.getPoint(R/r),_+=m.distanceTo(y),l.push(_),y=m;return this.cacheArcLengths=l,l}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(r,l){const m=this.getLengths();let y=0;const _=m.length;let R;l?R=l:R=r*m[_-1];let I=0,O=_-1,N;for(;I<=O;)if(y=Math.floor(I+(O-I)/2),N=m[y]-R,N<0)I=y+1;else if(N>0)O=y-1;else{O=y;break}if(y=O,m[y]===R)return y/(_-1);const V=m[y],X=m[y+1]-V,$=(R-V)/X;return(y+$)/(_-1)}getTangent(r,l){let y=r-1e-4,_=r+1e-4;y<0&&(y=0),_>1&&(_=1);const R=this.getPoint(y),I=this.getPoint(_),O=l||(R.isVector2?new en:new je);return O.copy(I).sub(R).normalize(),O}getTangentAt(r,l){const m=this.getUtoTmapping(r);return this.getTangent(m,l)}computeFrenetFrames(r,l){const m=new je,y=[],_=[],R=[],I=new je,O=new _i;for(let $=0;$<=r;$++){const ie=$/r;y[$]=this.getTangentAt(ie,new je)}_[0]=new je,R[0]=new je;let N=Number.MAX_VALUE;const V=Math.abs(y[0].x),Q=Math.abs(y[0].y),X=Math.abs(y[0].z);V<=N&&(N=V,m.set(1,0,0)),Q<=N&&(N=Q,m.set(0,1,0)),X<=N&&m.set(0,0,1),I.crossVectors(y[0],m).normalize(),_[0].crossVectors(y[0],I),R[0].crossVectors(y[0],_[0]);for(let $=1;$<=r;$++){if(_[$]=_[$-1].clone(),R[$]=R[$-1].clone(),I.crossVectors(y[$-1],y[$]),I.length()>Number.EPSILON){I.normalize();const ie=Math.acos(Nr(y[$-1].dot(y[$]),-1,1));_[$].applyMatrix4(O.makeRotationAxis(I,ie))}R[$].crossVectors(y[$],_[$])}if(l===!0){let $=Math.acos(Nr(_[0].dot(_[r]),-1,1));$/=r,y[0].dot(I.crossVectors(_[0],_[r]))>0&&($=-$);for(let ie=1;ie<=r;ie++)_[ie].applyMatrix4(O.makeRotationAxis(y[ie],$*ie)),R[ie].crossVectors(y[ie],_[ie])}return{tangents:y,normals:_,binormals:R}}clone(){return new this.constructor().copy(this)}copy(r){return this.arcLengthDivisions=r.arcLengthDivisions,this}toJSON(){const r={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return r.arcLengthDivisions=this.arcLengthDivisions,r.type=this.type,r}fromJSON(r){return this.arcLengthDivisions=r.arcLengthDivisions,this}}class Pg extends pa{constructor(r=0,l=0,m=1,y=1,_=0,R=Math.PI*2,I=!1,O=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=r,this.aY=l,this.xRadius=m,this.yRadius=y,this.aStartAngle=_,this.aEndAngle=R,this.aClockwise=I,this.aRotation=O}getPoint(r,l){const m=l||new en,y=Math.PI*2;let _=this.aEndAngle-this.aStartAngle;const R=Math.abs(_)y;)_-=y;_0?0:(Math.floor(Math.abs(I)/_)+1)*_:O===0&&I===_-1&&(I=_-2,O=1);let N,V;this.closed||I>0?N=y[(I-1)%_]:(Dg.subVectors(y[0],y[1]).add(y[0]),N=Dg);const Q=y[I%_],X=y[(I+1)%_];if(this.closed||I+2<_?V=y[(I+2)%_]:(Dg.subVectors(y[_-1],y[_-2]).add(y[_-1]),V=Dg),this.curveType==="centripetal"||this.curveType==="chordal"){const $=this.curveType==="chordal"?.5:.25;let ie=Math.pow(N.distanceToSquared(Q),$),ue=Math.pow(Q.distanceToSquared(X),$),re=Math.pow(X.distanceToSquared(V),$);ue<1e-4&&(ue=1),ie<1e-4&&(ie=ue),re<1e-4&&(re=ue),wx.initNonuniformCatmullRom(N.x,Q.x,X.x,V.x,ie,ue,re),Mx.initNonuniformCatmullRom(N.y,Q.y,X.y,V.y,ie,ue,re),Cx.initNonuniformCatmullRom(N.z,Q.z,X.z,V.z,ie,ue,re)}else this.curveType==="catmullrom"&&(wx.initCatmullRom(N.x,Q.x,X.x,V.x,this.tension),Mx.initCatmullRom(N.y,Q.y,X.y,V.y,this.tension),Cx.initCatmullRom(N.z,Q.z,X.z,V.z,this.tension));return m.set(wx.calc(O),Mx.calc(O),Cx.calc(O)),m}copy(r){super.copy(r),this.points=[];for(let l=0,m=r.points.length;ly.length-2?y.length-1:R+1],Q=y[R>y.length-3?y.length-1:R+2];return m.set(QM(I,O.x,N.x,V.x,Q.x),QM(I,O.y,N.y,V.y,Q.y)),m}copy(r){super.copy(r),this.points=[];for(let l=0,m=r.points.length;l=m){const R=y[_]-m,I=this.curves[_],O=I.getLength(),N=O===0?0:1-R/O;return I.getPointAt(N,l)}_++}return null}getLength(){const r=this.getCurveLengths();return r[r.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 r=[];let l=0;for(let m=0,y=this.curves.length;m1&&!l[l.length-1].equals(l[0])&&l.push(l[0]),l}copy(r){super.copy(r),this.curves=[];for(let l=0,m=r.curves.length;l0){const Q=N.getPoint(0);Q.equals(this.currentPoint)||this.lineTo(Q.x,Q.y)}this.curves.push(N);const V=N.getPoint(1);return this.currentPoint.copy(V),this}copy(r){return super.copy(r),this.currentPoint.copy(r.currentPoint),this}toJSON(){const r=super.toJSON();return r.currentPoint=this.currentPoint.toArray(),r}fromJSON(r){return super.fromJSON(r),this.currentPoint.fromArray(r.currentPoint),this}}class qf extends Yi{constructor(r=[new en(0,-.5),new en(.5,0),new en(0,.5)],l=12,m=0,y=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:r,segments:l,phiStart:m,phiLength:y},l=Math.floor(l),y=Nr(y,0,Math.PI*2);const _=[],R=[],I=[],O=[],N=[],V=1/l,Q=new je,X=new en,$=new je,ie=new je,ue=new je;let re=0,q=0;for(let Se=0;Se<=r.length-1;Se++)switch(Se){case 0:re=r[Se+1].x-r[Se].x,q=r[Se+1].y-r[Se].y,$.x=q*1,$.y=-re,$.z=q*0,ue.copy($),$.normalize(),O.push($.x,$.y,$.z);break;case r.length-1:O.push(ue.x,ue.y,ue.z);break;default:re=r[Se+1].x-r[Se].x,q=r[Se+1].y-r[Se].y,$.x=q*1,$.y=-re,$.z=q*0,ie.copy($),$.x+=ue.x,$.y+=ue.y,$.z+=ue.z,$.normalize(),O.push($.x,$.y,$.z),ue.copy(ie)}for(let Se=0;Se<=l;Se++){const fe=m+Se*V*y,Me=Math.sin(fe),ze=Math.cos(fe);for(let He=0;He<=r.length-1;He++){Q.x=r[He].x*Me,Q.y=r[He].y,Q.z=r[He].x*ze,R.push(Q.x,Q.y,Q.z),X.x=Se/l,X.y=He/(r.length-1),I.push(X.x,X.y);const et=O[3*He+0]*Me,st=O[3*He+1],Be=O[3*He+0]*ze;N.push(et,st,Be)}}for(let Se=0;Se0&&fe(!0),l>0&&fe(!1)),this.setIndex(V),this.setAttribute("position",new ni(Q,3)),this.setAttribute("normal",new ni(X,3)),this.setAttribute("uv",new ni($,2));function Se(){const Me=new je,ze=new je;let He=0;const et=(l-r)/m;for(let st=0;st<=_;st++){const Be=[],Xe=st/_,rt=Xe*(l-r)+r;for(let bt=0;bt<=y;bt++){const Gt=bt/y,lt=Gt*O+I,wt=Math.sin(lt),Kt=Math.cos(lt);ze.x=rt*wt,ze.y=-Xe*m+re,ze.z=rt*Kt,Q.push(ze.x,ze.y,ze.z),Me.set(wt,et,Kt).normalize(),X.push(Me.x,Me.y,Me.z),$.push(Gt,1-Xe),Be.push(ie++)}ue.push(Be)}for(let st=0;st.9&&et<.1&&(fe<.2&&(R[Se+0]+=1),Me<.2&&(R[Se+2]+=1),ze<.2&&(R[Se+4]+=1))}}function X(Se){_.push(Se.x,Se.y,Se.z)}function $(Se,fe){const Me=Se*3;fe.x=r[Me+0],fe.y=r[Me+1],fe.z=r[Me+2]}function ie(){const Se=new je,fe=new je,Me=new je,ze=new je,He=new en,et=new en,st=new en;for(let Be=0,Xe=0;Be<_.length;Be+=9,Xe+=6){Se.set(_[Be+0],_[Be+1],_[Be+2]),fe.set(_[Be+3],_[Be+4],_[Be+5]),Me.set(_[Be+6],_[Be+7],_[Be+8]),He.set(R[Xe+0],R[Xe+1]),et.set(R[Xe+2],R[Xe+3]),st.set(R[Xe+4],R[Xe+5]),ze.copy(Se).add(fe).add(Me).divideScalar(3);const rt=re(ze);ue(He,Xe+0,Se,rt),ue(et,Xe+2,fe,rt),ue(st,Xe+4,Me,rt)}}function ue(Se,fe,Me,ze){ze<0&&Se.x===1&&(R[fe]=Se.x-1),Me.x===0&&Me.z===0&&(R[fe]=ze/2/Math.PI+.5)}function re(Se){return Math.atan2(Se.z,-Se.x)}function q(Se){return Math.atan2(-Se.y,Math.sqrt(Se.x*Se.x+Se.z*Se.z))}}copy(r){return super.copy(r),this.parameters=Object.assign({},r.parameters),this}static fromJSON(r){return new pc(r.vertices,r.indices,r.radius,r.details)}}class kg extends pc{constructor(r=1,l=0){const m=(1+Math.sqrt(5))/2,y=1/m,_=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-y,-m,0,-y,m,0,y,-m,0,y,m,-y,-m,0,-y,m,0,y,-m,0,y,m,0,-m,0,-y,m,0,-y,-m,0,y,m,0,y],R=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(_,R,r,l),this.type="DodecahedronGeometry",this.parameters={radius:r,detail:l}}static fromJSON(r){return new kg(r.radius,r.detail)}}const zg=new je,Gg=new je,Lx=new je,Vg=new bo;class YM extends Yi{constructor(r=null,l=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:r,thresholdAngle:l},r!==null){const y=Math.pow(10,4),_=Math.cos(al*l),R=r.getIndex(),I=r.getAttribute("position"),O=R?R.count:I.count,N=[0,0,0],V=["a","b","c"],Q=new Array(3),X={},$=[];for(let ie=0;ie80*l){I=N=w[0],O=V=w[1];for(let ie=l;ieN&&(N=Q),X>V&&(V=X);$=Math.max(N-I,V-O),$=$!==0?32767/$:0}return Yf(_,R,l,I,O,$,0),R}};function $M(w,r,l,m,y){let _,R;if(y===yN(w,r,l,m)>0)for(_=r;_=r;_-=m)R=e2(_,w[_],w[_+1],R);return R&&Hg(R,R.next)&&(Jf(R),R=R.next),R}function xh(w,r){if(!w)return w;r||(r=w);let l=w,m;do if(m=!1,!l.steiner&&(Hg(l,l.next)||Hr(l.prev,l,l.next)===0)){if(Jf(l),l=r=l.prev,l===l.next)break;m=!0}else l=l.next;while(m||l!==r);return r}function Yf(w,r,l,m,y,_,R){if(!w)return;!R&&_&&fN(w,m,y,_);let I=w,O,N;for(;w.prev!==w.next;){if(O=w.prev,N=w.next,_?sN(w,m,y,_):rN(w)){r.push(O.i/l|0),r.push(w.i/l|0),r.push(N.i/l|0),Jf(w),w=N.next,I=N.next;continue}if(w=N,w===I){R?R===1?(w=oN(xh(w),r,l),Yf(w,r,l,m,y,_,2)):R===2&&aN(w,r,l,m,y,_):Yf(xh(w),r,l,m,y,_,1);break}}}function rN(w){const r=w.prev,l=w,m=w.next;if(Hr(r,l,m)>=0)return!1;const y=r.x,_=l.x,R=m.x,I=r.y,O=l.y,N=m.y,V=y<_?y_?y>R?y:R:_>R?_:R,$=I>O?I>N?I:N:O>N?O:N;let ie=m.next;for(;ie!==r;){if(ie.x>=V&&ie.x<=X&&ie.y>=Q&&ie.y<=$&&ju(y,I,_,O,R,N,ie.x,ie.y)&&Hr(ie.prev,ie,ie.next)>=0)return!1;ie=ie.next}return!0}function sN(w,r,l,m){const y=w.prev,_=w,R=w.next;if(Hr(y,_,R)>=0)return!1;const I=y.x,O=_.x,N=R.x,V=y.y,Q=_.y,X=R.y,$=IO?I>N?I:N:O>N?O:N,re=V>Q?V>X?V:X:Q>X?Q:X,q=Px($,ie,r,l,m),Se=Px(ue,re,r,l,m);let fe=w.prevZ,Me=w.nextZ;for(;fe&&fe.z>=q&&Me&&Me.z<=Se;){if(fe.x>=$&&fe.x<=ue&&fe.y>=ie&&fe.y<=re&&fe!==y&&fe!==R&&ju(I,V,O,Q,N,X,fe.x,fe.y)&&Hr(fe.prev,fe,fe.next)>=0||(fe=fe.prevZ,Me.x>=$&&Me.x<=ue&&Me.y>=ie&&Me.y<=re&&Me!==y&&Me!==R&&ju(I,V,O,Q,N,X,Me.x,Me.y)&&Hr(Me.prev,Me,Me.next)>=0))return!1;Me=Me.nextZ}for(;fe&&fe.z>=q;){if(fe.x>=$&&fe.x<=ue&&fe.y>=ie&&fe.y<=re&&fe!==y&&fe!==R&&ju(I,V,O,Q,N,X,fe.x,fe.y)&&Hr(fe.prev,fe,fe.next)>=0)return!1;fe=fe.prevZ}for(;Me&&Me.z<=Se;){if(Me.x>=$&&Me.x<=ue&&Me.y>=ie&&Me.y<=re&&Me!==y&&Me!==R&&ju(I,V,O,Q,N,X,Me.x,Me.y)&&Hr(Me.prev,Me,Me.next)>=0)return!1;Me=Me.nextZ}return!0}function oN(w,r,l){let m=w;do{const y=m.prev,_=m.next.next;!Hg(y,_)&&JM(y,m,m.next,_)&&$f(y,_)&&$f(_,y)&&(r.push(y.i/l|0),r.push(m.i/l|0),r.push(_.i/l|0),Jf(m),Jf(m.next),m=w=_),m=m.next}while(m!==w);return xh(m)}function aN(w,r,l,m,y,_){let R=w;do{let I=R.next.next;for(;I!==R.prev;){if(R.i!==I.i&&gN(R,I)){let O=ZM(R,I);R=xh(R,R.next),O=xh(O,O.next),Yf(R,r,l,m,y,_,0),Yf(O,r,l,m,y,_,0);return}I=I.next}R=R.next}while(R!==w)}function lN(w,r,l,m){const y=[];let _,R,I,O,N;for(_=0,R=r.length;_=l.next.y&&l.next.y!==l.y){const X=l.x+(R-l.y)*(l.next.x-l.x)/(l.next.y-l.y);if(X<=_&&X>m&&(m=X,y=l.x=l.x&&l.x>=O&&_!==l.x&&ju(Ry.x||l.x===y.x&&dN(y,l)))&&(y=l,V=Q)),l=l.next;while(l!==I);return y}function dN(w,r){return Hr(w.prev,w,r.prev)<0&&Hr(r.next,w,w.next)<0}function fN(w,r,l,m){let y=w;do y.z===0&&(y.z=Px(y.x,y.y,r,l,m)),y.prevZ=y.prev,y.nextZ=y.next,y=y.next;while(y!==w);y.prevZ.nextZ=null,y.prevZ=null,pN(y)}function pN(w){let r,l,m,y,_,R,I,O,N=1;do{for(l=w,w=null,_=null,R=0;l;){for(R++,m=l,I=0,r=0;r0||O>0&&m;)I!==0&&(O===0||!m||l.z<=m.z)?(y=l,l=l.nextZ,I--):(y=m,m=m.nextZ,O--),_?_.nextZ=y:w=y,y.prevZ=_,_=y;l=m}_.nextZ=null,N*=2}while(R>1);return w}function Px(w,r,l,m,y){return w=(w-l)*y|0,r=(r-m)*y|0,w=(w|w<<8)&16711935,w=(w|w<<4)&252645135,w=(w|w<<2)&858993459,w=(w|w<<1)&1431655765,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,w|r<<1}function mN(w){let r=w,l=w;do(r.x=(w-R)*(_-I)&&(w-R)*(m-I)>=(l-R)*(r-I)&&(l-R)*(_-I)>=(y-R)*(m-I)}function gN(w,r){return w.next.i!==r.i&&w.prev.i!==r.i&&!AN(w,r)&&($f(w,r)&&$f(r,w)&&vN(w,r)&&(Hr(w.prev,w,r.prev)||Hr(w,r.prev,r))||Hg(w,r)&&Hr(w.prev,w,w.next)>0&&Hr(r.prev,r,r.next)>0)}function Hr(w,r,l){return(r.y-w.y)*(l.x-r.x)-(r.x-w.x)*(l.y-r.y)}function Hg(w,r){return w.x===r.x&&w.y===r.y}function JM(w,r,l,m){const y=Wg(Hr(w,r,l)),_=Wg(Hr(w,r,m)),R=Wg(Hr(l,m,w)),I=Wg(Hr(l,m,r));return!!(y!==_&&R!==I||y===0&&jg(w,l,r)||_===0&&jg(w,m,r)||R===0&&jg(l,w,m)||I===0&&jg(l,r,m))}function jg(w,r,l){return r.x<=Math.max(w.x,l.x)&&r.x>=Math.min(w.x,l.x)&&r.y<=Math.max(w.y,l.y)&&r.y>=Math.min(w.y,l.y)}function Wg(w){return w>0?1:w<0?-1:0}function AN(w,r){let l=w;do{if(l.i!==w.i&&l.next.i!==w.i&&l.i!==r.i&&l.next.i!==r.i&&JM(l,l.next,w,r))return!0;l=l.next}while(l!==w);return!1}function $f(w,r){return Hr(w.prev,w,w.next)<0?Hr(w,r,w.next)>=0&&Hr(w,w.prev,r)>=0:Hr(w,r,w.prev)<0||Hr(w,w.next,r)<0}function vN(w,r){let l=w,m=!1;const y=(w.x+r.x)/2,_=(w.y+r.y)/2;do l.y>_!=l.next.y>_&&l.next.y!==l.y&&y<(l.next.x-l.x)*(_-l.y)/(l.next.y-l.y)+l.x&&(m=!m),l=l.next;while(l!==w);return m}function ZM(w,r){const l=new Dx(w.i,w.x,w.y),m=new Dx(r.i,r.x,r.y),y=w.next,_=r.prev;return w.next=r,r.prev=w,l.next=y,y.prev=l,m.next=l,l.prev=m,_.next=m,m.prev=_,m}function e2(w,r,l,m){const y=new Dx(w,r,l);return m?(y.next=m.next,y.prev=m,m.next.prev=y,m.next=y):(y.prev=y,y.next=y),y}function Jf(w){w.next.prev=w.prev,w.prev.next=w.next,w.prevZ&&(w.prevZ.nextZ=w.nextZ),w.nextZ&&(w.nextZ.prevZ=w.prevZ)}function Dx(w,r,l){this.i=w,this.x=r,this.y=l,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function yN(w,r,l,m){let y=0;for(let _=r,R=l-m;_2&&w[r-1].equals(w[0])&&w.pop()}function n2(w,r){for(let l=0;lNumber.EPSILON){const br=Math.sqrt(Lr),gr=Math.sqrt(gi*gi+ir*ir),$r=ct.x-ti/br,Mo=ct.y+mi/br,qe=hn.x-ir/gr,Ie=hn.y+gi/gr,St=((qe-$r)*ir-(Ie-Mo)*gi)/(mi*ir-ti*gi);In=$r+mi*St-nn.x,rn=Mo+ti*St-nn.y;const an=In*In+rn*rn;if(an<=2)return new en(In,rn);Gn=Math.sqrt(an/2)}else{let br=!1;mi>Number.EPSILON?gi>Number.EPSILON&&(br=!0):mi<-Number.EPSILON?gi<-Number.EPSILON&&(br=!0):Math.sign(ti)===Math.sign(ir)&&(br=!0),br?(In=-ti,rn=mi,Gn=Math.sqrt(Lr)):(In=mi,rn=ti,Gn=Math.sqrt(Lr/2))}return new en(In/Gn,rn/Gn)}const Jt=[];for(let nn=0,ct=lt.length,hn=ct-1,In=nn+1;nn=0;nn--){const ct=nn/re,hn=$*Math.cos(ct*Math.PI/2),In=ie*Math.sin(ct*Math.PI/2)+ue;for(let rn=0,Gn=lt.length;rn=0;){const In=hn;let rn=hn-1;rn<0&&(rn=nn.length-1);for(let Gn=0,mi=V+re*2;Gn0)&&$.push(fe,Me,He),(q!==m-1||O0!=r>0&&this.version++,this._anisotropy=r}get clearcoat(){return this._clearcoat}set clearcoat(r){this._clearcoat>0!=r>0&&this.version++,this._clearcoat=r}get iridescence(){return this._iridescence}set iridescence(r){this._iridescence>0!=r>0&&this.version++,this._iridescence=r}get sheen(){return this._sheen}set sheen(r){this._sheen>0!=r>0&&this.version++,this._sheen=r}get transmission(){return this._transmission}set transmission(r){this._transmission>0!=r>0&&this.version++,this._transmission=r}copy(r){return super.copy(r),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=r.anisotropy,this.anisotropyRotation=r.anisotropyRotation,this.anisotropyMap=r.anisotropyMap,this.clearcoat=r.clearcoat,this.clearcoatMap=r.clearcoatMap,this.clearcoatRoughness=r.clearcoatRoughness,this.clearcoatRoughnessMap=r.clearcoatRoughnessMap,this.clearcoatNormalMap=r.clearcoatNormalMap,this.clearcoatNormalScale.copy(r.clearcoatNormalScale),this.ior=r.ior,this.iridescence=r.iridescence,this.iridescenceMap=r.iridescenceMap,this.iridescenceIOR=r.iridescenceIOR,this.iridescenceThicknessRange=[...r.iridescenceThicknessRange],this.iridescenceThicknessMap=r.iridescenceThicknessMap,this.sheen=r.sheen,this.sheenColor.copy(r.sheenColor),this.sheenColorMap=r.sheenColorMap,this.sheenRoughness=r.sheenRoughness,this.sheenRoughnessMap=r.sheenRoughnessMap,this.transmission=r.transmission,this.transmissionMap=r.transmissionMap,this.thickness=r.thickness,this.thicknessMap=r.thicknessMap,this.attenuationDistance=r.attenuationDistance,this.attenuationColor.copy(r.attenuationColor),this.specularIntensity=r.specularIntensity,this.specularIntensityMap=r.specularIntensityMap,this.specularColor.copy(r.specularColor),this.specularColorMap=r.specularColorMap,this}}class c2 extends js{constructor(r){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Hn(16777215),this.specular=new Hn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Nt,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(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.specular.copy(r.specular),this.shininess=r.shininess,this.map=r.map,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.emissive.copy(r.emissive),this.emissiveMap=r.emissiveMap,this.emissiveIntensity=r.emissiveIntensity,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.specularMap=r.specularMap,this.alphaMap=r.alphaMap,this.envMap=r.envMap,this.combine=r.combine,this.reflectivity=r.reflectivity,this.refractionRatio=r.refractionRatio,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.flatShading=r.flatShading,this.fog=r.fog,this}}class h2 extends js{constructor(r){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Hn(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new en(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(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.gradientMap=r.gradientMap,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.emissive.copy(r.emissive),this.emissiveMap=r.emissiveMap,this.emissiveIntensity=r.emissiveIntensity,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.alphaMap=r.alphaMap,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.fog=r.fog,this}}class u2 extends js{constructor(r){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(r)}copy(r){return super.copy(r),this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.flatShading=r.flatShading,this}}class d2 extends js{constructor(r){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Hn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Nt,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(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.emissive.copy(r.emissive),this.emissiveMap=r.emissiveMap,this.emissiveIntensity=r.emissiveIntensity,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.specularMap=r.specularMap,this.alphaMap=r.alphaMap,this.envMap=r.envMap,this.combine=r.combine,this.reflectivity=r.reflectivity,this.refractionRatio=r.refractionRatio,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.flatShading=r.flatShading,this.fog=r.fog,this}}class f2 extends js{constructor(r){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Hn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.defines={MATCAP:""},this.color.copy(r.color),this.matcap=r.matcap,this.map=r.map,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.alphaMap=r.alphaMap,this.flatShading=r.flatShading,this.fog=r.fog,this}}class p2 extends oo{constructor(r){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(r)}copy(r){return super.copy(r),this.scale=r.scale,this.dashSize=r.dashSize,this.gapSize=r.gapSize,this}}function Eh(w,r,l){return!w||!l&&w.constructor===r?w:typeof r.BYTES_PER_ELEMENT=="number"?new r(w):Array.prototype.slice.call(w)}function m2(w){return ArrayBuffer.isView(w)&&!(w instanceof DataView)}function g2(w){function r(y,_){return w[y]-w[_]}const l=w.length,m=new Array(l);for(let y=0;y!==l;++y)m[y]=y;return m.sort(r),m}function Fx(w,r,l){const m=w.length,y=new w.constructor(m);for(let _=0,R=0;R!==m;++_){const I=l[_]*r;for(let O=0;O!==r;++O)y[R++]=w[I+O]}return y}function Nx(w,r,l,m){let y=1,_=w[0];for(;_!==void 0&&_[m]===void 0;)_=w[y++];if(_===void 0)return;let R=_[m];if(R!==void 0)if(Array.isArray(R))do R=_[m],R!==void 0&&(r.push(_.time),l.push.apply(l,R)),_=w[y++];while(_!==void 0);else if(R.toArray!==void 0)do R=_[m],R!==void 0&&(r.push(_.time),R.toArray(l,l.length)),_=w[y++];while(_!==void 0);else do R=_[m],R!==void 0&&(r.push(_.time),l.push(R)),_=w[y++];while(_!==void 0)}function _N(w,r,l,m,y=30){const _=w.clone();_.name=r;const R=[];for(let O=0;O<_.tracks.length;++O){const N=_.tracks[O],V=N.getValueSize(),Q=[],X=[];for(let $=0;$=m)){Q.push(N.times[$]);for(let ue=0;ue_.tracks[O].times[0]&&(I=_.tracks[O].times[0]);for(let O=0;O<_.tracks.length;++O)_.tracks[O].shift(-1*I);return _.resetDuration(),_}function wN(w,r=0,l=w,m=30){m<=0&&(m=30);const y=l.tracks.length,_=r/m;for(let R=0;R=I.times[ie]){const q=ie*Q+V,Se=q+Q-V;ue=I.values.slice(q,Se)}else{const q=I.createInterpolant(),Se=V,fe=Q-V;q.evaluate(_),ue=q.resultBuffer.slice(Se,fe)}O==="quaternion"&&new Ti().fromArray(ue).normalize().conjugate().toArray(ue);const re=N.times.length;for(let q=0;q=_)){const I=l[1];r=_)break e}R=m,m=0;break t}break n}for(;m>>1;rl;)--R;if(++R,_!==0||R!==y){_>=R&&(R=Math.max(R,1),_=R-1);const I=this.getValueSize();this.times=m.slice(_,R),this.values=this.values.slice(_*I,R*I)}return this}validate(){let r=!0;const l=this.getValueSize();l-Math.floor(l)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),r=!1);const m=this.times,y=this.values,_=m.length;_===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),r=!1);let R=null;for(let I=0;I!==_;I++){const O=m[I];if(typeof O=="number"&&isNaN(O)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,I,O),r=!1;break}if(R!==null&&R>O){console.error("THREE.KeyframeTrack: Out of order keys.",this,I,O,R),r=!1;break}R=O}if(y!==void 0&&m2(y))for(let I=0,O=y.length;I!==O;++I){const N=y[I];if(isNaN(N)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,I,N),r=!1;break}}return r}optimize(){const r=this.times.slice(),l=this.values.slice(),m=this.getValueSize(),y=this.getInterpolation()===Nn,_=r.length-1;let R=1;for(let I=1;I<_;++I){let O=!1;const N=r[I],V=r[I+1];if(N!==V&&(I!==1||N!==r[0]))if(y)O=!0;else{const Q=I*m,X=Q-m,$=Q+m;for(let ie=0;ie!==m;++ie){const ue=l[Q+ie];if(ue!==l[X+ie]||ue!==l[$+ie]){O=!0;break}}}if(O){if(I!==R){r[R]=r[I];const Q=I*m,X=R*m;for(let $=0;$!==m;++$)l[X+$]=l[Q+$]}++R}}if(_>0){r[R]=r[_];for(let I=_*m,O=R*m,N=0;N!==m;++N)l[O+N]=l[I+N];++R}return R!==r.length?(this.times=r.slice(0,R),this.values=l.slice(0,R*m)):(this.times=r,this.values=l),this}clone(){const r=this.times.slice(),l=this.values.slice(),m=this.constructor,y=new m(this.name,r,l);return y.createInterpolant=this.createInterpolant,y}}ma.prototype.TimeBufferType=Float32Array,ma.prototype.ValueBufferType=Float32Array,ma.prototype.DefaultInterpolation=Wn;class bh extends ma{}bh.prototype.ValueTypeName="bool",bh.prototype.ValueBufferType=Array,bh.prototype.DefaultInterpolation=Vn,bh.prototype.InterpolantFactoryMethodLinear=void 0,bh.prototype.InterpolantFactoryMethodSmooth=void 0;class kx extends ma{}kx.prototype.ValueTypeName="color";class np extends ma{}np.prototype.ValueTypeName="number";class y2 extends tp{constructor(r,l,m,y){super(r,l,m,y)}interpolate_(r,l,m,y){const _=this.resultBuffer,R=this.sampleValues,I=this.valueSize,O=(m-l)/(y-l);let N=r*I;for(let V=N+I;N!==V;N+=4)Ti.slerpFlat(_,0,R,N-I,R,N,O);return _}}class Wu extends ma{InterpolantFactoryMethodLinear(r){return new y2(this.times,this.values,this.getValueSize(),r)}}Wu.prototype.ValueTypeName="quaternion",Wu.prototype.DefaultInterpolation=Wn,Wu.prototype.InterpolantFactoryMethodSmooth=void 0;class _h extends ma{}_h.prototype.ValueTypeName="string",_h.prototype.ValueBufferType=Array,_h.prototype.DefaultInterpolation=Vn,_h.prototype.InterpolantFactoryMethodLinear=void 0,_h.prototype.InterpolantFactoryMethodSmooth=void 0;class ip extends ma{}ip.prototype.ValueTypeName="vector";class rp{constructor(r,l=-1,m,y=Bi){this.name=r,this.tracks=m,this.duration=l,this.blendMode=y,this.uuid=no(),this.duration<0&&this.resetDuration()}static parse(r){const l=[],m=r.tracks,y=1/(r.fps||1);for(let R=0,I=m.length;R!==I;++R)l.push(SN(m[R]).scale(y));const _=new this(r.name,r.duration,l,r.blendMode);return _.uuid=r.uuid,_}static toJSON(r){const l=[],m=r.tracks,y={name:r.name,duration:r.duration,tracks:l,uuid:r.uuid,blendMode:r.blendMode};for(let _=0,R=m.length;_!==R;++_)l.push(ma.toJSON(m[_]));return y}static CreateFromMorphTargetSequence(r,l,m,y){const _=l.length,R=[];for(let I=0;I<_;I++){let O=[],N=[];O.push((I+_-1)%_,I,(I+1)%_),N.push(0,1,0);const V=g2(O);O=Fx(O,1,V),N=Fx(N,1,V),!y&&O[0]===0&&(O.push(_),N.push(N[0])),R.push(new np(".morphTargetInfluences["+l[I].name+"]",O,N).scale(1/m))}return new this(r,-1,R)}static findByName(r,l){let m=r;if(!Array.isArray(r)){const y=r;m=y.geometry&&y.geometry.animations||y.animations}for(let y=0;y1){const Q=V[1];let X=y[Q];X||(y[Q]=X=[]),X.push(N)}}const R=[];for(const I in y)R.push(this.CreateFromMorphTargetSequence(I,y[I],l,m));return R}static parseAnimation(r,l){if(!r)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const m=function(Q,X,$,ie,ue){if($.length!==0){const re=[],q=[];Nx($,re,q,ie),re.length!==0&&ue.push(new Q(X,re,q))}},y=[],_=r.name||"default",R=r.fps||30,I=r.blendMode;let O=r.length||-1;const N=r.hierarchy||[];for(let Q=0;Q{l&&l(_),this.manager.itemEnd(r)},0),_;if(ml[r]!==void 0){ml[r].push({onLoad:l,onProgress:m,onError:y});return}ml[r]=[],ml[r].push({onLoad:l,onProgress:m,onError:y});const R=new Request(r,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),I=this.mimeType,O=this.responseType;fetch(R).then(N=>{if(N.status===200||N.status===0){if(N.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||N.body===void 0||N.body.getReader===void 0)return N;const V=ml[r],Q=N.body.getReader(),X=N.headers.get("Content-Length")||N.headers.get("X-File-Size"),$=X?parseInt(X):0,ie=$!==0;let ue=0;const re=new ReadableStream({start(q){Se();function Se(){Q.read().then(({done:fe,value:Me})=>{if(fe)q.close();else{ue+=Me.byteLength;const ze=new ProgressEvent("progress",{lengthComputable:ie,loaded:ue,total:$});for(let He=0,et=V.length;He{switch(O){case"arraybuffer":return N.arrayBuffer();case"blob":return N.blob();case"document":return N.text().then(V=>new DOMParser().parseFromString(V,I));case"json":return N.json();default:if(I===void 0)return N.text();{const Q=/charset="?([^;"\s]*)"?/i.exec(I),X=Q&&Q[1]?Q[1].toLowerCase():void 0,$=new TextDecoder(X);return N.arrayBuffer().then(ie=>$.decode(ie))}}}).then(N=>{wh.add(r,N);const V=ml[r];delete ml[r];for(let Q=0,X=V.length;Q{const V=ml[r];if(V===void 0)throw this.manager.itemError(r),N;delete ml[r];for(let Q=0,X=V.length;Q{this.manager.itemEnd(r)}),this.manager.itemStart(r)}setResponseType(r){return this.responseType=r,this}setMimeType(r){return this.mimeType=r,this}}class RN extends wo{constructor(r){super(r)}load(r,l,m,y){const _=this,R=new gl(this.manager);R.setPath(this.path),R.setRequestHeader(this.requestHeader),R.setWithCredentials(this.withCredentials),R.load(r,function(I){try{l(_.parse(JSON.parse(I)))}catch(O){y?y(O):console.error(O),_.manager.itemError(r)}},m,y)}parse(r){const l=[];for(let m=0;m0:y.vertexColors=r.vertexColors),r.uniforms!==void 0)for(const _ in r.uniforms){const R=r.uniforms[_];switch(y.uniforms[_]={},R.type){case"t":y.uniforms[_].value=m(R.value);break;case"c":y.uniforms[_].value=new Hn().setHex(R.value);break;case"v2":y.uniforms[_].value=new en().fromArray(R.value);break;case"v3":y.uniforms[_].value=new je().fromArray(R.value);break;case"v4":y.uniforms[_].value=new ur().fromArray(R.value);break;case"m3":y.uniforms[_].value=new Ui().fromArray(R.value);break;case"m4":y.uniforms[_].value=new _i().fromArray(R.value);break;default:y.uniforms[_].value=R.value}}if(r.defines!==void 0&&(y.defines=r.defines),r.vertexShader!==void 0&&(y.vertexShader=r.vertexShader),r.fragmentShader!==void 0&&(y.fragmentShader=r.fragmentShader),r.glslVersion!==void 0&&(y.glslVersion=r.glslVersion),r.extensions!==void 0)for(const _ in r.extensions)y.extensions[_]=r.extensions[_];if(r.lights!==void 0&&(y.lights=r.lights),r.clipping!==void 0&&(y.clipping=r.clipping),r.size!==void 0&&(y.size=r.size),r.sizeAttenuation!==void 0&&(y.sizeAttenuation=r.sizeAttenuation),r.map!==void 0&&(y.map=m(r.map)),r.matcap!==void 0&&(y.matcap=m(r.matcap)),r.alphaMap!==void 0&&(y.alphaMap=m(r.alphaMap)),r.bumpMap!==void 0&&(y.bumpMap=m(r.bumpMap)),r.bumpScale!==void 0&&(y.bumpScale=r.bumpScale),r.normalMap!==void 0&&(y.normalMap=m(r.normalMap)),r.normalMapType!==void 0&&(y.normalMapType=r.normalMapType),r.normalScale!==void 0){let _=r.normalScale;Array.isArray(_)===!1&&(_=[_,_]),y.normalScale=new en().fromArray(_)}return r.displacementMap!==void 0&&(y.displacementMap=m(r.displacementMap)),r.displacementScale!==void 0&&(y.displacementScale=r.displacementScale),r.displacementBias!==void 0&&(y.displacementBias=r.displacementBias),r.roughnessMap!==void 0&&(y.roughnessMap=m(r.roughnessMap)),r.metalnessMap!==void 0&&(y.metalnessMap=m(r.metalnessMap)),r.emissiveMap!==void 0&&(y.emissiveMap=m(r.emissiveMap)),r.emissiveIntensity!==void 0&&(y.emissiveIntensity=r.emissiveIntensity),r.specularMap!==void 0&&(y.specularMap=m(r.specularMap)),r.specularIntensityMap!==void 0&&(y.specularIntensityMap=m(r.specularIntensityMap)),r.specularColorMap!==void 0&&(y.specularColorMap=m(r.specularColorMap)),r.envMap!==void 0&&(y.envMap=m(r.envMap)),r.envMapIntensity!==void 0&&(y.envMapIntensity=r.envMapIntensity),r.reflectivity!==void 0&&(y.reflectivity=r.reflectivity),r.refractionRatio!==void 0&&(y.refractionRatio=r.refractionRatio),r.lightMap!==void 0&&(y.lightMap=m(r.lightMap)),r.lightMapIntensity!==void 0&&(y.lightMapIntensity=r.lightMapIntensity),r.aoMap!==void 0&&(y.aoMap=m(r.aoMap)),r.aoMapIntensity!==void 0&&(y.aoMapIntensity=r.aoMapIntensity),r.gradientMap!==void 0&&(y.gradientMap=m(r.gradientMap)),r.clearcoatMap!==void 0&&(y.clearcoatMap=m(r.clearcoatMap)),r.clearcoatRoughnessMap!==void 0&&(y.clearcoatRoughnessMap=m(r.clearcoatRoughnessMap)),r.clearcoatNormalMap!==void 0&&(y.clearcoatNormalMap=m(r.clearcoatNormalMap)),r.clearcoatNormalScale!==void 0&&(y.clearcoatNormalScale=new en().fromArray(r.clearcoatNormalScale)),r.iridescenceMap!==void 0&&(y.iridescenceMap=m(r.iridescenceMap)),r.iridescenceThicknessMap!==void 0&&(y.iridescenceThicknessMap=m(r.iridescenceThicknessMap)),r.transmissionMap!==void 0&&(y.transmissionMap=m(r.transmissionMap)),r.thicknessMap!==void 0&&(y.thicknessMap=m(r.thicknessMap)),r.anisotropyMap!==void 0&&(y.anisotropyMap=m(r.anisotropyMap)),r.sheenColorMap!==void 0&&(y.sheenColorMap=m(r.sheenColorMap)),r.sheenRoughnessMap!==void 0&&(y.sheenRoughnessMap=m(r.sheenRoughnessMap)),y}setTextures(r){return this.textures=r,this}static createMaterialFromType(r){const l={ShadowMaterial:o2,SpriteMaterial:mx,RawShaderMaterial:a2,ShaderMaterial:Ka,PointsMaterial:Ex,MeshPhysicalMaterial:l2,MeshStandardMaterial:Ox,MeshPhongMaterial:c2,MeshToonMaterial:h2,MeshNormalMaterial:u2,MeshLambertMaterial:d2,MeshDepthMaterial:ux,MeshDistanceMaterial:dx,MeshBasicMaterial:uc,MeshMatcapMaterial:f2,LineDashedMaterial:p2,LineBasicMaterial:oo,Material:js};return new l[r]}}class jx{static decodeText(r){if(typeof TextDecoder<"u")return new TextDecoder().decode(r);let l="";for(let m=0,y=r.length;m0){const O=new zx(l);_=new sp(O),_.setCrossOrigin(this.crossOrigin);for(let N=0,V=r.length;N0){y=new sp(this.manager),y.setCrossOrigin(this.crossOrigin);for(let R=0,I=r.length;R"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(r){return this.options=r,this}load(r,l,m,y){r===void 0&&(r=""),this.path!==void 0&&(r=this.path+r),r=this.manager.resolveURL(r);const _=this,R=wh.get(r);if(R!==void 0)return _.manager.itemStart(r),setTimeout(function(){l&&l(R),_.manager.itemEnd(r)},0),R;const I={};I.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",I.headers=this.requestHeader,fetch(r,I).then(function(O){return O.blob()}).then(function(O){return createImageBitmap(O,Object.assign(_.options,{colorSpaceConversion:"none"}))}).then(function(O){wh.add(r,O),l&&l(O),_.manager.itemEnd(r)}).catch(function(O){y&&y(O),_.manager.itemError(r),_.manager.itemEnd(r)}),_.manager.itemStart(r)}}let tA;class Wx{static getContext(){return tA===void 0&&(tA=new(window.AudioContext||window.webkitAudioContext)),tA}static setContext(r){tA=r}}class zN extends wo{constructor(r){super(r)}load(r,l,m,y){const _=this,R=new gl(this.manager);R.setResponseType("arraybuffer"),R.setPath(this.path),R.setRequestHeader(this.requestHeader),R.setWithCredentials(this.withCredentials),R.load(r,function(O){try{const N=O.slice(0);Wx.getContext().decodeAudioData(N,function(Q){l(Q)},I)}catch(N){I(N)}},m,y);function I(O){y?y(O):console.error(O),_.manager.itemError(r)}}}const F2=new _i,N2=new _i,Mh=new _i;class GN{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new hs,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new hs,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(r){const l=this._cache;if(l.focus!==r.focus||l.fov!==r.fov||l.aspect!==r.aspect*this.aspect||l.near!==r.near||l.far!==r.far||l.zoom!==r.zoom||l.eyeSep!==this.eyeSep){l.focus=r.focus,l.fov=r.fov,l.aspect=r.aspect*this.aspect,l.near=r.near,l.far=r.far,l.zoom=r.zoom,l.eyeSep=this.eyeSep,Mh.copy(r.projectionMatrix);const y=l.eyeSep/2,_=y*l.near/l.focus,R=l.near*Math.tan(al*l.fov*.5)/l.zoom;let I,O;N2.elements[12]=-y,F2.elements[12]=y,I=-R*l.aspect+_,O=R*l.aspect+_,Mh.elements[0]=2*l.near/(O-I),Mh.elements[8]=(O+I)/(O-I),this.cameraL.projectionMatrix.copy(Mh),I=-R*l.aspect-_,O=R*l.aspect-_,Mh.elements[0]=2*l.near/(O-I),Mh.elements[8]=(O+I)/(O-I),this.cameraR.projectionMatrix.copy(Mh)}this.cameraL.matrixWorld.copy(r.matrixWorld).multiply(N2),this.cameraR.matrixWorld.copy(r.matrixWorld).multiply(F2)}}class U2{constructor(r=!0){this.autoStart=r,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=k2(),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 r=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const l=k2();r=(l-this.oldTime)/1e3,this.oldTime=l,this.elapsedTime+=r}return r}}function k2(){return(typeof performance>"u"?Date:performance).now()}const Ch=new je,z2=new Ti,VN=new je,Sh=new je;class HN extends mr{constructor(){super(),this.type="AudioListener",this.context=Wx.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new U2}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(r){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=r,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(r){return this.gain.gain.setTargetAtTime(r,this.context.currentTime,.01),this}updateMatrixWorld(r){super.updateMatrixWorld(r);const l=this.context.listener,m=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Ch,z2,VN),Sh.set(0,0,-1).applyQuaternion(z2),l.positionX){const y=this.context.currentTime+this.timeDelta;l.positionX.linearRampToValueAtTime(Ch.x,y),l.positionY.linearRampToValueAtTime(Ch.y,y),l.positionZ.linearRampToValueAtTime(Ch.z,y),l.forwardX.linearRampToValueAtTime(Sh.x,y),l.forwardY.linearRampToValueAtTime(Sh.y,y),l.forwardZ.linearRampToValueAtTime(Sh.z,y),l.upX.linearRampToValueAtTime(m.x,y),l.upY.linearRampToValueAtTime(m.y,y),l.upZ.linearRampToValueAtTime(m.z,y)}else l.setPosition(Ch.x,Ch.y,Ch.z),l.setOrientation(Sh.x,Sh.y,Sh.z,m.x,m.y,m.z)}}class G2 extends mr{constructor(r){super(),this.type="Audio",this.listener=r,this.context=r.context,this.gain=this.context.createGain(),this.gain.connect(r.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(r){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=r,this.connect(),this}setMediaElementSource(r){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(r),this.connect(),this}setMediaStreamSource(r){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(r),this.connect(),this}setBuffer(r){return this.buffer=r,this.sourceType="buffer",this.autoplay&&this.play(),this}play(r=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+r;const l=this.context.createBufferSource();return l.buffer=this.buffer,l.loop=this.loop,l.loopStart=this.loopStart,l.loopEnd=this.loopEnd,l.onended=this.onEnded.bind(this),l.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=l,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 r=1,l=this.filters.length;r0){this.source.disconnect(this.filters[0]);for(let r=1,l=this.filters.length;r0&&this._mixBufferRegionAdditive(m,y,this._addIndex*l,1,l);for(let O=l,N=l+l;O!==N;++O)if(m[O]!==m[O+l]){I.setValue(m,y);break}}saveOriginalState(){const r=this.binding,l=this.buffer,m=this.valueSize,y=m*this._origIndex;r.getValue(l,y);for(let _=m,R=y;_!==R;++_)l[_]=l[y+_%m];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const r=this.valueSize*3;this.binding.setValue(this.buffer,r)}_setAdditiveIdentityNumeric(){const r=this._addIndex*this.valueSize,l=r+this.valueSize;for(let m=r;m=.5)for(let R=0;R!==_;++R)r[l+R]=r[m+R]}_slerp(r,l,m,y){Ti.slerpFlat(r,l,r,l,r,m,y)}_slerpAdditive(r,l,m,y,_){const R=this._workIndex*_;Ti.multiplyQuaternionsFlat(r,R,r,l,r,m),Ti.slerpFlat(r,l,r,l,r,R,y)}_lerp(r,l,m,y,_){const R=1-y;for(let I=0;I!==_;++I){const O=l+I;r[O]=r[O]*R+r[m+I]*y}}_lerpAdditive(r,l,m,y,_){for(let R=0;R!==_;++R){const I=l+R;r[I]=r[I]+r[m+R]*y}}}const Qx="\\[\\]\\.:\\/",XN=new RegExp("["+Qx+"]","g"),Xx="[^"+Qx+"]",KN="[^"+Qx.replace("\\.","")+"]",qN=/((?:WC+[\/:])*)/.source.replace("WC",Xx),YN=/(WCOD+)?/.source.replace("WCOD",KN),$N=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Xx),JN=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Xx),ZN=new RegExp("^"+qN+YN+$N+JN+"$"),e5=["material","materials","bones","map"];class t5{constructor(r,l,m){const y=m||dr.parseTrackName(l);this._targetGroup=r,this._bindings=r.subscribe_(l,y)}getValue(r,l){this.bind();const m=this._targetGroup.nCachedObjects_,y=this._bindings[m];y!==void 0&&y.getValue(r,l)}setValue(r,l){const m=this._bindings;for(let y=this._targetGroup.nCachedObjects_,_=m.length;y!==_;++y)m[y].setValue(r,l)}bind(){const r=this._bindings;for(let l=this._targetGroup.nCachedObjects_,m=r.length;l!==m;++l)r[l].bind()}unbind(){const r=this._bindings;for(let l=this._targetGroup.nCachedObjects_,m=r.length;l!==m;++l)r[l].unbind()}}class dr{constructor(r,l,m){this.path=l,this.parsedPath=m||dr.parseTrackName(l),this.node=dr.findNode(r,this.parsedPath.nodeName),this.rootNode=r,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(r,l,m){return r&&r.isAnimationObjectGroup?new dr.Composite(r,l,m):new dr(r,l,m)}static sanitizeNodeName(r){return r.replace(/\s/g,"_").replace(XN,"")}static parseTrackName(r){const l=ZN.exec(r);if(l===null)throw new Error("PropertyBinding: Cannot parse trackName: "+r);const m={nodeName:l[2],objectName:l[3],objectIndex:l[4],propertyName:l[5],propertyIndex:l[6]},y=m.nodeName&&m.nodeName.lastIndexOf(".");if(y!==void 0&&y!==-1){const _=m.nodeName.substring(y+1);e5.indexOf(_)!==-1&&(m.nodeName=m.nodeName.substring(0,y),m.objectName=_)}if(m.propertyName===null||m.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+r);return m}static findNode(r,l){if(l===void 0||l===""||l==="."||l===-1||l===r.name||l===r.uuid)return r;if(r.skeleton){const m=r.skeleton.getBoneByName(l);if(m!==void 0)return m}if(r.children){const m=function(_){for(let R=0;R<_.length;R++){const I=_[R];if(I.name===l||I.uuid===l)return I;const O=m(I.children);if(O)return O}return null},y=m(r.children);if(y)return y}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(r,l){r[l]=this.targetObject[this.propertyName]}_getValue_array(r,l){const m=this.resolvedProperty;for(let y=0,_=m.length;y!==_;++y)r[l++]=m[y]}_getValue_arrayElement(r,l){r[l]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(r,l){this.resolvedProperty.toArray(r,l)}_setValue_direct(r,l){this.targetObject[this.propertyName]=r[l]}_setValue_direct_setNeedsUpdate(r,l){this.targetObject[this.propertyName]=r[l],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(r,l){this.targetObject[this.propertyName]=r[l],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(r,l){const m=this.resolvedProperty;for(let y=0,_=m.length;y!==_;++y)m[y]=r[l++]}_setValue_array_setNeedsUpdate(r,l){const m=this.resolvedProperty;for(let y=0,_=m.length;y!==_;++y)m[y]=r[l++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(r,l){const m=this.resolvedProperty;for(let y=0,_=m.length;y!==_;++y)m[y]=r[l++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(r,l){this.resolvedProperty[this.propertyIndex]=r[l]}_setValue_arrayElement_setNeedsUpdate(r,l){this.resolvedProperty[this.propertyIndex]=r[l],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(r,l){this.resolvedProperty[this.propertyIndex]=r[l],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(r,l){this.resolvedProperty.fromArray(r,l)}_setValue_fromArray_setNeedsUpdate(r,l){this.resolvedProperty.fromArray(r,l),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(r,l){this.resolvedProperty.fromArray(r,l),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(r,l){this.bind(),this.getValue(r,l)}_setValue_unbound(r,l){this.bind(),this.setValue(r,l)}bind(){let r=this.node;const l=this.parsedPath,m=l.objectName,y=l.propertyName;let _=l.propertyIndex;if(r||(r=dr.findNode(this.rootNode,l.nodeName),this.node=r),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!r){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(m){let N=l.objectIndex;switch(m){case"materials":if(!r.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!r.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}r=r.material.materials;break;case"bones":if(!r.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}r=r.skeleton.bones;for(let V=0;V=_){const Q=_++,X=r[Q];l[X.uuid]=V,r[V]=X,l[N]=Q,r[Q]=O;for(let $=0,ie=y;$!==ie;++$){const ue=m[$],re=ue[Q],q=ue[V];ue[V]=re,ue[Q]=q}}}this.nCachedObjects_=_}uncache(){const r=this._objects,l=this._indicesByUUID,m=this._bindings,y=m.length;let _=this.nCachedObjects_,R=r.length;for(let I=0,O=arguments.length;I!==O;++I){const N=arguments[I],V=N.uuid,Q=l[V];if(Q!==void 0)if(delete l[V],Q<_){const X=--_,$=r[X],ie=--R,ue=r[ie];l[$.uuid]=Q,r[Q]=$,l[ue.uuid]=X,r[X]=ue,r.pop();for(let re=0,q=y;re!==q;++re){const Se=m[re],fe=Se[X],Me=Se[ie];Se[Q]=fe,Se[X]=Me,Se.pop()}}else{const X=--R,$=r[X];X>0&&(l[$.uuid]=Q),r[Q]=$,r.pop();for(let ie=0,ue=y;ie!==ue;++ie){const re=m[ie];re[Q]=re[X],re.pop()}}}this.nCachedObjects_=_}subscribe_(r,l){const m=this._bindingsIndicesByPath;let y=m[r];const _=this._bindings;if(y!==void 0)return _[y];const R=this._paths,I=this._parsedPaths,O=this._objects,N=O.length,V=this.nCachedObjects_,Q=new Array(N);y=_.length,m[r]=y,R.push(r),I.push(l),_.push(Q);for(let X=V,$=O.length;X!==$;++X){const ie=O[X];Q[X]=new dr(ie,r,l)}return Q}unsubscribe_(r){const l=this._bindingsIndicesByPath,m=l[r];if(m!==void 0){const y=this._paths,_=this._parsedPaths,R=this._bindings,I=R.length-1,O=R[I],N=r[I];l[N]=m,R[m]=O,R.pop(),_[m]=_[I],_.pop(),y[m]=y[I],y.pop()}}}class j2{constructor(r,l,m=null,y=l.blendMode){this._mixer=r,this._clip=l,this._localRoot=m,this.blendMode=y;const _=l.tracks,R=_.length,I=new Array(R),O={endingStart:ai,endingEnd:ai};for(let N=0;N!==R;++N){const V=_[N].createInterpolant(null);I[N]=V,V.settings=O}this._interpolantSettings=O,this._interpolants=I,this._propertyBindings=new Array(R),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=bn,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(r){return this._startTime=r,this}setLoop(r,l){return this.loop=r,this.repetitions=l,this}setEffectiveWeight(r){return this.weight=r,this._effectiveWeight=this.enabled?r:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(r){return this._scheduleFading(r,0,1)}fadeOut(r){return this._scheduleFading(r,1,0)}crossFadeFrom(r,l,m){if(r.fadeOut(l),this.fadeIn(l),m){const y=this._clip.duration,_=r._clip.duration,R=_/y,I=y/_;r.warp(1,R,l),this.warp(I,1,l)}return this}crossFadeTo(r,l,m){return r.crossFadeFrom(this,l,m)}stopFading(){const r=this._weightInterpolant;return r!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(r)),this}setEffectiveTimeScale(r){return this.timeScale=r,this._effectiveTimeScale=this.paused?0:r,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(r){return this.timeScale=this._clip.duration/r,this.stopWarping()}syncWith(r){return this.time=r.time,this.timeScale=r.timeScale,this.stopWarping()}halt(r){return this.warp(this._effectiveTimeScale,0,r)}warp(r,l,m){const y=this._mixer,_=y.time,R=this.timeScale;let I=this._timeScaleInterpolant;I===null&&(I=y._lendControlInterpolant(),this._timeScaleInterpolant=I);const O=I.parameterPositions,N=I.sampleValues;return O[0]=_,O[1]=_+m,N[0]=r/R,N[1]=l/R,this}stopWarping(){const r=this._timeScaleInterpolant;return r!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(r)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(r,l,m,y){if(!this.enabled){this._updateWeight(r);return}const _=this._startTime;if(_!==null){const O=(r-_)*m;O<0||m===0?l=0:(this._startTime=null,l=m*O)}l*=this._updateTimeScale(r);const R=this._updateTime(l),I=this._updateWeight(r);if(I>0){const O=this._interpolants,N=this._propertyBindings;switch(this.blendMode){case hr:for(let V=0,Q=O.length;V!==Q;++V)O[V].evaluate(R),N[V].accumulateAdditive(I);break;case Bi:default:for(let V=0,Q=O.length;V!==Q;++V)O[V].evaluate(R),N[V].accumulate(y,I)}}}_updateWeight(r){let l=0;if(this.enabled){l=this.weight;const m=this._weightInterpolant;if(m!==null){const y=m.evaluate(r)[0];l*=y,r>m.parameterPositions[1]&&(this.stopFading(),y===0&&(this.enabled=!1))}}return this._effectiveWeight=l,l}_updateTimeScale(r){let l=0;if(!this.paused){l=this.timeScale;const m=this._timeScaleInterpolant;if(m!==null){const y=m.evaluate(r)[0];l*=y,r>m.parameterPositions[1]&&(this.stopWarping(),l===0?this.paused=!0:this.timeScale=l)}}return this._effectiveTimeScale=l,l}_updateTime(r){const l=this._clip.duration,m=this.loop;let y=this.time+r,_=this._loopCount;const R=m===oi;if(r===0)return _===-1?y:R&&(_&1)===1?l-y:y;if(m===kt){_===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));n:{if(y>=l)y=l;else if(y<0)y=0;else{this.time=y;break n}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=y,this._mixer.dispatchEvent({type:"finished",action:this,direction:r<0?-1:1})}}else{if(_===-1&&(r>=0?(_=0,this._setEndings(!0,this.repetitions===0,R)):this._setEndings(this.repetitions===0,!0,R)),y>=l||y<0){const I=Math.floor(y/l);y-=l*I,_+=Math.abs(I);const O=this.repetitions-_;if(O<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,y=r>0?l:0,this.time=y,this._mixer.dispatchEvent({type:"finished",action:this,direction:r>0?1:-1});else{if(O===1){const N=r<0;this._setEndings(N,!N,R)}else this._setEndings(!1,!1,R);this._loopCount=_,this.time=y,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:I})}}else this.time=y;if(R&&(_&1)===1)return l-y}return y}_setEndings(r,l,m){const y=this._interpolantSettings;m?(y.endingStart=li,y.endingEnd=li):(r?y.endingStart=this.zeroSlopeAtStart?li:ai:y.endingStart=xi,l?y.endingEnd=this.zeroSlopeAtEnd?li:ai:y.endingEnd=xi)}_scheduleFading(r,l,m){const y=this._mixer,_=y.time;let R=this._weightInterpolant;R===null&&(R=y._lendControlInterpolant(),this._weightInterpolant=R);const I=R.parameterPositions,O=R.sampleValues;return I[0]=_,O[0]=l,I[1]=_+r,O[1]=m,this}}const i5=new Float32Array(1);class r5 extends to{constructor(r){super(),this._root=r,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(r,l){const m=r._localRoot||this._root,y=r._clip.tracks,_=y.length,R=r._propertyBindings,I=r._interpolants,O=m.uuid,N=this._bindingsByRootAndName;let V=N[O];V===void 0&&(V={},N[O]=V);for(let Q=0;Q!==_;++Q){const X=y[Q],$=X.name;let ie=V[$];if(ie!==void 0)++ie.referenceCount,R[Q]=ie;else{if(ie=R[Q],ie!==void 0){ie._cacheIndex===null&&(++ie.referenceCount,this._addInactiveBinding(ie,O,$));continue}const ue=l&&l._propertyBindings[Q].binding.parsedPath;ie=new H2(dr.create(m,$,ue),X.ValueTypeName,X.getValueSize()),++ie.referenceCount,this._addInactiveBinding(ie,O,$),R[Q]=ie}I[Q].resultBuffer=ie.buffer}}_activateAction(r){if(!this._isActiveAction(r)){if(r._cacheIndex===null){const m=(r._localRoot||this._root).uuid,y=r._clip.uuid,_=this._actionsByClip[y];this._bindAction(r,_&&_.knownActions[0]),this._addInactiveAction(r,y,m)}const l=r._propertyBindings;for(let m=0,y=l.length;m!==y;++m){const _=l[m];_.useCount++===0&&(this._lendBinding(_),_.saveOriginalState())}this._lendAction(r)}}_deactivateAction(r){if(this._isActiveAction(r)){const l=r._propertyBindings;for(let m=0,y=l.length;m!==y;++m){const _=l[m];--_.useCount===0&&(_.restoreOriginalState(),this._takeBackBinding(_))}this._takeBackAction(r)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const r=this;this.stats={actions:{get total(){return r._actions.length},get inUse(){return r._nActiveActions}},bindings:{get total(){return r._bindings.length},get inUse(){return r._nActiveBindings}},controlInterpolants:{get total(){return r._controlInterpolants.length},get inUse(){return r._nActiveControlInterpolants}}}}_isActiveAction(r){const l=r._cacheIndex;return l!==null&&l=0;--m)r[m].stop();return this}update(r){r*=this.timeScale;const l=this._actions,m=this._nActiveActions,y=this.time+=r,_=Math.sign(r),R=this._accuIndex^=1;for(let N=0;N!==m;++N)l[N]._update(y,r,_,R);const I=this._bindings,O=this._nActiveBindings;for(let N=0;N!==O;++N)I[N].apply(R);return this}setTime(r){this.time=0;for(let l=0;lthis.max.x||r.ythis.max.y)}containsBox(r){return this.min.x<=r.min.x&&r.max.x<=this.max.x&&this.min.y<=r.min.y&&r.max.y<=this.max.y}getParameter(r,l){return l.set((r.x-this.min.x)/(this.max.x-this.min.x),(r.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(r){return!(r.max.xthis.max.x||r.max.ythis.max.y)}clampPoint(r,l){return l.copy(r).clamp(this.min,this.max)}distanceToPoint(r){return this.clampPoint(r,Q2).distanceTo(r)}intersect(r){return this.min.max(r.min),this.max.min(r.max),this.isEmpty()&&this.makeEmpty(),this}union(r){return this.min.min(r.min),this.max.max(r.max),this}translate(r){return this.min.add(r),this.max.add(r),this}equals(r){return r.min.equals(this.min)&&r.max.equals(this.max)}}const X2=new je,nA=new je;class f5{constructor(r=new je,l=new je){this.start=r,this.end=l}set(r,l){return this.start.copy(r),this.end.copy(l),this}copy(r){return this.start.copy(r.start),this.end.copy(r.end),this}getCenter(r){return r.addVectors(this.start,this.end).multiplyScalar(.5)}delta(r){return r.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(r,l){return this.delta(l).multiplyScalar(r).add(this.start)}closestPointToPointParameter(r,l){X2.subVectors(r,this.start),nA.subVectors(this.end,this.start);const m=nA.dot(nA);let _=nA.dot(X2)/m;return l&&(_=Nr(_,0,1)),_}closestPointToPoint(r,l,m){const y=this.closestPointToPointParameter(r,l);return this.delta(m).multiplyScalar(y).add(this.start)}applyMatrix4(r){return this.start.applyMatrix4(r),this.end.applyMatrix4(r),this}equals(r){return r.start.equals(this.start)&&r.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const K2=new je;class p5 extends mr{constructor(r,l){super(),this.light=r,this.matrix=r.matrixWorld,this.matrixAutoUpdate=!1,this.color=l,this.type="SpotLightHelper";const m=new Yi,y=[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 R=0,I=1,O=32;R1)for(let Q=0;Q.99999)this.quaternion.set(0,0,0,1);else if(r.y<-.99999)this.quaternion.set(1,0,0,0);else{eC.set(r.z,0,-r.x).normalize();const l=Math.acos(r.y);this.quaternion.setFromAxisAngle(eC,l)}}setLength(r,l=r*.2,m=l*.2){this.line.scale.set(1,Math.max(1e-4,r-l),1),this.line.updateMatrix(),this.cone.scale.set(m,l,m),this.cone.position.y=r,this.cone.updateMatrix()}setColor(r){this.line.material.color.set(r),this.cone.material.color.set(r)}copy(r){return super.copy(r,!1),this.line.copy(r.line),this.cone.copy(r.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class S5 extends qa{constructor(r=1){const l=[0,0,0,r,0,0,0,0,0,0,r,0,0,0,0,0,0,r],m=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],y=new Yi;y.setAttribute("position",new ni(l,3)),y.setAttribute("color",new ni(m,3));const _=new oo({vertexColors:!0,toneMapped:!1});super(y,_),this.type="AxesHelper"}setColors(r,l,m){const y=new Hn,_=this.geometry.attributes.color.array;return y.set(r),y.toArray(_,0),y.toArray(_,3),y.set(l),y.toArray(_,6),y.toArray(_,9),y.set(m),y.toArray(_,12),y.toArray(_,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class T5{constructor(){this.type="ShapePath",this.color=new Hn,this.subPaths=[],this.currentPath=null}moveTo(r,l){return this.currentPath=new Kf,this.subPaths.push(this.currentPath),this.currentPath.moveTo(r,l),this}lineTo(r,l){return this.currentPath.lineTo(r,l),this}quadraticCurveTo(r,l,m,y){return this.currentPath.quadraticCurveTo(r,l,m,y),this}bezierCurveTo(r,l,m,y,_,R){return this.currentPath.bezierCurveTo(r,l,m,y,_,R),this}splineThru(r){return this.currentPath.splineThru(r),this}toShapes(r){function l(q){const Se=[];for(let fe=0,Me=q.length;feNumber.EPSILON){if(Xe<0&&(et=Se[He],Be=-Be,st=Se[ze],Xe=-Xe),q.yst.y)continue;if(q.y===et.y){if(q.x===et.x)return!0}else{const rt=Xe*(q.x-et.x)-Be*(q.y-et.y);if(rt===0)return!0;if(rt<0)continue;Me=!Me}}else{if(q.y!==et.y)continue;if(st.x<=q.x&&q.x<=et.x||et.x<=q.x&&q.x<=st.x)return!0}}return Me}const y=Ya.isClockWise,_=this.subPaths;if(_.length===0)return[];let R,I,O;const N=[];if(_.length===1)return I=_[0],O=new yh,O.curves=I.curves,N.push(O),N;let V=!y(_[0].getPoints());V=r?!V:V;const Q=[],X=[];let $=[],ie=0,ue;X[ie]=void 0,$[ie]=[];for(let q=0,Se=_.length;q1){let q=!1,Se=0;for(let fe=0,Me=X.length;fe0&&q===!1&&($=Q)}let re;for(let q=0,Se=X.length;q{h.r(u),h.d(u,{KHR_DF_CHANNEL_RGBSDA_ALPHA:()=>fn,KHR_DF_CHANNEL_RGBSDA_BLUE:()=>Nt,KHR_DF_CHANNEL_RGBSDA_DEPTH:()=>Vt,KHR_DF_CHANNEL_RGBSDA_GREEN:()=>pt,KHR_DF_CHANNEL_RGBSDA_RED:()=>Te,KHR_DF_CHANNEL_RGBSDA_STENCIL:()=>zt,KHR_DF_FLAG_ALPHA_PREMULTIPLIED:()=>F,KHR_DF_FLAG_ALPHA_STRAIGHT:()=>B,KHR_DF_KHR_DESCRIPTORTYPE_BASICFORMAT:()=>v,KHR_DF_MODEL_ASTC:()=>T,KHR_DF_MODEL_ETC1:()=>M,KHR_DF_MODEL_ETC1S:()=>L,KHR_DF_MODEL_ETC2:()=>C,KHR_DF_MODEL_RGBSDA:()=>S,KHR_DF_MODEL_UNSPECIFIED:()=>E,KHR_DF_PRIMARIES_ACES:()=>Ft,KHR_DF_PRIMARIES_ACESCC:()=>Qt,KHR_DF_PRIMARIES_ADOBERGB:()=>Fe,KHR_DF_PRIMARIES_BT2020:()=>Ze,KHR_DF_PRIMARIES_BT601_EBU:()=>gt,KHR_DF_PRIMARIES_BT601_SMPTE:()=>Tt,KHR_DF_PRIMARIES_BT709:()=>nt,KHR_DF_PRIMARIES_CIEXYZ:()=>mn,KHR_DF_PRIMARIES_DISPLAYP3:()=>vn,KHR_DF_PRIMARIES_NTSC1953:()=>Xt,KHR_DF_PRIMARIES_PAL525:()=>Tn,KHR_DF_PRIMARIES_UNSPECIFIED:()=>$e,KHR_DF_SAMPLE_DATATYPE_EXPONENT:()=>_e,KHR_DF_SAMPLE_DATATYPE_FLOAT:()=>mt,KHR_DF_SAMPLE_DATATYPE_LINEAR:()=>Ne,KHR_DF_SAMPLE_DATATYPE_SIGNED:()=>Ee,KHR_DF_TRANSFER_ACESCC:()=>Ce,KHR_DF_TRANSFER_ACESCCT:()=>Je,KHR_DF_TRANSFER_ADOBERGB:()=>Oe,KHR_DF_TRANSFER_BT1886:()=>G,KHR_DF_TRANSFER_DCIP3:()=>oe,KHR_DF_TRANSFER_HLG_EOTF:()=>te,KHR_DF_TRANSFER_HLG_OETF:()=>H,KHR_DF_TRANSFER_ITU:()=>K,KHR_DF_TRANSFER_LINEAR:()=>P,KHR_DF_TRANSFER_NTSC:()=>J,KHR_DF_TRANSFER_PAL625_EOTF:()=>Pe,KHR_DF_TRANSFER_PAL_OETF:()=>xe,KHR_DF_TRANSFER_PQ_EOTF:()=>Z,KHR_DF_TRANSFER_PQ_OETF:()=>ee,KHR_DF_TRANSFER_SLOG:()=>z,KHR_DF_TRANSFER_SLOG2:()=>j,KHR_DF_TRANSFER_SRGB:()=>U,KHR_DF_TRANSFER_ST240:()=>me,KHR_DF_TRANSFER_UNSPECIFIED:()=>D,KHR_DF_VENDORID_KHRONOS:()=>b,KHR_DF_VERSION:()=>x,KHR_SUPERCOMPRESSION_BASISLZ:()=>p,KHR_SUPERCOMPRESSION_NONE:()=>f,KHR_SUPERCOMPRESSION_ZLIB:()=>g,KHR_SUPERCOMPRESSION_ZSTD:()=>A,KTX2Container:()=>ll,VK_FORMAT_A1R5G5B5_UNORM_PACK16:()=>he,VK_FORMAT_A2B10G10R10_SINT_PACK32:()=>Pn,VK_FORMAT_A2B10G10R10_SNORM_PACK32:()=>Wt,VK_FORMAT_A2B10G10R10_UINT_PACK32:()=>Lt,VK_FORMAT_A2B10G10R10_UNORM_PACK32:()=>Zt,VK_FORMAT_A2R10G10B10_SINT_PACK32:()=>It,VK_FORMAT_A2R10G10B10_SNORM_PACK32:()=>ut,VK_FORMAT_A2R10G10B10_UINT_PACK32:()=>_t,VK_FORMAT_A2R10G10B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2_R8G8B8A8_SRGB_BLOCK:()=>Dm,VK_FORMAT_ETC2_R8G8B8A8_UNORM_BLOCK:()=>Mf,VK_FORMAT_ETC2_R8G8B8_SRGB_BLOCK:()=>vy,VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK:()=>Ay,VK_FORMAT_G10X6B10X6G10X6R10X6_422_UNORM_4PACK16:()=>Oy,VK_FORMAT_G12X4B12X4G12X4R12X4_422_UNORM_4PACK16:()=>zy,VK_FORMAT_PVRTC1_2BPP_SRGB_BLOCK_IMG:()=>zs,VK_FORMAT_PVRTC1_2BPP_UNORM_BLOCK_IMG:()=>Tf,VK_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:()=>Ni,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:()=>Hm,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:()=>Hy,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:()=>mu,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:()=>en,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:()=>Vy,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:()=>Dy,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:()=>Py,VK_FORMAT_R10X6_UNORM_PACK16:()=>Ly,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:()=>ky,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:()=>Uy,VK_FORMAT_R12X4_UNORM_PACK16:()=>Ny,VK_FORMAT_R16G16B16A16_SFLOAT:()=>ae,VK_FORMAT_R16G16B16A16_SINT:()=>ft,VK_FORMAT_R16G16B16A16_SNORM:()=>Ue,VK_FORMAT_R16G16B16A16_UINT:()=>Ke,VK_FORMAT_R16G16B16A16_UNORM:()=>we,VK_FORMAT_R16G16B16_SFLOAT:()=>pe,VK_FORMAT_R16G16B16_SINT:()=>se,VK_FORMAT_R16G16B16_SNORM:()=>Si,VK_FORMAT_R16G16B16_UINT:()=>Y,VK_FORMAT_R16G16B16_UNORM:()=>zi,VK_FORMAT_R16G16_SFLOAT:()=>Kn,VK_FORMAT_R16G16_SINT:()=>Rn,VK_FORMAT_R16G16_SNORM:()=>nr,VK_FORMAT_R16G16_UINT:()=>Rr,VK_FORMAT_R16G16_UNORM:()=>Zn,VK_FORMAT_R16_SFLOAT:()=>vi,VK_FORMAT_R16_SINT:()=>Cn,VK_FORMAT_R16_SNORM:()=>jn,VK_FORMAT_R16_UINT:()=>di,VK_FORMAT_R16_UNORM:()=>Dn,VK_FORMAT_R32G32B32A32_SFLOAT:()=>oi,VK_FORMAT_R32G32B32A32_SINT:()=>bn,VK_FORMAT_R32G32B32A32_UINT:()=>kt,VK_FORMAT_R32G32B32_SFLOAT:()=>on,VK_FORMAT_R32G32B32_SINT:()=>Yt,VK_FORMAT_R32G32B32_UINT:()=>Dt,VK_FORMAT_R32G32_SFLOAT:()=>xt,VK_FORMAT_R32G32_SINT:()=>tt,VK_FORMAT_R32G32_UINT:()=>Ae,VK_FORMAT_R32_SFLOAT:()=>ge,VK_FORMAT_R32_SINT:()=>ce,VK_FORMAT_R32_UINT:()=>le,VK_FORMAT_R4G4B4A4_UNORM_PACK16:()=>ke,VK_FORMAT_R4G4_UNORM_PACK8:()=>De,VK_FORMAT_R5G5B5A1_UNORM_PACK16:()=>W,VK_FORMAT_R5G6B5_UNORM_PACK16:()=>Qe,VK_FORMAT_R64G64B64A64_SFLOAT:()=>eo,VK_FORMAT_R64G64B64A64_SINT:()=>bi,VK_FORMAT_R64G64B64A64_UINT:()=>Fr,VK_FORMAT_R64G64B64_SFLOAT:()=>Li,VK_FORMAT_R64G64B64_SINT:()=>hr,VK_FORMAT_R64G64B64_UINT:()=>Bi,VK_FORMAT_R64G64_SFLOAT:()=>xi,VK_FORMAT_R64G64_SINT:()=>li,VK_FORMAT_R64G64_UINT:()=>ai,VK_FORMAT_R64_SFLOAT:()=>Nn,VK_FORMAT_R64_SINT:()=>Wn,VK_FORMAT_R64_UINT:()=>Vn,VK_FORMAT_R8G8B8A8_SINT:()=>cr,VK_FORMAT_R8G8B8A8_SNORM:()=>Vi,VK_FORMAT_R8G8B8A8_SRGB:()=>Le,VK_FORMAT_R8G8B8A8_UINT:()=>lr,VK_FORMAT_R8G8B8A8_UNORM:()=>Fi,VK_FORMAT_R8G8B8_SINT:()=>Rt,VK_FORMAT_R8G8B8_SNORM:()=>Fn,VK_FORMAT_R8G8B8_SRGB:()=>gn,VK_FORMAT_R8G8B8_UINT:()=>sn,VK_FORMAT_R8G8B8_UNORM:()=>Ri,VK_FORMAT_R8G8_SINT:()=>Bn,VK_FORMAT_R8G8_SNORM:()=>Pt,VK_FORMAT_R8G8_SRGB:()=>pi,VK_FORMAT_R8G8_UINT:()=>$t,VK_FORMAT_R8G8_UNORM:()=>Ct,VK_FORMAT_R8_SINT:()=>at,VK_FORMAT_R8_SNORM:()=>We,VK_FORMAT_R8_SRGB:()=>At,VK_FORMAT_R8_UINT:()=>ve,VK_FORMAT_R8_UNORM:()=>Re,VK_FORMAT_S8_UINT:()=>qr,VK_FORMAT_UNDEFINED:()=>ye,VK_FORMAT_X8_D24_UNORM_PACK32:()=>ks,read:()=>ur,write:()=>yu});var d=h("./node_modules/buffer/index.js").Buffer;const f=0,p=1,A=2,g=3,v=0,b=0,x=2,E=0,S=1,M=160,C=161,T=162,L=163,B=0,F=1,D=0,P=1,U=2,K=3,J=4,z=5,j=6,G=7,H=8,te=9,Z=10,ee=11,oe=12,xe=13,Pe=14,me=15,Ce=16,Je=17,Oe=18,$e=0,nt=1,gt=2,Tt=3,Ze=4,mn=5,Ft=6,Qt=7,Xt=8,Tn=9,vn=10,Fe=11,Te=0,pt=1,Nt=2,zt=13,Vt=14,fn=15,mt=128,Ee=64,_e=32,Ne=16,ye=0,De=1,ke=2,Ye=3,Qe=4,ne=5,W=6,k=7,he=8,Re=9,We=10,ve=13,at=14,At=15,Ct=16,Pt=17,$t=20,Bn=21,pi=22,Ri=23,Fn=24,sn=27,Rt=28,gn=29,si=30,Ln=31,Jn=34,$n=35,Ei=36,Fi=37,Vi=38,lr=41,cr=42,Le=43,ht=44,yt=45,de=48,be=49,Ve=50,dt=58,ut=59,_t=62,It=63,Zt=64,Wt=65,Lt=68,Pn=69,Dn=70,jn=71,di=74,Cn=75,vi=76,Zn=77,nr=78,Rr=81,Rn=82,Kn=83,zi=84,Si=85,Y=88,se=89,pe=90,we=91,Ue=92,Ke=95,ft=96,ae=97,le=98,ce=99,ge=100,Ae=101,tt=102,xt=103,Dt=104,Yt=105,on=106,kt=107,bn=108,oi=109,Vn=110,Wn=111,Nn=112,ai=113,li=114,xi=115,Bi=116,hr=117,Li=118,Fr=119,bi=120,eo=121,Kr=122,qo=123,Ha=124,ks=125,ja=126,qr=127,Cr=128,pr=129,fu=130,ih=131,rh=132,wr=133,sh=134,oh=135,ay=136,ol=137,ly=138,cy=139,hy=140,uy=141,dy=142,fy=143,py=144,my=145,gy=146,Ay=147,vy=148,yy=149,xy=150,Mf=151,Dm=152,Om=153,Fm=154,Nm=155,Um=156,km=157,zm=158,Gm=159,ah=160,Ey=161,by=162,_y=163,wy=164,My=165,Cy=166,Sy=167,Ty=168,Ry=169,Cf=170,pu=171,Yo=172,lh=173,to=174,Es=175,Vm=176,al=177,sc=178,no=179,Nr=180,Sf=181,Iy=182,By=183,ch=184,Ly=1000156007,Py=1000156008,Dy=1000156009,Oy=1000156010,Fy=1000156011,Ny=1000156017,Uy=1000156018,ky=1000156019,zy=1000156020,Gy=1000156021,Tf=1000054e3,Hm=1000054001,mu=1000054002,Vy=1000054003,zs=1000054004,Ni=1000054005,Hy=1000054006,en=1000054007,Ui=1000066e3,Rf=1000066001,jm=1000066002,jy=1000066003,oc=1000066004,hh=1000066005,Wm=1000066006,Qm=1000066007,uh=1000066008,Xm=1000066009,Km=1000066010,gu=1000066011,Wy=1000066012,vr=1000066013,ac=100034e4,If=1000340001;class ll{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class cl{constructor(Pi,ar,bs,Ti){this._dataView=new DataView(Pi.buffer,Pi.byteOffset+ar,bs),this._littleEndian=Ti,this._offset=0}_nextUint8(){const Pi=this._dataView.getUint8(this._offset);return this._offset+=1,Pi}_nextUint16(){const Pi=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,Pi}_nextUint32(){const Pi=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,Pi}_nextUint64(){const Pi=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,Pi}_nextInt32(){const Pi=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,Pi}_skip(Pi){return this._offset+=Pi,this}_scan(Pi,ar=0){const bs=this._offset;let Ti=0;for(;this._dataView.getUint8(this._offset)!==ar&&Ti0?$o+je.byteLength:0;_s%8&&(_s+=8-_s%8);const Hi=[],io=new DataView(new ArrayBuffer(3*qn.levels.length*8));let Do=(_s||$o+je.byteLength)+ar.byteLength;for(let Er=0;Er0?_s:0),!0),rr.setBigUint64(60,BigInt(ar.byteLength),!0),new Uint8Array(Ir([new Uint8Array(Br).buffer,ls,io.buffer,Wa,je,_s>0?new ArrayBuffer(_s-($o+je.byteLength)):new ArrayBuffer(0),ar,...Hi]))}},"./node_modules/super-three/examples/jsm/libs/zstddec.module.js":(c,u,h)=>{h.r(u),h.d(u,{ZSTDDecoder:()=>v});var d=h("./node_modules/buffer/index.js").Buffer;let f,p,A;const g={env:{emscripten_notify_memory_growth:function(x){A=new Uint8Array(p.exports.memory.buffer)}}};class v{init(){return f||(f=typeof fetch<"u"?fetch("data:application/wasm;base64,"+b).then(E=>E.arrayBuffer()).then(E=>WebAssembly.instantiate(E,g)).then(this._init):WebAssembly.instantiate(d.from(b,"base64"),g).then(this._init),f)}_init(E){p=E.instance,g.env.emscripten_notify_memory_growth(0)}decode(E,S=0){if(!p)throw new Error("ZSTDDecoder: Await .init() before decoding.");const M=E.byteLength,C=p.exports.malloc(M);A.set(E,C),S=S||Number(p.exports.ZSTD_findDecompressedSize(C,M));const T=p.exports.malloc(S),L=p.exports.ZSTD_decompress(T,S,C,M),B=A.slice(T,T+L);return p.exports.free(C),p.exports.free(T),B}}const b="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8L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CACABQQRqIQEgAkEEaiICIARJDQALDAELIANBBEkEQCAAIQIMAQsgA0F8aiIEIABJBEAgACECDAELIAAhAgNAIAIgAS0AADoAACACIAEtAAE6AAEgAiABLQACOgACIAIgAS0AAzoAAyABQQRqIQEgAkEEaiICIARNDQALCyACIANJBEADQCACIAEtAAA6AAAgAUEBaiEBIAJBAWoiAiADRw0ACwsgAAsMACAAIAEpAAA3AAALQQECfyAAKAIIIgEgACgCEEkEQEEDDwsgACAAKAIEIgJBB3E2AgQgACABIAJBA3ZrIgE2AgggACABKAAANgIAQQALDAAgACABKAIANgAAC/cCAQJ/AkAgACABRg0AAkAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGU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IARQ0AIAAoAgAiA0EBcQ0AIAAgA0EBcjYCACADQQF2QXhqIgFBCCABQQhLG2dBH3NBAnRBgB9qIgEoAgAgAEEIakYEQCABIAAoAgw2AgALIAAoAggiAQRAIAEgACgCDDYCBAsgACgCDCIBBEAgASAAKAIINgIACyACECchAkEAIQFBhCAoAgAhACACDQEgACAAKAIAQX5xNgIAQQAPCyACQQ9qQXhxIgMQHSICQX9GDQIgAkEHakF4cSIAIAJHBEAgACACaxAdQX9GDQMLAkBBhCAoAgAiAUUEQEGAICAANgIADAELIAAgATYCBAtBhCAgADYCACAAIANBAXRBAXI2AgAMAQsgAEUNAQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAai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AXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAIN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CAEQRhqIAEgAhAGIgIQAw0BIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahASOgAAIAMgBEEIaiAEQRhqEBI6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0FIAEgBEEQaiAEQRhqEBI6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBSABIARBCGogBEEYahASOgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEjoAACABIAJqIABrIQIMAwsgAyAEQRBqIARBGGoQEjoAAiADIARBCGogBEEYahASOgADIANBBGohAwwAAAsACyAEQRhqIAEgAhAGIgIQAw0AIARBEGogBEEYaiADEBwgBEEIaiAEQRhqIAMQHCAAIQMDQAJAIARBGGoQBCADIAZPckUEQCADIARBEGogBEEYahAROgAAIAMgBEEIaiAEQRhqEBE6AAEgBEEYahAERQ0BIANBAmohAwsgBUF+aiEFAn8DQEG6fyECIAMiASAFSw0EIAEgBEEQaiAEQRhqEBE6AAAgAUEBaiEDIARBGGoQBEEDRgRAQQIhAiAEQQhqDAILIAMgBUsNBCABIARBCGogBEEYahAROgABIAFBAmohA0EDIQIgBEEYahAEQQNHDQALIARBEGoLIQUgAyAFIARBGGoQEToAACABIAJqIABrIQIMAgsgAyAEQRBqIARBGGoQEToAAiADIARBCGogBEEYahAROgADIANBBGohAwwAAAsACyAEQTBqJAAgAgtpAQF/An8CQAJAIAJBB00NACABKAAAQbfIwuF+Rw0AIAAgASgABDYCmOIBQWIgAEEQaiABIAIQPiIDEAMNAhogAEKBgICAEDcDiOEBIAAgASADaiACIANrECoMAQsgACABIAIQKgtBAAsLrQMBBn8jAEGAAWsiAyQAQWIhCAJAIAJBCUkNACAAQZjQAGogAUEIaiIEIAJBeGogAEGY0AAQMyIFEAMiBg0AIANBHzYCfCADIANB/ABqIANB+ABqI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AEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiO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AAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ"},"./node_modules/super-three/examples/jsm/lights/LightProbeGenerator.js":(c,u,h)=>{h.r(u),h.d(u,{LightProbeGenerator:()=>f});var d=h("./node_modules/super-three/build/three.module.js");class f{static fromCubeTexture(g){let v=0;const b=new d.Vector3,x=new d.Vector3,E=new d.Color,S=[0,0,0,0,0,0,0,0,0],M=new d.SphericalHarmonics3,C=M.coefficients;for(let L=0;L<6;L++){const B=g.image[L],F=B.width,D=B.height,P=document.createElement("canvas");P.width=F,P.height=D;const U=P.getContext("2d");U.drawImage(B,0,0,F,D);const K=U.getImageData(0,0,F,D),J=K.data,z=K.width,j=2/z;for(let G=0,H=J.length;G{h.r(u),h.d(u,{DRACOLoader:()=>p});var d=h("./node_modules/super-three/build/three.module.js");const f=new WeakMap;class p extends d.Loader{constructor(v){super(v),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(v){return this.decoderPath=v,this}setDecoderConfig(v){return this.decoderConfig=v,this}setWorkerLimit(v){return this.workerLimit=v,this}load(v,b,x,E){const S=new d.FileLoader(this.manager);S.setPath(this.path),S.setResponseType("arraybuffer"),S.setRequestHeader(this.requestHeader),S.setWithCredentials(this.withCredentials),S.load(v,M=>{this.parse(M,b,E)},x,E)}parse(v,b,x){this.decodeDracoFile(v,b,null,null,d.SRGBColorSpace).catch(x)}decodeDracoFile(v,b,x,E,S=d.LinearSRGBColorSpace){const M={attributeIDs:x||this.defaultAttributeIDs,attributeTypes:E||this.defaultAttributeTypes,useUniqueIDs:!!x,vertexColorSpace:S};return this.decodeGeometry(v,M).then(b)}decodeGeometry(v,b){const x=JSON.stringify(b);if(f.has(v)){const T=f.get(v);if(T.key===x)return T.promise;if(v.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let E;const S=this.workerNextTaskID++,M=v.byteLength,C=this._getWorker(S,M).then(T=>(E=T,new Promise((L,B)=>{E._callbacks[S]={resolve:L,reject:B},E.postMessage({type:"decode",id:S,taskConfig:b,buffer:v},[v])}))).then(T=>this._createGeometry(T.geometry));return C.catch(()=>!0).then(()=>{E&&S&&this._releaseTask(E,S)}),f.set(v,{key:x,promise:C}),C}_createGeometry(v){const b=new d.BufferGeometry;v.index&&b.setIndex(new d.BufferAttribute(v.index.array,1));for(let x=0;x{x.load(v,E,void 0,S)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const v=typeof WebAssembly!="object"||this.decoderConfig.type==="js",b=[];return v?b.push(this._loadLibrary("draco_decoder.js","text")):(b.push(this._loadLibrary("draco_wasm_wrapper.js","text")),b.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(b).then(x=>{const E=x[0];v||(this.decoderConfig.wasmBinary=x[1]);const S=A.toString(),M=["/* draco decoder */",E,"","/* worker */",S.substring(S.indexOf("{")+1,S.lastIndexOf("}"))].join(` +}`;function DF(w,r,l){let m=new fg;const y=new en,_=new en,R=new ur,I=new dx({depthPacking:Ha}),O=new fx,N={},V=l.maxTextureSize,Q={[C]:T,[T]:C,[L]:L},X=new Ka({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new en},radius:{value:4}},vertexShader:LF,fragmentShader:PF}),$=X.clone();$.defines.HORIZONTAL_PASS=1;const ie=new Yi;ie.setAttribute("position",new Sr(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));const ue=new Os(ie,X),re=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=E;let q=this.type;this.render=function(ze,He,et){if(re.enabled===!1||re.autoUpdate===!1&&re.needsUpdate===!1||ze.length===0)return;const st=w.getRenderTarget(),Be=w.getActiveCubeFace(),Xe=w.getActiveMipmapLevel(),rt=w.state;rt.setBlending(F),rt.buffers.color.setClear(1,1,1,1),rt.buffers.depth.setTest(!0),rt.setScissorTest(!1);const bt=q!==M&&this.type===M,Gt=q===M&&this.type!==M;for(let lt=0,wt=ze.length;ltV||y.y>V)&&(y.x>V&&(_.x=Math.floor(V/ln.x),y.x=_.x*ln.x,qt.mapSize.x=_.x),y.y>V&&(_.y=Math.floor(V/ln.y),y.y=_.y*ln.y,qt.mapSize.y=_.y)),qt.map===null||bt===!0||Gt===!0){const pn=this.type!==M?{minFilter:at,magFilter:at}:{};qt.map!==null&&qt.map.dispose(),qt.map=new yo(y.x,y.y,pn),qt.map.texture.name=Kt.name+".shadowMap",qt.camera.updateProjectionMatrix()}w.setRenderTarget(qt.map),w.clear();const Jt=qt.getViewportCount();for(let pn=0;pn0||He.map&&He.alphaTest>0){const rt=Be.uuid,bt=He.uuid;let Gt=N[rt];Gt===void 0&&(Gt={},N[rt]=Gt);let lt=Gt[bt];lt===void 0&&(lt=Be.clone(),Gt[bt]=lt),Be=lt}if(Be.visible=He.visible,Be.wireframe=He.wireframe,st===M?Be.side=He.shadowSide!==null?He.shadowSide:He.side:Be.side=He.shadowSide!==null?He.shadowSide:Q[He.side],Be.alphaMap=He.alphaMap,Be.alphaTest=He.alphaTest,Be.map=He.map,Be.clipShadows=He.clipShadows,Be.clippingPlanes=He.clippingPlanes,Be.clipIntersection=He.clipIntersection,Be.displacementMap=He.displacementMap,Be.displacementScale=He.displacementScale,Be.displacementBias=He.displacementBias,Be.wireframeLinewidth=He.wireframeLinewidth,Be.linewidth=He.linewidth,et.isPointLight===!0&&Be.isMeshDistanceMaterial===!0){const rt=w.properties.get(Be);rt.light=et}return Be}function Me(ze,He,et,st,Be){if(ze.visible===!1)return;if(ze.layers.test(He.layers)&&(ze.isMesh||ze.isLine||ze.isPoints)&&(ze.castShadow||ze.receiveShadow&&Be===M)&&(!ze.frustumCulled||m.intersectsObject(ze))){ze.modelViewMatrix.multiplyMatrices(et.matrixWorldInverse,ze.matrixWorld);const bt=r.update(ze),Gt=ze.material;if(Array.isArray(Gt)){const lt=bt.groups;for(let wt=0,Kt=lt.length;wt=1):pn.indexOf("OpenGL ES")!==-1&&(Jt=parseFloat(/^OpenGL ES (\d)/.exec(pn)[1]),ln=Jt>=2);let dn=null,Qn={};const Qi=w.getParameter(w.SCISSOR_BOX),ki=w.getParameter(w.VIEWPORT),Ht=new ur().fromArray(Qi),Sn=new ur().fromArray(ki);function _n(ot,xn,tn,An){const kn=new Uint8Array(4),Di=w.createTexture();w.bindTexture(ot,Di),w.texParameteri(ot,w.TEXTURE_MIN_FILTER,w.NEAREST),w.texParameteri(ot,w.TEXTURE_MAG_FILTER,w.NEAREST);for(let $i=0;$i"u"?!1:/OculusBrowser/g.test(navigator.userAgent),ie=r.has("OCULUS_multiview")?r.get("OCULUS_multiview"):null,ue=new WeakMap;let re;const q=new WeakMap;let Se=[],fe=!1,Me=!1;try{Me=typeof OffscreenCanvas<"u"&&new OffscreenCanvas(1,1).getContext("2d")!==null}catch{}function ze(qe,Ie){return Me?new OffscreenCanvas(qe,Ie):hh("canvas")}function He(qe,Ie,St,an){let un=1;if((qe.width>an||qe.height>an)&&(un=an/Math.max(qe.width,qe.height)),un<1||Ie===!0)if(typeof HTMLImageElement<"u"&&qe instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&qe instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&qe instanceof ImageBitmap){const cn=Ie?mu:Math.floor,hi=cn(un*qe.width),zn=cn(un*qe.height);re===void 0&&(re=ze(hi,zn));const Yn=St?ze(hi,zn):re;return Yn.width=hi,Yn.height=zn,Yn.getContext("2d").drawImage(qe,0,0,hi,zn),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+qe.width+"x"+qe.height+") to ("+hi+"x"+zn+")."),Yn}else return"data"in qe&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+qe.width+"x"+qe.height+")."),qe;return qe}function et(qe){return Tf(qe.width)&&Tf(qe.height)}function st(qe){return I?!1:qe.wrapS!==We||qe.wrapT!==We||qe.minFilter!==at&&qe.minFilter!==Bn}function Be(qe,Ie){return qe.generateMipmaps&&Ie&&qe.minFilter!==at&&qe.minFilter!==Bn}function Xe(qe){w.generateMipmap(qe)}function rt(qe,Ie,St,an,un=!1){if(I===!1)return Ie;if(qe!==null){if(w[qe]!==void 0)return w[qe];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+qe+"'")}let cn=Ie;if(Ie===w.RED&&(St===w.FLOAT&&(cn=w.R32F),St===w.HALF_FLOAT&&(cn=w.R16F),St===w.UNSIGNED_BYTE&&(cn=w.R8)),Ie===w.RED_INTEGER&&(St===w.UNSIGNED_BYTE&&(cn=w.R8UI),St===w.UNSIGNED_SHORT&&(cn=w.R16UI),St===w.UNSIGNED_INT&&(cn=w.R32UI),St===w.BYTE&&(cn=w.R8I),St===w.SHORT&&(cn=w.R16I),St===w.INT&&(cn=w.R32I)),Ie===w.RG&&(St===w.FLOAT&&(cn=w.RG32F),St===w.HALF_FLOAT&&(cn=w.RG16F),St===w.UNSIGNED_BYTE&&(cn=w.RG8)),Ie===w.RGBA){const hi=un?rh:vr.getTransfer(an);St===w.FLOAT&&(cn=w.RGBA32F),St===w.HALF_FLOAT&&(cn=w.RGBA16F),St===w.UNSIGNED_BYTE&&(cn=hi===wr?w.SRGB8_ALPHA8:w.RGBA8),St===w.UNSIGNED_SHORT_4_4_4_4&&(cn=w.RGBA4),St===w.UNSIGNED_SHORT_5_5_5_1&&(cn=w.RGB5_A1)}return(cn===w.R16F||cn===w.R32F||cn===w.RG16F||cn===w.RG32F||cn===w.RGBA16F||cn===w.RGBA32F)&&r.get("EXT_color_buffer_float"),cn}function bt(qe,Ie,St){return Be(qe,St)===!0||qe.isFramebufferTexture&&qe.minFilter!==at&&qe.minFilter!==Bn?Math.log2(Math.max(Ie.width,Ie.height))+1:qe.mipmaps!==void 0&&qe.mipmaps.length>0?qe.mipmaps.length:qe.isCompressedTexture&&Array.isArray(qe.image)?Ie.mipmaps.length:1}function Gt(qe){return qe===at||qe===At||qe===Pt?w.NEAREST:w.LINEAR}function lt(qe){const Ie=qe.target;Ie.removeEventListener("dispose",lt),Kt(Ie),Ie.isVideoTexture&&ue.delete(Ie)}function wt(qe){const Ie=qe.target;Ie.removeEventListener("dispose",wt),ln(Ie)}function Kt(qe){const Ie=m.get(qe);if(Ie.__webglInit===void 0)return;const St=qe.source,an=q.get(St);if(an){const un=an[Ie.__cacheKey];un.usedTimes--,un.usedTimes===0&&qt(qe),Object.keys(an).length===0&&q.delete(St)}m.remove(qe)}function qt(qe){const Ie=m.get(qe);w.deleteTexture(Ie.__webglTexture);const St=qe.source,an=q.get(St);delete an[Ie.__cacheKey],R.memory.textures--}function ln(qe){const Ie=qe.texture,St=m.get(qe),an=m.get(Ie);if(an.__webglTexture!==void 0&&(w.deleteTexture(an.__webglTexture),R.memory.textures--),qe.depthTexture&&qe.depthTexture.dispose(),qe.isWebGLCubeRenderTarget)for(let un=0;un<6;un++){if(Array.isArray(St.__webglFramebuffer[un]))for(let cn=0;cn=O&&console.warn("THREE.WebGLTextures: Trying to use "+qe+" texture units while this GPU supports only "+O),Jt+=1,qe}function Qn(qe){const Ie=[];return Ie.push(qe.wrapS),Ie.push(qe.wrapT),Ie.push(qe.wrapR||0),Ie.push(qe.magFilter),Ie.push(qe.minFilter),Ie.push(qe.anisotropy),Ie.push(qe.internalFormat),Ie.push(qe.format),Ie.push(qe.type),Ie.push(qe.generateMipmaps),Ie.push(qe.premultiplyAlpha),Ie.push(qe.flipY),Ie.push(qe.unpackAlignment),Ie.push(qe.colorSpace),Ie.join()}function Qi(qe,Ie){const St=m.get(qe);if(qe.isVideoTexture&&$r(qe),qe.isRenderTargetTexture===!1&&qe.version>0&&St.__version!==qe.version){const an=qe.image;if(an===null)console.warn("THREE.WebGLRenderer: Texture marked for update but no image data found.");else if(an.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else if(hn(St,qe,Ie))return}l.bindTexture(w.TEXTURE_2D,St.__webglTexture,w.TEXTURE0+Ie)}function ki(qe,Ie){const St=m.get(qe);if(qe.version>0&&St.__version!==qe.version){hn(St,qe,Ie);return}l.bindTexture(w.TEXTURE_2D_ARRAY,St.__webglTexture,w.TEXTURE0+Ie)}function Ht(qe,Ie){const St=m.get(qe);if(qe.version>0&&St.__version!==qe.version){hn(St,qe,Ie);return}l.bindTexture(w.TEXTURE_3D,St.__webglTexture,w.TEXTURE0+Ie)}function Sn(qe,Ie){const St=m.get(qe);if(qe.version>0&&St.__version!==qe.version){In(St,qe,Ie);return}l.bindTexture(w.TEXTURE_CUBE_MAP,St.__webglTexture,w.TEXTURE0+Ie)}const _n={[Re]:w.REPEAT,[We]:w.CLAMP_TO_EDGE,[ve]:w.MIRRORED_REPEAT},wi={[at]:w.NEAREST,[At]:w.NEAREST_MIPMAP_NEAREST,[Pt]:w.NEAREST_MIPMAP_LINEAR,[Bn]:w.LINEAR,[pi]:w.LINEAR_MIPMAP_NEAREST,[Fn]:w.LINEAR_MIPMAP_LINEAR},ei={[Dm]:w.NEVER,[Gm]:w.ALWAYS,[Om]:w.LESS,[Nm]:w.LEQUAL,[Fm]:w.EQUAL,[zm]:w.GEQUAL,[Um]:w.GREATER,[km]:w.NOTEQUAL};function ii(qe,Ie,St){if(St?(w.texParameteri(qe,w.TEXTURE_WRAP_S,_n[Ie.wrapS]),w.texParameteri(qe,w.TEXTURE_WRAP_T,_n[Ie.wrapT]),(qe===w.TEXTURE_3D||qe===w.TEXTURE_2D_ARRAY)&&w.texParameteri(qe,w.TEXTURE_WRAP_R,_n[Ie.wrapR]),w.texParameteri(qe,w.TEXTURE_MAG_FILTER,wi[Ie.magFilter]),w.texParameteri(qe,w.TEXTURE_MIN_FILTER,wi[Ie.minFilter])):(w.texParameteri(qe,w.TEXTURE_WRAP_S,w.CLAMP_TO_EDGE),w.texParameteri(qe,w.TEXTURE_WRAP_T,w.CLAMP_TO_EDGE),(qe===w.TEXTURE_3D||qe===w.TEXTURE_2D_ARRAY)&&w.texParameteri(qe,w.TEXTURE_WRAP_R,w.CLAMP_TO_EDGE),(Ie.wrapS!==We||Ie.wrapT!==We)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),w.texParameteri(qe,w.TEXTURE_MAG_FILTER,Gt(Ie.magFilter)),w.texParameteri(qe,w.TEXTURE_MIN_FILTER,Gt(Ie.minFilter)),Ie.minFilter!==at&&Ie.minFilter!==Bn&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),Ie.compareFunction&&(w.texParameteri(qe,w.TEXTURE_COMPARE_MODE,w.COMPARE_REF_TO_TEXTURE),w.texParameteri(qe,w.TEXTURE_COMPARE_FUNC,ei[Ie.compareFunction])),r.has("EXT_texture_filter_anisotropic")===!0){const an=r.get("EXT_texture_filter_anisotropic");if(Ie.magFilter===at||Ie.minFilter!==Pt&&Ie.minFilter!==Fn||Ie.type===Ei&&r.has("OES_texture_float_linear")===!1||I===!1&&Ie.type===Fi&&r.has("OES_texture_half_float_linear")===!1)return;(Ie.anisotropy>1||m.get(Ie).__currentAnisotropy)&&(w.texParameterf(qe,an.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(Ie.anisotropy,y.getMaxAnisotropy())),m.get(Ie).__currentAnisotropy=Ie.anisotropy)}}function yi(qe,Ie){let St=!1;qe.__webglInit===void 0&&(qe.__webglInit=!0,Ie.addEventListener("dispose",lt));const an=Ie.source;let un=q.get(an);un===void 0&&(un={},q.set(an,un));const cn=Qn(Ie);if(cn!==qe.__cacheKey){un[cn]===void 0&&(un[cn]={texture:w.createTexture(),usedTimes:0},R.memory.textures++,St=!0),un[cn].usedTimes++;const hi=un[qe.__cacheKey];hi!==void 0&&(un[qe.__cacheKey].usedTimes--,hi.usedTimes===0&&qt(Ie)),qe.__cacheKey=cn,qe.__webglTexture=un[cn].texture}return St}function nn(qe){fe=qe}function ct(){const qe=fe;fe=!1;for(const Ie of Se)hn(Ie.textureProperties,Ie.texture,Ie.slot),Ie.texture.isPendingDeferredUpload=!1;Se=[],fe=qe}function hn(qe,Ie,St){if(fe)return Ie.isPendingDeferredUpload||(Ie.isPendingDeferredUpload=!0,Se.push({textureProperties:qe,texture:Ie,slot:St})),!1;let an=w.TEXTURE_2D;(Ie.isDataArrayTexture||Ie.isCompressedArrayTexture)&&(an=w.TEXTURE_2D_ARRAY),Ie.isData3DTexture&&(an=w.TEXTURE_3D);const un=yi(qe,Ie),cn=Ie.source;l.bindTexture(an,qe.__webglTexture,w.TEXTURE0+St);const hi=m.get(cn);if(cn.version!==hi.__version||un===!0){l.activeTexture(w.TEXTURE0+St);const zn=vr.getPrimaries(vr.workingColorSpace),Yn=Ie.colorSpace===qr?null:vr.getPrimaries(Ie.colorSpace),Ai=Ie.colorSpace===qr||zn===Yn?w.NONE:w.BROWSER_DEFAULT_WEBGL;w.pixelStorei(w.UNPACK_FLIP_Y_WEBGL,Ie.flipY),w.pixelStorei(w.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ie.premultiplyAlpha),w.pixelStorei(w.UNPACK_ALIGNMENT,Ie.unpackAlignment),w.pixelStorei(w.UNPACK_COLORSPACE_CONVERSION_WEBGL,Ai);const sr=st(Ie)&&et(Ie.image)===!1;let wn=He(Ie.image,sr,!1,V);wn=Mo(Ie,wn);const Ur=et(wn)||I,ot=_.convert(Ie.format,Ie.colorSpace);let xn=_.convert(Ie.type),tn=rt(Ie.internalFormat,ot,xn,Ie.colorSpace,Ie.isVideoTexture);ii(an,Ie,Ur);let An;const kn=Ie.mipmaps,Di=I&&Ie.isVideoTexture!==!0,$i=hi.__version===void 0||un===!0,Ki=bt(Ie,wn,Ur);if(Ie.isDepthTexture)tn=w.DEPTH_COMPONENT,I?Ie.type===Ei?tn=w.DEPTH_COMPONENT32F:Ie.type===$n?tn=w.DEPTH_COMPONENT24:Ie.type===cr?tn=w.DEPTH24_STENCIL8:tn=w.DEPTH_COMPONENT16:Ie.type===Ei&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),Ie.format===be&&tn===w.DEPTH_COMPONENT&&Ie.type!==Ln&&Ie.type!==$n&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),Ie.type=$n,xn=_.convert(Ie.type)),Ie.format===Ve&&tn===w.DEPTH_COMPONENT&&(tn=w.DEPTH_STENCIL,Ie.type!==cr&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),Ie.type=cr,xn=_.convert(Ie.type))),$i&&(Di?l.texStorage2D(w.TEXTURE_2D,1,tn,wn.width,wn.height):l.texImage2D(w.TEXTURE_2D,0,tn,wn.width,wn.height,0,ot,xn,null));else if(Ie.isDataTexture)if(kn.length>0&&Ur){Di&&$i&&l.texStorage2D(w.TEXTURE_2D,Ki,tn,kn[0].width,kn[0].height);for(let En=0,ui=kn.length;En>=1,ui>>=1}}else if(kn.length>0&&Ur){Di&&$i&&l.texStorage2D(w.TEXTURE_2D,Ki,tn,kn[0].width,kn[0].height);for(let En=0,ui=kn.length;En0&&$i++,l.texStorage2D(w.TEXTURE_CUBE_MAP,$i,An,wn[0].width,wn[0].height));for(let En=0;En<6;En++)if(sr){kn?l.texSubImage2D(w.TEXTURE_CUBE_MAP_POSITIVE_X+En,0,0,0,wn[En].width,wn[En].height,xn,tn,wn[En].data):l.texImage2D(w.TEXTURE_CUBE_MAP_POSITIVE_X+En,0,An,wn[En].width,wn[En].height,0,xn,tn,wn[En].data);for(let ui=0;ui>cn),Ur=Math.max(1,Ie.height>>cn);Ie.isWebGLMultiviewRenderTarget===!0?l.texStorage3D(w.TEXTURE_2D_ARRAY,0,Yn,Ie.width,Ie.height,Ie.numViews):un===w.TEXTURE_3D||un===w.TEXTURE_2D_ARRAY?l.texImage3D(un,cn,Yn,wn,Ur,Ie.depth,0,hi,zn,null):l.texImage2D(un,cn,Yn,wn,Ur,0,hi,zn,null)}l.bindFramebuffer(w.FRAMEBUFFER,qe);const sr=gr(Ie);Ie.isWebGLMultiviewRenderTarget===!0?sr?ie.framebufferTextureMultisampleMultiviewOVR(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,m.get(St).__webglTexture,0,br(Ie),0,Ie.numViews):ie.framebufferTextureMultiviewOVR(w.FRAMEBUFFER,w.COLOR_ATTACHMENT0,m.get(St).__webglTexture,0,0,Ie.numViews):(un===w.TEXTURE_2D||un>=w.TEXTURE_CUBE_MAP_POSITIVE_X&&un<=w.TEXTURE_CUBE_MAP_NEGATIVE_Z)&&(sr?X.framebufferTexture2DMultisampleEXT(w.FRAMEBUFFER,an,un,m.get(St).__webglTexture,0,br(Ie)):w.framebufferTexture2D(w.FRAMEBUFFER,an,un,m.get(St).__webglTexture,cn)),l.bindFramebuffer(w.FRAMEBUFFER,null)}function Gn(qe,Ie,St){if(w.bindRenderbuffer(w.RENDERBUFFER,qe),Ie.isWebGLMultiviewRenderTarget===!0){const an=gr(Ie),un=Ie.numViews,cn=Ie.depthTexture;let hi=w.DEPTH_COMPONENT24,zn=w.DEPTH_ATTACHMENT;cn&&cn.isDepthTexture&&(cn.type===Ei?hi=w.DEPTH_COMPONENT32F:cn.type===cr&&(hi=w.DEPTH24_STENCIL8,zn=w.DEPTH_STENCIL_ATTACHMENT));let Yn=m.get(Ie.depthTexture).__webglTexture;Yn===void 0&&(Yn=w.createTexture(),w.bindTexture(w.TEXTURE_2D_ARRAY,Yn),w.texStorage3D(w.TEXTURE_2D_ARRAY,1,hi,Ie.width,Ie.height,un)),an?ie.framebufferTextureMultisampleMultiviewOVR(w.FRAMEBUFFER,zn,Yn,0,br(Ie),0,un):ie.framebufferTextureMultiviewOVR(w.FRAMEBUFFER,zn,Yn,0,0,un)}else if(Ie.depthBuffer&&!Ie.stencilBuffer){let an=I===!0?w.DEPTH_COMPONENT24:w.DEPTH_COMPONENT16;if(St||gr(Ie)){const un=Ie.depthTexture;un&&un.isDepthTexture&&(un.type===Ei?an=w.DEPTH_COMPONENT32F:un.type===$n&&(an=w.DEPTH_COMPONENT24));const cn=br(Ie);gr(Ie)?X.renderbufferStorageMultisampleEXT(w.RENDERBUFFER,cn,an,Ie.width,Ie.height):w.renderbufferStorageMultisample(w.RENDERBUFFER,cn,an,Ie.width,Ie.height)}else w.renderbufferStorage(w.RENDERBUFFER,an,Ie.width,Ie.height);w.framebufferRenderbuffer(w.FRAMEBUFFER,w.DEPTH_ATTACHMENT,w.RENDERBUFFER,qe)}else if(Ie.depthBuffer&&Ie.stencilBuffer){const an=br(Ie);St&&gr(Ie)===!1?w.renderbufferStorageMultisample(w.RENDERBUFFER,an,w.DEPTH24_STENCIL8,Ie.width,Ie.height):gr(Ie)?X.renderbufferStorageMultisampleEXT(w.RENDERBUFFER,an,w.DEPTH24_STENCIL8,Ie.width,Ie.height):w.renderbufferStorage(w.RENDERBUFFER,w.DEPTH_STENCIL,Ie.width,Ie.height),w.framebufferRenderbuffer(w.FRAMEBUFFER,w.DEPTH_STENCIL_ATTACHMENT,w.RENDERBUFFER,qe)}else{const an=Ie.isWebGLMultipleRenderTargets===!0?Ie.texture:[Ie.texture];for(let un=0;un0){St.__webglFramebuffer[zn]=[];for(let Yn=0;Yn0){St.__webglFramebuffer=[];for(let zn=0;zn0&&gr(qe)===!1){const zn=cn?Ie:[Ie];St.__webglMultisampledFramebuffer=w.createFramebuffer(),St.__webglColorRenderbuffer=[],l.bindFramebuffer(w.FRAMEBUFFER,St.__webglMultisampledFramebuffer);for(let Yn=0;Yn0)for(let Yn=0;Yn0)for(let Yn=0;Yn0&&gr(qe)===!1){const Ie=qe.isWebGLMultipleRenderTargets?qe.texture:[qe.texture],St=qe.width,an=qe.height;let un=w.COLOR_BUFFER_BIT;const cn=[],hi=qe.stencilBuffer?w.DEPTH_STENCIL_ATTACHMENT:w.DEPTH_ATTACHMENT,zn=m.get(qe),Yn=qe.isWebGLMultipleRenderTargets===!0;if(Yn)for(let Ai=0;Ai0&&r.has("WEBGL_multisampled_render_to_texture")===!0&&Ie.__useRenderToTexture!==!1}function $r(qe){const Ie=R.render.frame;ue.get(qe)!==Ie&&(ue.set(qe,Ie),qe.update())}function Mo(qe,Ie){const St=qe.colorSpace,an=qe.format,un=qe.type;return qe.isCompressedTexture===!0||qe.isVideoTexture===!0||qe.format===pu||St!==pr&&St!==qr&&(vr.getTransfer(St)===wr?I===!1?r.has("EXT_sRGB")===!0&&an===ht?(qe.format=pu,qe.minFilter=Bn,qe.generateMipmaps=!1):Ie=cl.sRGBToLinear(Ie):(an!==ht||un!==Rt)&&console.warn("THREE.WebGLTextures: sRGB encoded textures have to use RGBAFormat and UnsignedByteType."):console.error("THREE.WebGLTextures: Unsupported texture color space:",St)),Ie}this.allocateTextureUnit=dn,this.resetTextureUnits=pn,this.setTexture2D=Qi,this.setTexture2DArray=ki,this.setTexture3D=Ht,this.setTextureCube=Sn,this.rebindTextures=gi,this.uploadTexture=hn,this.setupRenderTarget=ir,this.updateRenderTargetMipmap=Lr,this.updateMultisampleRenderTarget=fs,this.setupDepthTexture=mi,this.setupDepthRenderbuffer=ti,this.setupFrameBufferTexture=rn,this.useMultisampledRTT=gr,this.runDeferredUploads=ct,this.setDeferTextureUploads=nn}function uM(w,r,l){const m=l.isWebGL2;function y(_,R=qr){let I;const O=vr.getTransfer(R);if(_===Rt)return w.UNSIGNED_BYTE;if(_===Vi)return w.UNSIGNED_SHORT_4_4_4_4;if(_===lr)return w.UNSIGNED_SHORT_5_5_5_1;if(_===gn)return w.BYTE;if(_===si)return w.SHORT;if(_===Ln)return w.UNSIGNED_SHORT;if(_===Jn)return w.INT;if(_===$n)return w.UNSIGNED_INT;if(_===Ei)return w.FLOAT;if(_===Fi)return m?w.HALF_FLOAT:(I=r.get("OES_texture_half_float"),I!==null?I.HALF_FLOAT_OES:null);if(_===Le)return w.ALPHA;if(_===ht)return w.RGBA;if(_===yt)return w.LUMINANCE;if(_===de)return w.LUMINANCE_ALPHA;if(_===be)return w.DEPTH_COMPONENT;if(_===Ve)return w.DEPTH_STENCIL;if(_===pu)return I=r.get("EXT_sRGB"),I!==null?I.SRGB_ALPHA_EXT:null;if(_===dt)return w.RED;if(_===ut)return w.RED_INTEGER;if(_===_t)return w.RG;if(_===It)return w.RG_INTEGER;if(_===Zt)return w.RGBA_INTEGER;if(_===Wt||_===Lt||_===Pn||_===Dn)if(O===wr)if(I=r.get("WEBGL_compressed_texture_s3tc_srgb"),I!==null){if(_===Wt)return I.COMPRESSED_SRGB_S3TC_DXT1_EXT;if(_===Lt)return I.COMPRESSED_SRGB_ALPHA_S3TC_DXT1_EXT;if(_===Pn)return I.COMPRESSED_SRGB_ALPHA_S3TC_DXT3_EXT;if(_===Dn)return I.COMPRESSED_SRGB_ALPHA_S3TC_DXT5_EXT}else return null;else if(I=r.get("WEBGL_compressed_texture_s3tc"),I!==null){if(_===Wt)return I.COMPRESSED_RGB_S3TC_DXT1_EXT;if(_===Lt)return I.COMPRESSED_RGBA_S3TC_DXT1_EXT;if(_===Pn)return I.COMPRESSED_RGBA_S3TC_DXT3_EXT;if(_===Dn)return I.COMPRESSED_RGBA_S3TC_DXT5_EXT}else return null;if(_===jn||_===di||_===Cn||_===vi)if(I=r.get("WEBGL_compressed_texture_pvrtc"),I!==null){if(_===jn)return I.COMPRESSED_RGB_PVRTC_4BPPV1_IMG;if(_===di)return I.COMPRESSED_RGB_PVRTC_2BPPV1_IMG;if(_===Cn)return I.COMPRESSED_RGBA_PVRTC_4BPPV1_IMG;if(_===vi)return I.COMPRESSED_RGBA_PVRTC_2BPPV1_IMG}else return null;if(_===Zn)return I=r.get("WEBGL_compressed_texture_etc1"),I!==null?I.COMPRESSED_RGB_ETC1_WEBGL:null;if(_===nr||_===Rr)if(I=r.get("WEBGL_compressed_texture_etc"),I!==null){if(_===nr)return O===wr?I.COMPRESSED_SRGB8_ETC2:I.COMPRESSED_RGB8_ETC2;if(_===Rr)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ETC2_EAC:I.COMPRESSED_RGBA8_ETC2_EAC}else return null;if(_===Rn||_===Kn||_===zi||_===Si||_===Y||_===se||_===pe||_===we||_===Ue||_===Ke||_===ft||_===ae||_===le||_===ce)if(I=r.get("WEBGL_compressed_texture_astc"),I!==null){if(_===Rn)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_4x4_KHR:I.COMPRESSED_RGBA_ASTC_4x4_KHR;if(_===Kn)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_5x4_KHR:I.COMPRESSED_RGBA_ASTC_5x4_KHR;if(_===zi)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_5x5_KHR:I.COMPRESSED_RGBA_ASTC_5x5_KHR;if(_===Si)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_6x5_KHR:I.COMPRESSED_RGBA_ASTC_6x5_KHR;if(_===Y)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_6x6_KHR:I.COMPRESSED_RGBA_ASTC_6x6_KHR;if(_===se)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_8x5_KHR:I.COMPRESSED_RGBA_ASTC_8x5_KHR;if(_===pe)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_8x6_KHR:I.COMPRESSED_RGBA_ASTC_8x6_KHR;if(_===we)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_8x8_KHR:I.COMPRESSED_RGBA_ASTC_8x8_KHR;if(_===Ue)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_10x5_KHR:I.COMPRESSED_RGBA_ASTC_10x5_KHR;if(_===Ke)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_10x6_KHR:I.COMPRESSED_RGBA_ASTC_10x6_KHR;if(_===ft)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_10x8_KHR:I.COMPRESSED_RGBA_ASTC_10x8_KHR;if(_===ae)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_10x10_KHR:I.COMPRESSED_RGBA_ASTC_10x10_KHR;if(_===le)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_12x10_KHR:I.COMPRESSED_RGBA_ASTC_12x10_KHR;if(_===ce)return O===wr?I.COMPRESSED_SRGB8_ALPHA8_ASTC_12x12_KHR:I.COMPRESSED_RGBA_ASTC_12x12_KHR}else return null;if(_===ge||_===Ae||_===tt)if(I=r.get("EXT_texture_compression_bptc"),I!==null){if(_===ge)return O===wr?I.COMPRESSED_SRGB_ALPHA_BPTC_UNORM_EXT:I.COMPRESSED_RGBA_BPTC_UNORM_EXT;if(_===Ae)return I.COMPRESSED_RGB_BPTC_SIGNED_FLOAT_EXT;if(_===tt)return I.COMPRESSED_RGB_BPTC_UNSIGNED_FLOAT_EXT}else return null;if(_===xt||_===Dt||_===Yt||_===on)if(I=r.get("EXT_texture_compression_rgtc"),I!==null){if(_===ge)return I.COMPRESSED_RED_RGTC1_EXT;if(_===Dt)return I.COMPRESSED_SIGNED_RED_RGTC1_EXT;if(_===Yt)return I.COMPRESSED_RED_GREEN_RGTC2_EXT;if(_===on)return I.COMPRESSED_SIGNED_RED_GREEN_RGTC2_EXT}else return null;return _===cr?m?w.UNSIGNED_INT_24_8:(I=r.get("WEBGL_depth_texture"),I!==null?I.UNSIGNED_INT_24_8_WEBGL:null):w[_]!==void 0?w[_]:null}return{convert:y}}class Ah extends mr{constructor(){super(),this.isGroup=!0,this.type="Group"}}class px extends hs{constructor(r=[]){super(),this.isArrayCamera=!0,this.cameras=r}}var dM=new je,fM=new je;function NF(w,r,l){dM.setFromMatrixPosition(r.matrixWorld),fM.setFromMatrixPosition(l.matrixWorld);var m=dM.distanceTo(fM),y=r.projectionMatrix.elements,_=l.projectionMatrix.elements,R=y[14]/(y[10]-1),I=y[14]/(y[10]+1),O=(y[9]+1)/y[5],N=(y[9]-1)/y[5],V=(y[8]-1)/y[0],Q=(_[8]+1)/_[0],X=R*V,$=R*Q,ie=m/(-V+Q),ue=ie*-V;r.matrixWorld.decompose(w.position,w.quaternion,w.scale),w.translateX(ue),w.translateZ(ie),w.matrixWorld.compose(w.position,w.quaternion,w.scale),w.matrixWorldInverse.copy(w.matrixWorld).invert();var re=R+ie,q=I+ie,Se=X-ue,fe=$+(m-ue),Me=O*I/q*re,ze=N*I/q*re;w.projectionMatrix.makePerspective(Se,fe,Me,ze,re,q)}function pM(w){var r,l,m=this,y=null,_=null,R=null,I=[],O=new _i,N=new _i,V=1,Q="local-floor";typeof window<"u"&&"VRFrameData"in window&&(_=new window.VRFrameData,window.addEventListener("vrdisplaypresentchange",Me,!1));var X=new _i,$=new Ti,ie=new je,ue=new hs;ue.viewport=new ur,ue.layers.enable(1);var re=new hs;re.viewport=new ur,re.layers.enable(2);var q=new px([ue,re]);q.layers.enable(1),q.layers.enable(2);var Se=new en,fe;function Me(){var rt=m.isPresenting=y!==null&&y.isPresenting===!0;if(rt){var bt=y.getEyeParameters("left");r=2*bt.renderWidth*V,l=bt.renderHeight*V,fe=w.getPixelRatio(),w.getSize(Se),w.setDrawingBufferSize(r,l,1),ue.viewport.set(0,0,r/2,l),re.viewport.set(r/2,0,r/2,l),Xe.start(),m.dispatchEvent({type:"sessionstart"})}else m.enabled&&w.setDrawingBufferSize(Se.width,Se.height,fe),Xe.stop(),m.dispatchEvent({type:"sessionend"})}var ze=[],He=[];function et(rt){for(var bt=navigator.getGamepads&&navigator.getGamepads(),Gt=0,lt=bt.length;Gt$+ie?(N.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:r.handedness,target:this})):!N.inputState.pinching&&X<=$-ie&&(N.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:r.handedness,target:this}))}else O!==null&&r.gripSpace&&(_=l.getPose(r.gripSpace,m),_!==null&&(O.matrix.fromArray(_.transform.matrix),O.matrix.decompose(O.position,O.rotation,O.scale),O.matrixWorldNeedsUpdate=!0,_.linearVelocity?(O.hasLinearVelocity=!0,O.linearVelocity.copy(_.linearVelocity)):O.hasLinearVelocity=!1,_.angularVelocity?(O.hasAngularVelocity=!0,O.angularVelocity.copy(_.angularVelocity)):O.hasAngularVelocity=!1));I!==null&&(y=l.getPose(r.targetRaySpace,m),y===null&&_!==null&&(y=_),y!==null&&(I.matrix.fromArray(y.transform.matrix),I.matrix.decompose(I.position,I.rotation,I.scale),I.matrixWorldNeedsUpdate=!0,y.linearVelocity?(I.hasLinearVelocity=!0,I.linearVelocity.copy(y.linearVelocity)):I.hasLinearVelocity=!1,y.angularVelocity?(I.hasAngularVelocity=!0,I.angularVelocity.copy(y.angularVelocity)):I.hasAngularVelocity=!1,this.dispatchEvent(UF)))}return I!==null&&(I.visible=y!==null),O!==null&&(O.visible=_!==null),N!==null&&(N.visible=R!==null),this}_getHandJoint(r,l){if(r.joints[l.jointName]===void 0){const m=new Ah;m.matrixAutoUpdate=!1,m.visible=!1,r.joints[l.jointName]=m,r.add(m)}return r.joints[l.jointName]}}class gM extends Ir{constructor(r,l,m,y,_,R,I,O,N,V){if(V=V!==void 0?V:be,V!==be&&V!==Ve)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");m===void 0&&V===be&&(m=$n),m===void 0&&V===Ve&&(m=cr),super(null,y,_,R,I,O,V,m,N),this.isDepthTexture=!0,this.image={width:r,height:l},this.magFilter=I!==void 0?I:at,this.minFilter=O!==void 0?O:at,this.flipY=!1,this.generateMipmaps=!1,this.compareFunction=null}copy(r){return super.copy(r),this.compareFunction=r.compareFunction,this}toJSON(r){const l=super.toJSON(r);return this.compareFunction!==null&&(l.compareFunction=this.compareFunction),l}}class kF extends to{constructor(r,l,m,y){super();const _=this;let R=null,I=1;var O=null;let N=null,V="local-floor",Q=1,X=null,$=null;var ie=[];let ue=null,re=null,q=null,Se=null;const fe=l.getContextAttributes();let Me=null,ze=null;const He=[],et=[],st=new hs;st.layers.enable(1),st.viewport=new ur;const Be=new hs;Be.layers.enable(2),Be.viewport=new ur;const Xe=[st,Be],rt=new px;rt.layers.enable(1),rt.layers.enable(2);let bt=null,Gt=null;this.cameraAutoUpdate=!0,this.layersEnabled=!1,this.enabled=!1,this.isPresenting=!1,this.isMultiview=!1,this.getCameraPose=function(){return $},this.getController=function(Ht){let Sn=He[Ht];return Sn===void 0&&(Sn=new mx,He[Ht]=Sn),Sn.getTargetRaySpace()},this.getControllerGrip=function(Ht){let Sn=He[Ht];return Sn===void 0&&(Sn=new mx,He[Ht]=Sn),Sn.getGripSpace()},this.getHand=function(Ht){let Sn=He[Ht];return Sn===void 0&&(Sn=new mx,He[Ht]=Sn),Sn.getHandSpace()};function lt(Ht){const Sn=et.indexOf(Ht.inputSource);if(Sn===-1)return;const _n=He[Sn];_n!==void 0&&(_n.update(Ht.inputSource,Ht.frame,X||N),_n.dispatchEvent({type:Ht.type,data:Ht.inputSource}))}function wt(){R.removeEventListener("select",lt),R.removeEventListener("selectstart",lt),R.removeEventListener("selectend",lt),R.removeEventListener("squeeze",lt),R.removeEventListener("squeezestart",lt),R.removeEventListener("squeezeend",lt),R.removeEventListener("end",wt),R.removeEventListener("inputsourceschange",Kt);for(let Ht=0;Ht=0&&(et[wi]=null,He[wi].disconnect(_n))}for(let Sn=0;Sn=et.length){et.push(_n),wi=ii;break}else if(et[ii]===null){et[ii]=_n,wi=ii;break}if(wi===-1)break}const ei=He[wi];ei&&ei.connect(_n)}}const qt=new je,ln=new je;function Jt(Ht,Sn,_n){qt.setFromMatrixPosition(Sn.matrixWorld),ln.setFromMatrixPosition(_n.matrixWorld);const wi=qt.distanceTo(ln),ei=Sn.projectionMatrix.elements,ii=_n.projectionMatrix.elements,yi=ei[14]/(ei[10]-1),nn=ei[14]/(ei[10]+1),ct=(ei[9]+1)/ei[5],hn=(ei[9]-1)/ei[5],In=(ei[8]-1)/ei[0],rn=(ii[8]+1)/ii[0],Gn=yi*In,mi=yi*rn,ti=wi/(-In+rn),gi=ti*-In;Sn.matrixWorld.decompose(Ht.position,Ht.quaternion,Ht.scale),Ht.translateX(gi),Ht.translateZ(ti),Ht.matrixWorld.compose(Ht.position,Ht.quaternion,Ht.scale),Ht.matrixWorldInverse.copy(Ht.matrixWorld).invert();const ir=yi+ti,Lr=nn+ti,fs=Gn-gi,br=mi+(wi-gi),gr=ct*nn/Lr*ir,$r=hn*nn/Lr*ir;Ht.projectionMatrix.makePerspective(fs,br,gr,$r,ir,Lr),Ht.projectionMatrixInverse.copy(Ht.projectionMatrix).invert()}function pn(Ht,Sn){Sn===null?Ht.matrixWorld.copy(Ht.matrix):Ht.matrixWorld.multiplyMatrices(Sn.matrixWorld,Ht.matrix),Ht.matrixWorldInverse.copy(Ht.matrixWorld).invert()}this.setPoseTarget=function(Ht){Ht!==void 0&&(O=Ht)},this.updateCamera=function(Ht){if(R===null)return;rt.near=Be.near=st.near=Ht.near,rt.far=Be.far=st.far=Ht.far,(bt!==rt.near||Gt!==rt.far)&&(R.updateRenderState({depthNear:rt.near,depthFar:rt.far}),bt=rt.near,Gt=rt.far);const Sn=rt.cameras;var _n=O||Ht;const wi=_n.parent;pn(rt,wi);for(let ei=0;ei0&&(re.alphaTest.value=q.alphaTest);const Se=r.get(q).envMap;if(Se&&(re.envMap.value=Se,re.flipEnvMap.value=Se.isCubeTexture&&Se.isRenderTargetTexture===!1?-1:1,re.reflectivity.value=q.reflectivity,re.ior.value=q.ior,re.refractionRatio.value=q.refractionRatio),q.lightMap){re.lightMap.value=q.lightMap;const fe=w._useLegacyLights===!0?Math.PI:1;re.lightMapIntensity.value=q.lightMapIntensity*fe,l(q.lightMap,re.lightMapTransform)}q.aoMap&&(re.aoMap.value=q.aoMap,re.aoMapIntensity.value=q.aoMapIntensity,l(q.aoMap,re.aoMapTransform))}function R(re,q){re.diffuse.value.copy(q.color),re.opacity.value=q.opacity,q.map&&(re.map.value=q.map,l(q.map,re.mapTransform))}function I(re,q){re.dashSize.value=q.dashSize,re.totalSize.value=q.dashSize+q.gapSize,re.scale.value=q.scale}function O(re,q,Se,fe){re.diffuse.value.copy(q.color),re.opacity.value=q.opacity,re.size.value=q.size*Se,re.scale.value=fe*.5,q.map&&(re.map.value=q.map,l(q.map,re.uvTransform)),q.alphaMap&&(re.alphaMap.value=q.alphaMap,l(q.alphaMap,re.alphaMapTransform)),q.alphaTest>0&&(re.alphaTest.value=q.alphaTest)}function N(re,q){re.diffuse.value.copy(q.color),re.opacity.value=q.opacity,re.rotation.value=q.rotation,q.map&&(re.map.value=q.map,l(q.map,re.mapTransform)),q.alphaMap&&(re.alphaMap.value=q.alphaMap,l(q.alphaMap,re.alphaMapTransform)),q.alphaTest>0&&(re.alphaTest.value=q.alphaTest)}function V(re,q){re.specular.value.copy(q.specular),re.shininess.value=Math.max(q.shininess,1e-4)}function Q(re,q){q.gradientMap&&(re.gradientMap.value=q.gradientMap)}function X(re,q){re.metalness.value=q.metalness,q.metalnessMap&&(re.metalnessMap.value=q.metalnessMap,l(q.metalnessMap,re.metalnessMapTransform)),re.roughness.value=q.roughness,q.roughnessMap&&(re.roughnessMap.value=q.roughnessMap,l(q.roughnessMap,re.roughnessMapTransform)),r.get(q).envMap&&(re.envMapIntensity.value=q.envMapIntensity)}function $(re,q,Se){re.ior.value=q.ior,q.sheen>0&&(re.sheenColor.value.copy(q.sheenColor).multiplyScalar(q.sheen),re.sheenRoughness.value=q.sheenRoughness,q.sheenColorMap&&(re.sheenColorMap.value=q.sheenColorMap,l(q.sheenColorMap,re.sheenColorMapTransform)),q.sheenRoughnessMap&&(re.sheenRoughnessMap.value=q.sheenRoughnessMap,l(q.sheenRoughnessMap,re.sheenRoughnessMapTransform))),q.clearcoat>0&&(re.clearcoat.value=q.clearcoat,re.clearcoatRoughness.value=q.clearcoatRoughness,q.clearcoatMap&&(re.clearcoatMap.value=q.clearcoatMap,l(q.clearcoatMap,re.clearcoatMapTransform)),q.clearcoatRoughnessMap&&(re.clearcoatRoughnessMap.value=q.clearcoatRoughnessMap,l(q.clearcoatRoughnessMap,re.clearcoatRoughnessMapTransform)),q.clearcoatNormalMap&&(re.clearcoatNormalMap.value=q.clearcoatNormalMap,l(q.clearcoatNormalMap,re.clearcoatNormalMapTransform),re.clearcoatNormalScale.value.copy(q.clearcoatNormalScale),q.side===T&&re.clearcoatNormalScale.value.negate())),q.iridescence>0&&(re.iridescence.value=q.iridescence,re.iridescenceIOR.value=q.iridescenceIOR,re.iridescenceThicknessMinimum.value=q.iridescenceThicknessRange[0],re.iridescenceThicknessMaximum.value=q.iridescenceThicknessRange[1],q.iridescenceMap&&(re.iridescenceMap.value=q.iridescenceMap,l(q.iridescenceMap,re.iridescenceMapTransform)),q.iridescenceThicknessMap&&(re.iridescenceThicknessMap.value=q.iridescenceThicknessMap,l(q.iridescenceThicknessMap,re.iridescenceThicknessMapTransform))),q.transmission>0&&(re.transmission.value=q.transmission,re.transmissionSamplerMap.value=Se.texture,re.transmissionSamplerSize.value.set(Se.width,Se.height),q.transmissionMap&&(re.transmissionMap.value=q.transmissionMap,l(q.transmissionMap,re.transmissionMapTransform)),re.thickness.value=q.thickness,q.thicknessMap&&(re.thicknessMap.value=q.thicknessMap,l(q.thicknessMap,re.thicknessMapTransform)),re.attenuationDistance.value=q.attenuationDistance,re.attenuationColor.value.copy(q.attenuationColor)),q.anisotropy>0&&(re.anisotropyVector.value.set(q.anisotropy*Math.cos(q.anisotropyRotation),q.anisotropy*Math.sin(q.anisotropyRotation)),q.anisotropyMap&&(re.anisotropyMap.value=q.anisotropyMap,l(q.anisotropyMap,re.anisotropyMapTransform))),re.specularIntensity.value=q.specularIntensity,re.specularColor.value.copy(q.specularColor),q.specularColorMap&&(re.specularColorMap.value=q.specularColorMap,l(q.specularColorMap,re.specularColorMapTransform)),q.specularIntensityMap&&(re.specularIntensityMap.value=q.specularIntensityMap,l(q.specularIntensityMap,re.specularIntensityMapTransform))}function ie(re,q){q.matcap&&(re.matcap.value=q.matcap)}function ue(re,q){const Se=r.get(q).light;re.referencePosition.value.setFromMatrixPosition(Se.matrixWorld),re.nearDistance.value=Se.shadow.camera.near,re.farDistance.value=Se.shadow.camera.far}return{refreshFogUniforms:m,refreshMaterialUniforms:y}}function GF(w,r,l,m){let y={},_={},R=[];const I=l.isWebGL2?w.getParameter(w.MAX_UNIFORM_BUFFER_BINDINGS):0;function O(Se,fe){const Me=fe.program;m.uniformBlockBinding(Se,Me)}function N(Se,fe){let Me=y[Se.id];Me===void 0&&(ie(Se),Me=V(Se),y[Se.id]=Me,Se.addEventListener("dispose",re));const ze=fe.program;m.updateUBOMapping(Se,ze);const He=r.render.frame;_[Se.id]!==He&&(X(Se),_[Se.id]=He)}function V(Se){const fe=Q();Se.__bindingPointIndex=fe;const Me=w.createBuffer(),ze=Se.__size,He=Se.usage;return w.bindBuffer(w.UNIFORM_BUFFER,Me),w.bufferData(w.UNIFORM_BUFFER,ze,He),w.bindBuffer(w.UNIFORM_BUFFER,null),w.bindBufferBase(w.UNIFORM_BUFFER,fe,Me),Me}function Q(){for(let Se=0;Se0){He=Me%ze;const bt=ze-He;He!==0&&bt-Xe.boundary<0&&(Me+=ze-He,Be.__offset=Me)}Me+=Xe.storage}return He=Me%ze,He>0&&(Me+=ze-He),Se.__size=Me,Se.__cache={},this}function ue(Se){const fe={boundary:0,storage:0};return typeof Se=="number"?(fe.boundary=4,fe.storage=4):Se.isVector2?(fe.boundary=8,fe.storage=8):Se.isVector3||Se.isColor?(fe.boundary=16,fe.storage=12):Se.isVector4?(fe.boundary=16,fe.storage=16):Se.isMatrix3?(fe.boundary=48,fe.storage=48):Se.isMatrix4?(fe.boundary=64,fe.storage=64):Se.isTexture?console.warn("THREE.WebGLRenderer: Texture samplers can not be part of an uniforms group."):console.warn("THREE.WebGLRenderer: Unsupported uniform value type.",Se),fe}function re(Se){const fe=Se.target;fe.removeEventListener("dispose",re);const Me=R.indexOf(fe.__bindingPointIndex);R.splice(Me,1),w.deleteBuffer(y[fe.id]),delete y[fe.id],delete _[fe.id]}function q(){for(const Se in y)w.deleteBuffer(y[Se]);R=[],y={},_={}}return{bind:O,update:N,dispose:q}}class AM{constructor(r={}){const{canvas:l=Wm(),context:m=null,depth:y=!0,stencil:_=!0,alpha:R=!1,antialias:I=!1,premultipliedAlpha:O=!0,preserveDrawingBuffer:N=!1,powerPreference:V="default",failIfMajorPerformanceCaveat:Q=!1,multiviewStereo:X=!1}=r;this.isWebGLRenderer=!0;let $;m!==null?$=m.getContextAttributes().alpha:$=R;const ie=new Uint32Array(4),ue=new Int32Array(4);let re=null,q=null;const Se=[],fe=[];this.domElement=l,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=Cr,this._useLegacyLights=!1,this.toneMapping=fn,this.toneMappingExposure=1;const Me=this;let ze=!1,He=0,et=0,st=null,Be=-1,Xe=null;const rt=new ur,bt=new ur;let Gt=null;const lt=new Hn(0);let wt=0,Kt=l.width,qt=l.height,ln=1,Jt=null,pn=null;const dn=new ur(0,0,Kt,qt),Qn=new ur(0,0,Kt,qt);let Qi=!1;const ki=new fg;let Ht=!1,Sn=!1,_n=null;const wi=new _i,ei=new en,ii=new je,yi={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function nn(){return st===null?ln:1}let ct=m;function hn(Ge,Et){for(let Bt=0;Bt{function Xn(){if(Ot.forEach(function(fi){ti.get(fi).currentProgram.isReady()&&Ot.delete(fi)}),Ot.size===0){Ut(Ge);return}setTimeout(Xn,10)}In.get("KHR_parallel_shader_compile")!==null?Xn():setTimeout(Xn,10)})};let En=null;function ui(Ge){En&&En(Ge)}function xr(){Ih.stop()}function Fs(){Ih.start()}const Ih=new ix;Ih.setAnimationLoop(ui),typeof self<"u"&&Ih.setContext(self),this.setAnimationLoop=function(Ge){En=Ge,ot.setAnimationLoop(Ge),Ge===null?Ih.stop():Ih.start()},ot.addEventListener("sessionstart",xr),ot.addEventListener("sessionend",Fs),this.render=function(Ge,Et){if(Et!==void 0&&Et.isCamera!==!0){console.error("THREE.WebGLRenderer.render: camera is not an instance of THREE.Camera.");return}if(ze===!0)return;Ge.matrixWorldAutoUpdate===!0&&Ge.updateMatrixWorld(),Et.parent===null&&Et.matrixWorldAutoUpdate===!0&&Et.updateMatrixWorld(),ot.enabled===!0&&ot.isPresenting===!0&&(ot.cameraAutoUpdate===!0&&ot.updateCamera(Et),Et=ot.getCamera()),Ge.isScene===!0&&Ge.onBeforeRender(Me,Ge,Et,st),q=Ie.get(Ge,fe.length),q.init(),fe.push(q),wi.multiplyMatrices(Et.projectionMatrix,Et.matrixWorldInverse),ki.setFromProjectionMatrix(wi),Sn=this.localClippingEnabled,Ht=St.init(this.clippingPlanes,Sn),re=qe.get(Ge,Se.length),re.init(),Se.push(re),nC(Ge,Et,0,Me.sortObjects),re.finish(),Me.sortObjects===!0&&re.sort(Jt,pn),this.info.render.frame++,Ht===!0&&St.beginShadows();const Bt=q.state.shadowsArray;if(an.render(Bt,Ge,Et),Ht===!0&&St.endShadows(),this.info.autoReset===!0&&this.info.reset(),cn.render(re,Ge),q.setupLights(Me._useLegacyLights),Et.isArrayCamera)if(ot.enabled&&ot.isMultiview)gi.setDeferTextureUploads(!0),Zx(re,Ge,Et,Et.cameras[0].viewport);else{const Ot=Et.cameras;for(let Ut=0,Xn=Ot.length;Ut0?q=fe[fe.length-1]:q=null,Se.pop(),Se.length>0?re=Se[Se.length-1]:re=null};function nC(Ge,Et,Bt,Ot){if(Ge.visible===!1)return;if(Ge.layers.test(Et.layers)){if(Ge.isGroup)Bt=Ge.renderOrder;else if(Ge.isLOD)Ge.autoUpdate===!0&&Ge.update(Et);else if(Ge.isLight)q.pushLight(Ge),Ge.castShadow&&q.pushShadow(Ge);else if(Ge.isSprite){if(!Ge.frustumCulled||ki.intersectsSprite(Ge)){Ot&&ii.setFromMatrixPosition(Ge.matrixWorld).applyMatrix4(wi);const fi=gr.update(Ge),Ci=Ge.material;Ci.visible&&re.push(Ge,fi,Ci,Bt,ii.z,null)}}else if((Ge.isMesh||Ge.isLine||Ge.isPoints)&&(!Ge.frustumCulled||ki.intersectsObject(Ge))){const fi=gr.update(Ge),Ci=Ge.material;if(Ot&&(Ge.boundingSphere!==void 0?(Ge.boundingSphere===null&&Ge.computeBoundingSphere(),ii.copy(Ge.boundingSphere.center)):(fi.boundingSphere===null&&fi.computeBoundingSphere(),ii.copy(fi.boundingSphere.center)),ii.applyMatrix4(Ge.matrixWorld).applyMatrix4(wi)),Array.isArray(Ci)){const Oi=fi.groups;for(let Ji=0,Gi=Oi.length;Ji0&&R5(Ut,Xn,Et,Bt),Ot&&Gn.viewport(rt.copy(Ot)),Ut.length>0&&lA(Ut,Et,Bt),Xn.length>0&&lA(Xn,Et,Bt),fi.length>0&&lA(fi,Et,Bt),Gn.buffers.depth.setTest(!0),Gn.buffers.depth.setMask(!0),Gn.buffers.color.setMask(!0),Gn.setPolygonOffset(!1)}function R5(Ge,Et,Bt,Ot){if((Bt.isScene===!0?Bt.overrideMaterial:null)!==null)return;const Xn=rn.isWebGL2;_n===null&&(_n=new yo(1,1,{generateMipmaps:!0,type:In.has("EXT_color_buffer_half_float")?Fi:Rt,minFilter:Fn,samples:Xn?4:0})),Me.getDrawingBufferSize(ei),Xn?_n.setSize(ei.x,ei.y):_n.setSize(mu(ei.x),mu(ei.y));const fi=Me.getRenderTarget();Me.setRenderTarget(_n),Me.getClearColor(lt),wt=Me.getClearAlpha(),wt<1&&Me.setClearColor(16777215,.5),Me.clear();const Ci=Me.toneMapping;Me.toneMapping=fn,lA(Ge,Bt,Ot),gi.updateMultisampleRenderTarget(_n),gi.updateRenderTargetMipmap(_n);let Oi=!1;for(let Ji=0,Gi=Et.length;Ji0),Xi=!!Bt.morphAttributes.position,Jr=!!Bt.morphAttributes.normal,No=!!Bt.morphAttributes.color;let Ms=fn;Ot.toneMapped&&(st===null||st.isXRRenderTarget===!0)&&(Ms=Me.toneMapping);const Ac=st&&st.isWebGLMultiviewRenderTarget?st.numViews:0,jr=Bt.morphAttributes.position||Bt.morphAttributes.normal||Bt.morphAttributes.color,Bh=jr!==void 0?jr.length:0,fr=ti.get(Ot),P5=q.state.lights;if(Ht===!0&&(Sn===!0||Ge!==Xe)){const Uo=Ge===Xe&&Ot.id===Be;St.setState(Ot,Ge,Uo)}let Zr=!1;Ot.version===fr.__version?(fr.needsLights&&fr.lightsStateVersion!==P5.state.version||fr.outputColorSpace!==Ci||Ut.isInstancedMesh&&fr.instancing===!1||!Ut.isInstancedMesh&&fr.instancing===!0||Ut.isSkinnedMesh&&fr.skinning===!1||!Ut.isSkinnedMesh&&fr.skinning===!0||Ut.isInstancedMesh&&fr.instancingColor===!0&&Ut.instanceColor===null||Ut.isInstancedMesh&&fr.instancingColor===!1&&Ut.instanceColor!==null||fr.envMap!==Oi||Ot.fog===!0&&fr.fog!==Xn||fr.numClippingPlanes!==void 0&&(fr.numClippingPlanes!==St.numPlanes||fr.numIntersection!==St.numIntersection)||fr.vertexAlphas!==Ji||fr.vertexTangents!==Gi||fr.morphTargets!==Xi||fr.morphNormals!==Jr||fr.morphColors!==No||fr.toneMapping!==Ms||rn.isWebGL2===!0&&fr.morphTargetsCount!==Bh||fr.numMultiviewViews!==Ac)&&(Zr=!0):(Zr=!0,fr.__version=Ot.version);let Al=fr.currentProgram;Zr===!0&&(Al=cA(Ot,Et,Ut));let oC=!1,ap=!1,e1=!1;const Cs=Al.getUniforms(),Lh=fr.uniforms;if(Gn.useProgram(Al.program)&&(oC=!0,ap=!0,e1=!0),Ot.id!==Be&&(Be=Ot.id,ap=!0),oC||Xe!==Ge){Al.numMultiviewViews>0?(un.updateCameraProjectionMatricesUniform(Ge,Cs),un.updateCameraViewMatricesUniform(Ge,Cs)):(Cs.setValue(ct,"projectionMatrix",Ge.projectionMatrix),Cs.setValue(ct,"viewMatrix",Ge.matrixWorldInverse));const Uo=Cs.map.cameraPosition;Uo!==void 0&&Uo.setValue(ct,ii.setFromMatrixPosition(Ge.matrixWorld)),rn.logarithmicDepthBuffer&&Cs.setValue(ct,"logDepthBufFC",2/(Math.log(Ge.far+1)/Math.LN2)),(Ot.isMeshPhongMaterial||Ot.isMeshToonMaterial||Ot.isMeshLambertMaterial||Ot.isMeshBasicMaterial||Ot.isMeshStandardMaterial||Ot.isShaderMaterial)&&Cs.setValue(ct,"isOrthographic",Ge.isOrthographicCamera===!0),Xe!==Ge&&(Xe=Ge,ap=!0,e1=!0)}if(Ut.isSkinnedMesh){Cs.setOptional(ct,Ut,"bindMatrix"),Cs.setOptional(ct,Ut,"bindMatrixInverse");const Uo=Ut.skeleton;Uo&&(rn.floatVertexTextures?(Uo.boneTexture===null&&Uo.computeBoneTexture(),Cs.setValue(ct,"boneTexture",Uo.boneTexture,gi),Cs.setValue(ct,"boneTextureSize",Uo.boneTextureSize)):console.warn("THREE.WebGLRenderer: SkinnedMesh can only be used with WebGL 2. With WebGL 1 OES_texture_float and vertex textures support is required."))}const t1=Bt.morphAttributes;if((t1.position!==void 0||t1.normal!==void 0||t1.color!==void 0&&rn.isWebGL2===!0)&&hi.update(Ut,Bt,Al),(ap||fr.receiveShadow!==Ut.receiveShadow)&&(fr.receiveShadow=Ut.receiveShadow,Cs.setValue(ct,"receiveShadow",Ut.receiveShadow)),Ot.isMeshGouraudMaterial&&Ot.envMap!==null&&(Lh.envMap.value=Oi,Lh.flipEnvMap.value=Oi.isCubeTexture&&Oi.isRenderTargetTexture===!1?-1:1),ap&&(Cs.setValue(ct,"toneMappingExposure",Me.toneMappingExposure),fr.needsLights&&B5(Lh,e1),Xn&&Ot.fog===!0&&Mo.refreshFogUniforms(Lh,Xn),Mo.refreshMaterialUniforms(Lh,Ot,ln,qt,_n),vg.upload(ct,rC(fr),Lh,gi)),Ot.isShaderMaterial&&Ot.uniformsNeedUpdate===!0&&(vg.upload(ct,rC(fr),Lh,gi),Ot.uniformsNeedUpdate=!1),Ot.isSpriteMaterial&&Cs.setValue(ct,"center",Ut.center),Al.numMultiviewViews>0?un.updateObjectMatricesUniforms(Ut,Ge,Cs):(Cs.setValue(ct,"modelViewMatrix",Ut.modelViewMatrix),Cs.setValue(ct,"normalMatrix",Ut.normalMatrix)),Cs.setValue(ct,"modelMatrix",Ut.matrixWorld),Ot.isShaderMaterial||Ot.isRawShaderMaterial){const Uo=Ot.uniformsGroups;for(let n1=0,D5=Uo.length;n10&&gi.useMultisampledRTT(Ge)===!1?Ut=ti.get(Ge).__webglMultisampledFramebuffer:Array.isArray(Gi)?Ut=Gi[Bt]:Ut=Gi,rt.copy(Ge.viewport),bt.copy(Ge.scissor),Gt=Ge.scissorTest}else rt.copy(dn).multiplyScalar(ln).floor(),bt.copy(Qn).multiplyScalar(ln).floor(),Gt=Qi;if(Gn.bindFramebuffer(ct.FRAMEBUFFER,Ut)&&rn.drawBuffers&&Ot&&Gn.drawBuffers(Ge,Ut),Gn.viewport(rt),Gn.scissor(bt),Gn.setScissorTest(Gt),Xn){const Oi=ti.get(Ge.texture);ct.framebufferTexture2D(ct.FRAMEBUFFER,ct.COLOR_ATTACHMENT0,ct.TEXTURE_CUBE_MAP_POSITIVE_X+Et,Oi.__webglTexture,Bt)}else if(fi){const Oi=ti.get(Ge.texture),Ji=Et||0;ct.framebufferTextureLayer(ct.FRAMEBUFFER,ct.COLOR_ATTACHMENT0,Oi.__webglTexture,Bt||0,Ji)}Be=-1},this.readRenderTargetPixels=function(Ge,Et,Bt,Ot,Ut,Xn,fi){if(!(Ge&&Ge.isWebGLRenderTarget)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not THREE.WebGLRenderTarget.");return}let Ci=ti.get(Ge).__webglFramebuffer;if(Ge.isWebGLCubeRenderTarget&&fi!==void 0&&(Ci=Ci[fi]),Ci){Gn.bindFramebuffer(ct.FRAMEBUFFER,Ci);try{const Oi=Ge.texture,Ji=Oi.format,Gi=Oi.type;if(Ji!==ht&&Ai.convert(Ji)!==ct.getParameter(ct.IMPLEMENTATION_COLOR_READ_FORMAT)){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in RGBA or implementation defined format.");return}const Xi=Gi===Fi&&(In.has("EXT_color_buffer_half_float")||rn.isWebGL2&&In.has("EXT_color_buffer_float"));if(Gi!==Rt&&Ai.convert(Gi)!==ct.getParameter(ct.IMPLEMENTATION_COLOR_READ_TYPE)&&!(Gi===Ei&&(rn.isWebGL2||In.has("OES_texture_float")||In.has("WEBGL_color_buffer_float")))&&!Xi){console.error("THREE.WebGLRenderer.readRenderTargetPixels: renderTarget is not in UnsignedByteType or implementation defined type.");return}Et>=0&&Et<=Ge.width-Ot&&Bt>=0&&Bt<=Ge.height-Ut&&ct.readPixels(Et,Bt,Ot,Ut,Ai.convert(Ji),Ai.convert(Gi),Xn)}finally{const Oi=st!==null?ti.get(st).__webglFramebuffer:null;Gn.bindFramebuffer(ct.FRAMEBUFFER,Oi)}}},this.copyFramebufferToTexture=function(Ge,Et,Bt=0){const Ot=Math.pow(2,-Bt),Ut=Math.floor(Et.image.width*Ot),Xn=Math.floor(Et.image.height*Ot);gi.setTexture2D(Et,0),ct.copyTexSubImage2D(ct.TEXTURE_2D,Bt,0,0,Ge.x,Ge.y,Ut,Xn),Gn.unbindTexture()},this.copyTextureToTexture=function(Ge,Et,Bt,Ot=0){const Ut=Et.image.width,Xn=Et.image.height,fi=Ai.convert(Bt.format),Ci=Ai.convert(Bt.type);gi.setTexture2D(Bt,0),ct.pixelStorei(ct.UNPACK_FLIP_Y_WEBGL,Bt.flipY),ct.pixelStorei(ct.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Bt.premultiplyAlpha),ct.pixelStorei(ct.UNPACK_ALIGNMENT,Bt.unpackAlignment),Et.isDataTexture?ct.texSubImage2D(ct.TEXTURE_2D,Ot,Ge.x,Ge.y,Ut,Xn,fi,Ci,Et.image.data):Et.isCompressedTexture?ct.compressedTexSubImage2D(ct.TEXTURE_2D,Ot,Ge.x,Ge.y,Et.mipmaps[0].width,Et.mipmaps[0].height,fi,Et.mipmaps[0].data):ct.texSubImage2D(ct.TEXTURE_2D,Ot,Ge.x,Ge.y,fi,Ci,Et.image),Ot===0&&Bt.generateMipmaps&&ct.generateMipmap(ct.TEXTURE_2D),Gn.unbindTexture()},this.copyTextureToTexture3D=function(Ge,Et,Bt,Ot,Ut=0){if(Me.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}const Xn=Ge.max.x-Ge.min.x+1,fi=Ge.max.y-Ge.min.y+1,Ci=Ge.max.z-Ge.min.z+1,Oi=Ai.convert(Ot.format),Ji=Ai.convert(Ot.type);let Gi;if(Ot.isData3DTexture)gi.setTexture3D(Ot,0),Gi=ct.TEXTURE_3D;else if(Ot.isDataArrayTexture)gi.setTexture2DArray(Ot,0),Gi=ct.TEXTURE_2D_ARRAY;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}ct.pixelStorei(ct.UNPACK_FLIP_Y_WEBGL,Ot.flipY),ct.pixelStorei(ct.UNPACK_PREMULTIPLY_ALPHA_WEBGL,Ot.premultiplyAlpha),ct.pixelStorei(ct.UNPACK_ALIGNMENT,Ot.unpackAlignment);const Xi=ct.getParameter(ct.UNPACK_ROW_LENGTH),Jr=ct.getParameter(ct.UNPACK_IMAGE_HEIGHT),No=ct.getParameter(ct.UNPACK_SKIP_PIXELS),Ms=ct.getParameter(ct.UNPACK_SKIP_ROWS),Ac=ct.getParameter(ct.UNPACK_SKIP_IMAGES),jr=Bt.isCompressedTexture?Bt.mipmaps[0]:Bt.image;ct.pixelStorei(ct.UNPACK_ROW_LENGTH,jr.width),ct.pixelStorei(ct.UNPACK_IMAGE_HEIGHT,jr.height),ct.pixelStorei(ct.UNPACK_SKIP_PIXELS,Ge.min.x),ct.pixelStorei(ct.UNPACK_SKIP_ROWS,Ge.min.y),ct.pixelStorei(ct.UNPACK_SKIP_IMAGES,Ge.min.z),Bt.isDataTexture||Bt.isData3DTexture?ct.texSubImage3D(Gi,Ut,Et.x,Et.y,Et.z,Xn,fi,Ci,Oi,Ji,jr.data):Bt.isCompressedArrayTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ct.compressedTexSubImage3D(Gi,Ut,Et.x,Et.y,Et.z,Xn,fi,Ci,Oi,jr.data)):ct.texSubImage3D(Gi,Ut,Et.x,Et.y,Et.z,Xn,fi,Ci,Oi,Ji,jr),ct.pixelStorei(ct.UNPACK_ROW_LENGTH,Xi),ct.pixelStorei(ct.UNPACK_IMAGE_HEIGHT,Jr),ct.pixelStorei(ct.UNPACK_SKIP_PIXELS,No),ct.pixelStorei(ct.UNPACK_SKIP_ROWS,Ms),ct.pixelStorei(ct.UNPACK_SKIP_IMAGES,Ac),Ut===0&&Ot.generateMipmaps&&ct.generateMipmap(Gi),Gn.unbindTexture()},this.initTexture=function(Ge){Ge.isCubeTexture?gi.setTextureCube(Ge,0):Ge.isData3DTexture?gi.setTexture3D(Ge,0):Ge.isDataArrayTexture||Ge.isCompressedArrayTexture?gi.setTexture2DArray(Ge,0):gi.setTexture2D(Ge,0),Gn.unbindTexture()},this.resetState=function(){He=0,et=0,st=null,Gn.reset(),sr.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}get coordinateSystem(){return Yo}get outputColorSpace(){return this._outputColorSpace}set outputColorSpace(r){this._outputColorSpace=r;const l=this.getContext();l.drawingBufferColorSpace=r===fu?"display-p3":"srgb",l.unpackColorSpace=vr.workingColorSpace===ih?"display-p3":"srgb"}get physicallyCorrectLights(){return console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),!this.useLegacyLights}set physicallyCorrectLights(r){console.warn("THREE.WebGLRenderer: The property .physicallyCorrectLights has been removed. Set renderer.useLegacyLights instead."),this.useLegacyLights=!r}get outputEncoding(){return console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace===Cr?Kr:eo}set outputEncoding(r){console.warn("THREE.WebGLRenderer: Property .outputEncoding has been removed. Use .outputColorSpace instead."),this.outputColorSpace=r===Kr?Cr:pr}get useLegacyLights(){return console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights}set useLegacyLights(r){console.warn("THREE.WebGLRenderer: The property .useLegacyLights has been deprecated. Migrate your lighting according to the following guide: https://discourse.threejs.org/t/updates-to-lighting-in-three-js-r155/53733."),this._useLegacyLights=r}}class vM extends AM{}vM.prototype.isWebGL1Renderer=!0;class yg{constructor(r,l=25e-5){this.isFogExp2=!0,this.name="",this.color=new Hn(r),this.density=l}clone(){return new yg(this.color,this.density)}toJSON(){return{type:"FogExp2",name:this.name,color:this.color.getHex(),density:this.density}}}class xg{constructor(r,l=1,m=1e3){this.isFog=!0,this.name="",this.color=new Hn(r),this.near=l,this.far=m}clone(){return new xg(this.color,this.near,this.far)}toJSON(){return{type:"Fog",name:this.name,color:this.color.getHex(),near:this.near,far:this.far}}}class yM extends mr{constructor(){super(),this.isScene=!0,this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.backgroundBlurriness=0,this.backgroundIntensity=1,this.overrideMaterial=null,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(r,l){return super.copy(r,l),r.background!==null&&(this.background=r.background.clone()),r.environment!==null&&(this.environment=r.environment.clone()),r.fog!==null&&(this.fog=r.fog.clone()),this.backgroundBlurriness=r.backgroundBlurriness,this.backgroundIntensity=r.backgroundIntensity,r.overrideMaterial!==null&&(this.overrideMaterial=r.overrideMaterial.clone()),this.matrixAutoUpdate=r.matrixAutoUpdate,this}toJSON(r){const l=super.toJSON(r);return this.fog!==null&&(l.object.fog=this.fog.toJSON()),this.backgroundBlurriness>0&&(l.object.backgroundBlurriness=this.backgroundBlurriness),this.backgroundIntensity!==1&&(l.object.backgroundIntensity=this.backgroundIntensity),l}}class Eg{constructor(r,l){this.isInterleavedBuffer=!0,this.array=r,this.stride=l,this.count=r!==void 0?r.length/l:0,this.usage=ah,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=no()}onUploadCallback(){}set needsUpdate(r){r===!0&&this.version++}setUsage(r){return this.usage=r,this}copy(r){return this.array=new r.array.constructor(r.array),this.count=r.count,this.stride=r.stride,this.usage=r.usage,this}copyAt(r,l,m){r*=this.stride,m*=l.stride;for(let y=0,_=this.stride;y<_;y++)this.array[r+y]=l.array[m+y];return this}set(r,l=0){return this.array.set(r,l),this}clone(r){r.arrayBuffers===void 0&&(r.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=no()),r.arrayBuffers[this.array.buffer._uuid]===void 0&&(r.arrayBuffers[this.array.buffer._uuid]=this.array.slice(0).buffer);const l=new this.array.constructor(r.arrayBuffers[this.array.buffer._uuid]),m=new this.constructor(l,this.stride);return m.setUsage(this.usage),m}onUpload(r){return this.onUploadCallback=r,this}toJSON(r){return r.arrayBuffers===void 0&&(r.arrayBuffers={}),this.array.buffer._uuid===void 0&&(this.array.buffer._uuid=no()),r.arrayBuffers[this.array.buffer._uuid]===void 0&&(r.arrayBuffers[this.array.buffer._uuid]=Array.from(new Uint32Array(this.array.buffer))),{uuid:this.uuid,buffer:this.array.buffer._uuid,type:this.array.constructor.name,stride:this.stride}}}const so=new je;class vh{constructor(r,l,m,y=!1){this.isInterleavedBufferAttribute=!0,this.name="",this.data=r,this.itemSize=l,this.offset=m,this.normalized=y}get count(){return this.data.count}get array(){return this.data.array}set needsUpdate(r){this.data.needsUpdate=r}applyMatrix4(r){for(let l=0,m=this.data.count;lr.far||l.push({distance:O,point:Gf.clone(),uv:bo.getInterpolation(Gf,bg,Hf,_g,EM,Ax,bM,new en),face:null,object:this})}copy(r,l){return super.copy(r,l),r.center!==void 0&&this.center.copy(r.center),this.material=r.material,this}}function wg(w,r,l,m,y,_){ku.subVectors(w,l).addScalar(.5).multiply(m),y!==void 0?(Vf.x=_*ku.x-y*ku.y,Vf.y=y*ku.x+_*ku.y):Vf.copy(ku),w.copy(r),w.x+=Vf.x,w.y+=Vf.y,w.applyMatrix4(xM)}const Mg=new je,wM=new je;class MM extends mr{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(r){super.copy(r,!1);const l=r.levels;for(let m=0,y=l.length;m0){let m,y;for(m=1,y=l.length;m0){Mg.setFromMatrixPosition(this.matrixWorld);const y=r.ray.origin.distanceTo(Mg);this.getObjectForDistance(y).raycast(r,l)}}update(r){const l=this.levels;if(l.length>1){Mg.setFromMatrixPosition(r.matrixWorld),wM.setFromMatrixPosition(this.matrixWorld);const m=Mg.distanceTo(wM)/r.zoom;l[0].object.visible=!0;let y,_;for(y=1,_=l.length;y<_;y++){let R=l[y].distance;if(l[y].object.visible&&(R-=R*l[y].hysteresis),m>=R)l[y-1].object.visible=!1,l[y].object.visible=!0;else break}for(this._currentLevel=y-1;y<_;y++)l[y].object.visible=!1}}toJSON(r){const l=super.toJSON(r);this.autoUpdate===!1&&(l.object.autoUpdate=!1),l.object.levels=[];const m=this.levels;for(let y=0,_=m.length;y<_;y++){const R=m[y];l.object.levels.push({object:R.object.uuid,distance:R.distance,hysteresis:R.hysteresis})}return l}}const CM=new je,SM=new ur,TM=new ur,VF=new je,RM=new _i,Cg=new je,vx=new Eo,IM=new _i,yx=new Vs;class BM extends Os{constructor(r,l){super(r,l),this.isSkinnedMesh=!0,this.type="SkinnedMesh",this.bindMode=De,this.bindMatrix=new _i,this.bindMatrixInverse=new _i,this.boundingBox=null,this.boundingSphere=null}computeBoundingBox(){const r=this.geometry;this.boundingBox===null&&(this.boundingBox=new er),this.boundingBox.makeEmpty();const l=r.getAttribute("position");for(let m=0;mO)continue;X.applyMatrix4(this.matrixWorld);const st=r.ray.origin.distanceTo(X);str.far||l.push({distance:st,point:Q.clone().applyMatrix4(this.matrixWorld),index:fe,face:null,faceIndex:null,object:this})}}else{const q=Math.max(0,R.start),Se=Math.min(re.count,R.start+R.count);for(let fe=q,Me=Se-1;feO)continue;X.applyMatrix4(this.matrixWorld);const He=r.ray.origin.distanceTo(X);Her.far||l.push({distance:He,point:Q.clone().applyMatrix4(this.matrixWorld),index:fe,face:null,faceIndex:null,object:this})}}}updateMorphTargets(){const l=this.geometry.morphAttributes,m=Object.keys(l);if(m.length>0){const y=l[m[0]];if(y!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,R=y.length;_0){const y=l[m[0]];if(y!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let _=0,R=y.length;_y.far)return;_.push({distance:N,distanceToRay:Math.sqrt(I),point:O,index:r,face:null,object:R})}}class WF extends Ir{constructor(r,l,m,y,_,R,I,O,N){super(r,l,m,y,_,R,I,O,N),this.isVideoTexture=!0,this.minFilter=R!==void 0?R:Bn,this.magFilter=_!==void 0?_:Bn,this.generateMipmaps=!1;const V=this;function Q(){V.needsUpdate=!0,r.requestVideoFrameCallback(Q)}"requestVideoFrameCallback"in r&&r.requestVideoFrameCallback(Q)}clone(){return new this.constructor(this.image).copy(this)}update(){const r=this.image;"requestVideoFrameCallback"in r===!1&&r.readyState>=r.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}}class QF extends Ir{constructor(r,l){super({width:r,height:l}),this.isFramebufferTexture=!0,this.magFilter=at,this.minFilter=at,this.generateMipmaps=!1,this.needsUpdate=!0}}class Lg extends Ir{constructor(r,l,m,y,_,R,I,O,N,V,Q,X){super(null,R,I,O,N,V,y,_,Q,X),this.isCompressedTexture=!0,this.image={width:l,height:m},this.mipmaps=r,this.flipY=!1,this.generateMipmaps=!1}}class XF extends Lg{constructor(r,l,m,y,_,R){super(r,l,m,_,R),this.isCompressedArrayTexture=!0,this.image.depth=y,this.wrapR=We}}class KF extends Lg{constructor(r,l,m){super(void 0,r[0].width,r[0].height,l,m,Qe),this.isCompressedCubeTexture=!0,this.isCubeTexture=!0,this.image=r}}class qF extends Ir{constructor(r,l,m,y,_,R,I,O,N){super(r,l,m,y,_,R,I,O,N),this.isCanvasTexture=!0,this.needsUpdate=!0}}class pa{constructor(){this.type="Curve",this.arcLengthDivisions=200}getPoint(){return console.warn("THREE.Curve: .getPoint() not implemented."),null}getPointAt(r,l){const m=this.getUtoTmapping(r);return this.getPoint(m,l)}getPoints(r=5){const l=[];for(let m=0;m<=r;m++)l.push(this.getPoint(m/r));return l}getSpacedPoints(r=5){const l=[];for(let m=0;m<=r;m++)l.push(this.getPointAt(m/r));return l}getLength(){const r=this.getLengths();return r[r.length-1]}getLengths(r=this.arcLengthDivisions){if(this.cacheArcLengths&&this.cacheArcLengths.length===r+1&&!this.needsUpdate)return this.cacheArcLengths;this.needsUpdate=!1;const l=[];let m,y=this.getPoint(0),_=0;l.push(0);for(let R=1;R<=r;R++)m=this.getPoint(R/r),_+=m.distanceTo(y),l.push(_),y=m;return this.cacheArcLengths=l,l}updateArcLengths(){this.needsUpdate=!0,this.getLengths()}getUtoTmapping(r,l){const m=this.getLengths();let y=0;const _=m.length;let R;l?R=l:R=r*m[_-1];let I=0,O=_-1,N;for(;I<=O;)if(y=Math.floor(I+(O-I)/2),N=m[y]-R,N<0)I=y+1;else if(N>0)O=y-1;else{O=y;break}if(y=O,m[y]===R)return y/(_-1);const V=m[y],X=m[y+1]-V,$=(R-V)/X;return(y+$)/(_-1)}getTangent(r,l){let y=r-1e-4,_=r+1e-4;y<0&&(y=0),_>1&&(_=1);const R=this.getPoint(y),I=this.getPoint(_),O=l||(R.isVector2?new en:new je);return O.copy(I).sub(R).normalize(),O}getTangentAt(r,l){const m=this.getUtoTmapping(r);return this.getTangent(m,l)}computeFrenetFrames(r,l){const m=new je,y=[],_=[],R=[],I=new je,O=new _i;for(let $=0;$<=r;$++){const ie=$/r;y[$]=this.getTangentAt(ie,new je)}_[0]=new je,R[0]=new je;let N=Number.MAX_VALUE;const V=Math.abs(y[0].x),Q=Math.abs(y[0].y),X=Math.abs(y[0].z);V<=N&&(N=V,m.set(1,0,0)),Q<=N&&(N=Q,m.set(0,1,0)),X<=N&&m.set(0,0,1),I.crossVectors(y[0],m).normalize(),_[0].crossVectors(y[0],I),R[0].crossVectors(y[0],_[0]);for(let $=1;$<=r;$++){if(_[$]=_[$-1].clone(),R[$]=R[$-1].clone(),I.crossVectors(y[$-1],y[$]),I.length()>Number.EPSILON){I.normalize();const ie=Math.acos(Nr(y[$-1].dot(y[$]),-1,1));_[$].applyMatrix4(O.makeRotationAxis(I,ie))}R[$].crossVectors(y[$],_[$])}if(l===!0){let $=Math.acos(Nr(_[0].dot(_[r]),-1,1));$/=r,y[0].dot(I.crossVectors(_[0],_[r]))>0&&($=-$);for(let ie=1;ie<=r;ie++)_[ie].applyMatrix4(O.makeRotationAxis(y[ie],$*ie)),R[ie].crossVectors(y[ie],_[ie])}return{tangents:y,normals:_,binormals:R}}clone(){return new this.constructor().copy(this)}copy(r){return this.arcLengthDivisions=r.arcLengthDivisions,this}toJSON(){const r={metadata:{version:4.6,type:"Curve",generator:"Curve.toJSON"}};return r.arcLengthDivisions=this.arcLengthDivisions,r.type=this.type,r}fromJSON(r){return this.arcLengthDivisions=r.arcLengthDivisions,this}}class Pg extends pa{constructor(r=0,l=0,m=1,y=1,_=0,R=Math.PI*2,I=!1,O=0){super(),this.isEllipseCurve=!0,this.type="EllipseCurve",this.aX=r,this.aY=l,this.xRadius=m,this.yRadius=y,this.aStartAngle=_,this.aEndAngle=R,this.aClockwise=I,this.aRotation=O}getPoint(r,l){const m=l||new en,y=Math.PI*2;let _=this.aEndAngle-this.aStartAngle;const R=Math.abs(_)y;)_-=y;_0?0:(Math.floor(Math.abs(I)/_)+1)*_:O===0&&I===_-1&&(I=_-2,O=1);let N,V;this.closed||I>0?N=y[(I-1)%_]:(Dg.subVectors(y[0],y[1]).add(y[0]),N=Dg);const Q=y[I%_],X=y[(I+1)%_];if(this.closed||I+2<_?V=y[(I+2)%_]:(Dg.subVectors(y[_-1],y[_-2]).add(y[_-1]),V=Dg),this.curveType==="centripetal"||this.curveType==="chordal"){const $=this.curveType==="chordal"?.5:.25;let ie=Math.pow(N.distanceToSquared(Q),$),ue=Math.pow(Q.distanceToSquared(X),$),re=Math.pow(X.distanceToSquared(V),$);ue<1e-4&&(ue=1),ie<1e-4&&(ie=ue),re<1e-4&&(re=ue),Mx.initNonuniformCatmullRom(N.x,Q.x,X.x,V.x,ie,ue,re),Cx.initNonuniformCatmullRom(N.y,Q.y,X.y,V.y,ie,ue,re),Sx.initNonuniformCatmullRom(N.z,Q.z,X.z,V.z,ie,ue,re)}else this.curveType==="catmullrom"&&(Mx.initCatmullRom(N.x,Q.x,X.x,V.x,this.tension),Cx.initCatmullRom(N.y,Q.y,X.y,V.y,this.tension),Sx.initCatmullRom(N.z,Q.z,X.z,V.z,this.tension));return m.set(Mx.calc(O),Cx.calc(O),Sx.calc(O)),m}copy(r){super.copy(r),this.points=[];for(let l=0,m=r.points.length;ly.length-2?y.length-1:R+1],Q=y[R>y.length-3?y.length-1:R+2];return m.set(XM(I,O.x,N.x,V.x,Q.x),XM(I,O.y,N.y,V.y,Q.y)),m}copy(r){super.copy(r),this.points=[];for(let l=0,m=r.points.length;l=m){const R=y[_]-m,I=this.curves[_],O=I.getLength(),N=O===0?0:1-R/O;return I.getPointAt(N,l)}_++}return null}getLength(){const r=this.getCurveLengths();return r[r.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 r=[];let l=0;for(let m=0,y=this.curves.length;m1&&!l[l.length-1].equals(l[0])&&l.push(l[0]),l}copy(r){super.copy(r),this.curves=[];for(let l=0,m=r.curves.length;l0){const Q=N.getPoint(0);Q.equals(this.currentPoint)||this.lineTo(Q.x,Q.y)}this.curves.push(N);const V=N.getPoint(1);return this.currentPoint.copy(V),this}copy(r){return super.copy(r),this.currentPoint.copy(r.currentPoint),this}toJSON(){const r=super.toJSON();return r.currentPoint=this.currentPoint.toArray(),r}fromJSON(r){return super.fromJSON(r),this.currentPoint.fromArray(r.currentPoint),this}}class qf extends Yi{constructor(r=[new en(0,-.5),new en(.5,0),new en(0,.5)],l=12,m=0,y=Math.PI*2){super(),this.type="LatheGeometry",this.parameters={points:r,segments:l,phiStart:m,phiLength:y},l=Math.floor(l),y=Nr(y,0,Math.PI*2);const _=[],R=[],I=[],O=[],N=[],V=1/l,Q=new je,X=new en,$=new je,ie=new je,ue=new je;let re=0,q=0;for(let Se=0;Se<=r.length-1;Se++)switch(Se){case 0:re=r[Se+1].x-r[Se].x,q=r[Se+1].y-r[Se].y,$.x=q*1,$.y=-re,$.z=q*0,ue.copy($),$.normalize(),O.push($.x,$.y,$.z);break;case r.length-1:O.push(ue.x,ue.y,ue.z);break;default:re=r[Se+1].x-r[Se].x,q=r[Se+1].y-r[Se].y,$.x=q*1,$.y=-re,$.z=q*0,ie.copy($),$.x+=ue.x,$.y+=ue.y,$.z+=ue.z,$.normalize(),O.push($.x,$.y,$.z),ue.copy(ie)}for(let Se=0;Se<=l;Se++){const fe=m+Se*V*y,Me=Math.sin(fe),ze=Math.cos(fe);for(let He=0;He<=r.length-1;He++){Q.x=r[He].x*Me,Q.y=r[He].y,Q.z=r[He].x*ze,R.push(Q.x,Q.y,Q.z),X.x=Se/l,X.y=He/(r.length-1),I.push(X.x,X.y);const et=O[3*He+0]*Me,st=O[3*He+1],Be=O[3*He+0]*ze;N.push(et,st,Be)}}for(let Se=0;Se0&&fe(!0),l>0&&fe(!1)),this.setIndex(V),this.setAttribute("position",new ni(Q,3)),this.setAttribute("normal",new ni(X,3)),this.setAttribute("uv",new ni($,2));function Se(){const Me=new je,ze=new je;let He=0;const et=(l-r)/m;for(let st=0;st<=_;st++){const Be=[],Xe=st/_,rt=Xe*(l-r)+r;for(let bt=0;bt<=y;bt++){const Gt=bt/y,lt=Gt*O+I,wt=Math.sin(lt),Kt=Math.cos(lt);ze.x=rt*wt,ze.y=-Xe*m+re,ze.z=rt*Kt,Q.push(ze.x,ze.y,ze.z),Me.set(wt,et,Kt).normalize(),X.push(Me.x,Me.y,Me.z),$.push(Gt,1-Xe),Be.push(ie++)}ue.push(Be)}for(let st=0;st.9&&et<.1&&(fe<.2&&(R[Se+0]+=1),Me<.2&&(R[Se+2]+=1),ze<.2&&(R[Se+4]+=1))}}function X(Se){_.push(Se.x,Se.y,Se.z)}function $(Se,fe){const Me=Se*3;fe.x=r[Me+0],fe.y=r[Me+1],fe.z=r[Me+2]}function ie(){const Se=new je,fe=new je,Me=new je,ze=new je,He=new en,et=new en,st=new en;for(let Be=0,Xe=0;Be<_.length;Be+=9,Xe+=6){Se.set(_[Be+0],_[Be+1],_[Be+2]),fe.set(_[Be+3],_[Be+4],_[Be+5]),Me.set(_[Be+6],_[Be+7],_[Be+8]),He.set(R[Xe+0],R[Xe+1]),et.set(R[Xe+2],R[Xe+3]),st.set(R[Xe+4],R[Xe+5]),ze.copy(Se).add(fe).add(Me).divideScalar(3);const rt=re(ze);ue(He,Xe+0,Se,rt),ue(et,Xe+2,fe,rt),ue(st,Xe+4,Me,rt)}}function ue(Se,fe,Me,ze){ze<0&&Se.x===1&&(R[fe]=Se.x-1),Me.x===0&&Me.z===0&&(R[fe]=ze/2/Math.PI+.5)}function re(Se){return Math.atan2(Se.z,-Se.x)}function q(Se){return Math.atan2(-Se.y,Math.sqrt(Se.x*Se.x+Se.z*Se.z))}}copy(r){return super.copy(r),this.parameters=Object.assign({},r.parameters),this}static fromJSON(r){return new pc(r.vertices,r.indices,r.radius,r.details)}}class kg extends pc{constructor(r=1,l=0){const m=(1+Math.sqrt(5))/2,y=1/m,_=[-1,-1,-1,-1,-1,1,-1,1,-1,-1,1,1,1,-1,-1,1,-1,1,1,1,-1,1,1,1,0,-y,-m,0,-y,m,0,y,-m,0,y,m,-y,-m,0,-y,m,0,y,-m,0,y,m,0,-m,0,-y,m,0,-y,-m,0,y,m,0,y],R=[3,11,7,3,7,15,3,15,13,7,19,17,7,17,6,7,6,15,17,4,8,17,8,10,17,10,6,8,0,16,8,16,2,8,2,10,0,12,1,0,1,18,0,18,16,6,10,2,6,2,13,6,13,15,2,16,18,2,18,3,2,3,13,18,1,9,18,9,11,18,11,3,4,14,12,4,12,0,4,0,8,11,9,5,11,5,19,11,19,7,19,5,14,19,14,4,19,4,17,1,12,14,1,14,5,1,5,9];super(_,R,r,l),this.type="DodecahedronGeometry",this.parameters={radius:r,detail:l}}static fromJSON(r){return new kg(r.radius,r.detail)}}const zg=new je,Gg=new je,Px=new je,Vg=new bo;class $M extends Yi{constructor(r=null,l=1){if(super(),this.type="EdgesGeometry",this.parameters={geometry:r,thresholdAngle:l},r!==null){const y=Math.pow(10,4),_=Math.cos(al*l),R=r.getIndex(),I=r.getAttribute("position"),O=R?R.count:I.count,N=[0,0,0],V=["a","b","c"],Q=new Array(3),X={},$=[];for(let ie=0;ie80*l){I=N=w[0],O=V=w[1];for(let ie=l;ieN&&(N=Q),X>V&&(V=X);$=Math.max(N-I,V-O),$=$!==0?32767/$:0}return Yf(_,R,l,I,O,$,0),R}};function JM(w,r,l,m,y){let _,R;if(y===yN(w,r,l,m)>0)for(_=r;_=r;_-=m)R=t2(_,w[_],w[_+1],R);return R&&Hg(R,R.next)&&(Jf(R),R=R.next),R}function xh(w,r){if(!w)return w;r||(r=w);let l=w,m;do if(m=!1,!l.steiner&&(Hg(l,l.next)||Hr(l.prev,l,l.next)===0)){if(Jf(l),l=r=l.prev,l===l.next)break;m=!0}else l=l.next;while(m||l!==r);return r}function Yf(w,r,l,m,y,_,R){if(!w)return;!R&&_&&fN(w,m,y,_);let I=w,O,N;for(;w.prev!==w.next;){if(O=w.prev,N=w.next,_?sN(w,m,y,_):rN(w)){r.push(O.i/l|0),r.push(w.i/l|0),r.push(N.i/l|0),Jf(w),w=N.next,I=N.next;continue}if(w=N,w===I){R?R===1?(w=oN(xh(w),r,l),Yf(w,r,l,m,y,_,2)):R===2&&aN(w,r,l,m,y,_):Yf(xh(w),r,l,m,y,_,1);break}}}function rN(w){const r=w.prev,l=w,m=w.next;if(Hr(r,l,m)>=0)return!1;const y=r.x,_=l.x,R=m.x,I=r.y,O=l.y,N=m.y,V=y<_?y_?y>R?y:R:_>R?_:R,$=I>O?I>N?I:N:O>N?O:N;let ie=m.next;for(;ie!==r;){if(ie.x>=V&&ie.x<=X&&ie.y>=Q&&ie.y<=$&&ju(y,I,_,O,R,N,ie.x,ie.y)&&Hr(ie.prev,ie,ie.next)>=0)return!1;ie=ie.next}return!0}function sN(w,r,l,m){const y=w.prev,_=w,R=w.next;if(Hr(y,_,R)>=0)return!1;const I=y.x,O=_.x,N=R.x,V=y.y,Q=_.y,X=R.y,$=IO?I>N?I:N:O>N?O:N,re=V>Q?V>X?V:X:Q>X?Q:X,q=Dx($,ie,r,l,m),Se=Dx(ue,re,r,l,m);let fe=w.prevZ,Me=w.nextZ;for(;fe&&fe.z>=q&&Me&&Me.z<=Se;){if(fe.x>=$&&fe.x<=ue&&fe.y>=ie&&fe.y<=re&&fe!==y&&fe!==R&&ju(I,V,O,Q,N,X,fe.x,fe.y)&&Hr(fe.prev,fe,fe.next)>=0||(fe=fe.prevZ,Me.x>=$&&Me.x<=ue&&Me.y>=ie&&Me.y<=re&&Me!==y&&Me!==R&&ju(I,V,O,Q,N,X,Me.x,Me.y)&&Hr(Me.prev,Me,Me.next)>=0))return!1;Me=Me.nextZ}for(;fe&&fe.z>=q;){if(fe.x>=$&&fe.x<=ue&&fe.y>=ie&&fe.y<=re&&fe!==y&&fe!==R&&ju(I,V,O,Q,N,X,fe.x,fe.y)&&Hr(fe.prev,fe,fe.next)>=0)return!1;fe=fe.prevZ}for(;Me&&Me.z<=Se;){if(Me.x>=$&&Me.x<=ue&&Me.y>=ie&&Me.y<=re&&Me!==y&&Me!==R&&ju(I,V,O,Q,N,X,Me.x,Me.y)&&Hr(Me.prev,Me,Me.next)>=0)return!1;Me=Me.nextZ}return!0}function oN(w,r,l){let m=w;do{const y=m.prev,_=m.next.next;!Hg(y,_)&&ZM(y,m,m.next,_)&&$f(y,_)&&$f(_,y)&&(r.push(y.i/l|0),r.push(m.i/l|0),r.push(_.i/l|0),Jf(m),Jf(m.next),m=w=_),m=m.next}while(m!==w);return xh(m)}function aN(w,r,l,m,y,_){let R=w;do{let I=R.next.next;for(;I!==R.prev;){if(R.i!==I.i&&gN(R,I)){let O=e2(R,I);R=xh(R,R.next),O=xh(O,O.next),Yf(R,r,l,m,y,_,0),Yf(O,r,l,m,y,_,0);return}I=I.next}R=R.next}while(R!==w)}function lN(w,r,l,m){const y=[];let _,R,I,O,N;for(_=0,R=r.length;_=l.next.y&&l.next.y!==l.y){const X=l.x+(R-l.y)*(l.next.x-l.x)/(l.next.y-l.y);if(X<=_&&X>m&&(m=X,y=l.x=l.x&&l.x>=O&&_!==l.x&&ju(Ry.x||l.x===y.x&&dN(y,l)))&&(y=l,V=Q)),l=l.next;while(l!==I);return y}function dN(w,r){return Hr(w.prev,w,r.prev)<0&&Hr(r.next,w,w.next)<0}function fN(w,r,l,m){let y=w;do y.z===0&&(y.z=Dx(y.x,y.y,r,l,m)),y.prevZ=y.prev,y.nextZ=y.next,y=y.next;while(y!==w);y.prevZ.nextZ=null,y.prevZ=null,pN(y)}function pN(w){let r,l,m,y,_,R,I,O,N=1;do{for(l=w,w=null,_=null,R=0;l;){for(R++,m=l,I=0,r=0;r0||O>0&&m;)I!==0&&(O===0||!m||l.z<=m.z)?(y=l,l=l.nextZ,I--):(y=m,m=m.nextZ,O--),_?_.nextZ=y:w=y,y.prevZ=_,_=y;l=m}_.nextZ=null,N*=2}while(R>1);return w}function Dx(w,r,l,m,y){return w=(w-l)*y|0,r=(r-m)*y|0,w=(w|w<<8)&16711935,w=(w|w<<4)&252645135,w=(w|w<<2)&858993459,w=(w|w<<1)&1431655765,r=(r|r<<8)&16711935,r=(r|r<<4)&252645135,r=(r|r<<2)&858993459,r=(r|r<<1)&1431655765,w|r<<1}function mN(w){let r=w,l=w;do(r.x=(w-R)*(_-I)&&(w-R)*(m-I)>=(l-R)*(r-I)&&(l-R)*(_-I)>=(y-R)*(m-I)}function gN(w,r){return w.next.i!==r.i&&w.prev.i!==r.i&&!AN(w,r)&&($f(w,r)&&$f(r,w)&&vN(w,r)&&(Hr(w.prev,w,r.prev)||Hr(w,r.prev,r))||Hg(w,r)&&Hr(w.prev,w,w.next)>0&&Hr(r.prev,r,r.next)>0)}function Hr(w,r,l){return(r.y-w.y)*(l.x-r.x)-(r.x-w.x)*(l.y-r.y)}function Hg(w,r){return w.x===r.x&&w.y===r.y}function ZM(w,r,l,m){const y=Wg(Hr(w,r,l)),_=Wg(Hr(w,r,m)),R=Wg(Hr(l,m,w)),I=Wg(Hr(l,m,r));return!!(y!==_&&R!==I||y===0&&jg(w,l,r)||_===0&&jg(w,m,r)||R===0&&jg(l,w,m)||I===0&&jg(l,r,m))}function jg(w,r,l){return r.x<=Math.max(w.x,l.x)&&r.x>=Math.min(w.x,l.x)&&r.y<=Math.max(w.y,l.y)&&r.y>=Math.min(w.y,l.y)}function Wg(w){return w>0?1:w<0?-1:0}function AN(w,r){let l=w;do{if(l.i!==w.i&&l.next.i!==w.i&&l.i!==r.i&&l.next.i!==r.i&&ZM(l,l.next,w,r))return!0;l=l.next}while(l!==w);return!1}function $f(w,r){return Hr(w.prev,w,w.next)<0?Hr(w,r,w.next)>=0&&Hr(w,w.prev,r)>=0:Hr(w,r,w.prev)<0||Hr(w,w.next,r)<0}function vN(w,r){let l=w,m=!1;const y=(w.x+r.x)/2,_=(w.y+r.y)/2;do l.y>_!=l.next.y>_&&l.next.y!==l.y&&y<(l.next.x-l.x)*(_-l.y)/(l.next.y-l.y)+l.x&&(m=!m),l=l.next;while(l!==w);return m}function e2(w,r){const l=new Ox(w.i,w.x,w.y),m=new Ox(r.i,r.x,r.y),y=w.next,_=r.prev;return w.next=r,r.prev=w,l.next=y,y.prev=l,m.next=l,l.prev=m,_.next=m,m.prev=_,m}function t2(w,r,l,m){const y=new Ox(w,r,l);return m?(y.next=m.next,y.prev=m,m.next.prev=y,m.next=y):(y.prev=y,y.next=y),y}function Jf(w){w.next.prev=w.prev,w.prev.next=w.next,w.prevZ&&(w.prevZ.nextZ=w.nextZ),w.nextZ&&(w.nextZ.prevZ=w.prevZ)}function Ox(w,r,l){this.i=w,this.x=r,this.y=l,this.prev=null,this.next=null,this.z=0,this.prevZ=null,this.nextZ=null,this.steiner=!1}function yN(w,r,l,m){let y=0;for(let _=r,R=l-m;_2&&w[r-1].equals(w[0])&&w.pop()}function i2(w,r){for(let l=0;lNumber.EPSILON){const br=Math.sqrt(Lr),gr=Math.sqrt(gi*gi+ir*ir),$r=ct.x-ti/br,Mo=ct.y+mi/br,qe=hn.x-ir/gr,Ie=hn.y+gi/gr,St=((qe-$r)*ir-(Ie-Mo)*gi)/(mi*ir-ti*gi);In=$r+mi*St-nn.x,rn=Mo+ti*St-nn.y;const an=In*In+rn*rn;if(an<=2)return new en(In,rn);Gn=Math.sqrt(an/2)}else{let br=!1;mi>Number.EPSILON?gi>Number.EPSILON&&(br=!0):mi<-Number.EPSILON?gi<-Number.EPSILON&&(br=!0):Math.sign(ti)===Math.sign(ir)&&(br=!0),br?(In=-ti,rn=mi,Gn=Math.sqrt(Lr)):(In=mi,rn=ti,Gn=Math.sqrt(Lr/2))}return new en(In/Gn,rn/Gn)}const Jt=[];for(let nn=0,ct=lt.length,hn=ct-1,In=nn+1;nn=0;nn--){const ct=nn/re,hn=$*Math.cos(ct*Math.PI/2),In=ie*Math.sin(ct*Math.PI/2)+ue;for(let rn=0,Gn=lt.length;rn=0;){const In=hn;let rn=hn-1;rn<0&&(rn=nn.length-1);for(let Gn=0,mi=V+re*2;Gn0)&&$.push(fe,Me,He),(q!==m-1||O0!=r>0&&this.version++,this._anisotropy=r}get clearcoat(){return this._clearcoat}set clearcoat(r){this._clearcoat>0!=r>0&&this.version++,this._clearcoat=r}get iridescence(){return this._iridescence}set iridescence(r){this._iridescence>0!=r>0&&this.version++,this._iridescence=r}get sheen(){return this._sheen}set sheen(r){this._sheen>0!=r>0&&this.version++,this._sheen=r}get transmission(){return this._transmission}set transmission(r){this._transmission>0!=r>0&&this.version++,this._transmission=r}copy(r){return super.copy(r),this.defines={STANDARD:"",PHYSICAL:""},this.anisotropy=r.anisotropy,this.anisotropyRotation=r.anisotropyRotation,this.anisotropyMap=r.anisotropyMap,this.clearcoat=r.clearcoat,this.clearcoatMap=r.clearcoatMap,this.clearcoatRoughness=r.clearcoatRoughness,this.clearcoatRoughnessMap=r.clearcoatRoughnessMap,this.clearcoatNormalMap=r.clearcoatNormalMap,this.clearcoatNormalScale.copy(r.clearcoatNormalScale),this.ior=r.ior,this.iridescence=r.iridescence,this.iridescenceMap=r.iridescenceMap,this.iridescenceIOR=r.iridescenceIOR,this.iridescenceThicknessRange=[...r.iridescenceThicknessRange],this.iridescenceThicknessMap=r.iridescenceThicknessMap,this.sheen=r.sheen,this.sheenColor.copy(r.sheenColor),this.sheenColorMap=r.sheenColorMap,this.sheenRoughness=r.sheenRoughness,this.sheenRoughnessMap=r.sheenRoughnessMap,this.transmission=r.transmission,this.transmissionMap=r.transmissionMap,this.thickness=r.thickness,this.thicknessMap=r.thicknessMap,this.attenuationDistance=r.attenuationDistance,this.attenuationColor.copy(r.attenuationColor),this.specularIntensity=r.specularIntensity,this.specularIntensityMap=r.specularIntensityMap,this.specularColor.copy(r.specularColor),this.specularColorMap=r.specularColorMap,this}}class h2 extends js{constructor(r){super(),this.isMeshPhongMaterial=!0,this.type="MeshPhongMaterial",this.color=new Hn(16777215),this.specular=new Hn(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Nt,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(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.specular.copy(r.specular),this.shininess=r.shininess,this.map=r.map,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.emissive.copy(r.emissive),this.emissiveMap=r.emissiveMap,this.emissiveIntensity=r.emissiveIntensity,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.specularMap=r.specularMap,this.alphaMap=r.alphaMap,this.envMap=r.envMap,this.combine=r.combine,this.reflectivity=r.reflectivity,this.refractionRatio=r.refractionRatio,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.flatShading=r.flatShading,this.fog=r.fog,this}}class u2 extends js{constructor(r){super(),this.isMeshToonMaterial=!0,this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Hn(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new en(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(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.gradientMap=r.gradientMap,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.emissive.copy(r.emissive),this.emissiveMap=r.emissiveMap,this.emissiveIntensity=r.emissiveIntensity,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.alphaMap=r.alphaMap,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.fog=r.fog,this}}class d2 extends js{constructor(r){super(),this.isMeshNormalMaterial=!0,this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.flatShading=!1,this.setValues(r)}copy(r){return super.copy(r),this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.flatShading=r.flatShading,this}}class f2 extends js{constructor(r){super(),this.isMeshLambertMaterial=!0,this.type="MeshLambertMaterial",this.color=new Hn(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Hn(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=Nt,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(r)}copy(r){return super.copy(r),this.color.copy(r.color),this.map=r.map,this.lightMap=r.lightMap,this.lightMapIntensity=r.lightMapIntensity,this.aoMap=r.aoMap,this.aoMapIntensity=r.aoMapIntensity,this.emissive.copy(r.emissive),this.emissiveMap=r.emissiveMap,this.emissiveIntensity=r.emissiveIntensity,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.specularMap=r.specularMap,this.alphaMap=r.alphaMap,this.envMap=r.envMap,this.combine=r.combine,this.reflectivity=r.reflectivity,this.refractionRatio=r.refractionRatio,this.wireframe=r.wireframe,this.wireframeLinewidth=r.wireframeLinewidth,this.wireframeLinecap=r.wireframeLinecap,this.wireframeLinejoin=r.wireframeLinejoin,this.flatShading=r.flatShading,this.fog=r.fog,this}}class p2 extends js{constructor(r){super(),this.isMeshMatcapMaterial=!0,this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Hn(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=ks,this.normalScale=new en(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.fog=!0,this.setValues(r)}copy(r){return super.copy(r),this.defines={MATCAP:""},this.color.copy(r.color),this.matcap=r.matcap,this.map=r.map,this.bumpMap=r.bumpMap,this.bumpScale=r.bumpScale,this.normalMap=r.normalMap,this.normalMapType=r.normalMapType,this.normalScale.copy(r.normalScale),this.displacementMap=r.displacementMap,this.displacementScale=r.displacementScale,this.displacementBias=r.displacementBias,this.alphaMap=r.alphaMap,this.flatShading=r.flatShading,this.fog=r.fog,this}}class m2 extends oo{constructor(r){super(),this.isLineDashedMaterial=!0,this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(r)}copy(r){return super.copy(r),this.scale=r.scale,this.dashSize=r.dashSize,this.gapSize=r.gapSize,this}}function Eh(w,r,l){return!w||!l&&w.constructor===r?w:typeof r.BYTES_PER_ELEMENT=="number"?new r(w):Array.prototype.slice.call(w)}function g2(w){return ArrayBuffer.isView(w)&&!(w instanceof DataView)}function A2(w){function r(y,_){return w[y]-w[_]}const l=w.length,m=new Array(l);for(let y=0;y!==l;++y)m[y]=y;return m.sort(r),m}function Nx(w,r,l){const m=w.length,y=new w.constructor(m);for(let _=0,R=0;R!==m;++_){const I=l[_]*r;for(let O=0;O!==r;++O)y[R++]=w[I+O]}return y}function Ux(w,r,l,m){let y=1,_=w[0];for(;_!==void 0&&_[m]===void 0;)_=w[y++];if(_===void 0)return;let R=_[m];if(R!==void 0)if(Array.isArray(R))do R=_[m],R!==void 0&&(r.push(_.time),l.push.apply(l,R)),_=w[y++];while(_!==void 0);else if(R.toArray!==void 0)do R=_[m],R!==void 0&&(r.push(_.time),R.toArray(l,l.length)),_=w[y++];while(_!==void 0);else do R=_[m],R!==void 0&&(r.push(_.time),l.push(R)),_=w[y++];while(_!==void 0)}function _N(w,r,l,m,y=30){const _=w.clone();_.name=r;const R=[];for(let O=0;O<_.tracks.length;++O){const N=_.tracks[O],V=N.getValueSize(),Q=[],X=[];for(let $=0;$=m)){Q.push(N.times[$]);for(let ue=0;ue_.tracks[O].times[0]&&(I=_.tracks[O].times[0]);for(let O=0;O<_.tracks.length;++O)_.tracks[O].shift(-1*I);return _.resetDuration(),_}function wN(w,r=0,l=w,m=30){m<=0&&(m=30);const y=l.tracks.length,_=r/m;for(let R=0;R=I.times[ie]){const q=ie*Q+V,Se=q+Q-V;ue=I.values.slice(q,Se)}else{const q=I.createInterpolant(),Se=V,fe=Q-V;q.evaluate(_),ue=q.resultBuffer.slice(Se,fe)}O==="quaternion"&&new Ti().fromArray(ue).normalize().conjugate().toArray(ue);const re=N.times.length;for(let q=0;q=_)){const I=l[1];r=_)break e}R=m,m=0;break t}break n}for(;m>>1;rl;)--R;if(++R,_!==0||R!==y){_>=R&&(R=Math.max(R,1),_=R-1);const I=this.getValueSize();this.times=m.slice(_,R),this.values=this.values.slice(_*I,R*I)}return this}validate(){let r=!0;const l=this.getValueSize();l-Math.floor(l)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),r=!1);const m=this.times,y=this.values,_=m.length;_===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),r=!1);let R=null;for(let I=0;I!==_;I++){const O=m[I];if(typeof O=="number"&&isNaN(O)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,I,O),r=!1;break}if(R!==null&&R>O){console.error("THREE.KeyframeTrack: Out of order keys.",this,I,O,R),r=!1;break}R=O}if(y!==void 0&&g2(y))for(let I=0,O=y.length;I!==O;++I){const N=y[I];if(isNaN(N)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,I,N),r=!1;break}}return r}optimize(){const r=this.times.slice(),l=this.values.slice(),m=this.getValueSize(),y=this.getInterpolation()===Nn,_=r.length-1;let R=1;for(let I=1;I<_;++I){let O=!1;const N=r[I],V=r[I+1];if(N!==V&&(I!==1||N!==r[0]))if(y)O=!0;else{const Q=I*m,X=Q-m,$=Q+m;for(let ie=0;ie!==m;++ie){const ue=l[Q+ie];if(ue!==l[X+ie]||ue!==l[$+ie]){O=!0;break}}}if(O){if(I!==R){r[R]=r[I];const Q=I*m,X=R*m;for(let $=0;$!==m;++$)l[X+$]=l[Q+$]}++R}}if(_>0){r[R]=r[_];for(let I=_*m,O=R*m,N=0;N!==m;++N)l[O+N]=l[I+N];++R}return R!==r.length?(this.times=r.slice(0,R),this.values=l.slice(0,R*m)):(this.times=r,this.values=l),this}clone(){const r=this.times.slice(),l=this.values.slice(),m=this.constructor,y=new m(this.name,r,l);return y.createInterpolant=this.createInterpolant,y}}ma.prototype.TimeBufferType=Float32Array,ma.prototype.ValueBufferType=Float32Array,ma.prototype.DefaultInterpolation=Wn;class bh extends ma{}bh.prototype.ValueTypeName="bool",bh.prototype.ValueBufferType=Array,bh.prototype.DefaultInterpolation=Vn,bh.prototype.InterpolantFactoryMethodLinear=void 0,bh.prototype.InterpolantFactoryMethodSmooth=void 0;class zx extends ma{}zx.prototype.ValueTypeName="color";class np extends ma{}np.prototype.ValueTypeName="number";class x2 extends tp{constructor(r,l,m,y){super(r,l,m,y)}interpolate_(r,l,m,y){const _=this.resultBuffer,R=this.sampleValues,I=this.valueSize,O=(m-l)/(y-l);let N=r*I;for(let V=N+I;N!==V;N+=4)Ti.slerpFlat(_,0,R,N-I,R,N,O);return _}}class Wu extends ma{InterpolantFactoryMethodLinear(r){return new x2(this.times,this.values,this.getValueSize(),r)}}Wu.prototype.ValueTypeName="quaternion",Wu.prototype.DefaultInterpolation=Wn,Wu.prototype.InterpolantFactoryMethodSmooth=void 0;class _h extends ma{}_h.prototype.ValueTypeName="string",_h.prototype.ValueBufferType=Array,_h.prototype.DefaultInterpolation=Vn,_h.prototype.InterpolantFactoryMethodLinear=void 0,_h.prototype.InterpolantFactoryMethodSmooth=void 0;class ip extends ma{}ip.prototype.ValueTypeName="vector";class rp{constructor(r,l=-1,m,y=Bi){this.name=r,this.tracks=m,this.duration=l,this.blendMode=y,this.uuid=no(),this.duration<0&&this.resetDuration()}static parse(r){const l=[],m=r.tracks,y=1/(r.fps||1);for(let R=0,I=m.length;R!==I;++R)l.push(SN(m[R]).scale(y));const _=new this(r.name,r.duration,l,r.blendMode);return _.uuid=r.uuid,_}static toJSON(r){const l=[],m=r.tracks,y={name:r.name,duration:r.duration,tracks:l,uuid:r.uuid,blendMode:r.blendMode};for(let _=0,R=m.length;_!==R;++_)l.push(ma.toJSON(m[_]));return y}static CreateFromMorphTargetSequence(r,l,m,y){const _=l.length,R=[];for(let I=0;I<_;I++){let O=[],N=[];O.push((I+_-1)%_,I,(I+1)%_),N.push(0,1,0);const V=A2(O);O=Nx(O,1,V),N=Nx(N,1,V),!y&&O[0]===0&&(O.push(_),N.push(N[0])),R.push(new np(".morphTargetInfluences["+l[I].name+"]",O,N).scale(1/m))}return new this(r,-1,R)}static findByName(r,l){let m=r;if(!Array.isArray(r)){const y=r;m=y.geometry&&y.geometry.animations||y.animations}for(let y=0;y1){const Q=V[1];let X=y[Q];X||(y[Q]=X=[]),X.push(N)}}const R=[];for(const I in y)R.push(this.CreateFromMorphTargetSequence(I,y[I],l,m));return R}static parseAnimation(r,l){if(!r)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;const m=function(Q,X,$,ie,ue){if($.length!==0){const re=[],q=[];Ux($,re,q,ie),re.length!==0&&ue.push(new Q(X,re,q))}},y=[],_=r.name||"default",R=r.fps||30,I=r.blendMode;let O=r.length||-1;const N=r.hierarchy||[];for(let Q=0;Q{l&&l(_),this.manager.itemEnd(r)},0),_;if(ml[r]!==void 0){ml[r].push({onLoad:l,onProgress:m,onError:y});return}ml[r]=[],ml[r].push({onLoad:l,onProgress:m,onError:y});const R=new Request(r,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"}),I=this.mimeType,O=this.responseType;fetch(R).then(N=>{if(N.status===200||N.status===0){if(N.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received."),typeof ReadableStream>"u"||N.body===void 0||N.body.getReader===void 0)return N;const V=ml[r],Q=N.body.getReader(),X=N.headers.get("Content-Length")||N.headers.get("X-File-Size"),$=X?parseInt(X):0,ie=$!==0;let ue=0;const re=new ReadableStream({start(q){Se();function Se(){Q.read().then(({done:fe,value:Me})=>{if(fe)q.close();else{ue+=Me.byteLength;const ze=new ProgressEvent("progress",{lengthComputable:ie,loaded:ue,total:$});for(let He=0,et=V.length;He{switch(O){case"arraybuffer":return N.arrayBuffer();case"blob":return N.blob();case"document":return N.text().then(V=>new DOMParser().parseFromString(V,I));case"json":return N.json();default:if(I===void 0)return N.text();{const Q=/charset="?([^;"\s]*)"?/i.exec(I),X=Q&&Q[1]?Q[1].toLowerCase():void 0,$=new TextDecoder(X);return N.arrayBuffer().then(ie=>$.decode(ie))}}}).then(N=>{wh.add(r,N);const V=ml[r];delete ml[r];for(let Q=0,X=V.length;Q{const V=ml[r];if(V===void 0)throw this.manager.itemError(r),N;delete ml[r];for(let Q=0,X=V.length;Q{this.manager.itemEnd(r)}),this.manager.itemStart(r)}setResponseType(r){return this.responseType=r,this}setMimeType(r){return this.mimeType=r,this}}class RN extends wo{constructor(r){super(r)}load(r,l,m,y){const _=this,R=new gl(this.manager);R.setPath(this.path),R.setRequestHeader(this.requestHeader),R.setWithCredentials(this.withCredentials),R.load(r,function(I){try{l(_.parse(JSON.parse(I)))}catch(O){y?y(O):console.error(O),_.manager.itemError(r)}},m,y)}parse(r){const l=[];for(let m=0;m0:y.vertexColors=r.vertexColors),r.uniforms!==void 0)for(const _ in r.uniforms){const R=r.uniforms[_];switch(y.uniforms[_]={},R.type){case"t":y.uniforms[_].value=m(R.value);break;case"c":y.uniforms[_].value=new Hn().setHex(R.value);break;case"v2":y.uniforms[_].value=new en().fromArray(R.value);break;case"v3":y.uniforms[_].value=new je().fromArray(R.value);break;case"v4":y.uniforms[_].value=new ur().fromArray(R.value);break;case"m3":y.uniforms[_].value=new Ui().fromArray(R.value);break;case"m4":y.uniforms[_].value=new _i().fromArray(R.value);break;default:y.uniforms[_].value=R.value}}if(r.defines!==void 0&&(y.defines=r.defines),r.vertexShader!==void 0&&(y.vertexShader=r.vertexShader),r.fragmentShader!==void 0&&(y.fragmentShader=r.fragmentShader),r.glslVersion!==void 0&&(y.glslVersion=r.glslVersion),r.extensions!==void 0)for(const _ in r.extensions)y.extensions[_]=r.extensions[_];if(r.lights!==void 0&&(y.lights=r.lights),r.clipping!==void 0&&(y.clipping=r.clipping),r.size!==void 0&&(y.size=r.size),r.sizeAttenuation!==void 0&&(y.sizeAttenuation=r.sizeAttenuation),r.map!==void 0&&(y.map=m(r.map)),r.matcap!==void 0&&(y.matcap=m(r.matcap)),r.alphaMap!==void 0&&(y.alphaMap=m(r.alphaMap)),r.bumpMap!==void 0&&(y.bumpMap=m(r.bumpMap)),r.bumpScale!==void 0&&(y.bumpScale=r.bumpScale),r.normalMap!==void 0&&(y.normalMap=m(r.normalMap)),r.normalMapType!==void 0&&(y.normalMapType=r.normalMapType),r.normalScale!==void 0){let _=r.normalScale;Array.isArray(_)===!1&&(_=[_,_]),y.normalScale=new en().fromArray(_)}return r.displacementMap!==void 0&&(y.displacementMap=m(r.displacementMap)),r.displacementScale!==void 0&&(y.displacementScale=r.displacementScale),r.displacementBias!==void 0&&(y.displacementBias=r.displacementBias),r.roughnessMap!==void 0&&(y.roughnessMap=m(r.roughnessMap)),r.metalnessMap!==void 0&&(y.metalnessMap=m(r.metalnessMap)),r.emissiveMap!==void 0&&(y.emissiveMap=m(r.emissiveMap)),r.emissiveIntensity!==void 0&&(y.emissiveIntensity=r.emissiveIntensity),r.specularMap!==void 0&&(y.specularMap=m(r.specularMap)),r.specularIntensityMap!==void 0&&(y.specularIntensityMap=m(r.specularIntensityMap)),r.specularColorMap!==void 0&&(y.specularColorMap=m(r.specularColorMap)),r.envMap!==void 0&&(y.envMap=m(r.envMap)),r.envMapIntensity!==void 0&&(y.envMapIntensity=r.envMapIntensity),r.reflectivity!==void 0&&(y.reflectivity=r.reflectivity),r.refractionRatio!==void 0&&(y.refractionRatio=r.refractionRatio),r.lightMap!==void 0&&(y.lightMap=m(r.lightMap)),r.lightMapIntensity!==void 0&&(y.lightMapIntensity=r.lightMapIntensity),r.aoMap!==void 0&&(y.aoMap=m(r.aoMap)),r.aoMapIntensity!==void 0&&(y.aoMapIntensity=r.aoMapIntensity),r.gradientMap!==void 0&&(y.gradientMap=m(r.gradientMap)),r.clearcoatMap!==void 0&&(y.clearcoatMap=m(r.clearcoatMap)),r.clearcoatRoughnessMap!==void 0&&(y.clearcoatRoughnessMap=m(r.clearcoatRoughnessMap)),r.clearcoatNormalMap!==void 0&&(y.clearcoatNormalMap=m(r.clearcoatNormalMap)),r.clearcoatNormalScale!==void 0&&(y.clearcoatNormalScale=new en().fromArray(r.clearcoatNormalScale)),r.iridescenceMap!==void 0&&(y.iridescenceMap=m(r.iridescenceMap)),r.iridescenceThicknessMap!==void 0&&(y.iridescenceThicknessMap=m(r.iridescenceThicknessMap)),r.transmissionMap!==void 0&&(y.transmissionMap=m(r.transmissionMap)),r.thicknessMap!==void 0&&(y.thicknessMap=m(r.thicknessMap)),r.anisotropyMap!==void 0&&(y.anisotropyMap=m(r.anisotropyMap)),r.sheenColorMap!==void 0&&(y.sheenColorMap=m(r.sheenColorMap)),r.sheenRoughnessMap!==void 0&&(y.sheenRoughnessMap=m(r.sheenRoughnessMap)),y}setTextures(r){return this.textures=r,this}static createMaterialFromType(r){const l={ShadowMaterial:a2,SpriteMaterial:gx,RawShaderMaterial:l2,ShaderMaterial:Ka,PointsMaterial:bx,MeshPhysicalMaterial:c2,MeshStandardMaterial:Fx,MeshPhongMaterial:h2,MeshToonMaterial:u2,MeshNormalMaterial:d2,MeshLambertMaterial:f2,MeshDepthMaterial:dx,MeshDistanceMaterial:fx,MeshBasicMaterial:uc,MeshMatcapMaterial:p2,LineDashedMaterial:m2,LineBasicMaterial:oo,Material:js};return new l[r]}}class Wx{static decodeText(r){if(typeof TextDecoder<"u")return new TextDecoder().decode(r);let l="";for(let m=0,y=r.length;m0){const O=new Gx(l);_=new sp(O),_.setCrossOrigin(this.crossOrigin);for(let N=0,V=r.length;N0){y=new sp(this.manager),y.setCrossOrigin(this.crossOrigin);for(let R=0,I=r.length;R"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(r){return this.options=r,this}load(r,l,m,y){r===void 0&&(r=""),this.path!==void 0&&(r=this.path+r),r=this.manager.resolveURL(r);const _=this,R=wh.get(r);if(R!==void 0)return _.manager.itemStart(r),setTimeout(function(){l&&l(R),_.manager.itemEnd(r)},0),R;const I={};I.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",I.headers=this.requestHeader,fetch(r,I).then(function(O){return O.blob()}).then(function(O){return createImageBitmap(O,Object.assign(_.options,{colorSpaceConversion:"none"}))}).then(function(O){wh.add(r,O),l&&l(O),_.manager.itemEnd(r)}).catch(function(O){y&&y(O),_.manager.itemError(r),_.manager.itemEnd(r)}),_.manager.itemStart(r)}}let tA;class Qx{static getContext(){return tA===void 0&&(tA=new(window.AudioContext||window.webkitAudioContext)),tA}static setContext(r){tA=r}}class zN extends wo{constructor(r){super(r)}load(r,l,m,y){const _=this,R=new gl(this.manager);R.setResponseType("arraybuffer"),R.setPath(this.path),R.setRequestHeader(this.requestHeader),R.setWithCredentials(this.withCredentials),R.load(r,function(O){try{const N=O.slice(0);Qx.getContext().decodeAudioData(N,function(Q){l(Q)},I)}catch(N){I(N)}},m,y);function I(O){y?y(O):console.error(O),_.manager.itemError(r)}}}const N2=new _i,U2=new _i,Mh=new _i;class GN{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new hs,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new hs,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(r){const l=this._cache;if(l.focus!==r.focus||l.fov!==r.fov||l.aspect!==r.aspect*this.aspect||l.near!==r.near||l.far!==r.far||l.zoom!==r.zoom||l.eyeSep!==this.eyeSep){l.focus=r.focus,l.fov=r.fov,l.aspect=r.aspect*this.aspect,l.near=r.near,l.far=r.far,l.zoom=r.zoom,l.eyeSep=this.eyeSep,Mh.copy(r.projectionMatrix);const y=l.eyeSep/2,_=y*l.near/l.focus,R=l.near*Math.tan(al*l.fov*.5)/l.zoom;let I,O;U2.elements[12]=-y,N2.elements[12]=y,I=-R*l.aspect+_,O=R*l.aspect+_,Mh.elements[0]=2*l.near/(O-I),Mh.elements[8]=(O+I)/(O-I),this.cameraL.projectionMatrix.copy(Mh),I=-R*l.aspect-_,O=R*l.aspect-_,Mh.elements[0]=2*l.near/(O-I),Mh.elements[8]=(O+I)/(O-I),this.cameraR.projectionMatrix.copy(Mh)}this.cameraL.matrixWorld.copy(r.matrixWorld).multiply(U2),this.cameraR.matrixWorld.copy(r.matrixWorld).multiply(N2)}}class k2{constructor(r=!0){this.autoStart=r,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=z2(),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 r=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){const l=z2();r=(l-this.oldTime)/1e3,this.oldTime=l,this.elapsedTime+=r}return r}}function z2(){return(typeof performance>"u"?Date:performance).now()}const Ch=new je,G2=new Ti,VN=new je,Sh=new je;class HN extends mr{constructor(){super(),this.type="AudioListener",this.context=Qx.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new k2}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(r){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=r,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(r){return this.gain.gain.setTargetAtTime(r,this.context.currentTime,.01),this}updateMatrixWorld(r){super.updateMatrixWorld(r);const l=this.context.listener,m=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Ch,G2,VN),Sh.set(0,0,-1).applyQuaternion(G2),l.positionX){const y=this.context.currentTime+this.timeDelta;l.positionX.linearRampToValueAtTime(Ch.x,y),l.positionY.linearRampToValueAtTime(Ch.y,y),l.positionZ.linearRampToValueAtTime(Ch.z,y),l.forwardX.linearRampToValueAtTime(Sh.x,y),l.forwardY.linearRampToValueAtTime(Sh.y,y),l.forwardZ.linearRampToValueAtTime(Sh.z,y),l.upX.linearRampToValueAtTime(m.x,y),l.upY.linearRampToValueAtTime(m.y,y),l.upZ.linearRampToValueAtTime(m.z,y)}else l.setPosition(Ch.x,Ch.y,Ch.z),l.setOrientation(Sh.x,Sh.y,Sh.z,m.x,m.y,m.z)}}class V2 extends mr{constructor(r){super(),this.type="Audio",this.listener=r,this.context=r.context,this.gain=this.context.createGain(),this.gain.connect(r.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(r){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=r,this.connect(),this}setMediaElementSource(r){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(r),this.connect(),this}setMediaStreamSource(r){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(r),this.connect(),this}setBuffer(r){return this.buffer=r,this.sourceType="buffer",this.autoplay&&this.play(),this}play(r=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+r;const l=this.context.createBufferSource();return l.buffer=this.buffer,l.loop=this.loop,l.loopStart=this.loopStart,l.loopEnd=this.loopEnd,l.onended=this.onEnded.bind(this),l.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=l,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 r=1,l=this.filters.length;r0){this.source.disconnect(this.filters[0]);for(let r=1,l=this.filters.length;r0&&this._mixBufferRegionAdditive(m,y,this._addIndex*l,1,l);for(let O=l,N=l+l;O!==N;++O)if(m[O]!==m[O+l]){I.setValue(m,y);break}}saveOriginalState(){const r=this.binding,l=this.buffer,m=this.valueSize,y=m*this._origIndex;r.getValue(l,y);for(let _=m,R=y;_!==R;++_)l[_]=l[y+_%m];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){const r=this.valueSize*3;this.binding.setValue(this.buffer,r)}_setAdditiveIdentityNumeric(){const r=this._addIndex*this.valueSize,l=r+this.valueSize;for(let m=r;m=.5)for(let R=0;R!==_;++R)r[l+R]=r[m+R]}_slerp(r,l,m,y){Ti.slerpFlat(r,l,r,l,r,m,y)}_slerpAdditive(r,l,m,y,_){const R=this._workIndex*_;Ti.multiplyQuaternionsFlat(r,R,r,l,r,m),Ti.slerpFlat(r,l,r,l,r,R,y)}_lerp(r,l,m,y,_){const R=1-y;for(let I=0;I!==_;++I){const O=l+I;r[O]=r[O]*R+r[m+I]*y}}_lerpAdditive(r,l,m,y,_){for(let R=0;R!==_;++R){const I=l+R;r[I]=r[I]+r[m+R]*y}}}const Xx="\\[\\]\\.:\\/",XN=new RegExp("["+Xx+"]","g"),Kx="[^"+Xx+"]",KN="[^"+Xx.replace("\\.","")+"]",qN=/((?:WC+[\/:])*)/.source.replace("WC",Kx),YN=/(WCOD+)?/.source.replace("WCOD",KN),$N=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",Kx),JN=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",Kx),ZN=new RegExp("^"+qN+YN+$N+JN+"$"),e5=["material","materials","bones","map"];class t5{constructor(r,l,m){const y=m||dr.parseTrackName(l);this._targetGroup=r,this._bindings=r.subscribe_(l,y)}getValue(r,l){this.bind();const m=this._targetGroup.nCachedObjects_,y=this._bindings[m];y!==void 0&&y.getValue(r,l)}setValue(r,l){const m=this._bindings;for(let y=this._targetGroup.nCachedObjects_,_=m.length;y!==_;++y)m[y].setValue(r,l)}bind(){const r=this._bindings;for(let l=this._targetGroup.nCachedObjects_,m=r.length;l!==m;++l)r[l].bind()}unbind(){const r=this._bindings;for(let l=this._targetGroup.nCachedObjects_,m=r.length;l!==m;++l)r[l].unbind()}}class dr{constructor(r,l,m){this.path=l,this.parsedPath=m||dr.parseTrackName(l),this.node=dr.findNode(r,this.parsedPath.nodeName),this.rootNode=r,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(r,l,m){return r&&r.isAnimationObjectGroup?new dr.Composite(r,l,m):new dr(r,l,m)}static sanitizeNodeName(r){return r.replace(/\s/g,"_").replace(XN,"")}static parseTrackName(r){const l=ZN.exec(r);if(l===null)throw new Error("PropertyBinding: Cannot parse trackName: "+r);const m={nodeName:l[2],objectName:l[3],objectIndex:l[4],propertyName:l[5],propertyIndex:l[6]},y=m.nodeName&&m.nodeName.lastIndexOf(".");if(y!==void 0&&y!==-1){const _=m.nodeName.substring(y+1);e5.indexOf(_)!==-1&&(m.nodeName=m.nodeName.substring(0,y),m.objectName=_)}if(m.propertyName===null||m.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+r);return m}static findNode(r,l){if(l===void 0||l===""||l==="."||l===-1||l===r.name||l===r.uuid)return r;if(r.skeleton){const m=r.skeleton.getBoneByName(l);if(m!==void 0)return m}if(r.children){const m=function(_){for(let R=0;R<_.length;R++){const I=_[R];if(I.name===l||I.uuid===l)return I;const O=m(I.children);if(O)return O}return null},y=m(r.children);if(y)return y}return null}_getValue_unavailable(){}_setValue_unavailable(){}_getValue_direct(r,l){r[l]=this.targetObject[this.propertyName]}_getValue_array(r,l){const m=this.resolvedProperty;for(let y=0,_=m.length;y!==_;++y)r[l++]=m[y]}_getValue_arrayElement(r,l){r[l]=this.resolvedProperty[this.propertyIndex]}_getValue_toArray(r,l){this.resolvedProperty.toArray(r,l)}_setValue_direct(r,l){this.targetObject[this.propertyName]=r[l]}_setValue_direct_setNeedsUpdate(r,l){this.targetObject[this.propertyName]=r[l],this.targetObject.needsUpdate=!0}_setValue_direct_setMatrixWorldNeedsUpdate(r,l){this.targetObject[this.propertyName]=r[l],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_array(r,l){const m=this.resolvedProperty;for(let y=0,_=m.length;y!==_;++y)m[y]=r[l++]}_setValue_array_setNeedsUpdate(r,l){const m=this.resolvedProperty;for(let y=0,_=m.length;y!==_;++y)m[y]=r[l++];this.targetObject.needsUpdate=!0}_setValue_array_setMatrixWorldNeedsUpdate(r,l){const m=this.resolvedProperty;for(let y=0,_=m.length;y!==_;++y)m[y]=r[l++];this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_arrayElement(r,l){this.resolvedProperty[this.propertyIndex]=r[l]}_setValue_arrayElement_setNeedsUpdate(r,l){this.resolvedProperty[this.propertyIndex]=r[l],this.targetObject.needsUpdate=!0}_setValue_arrayElement_setMatrixWorldNeedsUpdate(r,l){this.resolvedProperty[this.propertyIndex]=r[l],this.targetObject.matrixWorldNeedsUpdate=!0}_setValue_fromArray(r,l){this.resolvedProperty.fromArray(r,l)}_setValue_fromArray_setNeedsUpdate(r,l){this.resolvedProperty.fromArray(r,l),this.targetObject.needsUpdate=!0}_setValue_fromArray_setMatrixWorldNeedsUpdate(r,l){this.resolvedProperty.fromArray(r,l),this.targetObject.matrixWorldNeedsUpdate=!0}_getValue_unbound(r,l){this.bind(),this.getValue(r,l)}_setValue_unbound(r,l){this.bind(),this.setValue(r,l)}bind(){let r=this.node;const l=this.parsedPath,m=l.objectName,y=l.propertyName;let _=l.propertyIndex;if(r||(r=dr.findNode(this.rootNode,l.nodeName),this.node=r),this.getValue=this._getValue_unavailable,this.setValue=this._setValue_unavailable,!r){console.warn("THREE.PropertyBinding: No target node found for track: "+this.path+".");return}if(m){let N=l.objectIndex;switch(m){case"materials":if(!r.material){console.error("THREE.PropertyBinding: Can not bind to material as node does not have a material.",this);return}if(!r.material.materials){console.error("THREE.PropertyBinding: Can not bind to material.materials as node.material does not have a materials array.",this);return}r=r.material.materials;break;case"bones":if(!r.skeleton){console.error("THREE.PropertyBinding: Can not bind to bones as node does not have a skeleton.",this);return}r=r.skeleton.bones;for(let V=0;V=_){const Q=_++,X=r[Q];l[X.uuid]=V,r[V]=X,l[N]=Q,r[Q]=O;for(let $=0,ie=y;$!==ie;++$){const ue=m[$],re=ue[Q],q=ue[V];ue[V]=re,ue[Q]=q}}}this.nCachedObjects_=_}uncache(){const r=this._objects,l=this._indicesByUUID,m=this._bindings,y=m.length;let _=this.nCachedObjects_,R=r.length;for(let I=0,O=arguments.length;I!==O;++I){const N=arguments[I],V=N.uuid,Q=l[V];if(Q!==void 0)if(delete l[V],Q<_){const X=--_,$=r[X],ie=--R,ue=r[ie];l[$.uuid]=Q,r[Q]=$,l[ue.uuid]=X,r[X]=ue,r.pop();for(let re=0,q=y;re!==q;++re){const Se=m[re],fe=Se[X],Me=Se[ie];Se[Q]=fe,Se[X]=Me,Se.pop()}}else{const X=--R,$=r[X];X>0&&(l[$.uuid]=Q),r[Q]=$,r.pop();for(let ie=0,ue=y;ie!==ue;++ie){const re=m[ie];re[Q]=re[X],re.pop()}}}this.nCachedObjects_=_}subscribe_(r,l){const m=this._bindingsIndicesByPath;let y=m[r];const _=this._bindings;if(y!==void 0)return _[y];const R=this._paths,I=this._parsedPaths,O=this._objects,N=O.length,V=this.nCachedObjects_,Q=new Array(N);y=_.length,m[r]=y,R.push(r),I.push(l),_.push(Q);for(let X=V,$=O.length;X!==$;++X){const ie=O[X];Q[X]=new dr(ie,r,l)}return Q}unsubscribe_(r){const l=this._bindingsIndicesByPath,m=l[r];if(m!==void 0){const y=this._paths,_=this._parsedPaths,R=this._bindings,I=R.length-1,O=R[I],N=r[I];l[N]=m,R[m]=O,R.pop(),_[m]=_[I],_.pop(),y[m]=y[I],y.pop()}}}class W2{constructor(r,l,m=null,y=l.blendMode){this._mixer=r,this._clip=l,this._localRoot=m,this.blendMode=y;const _=l.tracks,R=_.length,I=new Array(R),O={endingStart:ai,endingEnd:ai};for(let N=0;N!==R;++N){const V=_[N].createInterpolant(null);I[N]=V,V.settings=O}this._interpolantSettings=O,this._interpolants=I,this._propertyBindings=new Array(R),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=bn,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(r){return this._startTime=r,this}setLoop(r,l){return this.loop=r,this.repetitions=l,this}setEffectiveWeight(r){return this.weight=r,this._effectiveWeight=this.enabled?r:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(r){return this._scheduleFading(r,0,1)}fadeOut(r){return this._scheduleFading(r,1,0)}crossFadeFrom(r,l,m){if(r.fadeOut(l),this.fadeIn(l),m){const y=this._clip.duration,_=r._clip.duration,R=_/y,I=y/_;r.warp(1,R,l),this.warp(I,1,l)}return this}crossFadeTo(r,l,m){return r.crossFadeFrom(this,l,m)}stopFading(){const r=this._weightInterpolant;return r!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(r)),this}setEffectiveTimeScale(r){return this.timeScale=r,this._effectiveTimeScale=this.paused?0:r,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(r){return this.timeScale=this._clip.duration/r,this.stopWarping()}syncWith(r){return this.time=r.time,this.timeScale=r.timeScale,this.stopWarping()}halt(r){return this.warp(this._effectiveTimeScale,0,r)}warp(r,l,m){const y=this._mixer,_=y.time,R=this.timeScale;let I=this._timeScaleInterpolant;I===null&&(I=y._lendControlInterpolant(),this._timeScaleInterpolant=I);const O=I.parameterPositions,N=I.sampleValues;return O[0]=_,O[1]=_+m,N[0]=r/R,N[1]=l/R,this}stopWarping(){const r=this._timeScaleInterpolant;return r!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(r)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(r,l,m,y){if(!this.enabled){this._updateWeight(r);return}const _=this._startTime;if(_!==null){const O=(r-_)*m;O<0||m===0?l=0:(this._startTime=null,l=m*O)}l*=this._updateTimeScale(r);const R=this._updateTime(l),I=this._updateWeight(r);if(I>0){const O=this._interpolants,N=this._propertyBindings;switch(this.blendMode){case hr:for(let V=0,Q=O.length;V!==Q;++V)O[V].evaluate(R),N[V].accumulateAdditive(I);break;case Bi:default:for(let V=0,Q=O.length;V!==Q;++V)O[V].evaluate(R),N[V].accumulate(y,I)}}}_updateWeight(r){let l=0;if(this.enabled){l=this.weight;const m=this._weightInterpolant;if(m!==null){const y=m.evaluate(r)[0];l*=y,r>m.parameterPositions[1]&&(this.stopFading(),y===0&&(this.enabled=!1))}}return this._effectiveWeight=l,l}_updateTimeScale(r){let l=0;if(!this.paused){l=this.timeScale;const m=this._timeScaleInterpolant;if(m!==null){const y=m.evaluate(r)[0];l*=y,r>m.parameterPositions[1]&&(this.stopWarping(),l===0?this.paused=!0:this.timeScale=l)}}return this._effectiveTimeScale=l,l}_updateTime(r){const l=this._clip.duration,m=this.loop;let y=this.time+r,_=this._loopCount;const R=m===oi;if(r===0)return _===-1?y:R&&(_&1)===1?l-y:y;if(m===kt){_===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));n:{if(y>=l)y=l;else if(y<0)y=0;else{this.time=y;break n}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=y,this._mixer.dispatchEvent({type:"finished",action:this,direction:r<0?-1:1})}}else{if(_===-1&&(r>=0?(_=0,this._setEndings(!0,this.repetitions===0,R)):this._setEndings(this.repetitions===0,!0,R)),y>=l||y<0){const I=Math.floor(y/l);y-=l*I,_+=Math.abs(I);const O=this.repetitions-_;if(O<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,y=r>0?l:0,this.time=y,this._mixer.dispatchEvent({type:"finished",action:this,direction:r>0?1:-1});else{if(O===1){const N=r<0;this._setEndings(N,!N,R)}else this._setEndings(!1,!1,R);this._loopCount=_,this.time=y,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:I})}}else this.time=y;if(R&&(_&1)===1)return l-y}return y}_setEndings(r,l,m){const y=this._interpolantSettings;m?(y.endingStart=li,y.endingEnd=li):(r?y.endingStart=this.zeroSlopeAtStart?li:ai:y.endingStart=xi,l?y.endingEnd=this.zeroSlopeAtEnd?li:ai:y.endingEnd=xi)}_scheduleFading(r,l,m){const y=this._mixer,_=y.time;let R=this._weightInterpolant;R===null&&(R=y._lendControlInterpolant(),this._weightInterpolant=R);const I=R.parameterPositions,O=R.sampleValues;return I[0]=_,O[0]=l,I[1]=_+r,O[1]=m,this}}const i5=new Float32Array(1);class r5 extends to{constructor(r){super(),this._root=r,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(r,l){const m=r._localRoot||this._root,y=r._clip.tracks,_=y.length,R=r._propertyBindings,I=r._interpolants,O=m.uuid,N=this._bindingsByRootAndName;let V=N[O];V===void 0&&(V={},N[O]=V);for(let Q=0;Q!==_;++Q){const X=y[Q],$=X.name;let ie=V[$];if(ie!==void 0)++ie.referenceCount,R[Q]=ie;else{if(ie=R[Q],ie!==void 0){ie._cacheIndex===null&&(++ie.referenceCount,this._addInactiveBinding(ie,O,$));continue}const ue=l&&l._propertyBindings[Q].binding.parsedPath;ie=new j2(dr.create(m,$,ue),X.ValueTypeName,X.getValueSize()),++ie.referenceCount,this._addInactiveBinding(ie,O,$),R[Q]=ie}I[Q].resultBuffer=ie.buffer}}_activateAction(r){if(!this._isActiveAction(r)){if(r._cacheIndex===null){const m=(r._localRoot||this._root).uuid,y=r._clip.uuid,_=this._actionsByClip[y];this._bindAction(r,_&&_.knownActions[0]),this._addInactiveAction(r,y,m)}const l=r._propertyBindings;for(let m=0,y=l.length;m!==y;++m){const _=l[m];_.useCount++===0&&(this._lendBinding(_),_.saveOriginalState())}this._lendAction(r)}}_deactivateAction(r){if(this._isActiveAction(r)){const l=r._propertyBindings;for(let m=0,y=l.length;m!==y;++m){const _=l[m];--_.useCount===0&&(_.restoreOriginalState(),this._takeBackBinding(_))}this._takeBackAction(r)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;const r=this;this.stats={actions:{get total(){return r._actions.length},get inUse(){return r._nActiveActions}},bindings:{get total(){return r._bindings.length},get inUse(){return r._nActiveBindings}},controlInterpolants:{get total(){return r._controlInterpolants.length},get inUse(){return r._nActiveControlInterpolants}}}}_isActiveAction(r){const l=r._cacheIndex;return l!==null&&l=0;--m)r[m].stop();return this}update(r){r*=this.timeScale;const l=this._actions,m=this._nActiveActions,y=this.time+=r,_=Math.sign(r),R=this._accuIndex^=1;for(let N=0;N!==m;++N)l[N]._update(y,r,_,R);const I=this._bindings,O=this._nActiveBindings;for(let N=0;N!==O;++N)I[N].apply(R);return this}setTime(r){this.time=0;for(let l=0;lthis.max.x||r.ythis.max.y)}containsBox(r){return this.min.x<=r.min.x&&r.max.x<=this.max.x&&this.min.y<=r.min.y&&r.max.y<=this.max.y}getParameter(r,l){return l.set((r.x-this.min.x)/(this.max.x-this.min.x),(r.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(r){return!(r.max.xthis.max.x||r.max.ythis.max.y)}clampPoint(r,l){return l.copy(r).clamp(this.min,this.max)}distanceToPoint(r){return this.clampPoint(r,X2).distanceTo(r)}intersect(r){return this.min.max(r.min),this.max.min(r.max),this.isEmpty()&&this.makeEmpty(),this}union(r){return this.min.min(r.min),this.max.max(r.max),this}translate(r){return this.min.add(r),this.max.add(r),this}equals(r){return r.min.equals(this.min)&&r.max.equals(this.max)}}const K2=new je,nA=new je;class f5{constructor(r=new je,l=new je){this.start=r,this.end=l}set(r,l){return this.start.copy(r),this.end.copy(l),this}copy(r){return this.start.copy(r.start),this.end.copy(r.end),this}getCenter(r){return r.addVectors(this.start,this.end).multiplyScalar(.5)}delta(r){return r.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(r,l){return this.delta(l).multiplyScalar(r).add(this.start)}closestPointToPointParameter(r,l){K2.subVectors(r,this.start),nA.subVectors(this.end,this.start);const m=nA.dot(nA);let _=nA.dot(K2)/m;return l&&(_=Nr(_,0,1)),_}closestPointToPoint(r,l,m){const y=this.closestPointToPointParameter(r,l);return this.delta(m).multiplyScalar(y).add(this.start)}applyMatrix4(r){return this.start.applyMatrix4(r),this.end.applyMatrix4(r),this}equals(r){return r.start.equals(this.start)&&r.end.equals(this.end)}clone(){return new this.constructor().copy(this)}}const q2=new je;class p5 extends mr{constructor(r,l){super(),this.light=r,this.matrix=r.matrixWorld,this.matrixAutoUpdate=!1,this.color=l,this.type="SpotLightHelper";const m=new Yi,y=[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 R=0,I=1,O=32;R1)for(let Q=0;Q.99999)this.quaternion.set(0,0,0,1);else if(r.y<-.99999)this.quaternion.set(1,0,0,0);else{tC.set(r.z,0,-r.x).normalize();const l=Math.acos(r.y);this.quaternion.setFromAxisAngle(tC,l)}}setLength(r,l=r*.2,m=l*.2){this.line.scale.set(1,Math.max(1e-4,r-l),1),this.line.updateMatrix(),this.cone.scale.set(m,l,m),this.cone.position.y=r,this.cone.updateMatrix()}setColor(r){this.line.material.color.set(r),this.cone.material.color.set(r)}copy(r){return super.copy(r,!1),this.line.copy(r.line),this.cone.copy(r.cone),this}dispose(){this.line.geometry.dispose(),this.line.material.dispose(),this.cone.geometry.dispose(),this.cone.material.dispose()}}class S5 extends qa{constructor(r=1){const l=[0,0,0,r,0,0,0,0,0,0,r,0,0,0,0,0,0,r],m=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],y=new Yi;y.setAttribute("position",new ni(l,3)),y.setAttribute("color",new ni(m,3));const _=new oo({vertexColors:!0,toneMapped:!1});super(y,_),this.type="AxesHelper"}setColors(r,l,m){const y=new Hn,_=this.geometry.attributes.color.array;return y.set(r),y.toArray(_,0),y.toArray(_,3),y.set(l),y.toArray(_,6),y.toArray(_,9),y.set(m),y.toArray(_,12),y.toArray(_,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}}class T5{constructor(){this.type="ShapePath",this.color=new Hn,this.subPaths=[],this.currentPath=null}moveTo(r,l){return this.currentPath=new Kf,this.subPaths.push(this.currentPath),this.currentPath.moveTo(r,l),this}lineTo(r,l){return this.currentPath.lineTo(r,l),this}quadraticCurveTo(r,l,m,y){return this.currentPath.quadraticCurveTo(r,l,m,y),this}bezierCurveTo(r,l,m,y,_,R){return this.currentPath.bezierCurveTo(r,l,m,y,_,R),this}splineThru(r){return this.currentPath.splineThru(r),this}toShapes(r){function l(q){const Se=[];for(let fe=0,Me=q.length;feNumber.EPSILON){if(Xe<0&&(et=Se[He],Be=-Be,st=Se[ze],Xe=-Xe),q.yst.y)continue;if(q.y===et.y){if(q.x===et.x)return!0}else{const rt=Xe*(q.x-et.x)-Be*(q.y-et.y);if(rt===0)return!0;if(rt<0)continue;Me=!Me}}else{if(q.y!==et.y)continue;if(st.x<=q.x&&q.x<=et.x||et.x<=q.x&&q.x<=st.x)return!0}}return Me}const y=Ya.isClockWise,_=this.subPaths;if(_.length===0)return[];let R,I,O;const N=[];if(_.length===1)return I=_[0],O=new yh,O.curves=I.curves,N.push(O),N;let V=!y(_[0].getPoints());V=r?!V:V;const Q=[],X=[];let $=[],ie=0,ue;X[ie]=void 0,$[ie]=[];for(let q=0,Se=_.length;q1){let q=!1,Se=0;for(let fe=0,Me=X.length;fe0&&q===!1&&($=Q)}let re;for(let q=0,Se=X.length;q{h.r(u),h.d(u,{KHR_DF_CHANNEL_RGBSDA_ALPHA:()=>fn,KHR_DF_CHANNEL_RGBSDA_BLUE:()=>Nt,KHR_DF_CHANNEL_RGBSDA_DEPTH:()=>Vt,KHR_DF_CHANNEL_RGBSDA_GREEN:()=>pt,KHR_DF_CHANNEL_RGBSDA_RED:()=>Te,KHR_DF_CHANNEL_RGBSDA_STENCIL:()=>zt,KHR_DF_FLAG_ALPHA_PREMULTIPLIED:()=>F,KHR_DF_FLAG_ALPHA_STRAIGHT:()=>B,KHR_DF_KHR_DESCRIPTORTYPE_BASICFORMAT:()=>v,KHR_DF_MODEL_ASTC:()=>T,KHR_DF_MODEL_ETC1:()=>M,KHR_DF_MODEL_ETC1S:()=>L,KHR_DF_MODEL_ETC2:()=>C,KHR_DF_MODEL_RGBSDA:()=>S,KHR_DF_MODEL_UNSPECIFIED:()=>E,KHR_DF_PRIMARIES_ACES:()=>Ft,KHR_DF_PRIMARIES_ACESCC:()=>Qt,KHR_DF_PRIMARIES_ADOBERGB:()=>Fe,KHR_DF_PRIMARIES_BT2020:()=>Ze,KHR_DF_PRIMARIES_BT601_EBU:()=>gt,KHR_DF_PRIMARIES_BT601_SMPTE:()=>Tt,KHR_DF_PRIMARIES_BT709:()=>nt,KHR_DF_PRIMARIES_CIEXYZ:()=>mn,KHR_DF_PRIMARIES_DISPLAYP3:()=>vn,KHR_DF_PRIMARIES_NTSC1953:()=>Xt,KHR_DF_PRIMARIES_PAL525:()=>Tn,KHR_DF_PRIMARIES_UNSPECIFIED:()=>$e,KHR_DF_SAMPLE_DATATYPE_EXPONENT:()=>_e,KHR_DF_SAMPLE_DATATYPE_FLOAT:()=>mt,KHR_DF_SAMPLE_DATATYPE_LINEAR:()=>Ne,KHR_DF_SAMPLE_DATATYPE_SIGNED:()=>Ee,KHR_DF_TRANSFER_ACESCC:()=>Ce,KHR_DF_TRANSFER_ACESCCT:()=>Je,KHR_DF_TRANSFER_ADOBERGB:()=>Oe,KHR_DF_TRANSFER_BT1886:()=>G,KHR_DF_TRANSFER_DCIP3:()=>oe,KHR_DF_TRANSFER_HLG_EOTF:()=>te,KHR_DF_TRANSFER_HLG_OETF:()=>H,KHR_DF_TRANSFER_ITU:()=>K,KHR_DF_TRANSFER_LINEAR:()=>P,KHR_DF_TRANSFER_NTSC:()=>J,KHR_DF_TRANSFER_PAL625_EOTF:()=>Pe,KHR_DF_TRANSFER_PAL_OETF:()=>xe,KHR_DF_TRANSFER_PQ_EOTF:()=>Z,KHR_DF_TRANSFER_PQ_OETF:()=>ee,KHR_DF_TRANSFER_SLOG:()=>z,KHR_DF_TRANSFER_SLOG2:()=>j,KHR_DF_TRANSFER_SRGB:()=>U,KHR_DF_TRANSFER_ST240:()=>me,KHR_DF_TRANSFER_UNSPECIFIED:()=>D,KHR_DF_VENDORID_KHRONOS:()=>b,KHR_DF_VERSION:()=>x,KHR_SUPERCOMPRESSION_BASISLZ:()=>p,KHR_SUPERCOMPRESSION_NONE:()=>f,KHR_SUPERCOMPRESSION_ZLIB:()=>g,KHR_SUPERCOMPRESSION_ZSTD:()=>A,KTX2Container:()=>ll,VK_FORMAT_A1R5G5B5_UNORM_PACK16:()=>he,VK_FORMAT_A2B10G10R10_SINT_PACK32:()=>Pn,VK_FORMAT_A2B10G10R10_SNORM_PACK32:()=>Wt,VK_FORMAT_A2B10G10R10_UINT_PACK32:()=>Lt,VK_FORMAT_A2B10G10R10_UNORM_PACK32:()=>Zt,VK_FORMAT_A2R10G10B10_SINT_PACK32:()=>It,VK_FORMAT_A2R10G10B10_SNORM_PACK32:()=>ut,VK_FORMAT_A2R10G10B10_UINT_PACK32:()=>_t,VK_FORMAT_A2R10G10B10_UNORM_PACK32:()=>dt,VK_FORMAT_A4B4G4R4_UNORM_PACK16_EXT:()=>If,VK_FORMAT_A4R4G4B4_UNORM_PACK16_EXT:()=>ac,VK_FORMAT_ASTC_10x10_SFLOAT_BLOCK_EXT:()=>gu,VK_FORMAT_ASTC_10x10_SRGB_BLOCK:()=>Nr,VK_FORMAT_ASTC_10x10_UNORM_BLOCK:()=>no,VK_FORMAT_ASTC_10x5_SFLOAT_BLOCK_EXT:()=>uh,VK_FORMAT_ASTC_10x5_SRGB_BLOCK:()=>to,VK_FORMAT_ASTC_10x5_UNORM_BLOCK:()=>lh,VK_FORMAT_ASTC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K_FORMAT_PVRTC1_4BPP_SRGB_BLOCK_IMG:()=>Ni,VK_FORMAT_PVRTC1_4BPP_UNORM_BLOCK_IMG:()=>Hm,VK_FORMAT_PVRTC2_2BPP_SRGB_BLOCK_IMG:()=>jy,VK_FORMAT_PVRTC2_2BPP_UNORM_BLOCK_IMG:()=>mu,VK_FORMAT_PVRTC2_4BPP_SRGB_BLOCK_IMG:()=>en,VK_FORMAT_PVRTC2_4BPP_UNORM_BLOCK_IMG:()=>Hy,VK_FORMAT_R10X6G10X6B10X6A10X6_UNORM_4PACK16:()=>Oy,VK_FORMAT_R10X6G10X6_UNORM_2PACK16:()=>Dy,VK_FORMAT_R10X6_UNORM_PACK16:()=>Py,VK_FORMAT_R12X4G12X4B12X4A12X4_UNORM_4PACK16:()=>zy,VK_FORMAT_R12X4G12X4_UNORM_2PACK16:()=>ky,VK_FORMAT_R12X4_UNORM_PACK16:()=>Uy,VK_FORMAT_R16G16B16A16_SFLOAT:()=>ae,VK_FORMAT_R16G16B16A16_SINT:()=>ft,VK_FORMAT_R16G16B16A16_SNORM:()=>Ue,VK_FORMAT_R16G16B16A16_UINT:()=>Ke,VK_FORMAT_R16G16B16A16_UNORM:()=>we,VK_FORMAT_R16G16B16_SFLOAT:()=>pe,VK_FORMAT_R16G16B16_SINT:()=>se,VK_FORMAT_R16G16B16_SNORM:()=>Si,VK_FORMAT_R16G16B16_UINT:()=>Y,VK_FORMAT_R16G16B16_UNORM:()=>zi,VK_FORMAT_R16G16_SFLOAT:()=>Kn,VK_FORMAT_R16G16_SINT:()=>Rn,VK_FORMAT_R16G16_SNORM:()=>nr,VK_FORMAT_R16G16_UINT:()=>Rr,VK_FORMAT_R16G16_UNORM:()=>Zn,VK_FORMAT_R16_SFLOAT:()=>vi,VK_FORMAT_R16_SINT:()=>Cn,VK_FORMAT_R16_SNORM:()=>jn,VK_FORMAT_R16_UINT:()=>di,VK_FORMAT_R16_UNORM:()=>Dn,VK_FORMAT_R32G32B32A32_SFLOAT:()=>oi,VK_FORMAT_R32G32B32A32_SINT:()=>bn,VK_FORMAT_R32G32B32A32_UINT:()=>kt,VK_FORMAT_R32G32B32_SFLOAT:()=>on,VK_FORMAT_R32G32B32_SINT:()=>Yt,VK_FORMAT_R32G32B32_UINT:()=>Dt,VK_FORMAT_R32G32_SFLOAT:()=>xt,VK_FORMAT_R32G32_SINT:()=>tt,VK_FORMAT_R32G32_UINT:()=>Ae,VK_FORMAT_R32_SFLOAT:()=>ge,VK_FORMAT_R32_SINT:()=>ce,VK_FORMAT_R32_UINT:()=>le,VK_FORMAT_R4G4B4A4_UNORM_PACK16:()=>ke,VK_FORMAT_R4G4_UNORM_PACK8:()=>De,VK_FORMAT_R5G5B5A1_UNORM_PACK16:()=>W,VK_FORMAT_R5G6B5_UNORM_PACK16:()=>Qe,VK_FORMAT_R64G64B64A64_SFLOAT:()=>eo,VK_FORMAT_R64G64B64A64_SINT:()=>bi,VK_FORMAT_R64G64B64A64_UINT:()=>Fr,VK_FORMAT_R64G64B64_SFLOAT:()=>Li,VK_FORMAT_R64G64B64_SINT:()=>hr,VK_FORMAT_R64G64B64_UINT:()=>Bi,VK_FORMAT_R64G64_SFLOAT:()=>xi,VK_FORMAT_R64G64_SINT:()=>li,VK_FORMAT_R64G64_UINT:()=>ai,VK_FORMAT_R64_SFLOAT:()=>Nn,VK_FORMAT_R64_SINT:()=>Wn,VK_FORMAT_R64_UINT:()=>Vn,VK_FORMAT_R8G8B8A8_SINT:()=>cr,VK_FORMAT_R8G8B8A8_SNORM:()=>Vi,VK_FORMAT_R8G8B8A8_SRGB:()=>Le,VK_FORMAT_R8G8B8A8_UINT:()=>lr,VK_FORMAT_R8G8B8A8_UNORM:()=>Fi,VK_FORMAT_R8G8B8_SINT:()=>Rt,VK_FORMAT_R8G8B8_SNORM:()=>Fn,VK_FORMAT_R8G8B8_SRGB:()=>gn,VK_FORMAT_R8G8B8_UINT:()=>sn,VK_FORMAT_R8G8B8_UNORM:()=>Ri,VK_FORMAT_R8G8_SINT:()=>Bn,VK_FORMAT_R8G8_SNORM:()=>Pt,VK_FORMAT_R8G8_SRGB:()=>pi,VK_FORMAT_R8G8_UINT:()=>$t,VK_FORMAT_R8G8_UNORM:()=>Ct,VK_FORMAT_R8_SINT:()=>at,VK_FORMAT_R8_SNORM:()=>We,VK_FORMAT_R8_SRGB:()=>At,VK_FORMAT_R8_UINT:()=>ve,VK_FORMAT_R8_UNORM:()=>Re,VK_FORMAT_S8_UINT:()=>qr,VK_FORMAT_UNDEFINED:()=>ye,VK_FORMAT_X8_D24_UNORM_PACK32:()=>ks,read:()=>ur,write:()=>yu});var d=h("./node_modules/buffer/index.js").Buffer;const f=0,p=1,A=2,g=3,v=0,b=0,x=2,E=0,S=1,M=160,C=161,T=162,L=163,B=0,F=1,D=0,P=1,U=2,K=3,J=4,z=5,j=6,G=7,H=8,te=9,Z=10,ee=11,oe=12,xe=13,Pe=14,me=15,Ce=16,Je=17,Oe=18,$e=0,nt=1,gt=2,Tt=3,Ze=4,mn=5,Ft=6,Qt=7,Xt=8,Tn=9,vn=10,Fe=11,Te=0,pt=1,Nt=2,zt=13,Vt=14,fn=15,mt=128,Ee=64,_e=32,Ne=16,ye=0,De=1,ke=2,Ye=3,Qe=4,ne=5,W=6,k=7,he=8,Re=9,We=10,ve=13,at=14,At=15,Ct=16,Pt=17,$t=20,Bn=21,pi=22,Ri=23,Fn=24,sn=27,Rt=28,gn=29,si=30,Ln=31,Jn=34,$n=35,Ei=36,Fi=37,Vi=38,lr=41,cr=42,Le=43,ht=44,yt=45,de=48,be=49,Ve=50,dt=58,ut=59,_t=62,It=63,Zt=64,Wt=65,Lt=68,Pn=69,Dn=70,jn=71,di=74,Cn=75,vi=76,Zn=77,nr=78,Rr=81,Rn=82,Kn=83,zi=84,Si=85,Y=88,se=89,pe=90,we=91,Ue=92,Ke=95,ft=96,ae=97,le=98,ce=99,ge=100,Ae=101,tt=102,xt=103,Dt=104,Yt=105,on=106,kt=107,bn=108,oi=109,Vn=110,Wn=111,Nn=112,ai=113,li=114,xi=115,Bi=116,hr=117,Li=118,Fr=119,bi=120,eo=121,Kr=122,qo=123,Ha=124,ks=125,ja=126,qr=127,Cr=128,pr=129,fu=130,ih=131,rh=132,wr=133,sh=134,oh=135,ly=136,ol=137,cy=138,hy=139,uy=140,dy=141,fy=142,py=143,my=144,gy=145,Ay=146,vy=147,yy=148,xy=149,Ey=150,Mf=151,Dm=152,Om=153,Fm=154,Nm=155,Um=156,km=157,zm=158,Gm=159,ah=160,by=161,_y=162,wy=163,My=164,Cy=165,Sy=166,Ty=167,Ry=168,Iy=169,Cf=170,pu=171,Yo=172,lh=173,to=174,Es=175,Vm=176,al=177,sc=178,no=179,Nr=180,Sf=181,By=182,Ly=183,ch=184,Py=1000156007,Dy=1000156008,Oy=1000156009,Fy=1000156010,Ny=1000156011,Uy=1000156017,ky=1000156018,zy=1000156019,Gy=1000156020,Vy=1000156021,Tf=1000054e3,Hm=1000054001,mu=1000054002,Hy=1000054003,zs=1000054004,Ni=1000054005,jy=1000054006,en=1000054007,Ui=1000066e3,Rf=1000066001,jm=1000066002,Wy=1000066003,oc=1000066004,hh=1000066005,Wm=1000066006,Qm=1000066007,uh=1000066008,Xm=1000066009,Km=1000066010,gu=1000066011,Qy=1000066012,vr=1000066013,ac=100034e4,If=1000340001;class ll{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class cl{constructor(Pi,ar,bs,Ti){this._dataView=new DataView(Pi.buffer,Pi.byteOffset+ar,bs),this._littleEndian=Ti,this._offset=0}_nextUint8(){const Pi=this._dataView.getUint8(this._offset);return this._offset+=1,Pi}_nextUint16(){const Pi=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,Pi}_nextUint32(){const Pi=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,Pi}_nextUint64(){const Pi=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,Pi}_nextInt32(){const Pi=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,Pi}_skip(Pi){return this._offset+=Pi,this}_scan(Pi,ar=0){const bs=this._offset;let Ti=0;for(;this._dataView.getUint8(this._offset)!==ar&&Ti0?$o+je.byteLength:0;_s%8&&(_s+=8-_s%8);const Hi=[],io=new DataView(new ArrayBuffer(3*qn.levels.length*8));let Do=(_s||$o+je.byteLength)+ar.byteLength;for(let Er=0;Er0?_s:0),!0),rr.setBigUint64(60,BigInt(ar.byteLength),!0),new Uint8Array(Ir([new Uint8Array(Br).buffer,ls,io.buffer,Wa,je,_s>0?new ArrayBuffer(_s-($o+je.byteLength)):new ArrayBuffer(0),ar,...Hi]))}},"./node_modules/super-three/examples/jsm/libs/zstddec.module.js":(c,u,h)=>{h.r(u),h.d(u,{ZSTDDecoder:()=>v});var d=h("./node_modules/buffer/index.js").Buffer;let f,p,A;const g={env:{emscripten_notify_memory_growth:function(x){A=new Uint8Array(p.exports.memory.buffer)}}};class v{init(){return f||(f=typeof fetch<"u"?fetch("data:application/wasm;base64,"+b).then(E=>E.arrayBuffer()).then(E=>WebAssembly.instantiate(E,g)).then(this._init):WebAssembly.instantiate(d.from(b,"base64"),g).then(this._init),f)}_init(E){p=E.instance,g.env.emscripten_notify_memory_growth(0)}decode(E,S=0){if(!p)throw new Error("ZSTDDecoder: Await .init() before decoding.");const M=E.byteLength,C=p.exports.malloc(M);A.set(E,C),S=S||Number(p.exports.ZSTD_findDecompressedSize(C,M));const T=p.exports.malloc(S),L=p.exports.ZSTD_decompress(T,S,C,M),B=A.slice(T,T+L);return p.exports.free(C),p.exports.free(T),B}}const b="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwYGAwIGAAMCAQgBBwUGCgoEEQAEBAEIAwgDBQgDEA8IAAcABAUBcAECAgUEAQCAAgYJAX8BQaCgwAILB2AHBm1lbW9yeQIABm1hbGxvYwAoBGZyZWUAJgxaU1REX2lzRXJyb3IAaBlaU1REX2ZpbmREZWNvbXByZXNzZWRTaXplAFQPWlNURF9kZWNvbXByZXNzAEoGX3N0YXJ0ACQJBwEAQQELASQKussBaA8AIAAgACgCBCABajYCBAsZACAAKAIAIAAoAgRBH3F0QQAgAWtBH3F2CwgAIABBiH9LC34BBH9BAyEBIAAoAgQiA0EgTQRAIAAoAggiASAAKAIQTwRAIAAQDQ8LIAAoAgwiAiABRgRAQQFBAiADQSBJGw8LIAAgASABIAJrIANBA3YiBCABIARrIAJJIgEbIgJrIgQ2AgggACADIAJBA3RrNgIEIAAgBCgAADYCAAsgAQsUAQF/IAAgARACIQIgACABEAEgAgv3AQECfyACRQRAIABCADcCACAAQQA2AhAgAEIANwIIQbh/DwsgACABNgIMIAAgAUEEajYCECACQQRPBEAgACABIAJqIgFBfGoiAzYCCCAAIAMoAAA2AgAgAUF/ai0AACIBBEAgAEEIIAEQFGs2AgQgAg8LIABBADYCBEF/DwsgACABNgIIIAAgAS0AACIDNgIAIAJBfmoiBEEBTQRAIARBAWt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kAgASACaiAASwRAIAAgAmoiBCABSw0BCyAAIAEgAhALDwsgACABc0EDcSEDAkACQCAAIAFJBEAgAwRAIAAhAwwDCyAAQQNxRQRAIAAhAwwCCyAAIQMDQCACRQ0EIAMgAS0AADoAACABQQFqIQEgAkF/aiECIANBAWoiA0EDcQ0ACwwBCwJAIAMNACAEQQNxBEADQCACRQ0FIAAgAkF/aiICaiIDIAEgAmotAAA6AAAgA0EDcQ0ACwsgAkEDTQ0AA0AgACACQXxqIgJqIAEgAmooAgA2AgAgAkEDSw0ACwsgAkUNAgNAIAAgAkF/aiICaiABIAJqLQAAOgAAIAINAAsMAgsgAkEDTQ0AIAIhBANAIAMgASgCADYCACABQQRqIQEgA0EEaiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2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AQsgAEEIaiEBCyABC7kDAQJ/IAAgA2ohBQJAIANBB0wEQANAIAAgBU8NAiAAIAItAAA6AAAgAEEBaiEAIAJBAWohAgwAAAsACyAEQQFGBEACQCAAIAJrIgZBB00EQCAAIAItAAA6AAAgACACLQABOgABIAAgAi0AAjoAAiAAIAItAAM6AAMgAEEEaiACIAZBAnQiBkHAHmooAgBqIgIQFyACIAZB4B5qKAIAayECDAELIAAgAhAMCyACQQhqIQIgAEEIaiEACwJAAkACQAJAIAUgAU0EQCAAIANqIQEgBEEBRyAAIAJrQQ9Kcg0BA0AgACACEAwgAkEIaiECIABBCGoiACABSQ0ACwwFCyAAIAFLBEAgACEBDAQLIARBAUcgACACa0EPSnINASAAIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAA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siACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQeAAaiEMIAdB5ABqIQoDQCAHQShqEARBAksgBCAXTnJFBEAgBygCQCAHKAI8QQN0aikCACIdQhCIp0H/AXEhCyAHKAJQIAcoAkxBA3RqKQIAIh5CEIinQf8BcSEJIAcoAkggBygCREEDdGopAgAiH0IgiKchCCAeQiCIISAgHUIgiKchAgJAIB9CEIinQf8BcSIDQQJPBEACQCAGRSADQRlJckUEQCAIIAdBKGogA0EgIAcoAixrIg0gDSADSxsiDRAFIAMgDWsiA3RqIQggB0EoahAEGiADRQ0BIAdBKGogAxAFIAhqIQgMAQsgB0EoaiADEAUgCGohCCAHQShqEAQaCyAHKQJUISEgByAINgJUIAcgITcDWAwBCwJAIANFBEAgAgRAIAcoAlQhCAwDCyAHKAJYIQgMAQsCQAJAIAdBKGpBARAFIAggAkVqaiIDQQNGBEAgBygCVEF/aiIDIANFaiEIDAELIANBAnQgB2ooAlQiCCAIRWohCCADQQFGDQELIAcgBygCWDYCXAsLIAcgBygCVDYCWCAHIAg2AlQLICCnIQMgCQRAIAdBKGogCRAFIANqIQMLIAkgC2pBFE8EQCAHQShqEAQaCyALBEAgB0EoaiALEAUgAmohAgsgB0EoahAEGiAHIAcoAmggAmoiCSADajYCaCAKIAwgCCAJSxsoAgAhDSAHIAdBKGogHUIYiKd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AAgAjYCxOABIAAgATYCuOABIAAoArzgASEDIAAgATYCvOABIAAgASADIAJrajYCwOABCwutAgIEfwF+IwBBQGoiBCQAAkACQCACQQhJDQAgASgAAEFwcUHQ1LTCAUcNACABIAIQIiEBIABCADcDCCAAQQA2AgQgACABNgIADAELIARBGGogASACEC0iAxADBEAgACADEBoMAQsgAwRAIABBuH8QGgwBCyACIAQoAjAiA2shAiABIANqIQMDQAJAIAAgAyACIARBCGoQLCIFEAMEfyAFBSACIAVBA2oiBU8NAUG4fwsQGgwCCyAGQQFqIQYgAiAFayECIAMgBWohAyAEKAIMRQ0ACyAEKAI4BEAgAkEDTQRAIABBuH8QGgwCCyADQQRqIQMLIAQoAighAiAEKQMYIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBakEANgIAIAFCADcCECABQgA3AhggASABKQMYNwMIIAEgASkDEDcDACABKAIIQQh2QQFxIQIgAEEANgLg4gEgACACNgKM4gEgAUEgaiQAC3YBA38jAEEwayIBJAAgAARAIAEgAEHE0AFqIgIoAgA2AiggASAAKQK80AE3AyAgACgCACEDIAEgAigCADYCGCABIAApArzQATcDECADIAFBEGoQGyABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALzAEBAX8gACABKAK00AE2ApjiASAAIAEoAgQiAjYCwOABIAAgAjYCvOABIAAgAiABKAIIaiICNgK44AEgACACNgLE4AEgASgCuNABBEAgAEKBgICAEDcDiOEBIAAgAUGk0ABqNgIMIAAgAUGUIGo2AgggACABQZwwajYCBCAAIAFBDGo2AgAgAEGs0AFqIAFBqNABaigCADYCACAAQbDQAWogAUGs0AFqKAIANgIAIABBtNABaiABQbDQAWooAgA2AgAPCyAAQgA3A4jhAQs7ACACRQRAQbp/DwsgBEUEQEFsDwsgAiAEEGAEQCAAIAEgAiADIAQgBRBhDwsgACABIAIgAyAEIAUQZQtGAQF/IwBBEGsiBSQAIAVBCGogBBAOAn8gBS0ACQRAIAAgASACIAMgBBAyDAELIAAgASACIAMgBBA0CyEAIAVBEGokACAACzQAIAAgAyAEIAUQNiIFEA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AAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ"},"./node_modules/super-three/examples/jsm/lights/LightProbeGenerator.js":(c,u,h)=>{h.r(u),h.d(u,{LightProbeGenerator:()=>f});var d=h("./node_modules/super-three/build/three.module.js");class f{static fromCubeTexture(g){let v=0;const b=new d.Vector3,x=new d.Vector3,E=new d.Color,S=[0,0,0,0,0,0,0,0,0],M=new d.SphericalHarmonics3,C=M.coefficients;for(let L=0;L<6;L++){const B=g.image[L],F=B.width,D=B.height,P=document.createElement("canvas");P.width=F,P.height=D;const U=P.getContext("2d");U.drawImage(B,0,0,F,D);const K=U.getImageData(0,0,F,D),J=K.data,z=K.width,j=2/z;for(let G=0,H=J.length;G{h.r(u),h.d(u,{DRACOLoader:()=>p});var d=h("./node_modules/super-three/build/three.module.js");const f=new WeakMap;class p extends d.Loader{constructor(v){super(v),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(v){return this.decoderPath=v,this}setDecoderConfig(v){return this.decoderConfig=v,this}setWorkerLimit(v){return this.workerLimit=v,this}load(v,b,x,E){const S=new d.FileLoader(this.manager);S.setPath(this.path),S.setResponseType("arraybuffer"),S.setRequestHeader(this.requestHeader),S.setWithCredentials(this.withCredentials),S.load(v,M=>{this.parse(M,b,E)},x,E)}parse(v,b,x){this.decodeDracoFile(v,b,null,null,d.SRGBColorSpace).catch(x)}decodeDracoFile(v,b,x,E,S=d.LinearSRGBColorSpace){const M={attributeIDs:x||this.defaultAttributeIDs,attributeTypes:E||this.defaultAttributeTypes,useUniqueIDs:!!x,vertexColorSpace:S};return this.decodeGeometry(v,M).then(b)}decodeGeometry(v,b){const x=JSON.stringify(b);if(f.has(v)){const T=f.get(v);if(T.key===x)return T.promise;if(v.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let E;const S=this.workerNextTaskID++,M=v.byteLength,C=this._getWorker(S,M).then(T=>(E=T,new Promise((L,B)=>{E._callbacks[S]={resolve:L,reject:B},E.postMessage({type:"decode",id:S,taskConfig:b,buffer:v},[v])}))).then(T=>this._createGeometry(T.geometry));return C.catch(()=>!0).then(()=>{E&&S&&this._releaseTask(E,S)}),f.set(v,{key:x,promise:C}),C}_createGeometry(v){const b=new d.BufferGeometry;v.index&&b.setIndex(new d.BufferAttribute(v.index.array,1));for(let x=0;x{x.load(v,E,void 0,S)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const v=typeof WebAssembly!="object"||this.decoderConfig.type==="js",b=[];return v?b.push(this._loadLibrary("draco_decoder.js","text")):(b.push(this._loadLibrary("draco_wasm_wrapper.js","text")),b.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(b).then(x=>{const E=x[0];v||(this.decoderConfig.wasmBinary=x[1]);const S=A.toString(),M=["/* draco decoder */",E,"","/* worker */",S.substring(S.indexOf("{")+1,S.lastIndexOf("}"))].join(` `);this.workerSourceURL=URL.createObjectURL(new Blob([M]))}),this.decoderPending}_getWorker(v,b){return this._initDecoder().then(()=>{if(this.workerPool.lengthS._taskLoad?-1:1});const x=this.workerPool[this.workerPool.length-1];return x._taskCosts[v]=b,x._taskLoad+=b,x})}_releaseTask(v,b){v._taskLoad-=v._taskCosts[b],delete v._callbacks[b],delete v._taskCosts[b]}debug(){console.log("Task load: ",this.workerPool.map(v=>v._taskLoad))}dispose(){for(let v=0;v{const F=B.draco,D=new F.Decoder;try{const P=b(F,D,new Int8Array(T),L),U=P.attributes.map(K=>K.array.buffer);P.index&&U.push(P.index.array.buffer),self.postMessage({type:"decode",id:C.id,geometry:P},U)}catch(P){console.error(P),self.postMessage({type:"error",id:C.id,error:P.message})}finally{F.destroy(D)}});break}};function b(M,C,T,L){const B=L.attributeIDs,F=L.attributeTypes;let D,P;const U=C.GetEncodedGeometryType(T);if(U===M.TRIANGULAR_MESH)D=new M.Mesh,P=C.DecodeArrayToMesh(T,T.byteLength,D);else if(U===M.POINT_CLOUD)D=new M.PointCloud,P=C.DecodeArrayToPointCloud(T,T.byteLength,D);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!P.ok()||D.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+P.error_msg());const K={index:null,attributes:[]};for(const J in B){const z=self[F[J]];let j,G;if(L.useUniqueIDs)G=B[J],j=C.GetAttributeByUniqueId(D,G);else{if(G=C.GetAttributeId(D,M[B[J]]),G===-1)continue;j=C.GetAttribute(D,G)}const H=E(M,C,D,J,z,j);J==="color"&&(H.vertexColorSpace=L.vertexColorSpace),K.attributes.push(H)}return U===M.TRIANGULAR_MESH&&(K.index=x(M,C,D)),M.destroy(D),K}function x(M,C,T){const B=T.num_faces()*3,F=B*4,D=M._malloc(F);C.GetTrianglesUInt32Array(T,F,D);const P=new Uint32Array(M.HEAPF32.buffer,D,B).slice();return M._free(D),{array:P,itemSize:1}}function E(M,C,T,L,B,F){const D=F.num_components(),U=T.num_points()*D,K=U*B.BYTES_PER_ELEMENT,J=S(M,B),z=M._malloc(K);C.GetAttributeDataArrayForAllPoints(T,F,J,K,z);const j=new B(M.HEAPF32.buffer,z,U).slice();return M._free(z),{name:L,array:j,itemSize:D}}function S(M,C){switch(C){case Float32Array:return M.DT_FLOAT32;case Int8Array:return M.DT_INT8;case Int16Array:return M.DT_INT16;case Int32Array:return M.DT_INT32;case Uint8Array:return M.DT_UINT8;case Uint16Array:return M.DT_UINT16;case Uint32Array:return M.DT_UINT32}}}},"./node_modules/super-three/examples/jsm/loaders/GLTFLoader.js":(c,u,h)=>{h.r(u),h.d(u,{GLTFLoader:()=>p});var d=h("./node_modules/super-three/build/three.module.js"),f=h("./node_modules/super-three/examples/jsm/utils/BufferGeometryUtils.js");class p extends d.Loader{constructor(Ee){super(Ee),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.pluginCallbacks=[],this.register(function(_e){return new E(_e)}),this.register(function(_e){return new D(_e)}),this.register(function(_e){return new P(_e)}),this.register(function(_e){return new U(_e)}),this.register(function(_e){return new M(_e)}),this.register(function(_e){return new C(_e)}),this.register(function(_e){return new T(_e)}),this.register(function(_e){return new L(_e)}),this.register(function(_e){return new x(_e)}),this.register(function(_e){return new B(_e)}),this.register(function(_e){return new S(_e)}),this.register(function(_e){return new F(_e)}),this.register(function(_e){return new v(_e)}),this.register(function(_e){return new K(_e)}),this.register(function(_e){return new J(_e)})}load(Ee,_e,Ne,ye){const De=this;let ke;this.resourcePath!==""?ke=this.resourcePath:this.path!==""?ke=this.path:ke=d.LoaderUtils.extractUrlBase(Ee),this.manager.itemStart(Ee);const Ye=function(ne){ye?ye(ne):console.error(ne),De.manager.itemError(Ee),De.manager.itemEnd(Ee)},Qe=new d.FileLoader(this.manager);Qe.setPath(this.path),Qe.setResponseType("arraybuffer"),Qe.setRequestHeader(this.requestHeader),Qe.setWithCredentials(this.withCredentials),Qe.load(Ee,function(ne){try{De.parse(ne,ke,function(W){_e(W),De.manager.itemEnd(Ee)},Ye)}catch(W){Ye(W)}},Ne,Ye)}setDRACOLoader(Ee){return this.dracoLoader=Ee,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(Ee){return this.ktx2Loader=Ee,this}setMeshoptDecoder(Ee){return this.meshoptDecoder=Ee,this}register(Ee){return this.pluginCallbacks.indexOf(Ee)===-1&&this.pluginCallbacks.push(Ee),this}unregister(Ee){return this.pluginCallbacks.indexOf(Ee)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(Ee),1),this}parse(Ee,_e,Ne,ye){let De;const ke={},Ye={},Qe=new TextDecoder;if(typeof Ee=="string")De=JSON.parse(Ee);else if(Ee instanceof ArrayBuffer)if(Qe.decode(new Uint8Array(Ee,0,4))===z){try{ke[g.KHR_BINARY_GLTF]=new H(Ee)}catch(k){ye&&ye(k);return}De=JSON.parse(ke[g.KHR_BINARY_GLTF].content)}else De=JSON.parse(Qe.decode(Ee));else De=Ee;if(De.asset===void 0||De.asset.version[0]<2){ye&&ye(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const ne=new zt(De,{path:_e||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder});ne.fileLoader.setRequestHeader(this.requestHeader);for(let W=0;W=0&&Ye[k]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+k+'".')}}ne.setExtensions(ke),ne.setPlugins(Ye),ne.parse(Ne,ye)}parseAsync(Ee,_e){const Ne=this;return new Promise(function(ye,De){Ne.parse(Ee,_e,ye,De)})}}function A(){let mt={};return{get:function(Ee){return mt[Ee]},add:function(Ee,_e){mt[Ee]=_e},remove:function(Ee){delete mt[Ee]},removeAll:function(){mt={}}}}const g={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_ANISOTROPY:"KHR_materials_anisotropy",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_TEXTURE_AVIF:"EXT_texture_avif",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class v{constructor(Ee){this.parser=Ee,this.name=g.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const Ee=this.parser,_e=this.parser.json.nodes||[];for(let Ne=0,ye=_e.length;Ne=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return _e.loadTextureImage(Ee,De.source,ke)}}class P{constructor(Ee){this.parser=Ee,this.name=g.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(Ee){const _e=this.name,Ne=this.parser,ye=Ne.json,De=ye.textures[Ee];if(!De.extensions||!De.extensions[_e])return null;const ke=De.extensions[_e],Ye=ye.images[ke.source];let Qe=Ne.textureLoader;if(Ye.uri){const ne=Ne.options.manager.getHandler(Ye.uri);ne!==null&&(Qe=ne)}return this.detectSupport().then(function(ne){if(ne)return Ne.loadTextureImage(Ee,ke.source,Qe);if(ye.extensionsRequired&&ye.extensionsRequired.indexOf(_e)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return Ne.loadTexture(Ee)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(Ee){const _e=new Image;_e.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",_e.onload=_e.onerror=function(){Ee(_e.height===1)}})),this.isSupported}}class U{constructor(Ee){this.parser=Ee,this.name=g.EXT_TEXTURE_AVIF,this.isSupported=null}loadTexture(Ee){const _e=this.name,Ne=this.parser,ye=Ne.json,De=ye.textures[Ee];if(!De.extensions||!De.extensions[_e])return null;const ke=De.extensions[_e],Ye=ye.images[ke.source];let Qe=Ne.textureLoader;if(Ye.uri){const ne=Ne.options.manager.getHandler(Ye.uri);ne!==null&&(Qe=ne)}return this.detectSupport().then(function(ne){if(ne)return Ne.loadTextureImage(Ee,ke.source,Qe);if(ye.extensionsRequired&&ye.extensionsRequired.indexOf(_e)>=0)throw new Error("THREE.GLTFLoader: AVIF required by asset but unsupported.");return Ne.loadTexture(Ee)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(Ee){const _e=new Image;_e.src="data:image/avif;base64,AAAAIGZ0eXBhdmlmAAAAAGF2aWZtaWYxbWlhZk1BMUIAAADybWV0YQAAAAAAAAAoaGRscgAAAAAAAAAAcGljdAAAAAAAAAAAAAAAAGxpYmF2aWYAAAAADnBpdG0AAAAAAAEAAAAeaWxvYwAAAABEAAABAAEAAAABAAABGgAAABcAAAAoaWluZgAAAAAAAQAAABppbmZlAgAAAAABAABhdjAxQ29sb3IAAAAAamlwcnAAAABLaXBjbwAAABRpc3BlAAAAAAAAAAEAAAABAAAAEHBpeGkAAAAAAwgICAAAAAxhdjFDgQAMAAAAABNjb2xybmNseAACAAIABoAAAAAXaXBtYQAAAAAAAAABAAEEAQKDBAAAAB9tZGF0EgAKCBgABogQEDQgMgkQAAAAB8dSLfI=",_e.onload=_e.onerror=function(){Ee(_e.height===1)}})),this.isSupported}}class K{constructor(Ee){this.name=g.EXT_MESHOPT_COMPRESSION,this.parser=Ee}loadBufferView(Ee){const _e=this.parser.json,Ne=_e.bufferViews[Ee];if(Ne.extensions&&Ne.extensions[this.name]){const ye=Ne.extensions[this.name],De=this.parser.getDependency("buffer",ye.buffer),ke=this.parser.options.meshoptDecoder;if(!ke||!ke.supported){if(_e.extensionsRequired&&_e.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return De.then(function(Ye){const Qe=ye.byteOffset||0,ne=ye.byteLength||0,W=ye.count,k=ye.byteStride,he=new Uint8Array(Ye,Qe,ne);return ke.decodeGltfBufferAsync?ke.decodeGltfBufferAsync(W,k,he,ye.mode,ye.filter).then(function(Re){return Re.buffer}):ke.ready.then(function(){const Re=new ArrayBuffer(W*k);return ke.decodeGltfBuffer(new Uint8Array(Re),W,k,he,ye.mode,ye.filter),Re})})}else return null}}class J{constructor(Ee){this.name=g.EXT_MESH_GPU_INSTANCING,this.parser=Ee}createNodeMesh(Ee){const _e=this.parser.json,Ne=_e.nodes[Ee];if(!Ne.extensions||!Ne.extensions[this.name]||Ne.mesh===void 0)return null;const ye=_e.meshes[Ne.mesh];for(const ne of ye.primitives)if(ne.mode!==me.TRIANGLES&&ne.mode!==me.TRIANGLE_STRIP&&ne.mode!==me.TRIANGLE_FAN&&ne.mode!==void 0)return null;const ke=Ne.extensions[this.name].attributes,Ye=[],Qe={};for(const ne in ke)Ye.push(this.parser.getDependency("accessor",ke[ne]).then(W=>(Qe[ne]=W,Qe[ne])));return Ye.length<1?null:(Ye.push(this.parser.createNodeMesh(Ee)),Promise.all(Ye).then(ne=>{const W=ne.pop(),k=W.isGroup?W.children:[W],he=ne[0].count,Re=[];for(const We of k){const ve=new d.Matrix4,at=new d.Vector3,At=new d.Quaternion,Ct=new d.Vector3(1,1,1),Pt=new d.InstancedMesh(We.geometry,We.material,he);for(let $t=0;$t0||mt.search(/^data\:image\/jpeg/)===0?"image/jpeg":mt.search(/\.webp($|\?)/i)>0||mt.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}const Nt=new d.Matrix4;class zt{constructor(Ee={},_e={}){this.json=Ee,this.extensions={},this.plugins={},this.options=_e,this.cache=new A,this.associations=new Map,this.primitiveCache={},this.nodeCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let Ne=!1,ye=!1,De=-1;typeof navigator<"u"&&(Ne=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,ye=navigator.userAgent.indexOf("Firefox")>-1,De=ye?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||Ne||ye&&De<98?this.textureLoader=new d.TextureLoader(this.options.manager):this.textureLoader=new d.ImageBitmapLoader(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new d.FileLoader(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(Ee){this.extensions=Ee}setPlugins(Ee){this.plugins=Ee}parse(Ee,_e){const Ne=this,ye=this.json,De=this.extensions;this.cache.removeAll(),this.nodeCache={},this._invokeAll(function(ke){return ke._markDefs&&ke._markDefs()}),Promise.all(this._invokeAll(function(ke){return ke.beforeRoot&&ke.beforeRoot()})).then(function(){return Promise.all([Ne.getDependencies("scene"),Ne.getDependencies("animation"),Ne.getDependencies("camera")])}).then(function(ke){const Ye={scene:ke[0][ye.scene||0],scenes:ke[0],animations:ke[1],cameras:ke[2],asset:ye.asset,parser:Ne,userData:{}};return Ft(De,Ye,ye),Qt(Ye,ye),Promise.all(Ne._invokeAll(function(Qe){return Qe.afterRoot&&Qe.afterRoot(Ye)})).then(function(){Ee(Ye)})}).catch(_e)}_markDefs(){const Ee=this.json.nodes||[],_e=this.json.skins||[],Ne=this.json.meshes||[];for(let ye=0,De=_e.length;ye{const Qe=this.associations.get(ke);Qe!=null&&this.associations.set(Ye,Qe);for(const[ne,W]of ke.children.entries())De(W,Ye.children[ne])};return De(Ne,ye),ye.name+="_instance_"+Ee.uses[_e]++,ye}_invokeOne(Ee){const _e=Object.values(this.plugins);_e.push(this);for(let Ne=0;Ne<_e.length;Ne++){const ye=Ee(_e[Ne]);if(ye)return ye}return null}_invokeAll(Ee){const _e=Object.values(this.plugins);_e.unshift(this);const Ne=[];for(let ye=0;ye<_e.length;ye++){const De=Ee(_e[ye]);De&&Ne.push(De)}return Ne}getDependency(Ee,_e){const Ne=Ee+":"+_e;let ye=this.cache.get(Ne);if(!ye){switch(Ee){case"scene":ye=this.loadScene(_e);break;case"node":ye=this._invokeOne(function(De){return De.loadNode&&De.loadNode(_e)});break;case"mesh":ye=this._invokeOne(function(De){return De.loadMesh&&De.loadMesh(_e)});break;case"accessor":ye=this.loadAccessor(_e);break;case"bufferView":ye=this._invokeOne(function(De){return De.loadBufferView&&De.loadBufferView(_e)});break;case"buffer":ye=this.loadBuffer(_e);break;case"material":ye=this._invokeOne(function(De){return De.loadMaterial&&De.loadMaterial(_e)});break;case"texture":ye=this._invokeOne(function(De){return De.loadTexture&&De.loadTexture(_e)});break;case"skin":ye=this.loadSkin(_e);break;case"animation":ye=this._invokeOne(function(De){return De.loadAnimation&&De.loadAnimation(_e)});break;case"camera":ye=this.loadCamera(_e);break;default:if(ye=this._invokeOne(function(De){return De!=this&&De.getDependency&&De.getDependency(Ee,_e)}),!ye)throw new Error("Unknown type: "+Ee);break}this.cache.add(Ne,ye)}return ye}getDependencies(Ee){let _e=this.cache.get(Ee);if(!_e){const Ne=this,ye=this.json[Ee+(Ee==="mesh"?"es":"s")]||[];_e=Promise.all(ye.map(function(De,ke){return Ne.getDependency(Ee,ke)})),this.cache.add(Ee,_e)}return _e}loadBuffer(Ee){const _e=this.json.buffers[Ee],Ne=this.fileLoader;if(_e.type&&_e.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+_e.type+" buffer type is not supported.");if(_e.uri===void 0&&Ee===0)return Promise.resolve(this.extensions[g.KHR_BINARY_GLTF].body);const ye=this.options;return new Promise(function(De,ke){Ne.load(d.LoaderUtils.resolveURL(_e.uri,ye.path),De,void 0,function(){ke(new Error('THREE.GLTFLoader: Failed to load buffer "'+_e.uri+'".'))})})}loadBufferView(Ee){const _e=this.json.bufferViews[Ee];return this.getDependency("buffer",_e.buffer).then(function(Ne){const ye=_e.byteLength||0,De=_e.byteOffset||0;return Ne.slice(De,De+ye)})}loadAccessor(Ee){const _e=this,Ne=this.json,ye=this.json.accessors[Ee];if(ye.bufferView===void 0&&ye.sparse===void 0){const ke=$e[ye.type],Ye=Ce[ye.componentType],Qe=ye.normalized===!0,ne=new Ye(ye.count*ke);return Promise.resolve(new d.BufferAttribute(ne,ke,Qe))}const De=[];return ye.bufferView!==void 0?De.push(this.getDependency("bufferView",ye.bufferView)):De.push(null),ye.sparse!==void 0&&(De.push(this.getDependency("bufferView",ye.sparse.indices.bufferView)),De.push(this.getDependency("bufferView",ye.sparse.values.bufferView))),Promise.all(De).then(function(ke){const Ye=ke[0],Qe=$e[ye.type],ne=Ce[ye.componentType],W=ne.BYTES_PER_ELEMENT,k=W*Qe,he=ye.byteOffset||0,Re=ye.bufferView!==void 0?Ne.bufferViews[ye.bufferView].byteStride:void 0,We=ye.normalized===!0;let ve,at;if(Re&&Re!==k){const At=Math.floor(he/Re),Ct="InterleavedBuffer:"+ye.bufferView+":"+ye.componentType+":"+At+":"+ye.count;let Pt=_e.cache.get(Ct);Pt||(ve=new ne(Ye,At*Re,ye.count*Re/W),Pt=new d.InterleavedBuffer(ve,Re/W),_e.cache.add(Ct,Pt)),at=new d.InterleavedBufferAttribute(Pt,Qe,he%Re/W,We)}else Ye===null?ve=new ne(ye.count*Qe):ve=new ne(Ye,he,ye.count*Qe),at=new d.BufferAttribute(ve,Qe,We);if(ye.sparse!==void 0){const At=$e.SCALAR,Ct=Ce[ye.sparse.indices.componentType],Pt=ye.sparse.indices.byteOffset||0,$t=ye.sparse.values.byteOffset||0,Bn=new Ct(ke[1],Pt,ye.sparse.count*At),pi=new ne(ke[2],$t,ye.sparse.count*Qe);Ye!==null&&(at=new d.BufferAttribute(at.array.slice(),at.itemSize,at.normalized));for(let Ri=0,Fn=Bn.length;Ri=2&&at.setY(sn,pi[Ri*Qe+1]),Qe>=3&&at.setZ(sn,pi[Ri*Qe+2]),Qe>=4&&at.setW(sn,pi[Ri*Qe+3]),Qe>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return at})}loadTexture(Ee){const _e=this.json,Ne=this.options,De=_e.textures[Ee].source,ke=_e.images[De];let Ye=this.textureLoader;if(ke.uri){const Qe=Ne.manager.getHandler(ke.uri);Qe!==null&&(Ye=Qe)}return this.loadTextureImage(Ee,De,Ye)}loadTextureImage(Ee,_e,Ne){const ye=this,De=this.json,ke=De.textures[Ee],Ye=De.images[_e],Qe=(Ye.uri||Ye.bufferView)+":"+ke.sampler;if(this.textureCache[Qe])return this.textureCache[Qe];const ne=this.loadImageSource(_e,Ne).then(function(W){W.flipY=!1,W.name=ke.name||Ye.name||"",W.name===""&&typeof Ye.uri=="string"&&Ye.uri.startsWith("data:image/")===!1&&(W.name=Ye.uri);const he=(De.samplers||{})[ke.sampler]||{};return W.magFilter=Je[he.magFilter]||d.LinearFilter,W.minFilter=Je[he.minFilter]||d.LinearMipmapLinearFilter,W.wrapS=Oe[he.wrapS]||d.RepeatWrapping,W.wrapT=Oe[he.wrapT]||d.RepeatWrapping,ye.associations.set(W,{textures:Ee}),W}).catch(function(){return null});return this.textureCache[Qe]=ne,ne}loadImageSource(Ee,_e){const Ne=this,ye=this.json,De=this.options;if(this.sourceCache[Ee]!==void 0)return this.sourceCache[Ee].then(k=>k.clone());const ke=ye.images[Ee],Ye=self.URL||self.webkitURL;let Qe=ke.uri||"",ne=!1;if(ke.bufferView!==void 0)Qe=Ne.getDependency("bufferView",ke.bufferView).then(function(k){ne=!0;const he=new Blob([k],{type:ke.mimeType});return Qe=Ye.createObjectURL(he),Qe});else if(ke.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+Ee+" is missing URI and bufferView");const W=Promise.resolve(Qe).then(function(k){return new Promise(function(he,Re){let We=he;_e.isImageBitmapLoader===!0&&(We=function(ve){const at=new d.Texture(ve);at.needsUpdate=!0,he(at)}),_e.load(d.LoaderUtils.resolveURL(k,De.path),We,void 0,Re)})}).then(function(k){return ne===!0&&Ye.revokeObjectURL(Qe),k.userData.mimeType=ke.mimeType||pt(ke.uri),k}).catch(function(k){throw console.error("THREE.GLTFLoader: Couldn't load texture",Qe),k});return this.sourceCache[Ee]=W,W}assignTexture(Ee,_e,Ne,ye){const De=this;return this.getDependency("texture",Ne.index).then(function(ke){if(!ke)return null;if(Ne.texCoord!==void 0&&Ne.texCoord>0&&(ke=ke.clone(),ke.channel=Ne.texCoord),De.extensions[g.KHR_TEXTURE_TRANSFORM]){const Ye=Ne.extensions!==void 0?Ne.extensions[g.KHR_TEXTURE_TRANSFORM]:void 0;if(Ye){const Qe=De.associations.get(ke);ke=De.extensions[g.KHR_TEXTURE_TRANSFORM].extendTexture(ke,Ye),De.associations.set(ke,Qe)}}return ye!==void 0&&(ke.colorSpace=ye),Ee[_e]=ke,ke})}assignFinalMaterial(Ee){const _e=Ee.geometry;let Ne=Ee.material;const ye=_e.attributes.tangent===void 0,De=_e.attributes.color!==void 0,ke=_e.attributes.normal===void 0;if(Ee.isPoints){const Ye="PointsMaterial:"+Ne.uuid;let Qe=this.cache.get(Ye);Qe||(Qe=new d.PointsMaterial,d.Material.prototype.copy.call(Qe,Ne),Qe.color.copy(Ne.color),Qe.map=Ne.map,Qe.sizeAttenuation=!1,this.cache.add(Ye,Qe)),Ne=Qe}else if(Ee.isLine){const Ye="LineBasicMaterial:"+Ne.uuid;let Qe=this.cache.get(Ye);Qe||(Qe=new d.LineBasicMaterial,d.Material.prototype.copy.call(Qe,Ne),Qe.color.copy(Ne.color),Qe.map=Ne.map,this.cache.add(Ye,Qe)),Ne=Qe}if(ye||De||ke){let Ye="ClonedMaterial:"+Ne.uuid+":";ye&&(Ye+="derivative-tangents:"),De&&(Ye+="vertex-colors:"),ke&&(Ye+="flat-shading:");let Qe=this.cache.get(Ye);Qe||(Qe=Ne.clone(),De&&(Qe.vertexColors=!0),ke&&(Qe.flatShading=!0),ye&&(Qe.normalScale&&(Qe.normalScale.y*=-1),Qe.clearcoatNormalScale&&(Qe.clearcoatNormalScale.y*=-1)),this.cache.add(Ye,Qe),this.associations.set(Qe,this.associations.get(Ne))),Ne=Qe}Ee.material=Ne}getMaterialType(){return d.MeshStandardMaterial}loadMaterial(Ee){const _e=this,Ne=this.json,ye=this.extensions,De=Ne.materials[Ee];let ke;const Ye={},Qe=De.extensions||{},ne=[];if(Qe[g.KHR_MATERIALS_UNLIT]){const k=ye[g.KHR_MATERIALS_UNLIT];ke=k.getMaterialType(),ne.push(k.extendParams(Ye,De,_e))}else{const k=De.pbrMetallicRoughness||{};if(Ye.color=new d.Color(1,1,1),Ye.opacity=1,Array.isArray(k.baseColorFactor)){const he=k.baseColorFactor;Ye.color.setRGB(he[0],he[1],he[2],d.LinearSRGBColorSpace),Ye.opacity=he[3]}k.baseColorTexture!==void 0&&ne.push(_e.assignTexture(Ye,"map",k.baseColorTexture,d.SRGBColorSpace)),Ye.metalness=k.metallicFactor!==void 0?k.metallicFactor:1,Ye.roughness=k.roughnessFactor!==void 0?k.roughnessFactor:1,k.metallicRoughnessTexture!==void 0&&(ne.push(_e.assignTexture(Ye,"metalnessMap",k.metallicRoughnessTexture)),ne.push(_e.assignTexture(Ye,"roughnessMap",k.metallicRoughnessTexture))),ke=this._invokeOne(function(he){return he.getMaterialType&&he.getMaterialType(Ee)}),ne.push(Promise.all(this._invokeAll(function(he){return he.extendMaterialParams&&he.extendMaterialParams(Ee,Ye)})))}De.doubleSided===!0&&(Ye.side=d.DoubleSide);const W=De.alphaMode||Ze.OPAQUE;if(W===Ze.BLEND?(Ye.transparent=!0,Ye.depthWrite=!1):(Ye.transparent=!1,W===Ze.MASK&&(Ye.alphaTest=De.alphaCutoff!==void 0?De.alphaCutoff:.5)),De.normalTexture!==void 0&&ke!==d.MeshBasicMaterial&&(ne.push(_e.assignTexture(Ye,"normalMap",De.normalTexture)),Ye.normalScale=new d.Vector2(1,1),De.normalTexture.scale!==void 0)){const k=De.normalTexture.scale;Ye.normalScale.set(k,k)}if(De.occlusionTexture!==void 0&&ke!==d.MeshBasicMaterial&&(ne.push(_e.assignTexture(Ye,"aoMap",De.occlusionTexture)),De.occlusionTexture.strength!==void 0&&(Ye.aoMapIntensity=De.occlusionTexture.strength)),De.emissiveFactor!==void 0&&ke!==d.MeshBasicMaterial){const k=De.emissiveFactor;Ye.emissive=new d.Color().setRGB(k[0],k[1],k[2],d.LinearSRGBColorSpace)}return De.emissiveTexture!==void 0&&ke!==d.MeshBasicMaterial&&ne.push(_e.assignTexture(Ye,"emissiveMap",De.emissiveTexture,d.SRGBColorSpace)),Promise.all(ne).then(function(){const k=new ke(Ye);return De.name&&(k.name=De.name),Qt(k,De),_e.associations.set(k,{materials:Ee}),De.extensions&&Ft(ye,k,De),k})}createUniqueName(Ee){const _e=d.PropertyBinding.sanitizeNodeName(Ee||"");return _e in this.nodeNamesUsed?_e+"_"+ ++this.nodeNamesUsed[_e]:(this.nodeNamesUsed[_e]=0,_e)}loadGeometries(Ee){const _e=this,Ne=this.extensions,ye=this.primitiveCache;function De(Ye){return Ne[g.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(Ye,_e).then(function(Qe){return fn(Qe,Ye,_e)})}const ke=[];for(let Ye=0,Qe=Ee.length;Ye0&&Tn(At,De),At.name=_e.createUniqueName(De.name||"mesh_"+Ee),Qt(At,De),at.extensions&&Ft(ye,At,at),_e.assignFinalMaterial(At),k.push(At)}for(let Re=0,We=k.length;Re1?W=new d.Group:ne.length===1?W=ne[0]:W=new d.Object3D,W!==ne[0])for(let k=0,he=ne.length;k{const k=new Map;for(const[he,Re]of ye.associations)(he instanceof d.Material||he instanceof d.Texture)&&k.set(he,Re);return W.traverse(he=>{const Re=ye.associations.get(he);Re!=null&&k.set(he,Re)}),k};return ye.associations=ne(De),De})}_createAnimationTracks(Ee,_e,Ne,ye,De){const ke=[],Ye=Ee.name?Ee.name:Ee.uuid,Qe=[];gt[De.path]===gt.weights?Ee.traverse(function(he){he.morphTargetInfluences&&Qe.push(he.name?he.name:he.uuid)}):Qe.push(Ye);let ne;switch(gt[De.path]){case gt.weights:ne=d.NumberKeyframeTrack;break;case gt.rotation:ne=d.QuaternionKeyframeTrack;break;case gt.position:case gt.scale:ne=d.VectorKeyframeTrack;break;default:switch(Ne.itemSize){case 1:ne=d.NumberKeyframeTrack;break;case 2:case 3:default:ne=d.VectorKeyframeTrack;break}break}const W=ye.interpolation!==void 0?Tt[ye.interpolation]:d.InterpolateLinear,k=this._getArrayFromAccessor(Ne);for(let he=0,Re=Qe.length;he{h.r(u),h.d(u,{KTX2Loader:()=>x});var d=h("./node_modules/super-three/build/three.module.js"),f=h("./node_modules/super-three/examples/jsm/utils/WorkerPool.js"),p=h("./node_modules/super-three/examples/jsm/libs/ktx-parse.module.js"),A=h("./node_modules/super-three/examples/jsm/libs/zstddec.module.js");const g=new WeakMap;let v=0,b;class x extends d.Loader{constructor(B){super(B),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new f.WorkerPool,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(B){return this.transcoderPath=B,this}setWorkerLimit(B){return this.workerPool.setWorkerLimit(B),this}detectSupport(B){return B.isWebGPURenderer===!0?this.workerConfig={astcSupported:B.hasFeature("texture-compression-astc"),etc1Supported:!1,etc2Supported:B.hasFeature("texture-compression-etc2"),dxtSupported:B.hasFeature("texture-compression-bc"),bptcSupported:!1,pvrtcSupported:!1}:(this.workerConfig={astcSupported:B.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:B.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:B.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:B.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:B.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:B.extensions.has("WEBGL_compressed_texture_pvrtc")||B.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},B.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1)),this}init(){if(!this.transcoderPending){const B=new d.FileLoader(this.manager);B.setPath(this.transcoderPath),B.setWithCredentials(this.withCredentials);const F=B.loadAsync("basis_transcoder.js"),D=new d.FileLoader(this.manager);D.setPath(this.transcoderPath),D.setResponseType("arraybuffer"),D.setWithCredentials(this.withCredentials);const P=D.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([F,P]).then(([U,K])=>{const J=x.BasisWorker.toString(),z=["/* constants */","let _EngineFormat = "+JSON.stringify(x.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(x.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(x.BasisFormat),"/* basis_transcoder.js */",U,"/* worker */",J.substring(J.indexOf("{")+1,J.lastIndexOf("}"))].join(` `);this.workerSourceURL=URL.createObjectURL(new Blob([z])),this.transcoderBinary=K,this.workerPool.setWorkerCreator(()=>{const j=new Worker(this.workerSourceURL),G=this.transcoderBinary.slice(0);return j.postMessage({type:"init",config:this.workerConfig,transcoderBinary:G},[G]),j})}),v>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),v++}return this.transcoderPending}load(B,F,D,P){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const U=new d.FileLoader(this.manager);U.setResponseType("arraybuffer"),U.setWithCredentials(this.withCredentials),U.load(B,K=>{if(g.has(K))return g.get(K).promise.then(F).catch(P);this._createTexture(K).then(J=>F?F(J):null).catch(P)},D,P)}_createTextureFrom(B,F){const{faces:D,width:P,height:U,format:K,type:J,error:z,dfdFlags:j}=B;if(J==="error")return Promise.reject(z);let G;if(F.faceCount===6)G=new d.CompressedCubeTexture(D,K,d.UnsignedByteType);else{const H=D[0].mipmaps;G=F.layerCount>1?new d.CompressedArrayTexture(H,P,U,F.layerCount,K,d.UnsignedByteType):new d.CompressedTexture(H,P,U,K,d.UnsignedByteType)}return G.minFilter=D[0].mipmaps.length===1?d.LinearFilter:d.LinearMipmapLinearFilter,G.magFilter=d.LinearFilter,G.generateMipmaps=!1,G.needsUpdate=!0,G.colorSpace=T(F),G.premultiplyAlpha=!!(j&p.KHR_DF_FLAG_ALPHA_PREMULTIPLIED),G}async _createTexture(B,F={}){const D=(0,p.read)(new Uint8Array(B));if(D.vkFormat!==p.VK_FORMAT_UNDEFINED)return C(D);const P=F,U=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:B,taskConfig:P},[B])).then(K=>this._createTextureFrom(K.data,D));return g.set(B,{promise:U}),U}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),v--,this}}x.BasisFormat={ETC1S:0,UASTC_4x4:1},x.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},x.EngineFormat={RGBAFormat:d.RGBAFormat,RGBA_ASTC_4x4_Format:d.RGBA_ASTC_4x4_Format,RGBA_BPTC_Format:d.RGBA_BPTC_Format,RGBA_ETC2_EAC_Format:d.RGBA_ETC2_EAC_Format,RGBA_PVRTC_4BPPV1_Format:d.RGBA_PVRTC_4BPPV1_Format,RGBA_S3TC_DXT5_Format:d.RGBA_S3TC_DXT5_Format,RGB_ETC1_Format:d.RGB_ETC1_Format,RGB_ETC2_Format:d.RGB_ETC2_Format,RGB_PVRTC_4BPPV1_Format:d.RGB_PVRTC_4BPPV1_Format,RGB_S3TC_DXT1_Format:d.RGB_S3TC_DXT1_Format},x.BasisWorker=function(){let L,B,F;const D=_EngineFormat,P=_TranscoderFormat,U=_BasisFormat;self.addEventListener("message",function(ee){const oe=ee.data;switch(oe.type){case"init":L=oe.config,K(oe.transcoderBinary);break;case"transcode":B.then(()=>{try{const{faces:xe,buffers:Pe,width:me,height:Ce,hasAlpha:Je,format:Oe,dfdFlags:$e}=J(oe.buffer);self.postMessage({type:"transcode",id:oe.id,faces:xe,width:me,height:Ce,hasAlpha:Je,format:Oe,dfdFlags:$e},Pe)}catch(xe){console.error(xe),self.postMessage({type:"error",id:oe.id,error:xe.message})}});break}});function K(ee){B=new Promise(oe=>{F={wasmBinary:ee,onRuntimeInitialized:oe},BASIS(F)}).then(()=>{F.initializeBasis(),F.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function J(ee){const oe=new F.KTX2File(new Uint8Array(ee));function xe(){oe.close(),oe.delete()}if(!oe.isValid())throw xe(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");const Pe=oe.isUASTC()?U.UASTC_4x4:U.ETC1S,me=oe.getWidth(),Ce=oe.getHeight(),Je=oe.getLayers()||1,Oe=oe.getLevels(),$e=oe.getFaces(),nt=oe.getHasAlpha(),gt=oe.getDFDFlags(),{transcoderFormat:Tt,engineFormat:Ze}=H(Pe,me,Ce,nt);if(!me||!Ce||!Oe)throw xe(),new Error("THREE.KTX2Loader: Invalid texture");if(!oe.startTranscoding())throw xe(),new Error("THREE.KTX2Loader: .startTranscoding failed");const mn=[],Ft=[];for(let Qt=0;Qt<$e;Qt++){const Xt=[];for(let Tn=0;Tn1?(Fe=zt.origWidth,Te=zt.origHeight):(Fe=zt.width,Te=zt.height);const Vt=new Uint8Array(oe.getImageTranscodedSizeInBytes(Tn,Nt,0,Tt));if(!oe.transcodeImage(Vt,Tn,Nt,Qt,Tt,0,-1,-1))throw xe(),new Error("THREE.KTX2Loader: .transcodeImage failed.");vn.push(Vt)}const pt=Z(vn);Xt.push({data:pt,width:Fe,height:Te}),Ft.push(pt.buffer)}mn.push({mipmaps:Xt,width:me,height:Ce,format:Ze})}return xe(),{faces:mn,buffers:Ft,width:me,height:Ce,hasAlpha:nt,format:Ze,dfdFlags:gt}}const z=[{if:"astcSupported",basisFormat:[U.UASTC_4x4],transcoderFormat:[P.ASTC_4x4,P.ASTC_4x4],engineFormat:[D.RGBA_ASTC_4x4_Format,D.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[U.ETC1S,U.UASTC_4x4],transcoderFormat:[P.BC7_M5,P.BC7_M5],engineFormat:[D.RGBA_BPTC_Format,D.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[U.ETC1S,U.UASTC_4x4],transcoderFormat:[P.BC1,P.BC3],engineFormat:[D.RGB_S3TC_DXT1_Format,D.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[U.ETC1S,U.UASTC_4x4],transcoderFormat:[P.ETC1,P.ETC2],engineFormat:[D.RGB_ETC2_Format,D.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[U.ETC1S,U.UASTC_4x4],transcoderFormat:[P.ETC1],engineFormat:[D.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[U.ETC1S,U.UASTC_4x4],transcoderFormat:[P.PVRTC1_4_RGB,P.PVRTC1_4_RGBA],engineFormat:[D.RGB_PVRTC_4BPPV1_Format,D.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],j=z.sort(function(ee,oe){return ee.priorityETC1S-oe.priorityETC1S}),G=z.sort(function(ee,oe){return ee.priorityUASTC-oe.priorityUASTC});function H(ee,oe,xe,Pe){let me,Ce;const Je=ee===U.ETC1S?j:G;for(let Oe=0;Oe{const K=new A.ZSTDDecoder;await K.init(),U(K)})),F=await b);const D=[];for(let U=0;U>U),J=Math.max(1,L.pixelHeight>>U),z=L.pixelDepth?Math.max(1,L.pixelDepth>>U):0,j=L.levels[U];let G;if(L.supercompressionScheme===p.KHR_SUPERCOMPRESSION_NONE)G=j.levelData;else if(L.supercompressionScheme===p.KHR_SUPERCOMPRESSION_ZSTD)G=F.decode(j.levelData,j.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");let H;M[B]===d.FloatType?H=new Float32Array(G.buffer,G.byteOffset,G.byteLength/Float32Array.BYTES_PER_ELEMENT):M[B]===d.HalfFloatType?H=new Uint16Array(G.buffer,G.byteOffset,G.byteLength/Uint16Array.BYTES_PER_ELEMENT):H=G,D.push({data:H,width:K,height:J,depth:z})}let P;if(E.has(S[B]))P=L.pixelDepth===0?new d.DataTexture(D[0].data,L.pixelWidth,L.pixelHeight):new d.Data3DTexture(D[0].data,L.pixelWidth,L.pixelHeight,L.pixelDepth);else{if(L.pixelDepth>0)throw new Error("THREE.KTX2Loader: Unsupported pixelDepth.");P=new d.CompressedTexture(D,L.pixelWidth,L.pixelHeight)}return P.mipmaps=D,P.type=M[B],P.format=S[B],P.colorSpace=T(L),P.needsUpdate=!0,Promise.resolve(P)}function T(L){const B=L.dataFormatDescriptor[0];return B.colorPrimaries===p.KHR_DF_PRIMARIES_BT709?B.transferFunction===p.KHR_DF_TRANSFER_SRGB?d.SRGBColorSpace:d.LinearSRGBColorSpace:B.colorPrimaries===p.KHR_DF_PRIMARIES_DISPLAYP3?B.transferFunction===p.KHR_DF_TRANSFER_SRGB?d.DisplayP3ColorSpace:d.LinearDisplayP3ColorSpace:(B.colorPrimaries===p.KHR_DF_PRIMARIES_UNSPECIFIED||console.warn(`THREE.KTX2Loader: Unsupported color primaries, "${B.colorPrimaries}"`),d.NoColorSpace)}},"./node_modules/super-three/examples/jsm/loaders/MTLLoader.js":(c,u,h)=>{h.r(u),h.d(u,{MTLLoader:()=>f});var d=h("./node_modules/super-three/build/three.module.js");class f extends d.Loader{constructor(g){super(g)}load(g,v,b,x){const E=this,S=this.path===""?d.LoaderUtils.extractUrlBase(g):this.path,M=new d.FileLoader(this.manager);M.setPath(this.path),M.setRequestHeader(this.requestHeader),M.setWithCredentials(this.withCredentials),M.load(g,function(C){try{v(E.parse(C,S))}catch(T){x?x(T):console.error(T),E.manager.itemError(g)}},b,x)}setMaterialOptions(g){return this.materialOptions=g,this}parse(g,v){const b=g.split(` `);let x={};const E=/\s+/,S={};for(let C=0;C=0?T.substring(0,L):T;B=B.toLowerCase();let F=L>=0?T.substring(L+1):"";if(F=F.trim(),B==="newmtl")x={name:F},S[F]=x;else if(B==="ka"||B==="kd"||B==="ks"||B==="ke"){const D=F.split(E,3);x[B]=[parseFloat(D[0]),parseFloat(D[1]),parseFloat(D[2])]}else x[B]=F}const M=new p(this.resourcePath||v,this.materialOptions);return M.setCrossOrigin(this.crossOrigin),M.setManager(this.manager),M.setMaterials(S),M}}class p{constructor(g="",v={}){this.baseUrl=g,this.options=v,this.materialsInfo={},this.materials={},this.materialsArray=[],this.nameLookup={},this.crossOrigin="anonymous",this.side=this.options.side!==void 0?this.options.side:d.FrontSide,this.wrap=this.options.wrap!==void 0?this.options.wrap:d.RepeatWrapping}setCrossOrigin(g){return this.crossOrigin=g,this}setManager(g){this.manager=g}setMaterials(g){this.materialsInfo=this.convert(g),this.materials={},this.materialsArray=[],this.nameLookup={}}convert(g){if(!this.options)return g;const v={};for(const b in g){const x=g[b],E={};v[b]=E;for(const S in x){let M=!0,C=x[S];const T=S.toLowerCase();switch(T){case"kd":case"ka":case"ks":this.options&&this.options.normalizeRGB&&(C=[C[0]/255,C[1]/255,C[2]/255]),this.options&&this.options.ignoreZeroRGBs&&C[0]===0&&C[1]===0&&C[2]===0&&(M=!1);break}M&&(E[T]=C)}}return v}preload(){for(const g in this.materialsInfo)this.create(g)}getIndex(g){return this.nameLookup[g]}getAsArray(){let g=0;for(const v in this.materialsInfo)this.materialsArray[g]=this.create(v),this.nameLookup[v]=g,g++;return this.materialsArray}create(g){return this.materials[g]===void 0&&this.createMaterial_(g),this.materials[g]}createMaterial_(g){const v=this,b=this.materialsInfo[g],x={name:g,side:this.side};function E(M,C){return typeof C!="string"||C===""?"":/^https?:\/\//i.test(C)?C:M+C}function S(M,C){if(x[M])return;const T=v.getTextureParams(C,x),L=v.loadTexture(E(v.baseUrl,T.url));L.repeat.copy(T.scale),L.offset.copy(T.offset),L.wrapS=v.wrap,L.wrapT=v.wrap,(M==="map"||M==="emissiveMap")&&(L.colorSpace=d.SRGBColorSpace),x[M]=L}for(const M in b){const C=b[M];let T;if(C!=="")switch(M.toLowerCase()){case"kd":x.color=new d.Color().fromArray(C).convertSRGBToLinear();break;case"ks":x.specular=new d.Color().fromArray(C).convertSRGBToLinear();break;case"ke":x.emissive=new d.Color().fromArray(C).convertSRGBToLinear();break;case"map_kd":S("map",C);break;case"map_ks":S("specularMap",C);break;case"map_ke":S("emissiveMap",C);break;case"norm":S("normalMap",C);break;case"map_bump":case"bump":S("bumpMap",C);break;case"map_d":S("alphaMap",C),x.transparent=!0;break;case"ns":x.shininess=parseFloat(C);break;case"d":T=parseFloat(C),T<1&&(x.opacity=T,x.transparent=!0);break;case"tr":T=parseFloat(C),this.options&&this.options.invertTrProperty&&(T=1-T),T>0&&(x.opacity=1-T,x.transparent=!0);break}}return this.materials[g]=new d.MeshPhongMaterial(x),this.materials[g]}getTextureParams(g,v){const b={scale:new d.Vector2(1,1),offset:new d.Vector2(0,0)},x=g.split(/\s+/);let E;return E=x.indexOf("-bm"),E>=0&&(v.bumpScale=parseFloat(x[E+1]),x.splice(E,2)),E=x.indexOf("-s"),E>=0&&(b.scale.set(parseFloat(x[E+1]),parseFloat(x[E+2])),x.splice(E,4)),E=x.indexOf("-o"),E>=0&&(b.offset.set(parseFloat(x[E+1]),parseFloat(x[E+2])),x.splice(E,4)),b.url=x.join(" ").trim(),b}loadTexture(g,v,b,x,E){const S=this.manager!==void 0?this.manager:d.DefaultLoadingManager;let M=S.getHandler(g);M===null&&(M=new d.TextureLoader(S)),M.setCrossOrigin&&M.setCrossOrigin(this.crossOrigin);const C=M.load(g,b,x,E);return v!==void 0&&(C.mapping=v),C}}},"./node_modules/super-three/examples/jsm/loaders/OBJLoader.js":(c,u,h)=>{h.r(u),h.d(u,{OBJLoader:()=>L});var d=h("./node_modules/super-three/build/three.module.js");const f=/^[og]\s*(.+)?/,p=/^mtllib /,A=/^usemtl /,g=/^usemap /,v=/\s+/,b=new d.Vector3,x=new d.Vector3,E=new d.Vector3,S=new d.Vector3,M=new d.Vector3,C=new d.Color;function T(){const B={objects:[],object:{},vertices:[],normals:[],colors:[],uvs:[],materials:{},materialLibraries:[],startObject:function(F,D){if(this.object&&this.object.fromDeclaration===!1){this.object.name=F,this.object.fromDeclaration=D!==!1;return}const P=this.object&&typeof this.object.currentMaterial=="function"?this.object.currentMaterial():void 0;if(this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0),this.object={name:F||"",fromDeclaration:D!==!1,geometry:{vertices:[],normals:[],colors:[],uvs:[],hasUVIndices:!1},materials:[],smooth:!0,startMaterial:function(U,K){const J=this._finalize(!1);J&&(J.inherited||J.groupCount<=0)&&this.materials.splice(J.index,1);const z={index:this.materials.length,name:U||"",mtllib:Array.isArray(K)&&K.length>0?K[K.length-1]:"",smooth:J!==void 0?J.smooth:this.smooth,groupStart:J!==void 0?J.groupEnd:0,groupEnd:-1,groupCount:-1,inherited:!1,clone:function(j){const G={index:typeof j=="number"?j:this.index,name:this.name,mtllib:this.mtllib,smooth:this.smooth,groupStart:0,groupEnd:-1,groupCount:-1,inherited:!1};return G.clone=this.clone.bind(G),G}};return this.materials.push(z),z},currentMaterial:function(){if(this.materials.length>0)return this.materials[this.materials.length-1]},_finalize:function(U){const K=this.currentMaterial();if(K&&K.groupEnd===-1&&(K.groupEnd=this.geometry.vertices.length/3,K.groupCount=K.groupEnd-K.groupStart,K.inherited=!1),U&&this.materials.length>1)for(let J=this.materials.length-1;J>=0;J--)this.materials[J].groupCount<=0&&this.materials.splice(J,1);return U&&this.materials.length===0&&this.materials.push({name:"",smooth:this.smooth}),K}},P&&P.name&&typeof P.clone=="function"){const U=P.clone(0);U.inherited=!0,this.object.materials.push(U)}this.objects.push(this.object)},finalize:function(){this.object&&typeof this.object._finalize=="function"&&this.object._finalize(!0)},parseVertexIndex:function(F,D){const P=parseInt(F,10);return(P>=0?P-1:P+D/3)*3},parseNormalIndex:function(F,D){const P=parseInt(F,10);return(P>=0?P-1:P+D/3)*3},parseUVIndex:function(F,D){const P=parseInt(F,10);return(P>=0?P-1:P+D/2)*2},addVertex:function(F,D,P){const U=this.vertices,K=this.object.geometry.vertices;K.push(U[F+0],U[F+1],U[F+2]),K.push(U[D+0],U[D+1],U[D+2]),K.push(U[P+0],U[P+1],U[P+2])},addVertexPoint:function(F){const D=this.vertices;this.object.geometry.vertices.push(D[F+0],D[F+1],D[F+2])},addVertexLine:function(F){const D=this.vertices;this.object.geometry.vertices.push(D[F+0],D[F+1],D[F+2])},addNormal:function(F,D,P){const U=this.normals,K=this.object.geometry.normals;K.push(U[F+0],U[F+1],U[F+2]),K.push(U[D+0],U[D+1],U[D+2]),K.push(U[P+0],U[P+1],U[P+2])},addFaceNormal:function(F,D,P){const U=this.vertices,K=this.object.geometry.normals;b.fromArray(U,F),x.fromArray(U,D),E.fromArray(U,P),M.subVectors(E,x),S.subVectors(b,x),M.cross(S),M.normalize(),K.push(M.x,M.y,M.z),K.push(M.x,M.y,M.z),K.push(M.x,M.y,M.z)},addColor:function(F,D,P){const U=this.colors,K=this.object.geometry.colors;U[F]!==void 0&&K.push(U[F+0],U[F+1],U[F+2]),U[D]!==void 0&&K.push(U[D+0],U[D+1],U[D+2]),U[P]!==void 0&&K.push(U[P+0],U[P+1],U[P+2])},addUV:function(F,D,P){const U=this.uvs,K=this.object.geometry.uvs;K.push(U[F+0],U[F+1]),K.push(U[D+0],U[D+1]),K.push(U[P+0],U[P+1])},addDefaultUV:function(){const F=this.object.geometry.uvs;F.push(0,0),F.push(0,0),F.push(0,0)},addUVLine:function(F){const D=this.uvs;this.object.geometry.uvs.push(D[F+0],D[F+1])},addFace:function(F,D,P,U,K,J,z,j,G){const H=this.vertices.length;let te=this.parseVertexIndex(F,H),Z=this.parseVertexIndex(D,H),ee=this.parseVertexIndex(P,H);if(this.addVertex(te,Z,ee),this.addColor(te,Z,ee),z!==void 0&&z!==""){const oe=this.normals.length;te=this.parseNormalIndex(z,oe),Z=this.parseNormalIndex(j,oe),ee=this.parseNormalIndex(G,oe),this.addNormal(te,Z,ee)}else this.addFaceNormal(te,Z,ee);if(U!==void 0&&U!==""){const oe=this.uvs.length;te=this.parseUVIndex(U,oe),Z=this.parseUVIndex(K,oe),ee=this.parseUVIndex(J,oe),this.addUV(te,Z,ee),this.object.geometry.hasUVIndices=!0}else this.addDefaultUV()},addPointGeometry:function(F){this.object.geometry.type="Points";const D=this.vertices.length;for(let P=0,U=F.length;P=7?(C.setRGB(parseFloat(te[4]),parseFloat(te[5]),parseFloat(te[6])).convertSRGBToLinear(),D.colors.push(C.r,C.g,C.b)):D.colors.push(void 0,void 0,void 0);break;case"vn":D.normals.push(parseFloat(te[1]),parseFloat(te[2]),parseFloat(te[3]));break;case"vt":D.uvs.push(parseFloat(te[1]),parseFloat(te[2]));break}}else if(H==="f"){const Z=G.slice(1).trim().split(v),ee=[];for(let xe=0,Pe=Z.length;xe0){const Ce=me.split("/");ee.push(Ce)}}const oe=ee[0];for(let xe=1,Pe=ee.length-1;xe1){const Z=U[1].trim().toLowerCase();D.object.smooth=Z!=="0"&&Z!=="off"}else D.object.smooth=!0;const te=D.object.currentMaterial();te&&(te.smooth=D.object.smooth)}else{if(G==="\0")continue;console.warn('THREE.OBJLoader: Unexpected line: "'+G+'"')}}D.finalize();const K=new d.Group;if(K.materialLibraries=[].concat(D.materialLibraries),!(D.objects.length===1&&D.objects[0].geometry.vertices.length===0)===!0)for(let z=0,j=D.objects.length;z0&&xe.setAttribute("normal",new d.Float32BufferAttribute(H.normals,3)),H.colors.length>0&&(oe=!0,xe.setAttribute("color",new d.Float32BufferAttribute(H.colors,3))),H.hasUVIndices===!0&&xe.setAttribute("uv",new d.Float32BufferAttribute(H.uvs,2));const Pe=[];for(let Ce=0,Je=te.length;Ce1){for(let Ce=0,Je=te.length;Ce0){const z=new d.PointsMaterial({size:1,sizeAttenuation:!1}),j=new d.BufferGeometry;j.setAttribute("position",new d.Float32BufferAttribute(D.vertices,3)),D.colors.length>0&&D.colors[0]!==void 0&&(j.setAttribute("color",new d.Float32BufferAttribute(D.colors,3)),z.vertexColors=!0);const G=new d.Points(j,z);K.add(G)}return K}}},"./node_modules/super-three/examples/jsm/math/OBB.js":(c,u,h)=>{h.r(u),h.d(u,{OBB:()=>P});var d=h("./node_modules/super-three/build/three.module.js");const f={c:null,u:[new d.Vector3,new d.Vector3,new d.Vector3],e:[]},p={c:null,u:[new d.Vector3,new d.Vector3,new d.Vector3],e:[]},A=[[],[],[]],g=[[],[],[]],v=[],b=new d.Vector3,x=new d.Vector3,E=new d.Vector3,S=new d.Vector3,M=new d.Vector3,C=new d.Vector3,T=new d.Matrix3,L=new d.Box3,B=new d.Matrix4,F=new d.Matrix4,D=new d.Ray;class P{constructor(J=new d.Vector3,z=new d.Vector3,j=new d.Matrix3){this.center=J,this.halfSize=z,this.rotation=j}set(J,z,j){return this.center=J,this.halfSize=z,this.rotation=j,this}copy(J){return this.center.copy(J.center),this.halfSize.copy(J.halfSize),this.rotation.copy(J.rotation),this}clone(){return new this.constructor().copy(this)}getSize(J){return J.copy(this.halfSize).multiplyScalar(2)}clampPoint(J,z){const j=this.halfSize;S.subVectors(J,this.center),this.rotation.extractBasis(b,x,E),z.copy(this.center);const G=d.MathUtils.clamp(S.dot(b),-j.x,j.x);z.add(b.multiplyScalar(G));const H=d.MathUtils.clamp(S.dot(x),-j.y,j.y);z.add(x.multiplyScalar(H));const te=d.MathUtils.clamp(S.dot(E),-j.z,j.z);return z.add(E.multiplyScalar(te)),z}containsPoint(J){return S.subVectors(J,this.center),this.rotation.extractBasis(b,x,E),Math.abs(S.dot(b))<=this.halfSize.x&&Math.abs(S.dot(x))<=this.halfSize.y&&Math.abs(S.dot(E))<=this.halfSize.z}intersectsBox3(J){return this.intersectsOBB(U.fromBox3(J))}intersectsSphere(J){return this.clampPoint(J.center,C),C.distanceToSquared(J.center)<=J.radius*J.radius}intersectsOBB(J,z=Number.EPSILON){f.c=this.center,f.e[0]=this.halfSize.x,f.e[1]=this.halfSize.y,f.e[2]=this.halfSize.z,this.rotation.extractBasis(f.u[0],f.u[1],f.u[2]),p.c=J.center,p.e[0]=J.halfSize.x,p.e[1]=J.halfSize.y,p.e[2]=J.halfSize.z,J.rotation.extractBasis(p.u[0],p.u[1],p.u[2]);for(let H=0;H<3;H++)for(let te=0;te<3;te++)A[H][te]=f.u[H].dot(p.u[te]);S.subVectors(p.c,f.c),v[0]=S.dot(f.u[0]),v[1]=S.dot(f.u[1]),v[2]=S.dot(f.u[2]);for(let H=0;H<3;H++)for(let te=0;te<3;te++)g[H][te]=Math.abs(A[H][te])+z;let j,G;for(let H=0;H<3;H++)if(j=f.e[H],G=p.e[0]*g[H][0]+p.e[1]*g[H][1]+p.e[2]*g[H][2],Math.abs(v[H])>j+G)return!1;for(let H=0;H<3;H++)if(j=f.e[0]*g[0][H]+f.e[1]*g[1][H]+f.e[2]*g[2][H],G=p.e[H],Math.abs(v[0]*A[0][H]+v[1]*A[1][H]+v[2]*A[2][H])>j+G)return!1;return j=f.e[1]*g[2][0]+f.e[2]*g[1][0],G=p.e[1]*g[0][2]+p.e[2]*g[0][1],!(Math.abs(v[2]*A[1][0]-v[1]*A[2][0])>j+G||(j=f.e[1]*g[2][1]+f.e[2]*g[1][1],G=p.e[0]*g[0][2]+p.e[2]*g[0][0],Math.abs(v[2]*A[1][1]-v[1]*A[2][1])>j+G)||(j=f.e[1]*g[2][2]+f.e[2]*g[1][2],G=p.e[0]*g[0][1]+p.e[1]*g[0][0],Math.abs(v[2]*A[1][2]-v[1]*A[2][2])>j+G)||(j=f.e[0]*g[2][0]+f.e[2]*g[0][0],G=p.e[1]*g[1][2]+p.e[2]*g[1][1],Math.abs(v[0]*A[2][0]-v[2]*A[0][0])>j+G)||(j=f.e[0]*g[2][1]+f.e[2]*g[0][1],G=p.e[0]*g[1][2]+p.e[2]*g[1][0],Math.abs(v[0]*A[2][1]-v[2]*A[0][1])>j+G)||(j=f.e[0]*g[2][2]+f.e[2]*g[0][2],G=p.e[0]*g[1][1]+p.e[1]*g[1][0],Math.abs(v[0]*A[2][2]-v[2]*A[0][2])>j+G)||(j=f.e[0]*g[1][0]+f.e[1]*g[0][0],G=p.e[1]*g[2][2]+p.e[2]*g[2][1],Math.abs(v[1]*A[0][0]-v[0]*A[1][0])>j+G)||(j=f.e[0]*g[1][1]+f.e[1]*g[0][1],G=p.e[0]*g[2][2]+p.e[2]*g[2][0],Math.abs(v[1]*A[0][1]-v[0]*A[1][1])>j+G)||(j=f.e[0]*g[1][2]+f.e[1]*g[0][2],G=p.e[0]*g[2][1]+p.e[1]*g[2][0],Math.abs(v[1]*A[0][2]-v[0]*A[1][2])>j+G))}intersectsPlane(J){this.rotation.extractBasis(b,x,E);const z=this.halfSize.x*Math.abs(J.normal.dot(b))+this.halfSize.y*Math.abs(J.normal.dot(x))+this.halfSize.z*Math.abs(J.normal.dot(E)),j=J.normal.dot(this.center)-J.constant;return Math.abs(j)<=z}intersectRay(J,z){return this.getSize(M),L.setFromCenterAndSize(S.set(0,0,0),M),B.setFromMatrix3(this.rotation),B.setPosition(this.center),F.copy(B).invert(),D.copy(J).applyMatrix4(F),D.intersectBox(L,z)?z.applyMatrix4(B):null}intersectsRay(J){return this.intersectRay(J,S)!==null}fromBox3(J){return J.getCenter(this.center),J.getSize(this.halfSize).multiplyScalar(.5),this.rotation.identity(),this}equals(J){return J.center.equals(this.center)&&J.halfSize.equals(this.halfSize)&&J.rotation.equals(this.rotation)}applyMatrix4(J){const z=J.elements;let j=S.set(z[0],z[1],z[2]).length();const G=S.set(z[4],z[5],z[6]).length(),H=S.set(z[8],z[9],z[10]).length();J.determinant()<0&&(j=-j),T.setFromMatrix4(J);const Z=1/j,ee=1/G,oe=1/H;return T.elements[0]*=Z,T.elements[1]*=Z,T.elements[2]*=Z,T.elements[3]*=ee,T.elements[4]*=ee,T.elements[5]*=ee,T.elements[6]*=oe,T.elements[7]*=oe,T.elements[8]*=oe,this.rotation.multiply(T),this.halfSize.x*=j,this.halfSize.y*=G,this.halfSize.z*=H,S.setFromMatrixPosition(J),this.center.add(S),this}}const U=new P},"./node_modules/super-three/examples/jsm/utils/BufferGeometryUtils.js":(c,u,h)=>{h.r(u),h.d(u,{computeMikkTSpaceTangents:()=>f,computeMorphedAttributes:()=>C,deepCloneAttribute:()=>g,deinterleaveAttribute:()=>b,deinterleaveGeometry:()=>x,estimateBytesUsed:()=>E,interleaveAttributes:()=>v,mergeAttributes:()=>A,mergeBufferAttributes:()=>F,mergeBufferGeometries:()=>B,mergeGeometries:()=>p,mergeGroups:()=>T,mergeVertices:()=>S,toCreasedNormals:()=>L,toTrianglesDrawMode:()=>M});var d=h("./node_modules/super-three/build/three.module.js");function f(D,P,U=!0){if(!P||!P.isReady)throw new Error("BufferGeometryUtils: Initialized MikkTSpace library required.");if(!D.hasAttribute("position")||!D.hasAttribute("normal")||!D.hasAttribute("uv"))throw new Error('BufferGeometryUtils: Tangents require "position", "normal", and "uv" attributes.');function K(j){if(j.normalized||j.isInterleavedBufferAttribute){const G=new Float32Array(j.count*j.itemSize);for(let H=0,te=0;H2&&(G[te++]=j.getZ(H));return G}return j.array instanceof Float32Array?j.array:new Float32Array(j.array)}const J=D.index?D.toNonIndexed():D,z=P.generateTangents(K(J.attributes.position),K(J.attributes.normal),K(J.attributes.uv));if(U)for(let j=3;j=2&&j.setY(G,D.getY(G)),K>=3&&j.setZ(G,D.getZ(G)),K>=4&&j.setW(G,D.getW(G));return j}function x(D){const P=D.attributes,U=D.morphTargets,K=new Map;for(const J in P){const z=P[J];z.isInterleavedBufferAttribute&&(K.has(z)||K.set(z,b(z)),P[J]=K.get(z))}for(const J in U){const z=U[J];z.isInterleavedBufferAttribute&&(K.has(z)||K.set(z,b(z)),U[J]=K.get(z))}}function E(D){let P=0;for(const K in D.attributes){const J=D.getAttribute(K);P+=J.count*J.itemSize*J.array.BYTES_PER_ELEMENT}const U=D.getIndex();return P+=U?U.count*U.itemSize*U.array.BYTES_PER_ELEMENT:0,P}function S(D,P=1e-4){P=Math.max(P,Number.EPSILON);const U={},K=D.getIndex(),J=D.getAttribute("position"),z=K?K.count:J.count;let j=0;const G=Object.keys(D.attributes),H={},te={},Z=[],ee=["getX","getY","getZ","getW"],oe=["setX","setY","setZ","setW"];for(let Oe=0,$e=G.length;Oe<$e;Oe++){const nt=G[Oe],gt=D.attributes[nt];H[nt]=new d.BufferAttribute(new gt.array.constructor(gt.count*gt.itemSize),gt.itemSize,gt.normalized);const Tt=D.morphAttributes[nt];Tt&&(te[nt]=new d.BufferAttribute(new Tt.array.constructor(Tt.count*Tt.itemSize),Tt.itemSize,Tt.normalized))}const xe=P*.5,Pe=Math.log10(1/P),me=Math.pow(10,Pe),Ce=xe*me;for(let Oe=0;Oej.materialIndex!==G.materialIndex?j.materialIndex-G.materialIndex:j.start-G.start),D.getIndex()===null){const j=D.getAttribute("position"),G=[];for(let H=0;HU&&H.add(Xt)}H.normalize(),Pe.setXYZ(Je+gt,H.x,H.y,H.z)}}return Z.setAttribute("normal",Pe),Z}function B(D,P=!1){return console.warn("THREE.BufferGeometryUtils: mergeBufferGeometries() has been renamed to mergeGeometries()."),p(D,P)}function F(D){return console.warn("THREE.BufferGeometryUtils: mergeBufferAttributes() has been renamed to mergeAttributes()."),A(D)}},"./node_modules/super-three/examples/jsm/utils/WorkerPool.js":(c,u,h)=>{h.r(u),h.d(u,{WorkerPool:()=>d});class d{constructor(p=4){this.pool=p,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(p){if(!this.workers[p]){const A=this.workerCreator();A.addEventListener("message",this._onMessage.bind(this,p)),this.workers[p]=A}}_getIdleWorker(){for(let p=0;p{const v=this._getIdleWorker();v!==-1?(this._initWorker(v),this.workerStatus|=1<p.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}},"./package.json":c=>{c.exports=JSON.parse('{"name":"aframe","version":"1.5.0","description":"A web framework for building virtual reality experiences.","homepage":"https://aframe.io/","main":"dist/aframe-master.js","scripts":{"dev":"cross-env INSPECTOR_VERSION=dev webpack serve --port 8080","dist":"node scripts/updateVersionLog.js && npm run dist:min && npm run dist:max","dist:max":"webpack --config webpack.config.js","dist:min":"webpack --config webpack.prod.config.js","docs":"markserv --dir docs --port 9001","preghpages":"node ./scripts/preghpages.js","ghpages":"ghpages -p gh-pages/","lint":"standardx -v | snazzy","lint:fix":"standardx --fix","precommit":"npm run lint","prepush":"node scripts/testOnlyCheck.js","prerelease":"node scripts/release.js 1.4.2 1.5.0","start":"npm run dev","start:https":"npm run dev -- --server-type https","test":"karma start ./tests/karma.conf.js","test:docs":"node scripts/docsLint.js","test:firefox":"npm test -- --browsers Firefox","test:chrome":"npm test -- --browsers Chrome","test:nobrowser":"NO_BROWSER=true npm test","test:node":"mocha --ui tdd tests/node"},"repository":"aframevr/aframe","license":"MIT","files":["dist/*","docs/**/*","src/**/*","vendor/**/*"],"dependencies":{"@ungap/custom-elements":"^1.1.0","buffer":"^6.0.3","custom-event-polyfill":"^1.0.6","debug":"ngokevin/debug#noTimestamp","deep-assign":"^2.0.0","load-bmfont":"^1.2.3","object-assign":"^4.0.1","present":"0.0.6","promise-polyfill":"^3.1.0","super-animejs":"^3.1.0","super-three":"0.158.0","three-bmfont-text":"dmarcos/three-bmfont-text#eed4878795be9b3e38cf6aec6b903f56acd1f695","webvr-polyfill":"^0.10.12"},"devDependencies":{"@babel/core":"^7.17.10","babel-loader":"^8.2.5","babel-plugin-istanbul":"^6.1.1","chai":"^4.3.6","chai-shallow-deep-equal":"^1.4.0","chalk":"^1.1.3","cross-env":"^7.0.3","css-loader":"^6.7.1","eslint":"^8.45.0","eslint-config-semistandard":"^17.0.0","eslint-config-standard-jsx":"^11.0.0","ghpages":"0.0.8","git-rev":"^0.2.1","glob":"^8.0.3","husky":"^0.11.7","jsdom":"^20.0.0","karma":"^6.4.0","karma-chai-shallow-deep-equal":"0.0.4","karma-chrome-launcher":"^3.1.1","karma-coverage":"^2.2.0","karma-env-preprocessor":"^0.1.1","karma-firefox-launcher":"^2.1.2","karma-mocha":"^2.0.1","karma-mocha-reporter":"^2.2.5","karma-sinon-chai":"^2.0.2","karma-webpack":"^5.0.0","markserv":"github:sukima/markserv#feature/fix-broken-websoketio-link","mocha":"^10.0.0","replace-in-file":"^2.5.3","shelljs":"^0.7.7","shx":"^0.2.2","sinon":"<12.0.0","sinon-chai":"^3.7.0","snazzy":"^5.0.0","standardx":"^7.0.0","style-loader":"^3.3.1","too-wordy":"ngokevin/too-wordy","webpack":"^5.73.0","webpack-cli":"^4.10.0","webpack-dev-server":"^4.11.0","webpack-merge":"^5.8.0","write-good":"^1.0.8"},"link":true,"standardx":{"ignore":["build/**","dist/**","examples/**/shaders/*.js","**/vendor/**"]},"keywords":["3d","aframe","cardboard","components","oculus","three","three.js","rift","vive","vr","quest","meta","web-components","webvr","webxr"],"engines":{"node":">= 4.6.0","npm":">= 2.15.9"}}')}},i={};function o(c){var u=i[c];if(u!==void 0)return u.exports;var h=i[c]={id:c,exports:{}};return n[c].call(h.exports,h,h.exports,o),h.exports}o.m=n,o.n=c=>{var u=c&&c.__esModule?()=>c.default:()=>c;return o.d(u,{a:u}),u},o.d=(c,u)=>{for(var h in u)o.o(u,h)&&!o.o(c,h)&&Object.defineProperty(c,h,{enumerable:!0,get:u[h]})},o.g=function(){if(typeof globalThis=="object")return globalThis;try{return this||new Function("return this")()}catch{if(typeof window=="object")return window}}(),o.o=(c,u)=>Object.prototype.hasOwnProperty.call(c,u),o.r=c=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(c,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(c,"__esModule",{value:!0})},o.b=document.baseURI||self.location.href,o.nc=void 0;var a=o("./src/index.js");return a})())})(eU);const uC=.1;AFRAME.registerComponent("checkpoint-controls",{schema:{enabled:{default:!0},mode:{default:"teleport",oneOf:["teleport","animate"]},animateSpeed:{default:3}},init:function(){this.active=!0,this.checkpoint=null,this.isNavMeshConstrained=!1,this.offset=new THREE.Vector3,this.position=new THREE.Vector3,this.targetPosition=new THREE.Vector3},play:function(){this.active=!0},pause:function(){this.active=!1},setCheckpoint:function(s){const e=this.el;if(this.active&&this.checkpoint!==s){if(this.checkpoint&&e.emit("navigation-end",{checkpoint:this.checkpoint}),this.checkpoint=s,this.sync(),this.position.distanceTo(this.targetPosition)vc||Math.abs(i)>vc},getVelocityDelta:function(){const s=this._dpadVector,e=this._moveVector;this.getDpad(s),this.getJoystick(yl.MOVEMENT,e);const n=s.x||e.x,i=s.y||e.y,o=new THREE.Vector3;return Math.abs(n)>vc&&(o.x+=n),Math.abs(i)>vc&&(o.z+=i),o},isRotationActive:function(){if(!this.data.enabled||!this.isConnected())return!1;const s=this._lookVector;return this.getJoystick(yl.ROTATION,s),Math.abs(s.x)>vc||Math.abs(s.y)>vc},updateRotation:function(s){if(!this.isRotationActive())return;const e=this.data,n=this.yaw,i=this.pitch;n.rotation.y=this.el.object3D.rotation.y,i.rotation.x=this.el.object3D.rotation.x;const o=this._lookVector;this.getJoystick(yl.ROTATION,o),Math.abs(o.x)<=vc&&(o.x=0),Math.abs(o.y)<=vc&&(o.y=0),o.multiplyScalar(e.rotationSensitivity*s/1e3),n.rotation.y-=o.x,i.rotation.x-=o.y,i.rotation.x=Math.max(-Math.PI/2,Math.min(Math.PI/2,i.rotation.x)),this.el.object3D.rotation.set(i.rotation.x,n.rotation.y,0)},updateButtonState:function(){const s=this.getGamepad(vl.RIGHT);if(this.data.enabled&&s)for(var e=0;e1?vl.RIGHT:vl.LEFT).axes[s]},getJoystick:function(s,e){const n=this.getGamepad(s===yl.MOVEMENT?vl.LEFT:vl.RIGHT);if(!n)return e.set(0,0);if(n.mapping==="xr-standard")switch(s){case yl.MOVEMENT:return e.set(n.axes[2],n.axes[3]);case yl.ROTATION:return e.set(n.axes[2],0)}else switch(s){case yl.MOVEMENT:return e.set(n.axes[0],n.axes[1]);case yl.ROTATION:return e.set(n.axes[2],n.axes[3])}throw new Error('Unexpected joystick index "%d".',s)},getDpad:function(s){const e=this.getGamepad(vl.LEFT);return!e||!e.buttons[Qu.DPAD_RIGHT]?s.set(0,0):s.set((e.buttons[Qu.DPAD_RIGHT].pressed?1:0)+(e.buttons[Qu.DPAD_LEFT].pressed?-1:0),(e.buttons[Qu.DPAD_UP].pressed?-1:0)+(e.buttons[Qu.DPAD_DOWN].pressed?1:0))},isConnected:function(){const s=this.getGamepad(vl.LEFT);return!!(s&&s.connected)},getID:function(){return this.getGamepad(vl.LEFT).id}});(function(s){var e="KeyboardEvent"in s;e||(s.KeyboardEvent=function(){throw TypeError("Illegal constructor")}),"DOM_KEY_LOCATION_STANDARD"in s.KeyboardEvent||(s.KeyboardEvent.DOM_KEY_LOCATION_STANDARD=0),"DOM_KEY_LOCATION_LEFT"in s.KeyboardEvent||(s.KeyboardEvent.DOM_KEY_LOCATION_LEFT=1),"DOM_KEY_LOCATION_RIGHT"in s.KeyboardEvent||(s.KeyboardEvent.DOM_KEY_LOCATION_RIGHT=2),"DOM_KEY_LOCATION_NUMPAD"in s.KeyboardEvent||(s.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD=3);var n=window.KeyboardEvent.DOM_KEY_LOCATION_STANDARD,i=window.KeyboardEvent.DOM_KEY_LOCATION_LEFT,o=window.KeyboardEvent.DOM_KEY_LOCATION_RIGHT,a=window.KeyboardEvent.DOM_KEY_LOCATION_NUMPAD;function c(T,L){return String(T).indexOf(L)!==-1}var u=function(){return c(navigator.platform,"Win")?"win":c(navigator.platform,"Mac")?"mac":c(navigator.platform,"CrOS")?"cros":c(navigator.platform,"Linux")?"linux":c(navigator.userAgent,"iPad")||c(navigator.platform,"iPod")||c(navigator.platform,"iPhone")?"ios":""}(),h=function(){return c(navigator.userAgent,"Chrome/")?"chrome":c(navigator.vendor,"Apple")?"safari":c(navigator.userAgent,"MSIE")?"ie":c(navigator.userAgent,"Gecko/")?"moz":c(navigator.userAgent,"Opera/")?"opera":""}(),d=h+"-"+u;function f(T,L,B){(d===L||h===L||u===L)&&Object.keys(B).forEach(function(F){T[F]=B[F]})}function p(T,L){var B={};return Object.keys(T).forEach(function(F){var D=T[F];L in D&&(B[D[L]]=D)}),B}var A={3:{code:"Cancel"},6:{code:"Help"},8:{code:"Backspace"},9:{code:"Tab"},12:{code:"Clear"},13:{code:"Enter"},16:{code:"Shift"},17:{code:"Control"},18:{code:"Alt"},19:{code:"Pause"},20:{code:"CapsLock"},21:{code:"KanaMode"},22:{code:"HangulMode"},23:{code:"JunjaMode"},24:{code:"FinalMode"},25:{code:"KanjiMode"},27:{code:"Escape"},28:{code:"Convert"},29:{code:"NonConvert"},30:{code:"Accept"},31:{code:"ModeChange"},32:{code:"Space"},33:{code:"PageUp"},34:{code:"PageDown"},35:{code:"End"},36:{code:"Home"},37:{code:"ArrowLeft"},38:{code:"ArrowUp"},39:{code:"ArrowRight"},40:{code:"ArrowDown"},41:{code:"Select"},42:{code:"Print"},43:{code:"Execute"},44:{code:"PrintScreen"},45:{code:"Insert"},46:{code:"Delete"},47:{code:"Help"},48:{code:"Digit0",keyCap:"0"},49:{code:"Digit1",keyCap:"1"},50:{code:"Digit2",keyCap:"2"},51:{code:"Digit3",keyCap:"3"},52:{code:"Digit4",keyCap:"4"},53:{code:"Digit5",keyCap:"5"},54:{code:"Digit6",keyCap:"6"},55:{code:"Digit7",keyCap:"7"},56:{code:"Digit8",keyCap:"8"},57:{code:"Digit9",keyCap:"9"},65:{code:"KeyA",keyCap:"a"},66:{code:"KeyB",keyCap:"b"},67:{code:"KeyC",keyCap:"c"},68:{code:"KeyD",keyCap:"d"},69:{code:"KeyE",keyCap:"e"},70:{code:"KeyF",keyCap:"f"},71:{code:"KeyG",keyCap:"g"},72:{code:"KeyH",keyCap:"h"},73:{code:"KeyI",keyCap:"i"},74:{code:"KeyJ",keyCap:"j"},75:{code:"KeyK",keyCap:"k"},76:{code:"KeyL",keyCap:"l"},77:{code:"KeyM",keyCap:"m"},78:{code:"KeyN",keyCap:"n"},79:{code:"KeyO",keyCap:"o"},80:{code:"KeyP",keyCap:"p"},81:{code:"KeyQ",keyCap:"q"},82:{code:"KeyR",keyCap:"r"},83:{code:"KeyS",keyCap:"s"},84:{code:"KeyT",keyCap:"t"},85:{code:"KeyU",keyCap:"u"},86:{code:"KeyV",keyCap:"v"},87:{code:"KeyW",keyCap:"w"},88:{code:"KeyX",keyCap:"x"},89:{code:"KeyY",keyCap:"y"},90:{code:"KeyZ",keyCap:"z"},91:{code:"OSLeft",location:i},92:{code:"OSRight",location:o},93:{code:"ContextMenu"},95:{code:"Standby"},96:{code:"Numpad0",keyCap:"0",location:a},97:{code:"Numpad1",keyCap:"1",location:a},98:{code:"Numpad2",keyCap:"2",location:a},99:{code:"Numpad3",keyCap:"3",location:a},100:{code:"Numpad4",keyCap:"4",location:a},101:{code:"Numpad5",keyCap:"5",location:a},102:{code:"Numpad6",keyCap:"6",location:a},103:{code:"Numpad7",keyCap:"7",location:a},104:{code:"Numpad8",keyCap:"8",location:a},105:{code:"Numpad9",keyCap:"9",location:a},106:{code:"NumpadMultiply",keyCap:"*",location:a},107:{code:"NumpadAdd",keyCap:"+",location:a},108:{code:"NumpadComma",keyCap:",",location:a},109:{code:"NumpadSubtract",keyCap:"-",location:a},110:{code:"NumpadDecimal",keyCap:".",location:a},111:{code:"NumpadDivide",keyCap:"/",location:a},112:{code:"F1"},113:{code:"F2"},114:{code:"F3"},115:{code:"F4"},116:{code:"F5"},117:{code:"F6"},118:{code:"F7"},119:{code:"F8"},120:{code:"F9"},121:{code:"F10"},122:{code:"F11"},123:{code:"F12"},124:{code:"F13"},125:{code:"F14"},126:{code:"F15"},127:{code:"F16"},128:{code:"F17"},129:{code:"F18"},130:{code:"F19"},131:{code:"F20"},132:{code:"F21"},133:{code:"F22"},134:{code:"F23"},135:{code:"F24"},144:{code:"NumLock",location:a},145:{code:"ScrollLock"},160:{code:"ShiftLeft",location:i},161:{code:"ShiftRight",location:o},162:{code:"ControlLeft",location:i},163:{code:"ControlRight",location:o},164:{code:"AltLeft",location:i},165:{code:"AltRight",location:o},166:{code:"BrowserBack"},167:{code:"BrowserForward"},168:{code:"BrowserRefresh"},169:{code:"BrowserStop"},170:{code:"BrowserSearch"},171:{code:"BrowserFavorites"},172:{code:"BrowserHome"},173:{code:"VolumeMute"},174:{code:"VolumeDown"},175:{code:"VolumeUp"},176:{code:"MediaTrackNext"},177:{code:"MediaTrackPrevious"},178:{code:"MediaStop"},179:{code:"MediaPlayPause"},180:{code:"LaunchMail"},181:{code:"MediaSelect"},182:{code:"LaunchApp1"},183:{code:"LaunchApp2"},186:{code:"Semicolon",keyCap:";"},187:{code:"Equal",keyCap:"="},188:{code:"Comma",keyCap:","},189:{code:"Minus",keyCap:"-"},190:{code:"Period",keyCap:"."},191:{code:"Slash",keyCap:"/"},192:{code:"Backquote",keyCap:"`"},219:{code:"BracketLeft",keyCap:"["},220:{code:"Backslash",keyCap:"\\"},221:{code:"BracketRight",keyCap:"]"},222:{code:"Quote",keyCap:"'"},226:{code:"IntlBackslash",keyCap:"\\"},229:{code:"Process"},246:{code:"Attn"},247:{code:"CrSel"},248:{code:"ExSel"},249:{code:"EraseEof"},250:{code:"Play"},251:{code:"ZoomToggle"},254:{code:"Clear"}};f(A,"moz",{59:{code:"Semicolon",keyCap:";"},61:{code:"Equal",keyCap:"="},107:{code:"Equal",keyCap:"="},109:{code:"Minus",keyCap:"-"},187:{code:"NumpadAdd",keyCap:"+",location:a},189:{code:"NumpadSubtract",keyCap:"-",location:a}}),f(A,"moz-mac",{12:{code:"NumLock",location:a},173:{code:"Minus",keyCap:"-"}}),f(A,"moz-win",{173:{code:"Minus",keyCap:"-"}}),f(A,"chrome-mac",{93:{code:"OSRight",location:o}}),f(A,"safari",{3:{code:"Enter"},25:{code:"Tab"}}),f(A,"ios",{10:{code:"Enter",location:n}}),f(A,"safari-mac",{91:{code:"OSLeft",location:i},93:{code:"OSRight",location:o},229:{code:"KeyQ",keyCap:"Q"}});var g={};u==="cros"&&(g["U+00A0"]={code:"ShiftLeft",location:i},g["U+00A1"]={code:"ShiftRight",location:o},g["U+00A2"]={code:"ControlLeft",location:i},g["U+00A3"]={code:"ControlRight",location:o},g["U+00A4"]={code:"AltLeft",location:i},g["U+00A5"]={code:"AltRight",location:o}),d==="chrome-mac"&&(g["U+0010"]={code:"ContextMenu"}),d==="safari-mac"&&(g["U+0010"]={code:"ContextMenu"}),u==="ios"&&(g["U+0010"]={code:"Function"},g["U+001C"]={code:"ArrowLeft"},g["U+001D"]={code:"ArrowRight"},g["U+001E"]={code:"ArrowUp"},g["U+001F"]={code:"ArrowDown"},g["U+0001"]={code:"Home"},g["U+0004"]={code:"End"},g["U+000B"]={code:"PageUp"},g["U+000C"]={code:"PageDown"});var v=[];v[i]={16:{code:"ShiftLeft",location:i},17:{code:"ControlLeft",location:i},18:{code:"AltLeft",location:i}},v[o]={16:{code:"ShiftRight",location:o},17:{code:"ControlRight",location:o},18:{code:"AltRight",location:o}},v[a]={13:{code:"NumpadEnter",location:a}},f(v[a],"moz",{109:{code:"NumpadSubtract",location:a},107:{code:"NumpadAdd",location:a}}),f(v[i],"moz-mac",{224:{code:"OSLeft",location:i}}),f(v[o],"moz-mac",{224:{code:"OSRight",location:o}}),f(v[o],"moz-win",{91:{code:"OSRight",location:o}}),f(v[o],"mac",{93:{code:"OSRight",location:o}}),f(v[a],"chrome-mac",{12:{code:"NumLock",location:a}}),f(v[a],"safari-mac",{12:{code:"NumLock",location:a},187:{code:"NumpadAdd",location:a},189:{code:"NumpadSubtract",location:a},190:{code:"NumpadDecimal",location:a},191:{code:"NumpadDivide",location:a}});var b={ShiftLeft:{key:"Shift"},ShiftRight:{key:"Shift"},ControlLeft:{key:"Control"},ControlRight:{key:"Control"},AltLeft:{key:"Alt"},AltRight:{key:"Alt"},OSLeft:{key:"OS"},OSRight:{key:"OS"},NumpadEnter:{key:"Enter"},Space:{key:" "},Digit0:{key:"0",shiftKey:")"},Digit1:{key:"1",shiftKey:"!"},Digit2:{key:"2",shiftKey:"@"},Digit3:{key:"3",shiftKey:"#"},Digit4:{key:"4",shiftKey:"$"},Digit5:{key:"5",shiftKey:"%"},Digit6:{key:"6",shiftKey:"^"},Digit7:{key:"7",shiftKey:"&"},Digit8:{key:"8",shiftKey:"*"},Digit9:{key:"9",shiftKey:"("},KeyA:{key:"a",shiftKey:"A"},KeyB:{key:"b",shiftKey:"B"},KeyC:{key:"c",shiftKey:"C"},KeyD:{key:"d",shiftKey:"D"},KeyE:{key:"e",shiftKey:"E"},KeyF:{key:"f",shiftKey:"F"},KeyG:{key:"g",shiftKey:"G"},KeyH:{key:"h",shiftKey:"H"},KeyI:{key:"i",shiftKey:"I"},KeyJ:{key:"j",shiftKey:"J"},KeyK:{key:"k",shiftKey:"K"},KeyL:{key:"l",shiftKey:"L"},KeyM:{key:"m",shiftKey:"M"},KeyN:{key:"n",shiftKey:"N"},KeyO:{key:"o",shiftKey:"O"},KeyP:{key:"p",shiftKey:"P"},KeyQ:{key:"q",shiftKey:"Q"},KeyR:{key:"r",shiftKey:"R"},KeyS:{key:"s",shiftKey:"S"},KeyT:{key:"t",shiftKey:"T"},KeyU:{key:"u",shiftKey:"U"},KeyV:{key:"v",shiftKey:"V"},KeyW:{key:"w",shiftKey:"W"},KeyX:{key:"x",shiftKey:"X"},KeyY:{key:"y",shiftKey:"Y"},KeyZ:{key:"z",shiftKey:"Z"},Numpad0:{key:"0"},Numpad1:{key:"1"},Numpad2:{key:"2"},Numpad3:{key:"3"},Numpad4:{key:"4"},Numpad5:{key:"5"},Numpad6:{key:"6"},Numpad7:{key:"7"},Numpad8:{key:"8"},Numpad9:{key:"9"},NumpadMultiply:{key:"*"},NumpadAdd:{key:"+"},NumpadComma:{key:","},NumpadSubtract:{key:"-"},NumpadDecimal:{key:"."},NumpadDivide:{key:"/"},Semicolon:{key:";",shiftKey:":"},Equal:{key:"=",shiftKey:"+"},Comma:{key:",",shiftKey:"<"},Minus:{key:"-",shiftKey:"_"},Period:{key:".",shiftKey:">"},Slash:{key:"/",shiftKey:"?"},Backquote:{key:"`",shiftKey:"~"},BracketLeft:{key:"[",shiftKey:"{"},Backslash:{key:"\\",shiftKey:"|"},BracketRight:{key:"]",shiftKey:"}"},Quote:{key:"'",shiftKey:'"'},IntlBackslash:{key:"\\",shiftKey:"|"}};f(b,"mac",{OSLeft:{key:"Meta"},OSRight:{key:"Meta"}});var x={Esc:"Escape",Nonconvert:"NonConvert",Left:"ArrowLeft",Up:"ArrowUp",Right:"ArrowRight",Down:"ArrowDown",Del:"Delete",Menu:"ContextMenu",MediaNextTrack:"MediaTrackNext",MediaPreviousTrack:"MediaTrackPrevious",SelectMedia:"MediaSelect",HalfWidth:"Hankaku",FullWidth:"Zenkaku",RomanCharacters:"Romaji",Crsel:"CrSel",Exsel:"ExSel",Zoom:"ZoomToggle"},E=p(A,"code");try{var S=e&&"location"in new KeyboardEvent("")}catch{}function M(T){var L="keyCode"in T?T.keyCode:"which"in T?T.which:0,B=function(){if(S||"keyLocation"in T){var D=S?T.location:T.keyLocation;if(D&&L in v[D])return v[D][L]}return"keyIdentifier"in T&&T.keyIdentifier in g?g[T.keyIdentifier]:L in A?A[L]:null}();if(!B)return null;var F=function(){var D=b[B.code];return D?T.shiftKey&&"shiftKey"in D?D.shiftKey:D.key:B.code}();return{code:B.code,key:F,location:B.location,keyCap:B.keyCap}}function C(T,L){if(T=String(T),!E.hasOwnProperty(T))return"Undefined";if(L&&String(L).toLowerCase()!=="en-us")throw Error("Unsupported locale");var B=E[T];return B.keyCap||B.code||"Undefined"}"KeyboardEvent"in s&&"defineProperty"in Object&&function(){function T(B,F,D){F in B||Object.defineProperty(B,F,D)}if(T(KeyboardEvent.prototype,"code",{get:function(){var B=M(this);return B?B.code:""}}),"key"in KeyboardEvent.prototype){var L=Object.getOwnPropertyDescriptor(KeyboardEvent.prototype,"key");Object.defineProperty(KeyboardEvent.prototype,"key",{get:function(){var B=L.get.call(this);return x.hasOwnProperty(B)?x[B]:B}})}T(KeyboardEvent.prototype,"key",{get:function(){var B=M(this);return B&&"key"in B?B.key:"Unidentified"}}),T(KeyboardEvent.prototype,"location",{get:function(){var B=M(this);return B&&"location"in B?B.location:n}}),T(KeyboardEvent.prototype,"locale",{get:function(){return""}})}(),"queryKeyCap"in s.KeyboardEvent||(s.KeyboardEvent.queryKeyCap=C),s.identifyKey=function(T){if(!("code"in T)){var L=M(T);T.code=L?L.code:"",T.key=L&&"key"in L?L.key:"Unidentified",T.location="location"in T?T.location:"keyLocation"in T?T.keyLocation:L&&"location"in L?L.location:n,T.locale=""}}})(window);const rU="__keyboard-controls-proxy",sU=window.KeyboardEvent;AFRAME.registerComponent("keyboard-controls",{schema:{enabled:{default:!0},debug:{default:!1}},init:function(){this.dVelocity=new THREE.Vector3,this.localKeys={},this.listeners={keydown:this.onKeyDown.bind(this),keyup:this.onKeyUp.bind(this),blur:this.onBlur.bind(this),onContextMenu:this.onContextMenu.bind(this)}},isVelocityActive:function(){return this.data.enabled&&!!Object.keys(this.getKeys()).length},getVelocityDelta:function(){const s=this.data,e=this.getKeys();return this.dVelocity.set(0,0,0),s.enabled&&((e.KeyW||e.ArrowUp)&&(this.dVelocity.z-=1),(e.KeyA||e.ArrowLeft)&&(this.dVelocity.x-=1),(e.KeyS||e.ArrowDown)&&(this.dVelocity.z+=1),(e.KeyD||e.ArrowRight)&&(this.dVelocity.x+=1),e.ShiftLeft&&(this.dVelocity=this.dVelocity.multiplyScalar(2))),this.dVelocity.clone()},play:function(){this.attachEventListeners()},pause:function(){this.removeEventListeners()},attachEventListeners:function(){window.addEventListener("contextmenu",this.listeners.onContextMenu,!1),window.addEventListener("keydown",this.listeners.keydown,!1),window.addEventListener("keyup",this.listeners.keyup,!1),window.addEventListener("blur",this.listeners.blur,!1)},onContextMenu:function(){for(const s in this.localKeys)this.localKeys.hasOwnProperty(s)&&delete this.localKeys[s]},removeEventListeners:function(){window.removeEventListener("keydown",this.listeners.keydown),window.removeEventListener("keyup",this.listeners.keyup),window.removeEventListener("blur",this.listeners.blur)},onKeyDown:function(s){AFRAME.utils.shouldCaptureKeyEvent(s)&&(this.localKeys[s.code]=!0,this.emit(s))},onKeyUp:function(s){AFRAME.utils.shouldCaptureKeyEvent(s)&&(delete this.localKeys[s.code],this.emit(s))},onBlur:function(){for(const s in this.localKeys)this.localKeys.hasOwnProperty(s)&&delete this.localKeys[s]},emit:function(s){rU in s&&this.el.emit(s.type,s),this.el.emit(s.type+":"+s.code,new sU(s.type,s)),this.data.debug&&console.log(s.type+":"+s.code)},isPressed:function(s){return s in this.getKeys()},getKeys:function(){return this.isProxied()?this.el.sceneEl.components["proxy-controls"].getKeyboard():this.localKeys},isProxied:function(){const s=this.el.sceneEl.components["proxy-controls"];return s&&s.isConnected()}});AFRAME.registerComponent("touch-controls",{schema:{enabled:{default:!0},reverseEnabled:{default:!0}},init:function(){this.dVelocity=new THREE.Vector3,this.bindMethods(),this.direction=0},play:function(){this.addEventListeners()},pause:function(){this.removeEventListeners(),this.dVelocity.set(0,0,0)},remove:function(){this.pause()},addEventListeners:function(){const s=this.el.sceneEl,e=s.canvas;if(!e){s.addEventListener("render-target-loaded",this.addEventListeners.bind(this));return}e.addEventListener("touchstart",this.onTouchStart),e.addEventListener("touchend",this.onTouchEnd);const n=s.getAttribute("vr-mode-ui");n&&n.cardboardModeEnabled&&s.addEventListener("enter-vr",this.onEnterVR)},removeEventListeners:function(){const s=this.el.sceneEl&&this.el.sceneEl.canvas;s&&(s.removeEventListener("touchstart",this.onTouchStart),s.removeEventListener("touchend",this.onTouchEnd),this.el.sceneEl.removeEventListener("enter-vr",this.onEnterVR))},isVelocityActive:function(){return this.data.enabled&&!!this.direction},getVelocityDelta:function(){return this.dVelocity.z=this.direction,this.dVelocity.clone()},bindMethods:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.onEnterVR=this.onEnterVR.bind(this)},onTouchStart:function(s){this.direction=-1,this.data.reverseEnabled&&s.touches&&s.touches.length===2&&(this.direction=1),s.preventDefault()},onTouchEnd:function(s){this.direction=0,s.preventDefault()},onEnterVR:function(){const s=this.el.sceneEl.xrSession;s&&(s.addEventListener("selectstart",this.onTouchStart),s.addEventListener("selectend",this.onTouchEnd))}});const r1="-controls",oU=.2,aU=1e-5,lU="moved";AFRAME.registerComponent("movement-controls",{dependencies:["rotation"],schema:{enabled:{default:!0},controls:{default:["gamepad","trackpad","keyboard","touch"]},speed:{default:.3,min:0},fly:{default:!1},constrainToNavMesh:{default:!1},camera:{default:"[movement-controls] [camera]",type:"selector"}},init:function(){const s=this.el;this.data.camera||(this.data.camera=s.querySelector("[camera]")),this.velocityCtrl=null,this.velocity=new THREE.Vector3,this.heading=new THREE.Quaternion,this.eventDetail={},this.navGroup=null,this.navNode=null,s.sceneEl.hasLoaded?this.injectControls():s.sceneEl.addEventListener("loaded",this.injectControls.bind(this))},update:function(s){const e=this.el,n=this.data,i=e.sceneEl.systems.nav;if(e.sceneEl.hasLoaded&&this.injectControls(),i&&n.constrainToNavMesh!==s.constrainToNavMesh&&(n.constrainToNavMesh?i.addAgent(this):i.removeAgent(this)),n.enabled!==s.enabled)for(let o=0;ooU?h.set(0,0,0):this.updateVelocity(o),c.constrainToNavMesh&&u.isNavMeshConstrained!==!1){if(h.lengthSq()0){let i=0,o=0;e.enableNegX&&n[0]this.startingAxisData[0]&&(i=1),e.enablePosZ&&n[1]>this.startingAxisData[1]&&(o=-1),e.enableNegZ&&n[1]a?(this.zVel=0,this.xVel=i,this.isMoving=!0):(this.xVel=0,this.zVel=o,this.isMoving=!0)}},handleTouchAxis:function(s){const e=this.data,n=s.detail.axis;let i=0,o=0;e.enableNegX&&n[0]<0&&(i=-1),e.enablePosX&&n[0]>0&&(i=1),e.enablePosZ&&n[1]>0&&(o=-1),e.enableNegZ&&n[1]<0&&(o=1),Math.abs(n[0])>Math.abs(n[1])?(this.zVel=0,this.xVel=i):(this.xVel=0,this.zVel=o)}});const Q0=(s,e)=>{const n=e.x-s.x,i=e.y-s.y;return Math.sqrt(n*n+i*i)},cU=(s,e)=>{const n=e.x-s.x,i=e.y-s.y;return uU(Math.atan2(i,n))},hU=(s,e,n)=>{const i={x:0,y:0};return n=Ab(n),i.x=s.x-e*Math.cos(n),i.y=s.y-e*Math.sin(n),i},Ab=s=>s*(Math.PI/180),uU=s=>s*(180/Math.PI),dU=s=>isNaN(s.buttons)?s.pressure!==0:s.buttons!==0,s1=new Map,dC=s=>{s1.has(s)&&clearTimeout(s1.get(s)),s1.set(s,setTimeout(s,100))},ov=(s,e,n)=>{const i=e.split(/[ ,]+/g);let o;for(let a=0;a{const i=e.split(/[ ,]+/g);let o;for(let a=0;a(s.preventDefault(),s.type.match(/^touch/)?s.changedTouches:s),pC=()=>{const s=window.pageXOffset!==void 0?window.pageXOffset:(document.documentElement||document.body.parentNode||document.body).scrollLeft,e=window.pageYOffset!==void 0?window.pageYOffset:(document.documentElement||document.body.parentNode||document.body).scrollTop;return{x:s,y:e}},mC=(s,e)=>{e.top||e.right||e.bottom||e.left?(s.style.top=e.top,s.style.right=e.right,s.style.bottom=e.bottom,s.style.left=e.left):(s.style.left=e.x+"px",s.style.top=e.y+"px")},C_=(s,e,n)=>{const i=rI(s);for(let o in i)if(i.hasOwnProperty(o))if(typeof e=="string")i[o]=e+" "+n;else{let a="";for(let c=0,u=e.length;c{const n=rI(s);for(let i in n)n.hasOwnProperty(i)&&(n[i]=e);return n},rI=s=>{const e={};return e[s]="",["webkit","Moz","o"].forEach(function(i){e[i+s.charAt(0).toUpperCase()+s.slice(1)]=""}),e},o1=(s,e)=>{for(let n in e)e.hasOwnProperty(n)&&(s[n]=e[n]);return s},pU=(s,e)=>{const n={};for(let i in s)s.hasOwnProperty(i)&&e.hasOwnProperty(i)?n[i]=e[i]:s.hasOwnProperty(i)&&(n[i]=s[i]);return n},vb=(s,e)=>{if(s.length)for(let n=0,i=s.length;n({x:Math.min(Math.max(s.x,e.x-n),e.x+n),y:Math.min(Math.max(s.y,e.y-n),e.y+n)});var gU="ontouchstart"in window,AU=!!window.PointerEvent,vU=!!window.MSPointerEvent,lp={touch:{start:"touchstart",move:"touchmove",end:"touchend, touchcancel"},mouse:{start:"mousedown",move:"mousemove",end:"mouseup"},pointer:{start:"pointerdown",move:"pointermove",end:"pointerup, pointercancel"},MSPointer:{start:"MSPointerDown",move:"MSPointerMove",end:"MSPointerUp"}},qd,om={};AU?qd=lp.pointer:vU?qd=lp.MSPointer:gU?(qd=lp.touch,om=lp.mouse):qd=lp.mouse;function ic(){}ic.prototype.on=function(s,e){var n=this,i=s.split(/[ ,]+/g),o;n._handlers_=n._handlers_||{};for(var a=0;a=0&&n._handlers_[s].splice(n._handlers_[s].indexOf(e),1),n};ic.prototype.trigger=function(s,e){var n=this,i=s.split(/[ ,]+/g),o;n._handlers_=n._handlers_||{};for(var a=0;an&&e-n&&e<=n&&!s.lockY?o="left":e>-n*3&&e<=-n&&!s.lockX?o="down":s.lockY||(o="right"),s.lockY||(e>-i&&e0?c="up":c="down"),s.force>this.options.threshold){var u={},h;for(h in this.direction)this.direction.hasOwnProperty(h)&&(u[h]=this.direction[h]);var d={};this.direction={x:a,y:c,angle:o},s.direction=this.direction;for(h in u)u[h]===this.direction[h]&&(d[h]=!0);if(d.x&&d.y&&d.angle)return s;(!d.x||!d.y)&&this.trigger("plain",s),d.x||this.trigger("plain:"+a,s),d.y||this.trigger("plain:"+c,s),d.angle||this.trigger("dir dir:"+o,s)}else this.resetDirection();return s};function ns(s,e){var n=this;n.nipples=[],n.idles=[],n.actives=[],n.ids=[],n.pressureIntervals={},n.manager=s,n.id=ns.id,ns.id+=1,n.defaults={zone:document.body,multitouch:!1,maxNumberOfNipples:10,mode:"dynamic",position:{top:0,left:0},catchDistance:200,size:100,threshold:.1,color:"white",fadeTime:250,dataOnly:!1,restJoystick:!0,restOpacity:.5,lockX:!1,lockY:!1,shape:"circle",dynamicPage:!1,follow:!1},n.config(e),(n.options.mode==="static"||n.options.mode==="semi")&&(n.options.multitouch=!1),n.options.multitouch||(n.options.maxNumberOfNipples=1);const i=getComputedStyle(n.options.zone.parentElement);return i&&i.display==="flex"&&(n.parentIsFlex=!0),n.updateBox(),n.prepareNipples(),n.bindings(),n.begin(),n.nipples}ns.prototype=new ic;ns.constructor=ns;ns.id=0;ns.prototype.prepareNipples=function(){var s=this,e=s.nipples;e.on=s.on.bind(s),e.off=s.off.bind(s),e.options=s.options,e.destroy=s.destroy.bind(s),e.ids=s.ids,e.id=s.id,e.processOnMove=s.processOnMove.bind(s),e.processOnEnd=s.processOnEnd.bind(s),e.get=function(n){if(n===void 0)return e[0];for(var i=0,o=e.length;i